const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LiveChatAdviser-sk6MOq69.js","assets/index-CXyQ5sGC.js","assets/lodash-CQGrF3PQ.js","assets/index-D5c7CNr0.css","assets/ConnectButton-DhBw5pgh.js","assets/index-Vmx-EkLq.js","assets/index-FnRUSmLt.js","assets/walletConnect-CiycSUBb.js","assets/index-WG0D2_vB.js","assets/ConnectButton-BV4d8IVp.css","assets/PaymentMethodsInfoContainer-CrfRlXyc.css","assets/RedirectToRegisterViaWallet-CF1PEoye.js"])))=>i.map(i=>d[i]); import{M as Et,r as c,C as h,w as j,gJ as Re,i as F,P as B,gK as ts,gL as ss,R as ae,o as Ne,de as dt,s as ve,A as Nt,S as It,el as Rt,ga as ns,gM as as,au as rs,j as e,ct as vt,u as Ae,gN as os,ao as is,l as mt,v as re,gO as pt,gP as cs,gQ as ls,gR as us,bI as ds,b as ms,g as ps,cC as Te,_ as Se,gS as _t,cL as _s,q as hs,gb as gs,gc as fs,gd as se,gT as xs,gU as bs,T as Q,fG as ht,gk as ys,gV as Cs,gW as gt,gX as Es,L as Ns,ge as Is,gY as Rs,gm as vs,gf as As,gF as xe,dg as Ts,c as ft,eY as Ss,gj as ks,gg as Ps,gZ as js,g_ as xt,I as Ls,gi as Os,g$ as ws,gG as Ms,B as be,d as bt,h0 as Ds,cP as Fs,h1 as Bs,dP as Gs,gH as Vs,gI as Us}from"./index-CXyQ5sGC.js";import{Y as ye}from"./lodash-CQGrF3PQ.js";import{a as Ys,m as Qs,b as Ws,c as zs,d as Hs,I as qs}from"./InputTypeBankName--OWIb32w.js";import{u as Ks,I as Xs}from"./InputTypeCPF-DTCFlzSM.js";import{I as $s,D as Js}from"./InputTypeDatePicker-DcChxFXM.js";import{S as Zs}from"./StaticTypeSeparator-CNraK1Pp.js";import{U as en,S as tn}from"./UkRegulationElements-TbTIeQjP.js";const sn=(r,l)=>`${r}${l}`;var Ie=(r=>(r[r.IDIN=1]="IDIN",r[r.BlueM=2]="BlueM",r))(Ie||{});const Ce="transaction_data",nn="https://onboarding.vbet.nl/",an=r=>({first_name:r.FirstName,last_name:r.LastName,middle_name:r.Initials,address:r.Address.Street&&r.Address.HouseNumber?`${r.Address.Street} ${r.Address.HouseNumber}`:null,zip_code:r.Address.PostalCode,birth_date:r.BirthDate,country_code:r.Address.CountryCode&&h.app.availableCountriesList&&h.app.availableCountriesList.includes(r.Address.CountryCode)?r.Address.CountryCode:null,city:r.Address.City,gender:r.Gender?r.Gender==="MALE"?dt.Male:dt.Female:r.Gender,email:r.Email}),Ee=()=>ve.dispatchEvent("removeComponentPopup",{component:"AuthPopup",props:{popupContentType:Nt.Registration}}),rn=(r,l)=>{const{locale:m}=Et(),[g,f]=c.useState(!1),[T,L]=c.useState(!1),{netherLandLicense:x,netherlandRegistrationType:O}=h.app,G=j.getItem(Re),w=O??1,{EntranceCode:S,TransactionID:E}=j.getItem(Ce)||{},W=()=>{B.open({type:"error",title:"Error",content:It,onClose:Ee})};return c.useEffect(()=>{x&&!(S&&E)&&w===1&&F.get({},"get_idin_login_url").then(({details:k,result:M})=>{if(M===0){const{EntranceCode:N,TransactionID:R,TransactionURL:d}=k;j.setItem(Ce,{EntranceCode:N,TransactionID:R}),B.open(()=>({type:"info",title:ts,content:ss,onClose:Ee,buttons:[{label:"Yes",callBack:()=>{window.open(d,"_self")}},{label:"No",callBack:Ee}]}))}else throw new Error}).catch(W)},[x,S,E,T,w]),c.useEffect(()=>{x&&w===1&&F.get({transaction_id:E,entrance_code:S},"get_data_via_idin").then(({details:k,result:M})=>{M===0?(f(N=>!N),l(Object.fromEntries(Object.entries(an(k)).filter(([N,R])=>R&&N in r)))):(f(N=>!N),j.removeItem(Ce),L(N=>!N))})},[x]),c.useEffect(function(){x&&w===2&&F.get({},"get_bluem_token").then(({details:{Token:M},result:N})=>{if(N===0&&M){const R=`${nn}?${ae({titanToken:M,deviceType:Ne.isMobile?"Mobile":"Desktop",lang:m,...G&&{affiliateCode:G}})}`;window.open(R,"_self")}else throw new Error}).catch(()=>{W()})},[x,w,m,G]),x&&w===1?{isNetherlandLicense:x,registrationType:1,netherlandsDataLoaded:g,entrance_code:S,transaction_id:E}:{isNetherlandLicense:x,registrationType:2}},on=r=>{const{supported_currencies:l,child_client_default_currency:m,supports_child_client:g,reg_curns:f}=Rt();return c.useMemo(()=>f!=null&&f.length?f:g&&m?l.filter(T=>T!==m):l,[m,f,l,g])},cn=({formElements:r,setData:l})=>{const{value:m}=ns(),g=!!r.citizenship;c.useEffect(function(){m&&(l("country_code",m),g&&l("citizenship",m))},[g,m,l])},ln=({setData:r,setDataProp:l})=>{c.useEffect(()=>{const m=j.getItem(Re),g=j.getItem(as),{btagDataSetterForPromos:f}=h.userAuthentication.registration;g&&f==="promo_code"&&r("loyalty_code",g),m?r(f,m):l(f,"readOnly",!1)},[r,l])},un=({readOnly:r,...l})=>{const m=rs(),[{loading:g,data:f},T]=c.useState({loading:!0,data:[]});return c.useEffect(()=>{T({loading:!0,data:[]}),F.get({},"get_promo_codes").then(({result:L,details:x,result_text:O})=>{if(L===0)return x;throw new Error(O??"")}).then(L=>{if(m.current){const x=L.map(O=>({label:O.Description,value:O.Code}));T({loading:!1,data:x})}}).catch(()=>{m.current&&T({loading:!1,data:[]})})},[m]),e.jsx("div",{children:g?e.jsx(Ys,{}):e.jsx(vt,{options:f,readOnly:f.length===0||r,...l})})},dn=c.memo(un),mn=({totalSteps:r,currentStep:l})=>e.jsx("div",{className:"steps-indicator",children:new Array(r).fill(void 0).map((m,g)=>e.jsx("div",{className:`step-indicator ${l===g?"step-indicator-active":""}`},g))}),pn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAABL1BMVEUAAAD///////////////////////////////////////////////+rq6tChfQcOqkkQa0hP6xUkfatra1OjfX19fU+fezX5v3i5vS1tbU3UrSwsLCmqbCvr6/t7e2xsbH8/P1XkvYuSrGkqLDi4uK4ubn4+v1Bg/Lx8fHW1tbIyMjDw8O9vb20tLSnqq7m7/7m6fZgmfZHiPS5zPPv7+9Cge/M0uzH0Ove3t5bccE+WLezs7MnRK7y9//C2PyryfuZvvpuovdEhPDs7Ozo6Ojk5OSwu+G7yNygrduMm9TM3v2yzvv19viEsPh5qfhZlPZkmfOvxPCqwfCRsvB2n+3f5OzK1+vY3um/z+h7nua6w+Wst+Crtt/Z2dmTodaPntXByNTR0dFsf8hNZLxHYLreSXCvAAAADHRSTlMA/fPy2baba04cGm5J2ZqkAAACaElEQVRYw63YaVfaQBSA4bALjgFssLUkhEZAWVxQAQGX1rp23/e9/v/f4BgTZ5IL3EHv+80RnjPnDJdDRvNKpxLxKJuyaDyRSmtymWSE3bJIMiOcmRi7Q7EZ35lFtoNuatbbD+bgkrunTIzduViGQ0lGUJKfe4QCiqS1FCMppSVooIQWp4HiWpQGimqhhfX2vJyxedjpLDiD//9+fatNlMIQu2/o4Raybrn+9xoKQQlCPOf8BQ5BCUKcOhMv3AAQkCAk6vvvfzDAIPYeQHJO99p5mMegt8sQktvtuk4Wg7Y8B0BC6l05AIIOBmVzP7iDQOuHOg7xUOiJTgMd6DTQnjECMk7O+86U0GN9RI/4P8onF9NAtdCGPhg+xDvLq0PPA0znHZ8WAbGuowLBI1vecudOQKyXV4T2NmXoqzfBAmK/FaF92Xlz813gQ3wucAie2T7zpTZwMOiV5LyWpgY4GNSWoJdiGTgoNC9BB9BRh+RDexZ0NgY50O5YyDTNJXPpKtO0ijzLqhYYGoTW5sItAkcJwhx1CDoEEOIgEOasqEH3AtAfBtqxnqpDos9gP9YckFQg8yMLVBryxWJJHRKdMqlji68ICYfkqhX/1/N2g/8pJAyC2c165Xjnb0teKuGQWvY2BSQkHMJr4dDi6RruDFdQiM/FF1SygQMgd756iFTET82b00/mJGcV/xzdfK8WmuOdZo2hUEGac3vMdirI0ILKdXsEUy8zFIJUpRn4YFkNb/BwCFpH9UarOlyttho/j8psUmQPfmSPomQPx2SP62QXCFRXGmSXLFTXPlQXUVRXY6SXdWTXh5dIMReAck/CkAAAAABJRU5ErkJggg==",_n=c.memo(function(){const l=Ae();return e.jsx("div",{className:"entrance-f-item-bc entrance-f-recaptcha-bc",children:e.jsxs("div",{className:"u-i-p-control-item-holder-bc ",children:[e.jsx("img",{className:"recaptcha-img",src:pn,alt:""}),e.jsxs("div",{className:"form-control-title-static-bc",children:[e.jsx("a",{href:"https://policies.google.com/privacy",rel:"noopener noreferrer",target:"_blank",children:l("Privacy Policy")})," ",l("and")," ",e.jsx("a",{href:"https://policies.google.com/terms",rel:"noopener noreferrer",target:"_blank",children:l("Terms of Service")})," "]})]})})}),ne=({text:r,className:l})=>e.jsx("span",{className:l,dangerouslySetInnerHTML:{__html:r}}),hn=r=>{const l=Ae();return e.jsxs("div",{className:"checkbox-control-text-bc checkbox-control-text-content",children:[e.jsx(ne,{className:"terms-before-reg-btn-text",text:l(os,{minimumAllowedAge:is.getInstance().minimumAllowedAge})}),e.jsxs("p",{className:"checkbox-control-text-privacy",children:[e.jsx(mt,{to:{search:ae({...re(),[pt]:cs})},children:e.jsx(ne,{text:l("Privacy Policy")})}),e.jsx(ne,{text:l("and the"),className:"privacy-police-text"}),e.jsx(mt,{to:{search:ae({...re(),[pt]:ls})},children:e.jsx(ne,{text:l("General Terms and Conditions")})})]})]})},At=c.memo(hn),gn=r=>e.jsx(us,{...r,children:e.jsx(At,{secondary:r.name!=="agree"})}),fn=c.memo(gn),xn={contentId:"registration_banners",showLoader:!1},bn=({step:r})=>r===0?e.jsx(ds,{settings:xn}):null,yn=r=>{const l=ms(r),m=c.useCallback(g=>({personal_id:ps(g.personal_id)}),[]);return{...l,getPartnerSpecificRegistrationData:m}},Cn=Te(()=>Se(()=>import("./LiveChatAdviser-sk6MOq69.js"),__vite__mapDeps([0,1,2,3]))),En=Te(()=>Se(()=>import("./ConnectButton-DhBw5pgh.js"),__vite__mapDeps([4,1,2,3,5,6,7,8,9,10]))),Nn=Te(()=>Se(()=>import("./RedirectToRegisterViaWallet-CF1PEoye.js"),__vite__mapDeps([11,1,2,3,6]))),In=r=>r.result==="OK",Rn="-",yt="prefill_reg_form",Ct=()=>B.open({type:"warning",title:"Registration Warning",content:"email_exists_error_suggestion",hideCloseButton:!0,buttons:[{label:"Reset Password",callBack:()=>{ve.dispatchEvent("addComponentPopup",{component:"AuthPopup",props:{popupContentType:Nt.ForgetPassword}})}},{label:"Continue Registration"}]}),vn=7,An=31,Tn=({onFailure:r,onSucceed:l,contentManagerTargetType:m,additionalData:g,formConfig:f})=>{var We,ze,He,qe,Ke,Xe,$e,Je,Ze,et,tt,st;const{hideGoogleTermsAndConditions:T,setDefaultCurrencyValue:L,loginRightAfterRegistration:x,showSocialIcons:O}=h.userAuthentication.registration,{authPopupAsWidget:G}=(We=h)==null?void 0:We.userAuthentication,[w,S]=c.useState({key:"",error:"",refresh:!1,version:_t.DISABLED}),E=Ae(),{login:W}=c.useContext(_s),{language:k,languageRtl:M,timeFormat:N}=Et(),{currency:R,verificationChannelTypes:d,country_restrictions:V,country_restriction_type:z}=Rt(),oe=hs(),{hasSMSRestriction:ke,getSMSConfirmationCode:Pe}=gs(fs.Registration),{minDate:Tt,maxDate:St}=Ks(),[H,ie]=c.useState(""),[je,kt]=c.useState(!1),ce=c.useRef(null),le=c.useRef(null),{step:v,setData:b,setStep:Le,getData:Oe,setRules:P,resetData:Pt,totalSteps:U,showLoader:jt,formIsValid:we,setDataProp:Y,handleChange:y,formElements:o,setFieldError:p,setInitialData:Lt,showCurrentStepErrors:Me,formConfigForCurrentStep:De,disableRegistrationButton:Ot,getPartnerSpecificRegistrationData:Fe,getFirstErrorFieldNameForCurrentStep:wt}=yn(f),Mt=({formData:s,currency:n,language:t,emailNotRequired:u,additionalData:{code:a,reference_code:i}={}})=>{function I(Zt){const{GDPRCheckbox:jn,province:Ln,department:On,district:wn,account_id:Mn,account_type:Dn,bank_name:Fn,branch:Bn,...es}=Zt;return es}const{phone:_={},city:nt,currency_name:Kt,promo_code:he,loyalty_code:at,repeat_email:kn,affiliate_id:rt,repeat_password:Pn,salary_level:te,swift_code:ot,iban:it,telegram_id:ct,gender:lt,...ge}=I(s),fe=_!=null&&_.phoneCode&&(_!=null&&_.phoneNumber)?`${_.phoneCode}${_.phoneNumber}`:"",[Xt,$t]=(te==null?void 0:te.split(Rn))??[],ut=j.getItem(Re),{btagDataSetterForPromos:Jt}=h.userAuthentication.registration;return Ds({site_id:h.app.site_id,currency_name:Kt||n,language:t,lang_code:Fs[t],...ge,...fe&&{phone:fe},...!ge.username&&fe&&(!ge.email||u)&&{username:sn(_.phoneCode,_.phoneNumber)},...a!==void 0&&{bet_gift_code:a},...ut&&!he&&!(Jt in s)&&{promo_code:ut},...he&&{promo_code:he},...lt&&{gender:lt},...at&&{loyalty_code:at},...rt&&{affiliate_id:rt},...nt&&{city:nt},...i&&{reference_code:i},...ot&&{swift_code:ot},...it&&{iban:it},...Ne.utmParameters&&{utm_tag:Ne.utmParameters},...te&&{salary_min:Number(Xt),salary_max:Number($t)},...ct&&{telegram_id:ct},...Fe&&Fe(s)})},q=c.useRef((He=(ze=o.max_session_duration_daily)==null?void 0:ze.rules)==null?void 0:He.max),K=c.useRef((Ke=(qe=o.max_session_duration_weekly)==null?void 0:qe.rules)==null?void 0:Ke.max),{max_day_deposit:X,max_week_deposit:$,max_month_deposit:ue,max_session_duration_daily:Dt,max_session_duration_weekly:de,max_session_duration_monthly:D}=Oe();cn({setData:b,formElements:o}),ln({setData:b,setDataProp:Y});const{value:A=""}=o.country_code||{},{value:me,touched:pe}=o.currency_name||{},C=on(),J=c.useRef(),{entrance_code:Be,transaction_id:Ge,netherlandsDataLoaded:Ft,registrationType:Ve,isNetherlandLicense:Bt}=rn(o,Lt),Gt=ke()&&(d==null?void 0:d.length)>1||(d==null?void 0:d.length)<2&&d[0]===1,Vt=ke()&&(d==null?void 0:d.length)>1||(d==null?void 0:d.length)<2&&d[0]===2,Z=V==null?void 0:V.includes(((Xe=se[o.country_code.value])==null?void 0:Xe.backendCode)||0);c.useEffect(()=>{var n,t;const s=(t=(n=h.app)==null?void 0:n.ukLicense)==null?void 0:t.maxLimitsFromRegistration;"max_day_deposit"in o&&s&&P("max_day_deposit",{...o.max_day_deposit.rules,...Qs(X,$)}),"max_week_deposit"in o&&P("max_week_deposit",{...o.max_week_deposit.rules,...Ws(X,$,ue,vn,s)}),"max_month_deposit"in o&&P("max_month_deposit",{...o.max_month_deposit.rules,...zs(X,$,ue,An,s)})},[X,$,ue,P,E]),c.useEffect(()=>{var n,t;const s=Math.min(de,D);"max_session_duration_daily"in o&&("max_session_duration_weekly"in o&&!isNaN(de)||"max_session_duration_monthly"in o&&!isNaN(D))&&P("max_session_duration_daily",{...o.max_session_duration_daily.rules,max:{value:Math.min(s,((n=q.current)==null?void 0:n.value)??1/0),message:q.current&&q.current.value{var s,n,t,u,a;if(((t=(n=(s=o==null?void 0:o.personal_id)==null?void 0:s.rules)==null?void 0:n.method)==null?void 0:t.value)==="checkRomanianId"){const i=xs((u=o==null?void 0:o.personal_id)==null?void 0:u.value);i&&b("gender",i),b("birth_date",bs((a=o==null?void 0:o.personal_id)==null?void 0:a.value))}},[(Je=($e=o==null?void 0:o.personal_id)==null?void 0:$e.rules)==null?void 0:Je.method,(Ze=o==null?void 0:o.personal_id)==null?void 0:Ze.value,b]);const ee=c.useRef((tt=(et=o.phone)==null?void 0:et.value)==null?void 0:tt.phoneCode);c.useEffect(()=>{F.getSession().then(({recaptcha_version:s})=>{S(n=>({...n,version:s}))})},[]),c.useEffect(()=>{let s=!1;const n=Object.entries(re()),t=u=>u.includes(yt);n.forEach(([u,a])=>{if(t(u)){const i=u.replace(`${yt}_`,"");i in o&&(s=!0,b(i,a),Y(i,"readOnly",!0))}}),s&&oe.push({search:ae({...re(),...n.reduce((u,[a])=>(t(a)&&(u[a]=void 0),u),{})})})},[oe,b]),c.useEffect(()=>{me!==void 0&&pe!==void 0&&(J.current={touched:pe,value:me})},[pe,me]),c.useEffect(function(){C&&R&&Y("currency_name","options",C.map(n=>({value:n,label:n})))},[Y,C,R]),c.useEffect(function(){var n,t;if(C&&J.current&&L){const u=()=>C.find(ye(R))||C[0];if(C.length===1)b("currency_name",C[0],void 0,!1);else if(h.userAuthentication.registration.autoSetCurrency.enabled){if(!je){let a;const i=h.userAuthentication.registration.autoSetCurrency.availableList[A],I=(n=se[A])==null?void 0:n.currency;i&&(a=C.find(ye(i))),I&&(a??(a=C.find(ye(I)))),b("currency_name",a||u(),void 0,!1)}}else(!J.current.value||!C.includes((t=J.current)==null?void 0:t.value))&&b("currency_name",u(),void 0,!1)}},[A,R,b,C,L,je]),c.useEffect(()=>{var s;A&&!ee.current?b("phone",{phoneCode:se[A].code,phoneNumber:"",countryCode:A},"",!1):ee.current&&b("phone",{phoneCode:(s=se[ee.current])==null?void 0:s.code,phoneNumber:"",countryCode:ee.current},"",!1)},[A,b]),c.useEffect(()=>{Q.dispatchEvent("trackingEvent",{category:"Authorization",action:"Clicked Register"})},[]);const{redirectOnSuccessUrl:Ue}=h.userAuthentication.registration,Ut=c.useCallback(()=>{ht.getPopups(k,ys.AFTER_REGISTRATION).then(s=>{s.forEach(({content:n,title:t,href:u,target:a})=>{B.open({type:"info",title:t,content:n,...u&&{buttons:[{label:"OK",callBack:()=>{window.open(u,a)}}]}})})})},[k]),Yt=c.useCallback(()=>{const{lowBalancePopup:{popupLifetimeMinutes:s}}=h.app;j.setItem(Cs,!0,gt(s)),j.setItem(Es,!0,gt(s))},[]),Qt=(s,n,t)=>{const{email:u,first_name:a,username:i}=s;switch(Q.dispatchEvent("trackingEvent",{category:"Authorization",action:"Register",label:Gs,...!x&&{additionalData:{personalDetails:{email:u,name:a,username:i}}}}),n){case 1:B.open({type:"success",title:"Success",content:"registration_completed_need_email_verification"});break;case 2:B.open({type:"success",title:"Success",content:"registration_completed_need_phone_verification"});break;default:Wt(s,t)}Ut(),l&&l()},Wt=(s,n)=>{const t=()=>{if(Ue)return oe.push(Ue);if(Yt(),!h.userAuthentication.registration.disableRegistrationPopup)return ve.dispatchEvent("addComponentPopup",{component:"FirstLoginSuggestion",props:{}})};if(x&&n){const{username:u,email:a,phone:i,password:I}=s;W({username:u||a||i,password:I}).then(t)}else t()},_e=(s=wt())=>{if(ce.current&&s){const n=ce.current.elements.namedItem(s);if(n instanceof HTMLElement)n==null||n.scrollIntoView({block:"center",behavior:"smooth"});else if(n instanceof RadioNodeList&&n.length>0){const t=n[0];t&&t.parentNode instanceof Element&&t.parentNode.scrollIntoView({block:"center",behavior:"smooth"})}}},Ye=({result:s,details:{Key:n},regData:t})=>{var i;const u=Math.abs(parseInt(s,10));Q.dispatchEvent("trackingEvent",{category:"Authorization",action:"Register",label:`${Vs}. Code ${u}`}),r&&r();let a;switch(u){case 1013:p("password","Too short"),a="password";break;case 1012:p("phone","Incorrect phone number"),a="phoneNumber";break;case 1134:p("phone","Phone number already exists"),a="phoneNumber";break;case 1135:p("bank_name","Bank name already exists"),a="bank_name";break;case 1127:p("phone","Phone number already exists"),a="phoneNumber";break;case 1014:p("phone","Failed to send SMS"),a="phoneNumber";break;case 1118:(i=t.phone)!=null&&i.includes(t.username)?(p("phone","Phone number already exists"),a="phoneNumber"):o.username?(p("username","Username already exists"),a="username"):o.email&&(p("email","This email already exists in our database, please enter another"),Ct(),a="email");break;case 1119:p("email","This email already exists in our database, please enter another"),Ct(),a="email";break;case 1010:p("password","Password same as login"),a="password";break;case 1123:p("doc_number","This Document number already exists in our database, please enter another"),a="doc_number";break;case 21:break;case 1122:p("personal_id","duplicate"),a="personal_id";break;case 2074:p("password","sameAsLogin"),a="password",b("password2","");break;case 2442:ie("Your details match a self-excluded customer in our database. Please contact customer support."),S(_=>({..._,refresh:!_.refresh}));break;case 2467:ie("We cannot proceed with your request. Contact Customer Support for further information."),S(_=>({..._,refresh:!_.refresh}));break;case 2469:o.loyalty_code&&(p("loyalty_code",n),a="loyalty_code");break;case 2474:case 2476:case 2481:Pe({error:n,prefilledCode:t.confirmation_code,phone:t.phone,email:t.email,country:o.country_code.value}).then(_=>Qe({...t,..._}));break;case 2482:p("phone","invalid"),a="phoneNumber";break;case 2483:p("phone","blacklisted"),a="phoneNumber";break;case 2488:p("password","Password must not contain the first name"),a="password";break;case 2544:p("password","Password must not contain the username"),a="password";break;case 3036:const I="loyalty_code"in t?"loyalty_code":"promo_code";p(I,"The promotional code is intended for a different currency."),a=I;break;case 3115:Us.showLocationError(n??It);break;default:ie(n),S(_=>({..._,refresh:!_.refresh}))}a&&_e(a)},zt=()=>{if(we){const s=v+1;Q.dispatchEvent("trackingEvent",{category:"Authorization",action:"Register",label:"Step Passed",value:s}),Le(s)}else Me(),_e()},Qe=s=>F.get({user_info:s},"register_user").then(n=>{In(n)?Qt(s,n.details.active_verification_step,n.details.can_login):Ye({result:n.result,regData:s,details:n.details})}).catch(n=>{Ye({result:n.code,regData:s,details:{Key:(n==null?void 0:n.message)||Bs}})}),Ht=()=>{var s,n,t;if(Q.dispatchEvent("trackingEvent",{category:"Authorization",action:"Clicked Register Submit"}),we){const u=C.find(i=>i===R)??C[0],a=Mt({formData:Oe(),language:k,currency:u,emailNotRequired:!((n=(s=o.email)==null?void 0:s.rules)!=null&&n.required),additionalData:g});Pe({phone:a.phone,email:a.email,country:(t=o.country_code)==null?void 0:t.value}).then(i=>ht.getTermsConditionsVersion().then(I=>Qe({...a,...a.max_session_duration_daily&&{max_session_duration_daily:a.max_session_duration_daily*60},...a.max_session_duration_weekly&&{max_session_duration_weekly:a.max_session_duration_weekly*60},...a.max_session_duration_monthly&&{max_session_duration_monthly:a.max_session_duration_monthly*60},...Be&&Ge&&{bluem_service_integration_data:{entrance_code:Be,transaction_id:Ge}},...i,...I})))}else Me(),_e()},qt=(s,n,t)=>{y(s,n,t),n==="currency_name"&&kt(!0)};return c.useEffect(function(){H&&le.current&&le.current.scrollIntoView({behavior:"smooth"})},[H]),jt||Bt&&(Ve===Ie.BlueM||!Ft&&Ve===Ie.IDIN)?e.jsx(Ns,{}):e.jsx("div",{className:"reg-form-block-bc",children:e.jsxs("form",{ref:ce,className:`entrance-form-bc registration ${m===Is.PANEL?"panel":"popup"}`,id:Rs,children:[e.jsxs("div",{className:`entrance-form-content-bc ${De.length===1?"single-side":"double-sides"} step-${v}`,"data-scroll-lock-scrollable":"",children:[e.jsx(bn,{step:v}),e.jsxs("div",{className:"reg-form-content","data-scroll-lock-scrollable":"",children:[e.jsx("div",{className:"sg-n-text-row-1-bc",dangerouslySetInnerHTML:{__html:E("New member?")}}),e.jsx("div",{className:"sg-n-text-row-2-bc",dangerouslySetInnerHTML:{__html:E(vs)}}),U>1&&v>=0?e.jsxs("div",{className:"reg-step-title-v-bc",children:[E("Registration step")," ",v+1]}):null,e.jsx("div",{className:"reg-form-fields",children:De.map((s,n)=>e.jsx("div",{className:"entrance-form-content-section-bc",children:s.map(({name:t},u)=>{const{type:a,...i}=o[t];switch(a){case"text":return e.jsx("div",{className:"entrance-f-item-bc",children:e.jsx(ft,{onChange:y,...i})},t);case"phone":return e.jsxs(c.Fragment,{children:[e.jsx("div",{className:"entrance-f-item-bc",children:e.jsx(qs,{onChange:y,...i,countryCode:A})}),!Gt||V&&!(Z&&z===1||!Z&&z===0)?null:e.jsx("div",{className:"entrance-f-item-bc reg-phone-err-message",children:e.jsx(xe,{props:{html:!1,content:d.length<2&&d[0]===1?ws:d.length>1?xt:null}})})]},t);case"number":return e.jsx("div",{className:"entrance-f-item-bc",children:e.jsx(Os,{onChange:y,...i})},t);case"country":return e.jsx("div",{className:"entrance-f-item-bc",children:e.jsx(Ls,{onChange:y,...i,allCountries:t==="citizenship"})},t);case"multiPromoCode":return e.jsx("div",{className:"entrance-f-item-bc",children:e.jsx(dn,{onChange:y,...i})},t);case"bankName":return A?e.jsx("div",{className:"entrance-f-item-bc",children:e.jsx(Hs,{onChange:y,country_code:A,setRules:P,...i})},t):null;case"email":return e.jsxs(c.Fragment,{children:[e.jsx("div",{className:"entrance-f-item-bc",children:e.jsx(Ps,{onChange:y,...i})},t),!Vt||V&&!(Z&&z===1||!Z&&z===0)?null:e.jsx("div",{className:"entrance-f-item-bc",children:e.jsx(xe,{props:{html:!1,content:(d==null?void 0:d.length)<2&&d[0]===2?js:(d==null?void 0:d.length)>1?xt:null}})})]},t);case"cpf":return e.jsx("div",{className:"entrance-f-item-bc",children:e.jsx(Xs,{onChange:y,setData:b,setDataProp:Y,setFieldError:p,setRules:P,cpfField:o[t],resetData:Pt,...i})},t);case"password":return e.jsx("div",{className:"entrance-f-item-bc",children:e.jsx(ks,{onChange:y,...i})},t);case"checkbox":return e.jsx("div",{className:"entrance-f-item-bc",children:e.jsx(Ss,{onChange:y,...i})},t);case"agree":return e.jsx("div",{className:"entrance-f-item-bc",children:e.jsx(fn,{onChange:y,...i})},t);case"date":if(i.readOnly){const I=i.value?Ts({language:k,value:i.value,languageRtl:M,timeFormat:N}):"";return e.jsx("div",{className:"entrance-f-item-bc",children:e.jsxs("div",{className:"birthdate-datepicker",children:[e.jsx(ft,{onChange:y,...i,value:I}),e.jsx("i",{className:"dropdownIcon-bc bc-i-datepicker disabled"})]})},t)}return e.jsx("div",{className:"entrance-f-item-bc",children:e.jsx($s,{maxDate:St,minDate:Tt,onChange:y,type:Js.CALENDAR,popperPlace:s.length-4<0||u0&&e.jsx(be,{className:"btn a-outline",title:"Back",onClick:()=>Le(v-1)}),v{s.preventDefault(),zt()}}),v===U-1&&e.jsx(be,{className:"btn a-color",type:bt.SUBMIT,title:"Register",onClick:s=>{s.preventDefault(),Ht()},disabled:Ot})]}),h.app.walletConnect.enabled&&h.app.walletConnect.registration?e.jsxs(e.Fragment,{children:[e.jsx(En,{}),e.jsx(Nn,{onSucceed:l})]}):null,e.jsx(mn,{currentStep:v,totalSteps:U}),O?e.jsx(tn,{}):null,!G&&e.jsx(Cn,{})]})]})})},Sn=c.memo(Tn),Hn=Object.freeze(Object.defineProperty({__proto__:null,default:Sn},Symbol.toStringTag,{value:"Module"}));export{fn as I,Sn as R,cn as a,ln as b,Hn as c,on as u};