1export const __webpack_id__=7182;export const __webpack_ids__=[7182];export const __webpack_modules__={12587:(e,t,n)=>{n.r(t),n.d(t,{Cashier:()=>_o,Deposit:()=>To,Withdrawal:()=>jo,getCashierComponent:()=>No});var a={};n.r(a),n.d(a,{defaultState:()=>V,reducer:()=>Y});var o={};n.r(o),n.d(o,{BankTransferCH:()=>Cn,DotpayBankTransfer:()=>gn,DotpayBlik:()=>pn,DotpayCard:()=>hn,NuveiRealCard:()=>bn,PayPalViaSC:()=>yn});var r={};n.r(r),n.d(r,{ApplePayEPG:()=>Fa,CC:()=>va,CardsPS:()=>za,EasyCC:()=>ja,PraxisCard:()=>Da});var i,s=n(45932),c=n.n(s),l=n(74848),d=n(96540),u=n(56347),m=n(19268),v=n(30514),p=n(84974),h=n(19611),f=n(37489);!function(e){e.SET_METHODS="CASHIER:METHODS:SET",e.SET_IS_LOADING="CASHIER:IS_LOADING:SET",e.SET_FORM_ERROR="CASHIER:FORM_ERROR:SET",e.SET_FRAUD_UUID="CASHIER:FRAUD_UUID:SET",e.SET_ACTIVE_METHOD="CASHIER:ACTIVE_METHOD:SET",e.SET_IS_FORM_LOADING="CASHIER:IS_FORM_LOADING:SET",e.SET_CUSTOM_FORM_DATA="CASHIER:CUSTOM_FORM_DATA:SET",e.SET_IS_NEW_ACCOUNT_FLOW="CASHIER:IS_NEW_ACCOUNT_FLOW:SET"}(i||(i={}));const y=e=>({type:i.SET_METHODS,payload:e}),b=e=>({type:i.SET_ACTIVE_METHOD,payload:e}),C=e=>({type:i.SET_IS_NEW_ACCOUNT_FLOW,payload:e}),g=e=>({type:i.SET_IS_FORM_LOADING,payload:e}),E=e=>({type:i.SET_FORM_ERROR,payload:e}),_=e=>({type:i.SET_CUSTOM_FORM_DATA,payload:e});var N=n(63412),T=n.n(N),j=n(13646),x=n(57182),w=n(79511),P=n(11948);const O={paymentMethodIcon:"PaymentMethodIcon__paymentMethodIcon--NeJ"},S=({className:e,code:t})=>{const{showPaymentMethodIcons:n}=(0,p.TP)(),a=(0,x.N)(),o=`paymentMethodIcon-${t}`,r=(0,w.$z)([o,e,`cms-cashier-${t}`,`paymentMethodIcon-${t.toLowerCase()}`,(0,w.$I)([O],["paymentMethodIcon",o])]);return n?(0,l.jsx)("span",{"aria-label":a("payment-method"),className:r,role:"img"}):null};var D=n(40476),A=n(80551),I=n(34359),R=n(9982),M=n(27474),F=n(23745);var k=n(46792),L=n(53108),$=n(75787),H=n(22750);var U=n(74294),B=n(1932);const V={formError:"",isLoading:!0,isFormLoading:!1,methods:[],activeMethod:null,isNewAccountFlow:!1,customFormData:null},Y=e=>(0,B.jM)(((t,n)=>{switch(n.type){case i.SET_IS_LOADING:case i.SET_IS_LOADING+e:t.isLoading=n.payload;break;case i.SET_METHODS:case i.SET_METHODS+e:t.methods=n.payload,t.isLoading=!1;break;case i.SET_ACTIVE_METHOD:case i.SET_ACTIVE_METHOD+e:{const e=n.payload;t.formError="",t.isFormLoading=!1,t.customFormData=null,t.isNewAccountFlow=!1,t.activeMethod=t.methods.find((t=>t.code===e))||null;break}case i.SET_IS_NEW_ACCOUNT_FLOW:case i.SET_IS_NEW_ACCOUNT_FLOW+e:t.isNewAccountFlow=n.payload;break;case i.SET_IS_FORM_LOADING:case i.SET_IS_FORM_LOADING+e:t.isFormLoading=n.payload;break;case i.SET_FORM_ERROR:case i.SET_FORM_ERROR+e:t.formError=n.payload;break;case i.SET_CUSTOM_FORM_DATA:case i.SET_CUSTOM_FORM_DATA+e:t.customFormData=n.payload;break;case i.SET_FRAUD_UUID:case i.SET_FRAUD_UUID+e:Object.assign(t,{fraudUuid:n.payload})}}),V),{withDynamicReducer:G,useDynamicReducerSelector:W,useDynamicReducerDispatch:q}=(0,U.X)("Cashier",a);var J=n(61415),z=n(36754);const X=()=>{const e=(0,x.N)();return(0,d.useCallback)((t=>{var n;if(!(0,z.rk)(t))return"";const a=(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.error)||{},{code:o,message:r,description:i}=a;return e(`error.${null!=o?o:404}`,r||i||"")}),[e])},K=()=>{const e=(0,x.N)(),{type:t}=(0,p.TP)();return(0,d.useCallback)((n=>{const{errorCode:a,errorMessage:o,errorDescription:r,error:i}=(null==n?void 0:n.data)||{},s=o||r||(null==i?void 0:i.description)||"";return e(`error-${t}.${null!=a?a:404}`,s)}),[e,t])};var Z=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const Q=()=>{const e=(0,k.k)(),t=q(),n=(0,L.Z)(),a=(0,$.p)(),o=(0,H.n)(),r=X(),s=K(),{showComponentError:c,isComponentMounted:l}=(0,j.z)(),{type:u,paymentMethodsOrder:m,suggestDepositAmounts:v=!1,hideParentPaymentMethods:f}=(0,p.TP)();return(0,d.useCallback)((d=>Z(void 0,void 0,void 0,(function*(){t((e=>({type:i.SET_IS_LOADING,payload:e}))(!0));try{const n=(e=>{const{type:t,paymentMethodsOrder:n,suggestDepositAmounts:a}=e;return Object.assign(Object.assign({type:t},t===h.v.DEPOSIT&&{suggestions:a}),{byplayerhistory:"byPlayerHistory"===n,bycountrypopularity:"byCountryPopularity"===n,bycasinoconfiguration:"byCasinoConfiguration"===n})})({type:u,paymentMethodsOrder:m,suggestDepositAmounts:v}),[r=[],i=[]]=yield Promise.all([a(n),o({type:u}
1)]),s=(0,J.rq)({accounts:i,formatAmount:t=>e.formatCurrency(t),hideParentPaymentMethods:f,methods:r,paymentMethodsOrder:m,type:u});l()&&(t(y(s)),d&&t(b(d)))}catch(e){const a=(null==e?void 0:e.response)||e||{},o=-1===a.ID?n(e):r(a)||s(a);l()&&t(y([])),c(o)}}))),[t,e,n,s,o,a,r,f,l,m,c,v,u])};var ee=n(66229),te=n(96941),ne=n(18336),ae=n(98450),oe=n(27411);var re=n(82509);const ie=()=>{const e=(0,oe.a)(),t=W(c()("activeMethod")),{accountFields:{field:n=[]}={}}=t||{},a=n.filter((e=>e.type===h.Ys.PASSWORD)).map((e=>e.name)),o=(e=>(0,d.useMemo)((()=>[]),[e]))(null==t?void 0:t.code);return(0,d.useCallback)((({form:t})=>{const{change:n,resetFieldState:r,getRegisteredFields:i}=t,s=i(),c=[...a,...re.Wk,...o].filter((e=>s.includes(e)));c.forEach((e=>n(e,""))),setTimeout((()=>{e()&&c.forEach((e=>r(e)))}),0)}),[a,o,e])};var se=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const ce=()=>{const e=(0,ee.wA)(),t=(0,L.Z)(),n=(0,x.N)(),a=q(),o=ie(),r=X(),i=W(c()("activeMethod")),s=(0,ae.j7)();return(0,d.useCallback)((({resolve:c,reject:l,depositProcess:d,response:u,form:m,extWindow:v})=>{var p,f,y,b;if(null==v||v.close(),!u)return void l({formError:n("playtech.mobile.system.error.no.response")});const C=(null==u?void 0:u.response)||u,{data:g={}}=C||{};if(-1===C.ID)return void l({formError:t(C)});if(304===g.errorCode)return void(()=>{se(void 0,void 0,void 0,(function*(){try{yield s({initiator:"deposit",onSuccess:()=>d(),onCancel:c})}catch(e){}}))})();const E=g.errorMessage||(null===(p=g.error)||void 0===p?void 0:p.message)||"",N=(0,z.qy)(g.error);if(N){const t=N.type===re.gl.DEPOSIT_CONFIRMED&&(0,z.rk)(u)?(null===(f=g.error)||void 0===f?void 0:f.message)||"":E;e((0,ne.HC)({content:t,title:(null===(y=g.error)||void 0===y?void 0:y.severity)||"Warning",onAccept:()=>d({[N.type]:!0}),onDecline:()=>{o({form:m}),c(C)}}))}else{const e=r(C)||n(`error.${g.errorCode}`,E)||n("playtech.mobile.system.systemError","System error");(null==i?void 0:i.code)===h.xM.DOTPAY_BLIK&&(null===(b=g.error)||void 0===b?void 0:b.code)&&Object.values(re.$9).includes(g.error.code)&&a(_({code:h.xM.DOTPAY_BLIK,response:u,formData:m.getState().values})),te.A.trigger("deposit:fail",g),l(Object.assign(Object.assign({},C),{formError:e}))}}),[null==i?void 0:i.code,o,e,a,t,r,s,n])};var le=n(71316),de=n(76189);const ue=({headerParameters:e,name:t,defaultValue:n})=>{const a=e[t];return Array.isArray(a)&&a[0]||n||""},me=e=>{const t=(t,n)=>ue({headerParameters:e,name:t,defaultValue:n}),n=t("Location",""),a=t("X-Redirect-Method","GET"),o=t("X-Redirect-Content"),r=t("X-Redirect-ContentType",""),i=t("X-Redirect-Type"),s=t("X-Transaction-Code"),c=Object.assign(Object.assign({url:n,method:a,contentType:r},i&&{xRedirectType:i}),s&&{transactionCode:s});return"POST"===a?Object.assign(Object.assign({},c),{postData:o?(0,m.MI)(o):{}}):Object.assign(Object.assign({},c),{url:n&&o?`${n.includes("?")?"&":"?"}${o}`:n})},ve=(e,t)=>{const n=me(e);return Object.assign(Object.assign({},n),t===h.v.DEPOSIT&&Object.assign({},((e,t)=>{if(!t.xRedirectType)return{};const n="threeDSMethod"===ue({headerParameters:e,name:"X-Redirect-Type"}),a=n?"threeDSMethodData":"creq";return{isHiddenIframe:n,is3DSecure:!0,reDirectType:h.e_.IFRAME,postData:{[a]:ue({headerParameters:e,name:"X-Redirect-Content"})}}})(e,n)))},pe=({url:e,method:t,contentType:n,postData:a={}})=>{const o=document.createElement("form"),r=document.createElement("input");return o.action=e,o.method=t,o.contentType=n,o.style.display="none",o.acceptCharset="UTF-8",Object.entries(a).forEach((([e,t])=>{const n=r.cloneNode();n.name=decodeURIComponent(e),n.value=((e,t)=>{const n="PaReq"===e?t:t.replace(/\+/g," ");return decodeURIComponent(n)})(n.name,t),o.appendChild(n)})),o},he=({paymentIframe:e,headerParameters:t,type:n})=>{const a=ve(t,n),o=(({iframe:e,redirectParams:t})=>"POST"===t.method?n=>{var a;const o=pe(t);n.appendChild(e),null===(a=e.contentDocument)||void 0===a||a.documentElement.appendChild(o),o.submit()}:n=>{n.appendChild(e),e.src=t.url})({iframe:e,redirectParams:a}),r=t=>()=>{var n,a;return null===(a=null===(n=null==e?void 0:e.contentWindow)||void 0===n?void 0:n.parent)||void 0===a?void 0:a.postMessage(t,window.location.origin)}
1,i={afterRender:e=>o(e),beforeClose:r({error:re.v0.LIGHTBOX_CLOSED})},{is3DSecure:s,isHiddenIframe:c}=a;return s?c?Object.assign(Object.assign({},i),{isHiddenLightBox:c,lifetime:1e4,onLifetimeEnd:r({error:re.v0.LIGHTBOX_TIMED_OUT_10S})}):Object.assign(Object.assign({},i),{lifetime:6e5,onLifetimeEnd:r({error:re.v0.LIGHTBOX_TIMED_OUT_10M})}):i},fe=(e,t)=>{const{error:n,href:a=window.location.href}=e,{search:o}=new window.URL(a,document.baseURI);return n?{action:t,status:re.g4.ERROR,initiator:re.TE.CASHIER}:(0,m.MI)(o)},ye=()=>{const e=(0,ee.wA)(),{type:t}=(0,p.TP)(),n=W(c()("activeMethod")),{reDirectType:a}=n||{};return(0,d.useCallback)((({data:n,extWindow:o})=>{const r=crypto.randomUUID(),{headerParameters:i}=n||{};let s,c,l=F.lQ;switch(a){case h.e_.POPUP:c=o&&(e=>{const t=setInterval((()=>{e.closed&&(clearInterval(t),window.postMessage({error:re.v0.REDIRECT_WINDOW_CLOSED},window.location.origin))}),200);return e})(o),l=()=>null==o?void 0:o.close();break;case h.e_.IFRAME:s=(()=>{const e=document.createElement("iframe");return e.style.width="100%",e.style.height="100%",e.style.border="none",e.allow="clipboard-read; clipboard-write self *;",e})(),l=()=>e((0,de.HF)(r));break;default:c=window}return new Promise((n=>{const o=({data:e,source:t})=>{const{error:r,href:i}=e,d=re.v0[r],u=a===h.e_.IFRAME?s.contentWindow:c;!r&&!i||u!==t&&!d||(window.removeEventListener("message",o),l(),n({error:r,href:i}))};if(window.addEventListener("message",o),a===h.e_.IFRAME){const n=he({paymentIframe:s,headerParameters:i,type:t});e((0,le.tH)({id:r,data:n}))}else c&&(({paymentWindow:e,headerParameters:t,type:n})=>{const a=ve(t,n),{url:o,method:r,contentType:i,postData:s={}}=a,c=n===h.v.DEPOSIT||n===h.v.WITHDRAWAL&&i&&Object.keys(s).length;if("POST"===r&&c){const t=pe(a);e.document.documentElement.appendChild(t),t.submit()}else e.location.href=o})({paymentWindow:c,headerParameters:i,type:t})}))}),[e,a,t])};var be=n(82874),Ce=n(53902),ge=n(53806),Ee=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};var _e=n(23579);var Ne=n(49373);var Te=n(36351),je=n(4240),xe=n(92519),we=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const Pe=()=>{const e=(0,x.N)(),t=(0,u.zy)(),n=(0,_e.Z)({replace:!0}),{type:a}=(0,p.TP)(),o=(0,R.Z9)(c()("clientPlatform")),r=(()=>{const e=(0,ee.wA)(),t=(0,x.N)(),n=(0,je.xS)();return(0,d.useCallback)(((a,o)=>we(void 0,void 0,void 0,(function*(){const{status:r,title:i}=a;e(yield n((0,Te.TG)({id:xe.CQ.TRANSACTION_NOTIFICATION_POPUP,title:i,content:o||t(`transaction.${r}`),metadata:{result:a}})))}))),[e,t,n])})();return(0,d.useCallback)(((i,s)=>{const{action:c,amount:l,status:d,initiator:u,extraData:m,type:v,transactionCode:p="",requestCode:f=""}=i||{},y=c?e(`${c}.title`):"",b={status:d,action:c,title:y,data:m},C=Object.values(re.g4).includes(d);return new Promise(((e,i)=>{if(u!==re.TE.CASHIER&&e(),((e,t)=>{var n;const{status:a,action:o,data:r}=e,i=Ne.Se();if(r&&i&&o===h.v.DEPOSIT&&a===re.g4.SUCCESS)try{const{promocode:e}=JSON.parse(window.atob(r));e===i&&(Ne.XZ(),null===(n=null==t?void 0:t.change)||void 0===n||n.call(t,re.dj.PROMO_CODE,""))}catch(e){console.warn("Cannot parse transaction data")}})(b,s),C){n(window.location.pathname,t.state,{preserveHash:!0,removeParams:re.ht});const s=`${c}:${d===re.g4.SUCCESS?"success":"fail"}`;if(te.A.trigger(s,{amount:l,status:d,code:p,method:v}),"download"===o&&e(),p||f)return(e=>(0,M.t)(Object.assign(Object.assign({},e),{ID:35640,responses:[35641,35642],description:"Get Transaction Player Message"})))({type:a,transactionId:p||f}).then((t=>{var n,a;null===(a=null===(n=t.data)||void 0===n?void 0:n.actions)||void 0===a||a.forEach((e=>{var t;const n=null===(t=e.showMessageNotificationInfo)||void 0===t?void 0:t.message;r(b,n)})),e()})).catch((e=>{r(b),i(e)}));r(b)}e()}))}),[e,n,o,r,a,t.state])},Oe=e=>{if(!e)return{};const t=e.split("-");return{day:parseInt(t[2]),month:parseInt(t[1]),year:parseInt(t[0])}};var Se;!function(e){e.PAYMENT_HANDLE_REDIRECT="PAYMENT_HANDLE_REDIRECT",e.PAYMENT_HANDLE_NOT_CREATED="PAYMENT_HANDLE_NOT_CREATED",e.PAYMENT_HANDLE_PAYABLE="PAYMENT_HANDLE_PAYABLE",e.PAYMENT_HANDLE_CREATED="PAYMENT_HANDLE_CREATED"}(Se||(Se={}));
1var De=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const Ae=()=>{const e=Q(),t=Pe(),n=(()=>{const e=(0,ge.B)();return(0,d.useCallback)((t=>Ee(void 0,[t],void 0,(function*({methodCode:t,apmListenerRequestParameters:n,creditCardListenerRequestParameters:a,correlationId:o}){const{data:r}=yield e(Object.assign(Object.assign({ID:35747,responses:[35748,35749],description:"Deposit listener request",correlationId:o,methodCode:t},n&&{apmListenerRequestParameters:n}),a&&{creditCardListenerRequestParameters:a}));return r}))),[e])})(),a=(0,x.N)(),o=(0,d.useRef)(crypto.randomUUID()),r=W(c()("activeMethod")),i=(0,d.useCallback)(((e,n)=>{t(Object.assign({action:h.v.DEPOSIT,initiator:re.TE.CASHIER,status:e},n))}),[t]);return(0,d.useCallback)((t=>De(void 0,void 0,void 0,(function*(){var s,c;const{response:{data:l},reject:d,resolve:u}=t,m=(null===(c=null===(s=l.headerParameters)||void 0===s?void 0:s.Location)||void 0===c?void 0:c[0])||"",v=me(l.headerParameters),p=a("playtech.mobile.system.systemError","System error"),h=o.current;let f=null;const y=()=>(null==f?void 0:f.isOpen)&&(null==f?void 0:f.close()),b=(t,a,o)=>De(void 0,void 0,void 0,(function*(){if(f=t,a||!(null==o?void 0:o.paymentHandleToken))return(0,be.Rm)("error",a?a.detailedMessage:"missing paysafe token"),i(re.g4.ERROR),u({}),void y();try{const t=yield n({methodCode:null==r?void 0:r.code,correlationId:(0,F.NF)("paysafe"),apmListenerRequestParameters:{getParameters:[{value:o.paymentHandleToken,key:"paymentHandleToken"},...o.customerOperation?[{key:"customerOperation",value:o.customerOperation}
1]:[],{value:v.transactionCode,key:"pp"}]}}),{transactionData:{status:a,code:s="",amount:{amount:c}={}}={}}=t||{};if("declined"===a)return i(re.g4.ERROR),y(),void u({});i(re.g4.SUCCESS,{amount:c,transactionCode:s.toString()}),y(),u({}),e()}catch(e){i(re.g4.ERROR),y(),u({})}})),C=e=>{var t;switch(e){case Se.PAYMENT_HANDLE_REDIRECT:case Se.PAYMENT_HANDLE_NOT_CREATED:i(re.g4.CANCEL);break;case Se.PAYMENT_HANDLE_PAYABLE:case Se.PAYMENT_HANDLE_CREATED:default:y()}null===(t=document.querySelector(".paysafe-script"))||void 0===t||t.remove(),u({}),Ce.f.enableBodyScroll(h)};if(!m)return void d({formError:p});const g=document.createElement("script");g.src=m,g.type="text/javascript",g.classList.add("paysafe-script"),g.onload=()=>{if(!window.paysafe)return(0,be.Rm)("error","paysafe API is unavailable in window"),void d({formError:p});((e,t,n,a)=>{var o;const{displayPaymentMethods:r,environment:i,merchantRefNum:s,currencyCode:c,amount:l,singleUseCustomerToken:d,apiKey:u,ZIP:m,COUNTRY_CODE:v,CITY:p,ADDRESS:h,LAST_NAME:f,FIRST_NAME:y,EMAIL:b,PHONE:C,BIRTH_DATE:g,simulator:E,STATE:_,consumerId:N,accountId:T,last4ssn:j,registrationId:x,emailSubject:w,emailMessage:P,label:O,documentNumber:S}=e.postData||{},D=(null==S?void 0:S.replace(/\D/g,""))||"",A=Object.assign(Object.assign({displayPaymentMethods:[r],environment:i,merchantRefNum:s,currency:c,amount:parseFloat(l),singleUseCustomerToken:d,billingAddress:Object.assign({zip:m,country:v,city:p,street:h},_&&{state:_}),customer:Object.assign(Object.assign({lastName:f,firstName:y,email:b,phone:C},D&&{identityDocuments:[{type:"SOCIAL_SECURITY",documentNumber:D}]}),{dateOfBirth:Oe(g)})},E&&{simulator:E}),{paymentMethodDetails:{["pay_by_bank"===r?"payByBank":r]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},N&&{consumerId:N}),T&&{accountId:T}),"applePay"===r&&O&&{label:O}),"sightline"===r&&j&&{last4ssn:j}),"vippreferred"===r&&x&&{registrationId:x}),"skrill"===r&&w&&{emailSubject:w}),"skrill"===r&&P&&{emailMessage:P})}});Ce.f.disableBodyScroll(t),null===(o=window.paysafe)||void 0===o||o.checkout.setup(u,A,n,a)})(v,h,b,C)},document.head.append(g)}))),[a,i,r,e,n])};var Ie=n(34615);var Re=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const Me=()=>{const e=(0,p.NR)(),t=W(c()("activeMethod")),{reDirectType:n}=t||{};return(0,d.useCallback)((t=>Re(void 0,void 0,void 0,(function*(){var a,o,r,i;const{response:{data:s},reject:c}=t,l=null===(o=null===(a=s.headerParameters)||void 0===a?void 0:a.Location)||void 0===o?void 0:o[0],d=e("playtech.mobile.system.systemError","System error");l||c({formError:d});const{formDT:u,optionsDT:v}=((e,t)=>{var n,a;const o=null===(a=null===(n=e.headerParameters)||void 0===n?void 0:n["X-Redirect-Content"])||void 0===a?void 0:a[0],r=(0,F.NF)("datatrans-"),i=document.createElement("form"),s=Object.assign(Object.assign({},t===h.e_.LIGHT_BOX_JSON&&o&&{transactionId:o}),{form:`#${r}`,closed:()=>{document.body.removeChild(i)}});if(i.id=r,t===h.e_.LIGHT_BOX){const e=(0,m.MI)(o);Object.keys(e).forEach((t=>{i.setAttribute(t,e[t])}))}return{formDT:i,optionsDT:s}})(s,n),p=window.define;window.define=null;try{yield(0,Ie.I)(l),window.define=p,document.body.appendChild(u),null===(i=null===(r=window.Datatrans)||void 0===r?void 0:r.startPayment)||void 0===i||i.call(r,v)}catch(e){c({formError:d})}}))),[e,n])};var Fe=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};var ke=n(12272),Le=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n};var $e=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n};const He=e=>{const t=(()=>{const{activeMethod:e,fraudUuid:t}=W(T()(["activeMethod","fraudUuid"])),{account:n=[],accountFields:{field:a=[]}={}}=e||{};return(0,d.useCallback)((e=>{var o,r;if(!a.length)return e;let i;const s={},{specificParams:c,accountCode:l}=e,d=Le(e,["specificParams","accountCode"]),u=n.find((e=>e.code===l)),m=null===(o=a.find((e=>e.label===re.SZ.AGREEMENT_FIELD)))||void 0===o?void 0:o.name;m&&!0===(null==c?void 0:c[m])&&(s[m]="on");const v=a.reduce(((e,t)=>{const{label:n}=t;return n!==re.SZ.AGREEMENT_FIELD&&n!==re.SZ.UUID||(e[n]=t.name),e}),{});if(re.SZ.AGREEMENT_FIELD in v){const e=null===(r=null==u?void 0:u.specificParams)||void 0===r?void 0:r[v[re.SZ.AGREEMENT_FIELD]];(null==c?void 0:c[v[re.SZ.AGREEMENT_FIELD]])&&(i=["ReferenceTransaction"],e&&t&&re.SZ.UUID in v&&(s[v[re.SZ.UUID]]=t))}return Object.assign(Object.assign(Object.assign({},d),i&&{subMethodsCodes:i}),{specificParams:Object.assign(Object.assign({},c),s)})}),[a,t,n])})(),{isNewAccountFlow:n}=W(T()(["isNewAccountFlow"]));return(0,d.useCallback)((a=>{switch(e){case h.xM.PAYPAL_VIA_SC:return t(a);case h.xM.DOTPAY_BANK_TRANSFER:{const{accountCode:e}=a,t=a.specificParams,{subMethodsCodes:n}=t,o=$e(t,["subMethodsCodes"]),r=$e(a,["accountCode","specificParams"]);return Object.assign(Object.assign(Object.assign({},r),{specificParams:o}),n&&{subMethodsCodes:[n]})}case h.xM.DOTPAY_BLIK:{const e=a.specificParams,{altAccount:t,field1:n}=e,o=$e(e,["altAccount","field1"]);return Object.assign(Object.assign(Object.assign({},a),t?{selectedAccount:t,specificParams:o}:{}),{specificParams:Object.assign(Object.assign({},o),n?{field1:n}:{})})}case h.xM.DOTPAY_CARD:{const{accountCode:e}=a,t=a.specificParams,{field1:o,field2:r}=t,i=$e(t,["field1","field2"]),s=$e(a,["accountCode","specificParams"]);return Object.assign(Object.assign({},s),{specificParams:Object.assign(Object.assign({},i),n?{}:{field2:r})})}default:return a}}),[e,t,n])};var Ue=n(26564),Be=n.n(Ue);const Ve=({data:e,clientIp:t,accountFields:n})=>{const a=[...Object.values(re.gl),...Object.values(re.dj)],o=Be()(a,e);return Object.assign(Object.assign({},(0,z.dQ)(o,n)),(({clientIp:e})=>({threeDSBrowserAcceptHeader:"text/html",threeDSBrowserIP:e,threeDSBrowserJavaEnabled:navigator.javaEnabled(),threeDSBrowserJavascriptEnabled:!0,threeDSBrowserLanguage:navigator.language,threeDSBrowserColorDepth:screen.colorDepth,threeDSBrowserScreenHeight:screen.height,threeDSBrowserScreenWidth:screen.width,threeDSBrowserTimeZone:(new Date).getTimezoneOffset(),threeDSBrowserUserAgent:navigator.userAgent.
1substring(0,2e3),threeDSChallengeWindowSize:"05"}))({clientIp:t}))},Ye=()=>{const{showPromoCodeField:e}=(0,p.TP)(),t=ie();return(0,d.useCallback)((({response:n,form:a})=>{var o;const{data:r={}}=(null==n?void 0:n.response)||n||{};(0,z.qy)(r.error)||t({form:a}),e&&!(null===(o=null==n?void 0:n.data)||void 0===o?void 0:o.headerParameters)&&(({form:e,response:t})=>{var n;const{data:{error:a="",errorCode:o=""}={}}=t||{},r=null===(n=e.getFieldState(re.dj.PROMO_CODE))||void 0===n?void 0:n.value,i=Ne.Se();i===r?a&&3002!==o||(Ne.XZ(),e.change(re.dj.PROMO_CODE,"")):3002===o&&e.change(re.dj.PROMO_CODE,i||"")})({form:a,response:n})}),[e,t])};var Ge=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const We=e=>{const t=Q(),n=q(),a=(0,d.useRef)(),{themeName:o,genericIframeLoadingURL:r}=(0,R.GV)(T()(["themeName","genericIframeLoadingURL"])),i=(0,I.e)(e),s=ce(),l=(()=>{const e=q(),t=ye(),n=ce(),a=Me(),o=Ae(),r=Pe(),i=W(c()("activeMethod")),{name:s,reDirectType:l}=i||{};return(0,d.useCallback)((i=>{var c,d;const{resolve:u,response:m,extWindow:v,form:p}=i,{data:f}=m||{},y=p.getState().values;if(null==f?void 0:f.headerParameters){switch(l){case h.e_.APPLE_PAY_EPG:e(_({code:h.xM.APPLE_PAY_EPG,response:m,formData:y})),u({});break;case h.e_.JS_EASY_PG:e(_({code:h.xM.EASYCC,response:m,formData:y})),u({});break;case h.e_.LIGHT_BOX:case h.e_.LIGHT_BOX_JSON:(()=>{Fe(void 0,void 0,void 0,(function*(){yield a(i),u({})}))})();break;case h.e_.PRAXIS:e(_({code:h.xM.PRAXIS,response:m,formData:y})),u({});break;case h.e_.JS_PAY_SAFE_SDK:e(_({code:h.xM.CARDS_PS,response:m,formData:y})),u({});break;case h.e_.JS_PAY_SAFE:(()=>{Fe(void 0,void 0,void 0,(function*(){yield o(i)}))})();break;case h.e_.JS_NUVEI:e(_({code:h.xM.NUVEI_CC,response:m,formData:y})),u({});break;default:(()=>{Fe(void 0,void 0,void 0,(function*(){try{const e=yield t({data:f,extWindow:v});if(e){const t=fe(e,h.v.DEPOSIT);yield r(t,p)}u({})}catch(e){n(Object.assign(Object.assign({},i),{response:e}))}}))})()}return}const{amount:b,status:C,code:g}=(null===(d=null===(c=null==f?void 0:f.payments)||void 0===c?void 0:c.transaction)||void 0===d?void 0:d[0])||{};te.A.trigger("deposit:success",{amount:b,status:C,code:g,method:s}),u(m)}),[e,s,t,l,o,r,n,a])})(),u=(()=>{const e=(0,ke.d)(),{clientIp:t,currencyCode:n}=(0,R.Cn)(T()(["clientIp","currencyCode"])),a=(0,R.Z9)(c()("clientPlatform")),{themeName:o,sendCashierMessagesToGS:r,clientType:i}=(0,R.GV)(T()(["themeName","sendCashierMessagesToGS","clientType"])),s=W(c()("activeMethod")),l=(0,R.Wr)(c()("portalPageURL")),u=He(null==s?void 0:s.code);return(0,d.useCallback)((c=>{var d,v;if(!s)return{};const p=null!==(d=(0,m.hc)("clientType"))&&void 0!==d?d:i,f=null!==(v=(0,m.hc)("clientPlatform"))&&void 0!==v?v:a,{storedAccountId:y,amount:b,promoCode:C,convertedCurrency:g}=c,{code:E,methodCode:_,isGeneric:N,isSubMethod:j,reDirectType:x,account:w=[],accountFields:{field:P=[]}={}}=s,O=w.find((e=>e.code===y)),S=(0,z.Tu)({data:c,account:O,isGeneric:N}),D=(0,z.qR)(Object.assign({code:E,amount:b,themeName:o,promoCode:C,reDirectType:x,initiator:re.TE.CASHIER,action:h.v.DEPOSIT},e&&l&&{sidebarPageURL:l})),A=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({methodCode:E,specificParams:Ve({data:S,clientIp:t,accountFields:P})},D),C&&{promoCode:C}),i&&{clientType:p}),a&&{clientPlatform:f}),b&&{amount:Number(b)}),T()(Object.values(re.gl),S)),!N&&{accountCode:S.accountCode}),j&&{methodCode:_,subMethodsCodes:[E]}),!r&&{xNoPlayermessageToGs:!0}),g!==n&&{convertedCurrency:g}),(null==O?void 0:O.storeCardConfirmationRequired)&&{storeCardConfirmed:!0});return u(A)}),[i,a,s,o,t,e,l,n,r,u])})(),v=Ye(),{activeMethod:p,isNewAccountFlow:f}=W(T()(["activeMethod","isNewAccountFlow"])),y=null!=r?r:(0,z.qx)(o),{reDirectType:b,code:C}=p||{},g=(0,d.useCallback)(((t,n)=>Ge(void 0,void 0,void 0,(function*(){return yield new Promise(((o,r)=>
1{let i={};const c=d=>Ge(void 0,void 0,void 0,(function*(){i=Object.assign(Object.assign({},i),d),b===h.e_.POPUP&&(a.current=(0,m.zL)(y));const v=u(t),p={form:n,formWrapperRef:e,reject:r,resolve:o,depositProcess:c,extWindow:a.current};try{const e=yield(e=>(0,M.t)(Object.assign(Object.assign({},e),{ID:33016,uuid:crypto.randomUUID(),description:"Deposit",responses:[33015,33014,33029],correlationId:(0,F.NF)("deposit-"),transactionTags:{transactionTag:[{name:"cashiertype",value:"HUB2"}]}})))(Object.assign(Object.assign({},v),i));l(Object.assign(Object.assign({},p),{response:e}))}catch(e){s(Object.assign(Object.assign({},p),{response:e}))}}));c()}))}))),[u,b,e,s,l,y]);return(0,d.useCallback)(((e,a)=>Ge(void 0,void 0,void 0,(function*(){n(E("")),f&&i({behavior:"smooth"});try{const n=yield g(e,a);v({form:a,response:n});const o=C&&[h.xM.EASYCC,h.xM.PRAXIS,h.xM.CARDS_PS].includes(C);f&&!o&&(yield t(C))}catch(e){const t=e;return v({form:a,response:t}),t.formError}}))),[g,v,n,f,t,C,i])};var qe=n(90952);const Je=()=>{const e=(0,R.GV)(c()("allowedCountries")),t=W(c()("activeMethod")),{country:n,userDetails:{cellphone:a=""}={}}=(0,R.Cn)(T()(["country","userDetails"])),{account:o=[],accountFields:{field:r=[]}={}}=t||{};return(0,d.useCallback)((({accountCode:t,isInitial:i=!1})=>{const s=i?o[0]:o.find((e=>e.code===t));return r.reduce(((t,o)=>{const r=(({accField:e,country:t,cellphone:n,allowedCountries:a,specificParams:o})=>{var r;const{name:i,type:s,predefinedFieldValues:{predefinedFieldValue:c=[]}={}}=e,l=null==o?void 0:o[i];if(s===h.Ys.CHECKBOX)return l===re.J0.CHECKED;if(s===h.Ys.COUNTRY){const e=l||t;return a.find((({code:t})=>t===e))?e:""}if(!l)switch(s){case h.Ys.RADIO:return null===(r=c[0])||void 0===r?void 0:r.value;case h.Ys.PHONE:return n}return l})({accField:o,country:n,cellphone:a,allowedCountries:e,specificParams:null==s?void 0:s.specificParams}),i="object"==typeof r?r:{[o.name]:r};return Object.assign(Object.assign({},t),i)}),{})}),[o,r,n,a,e])},ze=({isNewAccountFlow:e})=>{const{change:t,resetFieldState:n}=(0,qe.mN)(),a=Je();return(0,d.useCallback)((o=>{const r=a({accountCode:o});e&&t(re.dj.STORED_ACCOUNT_ID,o),Object.keys(r).forEach((e=>{t(e,r[e]),n(e)}))}),[e,a,t,n])};var Xe=n(20214),Ke=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const Ze=()=>{const e=(0,ee.wA)(),t=Q(),n=(0,Xe.Z)(),a=(0,x.N)(),o=X(),r=(0,ae.Sn)(),i=(0,ae.j7)(),s=W(c()("activeMethod"));return(0,d.useCallback)((({resolve:c,reject:l,withdrawProcess:d,response:u,extWindow:m})=>{var v,p,h;if(null==m||m.close(),!u)return void l({formError:a("playtech.mobile.system.error.no.response")});const f=(null==u?void 0:u.response)||u,{data:y={}}=f||{};if(-1===f.ID)return void l({formError:n(f)});if(303===y.errorCode)return void(()=>{Ke(void 0,void 0,void 0,(function*(){try{yield r({initiator:"withdraw",onSuccess:()=>d(),onCancel:c})}catch(e){}}))})();if(304===y.errorCode)return void(()=>{Ke(void 0,void 0,void 0,(function*(){try{yield i({initiator:"withdraw",onSuccess:()=>d(),onCancel:c})}catch(e){}}))})();const b=y.errorMessage||(null===(v=y.error)||void 0===v?void 0:v.message)||"",C=(0,z.qy)(y.error);if(C)e((0,ne.HC)({content:b,title:null===(p=y.error)||void 0===p?void 0:p.severity,onDecline:()=>c(),onAccept:()=>d({[C.type]:!0})}));else{const n=o(f),r=n||a(`error.${y.errorCode}`,b)||a("playtech.mobile.system.systemError","System error");
1if(te.A.trigger("withdraw:fail",y),(null===(h=y.error)||void 0===h?void 0:h.code)===re.IW)return void(()=>{Ke(void 0,void 0,void 0,(function*(){e((0,Te.TG)({title:a("error.title"),content:n})),yield t(null==s?void 0:s.code)}))})();l(Object.assign(Object.assign({},f),{formError:r}))}}),[s,e,t,n,o,i,r,a])};var Qe=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};var et=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n};var tt;!function(e){e.PAYMENT_HANDLE_REDIRECT="PAYMENT_HANDLE_REDIRECT",e.PAYMENT_HANDLE_NOT_CREATED="PAYMENT_HANDLE_NOT_CREATED",e.PAYMENT_HANDLE_PAYABLE="PAYMENT_HANDLE_PAYABLE",e.PAYMENT_HANDLE_CREATED="PAYMENT_HANDLE_CREATED"}(tt||(tt={}));var nt=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const at=()=>{const e=Q(),t=Pe(),n=(()=>{const e=(0,ge.B)();return(0,d.useCallback)((t=>Qe(void 0,[t],void 0,(function*({methodCode:t,apmListenerRequestParameters:n,creditCardListenerRequestParameters:a,correlationId:o}){const{data:r}=yield e(Object.assign(Object.assign({ID:36025,description:"Withdraw listener request",responses:[36026,36027],correlationId:o,methodCode:t},n&&{apmListenerRequestParameters:n}),a&&{creditCardListenerRequestParameters:a}));return r}))),[e])})(),a=(0,x.N)(),o=(0,d.useRef)(crypto.randomUUID()),r=W(c()("activeMethod")),i=(0,d.useCallback)((e=>t({action:h.v.WITHDRAWAL,initiator:re.TE.CASHIER,status:e})),[t]);return(0,d.useCallback)((t=>nt(void 0,void 0,void 0,(function*(){var s,c,l,d;const{response:{data:u},reject:m,resolve:v}=t,p=(null===(c=null===(s=u.headerParameters)||void 0===s?void 0:s.Location)||void 0===c?void 0:c[0])||"";let h;try{h=JSON.parse((null===(d=null===(l=u.headerParameters)||void 0===l?void 0:l["X-Redirect-Content"])||void 0===d?void 0:d[0])||"{}")}catch(e){return void(0,be.Rm)("error","[Cashier][Paysafe] unable to parse X-Redirect-Content")}const f=a("playtech.mobile.system.systemError","System error"),y=o.current;let b=null;const C=()=>(null==b?void 0:b.isOpen)&&(null==b?void 0:b.close()),g=(t,a,o)=>nt(void 0,void 0,void 0,(function*(){var s;if(a||!(null==o?void 0:o.paymentHandleToken))return(0,be.Rm)("error",a?a.detailedMessage:"missing paysafe token"),i(re.g4.ERROR),void v({});b=t;try{const t=yield n({methodCode:null==r?void 0:r.code,correlationId:(0,F.NF)("paysafe"),apmListenerRequestParameters:{postParameters:[{value:o.paymentHandleToken,key:"paymentHandleToken"},...o.customerOperation?[{key:"customerOperation",value:o.customerOperation}]:[],{value:o.merchantRefNum,key:"merchantRefNum"}]}});if("declined"===(null===(s=null==t?void 0:t.transactionData)||void 0===s?void 0:s.status))return i(re.g4.ERROR),C(),void v({});i(re.g4.SUCCESS),C(),v({}),e()}catch(e){i(re.g4.ERROR),C(),v({})}})),E=e=>{var t;switch(e){case tt.PAYMENT_HANDLE_REDIRECT:case tt.PAYMENT_HANDLE_NOT_CREATED:i(re.g4.CANCEL);break;case tt.PAYMENT_HANDLE_PAYABLE:case tt.PAYMENT_HANDLE_CREATED:default:C()}null===(t=document.querySelector(".paysafe-script"))||void 0===t||t.remove(),v({}),Ce.f.enableBodyScroll(y)};if(!p)return void m({formError:f});const _=document.createElement("script");_.src=p,_.type="text/javascript",_.classList.add("paysafe-script"),_.onload=()=>{if(!window.paysafe)return(0,be.Rm)("error","paysafe API is unavailable in window"),void m({formError:f});((e,t,n,a)=>{var o;const r=e||{},{currencyCode:i,apiKey:s,amount:c}
1=r,l=et(r,["currencyCode","apiKey","amount"]),d=Object.assign(Object.assign({},l),{currency:i,amount:parseFloat(c),payout:!0});Ce.f.disableBodyScroll(t),null===(o=window.paysafe)||void 0===o||o.checkout.setup(s,d,n,a)})(h,y,g,E)},document.head.append(_)}))),[a,i,r,e,n])};var ot=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};var rt=n(86611);const it=["PayPalViaSC"];var st=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const ct=()=>{const e=(0,R.Cn)(c()("currencyCode")),{themeName:t,sendCashierMessagesToGS:n}=(0,R.GV)(T()(["themeName","sendCashierMessagesToGS"])),a=(0,ke.d)(),o=W(c()("activeMethod")),r=(0,R.Wr)(c()("portalPageURL")),i=(e=>(0,d.useCallback)((e=>e),[e]))(null==o?void 0:o.code),s=(0,rt.Fr)();return(0,d.useCallback)((c=>st(void 0,void 0,void 0,(function*(){if(!o)return{};const{storedAccountId:l,amount:d,promoCode:u,convertedCurrency:m}=c,{code:v,isGeneric:p,reDirectType:f,account:y=[]}=o,b=y.find((e=>e.code===l)),C=(0,z.Tu)({data:c,account:b,isGeneric:p}),g=(0,z.qR)(Object.assign({code:v,amount:d,themeName:t,promoCode:u,reDirectType:f,initiator:re.TE.CASHIER,action:h.v.WITHDRAWAL},a&&r&&{sidebarPageURL:r})),E=(({storedAccountId:e,data:t,activeMethod:n})=>{var a;const{code:o,isGeneric:r,accountFieldsMap:i,withdrawType:s,account:c=[],accountFields:{field:l=[]}={}}=n,d=(0,z.dQ)(t,l);if(!r&&!it.includes(o))return{accountCode:s===re.L2?d.accountCode:d.accountId};if(i)return{specificParams:Object.values(i).reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:d[t]})),{})};const u=c.find((t=>t.code===e)),m=(null===(a=null==u?void 0:u.accountFields)||void 0===a?void 0:a.field)||[];if(m.length||l.length){const e=m.map((e=>e.name)),t=l.filter((e=>!e.isHiddenField)).map((e=>e.name));return{specificParams:[...new Set([...t,...e])].reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:d[t]})),{})}}})({activeMethod:o,storedAccountId:l,data:C}),_=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({methodCode:v,amount:Number(d)},g),E),T()(Object.values(re.gl),C)),!n&&{xNoPlayermessageToGs:!0}),m!==e&&{paidCurrency:m});if(_.specificParams){const{specificParams:e}=yield s({specificParams:_.specificParams});Object.assign(_,{specificParams:e})}return i(_)}))),[o,t,n,e,i,a,r,s])};var lt=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const dt=e=>{const t=(0,k.k)(),n=(0,ee.wA)(),a=Q(),o=(0,x.N)(),r=q(),i=(0,d.useRef)(),{themeName:s,genericIframeLoadingURL:l}=(0,R.GV)(T()(["themeName","genericIframeLoadingURL"])),u=Ze(),v=(()=>{const e=ye(),t=at(),n=Ze(),a=Pe(),o=W(c()("activeMethod")),{name:r,reDirectType:i}=o||{};return(0,d.useCallback)((o=>{var s,c;const{resolve:l,response:d,extWindow:u,form:m}=o,{data:v}=d||{};if(null==v?void 0:v.headerParameters)return void(i===h.e_.JS_PAY_SAFE?(()=>{ot(void 0,void 0,void 0,(function*(){yield t(o)}))})():(()=>{ot(void 0,void 0,void 0,(function*(){try{const t=yield e({data:v,extWindow:u});if(t){const e=fe(t,h.v.WITHDRAWAL);yield a(e,m)}l({})}catch(e){n(Object.assign(Object.assign({},o),{response:e}))}}))})());const{code:p}=(null===(c=null===(s=null==v?void 0:v.payments)||void 0===s?void 0:s.transaction)||void 0===c?void 0:c[0])||{};te.A.trigger("withdraw:success",{transactionCode:p,method:r}),l()}),[r,e,n,a,t,i])})(),p=ct(),{activeMethod:f,isNewAccountFlow:y}=W(T()(["activeMethod","isNewAccountFlow"])),{reDirectType:b,account:C=[],code:g}=f||{},_=null!=l?l:(0,z.qx)(s),N=(0,d.useCallback)(((t,n)=>lt(void 0,void 0,void 0,(function*(){return yield new Promise(((a,o)=>{let r={};const s=c=>lt(void 0,void 0,void 0,(function*(){r=Object.assign(Object.assign({},r),c),b===h.e_.POPUP&&(i.current=(0,m.zL)(_));const l=yield p(t),d={form:n,formWrapperRef:e,reject:o,resolve:a,withdrawProcess:s,extWindow:i.current};try{const e=yield(e=>(0,M.t)(Object.assign(Object.assign({},e),{ID:33017,uuid:crypto.randomUUID(),description:"Withdraw",responses:[33018,33019,33057],correlationId:(0,F.NF)("withdraw-"),transactionTags:{transactionTag:[{name:"cashiertype",value:"HUB2"}]}})))(Object.assign(Object.assign({},l),r));v(Object.assign(Object.assign({},d),{response:e}))}catch(e){u(Object.assign(Object.assign({},d),{response:e}))}}));s()}))}))),[b,u,e,v,_,p]);return(0,d.useCallback)(((e,i)=>{r(E(""));const s=`${t.formatCurrency(e.amount)}`,c=C.find((t=>t.code===e.storedAccountId)),l=(null==c?void 0:c.title)?o("withdraw.success.accept",[s,c.title]):o("withdraw.success.accept-no-account",[s]);return new Promise((t=>{n((0,ne.HC)({onDecline:()=>t(),title:o("withdraw.title"),content:l,onAccept:()=>lt(void 0,void 0,void 0,(function*(){try{yield N(e,i),y&&(yield a(g)),t()}catch(e){t(e.formError)}}))}))}))}),[N,r,n,o,C,t,g,a,y])};var ut=n(45310);const mt=e=>{const t=(0,ut.j)(),n=(0,R.Wr)(c()("isOpened"));return(0,d.useMemo)((()=>{let a=null;const o=(null==e?void 0:e.startsWith("."))?e.slice(1):e;if(!o)return null;const r=document.querySelectorAll(`[class^="${o}"], [class*=" ${o}"]`);return r.length?(a=null==r?void 0:r[0],t()&&(a=Array.from(r).find((e=>e.closest(".cms-page-popup-content-wrapper")))||a),n&&(a=Array.from(r).find((e=>e.closest(".sidebar-content-wrapper")))||a),a):null}),[e,t,n])},vt=()=>{const{activeMethod:e,isNewAccountFlow:t}=W(T()(["activeMethod","isNewAccountFlow"])),{account:n=[],isMultiFieldKey:a,accountFields:{field:o=[]}={}}=e||{};return(0,d.useMemo)((()=>o.reduce(((e,o)=>{const{name:r,isAccountKey:i,isLabelField:s,isHiddenField:c}=o;if(n.length)if(t)c&&e.push(r);else{!a&&(i||s)&&!c&&e.push(r)}else c&&e.push(r);return e}),[])),[o,n.length,t,a])},pt=()=>{let e,t,n;const a=document.createElement("iframe");a.src="about:blank",a.title="",a.role="presentation",a.classList.add("fn-fraud-script"),(a.frameElement||a).style.cssText="width: 0; height: 0; border: 0",n=document.getElementsByTagName("script"),n=n[n.length-1],n.parentNode.insertBefore(a,n);try{t=a.contentWindow.document}catch(n){e=document.domain,a.src="javascript:var d=document.open();d.domain='"+e+"';void(0);",t=a.contentWindow.document}t.open()._l=function(){const t=this.createElement("script");e&&(this.domain=e),t.id="js-iframe-async",t.src="https://www.paypalobjects.com/webstatic/r/fb/fb-all-prod.pp.min.js",this.body.appendChild(t)}
1,t.write('<body onload="document._l();">'),t.close()},ht=()=>{const e=q(),{type:t}=(0,p.TP)(),n=(0,R.GV)(c()("paypalMerchantValue"));(0,A.S)((()=>{if(t===h.v.DEPOSIT&&n){const t=crypto.randomUUID().replaceAll("-","");e((e=>({type:i.SET_FRAUD_UUID,payload:e}))(t)),((e,t)=>{const n=document.createElement("script");n.type="application/json",n.setAttribute("fncls","fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99"),n.innerText=JSON.stringify({f:t,s:e}),document.body.appendChild(n)})(n,t),pt()}return()=>{document.querySelectorAll(".fn-fraud-script").forEach((e=>e.remove()))}}),[t,n])};var ft=n(86624),yt=n(15245),bt=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n};const Ct=()=>{const{showPromoCodeField:e}=(0,p.TP)(),t=W(c()("activeMethod")),{suggested:n,account:a,code:o,amountRequired:r,accountFields:{field:i=[]}={}}=t||{},s=i.length&&(null==a?void 0:a[0]),l=Je(),u=(e=>{const{activeMethod:t}=W(T()(["activeMethod"])),{account:n=[],subMethods:{subMethod:a=[]}={}}=t||{};return(0,d.useCallback)((t=>{var o,r,i,s,c;switch(e){case h.xM.DOTPAY_BANK_TRANSFER:return Object.assign(Object.assign({},t),{subMethodsCodes:(null===(o=a[0])||void 0===o?void 0:o.code)||""});case h.xM.DOTPAY_CARD:{const{storedAccountId:e}=t,a=bt(t,["storedAccountId"]);return Object.assign(Object.assign({},a),{field2:null===(c=null===(s=null===(i=null===(r=n[0])||void 0===r?void 0:r.accountFields)||void 0===i?void 0:i.field)||void 0===s?void 0:s.find((e=>"field2"===e.name)))||void 0===c?void 0:c.value})}default:return t}}),[e,a,n])})(o);return(0,d.useMemo)((()=>{const t=Object.assign(Object.assign(Object.assign(Object.assign({},!1!==r&&{[re.dj.AMOUNT]:(null==n?void 0:n.defaultSuggestion)||""}),l({isInitial:!0})),e&&{[re.dj.PROMO_CODE]:Ne.Se()||""}),s&&{[re.dj.STORED_ACCOUNT_ID]:s.code});return u(t)}),[e,null==n?void 0:n.defaultSuggestion,l,s,u,r])};var gt=n(68767),Et=n(70137);const _t=e=>{var t,n;const{response:a}=e||{},o=(null==a?void 0:a.response)||a,r=(null===(n=null===(t=null==o?void 0:o.data)||void 0===t?void 0:t.error)||void 0===n?void 0:n.code)||"";return(null==e?void 0:e.code)===h.xM.DOTPAY_BLIK?r:""},Nt=e=>_t(e)===re.$9.BLIK_CODE_NEEDED,Tt=e=>_t(e)===re.$9.ACC_CONFIRMATION_REQUIRED;var jt=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n};const xt=(e,t,n)=>{const{showPromoCodeField:a}=(0,p.TP)(),o=W(c()("activeMethod")),r=(e=>{const{type:t}=(0,p.TP)(),{activeMethod:n,isNewAccountFlow:a,customFormData:o}=W(T()(["activeMethod","isNewAccountFlow","customFormData"])),{account:r=[]}=n||{};return(0,d.useCallback)((n=>{if(e===h.xM.DOTPAY_BLIK){if(t===h.v.WITHDRAWAL)return n;const e=Tt(o)&&!a,i=Nt(o),{field1:s}=n,c=jt(n,["field1"]),l=r.length&&!a;return Object.assign(Object.assign(Object.assign({},c),e?{altAccount:[(0,gt.required)()]}:{}),{field1:l&&!i?s.filter((e=>"required"!==e.type)):s})}return n}),[t,e,r,a,o])})(null==o?void 0:o.code),i=vt(),s=(null==o?void 0:o.validationConfig)||{},l=Object.keys(s).reduce(((t,n)=>Object.assign(Object.assign({},t),e.includes(n)&&!i.includes(n)&&{[n]:s[n]})),{}),u=t.reduce(((e,t)=>{var a,o;const r=n===h.v.DEPOSIT?null!==(a=t.depositBlockers)&&void 0!==a?a:[]:null!==(o=t.withdrawBlockers)&&void 0!==o?o:[];return e[t.code]=r.map((e=>e.message)),e}),{});return(0,d.useMemo)((()=>{const e=Object.assign(Object.assign(Object.assign({},a&&{[re.dj.PROMO_CODE]:Et.yH}),l),{[re.dj.STORED_ACCOUNT_ID]:[(0,gt.func)({fn:e=>{var t;return(null===(t=u[e])||void 0===t?void 0:t.length)?u[e]:null}})]});return r(e)}),[a,l,r,u])};var wt=n(15424),Pt=n(63658),Ot=n(64853);const St=({className:e,isDisabled:t,formRef:n})=>{const a=ze({isNewAccountFlow:!0}),o=(0,x.N)(),r=(0,I.e)(n),i=q(),{activeMethod:s,isNewAccountFlow:c}=W(T()(["activeMethod","isNewAccountFlow"])),{account:u=[],canCreateNewAccount:m,accountFields:{field:v=[]}={}}=s||{},p=(e=>{const{activeMethod:t,customFormData:n}=W(T()(["activeMethod","customFormData"])),{account:a=[]}=t||{};return(0,d.useMemo)((()=>{switch(null==t?void 0:t.code){case h.xM.DOTPAY_BLIK:{const t=a.length&&Nt(n);return e&&!t}case h.xM.DOTPAY_BANK_TRANSFER:return!1;default:return e}}),[e,null==t?void 0:t.code,a,n])})(Boolean(m&&u.length&&v.length)),f=(0,d.useCallback)((()=>{var e;a(""),i(C(!0)),r(),null===(e=n.current)||void 0===e||e.focus()}),[a,i,n,r]),y=(0,d.useCallback)((()=>{var e,t;a(null===(e=u[0])||void 0===e?void 0:e.code),i(C(!1)),r(),null===(t=n.current)||void 0===t||t.focus()}),[a,i,u,n,r]);return p?(0,l.jsx)(wt.$,{isNew:!0,size:"large",view:"secondary",disabled:t,className:`${e} cms-cashier-new-account-btn`,onClick:c?y:f,children:o(c?"account.cancel":"account.add")}):null},Dt="AmountSuggestion__suggestion--2GA",At="AmountSuggestion__ellipsis--2ot",It="AmountSuggestion__highlighted--1Sd",Rt=({value:e,onSuggestionClick:t,isSuggestionHighlighted:n})=>{const a=(0,k.k)(),{values:{amount:o}}=(0,qe.lN)(),r=(0,d.useMemo)((()=>n&&Number(o)===e),[o,e,n]),i=(0,d.useCallback)((()=>t(e)),[t,e]);return(0,l.jsx)(P.x,{onClick:i,className:`${Dt} ${r?It:""}`,children:(0,l.jsx)("span",{className:At,children:a.formatCurrency(e,{precision:0})})},e)},Mt="AmountSuggestions__suggestions--1-G",Ft=({disabled:e,isSuggestionHighlighted:t,setIsSuggestionHighlighted:n})=>{const{change:a,blur:o}=(0,qe.mN)(),{suggestDepositAmounts:r}=(0,p.TP)(),i=W(c()("activeMethod")),{suggested:{suggestion:s=[]}={}}=i||{},u=(0,d.useCallback)((t=>{e||(a(re.dj.AMOUNT,t),o(re.dj.AMOUNT),n(!0))}),[a,o,e,n]);return r&&s.length?(0,l.jsx)("div",{className:Mt,children:s.map((({value:e})=>(0,l.jsx)(Rt,{value:e,onSuggestionClick:u,isSuggestionHighlighted:t},e)))}):null};var kt=n(7918),Lt=n(26264),$t=function(e,t,n,a){return new(n||(n=Prom
1ise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const Ht=({currencyCode:e,currencyOptions:t})=>{var n;const{values:a}=(0,qe.lN)(),[o,r]=(0,d.useState)(""),[i,s]=(0,d.useState)(null),[c,u]=(0,d.useState)([]),[m,v]=(0,d.useState)(!1),h=(0,oe.a)(),f=(0,k.k)(),y=(0,x.N)(),{componentId:b,type:C}=(0,p.TP)(),g=(0,Lt.y)(),E="number"==typeof a.amount?a.amount:Number(null===(n=a.amount)||void 0===n?void 0:n.replace(",","."));(0,d.useEffect)((()=>{(()=>{$t(void 0,void 0,void 0,(function*(){var n;try{const{currencyRates:a}=yield g({baseCurrencyCode:e,currencyCodes:t});h()&&(u(a),r((null===(n=a[0])||void 0===n?void 0:n.endDate)||""))}catch(e){(0,be.Rm)("error",e)}}))})()}),[e,t,g,h]),(0,d.useEffect)((()=>{if(!o||m)return;const n=setInterval((()=>$t(void 0,void 0,void 0,(function*(){var n;if(new Date(o)<=new Date){v(!0),u([]),s(null);try{const{currencyRates:o}=yield g({baseCurrencyCode:e,currencyCodes:t});h()&&(r((null===(n=o[0])||void 0===n?void 0:n.endDate)||""),u(o),s(o.find((e=>e.currencyCode===a.convertedCurrency))||null))}catch(e){(0,be.Rm)("error",e)}finally{h()&&v(!1)}}}))),1e3);return()=>{n&&clearInterval(n)}}),[o,c,e,t,h,g,m,a.convertedCurrency]);const _=(0,d.useMemo)((()=>{const n=t.map((e=>({value:e,label:e})));return t.includes(e)?n:[{value:e,label:e},...n]}),[t,e]),N=(0,d.useCallback)((e=>{const t=c.find((t=>t.currencyCode===e.target.value))||null;s(t)}),[c]);return(0,l.jsx)(kt.l,{"aria-label":y(["conversionCurrency.label","playtech.mobile.system.select.aria-label"]),defaultValue:e,id:`${b}-${re.dj.CONVERTED_CURRENCY}`,infoTooltip:y(`${C}.conversionCurrency.infoTooltip`),hint:i&&i.currencyCode===a.convertedCurrency&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{children:y("conversionCurrency.hint",[f.formatCurrency(1,{currencyCode:e,precision:null,originalCurrencyCode:!0}),f.formatCurrency(i.currencyRate,{currencyCode:a.convertedCurrency,originalCurrencyCode:!0})])}),Boolean(E)&&1!==E&&(0,l.jsx)("div",{children:y("conversionCurrency.hint",[f.formatCurrency(E,{currencyCode:e,originalCurrencyCode:!0,precision:null}),f.formatCurrency(E*Number(i.currencyRate),{currencyCode:a.convertedCurrency,originalCurrencyCode:!0})])})]}),label:y("conversionCurrency.label"),name:re.dj.CONVERTED_CURRENCY,onChange:N,options:_})},Ut="ActionSection__actionSection--3jW",Bt="ActionSection__title--2gy",Vt="ActionSection__warning--Zzd",Yt="ActionSection__content--nOZ",Gt="ActionSection__btn--L0X",Wt="ActionSection__addAccount--2u-",qt="ActionSection__submit--3PU",Jt=({formRef:e,handleSubmit:t})=>{var n,a,o,r;const i=(0,k.k)(),{submitting:s}=(0,qe.lN)(),u=(0,x.N)(),m=(0,R.Cn)(c()("currencyCode")),v=i.getCurrencySymbol(m),{type:f,showPromoCodeField:y,componentId:b,minAndMaxAmount:C}=(0,p.TP)(),{activeMethod:g,isFormLoading:E}=W(T()(["activeMethod","isFormLoading"])),_=Boolean(null===(a=null===(n=null==g?void 0:g.validationConfig)||void 0===n?void 0:n.amount)||void 0===a?void 0:a.find((e=>"required"===e.type))),{min:N,max:j}=(null===(r=null===(o=null==g?void 0:g.validationConfig)||void 0===o?void 0:o.amount)||void 0===r?void 0:r.find((e=>"range"===e.type)))||{},{suggested:{defaultSuggestion:w=0}={},code:P}=g||{},[O,S]=(0,d.useState)(Boolean(w)),D=(0,d.useCallback)((()=>S(!1)),[S]),A="deposit"===f&&P===h.xM.APPLE_PAY_EPG&&!(0,z.dH)(),I=s||E||A;return(0,l.jsxs)("section",{className:Ut,children:[(0,l.jsx)("h3",{className:Bt,children:u(`${f}.title`)}),A&&(0,l.jsx)(Ot.A,{className:Vt,message:u("ApplePayEPG.notSupported")}),(0,l.jsxs)("div",{className:`${Yt} cms-cashier-${f}-actions`,children:[!1!==(null==g?void 0:g.amountRequired)&&(0,l.jsxs)("div",{className:`cms-cashier-${f}-actions-amount`,children:[(0,l.jsx)(Pt.p,Object.assign({type:"text",inputMode:"decimal",disabled:I,onChange:D,name:re.dj.AMOUNT,currencySymbol:v,label:u("amount.label"),isLabelAsteriskEnabled:_,placeholder:u("amount.placeholder"),id:`${b}-${re.dj.AMOUNT}`},C&&N&&j&&{hint:u("amount.hint",[i.formatCurrency(N),i.formatCurrency(j)])},{"aria-label":u(["amount.placeholder","playtech.mobile.system.input.aria-label"])})),(0,l.jsx)(Ft,{disabled:I,isSuggestionHighlighted:O,setIsSuggestionHighlighted:S})]}),Array.isArray(null==g?void 0:g.currencyOptions)&&m&&(0,l.jsx)(Ht,{currencyCode:m,currencyOptions:g.currencyOptions}),y&&(0,l.jsx)(Pt.p,{type:"text",disabled:I,name:re.dj.PROMO_CODE,label:u("promoCode.placeholder"),className:`cms-cashier-${f}-actions-promo`,placeholder:u("promoCode.placeholder"),id:`${b}-${re.dj.PROMO_CODE}`,"aria-label":u(["promoCode.placeholder","playtech.mobile.system.input.aria-label"])}),(0,l.jsx)(wt.$,{isNew:!0,size:"large",disabled:I,onClick:t,className:`${Gt} ${qt} cms-cashier-${f}-actions-submit`,children:u(`${f}.submit.button`)}),(0,l.jsx)(St,{formRef:e,isDisabled:I,className:`${Gt} ${Wt}`})]})]})};var zt=n(5053),Xt=n(90935),Kt=n(85658);const Zt=({paymentCode:e,accountField:t})=>{var n;const{getFieldState:a}=(0,qe.mN)(),o=(0,x.N)(),{type:r}=(0,p.TP)(),i=W(c()("activeMethod")),s=vt(),l=null===(n=a(re.dj.STORED_ACCOUNT_ID))||void 0===n?void 0:n.value,{account:u=[],validationConfig:m={}}=i||{},v=u.find((e=>e.code===l)),f=null==v?void 0:v.specificParams;return(0,d.useMemo)((()=>{var n;const{type:a,name:i,label:c,isRequiredCustom:l,predefinedFieldValues:{predefinedFieldValue:d=[]}={}}
1=t,u=(({name:e,type:t,cashierType:n,paymentCode:a})=>{switch(t){case h.Ys.CHECKBOX:return`${n}.${a}.checkbox.${e}`;case h.Ys.RADIO:return`${n}.${a}.radioGroupTitle.${e}`;default:return`${n}.${a}.label.${e}`}})({name:i,type:a,cashierType:r,paymentCode:e});return Object.assign(Object.assign({},t),{label:o(u,c),accountFieldValue:null==f?void 0:f[i],isRequired:(null===(n=m[i])||void 0===n?void 0:n.some((e=>"required"===e.type)))||l,placeholder:o(`${r}.${e}.placeholder.${i}`,c),predefinedFieldValues:d.map((e=>({value:e.value,label:e.label1}))),isFieldVisuallyHidden:s.includes(i)})}),[t,r,e,o,m,f,s])};var Qt=n(36009),en=n(40165),tn=n(56634),nn=n(16045);var an;!function(e){e.YEAR="year",e.MONTH="month"}(an||(an={}));const on="ExpirationDateField__expDateContainer--hmC",rn="ExpirationDateField__expDate--1aI",sn="ExpirationDateField__expDateSelect--3TU",cn=(0,Qt.j)()((({meta:e,value:t="",onBlur:n,onFocus:a,onChange:o,label:r,isRequired:i,className:s,disabled:c,fieldId:u})=>{const m=(0,x.N)(),v=(null==e?void 0:e.submitting)||(null==e?void 0:e.validating)||c,[p,h]=(0,d.useState)({year:"",month:""}),f=(0,d.useMemo)((()=>(()=>new Array(12).fill(0).map(((e,t)=>{const n=`${t+1}`.padStart(2,"0");return{value:n,label:n}})))()),[]),y=(0,d.useMemo)((()=>(()=>{const e=(new Date).getFullYear();return new Array(11).fill(0).map(((t,n)=>{const a=`${e+n}`;return{value:a,label:a}}))})()),[]),b=(0,en.h)({error:null==e?void 0:e.error,active:null==e?void 0:e.active,disabled:v,touched:null==e?void 0:e.touched,submitting:null==e?void 0:e.submitting}),C=(0,d.useCallback)((e=>t=>{const{value:n}=t.target,{year:a,month:r}=p;switch(e){case an.YEAR:h({month:r,year:n}),r&&o&&o({target:{value:`${n}-${r}`}});break;case an.MONTH:h({year:a,month:n}),a&&o&&o({target:{value:`${a}-${n}`}})}}),[o,p]);return(0,d.useEffect)((()=>{const[e="",n=""]=t.split("-");h({year:e,month:n})}),[t]),(0,l.jsxs)("div",{onBlur:n,onFocus:a,className:(0,w.$z)([s,on,b]),children:[(0,l.jsx)(tn.J,{id:u,label:r,isLabelAsteriskEnabled:i}),(0,l.jsxs)("div",{className:rn,children:[(0,l.jsx)(kt.b,{id:u,disabled:c,value:p.month,options:f,name:an.MONTH,className:sn,onChange:C(an.MONTH),"aria-label":m("playtech.mobile.system.month"),placeholder:m("playtech.mobile.system.month")}),(0,l.jsx)(kt.b,{disabled:c,value:p.year,options:y,name:an.YEAR,className:sn,onChange:C(an.YEAR),"aria-label":m("playtech.mobile.system.year"),placeholder:m("playtech.mobile.system.year")})]}),(0,l.jsx)(nn.B,{meta:e})]})})),ln="GenericAccountField__radioGroup--1WK",dn="GenericAccountField__radio--1sv",un="GenericAccountField__checkboxContainer--1Lj",mn=({className:e,paymentCode:t,isDisabled:n,accountField:a})=>{const o=(0,x.N)(),{componentId:r,type:i}=(0,p.TP)(),s=(0,R.GV)(c()("allowedCountries")),u=Zt({paymentCode:t,accountField:a}),{name:m,type:v,label:f,placeholder:y,isRequired:b,isFieldVisuallyHidden:C,isAccountKey:g,accountFieldValue:E,predefinedFieldValues:_,tooltip:N}=u,T=`${r}-${m}`,j=(0,d.useMemo)((()=>(0,w.$z)([m,e,C?"hidden":""])),[e,C,m]),P=(0,d.useMemo)((()=>s.map((e=>({value:e.code,label:e.name})))),[s]),O=n||Boolean(void 0!==E);switch(v){case h.Ys.TEXT:case h.Ys.PHONE:case h.Ys.PASSWORD:return(0,l.jsx)(Pt.p,Object.assign({name:m,id:T,label:f,disabled:O,placeholder:y,infoTooltip:N||null,isLabelAsteriskEnabled:b,className:`${j} cms-cashier-${i}-generic-${v}`,type:v===h.Ys.PASSWORD?"password":"text"},v===h.Ys.PHONE?{inputMode:"tel"}:{},v===h.Ys.PASSWORD||g?{autoComplete:"new-password"}:{},{"aria-label":o([f,y,"playtech.mobile.system.input.aria-label"])}));case h.Ys.DROPDOWN:return(0,l.jsx)(kt.l,{name:m,id:T,label:f,disabled:O,placeholder:y,options:_,isLabelAsteriskEnabled:b,className:`${j} cms-cashier-${i}-generic-${v}`,"aria-label":o([f,y,"playtech.mobile.system.select.aria-label"])});case h.Ys.COUNTRY:return(0,l.jsx)(kt.l,{name:m,id:T,label:f,disabled:O,options:P,placeholder:y,isLabelAsteriskEnabled:b,className:`${j} cms-cashier-${i}-generic-${v}`,"aria-label":o([f,y,"playtech.mobile.system.select.aria-label"])});case h.Ys.RADIO:return(0,l.jsx)(zt.M,{label:f,isLabelAsteriskEnabled:b,classNames:{inputGroup:ln},className:`${j} cms-cashier-${i}-generic-${v}`,children:_.map((e=>(0,l.jsx)(Xt.s,{name:m,value:e.value,label:e.label,disabled:O,"aria-label":e.label,classNames:{container:dn}
1,id:`${r}-${m}-${e.value}`},e.value)))});case h.Ys.CHECKBOX:return(0,l.jsx)("div",{className:`${un} cms-cashier-${i}-generic-${v}`,children:(0,l.jsx)(Kt.S,{name:m,id:T,label:f,"aria-label":f,disabled:O,isLabelAsteriskEnabled:b})});case h.Ys.EXP_DATE:return(0,l.jsx)(cn,{name:m,label:f,fieldId:T,disabled:O,isRequired:b,className:`${j} cms-cashier-${i}-generic-${v}`});default:return null}},vn=({className:e,isDisabled:t})=>{const n=(0,x.N)(),{componentId:a,type:o}=(0,p.TP)(),r=ze({isNewAccountFlow:!1}),{activeMethod:i,isNewAccountFlow:s}=W(T()(["activeMethod","isNewAccountFlow"])),{account:c=[]}=i||{},u=(0,d.useMemo)((()=>c.map((e=>({value:e.code,label:e.title||e.code})))),[c]),m=(0,d.useCallback)((e=>{r(e.target.value)}),[r]);return c.length&&!s?(0,l.jsx)(kt.l,{disabled:t,options:u,onChange:m,label:n("accountId.label"),name:re.dj.STORED_ACCOUNT_ID,id:`${a}-${re.dj.STORED_ACCOUNT_ID}`,className:`${e} cms-cashier-${o}-stored-accountId`,"aria-label":n(["accountId.label","playtech.mobile.system.select.aria-label"])}):null},pn=({isDisabled:e,activeMethod:t})=>{var n;const a=(0,x.N)(),{change:o,resetFieldState:r,getRegisteredFields:i}=(0,qe.mN)(),{type:s,componentId:c}=(0,p.TP)(),{isNewAccountFlow:u,customFormData:m}=W(T()(["isNewAccountFlow","customFormData"])),{account:v=[],accountFields:{field:f=[]}={}}=t||{},y=v.length&&!u,b=Nt(m),C=Tt(m),g=(0,d.useMemo)((()=>C?(e=>{var t,n;if(!e)return[];const{response:a}=e||{},o=(null==a?void 0:a.response)||a,{alternativeAccount:r=[]}=(null===(n=null===(t=null==o?void 0:o.data)||void 0===t?void 0:t.error)||void 0===n?void 0:n.errorDetails)||{};return r.map((e=>({value:e.key,label:e.label})))})(m):[]),[C,m]),E=(0,d.useMemo)((()=>{var e;return[{value:null===(e=v[0])||void 0===e?void 0:e.code,label:a("blik.payWithOneClick")}]}),[v,a]);return(0,d.useEffect)((()=>{var e,t;if(!i().includes("altAccount"))return;const n=null===(t=(null===(e=null==m?void 0:m.formData)||void 0===e?void 0:e.altAccount)||"")||void 0===t?void 0:t.toString(),a=n&&g.map((e=>e.value)).includes(n);n&&!a&&(o("altAccount",""),r("altAccount"))}),[null===(n=null==m?void 0:m.formData)||void 0===n?void 0:n.altAccount,g,o,r,i]),s===h.v.WITHDRAWAL?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vn,{isDisabled:e}),f.map((n=>(0,l.jsx)(mn,{isDisabled:e,accountField:n,paymentCode:t.code},n.name)))]}):(0,l.jsxs)(l.Fragment,{children:[Boolean(y&&!b)&&(0,l.jsx)(kt.l,{disabled:e,name:"storedAccountId",options:E,label:a("accountId.label"),id:`${c}-storedAccountId`,className:`cms-cashier-${s}-blik-storedAccountId`,"aria-label":a("accountId.label","playtech.mobile.system.select.aria-label")}),C&&!u&&(0,l.jsx)(kt.l,{name:"altAccount",disabled:e,options:g,id:`${c}-altAccount`,label:a("blik.bank.label"),placeholder:a("blik.selectBank"),className:`cms-cashier-${s}-blik-altAccount`,"aria-label":a("blik.bank.label","playtech.mobile.system.select.aria-label")}),f.map((n=>(0,l.jsx)(mn,{isDisabled:e,accountField:n,paymentCode:t.code,className:""+(y&&!b&&"field1"===n.name?"hidden":"")},n.name)))]})},hn=({isDisabled:e,activeMethod:t})=>{const n=(0,x.N)(),{type:a,componentId:o}=(0,p.TP)(),r=W(c()("isNewAccountFlow")),{account:i=[],accountFields:{field:s=[]}={}}=t||{},u=(0,d.useMemo)((()=>i.filter((e=>e.accountFields))),[i]),m=(0,d.useMemo)((()=>u.map((e=>{var t,n;const{accountFields:{field:a=[]}={}}=e,o=(null===(t=a.find((e=>"field1"===e.name)))||void 0===t?void 0:t.value)||"";return{value:(null===(n=a.find((e=>"field2"===e.name)))||void 0===n?void 0:n.value)||"",label:o}}))),[u]);return t?a===h.v.WITHDRAWAL?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vn,{isDisabled:e}),s.map((n=>(0,l.jsx)(mn,{isDisabled:e,accountField:n,paymentCode:t.code},n.name)))]}):(0,l.jsxs)(l.Fragment,{children:[Boolean(i.length&&u.length&&!r)&&(0,l.jsx)(kt.l,{name:"field2",disabled:e,options:m,id:`${o}-field2`,label:n("DotpayCard.accountId.label"),className:`cms-cashier-${a}-DotpayCard-field2`,"aria-label":n(["DotpayCard.accountId.label","playtech.mobile.system.select.aria-label"])}),s.map((n=>(0,l.jsx)(mn,{isDisabled:e,accountField:n,paymentCode:t.code},n.name)))]}):null},fn={agreement:"PayPalViaSC__agreement--2qR",text:"PayPalViaSC__text--2DY"},yn=({isDisabled:e,activeMethod:t})=>{const{values:n}=(0,qe.lN)(),a=(0,x.N)(),{type:o}=(0,p.TP)(),{account:r=[],accountFields:{field:i=[]}={}}=t,s=(0,d.useMemo)((()=>r.find((e=>e.code===n.storedAccountId))),[r,n.storedAccountId]),{isContentDisplayed:u,fieldName:m}=(e=>{const{type:t}=(0,p.TP)(),n=W(c()("activeMethod")),{account:a=[],accountFields:{field:o=[]}={}}=n||{};return(0,d.useMemo)((()=>{var n;const r=o.find((e=>e.label===re.SZ.AGREEMENT_FIELD)),i=r&&a.find((e=>{var t;return null===(t=null==e?void 0:e.specificParams)||void 0===t?void 0:t[r.name]})),s=r&&(null===(n=null==e?void 0:e.specificParams)||void 0===n?void 0:n[r.name]);return!r||i&&i.code!==(null==e?void 0:e.code)||t!==h.v.DEPOSIT?{isContentDisplayed:!1}:Object.assign({isContentDisplayed:!0},!s&&{fieldName:r.name})}),[t,a,o,null==e?void 0:e.code,null==e?void 0:e.specificParams])})(s);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vn,{isDisabled:e}),i.map((n=>(0,l.jsx)(mn,{isDisabled:e,accountField:n,paymentCode:t.code,className:o===h.v.DEPOSIT&&n.label===re.SZ.AGREEMENT_FIELD?"hidden":""},n.name))),u&&(0,l.jsx)("div",{className:`${fn.agreement} cms-cashier-${o}-PayPalViaSC`,children:m?(0,l.jsx)(Kt.S,{name:m,className:fn.checkbox,"aria-label":m,label:a("deposit.BA.notAgreed")}):(0,l.jsx)("div",{className:fn.text,children:a("deposit.BA.agreed")})})]})},bn=({isDisabled:e,activeMethod:t})=>{var n;const a=(0,x.N)(),{componentId:o,type:r}=(0,p.TP)(),{account:i=[]}=t||{},s=(0,d.useMemo)((()=>i.map((e=>{var t,n;const a=null===(n=null===(t=e.specificParams)||void 0===t?void 0:t.accountId)||void 0===n?void 0:n.slice(1);
1return{value:e.code,label:`**** ${a}`}}))),[i]);return(0,l.jsx)(kt.l,{options:s,disabled:e,defaultValue:null===(n=s[0])||void 0===n?void 0:n.value,label:a("accountId.label"),name:re.dj.STORED_ACCOUNT_ID,className:`cms-cashier-${r}-NuveiRealCard-accountId`,id:`${o}-${re.dj.STORED_ACCOUNT_ID}`,"aria-label":a(["accountId.label","playtech.mobile.system.select.aria-label"])})},Cn=({isDisabled:e,activeMethod:t})=>{var n;const a=(0,x.N)(),o=(0,R.GV)(c()("allowedCountries")),{firstName:r,lastName:i,addressDetails:s={},zip:d,city:u,countryCode:m}=(0,R.Cn)(c()("userDetails")),{accountFields:{field:v=[]}={}}=t,f=null===(n=o.filter((e=>e.code===m))[0])||void 0===n?void 0:n.name,{type:y}=(0,p.TP)();return y===h.v.DEPOSIT?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vn,{isDisabled:e}),v.map((n=>(0,l.jsx)(mn,{isDisabled:e,accountField:n,paymentCode:t.code},n.name)))]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vn,{isDisabled:e}),v.map((n=>(0,l.jsx)(mn,{isDisabled:e,accountField:n,paymentCode:t.code},n.name))),Boolean(r||i)&&(0,l.jsx)(Pt.p,{type:"text",disabled:!0,name:"firstname",className:`cms-cashier-${y}-BankTransferCH-firstname`,label:a("method.BankTransferCH.beneficiary.label"),placeholder:a("method.BankTransferCH.beneficiary.label"),initialValue:`${r?`${r} `:""}${i||""}`,"aria-label":a(["method.BankTransferCH.beneficiary.label","playtech.mobile.system.input.aria-label"])}),Boolean(s.buildingNumber&&s.streetName)&&(0,l.jsx)(Pt.p,{type:"text",disabled:!0,name:"buildingNumber",label:a("method.BankTransferCH.address.label"),placeholder:a("method.BankTransferCH.address.label"),className:`cms-cashier-${y}-BankTransferCH-buildingNumber`,initialValue:`${s.buildingNumber} ${s.streetName}`,"aria-label":a(["method.BankTransferCH.address.label","playtech.mobile.system.input.aria-label"])}),Boolean(d||u)&&(0,l.jsx)(Pt.p,{name:"zip",type:"text",disabled:!0,className:`cms-cashier-${y}-BankTransferCH-zip`,label:a("method.BankTransferCH.zip.label"),initialValue:`${d?`${d} `:""}${u||""}`,placeholder:a("method.BankTransferCH.zip.label"),"aria-label":a(["method.BankTransferCH.zip.label","playtech.mobile.system.input.aria-label"])}),Boolean(f)&&(0,l.jsx)(Pt.p,{type:"text",name:"country",disabled:!0,initialValue:f,className:`cms-cashier-${y}-BankTransferCH-country`,label:a("method.BankTransferCH.country.label"),placeholder:a("method.BankTransferCH.country.label"),"aria-label":a(["method.BankTransferCH.country.label","playtech.mobile.system.input.aria-label"])})]})},gn=({isDisabled:e,activeMethod:t})=>{const n=(0,x.N)(),{type:a,componentId:o}=(0,p.TP)(),{subMethods:{subMethod:r=[]}={},accountFields:{field:i=[]}={}}=t,s=(0,d.useMemo)((()=>r.map((({code:e})=>({value:e,label:n(`DotpayBankTransfer.${e}`)})))),[r,n]);return a===h.v.WITHDRAWAL?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vn,{isDisabled:e}),i.map((n=>(0,l.jsx)(mn,{isDisabled:e,accountField:n,paymentCode:t.code},n.name)))]}):(0,l.jsxs)(l.Fragment,{children:[Boolean(r.length)&&(0,l.jsx)(kt.l,{disabled:e,name:"subMethodsCodes",options:s,id:`${o}-subMethodsCodes`,label:n("DotpayBankTransfer.accountId.label"),className:`cms-cashier-${a}-DotpayBankTransfer-subMethodsCodes`,"aria-label":n(["DotpayBankTransfer.accountId.label","playtech.mobile.system.select.aria-label"])}),i.map((n=>(0,l.jsx)(mn,{isDisabled:e,accountField:n,paymentCode:t.code},n.name)))]})},En={accountFields:"AccountFields__accountFields--3-u"},_n=({isSectionHidden:e})=>{const{submitting:t}=(0,qe.lN)(),{type:n}=(0,p.TP)(),{activeMethod:a,isFormLoading:r}=W(T()(["activeMethod","isFormLoading"])),{accountFields:{field:i=[]}={}}=a||{},s=t||r,c=(0,z.YD)(a||{}),d=o[c?re.gb:null==a?void 0:a.code];return a&&(i.length||c)?(0,l.jsx)("div",{className:`${En.accountFields} ${e?"hidden":""} cms-cashier-${n}-account-fields`,children:d?(0,l.jsx)(d,{isDisabled:s,activeMethod:a}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vn,{isDisabled:s,className:En.accountField}),i.map((e=>(0,l.jsx)(mn,{isDisabled:s,accountField:e,className:En.accountField,paymentCode:a.code},e.name)))]})}):null};var Nn=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const Tn=e=>{const t=Q(),n=(0,L.Z)(),a=q(),{isComponentMounted:o}=(0,j.z)(),r=X(),i=K(),s=W(c()("activeMethod")),{code:l}=s||{};return(0,d.useCallback)((()=>Nn(void 0,void 0,void 0,(function*(){if(l&&e&&o()){a(E("")),a(g(!0));try{yield(e=>(0,M.t)(Object.assign(Object.assign({},e),{ID:33023,responses:[33024,33025],description:"Update payment method account",hide:1,specificParams:{accountType:"other"}})))({methodCode:l,accountCode:e}),yield t(l)}catch(e){const t=(null==e?void 0:e.response)||e||{},s=-1===t.ID?n(t):r(t)||i(t);o()&&a(E(s))}finally{o()&&a(g(!1))}}}))),[a,t,n,o,r,i,l,e])},jn="DeleteAccountButton__deleteAccount--1DJ",xn="DeleteAccountButton__deleteIcon--2na",wn=()=>{const e=(0,ee.wA)(),t=(0,x.N)(),{submitting:n,values:{storedAccountId:a}={}}=(0,qe.lN)(),{showDeleteOption:o}=(0,p.TP)(),{activeMethod:r,isNewAccountFlow:i,isFormLoading:s}=W(T()(["activeMethod","isNewAccountFlow","isFormLoading"])),{account:c=[]}=r||{},u=c.find((e=>e.code===a)),m=Tn(a),v=(0,d.useCallback)((()=>{n||s||!a||e((0,ne.HC)({onAccept:m,acceptBtnText:t("account.delete.confirmation.ok"),declineBtnText:t("account.delete.confirmation.cancel"),content:t("account.delete.confirmation",[(null==u?void 0:u.title)||a])}))}),[e,a,u,t,m,n,s]);return c.length&&a&&!i&&o?(0,l.jsx)(P.x,{onClick:v,className:`${jn} cms-cashier-delete-account-btn`,"aria-label":t("account.delete"),children:(0,l.jsx)(D.I,{type:"delete",className:xn})}):null},Pn="AccountSection__accountSection--Yfp",On="AccountSection__title--2Kr",Sn=()=>{const e=(0,x.N)(),t=vt(),{activeMethod:n,isNewAccountFlow:a}=W(T()(["activeMethod","isNewAccountFlow"])),{accountFields:{field:o=[]}={},account:r=[]}=n||{},i=(0,d.useMemo)((()=>{const e=o.every((e=>t.includes(e.name)));return!(0,z.YD)(n||{})&&(!o.length||e&&(!r.length||a))}),[o,t,r.length,a,n]);return(0,l.jsxs)("section",{className:Pn,children:[!i&&(0,l.jsxs)("h3",{className:On,children:[e("account.title"),
1(0,l.jsx)(wn,{})]}),(0,l.jsx)(_n,{isSectionHidden:i})]})};var Dn=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};var An=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const In=()=>{const e=(0,ge.B)();return(0,d.useCallback)((t=>An(void 0,[t],void 0,(function*({headers:t,getParameters:n,postParameters:a}){const{data:o}=yield e(Object.assign(Object.assign(Object.assign({ID:35760,responses:[35761,35762],description:"Deposit token listener"},t&&{headers:t}),n&&{getParameters:n}),a&&{postParameters:a}));return o}))),[e])},Rn=()=>{const e=Q(),t=q(),n=Pe(),{activeMethod:a,isNewAccountFlow:o}=W(T()(["activeMethod","isNewAccountFlow"])),r=(0,d.useMemo)((()=>({[re.hQ.APPROVED]:re.g4.SUCCESS,[re.hQ.DECLINED]:re.g4.ERROR})),[]);return(0,d.useCallback)((i=>{var s;const{redirectData:c,transactionData:l}=i;if(l&&(null==l?void 0:l.status)!==re.hQ.WAITING){const i=r[l.status]||l.status;return n({status:i,action:h.v.DEPOSIT,amount:null===(s=l.amount)||void 0===s?void 0:s.amount,transactionCode:l.code}),t(_(null)),t(g(!1)),void(o&&i===re.g4.SUCCESS&&e(null==a?void 0:a.code))}(0,m.V2)(c.location)}),[t,r,n,o,e,null==a?void 0:a.code])},Mn=e=>Array.from(new URL(e).searchParams.entries()).map((([e,t])=>({key:e,value:t})));var Fn=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const kn=()=>{const e=q(),t=In(),n=Rn(),a=Pe();return(0,d.useCallback)((o=>r=>Fn(void 0,[r],void 0,(function*({prepayToken:r}){e(g(!0));try{const e=yield t({headers:[{key:"prepayToken",value:r}],getParameters:Mn(o)});n(e)}catch(t){a({action:h.v.DEPOSIT,status:re.g4.ERROR,initiator:re.TE.CASHIER}),e(g(!1)),e(_(null))}}))),[a,e,n,t])};var Ln=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))},$n=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n};const Hn=e=>{const t=(0,oe.a)(),n=Q(),a=q(),o=(0,x.N)(),r=(0,L.Z)(),i=Rn(),s=Pe(),c=In(),{customFormData:l,activeMethod:u}=W(T()(["customFormData","activeMethod"])),{code:m,account:v=[]}=u||{},p=(0,d.useCallback)((e=>Ln(void 0,[e],void 0,(function*({wrp:e,sessionToken:o}){try{const t=yield c({getParameters:[{key:"wrp",value:e}],postParameters:[{key:"sessionToken",value:o}]});i(t),v.length||(yield n(m))}catch(e){(0,be.Rm)("error","[Cashier][Nuvei CC] deposit Token Listener request error",e),s({action:h.v.DEPOSIT,status:re.g4.ERROR,initiator:re.TE.CASHIER}),t()&&(a(g(!1)),a(_(null)),a(E(r(e))))}}))),[a,t,m,v.length,c,n,s,i,r]);return(0,d.useCallback)((n=>Ln(void 0,void 0,void 0,(function*(){var r,i,s,c;if(a(E("")),!e||!l)return;let d;a(g(!0));try{d=JSON.parse((null===(c=null===(s=null===(i=null===(r=l.response)||void 0===r?void 0:r.data)||void 0===i?void 0:i.headerParameters)||void 0===s?void 0:s["X-Redirect-Content"])||void 0===c?void 0:c[0])||"{}")}catch(e){return void(0,be.Rm)("error","[Cashier][Nuvei CC] unable to parse X-Redirect-Content")}try{const{userTokenId:t,sessionToken:a,wrp:o,userPaymentOptionId:r}=d,{cvv:i,expirationDate:s=""}=n,c=$n(n,["cvv","expirationDate"]),[l,u]=s.split("-");e.createPayment(Object.assign(Object.assign({sessionToken:a},t&&{userTokenId:t}),{paymentOption:Object.assign({card:Object.assign(Object.assign({CVV:i},c),s&&{expirationMonth:u,expirationYear:l.slice(2)})},r&&{userPaymentOptionId:r})}),(()=>Ln(void 0,void 0,void 0,(function*(){yield p({wrp:o,sessionToken:a})}))))}catch(e){(0,be.Rm)("error","[Cashier][Nuvei CC] payment is not created"),t()&&(a(g(!1)),a(E(o("playtech.mobile.system.systemError","System error"))))}}))),[o,a,t,l,e,p])},Un="CvvTooltip__cvvTooltipContainer--flE",Bn="CvvTooltip__cardsContainer--2B2",Vn="CvvTooltip__cardContainer--2M9",Yn="CvvTooltip__cardCredentials--1Rg",Gn="CvvTooltip__cardStripe--3KE",Wn="CvvTooltip__cvvContainer--2rc",qn="CvvTooltip__cardNumber--2a8",Jn="CvvTooltip__cvvNumber--1JG",zn=()=>{const e=(0,x.N)();return(0,l.jsxs)("div",{className:Un,children:[(0,l.jsx)("p",{children:(0,l.jsx)(yt.F,{tKey:e("method.CC.cvv.tooltip.threeDigits")})}),(0,l.jsx)("p",{children:(0,l.jsx)(yt.F,{tKey:e("method.CC.cvv.tooltip.fourDigits")})}),(0,l.jsxs)("div",{className:Bn,children:[(0,l.jsxs)("div",{className:Vn,children:[(0,l.jsx)("div",{className:Gn}),(0,l.jsx)("div",{className:Wn,children:(0,l.jsx)("div",{className:Jn,children:"1 2 3"})})]}),(0,l.jsx)("div",{className:Vn,children:(0,l.jsxs)("div",{className:Yn,children:[(0,l.jsx)("div",{className:Jn,children:"1 2 3 4"}),(0,l.jsx)("div",{className:qn,children:"1111 2222 3333 4444"})]})})]})]})};var Xn=n(35103);const Kn=({message:e,className:t,formRef:n})=>{const a=(0,I.e)(n);return(0,A.S)((()=>{a({behavior:"smooth"})}
1),[a]),(0,l.jsx)(Xn.W,{className:t,message:e})},Zn="AddCardForm__submitBtn--2WC",Qn="AddCardForm__cancelBtn--1rU",ea="AddCardForm__formError--2St",ta=({nuveiGate:e,className:t})=>{const n=(0,d.useRef)(null),a=q(),o=(0,x.N)(),r=Hn(e),{isFormLoading:i,formError:s,activeMethod:c}=W(T()(["isFormLoading","formError","activeMethod"])),{componentId:u}=(0,p.TP)(),m=(()=>{const e=(0,x.N)();return(0,d.useMemo)((()=>({cardNumber:[(0,gt.required)(),(0,gt.length)({min:13,max:19,error:e("tooltip.cardNumber.invalid")}),(0,gt.regexp)({re:/^\d+$/,error:e("tooltip.cardNumber.regexp")})],cardHolderName:[(0,gt.required)()],expirationDate:[(0,gt.required)()],cvv:[(0,gt.required)(),(0,gt.regexp)({re:/^\d+$/,error:e("error.cvv2.regexp")}),(0,gt.length)({min:3,max:4,error:e("error.cvv2.length")})]})),[e])})(),v=(0,d.useCallback)((()=>{a(_(null)),a(E(""))}),[a]),f=(0,d.useMemo)((()=>[{name:"cardNumber",isRequiredCustom:!0,type:h.Ys.TEXT,label:o("method.CC.cardNumber.label")},{name:"cardHolderName",isRequiredCustom:!0,type:h.Ys.TEXT,label:o("method.CC.cardHolderName.label")},{name:"expirationDate",isRequiredCustom:!0,type:h.Ys.EXP_DATE,label:o("method.CC.expirationDate.label")},{name:"cvv",tooltip:(0,l.jsx)(zn,{}),isRequiredCustom:!0,type:h.Ys.PASSWORD,label:o("method.CC.cvv.label")}]),[o]);return c?(0,l.jsx)(ft.l,{formName:"ADD_CARD",onSubmit:r,validationConfig:m,render:({handleSubmit:e})=>(0,l.jsxs)("form",{className:`${u}-${c.code} ${t}`,onSubmit:e=>e.preventDefault(),children:[s&&(0,l.jsx)(Kn,{formRef:n,message:s,className:ea}),(0,l.jsxs)("div",{className:En.accountFields,children:[f.map((e=>(0,l.jsx)(mn,{isDisabled:i,accountField:e,paymentCode:c.code},e.name))),(0,l.jsx)(wt.$,{isNew:!0,size:"large",id:"nuvei-submit",onClick:e,disabled:i,className:Zn,children:o("method.CC.submit")}),(0,l.jsx)(wt.$,{isNew:!0,size:"large",view:"secondary",id:"nuvei-cancel",onClick:v,disabled:i,className:Qn,children:o("method.CC.cancel")})]})]})},`${u}-${c.code}`):null};var na=n(16365);const aa={base:{width:"100%",fontSize:getComputedStyle(document.documentElement).fontSize,height:getComputedStyle(document.documentElement).getPropertyValue("--form-input-field-height"),lineHeight:`calc(${getComputedStyle(document.documentElement).getPropertyValue("--form-input-field-height")} + .1rem)`,backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--form-field-background-color"),borderRadius:getComputedStyle(document.documentElement).getPropertyValue("--form-input-field-border-radius"),padding:"0 1.21rem",":focus":{border:`1px solid ${getComputedStyle(document.documentElement).getPropertyValue("--base-color-blue")}`}},invalid:{border:`1px solid ${getComputedStyle(document.documentElement).getPropertyValue("--form-field-invalid-border-color")}`,color:getComputedStyle(document.documentElement).getPropertyValue("--form-field-text-error-color")},valid:{color:getComputedStyle(document.documentElement).getPropertyValue("--form-field-text-color"),border:`1px solid ${getComputedStyle(document.documentElement).getPropertyValue("--form-field-border-color")}`}},oa="ExistingCardForm__container--2oJ",ra="ExistingCardForm__field--2NN",ia="ExistingCardForm__formError--2aH",sa="ExistingCardForm__bottomMessage--qok",ca="ExistingCardForm__submitBtn--1DJ",la="ExistingCardForm__cancelBtn--3Hy",da=({nuveiGate:e,className:t})=>{const n=q(),a=(0,x.N)(),o=(0,d.useRef)(null),r=(0,d.useRef)(!1),i=(0,d.useRef)(null),[s,u]=(0,d.useState)(),[m,v]=(0,d.useState)(!1),[h,f]=(0,d.useState)(!0),y=Hn(e),b=(0,R.Cn)(c()("lang")),{isFormLoading:C,customFormData:g,formError:N,activeMethod:j}=W(T()(["isFormLoading","customFormData","formError","activeMethod"])),{componentId:w}=(0,p.TP)(),P=(0,d.useCallback)((()=>{n(_(null)),n(E(""))}),[n]),O=(0,d.useCallback)((()=>{y({cvv:s})}),[s,y]);return(0,d.useEffect)((()=>{var t;const n=(null===(t=null==g?void 0:g.response.data.headerParameters.Location)||void 0===t?void 0:t[0])||"";if(!e||!i.current||!n)return;const a=e.fields({locale:na.E.getTwoLetterLanguage(b),textDirection:getComputedStyle(i.current).direction}).create("ccCvc",{type:"ccCvc",style:aa});u(a),a.attach(i.current)}),[b,e,g]),(0,d.useEffect)((()=>{s&&(s.on("change",(e=>{r.current=Boolean(!e.error)})),s.on("blur",(()=>{v(!r.current)})),s.on("focus",(()=>{v(!1),f(!1)})))}),[s]),j?(0,l.jsxs)("form",{action:"",noValidate:!0,autoComplete:"off",id:"cc-custom-form",className:`${w}-${j.code} ${oa} ${t}`,children:[N&&(0,l.jsx)(Kn,{formRef:o,message:N,className:ia}),(0,l.jsxs)("div",{className:En.accountFields,children:[(0,l.jsxs)("div",{className:ra,children:[(0,l.jsx)(tn.J,{infoTooltip:(0,l.jsx)(zn,{}),isLabelAsteriskEnabled:!0,label:a("method.CC.cvv.label")}),(0,l.jsx)("div",{ref:i}),m&&(0,l.jsx)("div",{className:sa,children:a("method.CC.cvv.custom.error")})]}),(0,l.jsx)(wt.$,{isNew:!0,size:"large",id:"nuvei-submit",onClick:O,className:ca,disabled:C||m||h,children:a("method.CC.submit")}),(0,l.jsx)(wt.$,{isNew:!0,size:"large",view:"secondary",id:"nuvei-cancel",onClick:P,disabled:C,className:la,children:a("method.CC.cancel")})]})]}):null}
1,ua={container:"CC__container--1Fo",title:"CC__title--2QB",loading:"CC__loading--2pb"};var ma=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const va=()=>{const e=q(),t=(0,x.N)(),n=(()=>{const{nuveiEnv:e}=(0,p.TP)(),t=W(c()("customFormData"));return(0,d.useCallback)((n=>Dn(void 0,void 0,void 0,(function*(){var a,o,r,i,s,c,l;let d,u;const m=(null===(i=null===(r=null===(o=null===(a=null==t?void 0:t.response)||void 0===a?void 0:a.data)||void 0===o?void 0:o.headerParameters)||void 0===r?void 0:r.Location)||void 0===i?void 0:i[0])||"",v=(null===(l=null===(c=null===(s=null==t?void 0:t.response)||void 0===s?void 0:s.data)||void 0===c?void 0:c.headerParameters["X-Redirect-Content"])||void 0===l?void 0:l[0])||"{}";try{u=JSON.parse(v)}catch(e){throw new Error("[Cashier][Nuvei CC] Unable to parse X-Redirect-Content")}try{window.SafeCharge||(yield(0,Ie.I)(m,{removeOnLoad:!1}))}catch(e){throw new Error("[Cashier][Nuvei CC] Unable to load script")}if(!window.SafeCharge)throw new Error("[Cashier][Nuvei CC] Gate is undefined");try{const{merchantId:t,merchantSiteId:n,sessionToken:a}=u;d=window.SafeCharge(Object.assign({merchantId:t,merchantSiteId:n,sessionToken:a},e&&{env:e}))}catch(e){throw new Error("[Cashier][Nuvei CC] Gate is not created")}finally{n(Boolean(!0))}return d}))),[e,t])})(),[a,o]=(0,d.useState)(!1),[r,i]=(0,d.useState)(),{activeMethod:s,isFormLoading:u,customFormData:m}=W(T()(["activeMethod","isFormLoading","customFormData"])),{type:f,paymentMethodListView:y}=(0,p.TP)(),b=f===h.v.WITHDRAWAL;if((0,d.useEffect)((()=>{!b&&m&&(()=>{ma(void 0,void 0,void 0,(function*(){try{i(yield n(o))}catch(n){(0,be.Rm)("error",n),e(_(null)),e(E(t("playtech.mobile.system.systemError","System error")))}}))})()}),[e,t,b,n,m]),b||!s)return null;const C=(0,z.YD)(s);return(0,l.jsxs)("div",{className:`${ua.container} ${u?ua.loading:""}`,children:[y===re.tF.LEFT_SIDE_MENU&&(0,l.jsx)("p",{className:ua.title,children:t(`method.${s.code}.title`,s.name)}),(0,l.jsx)("h3",{children:t("account.title")}),(0,l.jsxs)("div",{className:`${ua.ccContainer} ${a?"":ua.loading}`,children:[C?(0,l.jsx)(da,{nuveiGate:r,className:a?"":"hidden"}):(0,l.jsx)(ta,{nuveiGate:r,className:a?"":"hidden"}),(0,l.jsx)(v.a,{className:a?"hidden":""})]})]})},pa={chName:"epgjs-chName",cardNumber:"epgjs-pan",expDate:"epgjs-expdate",cvnNumber:"epgjs-cvnNumber",rememberMe:"epgjs-rememberme","epgjs-cashier-quickpay-form":"epgjs-custom-form","epgjs-cashier-quickpay-form-button-CreditCards":"epgjs-pay-btn"};var ha=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const fa="EasyCC__container--268",ya="EasyCC__title--yaf",ba="EasyCC__field--2N8",Ca="EasyCC__cardNumber--27A",ga="EasyCC__fields--2JB",Ea="EasyCC__btn--3mh",_a="EasyCC__loading--1qw",Na="EasyCC__rememberMe--1mq";var Ta=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const ja=()=>{const e=(0,oe.a)(),t=q(),n=(0,x.N)(),a=(0,d.useRef)(null),o=(()=>{const e=(0,x.N)(),t=kn(),n=(0,R.GV)(c()("dynamicTags")).DTAG_EPG_JS_URL||"https://epgjs-rendercashier-stg.easypaymentgateway.com/js/public/epgjs-3.8.0-min.js",a=W(c()("customFormData")),o=(0,d.useMemo)((()=>(t,n)=>e(`method.EasyCC.translations.${t}`,...null!=n?n:[])),[e]);return(0,d.useCallback)((()=>ha(void 0,void 0,void 0,(function*(){var e,r,i,s,c,l,d;if(!a)return"";try{yield(0,Ie.I)(n);const{response:u}=a,{headerParameters:m}=u.data,v=null===(e=null==m?void 0:m.Location)||void 0===e?void 0:e[0],p=null===(r=null==m?void 0:m["X-Redirect-Content"])||void 0===r?void 0:r[0];if(!v||!p)return"";const h=JSON.parse(p),{authToken:f,merchantPrePayCallback:y}=h;return null===(i=window.EPGJS_COMM)||void 0===i||i.setEpgBaseUrl(v),null===(s=window.EPGJS_I18N)||void 0===s||s.setTranslate(o),null===(c=window.EPGJS_STYLE)||void 0===c||c.setCssTheme(null===(l=window.EPGJS_STYLE)||void 0===l?void 0:l.DEFAULT_BOOTSTRAP_THEME),null===(d=window.EPGJS_COMM)||void 0===d||d.setMerchantPrePayCallback(t(y)),f}catch(e){return""}}))),[a,n,t,o])})(),{activeMethod:r,isFormLoading:i,customFormData:s}=W(T()(["activeMethod","isFormLoading","customFormData"])),{type:u,paymentMethodListView:m}=(0,p.TP)(),v=u===h.v.WITHDRAWAL;return(0,d.useEffect)((()=>{!v&&s&&(()=>{Ta(void 0,void 0,void 0,(function*(){const{formData:r}=s,i=yield o();i?a.current&&(((e,t,n)=>{var a,o,r,i,s;
1t?(e.addEventListener("onRenderedCashier",(()=>{var n,a,o;const[,r]=t.toString().split("****"),i=e.querySelector(`[data-i18n-static*="${r}"]`);null===(n=null==e?void 0:e.querySelector("#epgjs-cashier .panel"))||void 0===n||n.classList.add("hidden"),null===(o=null===(a=null==i?void 0:i.parentElement)||void 0===a?void 0:a.parentElement)||void 0===o||o.classList.remove("hidden"),null==i||i.click()}),{once:!0}),null===(a=window.EPGJS_COMM)||void 0===a||a.setOnlyRegisteredAccounts(!0),null===(o=window.EPGJS_COMM)||void 0===o||o.setShowOnlyCardRegister(!1),null===(r=window.EPGJS)||void 0===r||r.renderRegisteredAccounts(n,"epgjs-container","epgjs-custom-form","CreditCards")):(e.addEventListener("onRenderedCashier",(()=>{const t=e.querySelector("#epgjs-cashier-quickpay-form-field-creditcards-rememberme");null==t||t.setAttribute("checked","true")})),null===(i=window.EPGJS_DIY)||void 0===i||i.setDiy(pa),null===(s=window.EPGJS)||void 0===s||s.renderQuickDepositByPaysol(n,"epgjs-container","epgjs-custom-form","CreditCards"))})(a.current,r.field2,i),a.current.classList.remove("hidden")):e()&&(t(_(null)),t(E(n("playtech.mobile.system.systemError","System error"))))}))})()}),[v,s,o,t,n,e]),v||!r?null:(0,l.jsxs)("div",{className:`${fa} ${i?_a:""}`,children:[m===re.tF.LEFT_SIDE_MENU&&(0,l.jsx)("p",{className:ya,children:n(`method.${r.code}.title`,r.name)}),(0,l.jsx)("h3",{children:n("account.title")}),(0,l.jsx)("div",{id:"epgjs-container",className:"hidden",ref:a,children:(0,l.jsx)("form",{action:"",autoComplete:"off",id:"epgjs-custom-form",className:"deposit-EasyCC",children:(0,l.jsxs)("div",{className:ga,children:[(0,l.jsxs)("div",{className:`${ba} ${Ca}`,children:[(0,l.jsx)(tn.J,{id:"epgjs-pan",label:n("method.EasyCC.cardNumber.label")}),(0,l.jsx)("div",{id:"epgjs-pan"})]}),(0,l.jsxs)("div",{className:ba,children:[(0,l.jsx)(tn.J,{id:"epgjs-expdate",label:n("method.EasyCC.expdate.label")}),(0,l.jsx)("div",{id:"epgjs-expdate"})]}),(0,l.jsxs)("div",{className:ba,children:[(0,l.jsx)(tn.J,{id:"epgjs-cvnNumber",label:n("method.EasyCC.cvnNumber.label")}),(0,l.jsx)("div",{id:"epgjs-cvnNumber"})]}),(0,l.jsxs)("div",{className:ba,children:[(0,l.jsx)(tn.J,{id:"epgjs-chName",label:n("method.EasyCC.chName.label")}),(0,l.jsx)("div",{id:"epgjs-chName"})]}),(0,l.jsx)("div",{className:Na,children:(0,l.jsx)("div",{id:"epgjs-rememberme"})}),(0,l.jsx)(wt.$,{isNew:!0,size:"large",id:"epgjs-pay-btn",className:Ea,disabled:i,children:n("method.EasyCC.finalize")})]})})})]})};var xa=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const wa=`\n html, body {\n font-size: ${getComputedStyle(document.documentElement).fontSize};\n }\n\n input {\n width: 100%;\n font-size: ${getComputedStyle(document.documentElement).fontSize};\n height: ${getComputedStyle(document.documentElement).getPropertyValue("--form-input-field-height")};\n background: ${getComputedStyle(document.documentElement).getPropertyValue("--form-field-background-color")};\n border: 1px solid ${getComputedStyle(document.documentElement).getPropertyValue("--form-field-border-color")};\n border-radius: ${getComputedStyle(document.documentElement).getPropertyValue("--form-input-field-border-radius")};\n color: ${getComputedStyle(document.documentElement).getPropertyValue("--form-field-text-color")};\n }\n\n .card-input {\n width: 100%;\n }\n\n input:focus {\n background-color: ${getComputedStyle(document.documentElement).getPropertyValue("--form-field-background-color")};\n border: 1px solid ${getComputedStyle(document.documentElement).getPropertyValue("--form-field-border-focus-color")};\n }\n\n input.error.changed:focus {\n background-color: ${getComputedStyle(document.documentElement).getPropertyValue("--form-field-background-color")};\n border: 1px solid ${getComputedStyle(document.documentElement).getPropertyValue("--form-field-border-focus-color")};\n }\n\n input.error.changed {\n background-color: ${getComputedStyle(document.documentElement).getPropertyValue("--form-field-background-color")};\n border: 1px solid ${getComputedStyle(document.documentElement).getPropertyValue("--form-field-border-error-color")};\n color: ${getComputedStyle(document.documentElement).getPropertyValue("--form-field-text-error-color")};\n }\n\n input:disabled {\n color: #a0a0a0;\n border: 1px solid ${getComputedStyle(document.documentElement).getPropertyValue("--form-field-border-color")};\n }\n\n .pci-input-container .card-number-wrap .pci-input-wrapper .pci-input-card-icon {\n top: 0.8em;\n }\n`;
1var Pa=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const Oa={container:"PraxisCard__container--39n",title:"PraxisCard__title--2n0",praxisContainer:"PraxisCard__praxisContainer--1go",loading:"PraxisCard__loading--3ro",field:"PraxisCard__field--arz",submitBtn:"PraxisCard__submitBtn--31x",cancelBtn:"PraxisCard__cancelBtn--CHy",formError:"PraxisCard__formError--4wk"};var Sa=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const Da=()=>{const e=q(),t=(0,x.N)(),n=(0,d.useRef)(null),a=(()=>{const e=(0,x.N)(),t=W(c()("customFormData"));return(0,d.useCallback)((n=>Pa(void 0,void 0,void 0,(function*(){var a,o;let r;const i=null===(a=null==t?void 0:t.response.data.headerParameters.Location)||void 0===a?void 0:a[0],s=(null===(o=null==t?void 0:t.response.data.headerParameters["X-Redirect-Content"])||void 0===o?void 0:o[0])||"{}";try{r=JSON.parse(s)}catch(e){throw new Error("[Cashier][Praxis] unable to parse X-Redirect-Content")}try{yield(0,Ie.I)(i)}catch(e){throw new Error("[Cashier][Praxis] unable to load praxis script")}if(!window.PraxisGate)throw new Error("[Cashier][Praxis] PraxisGate is undefined");const c=new window.PraxisGate({sessionToken:r.sessionToken,containers:{card_number:"#praxis-card-number",card_holder:"#praxis-card-holder",exp:"#praxis-expiration-date",cvv:"#praxis-cvv"},labels:{display:[window.PG_INPUT_SHOW_PLACEHOLDERS],placeholder_card_number:e("method.PraxisCard.cardNumber.placeholder"),placeholder_card_holder:e("method.PraxisCard.cardHolderName.placeholder"),placeholder_exp:e("method.PraxisCard.expirationDate.placeholder"),placeholder_cvv:e("method.PraxisCard.cvv.placeholder")},css:`\n ${wa}\n ${window.PRAXIS_CUSTOM_STYLES||""}\n `,onLoad:()=>{c.pickCustomerCard(r.cardToken),setTimeout((()=>n(!0)),1500)}});return c}))),[t,e])})(),[o,r]=(0,d.useState)(!1),[i,s]=(0,d.useState)(),u=(e=>{const t=(0,oe.a)(),n=Q(),a=q(),o=(0,x.N)(),r=(0,L.Z)(),i=Pe(),s=Rn(),c=In(),{lang:l,clientIp:u}=(0,R.Cn)(T()(["lang","clientIp"])),{customFormData:m,activeMethod:v}=W(T()(["customFormData","activeMethod"])),{account:p=[]}=v||{};return(0,d.useCallback)((()=>xa(void 0,void 0,void 0,(function*(){var d,f;if(a(E("")),!e||!m)return;if(!e.allFieldsValidated())return void(t()&&a(E(o("method.PraxisCard.invalidFields"))));a(g(!0));const y=yield e.tokenizeCard();if(y){let e;try{e=JSON.parse((null===(f=null===(d=m.response.data.headerParameters)||void 0===d?void 0:d["X-Redirect-Content"])||void 0===f?void 0:f[0])||"{}")}catch(e){return void(0,be.Rm)("error","[Cashier][Praxis] unable to parse X-Redirect-Content")}const o={java_enabled:0,ip_address:u,javascript_enabled:1,accept_header:"text/html",screen_width:screen.width,screen_height:screen.height,viewport_width:window.innerWidth,viewport_height:window.innerHeight,color_depth:String(screen.colorDepth),pixel_depth:String(screen.pixelDepth),pixel_ratio:String(window.devicePixelRatio),language:null==l?void 0:l.toLowerCase().replace("_","-"),timezone_offset:(new Date).getTimezoneOffset(),user_agent:navigator.userAgent.
1substring(0,2e3)};try{const t=yield c({headers:[{key:"hpfToken",value:y}],getParameters:[{key:"wrp",value:e.wrp}],postParameters:[{key:"deviceData-json",value:window.btoa(JSON.stringify(o))}]});s(t),p.length||(yield n(null==v?void 0:v.code))}catch(e){(0,be.Rm)("error","[Cashier][Praxis] deposit Token Listener request error",e),i({action:h.v.DEPOSIT,status:re.g4.ERROR,initiator:re.TE.CASHIER}),a(g(!1)),t()&&(a(_(null)),a(E(r(e))))}}else(0,be.Rm)("error","[Cashier][Praxis] praxis tokenizeCard returned null"),a(g(!1)),t()&&a(E(o("playtech.mobile.system.systemError","System error")))}))),[e,m,a,u,t,n,c,l,i,o,s,p.length,null==v?void 0:v.code,r])})(i),{activeMethod:m,isFormLoading:f,customFormData:y,formError:b}=W(T()(["activeMethod","isFormLoading","customFormData","formError"])),{type:C,paymentMethodListView:N}=(0,p.TP)(),j=C===h.v.WITHDRAWAL,w=(0,d.useCallback)((()=>{e(_(null)),e(E(""))}),[e]);return(0,d.useEffect)((()=>{!j&&y&&(()=>{Sa(void 0,void 0,void 0,(function*(){try{s(yield a(r))}catch(n){(0,be.Rm)("error",n),e(_(null)),e(E(t("playtech.mobile.system.systemError","System error")))}}))})()}),[j,y,a,r,s,e,t]),j||!m?null:(0,l.jsxs)("div",{className:`${Oa.container} ${f?Oa.submitting:""}`,children:[N===re.tF.LEFT_SIDE_MENU&&(0,l.jsx)("p",{className:Oa.title,children:t(`method.${m.code}.title`,m.name)}),(0,l.jsx)("h3",{children:t("account.title")}),(0,l.jsxs)("div",{id:"praxis-container",className:`${Oa.praxisContainer} ${o?"":Oa.loading}`,children:[(0,l.jsx)("span",{tabIndex:-1,ref:n,"aria-hidden":!0}),(0,l.jsxs)("form",{action:"",noValidate:!0,autoComplete:"off",id:"praxis-custom-form",className:"deposit-PraxisCard "+(o?"":"hidden"),children:[b&&(0,l.jsx)(Kn,{formRef:n,className:Oa.formError,message:b}),(0,l.jsxs)("div",{className:En.accountFields,children:[(0,l.jsxs)("div",{className:Oa.field,children:[(0,l.jsx)(tn.J,{isLabelAsteriskEnabled:!0,id:"praxis-card-number",label:t("method.PraxisCard.cardNumber.label")}),(0,l.jsx)("div",{id:"praxis-card-number",className:Oa.praxisField})]}),(0,l.jsxs)("div",{className:Oa.field,children:[(0,l.jsx)(tn.J,{isLabelAsteriskEnabled:!0,id:"praxis-card-holder",label:t("method.PraxisCard.cardHolderName.label")}),(0,l.jsx)("div",{id:"praxis-card-holder",className:Oa.praxisField})]}),(0,l.jsxs)("div",{className:Oa.field,children:[(0,l.jsx)(tn.J,{isLabelAsteriskEnabled:!0,id:"praxis-expiration-date",label:t("method.PraxisCard.expirationDate.label")}),(0,l.jsx)("div",{id:"praxis-expiration-date",className:Oa.praxisField})]}),(0,l.jsxs)("div",{className:Oa.field,children:[(0,l.jsx)(tn.J,{isLabelAsteriskEnabled:!0,id:"praxis-cvv",label:t("method.PraxisCard.cvv.label")}),(0,l.jsx)("div",{id:"praxis-cvv",className:Oa.praxisField})]}),(0,l.jsx)(wt.$,{isNew:!0,size:"large",id:"praxis-submit",onClick:u,disabled:f,className:Oa.submitBtn,children:t("method.PraxisCard.submit")}),(0,l.jsx)(wt.$,{isNew:!0,size:"large",view:"secondary",id:"praxis-cancel",onClick:w,disabled:f,className:Oa.cancelBtn,children:t("method.PraxisCard.cancel")})]})]}),(0,l.jsx)(v.a,{className:o?"hidden":""})]})]})};var Aa=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const Ia="ApplePayEPG__container--1ja",Ra="ApplePayEPG__title--2IH";var Ma=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const Fa=()=>{const e=(0,oe.a)(),t=q(),n=(0,x.N)(),a=(0,d.useRef)(null),o=(()=>{const e=kn(),t=W(c()("customFormData")),{currencyCode:n,userDetails:{countryCode:a,language:o}}=(0,R.Cn)(T()(["currencyCode","userDetails"]));return(0,d.useCallback)((()=>Aa(void 0,void 0,void 0,(function*(){var r,i,s,c,l,d,u;if(!t)return"";try{const{headerParameters:m}=(null===(r=t.response)||void 0===r?void 0:r.data)||{},v=null===(i=null==m?void 0:m.Location)||void 0===i?void 0:i[0],p=null===(s=null==m?void 0:m["X-Redirect-Content"])||void 0===s?void 0:s[0],h=Number(String(t.formData.amount).replace(",","."));if(!(v&&p&&n&&h))return"";yield(0,Ie.I)(v);const f=JSON.parse(p),{authToken:y,epgBaseUrl:b,merchantPrePayCallback:C}=f;return null===(c=window.EPGJS_COMM)||void 0===c||c.setEpgBaseUrl(b),null===(l=window.EPGJS)||void 0===l||l.renderIntegratedCashier(y,"applepayepg-container","a
1pplepayDecryptService"),null===(d=window.EPGJS)||void 0===d||d.setInitPaysolParam(Object.assign(Object.assign({amount:h,currency:n},o&&{language:o}),a&&{country:a})),null===(u=window.EPGJS_COMM)||void 0===u||u.setMerchantPrePayCallback(e(C)),y}catch(e){return""}}))),[t,e,a,n,o])})(),{activeMethod:r,customFormData:i}=W(T()(["activeMethod","customFormData"])),{type:s,paymentMethodListView:u}=(0,p.TP)(),m=s===h.v.WITHDRAWAL;return(0,d.useEffect)((()=>{!m&&i&&a.current&&(()=>{Ma(void 0,void 0,void 0,(function*(){!(yield o())&&e()&&(t(_(null)),t(E(n("playtech.mobile.system.systemError","System error"))))}))})()}),[m,i,o,t,n,e]),m||!r?null:(0,l.jsxs)("div",{className:Ia,children:[u===re.tF.LEFT_SIDE_MENU&&(0,l.jsx)("p",{className:Ra,children:n(`method.${r.code}.title`,r.name)}),(0,l.jsx)("div",{ref:a,id:"applepayepg-container"})]})};var ka=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};var La=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const $a="CardsPS__container--1pn",Ha="CardsPS__ccContainer--omo",Ua="CardsPS__title--2mg",Ba="CardsPS__hidden--3Ji",Va="CardsPS__field--y91",Ya="CardsPS__paysafeField--_PL",Ga="CardsPS__btn--2z3",Wa="CardsPS__cancelBtn--3cH",qa="CardsPS__loading--7yG";var Ja=function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,s)}c((a=a.apply(e,t||[])).next())}))};const za=()=>{const e=q(),[t,n]=(0,d.useState)(null),[a,o]=(0,d.useState)(null),r=(()=>{const e=(0,ge.B)();return(0,d.useCallback)((t=>ka(void 0,void 0,void 0,(function*(){const{data:n}=yield e(Object.assign({ID:35747,responses:[35748,35749],description:"Deposit Listener Request",errorLevel:1},t));return n}))),[e])})(),i=(0,Xe.Z)(),s=(0,k.k)(),c=Pe(),u=Q(),m=(0,x.N)(),{activeMethod:v,isFormLoading:f,customFormData:y}=W(T()(["activeMethod","isFormLoading","customFormData"])),{type:b,paymentMethodListView:N}=(0,p.TP)(),j=b===h.v.WITHDRAWAL,{postData:{paymentHandleToken:P}={}}=null!=a?a:{},{labelField:{name:O=""}={}}=null!=v?v:{},{formData:{amount:S="",[O]:D=""}={}}=null!=y?y:{},A=(0,d.useCallback)((()=>{e(_(null)),e(E(""))}),[e]);(0,d.useEffect)((()=>{e(g(!0)),(()=>{Ja(void 0,void 0,void 0,(function*(){var t,a;const r=null==y?void 0:y.response,{data:i}=r,s=me(i.headerParameters),l=(null===(a=null===(t=i.headerParameters)||void 0===t?void 0:t.Location)||void 0===a?void 0:a[0])||"";try{yield(0,Ie.I)(l)}catch(t){return e(E(m("method.CardsPS.error.network"))),e(g(!1)),e(_(null)),void(yield c({action:h.v.DEPOSIT,status:re.g4.ERROR,initiator:re.TE.CASHIER}))}try{const t=yield((e,t)=>La(void 0,void 0,void 0,(function*(){var n;const{environment:a,currencyCode:o,apiKey:r,accountId:i}=e.postData||{},s={environment:a,currencyCode:o,accounts:{default:parseInt(i)},fields:{cardNumber:{selector:"#cardNumber",placeholder:t("method.CardsPS.cardNumber.label"),separator:" ",optional:!0},expiryDate:{selector:"#expiryDate",placeholder:t("method.CardsPS.expirationDate.label"),optional:!0},cvv:{selector:"#cvv",placeholder:t("method.CardsPS.cvv.label"),optional:!1}}};return null===(n=window.paysafe)||void 0===n?void 0:n.fields.setup(r,s)})))(s,m);n(t),o(s),e(g(!1))}catch(t){e(E(m("method.CardsPS.error.general",[String(t)]))),e(g(!1)),e(_(null)),yield c({action:h.v.DEPOSIT,status:re.g4.ERROR,initiator:re.TE.CASHIER})}}))})()}),[e,m,y,c]);const I=(0,d.useCallback)((()=>Ja(void 0,void 0,void 0,(function*(){var n,o,s,l,d;if(e(E("")),e(g(!0)),t)try{const{token:e}=yield((e,t)=>La(void 0,void 0,void 0,(function*(){const{merchantRefNum:n,amount:a,singleUseCustomerToken:o,ZIP:r,COUNTRY_CODE:i,CITY:s,ADDRESS:c,LAST_NAME:l,FIRST_NAME:d,E
1MAIL:u,STATE:m,PHONE:v,paymentHandleToken:p}=t.postData||{},h=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r&&{zip:r}),i&&{country:i}),s&&{city:s}),c&&{street:c}),m&&{state:m});return e.tokenize(Object.assign(Object.assign({amount:parseFloat(a),transactionType:"PAYMENT",paymentType:"CARD",merchantRefNum:n},p&&o&&{singleUseCustomerToken:o,paymentTokenFrom:p}),{customerDetails:Object.assign(Object.assign({},Object.keys(h).length>0&&{billingDetails:h}),{profile:Object.assign({firstName:d,lastName:l,email:u},v&&{phone:v})})}))})))(t,a),{code:i=""}=null!=y?y:{},d=yield r({methodCode:i,apmListenerRequestParameters:{getParameters:[{value:e,key:"paymentHandleToken"},{value:a.transactionCode,key:"pp"}]}});yield c({action:h.v.DEPOSIT,initiator:re.TE.CASHIER,status:re.g4.SUCCESS,amount:null===(o=null===(n=null==d?void 0:d.transactionData)||void 0===n?void 0:n.amount)||void 0===o?void 0:o.amount,transactionCode:null===(l=null===(s=null==d?void 0:d.transactionData)||void 0===s?void 0:s.code)||void 0===l?void 0:l.toString()}),yield u(null==v?void 0:v.code)}catch(t){const n=null!==(d=null==t?void 0:t.displayMessage)&&void 0!==d?d:i(t);e(E(m("method.CardsPS.error.general",[n])))}finally{e(g(!1)),e(C(!1)),e(_(null))}}))),[m,e,i,u,r,c,t,y,v,a]);return j||!v?null:(0,l.jsxs)("div",{className:`${$a} ${f?qa:""}`,children:[N===re.tF.LEFT_SIDE_MENU&&(0,l.jsx)("p",{className:Ua,children:m(`method.${v.code}.title`,v.name)}),(0,l.jsx)("h3",{children:m("account.title")}),(0,l.jsx)("div",{className:Ha,children:(0,l.jsx)(ft.l,{action:"",autoComplete:"off",formName:"PAYMENT_METHOD_CardsPS",id:"cards-custom-form",className:"deposit-CardsPS",onSubmit:I,render:({handleSubmit:e})=>(0,l.jsx)("form",{onSubmit:e,children:(0,l.jsxs)("div",{className:En.accountFields,children:[P?(0,l.jsxs)("div",{className:Va,children:[(0,l.jsx)(tn.J,{label:m("method.CardsPS.cardNumber.label")}),(0,l.jsx)("div",{className:Ya,children:m("method.CardsPS.cardNumber.confirm",[s.formatCurrency(S),String(D)])})]}):null,(0,l.jsxs)("div",{className:(0,w.$z)([Va,!a||P?Ba:""]),children:[(0,l.jsx)(tn.J,{isLabelAsteriskEnabled:!0,id:"cardNumber",label:m("method.CardsPS.cardNumber.label")}),(0,l.jsx)("div",{id:"cardNumber",className:Ya})]}),(0,l.jsxs)("div",{className:(0,w.$z)([Va,!a||P?Ba:""]),children:[(0,l.jsx)(tn.J,{isLabelAsteriskEnabled:!0,id:"expiryDate",label:m("method.CardsPS.expirationDate.label")}),(0,l.jsx)("div",{id:"expiryDate",className:Ya})]}),(0,l.jsxs)("div",{className:Va,children:[(0,l.jsx)(tn.J,{isLabelAsteriskEnabled:!0,id:"cvv",label:m("method.CardsPS.cvv.label")}),(0,l.jsx)("div",{id:"cvv",className:Ya})]}
1),(0,l.jsx)(wt.$,{isNew:!0,type:"submit",size:"large",id:"cardsps-pay-btn",className:Ga,disabled:f,children:m("method.CardsPS.submit")}),(0,l.jsx)(wt.$,{isNew:!0,size:"large",view:"secondary",id:"cardsps-cancel-btn",onClick:A,disabled:f,className:Wa,children:m("method.CardsPS.cancel")})]})})})})]})},Xa="PaymentMethodForm__paymentMethod--CxB",Ka="PaymentMethodForm__title--2ss",Za="PaymentMethodForm__formError--1wv",Qa="PaymentMethodForm__description--2oM",eo="PaymentMethodForm__tileView--1o_",to=({className:e,paymentFormRef:t})=>{const n=(0,x.N)(),a=Ct(),o=(0,d.useRef)(null),i=t||o,s=(0,d.useRef)(null),c=We(s),u=dt(s),{activeMethod:m,formError:v,customFormData:f}=W(T()(["activeMethod","formError","customFormData"])),{type:y,paymentMethodListView:b,componentId:C}=(0,p.TP)(),g=[re.tF.TILES,re.tF.LIST].includes(b),E=(0,d.useMemo)((()=>Object.keys(a)),[a]),{code:_,name:N,reDirectType:j,depositType:P,account:O=[]}=m||{},S=xt(E,O,y),D=j===h.e_.JS_PAY_SAFE_SDK,A=j===h.e_.JS_NUVEI&&P===re.L2,I=r[A?h.xM.NUVEI_CC:D?h.xM.CARDS_PS:_],R=I&&(null==f?void 0:f.code)===_||A&&(null==f?void 0:f.code)===h.xM.NUVEI_CC||D&&(null==f?void 0:f.code)===h.xM.CARDS_PS;return m?(0,l.jsxs)("div",{ref:s,className:(0,w.$z)([Xa,e,g&&eo,`cms-cashier-payment-method-${_}`]),children:[(0,l.jsx)("span",{tabIndex:-1,ref:i,"aria-hidden":!0}),(0,l.jsx)(ft.l,{formName:`PAYMENT_METHOD_${_}`,initialValues:a,validationConfig:S,fieldsToReplaceComma:[re.dj.AMOUNT],onSubmit:y===h.v.DEPOSIT?c:u,render:({handleSubmit:e,submitError:t})=>(0,l.jsxs)("form",{onSubmit:e=>e.preventDefault(),className:`${y}-${_} ${R?"hidden":""}`,children:[(t||v)&&(0,l.jsx)(Kn,{formRef:i,className:Za,message:t||v}),b===re.tF.LEFT_SIDE_MENU&&(0,l.jsx)("p",{className:Ka,children:n(`method.${_}.title`,N)}),(0,l.jsx)(yt.F,{defaultValue:"",className:Qa,tKey:`playtech.mobile.system.mobile-cashier.method.${y}.${_}.description`}),(0,l.jsx)(Sn,{}),(0,l.jsx)(Jt,{formRef:i,handleSubmit:e})]})},`${C}-${_}`),R?(0,l.jsx)(I,{}):null]}):null},no="TilesViewPaymentForm__headerWithBackBtn--2e3",ao="TilesViewPaymentForm__backBtnIcon--30T",oo="TilesViewPaymentForm__title--1yj",ro=({setActiveMethod:e})=>{const t=(0,x.N)(),n=W(c()("activeMethod")),a=(0,d.useRef)(null),{autoScrollToTop:o,classToScroll:r}=(0,p.TP)(),i=mt(r),s=(0,I.e)(i?{current:i}:a);return(0,A.S)((()=>{o&&s({behavior:"smooth"})}),[o,s]),n?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(P.x,{onClick:e,elementRef:a,className:no,"aria-label":`${t("backFrom")} ${n.name}`,children:[(0,l.jsx)(D.I,{type:"cashierBackBtn",className:ao}),(0,l.jsx)("span",{className:oo,children:t(`method.${n.code}.title`,n.name)})]}),(0,l.jsx)(to,{})]}):null},io={ellipsis:"TilesView__ellipsis--39V",tilesView:"TilesView__tilesView--3Cl",tileName:"TilesView__tileName--Loa",list:"TilesView__list--22U",tileIcon:"TilesView__tileIcon--3QQ",tile:"TilesView__tile--2ca",withIcons:"TilesView__withIcons--Cy-"},so=({tilesType:e})=>{const t=(0,x.N)(),n=q(),{methods:a,activeMethod:o}=W(T()(["methods","activeMethod"])),{showPaymentMethodIcons:r}=(0,p.TP)(),i=(0,d.useCallback)((e=>{n(b(e||""))}),[n]);return o?(0,l.jsx)(ro,{setActiveMethod:i}):(0,l.jsx)("div",{className:(0,w.$z)([io.tilesView,e&&io[e],`cms-cashier-${e||"tiles"}-view`]),children:a.map((e=>{const{code:n,name:a}=e;return(0,l.jsxs)(P.x,{onClick:()=>i(n),className:(0,w.$z)([io.tile,r&&io.withIcons,`cms-cashier-payment-method-tile-${n}`]),children:[(0,l.jsx)(S,{code:n,className:io.tileIcon}),(0,l.jsx)("span",{className:(0,w.$I)([io],["tileName","ellipsis"]),children:t(`method.${n}.title`,a)})]},n)}))})};var co=n(76276);const lo={accordionTitle:"AccordionView__accordionTitle--Uet",accordionIcon:"AccordionView__accordionIcon--15O",ellipsis:"AccordionView__ellipsis--1NP",accordionName:"AccordionView__accordionName--2Y3",accordionBodyContainer:"AccordionView__accordionBodyContainer--8G4"},uo=()=>{const e=(0,x.N)(),t=q(),{methods:n,activeMethod:a}=W(T()(["methods","activeMethod"])),o=(0,d.useCallback)((e=>{t(b(e||""))}),[t]);return(0,l.jsx)("div",{className:"cms-cashier-accordion-view",children:n.map((t=>{const{code:n,name:r}=t,i=(null==a?void 0:a.code)===n;return(0,l.jsx)(co.p,{id:n,tableRowId:n,classNames:lo,isExpanded:i,isIndependentMode:!1,expandItem:o,onAccordionExpand:o,headerCells:[{id:n,content:(0,l.jsxs)("div",{className:lo.accordionTitle,children:[(0,l.jsx)(S,{code:n,className:lo.accordionIcon}),(0,l.jsx)("span",{className:(0,w.$I)([lo],["accordionName","ellipsis"]),children:e(`method.${n}.title`,r)})]})}],bodyCells:[{id:n,content:(0,l.jsx)(to,{}),className:`cms-cashier-payment-method-accordion-body cms-cashier-payment-method-accordion-body-${n}`}]},n)}))})};var mo=n(5559);const vo={tab:"Tab__tab--3xK",tabContent:"Tab__tabContent--2LN",tabHighlight:"Tab__tabHighlight--3SU"},po=({tab:e,activeTab:t,classNames:n,onTabClick:a,activeTabRef:o,cmsClassPrefix:r})=>{const i=(0,d.useRef)(null);return(0,d.useEffect)((()=>{t===e.name&&o&&(o.current=i.current)})),(0,l.jsxs)(P.x,{elementRef:i,"data-active-tab-code":e.name,className:`${(0,w.$I)([vo,n],["tab"])} ${r||"cms"}-navigation-tab-${e.name}`,onClick:()=>a(e.name),children:[(0,l.jsx)("span",{className:vo.tabContent,children:e.content}),t===e.name&&(0,l.jsx)("span",{className:(0,w.$I)([vo,n],["tabHighlight"])})]})},ho={tabs:"NavigationTabs__tabs--1Iw",wrapper:"NavigationTabs__wrapper--YgP"},fo=({tabs:e,classNames:t,onTabClick:n=F.lQ,activeTab:a,cmsClassPrefix:o})=>{const r=(0,ke.d)(),i=(0,R.Z9)(c()("isDesktop")),s=(0,d.useRef)(!0),u=(0,d.useRef)(null),m=(0,d.useRef)(null),v=(0,d.useRef)(null);return(0,d.useEffect)((()=>{const t=s.current,n=e.findIndex((e=>e.name===a));if(a&&(t&&(s.current=!1),(null==v?void 0:v.current)&&(null==m?void 0:m.current)&&(null==u?void 0:u.current)&&-1!==n&&(!i||r))){const a=(0,mo.Jf)(m.current),{width:o}=u.current.getBoundingClientRect(),{width:s}=m.current.getBoundingClientRect(),c=parseFloat(getComputedStyle(u.current).marginLeft),l=m.current.firstChild,d=o*n+c*n+(a?l&&parseFloat(getComputedStyle(l).marginRight)||0:l&&parseFloat(getComputedStyle(l).marginLeft)||0),p=s/2-o/2,h=n!==e.length-1?d-p:d;(i&&r?v.current:m.current).scrollTo({behavior:t?"auto":"smooth",left:a?-h:h})}}),[a,i,r,e]),(0,l.jsx)("div",{ref:v,className:ho.wrapper,children:(0,l.jsx)("div",{ref:m,className:`${(0,w.$I)([ho,t],["tabs"])} ${o||"cms"}-navigation-tabs`,children:e.map((e=>(0,l.jsx)(po,{tab:e,activeTab:a,classNames:t,onTabClick:n,activeTabRef:u,cmsClassPrefix:o},e.name)))})})},yo={ellipsis:"NavigationTabsView__ellipsis--2MB",tabHighlight:"NavigationTabsView__tabHighlight--3bl",navigationTabsView:"NavigationTabsView__navigationTabsView--3Wb",tabs:"NavigationTabsView__tabs--3P_",tab:"NavigationTabsView__tab--FUQ",withIcons:"NavigationTabsView__withIcons--2gv",activeMethod:"NavigationTabsView__activeMethod--2Vx",navTab:"NavigationTabsView__navTab--9US",navTabIcon:"NavigationTabsView__navTabIcon--3bH"},bo=()=>{const e=q(),t=(0,x.N)(),n=(0,d.useRef)(null),{methods:a,activeMethod:o}=W(T()(["methods","activeMethod"])),{showPaymentMethodIcons:r,paymentMethodListView:i,autoScrollToTop:s,classToScroll:c}=(0,p.TP)(),u=mt(c),m=(0,I.e)(u?{current:u}:n),v=(0,d.useCallback)((t=>{(null==o?void 0:o.code)!==t&&e(b(t)),i===re.tF.LEFT_SIDE_MENU&&s&&m({behavior:"smooth"})}),[e,i,s,m,null==o?void 0:o.code]);(0,d.useEffect)((()=>{var t;(null==o?void 0:o.code)||e(b(null===(t=a[0])||void 0===t?void 0:t.code))}),[e,a,null==o?void 0:o.code]);const h=(0,d.useMemo)((()=>a.map((e=>({name:e.code,content:(0,l.jsxs)("div",{className:yo.navTab,children:[(0,l.jsx)(S,{code:e.code,className:yo.navTabIcon}),(0,l.jsx)("span",{className:(0,w.$I)([yo],["navTabName","ellipsis"]),children:t(`method.${e.code}
1.title`,e.name)})]})})))),[a,t]);return(0,l.jsxs)("div",{className:`${yo.navigationTabsView} cms-cashier-${i}-view`,children:[(0,l.jsx)(fo,{tabs:h,onTabClick:v,cmsClassPrefix:"cms-cashier",activeTab:null==o?void 0:o.code,classNames:{tabs:yo.tabs,tabHighlight:yo.tabHighlight,tab:(0,w.$z)([yo.tab,r&&yo.withIcons])}}),(0,l.jsx)(to,{className:yo.activeMethod,paymentFormRef:n})]})},Co=()=>{const e=(0,x.N)(),{showComponentMessage:t}=(0,j.z)(),{type:n,paymentMethodListView:a}=(0,p.TP)(),{isLoading:o,methods:r}=W(T()(["isLoading","methods"]));switch((0,d.useEffect)((()=>{o||r.length||t(e(`cashier-empty.${n}`))}),[o,r.length,t,e,n]),a){case re.tF.TILES:return(0,l.jsx)(so,{});case re.tF.ACCORDION:return(0,l.jsx)(uo,{});case re.tF.LIST:return(0,l.jsx)(so,{tilesType:"list"});case re.tF.SLIDER:case re.tF.LEFT_SIDE_MENU:return(0,l.jsx)(bo,{});default:return null}},go="Cashier__container--jr3",Eo="Cashier__loader--35I",_o=()=>{const{search:e}=(0,u.zy)(),{type:t}=(0,p.TP)(),n=q(),a=Q(),o=Pe(),r=W(c()("isLoading")),i=(0,d.useMemo)((()=>(0,m.MI)(e)),[e]);return ht(),(0,d.useEffect)((()=>{a()}),[a]),(0,d.useEffect)((()=>{if(r)return;o(i);const e=i.type;e&&n(b(e))}),[o,r,i,n]),(0,l.jsx)("div",{className:`${go} cms-cashier-${t}`,children:r?(0,l.jsx)(v.a,{className:Eo}):(0,l.jsx)(Co,{})})},No=({type:e,reducerName:t})=>(0,f.m)({isForLoggedIn:!0,tkPrefix:"playtech.mobile.system.mobile-cashier.",parseConfig:t=>Object.assign(Object.assign({},t),{type:e})})(G({reducerName:t})(_o)),To=No({type:h.v.DEPOSIT,reducerName:"Deposit"}),jo=No({type:h.v.WITHDRAWAL,reducerName:"Withdrawal"})}}; 2//# sourceMappingURL=cashier.76bccbf440a880df9336.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.