PageSourceSearch

https://cryptodao.com/static/js/1532.b16f3ff6.chunk.js

js cryptodao.com collected 2026-10-06 03:23:36 UTC 35,755 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkexzi=self.webpackChunkexzi||[]).push([[1532],{56622(e,t,i){i(65043);const a=i.p+"static/media/card.2ef39bc3c1a3be1571924ad55224438f.svg";i.d(t,["A",0,a])},68171(e,t,i){i(65043);const a=i.p+"static/media/confirmation.e546f2f6e100133c808a20d6c50c890f.svg";i.d(t,["A",0,a])},19784(e,t,i){i(65043);const a=i.p+"static/media/note.11aaa68ed85f6683d05ba1db893a71f2.svg";i.d(t,["A",0,a])},31532(e,t,i){i.r(t),i.d(t,{default:()=>ye});var a=i(5544),n=i(65043),o=i(91688),r=i(5137),s=i(74117),l=i(98139),d=i.n(l),c=i(89379),u=i(51200),f=i(23768),_=(i(37843),i(86287)),v=i(67170);const m={title:"Fio_title__uMK+v",text:"Fio_text__xQHDi",textWithIcon:"Fio_textWithIcon__LQAV+",list:"Fio_list__XsEjf",subtitle:"Fio_subtitle__2B+mP",info:"Fio_info__yrYMi",form:"Fio_form__Pkpgr",formContainer:"Fio_formContainer__eVsw9",formContainerEmail:"Fio_formContainerEmail__+J6Mf",dropdown:"Fio_dropdown__TDfYj",dropdownHead:"Fio_dropdownHead__ZVHhw",noOptionSelected:"Fio_noOptionSelected__kL5wE",red:"Fio_red__h+Qo6",textInput:"Fio_textInput__woX7h",error:"Fio_error__832HM",row:"Fio_row__yCdTx",field:"Fio_field__9Fe4X",emailBtn:"Fio_emailBtn__A4ucm",btns:"Fio_btns__3n5cw",button:"Fio_button__unMlC"};var h=i(4930),p=i(3179),y=i(55705),b=i(2374),x=i(62133),A=i(39855),j=i(99388),g=i(98836),k=i(54630),C=i(16405),N=i(70521),w=i(76442),S=i(54875),q=i(70579);const E="profile.verification.KYC.questionnaire";function F(e){if(""===e)return"";const t=e.split("-").map(Number),i=(0,a.A)(t,3),n=i[0],o=i[1],r=i[2];return new Date(n,o-1,r).getTime()/1e3}function D(e){if(""===e||null===e)return"";const t=new Date(1e3*e),i=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return"".concat(i,"-").concat(a,"-").concat(n)}const Y=e=>{var t,i,l,Y;let I=e.setExternalData,O=e.switchStep;const B=(0,r.wA)(),R=(0,s.Bd)().t,H=(0,o.useHistory)(),T=(0,r.d4)(e=>e.user.account_info),V=(0,r.d4)(e=>e.user.verification_data),K=(0,r.d4)(e=>e.user.questionnaire_settings),M=(0,r.d4)(e=>e.user.defaultLocation),Q=(0,r.d4)(e=>e.config.default_countries),L=(0,r.d4)(e=>e.user.onesignalHash),G=(0,n.useState)(!1),P=(0,a.A)(G,2),U=P[0],z=P[1],J=(0,n.useState)(!1),W=(0,a.A)(J,2),Z=W[0],X=W[1],$=(0,n.useMemo)(()=>{var e;return null!==(e=null===Q||void 0===Q?void 0:Q.map(e=>e.label.EN))&&void 0!==e?e:[]},[Q]);(0,n.useEffect)(()=>{B((0,C.A)()),B((0,A.A)()),B((0,j.Ay)()),B((0,k.A)())},[]),(0,n.useEffect)(()=>{T&&(L?_.A.init({appId:"1e7a46e9-ad60-48d0-ac59-e3d10fcf7df2",allowLocalhostAsSecureOrigin:!0}).finally(()=>{_.A.login(String(T.profile.id),L).then(()=>_.A.Slidedown.promptPush())}):B((0,S.A)()))},[JSON.stringify(T),L]);const ee=(0,u.useFormik)({initialValues:{country_of_residence:"",first_name:"",last_name:"",dob:""},validateOnMount:!1,validateOnChange:!1,validationSchema:v.Ik().shape({first_name:v.Yj().required(R("".concat(E,".validation.required"))),last_name:v.Yj().required(R("".concat(E,".validation.required"))),country_of_residence:v.Yj().required(R("".concat(E,".validation.required"))),dob:v.p6().required(R("".concat(E,".validation.required")))}),onSubmit:async e=>{if(!T.profile.email&&!ue)return void _e.setFieldError("email",R("".concat(E,".validation.confirmEmail")));_e.setFieldError("email",""),z(!0);let t=!0;for(const r in e){var i;const a=null===K||void 0===K?void 0:K.find(e=>e.key===r),n=null===a||void 0===a||null===(i=a.options)||void 0===i?void 0:i.find(t=>t.label.EN===e[r]),o=null===n||void 0===n?void 0:n.key;if((null!==o&&void 0!==o?o:e[r])!==V.verification[r]){t=!1;break}}if(_.A.login(String(T.profile.id),L),t)z(!1);else{var a,n,o;const t=(await w.A.post("/api/verification/my-qre",(0,c.A)((0,c.A)({},K.reduce((e,t)=>{var i;if(null!==t&&void 0!==t&&null!==(i=t.options)&&void 0!==i&&i.length){var a,n,o;const i=null!==(a=null===t||void 0===t||null===(n=t.options)||void 0===n||null===(o=n.find(e=>e.label.EN===V.verification[t.key]))||void 0===o?void 0:o.key)&&void 0!==a?a:V.verification[t.key];if(e=(0,c.A)((0,c.A)({},e),{},{[t.key]:null!=i?String(i):null}),null!==t&&void 0!==t&&t.field_for_other_variant){const i=V.verification[t.field_for_other_variant];e=(0,c.A)((0,c.A)({},e),{},{[t.field_for_other_variant]:i&&"undefined"!==i?String(i):null})}}else e=(0,c.A)((0,c.A)({},e),{}
1,{[t.key]:String(V.verification[t.key])});return e},{})),{},{country_of_residence:null===K||void 0===K||null===(a=K.find(e=>"country_of_residence"===e.key))||void 0===a||null===(n=a.options)||void 0===n||null===(o=n.find(t=>t.label.EN===e.country_of_residence))||void 0===o?void 0:o.key,first_name:e.first_name,last_name:e.last_name,dob:String(F(e.dob))}))).data;t.status?(sessionStorage.setItem("qreId",t.data.qre.id),setTimeout(()=>{O("questionnaire"),H.push("/verification/questionnaire"),z(!1)},2200)):(f.oR.error(Object.values(t.errors)[0]),t.data.data_external.external_user_id&&(I({id:t.data.data_external.external_user_id,url:t.data.data_external.external_ui_url}),O("documents"),H.push("/verification/documents")),z(!1))}}});(0,n.useEffect)(()=>{var e,t,i,a,n,o,r,s,l,d;V&&K&&ee.setValues({first_name:null!==(e=null===V||void 0===V||null===(t=V.verification)||void 0===t?void 0:t.first_name)&&void 0!==e?e:"",last_name:null!==(i=null===V||void 0===V||null===(a=V.verification)||void 0===a?void 0:a.last_name)&&void 0!==i?i:"",dob:null!==(n=D(null===V||void 0===V||null===(o=V.verification)||void 0===o?void 0:o.dob))&&void 0!==n?n:""});T&&(ee.setFieldValue("country_of_residence",null!==(r=null===K||void 0===K||null===(s=K.find(e=>"country_of_residence"===e.key))||void 0===s||null===(l=s.options)||void 0===l||null===(d=l.find(e=>e.key===T.profile.country_of_residence))||void 0===d?void 0:d.label.EN)&&void 0!==r?r:""),T.profile.email&&_e.setFieldValue("email",T.profile.email))},[T,V,K]),(0,n.useEffect)(()=>{T&&(T.profile.country_of_residence||B((0,g.A)()))},[T]),(0,n.useEffect)(()=>{V&&X(6===V.verification.status)},[V]),(0,n.useEffect)(()=>{var e,t;T&&M&&null!==K&&void 0!==K&&K.length&&(T.profile.country_of_residence||ee.setFieldValue("country_of_residence",null!==(e=null===(t=K.find(e=>"country_of_residence"===e.key).options.find(e=>e.key===M.country))||void 0===t?void 0:t.label.EN)&&void 0!==e?e:""))},[T,M,K]);const te=(0,n.useState)(null),ie=(0,a.A)(te,2),ae=ie[0],ne=ie[1],oe=(0,n.useState)(!1),re=(0,a.A)(oe,2),se=re[0],le=re[1],de=(0,n.useState)(!1),ce=(0,a.A)(de,2),ue=ce[0],fe=ce[1],_e=(0,u.useFormik)({initialValues:{email:""},validateOnMount:!1,validateOnChange:!1,validationSchema:v.Ik().shape({email:v.Yj().required(R("".concat(E,".validation.required"))).email(R("".concat(E,".validation.email")))}),onSubmit:async e=>{const t=await(0,N.c)("/api/account/set-email",{email_new:e.email}),i=t.data,a=t.status,n=t.required,o=t.toastSendCode;var r,s,l;a?(ne(n),le(!0)):"User already exists"===(null===i||void 0===i||null===(r=i.data)||void 0===r||null===(s=r.errors)||void 0===s||null===(l=s.email)||void 0===l?void 0:l[0])&&f.oR.error("".concat(R("toast.error"),": ").concat(R("toast.errorCode.emailAlreadyInUse")),{id:o})}});return V?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)("form",{onSubmit:_e.handleSubmit,className:m.form,children:(0,q.jsxs)("div",{className:m.formContainerEmail,children:[(0,q.jsx)(p.A,{className:m.field,label:R("".concat(E,".form.email")),name:"email",type:"text",value:_e.values.email,placeholder:R("".concat(E,".form.email")),autoComplete:"off",onChange:_e.handleChange,error:_e.errors.email,disabled:T.profile.email||ue}),!(T.profile.email||ue)&&(0,q.jsx)("button",{className:d()("button",m.emailBtn),type:"submit",children:R("".concat(E,".form.emailBtn"))})]})}),(0,q.jsxs)("form",{onSubmit:ee.handleSubmit,className:m.form,children:[(0,q.jsxs)("div",{className:m.formContainer,children:[(0,q.jsx)("div",{children:(0,q.jsx)(y.A,{addSearchBar:!0,classDropdownHead:d()(ee.errors.country_of_residence?m.red:null,m.dropdownHead),classDropdownBody:m.dropdownBody,classDropdownOption:m.dropdownOption,label:R("".concat(E,".form.countryOfResidence")),note:R("".concat(E,".note.countryOfResidence")),value:null!==(t=ee.values.country_of_residence)&&void 0!==t?t:"",setValue:e=>ee.setValues(t=>(0,c.A)((0,c.A)({},t),{},{country_of_residence:e})),options:$,error:ee.errors.country_of_residence,disabled:Z})}),(0,q.jsxs)("div",{className:m.row,children:[(0,q.jsx)(p.A,{className:m.field,label:R("".concat(E,".form.firstName")),name:"first_name",type:"text",value:ee.values.first_name,placeholder:R("".concat(E,".form.firstName")),autoComplete:"off",onChange:ee.handleChange,error:null!==(i=ee.errors.first_name)&&void 0!==i?i:"",disabled:Z}),(0,q.jsx)(p.A,{className:m.field,label:R("".concat(E,".form.lastName")),name:"last_name",type:"text",value:ee.values.last_name,placeholder:R("".concat(E,".form.lastName")),autoComplete:"off",onChange:ee.handleChange,error:null!==(l=ee.errors.last_name)&&void 0!==l?l:"",disabled:Z})]}),(0,q.jsx)(p.A,{className:m.field,label:R("".concat(E,".form.dob")),name:"dob",type:"date",value:ee.values.dob,note:R("".concat(E,".note.dob")),autoComplete:"off",onChange:ee.handleChange,error:null!==(Y=ee.errors.dob)&&void 0!==Y?Y:"",disabled:Z})]}),(0,q.jsx)("div",{className:m.btns,children:(0,q.jsx)("button",{className:d()("button",m.button),type:"submit",disabled:U,children:U?(0,q.jsx)(h.A,{}):R("".concat("profile.verification.KYC",".buttonNext"))})})]}),(0,q.jsx)(b.A,{visible:se,disableGoBackButton:!0,onClose:()=>le(!1),children:(0,q.jsx)(x.A,{requestUrl:"/api/account/set-email",requiredFields:ae,requestData:{email_new:_e.values.email},onSuccess:()=>{le(!1),fe(!0),_e.setFieldError("email",""),setTimeout(()=>{B((0,j.Ay)())},3e3)}})})]}):(0,q.jsx)(q.Fragment,{children:(0,q.jsx)(h.A,{})})};var I=i(20831);const O="Questionnaire_title__T-Ao2",B="Questionnaire_pepHintText__rcZTF",R="Questionnaire_info__JucWD",H="Questionnaire_form__TRDWI",T="Questionnaire_dropdown__Plagq",V="Questionnaire_dropdownHead__Hl41y",K="Questionnaire_noOptionSelected__b3L+D",M="Questionnaire_red__ZAkcu",Q="Questionnaire_textInput__0QikD",L="Questionnaire_btns__3Rcug",G="Questionnaire_button__4NYz6",P="Questionnaire_otherInput__mIWT4";const U=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{(0,w.A)({url:"/api/verification/my-qre?id=".concat(e),method:"GET"}).then(e=>e.data).then(e=>t({type:"FETCH_VERIFICATION_MY_QRE_PROFILE",payload:e})).catch(()=>{})}},z="profile.verification.KYC",J="profile.verification.KYC.questionnaire";function W(e){if(""===e)return"";const t=e.split("-").map(Number),i=(0,a.A)(t,3),n=i[0],o=i[1],r=i[2];return new Date(n,o-1,r).getTime()/1e3}function Z(e){if(""===e||null===e)return"";const t=new Date(1e3*e),i=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return"".concat(i,"-").concat(a,"-").concat(n)}const X=e=>{let t=e.setExternalData,i=e.switchStep,l=e.submitRequest;const _=(0,r.wA)(),m=(0,s.Bd)().t,b=(0,o.useHistory)(),x=(0,r.d4)(e=>e.user.account_info),A=(0,r.d4)(e=>e.user.verification_qre_data),C=(0,r.d4)(e=>e.user.questionnaire_settings),N=(0,r.d4)(e=>
1e.user.defaultLocation),S=(0,n.useState)(!1),E=(0,a.A)(S,2),F=E[0],D=E[1],Y=(0,n.useState)(!1),X=(0,a.A)(Y,2),$=X[0],ee=X[1];(0,n.useEffect)(()=>{if(C){const e=C.findIndex(e=>"dob"===e.key);-1!==e&&(null===C||void 0===C||C.splice(e,1))}},[C]);const te=(0,u.useFormik)({initialValues:(0,c.A)({},null===C||void 0===C?void 0:C.reduce((e,t)=>(e[t.key]="",e),{})),validateOnMount:!1,validateOnChange:!1,validationSchema:v.Ik().shape((0,c.A)({},null===C||void 0===C?void 0:C.reduce((e,t)=>(e[t.key]=v.Yj().required(m("".concat(J,".validation.required"))),null!==t&&void 0!==t&&t.field_for_other_variant&&(e[t.field_for_other_variant]=v.RZ(e=>"Other"===te.values[t.key]?v.Yj().required(m("".concat(J,".validation.required"))):v.Yj())),e),{}))),onSubmit:async e=>{let a=!0;for(const t in e){var n;const i=null===C||void 0===C?void 0:C.find(e=>e.key===t),o=null===i||void 0===i||null===(n=i.options)||void 0===n?void 0:n.find(i=>i.label.EN===e[t]),r=null===o||void 0===o?void 0:o.key;if((null!==r&&void 0!==r?r:e[t])!==A.qre[t]){a=!1;break}}if(a){var o,r;if(null!==A&&void 0!==A&&null!==(o=A.data_external)&&void 0!==o&&o.external_user_id)t({id:null===A||void 0===A||null===(r=A.data_external)||void 0===r?void 0:r.external_user_id,url:A.data_external.external_ui_url}),i("documents")}else{ee(!0);const t=(await w.A.post("/api/verification/my-qre?id=".concat(A.qre.id),(0,c.A)((0,c.A)({},C.reduce((t,i)=>{var a;if(null!==i&&void 0!==i&&null!==(a=i.options)&&void 0!==a&&a.length){var n,o,r;const a=null!==(n=null===i||void 0===i||null===(o=i.options)||void 0===o||null===(r=o.find(t=>t.label.EN===e[i.key]))||void 0===r?void 0:r.key)&&void 0!==n?n:e[i.key];if(t=(0,c.A)((0,c.A)({},t),{},{[i.key]:null!=a?String(a):null}),null!==i&&void 0!==i&&i.field_for_other_variant){const a=e[i.field_for_other_variant];t=(0,c.A)((0,c.A)({},t),{},{[i.field_for_other_variant]:a&&"undefined"!==a?String(a):null})}}else t="date"===i.options_type?(0,c.A)((0,c.A)({},t),{},{[i.key]:W(e[i.key])}):(0,c.A)((0,c.A)({},t),{},{[i.key]:String(e[i.key])});return t},{})),{},{first_name:A.qre.first_name,middle_name:A.qre.middle_name,last_name:A.qre.last_name,dob:A.qre.dob,save_as_last_step:1}))).data;var s;if(t.status||!t.status&&Object.keys(t.data).length>0&&0===t.data.qre.is_qre_editable_by_user)t.status||f.oR.error("".concat(m("toast.error"),": ").concat(Object.values(t.errors)[0])),setTimeout(async()=>{2===t.data.verification_in_progress_subtype?(i("address"),b.push("/verification/address")):await l()},3e3);else f.oR.error(null!==(s="".concat(m("toast.error"),": ").concat(Object.values(t.errors)[0]))&&void 0!==s?s:m("toast.errorCode.unknown")),ee(!1);ee(!1)}}});return(0,n.useEffect)(()=>{const e=sessionStorage.getItem("qreId")||null;_(U(e)),_((0,g.A)()),_((0,j.Ay)()),_((0,k.A)())},[]),(0,n.useEffect)(()=>{A&&D(6===A.verification.status)},[A]),(0,n.useEffect)(()=>{if(A&&C)for(const r in C){const i=C[r],a=A.qre[i.key];var e,t;if(i.options)if("date"===i.options_type)te.setFieldValue(i.key,Z(a));else te.setFieldValue(i.key,null!==(e=null===(t=i.options.find(e=>String(e.key)===String(a)))||void 0===t?void 0:t.label.EN)&&void 0!==e?e:"");else te.setFieldValue(i.key,null!==a&&void 0!==a?a:"")}var i,a,n,o;x&&te.setFieldValue("country_of_residence",null!==(i=null===C||void 0===C||null===(a=C.find(e=>"country_of_residence"===e.key))||void 0===a||null===(n=a.options)||void 0===n||null===(o=n.find(e=>e.key===x.profile.country_of_residence))||void 0===o?void 0:o.label.EN)&&void 0!==i?i:"")},[x,A,C]),(0,n.useEffect)(()=>{if(x&&A&&N&&null!==C&&void 0!==C&&C.length){var e,t,i,a,n;if(!x.profile.country_of_residence)te.setFieldValue("country_of_residence",null!==(t=null===(i=C.find(e=>"country_of_residence"===e.key).options.find(e=>e.key===N.country))||void 0===i?void 0:i.label.EN)&&void 0!==t?t:"");if(null===A||void 0===A||null===(e=A.qre)||void 0===e||!e.country_of_citizenship)te.setFieldValue("country_of_citizenship",null!==(a=null===(n=C.find(e=>"country_of_citizenship"===e.key).options.find(e=>e.key===N.country))||void 0===n?void 0:n.label.EN)&&void 0!==a?a:"")}},[x,A,N,C]),A&&C?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)("div",{className:d()("h4",O),children:m("".concat(J,".title"))}),(0,q.jsx)("div",{className:R,children:m("".concat(J,".info"))}),(0,q.jsxs)("form",{onSubmit:te.handleSubmit,className:H,children:[(0,q.jsx)(I.FocusError,{formik:te}),C.map((e,t)=>{var i,a,n;return null!==e&&void 0!==e&&null!==(i=e.options)&&void 0!==i&&i.length?(0,q.jsxs)("div",{children:[(0,q.jsx)(y.A,{addSearchBar:"country_of_residence"===e.key||"country_of_citizenship"===e.key,id:e.key,name:e.key,type:"text",className:T,classDropdownHead:d()(V,!te.values[e.key]&&K),label:e.label.EN,labelHint:"pep"===e.key&&(0,q.
1jsxs)("div",{className:B,children:[(0,q.jsx)("p",{children:"A politically Exposed Person (PEP) refers to individuals who have held or currently hold prominent public positions or public office. "}),(0,q.jsx)("br",{}),(0,q.jsx)("p",{children:"Please take a look at what is considered as prominent public positions and indicate if you are a politically exposed person:"}),(0,q.jsx)("br",{}),(0,q.jsxs)("ul",{children:[(0,q.jsx)("li",{children:" Heads of State, heads of government, ministers, vice-ministers or deputy ministers, secretaries of State and chancellors of parliament, government or ministry;"}),(0,q.jsx)("li",{children:"Members of parliament;"}),(0,q.jsx)("li",{children:"Members of supreme courts, of constitutional courts or of other high-level judicial bodies whose decisions are not subject to further appeal;"}),(0,q.jsx)("li",{children:"Mayors of municipalities, directors of municipal administrations;"}),(0,q.jsx)("li",{children:"Members of the management bodies of national supreme audit and control institutions or chairs of the boards of central banks, deputy chairs or board members;"}),(0,q.jsx)("li",{children:"Ambassadors, charg\xe9s d'affaires, the Chief of Defence of the Republic of Lithuania, commanders of military forces and units, the Chief of the Defence Staff, high-ranking officers in the armed forces of foreign states;"}),(0,q.jsx)("li",{children:"Members of the management or supervisory bodies of state enterprises, public limited liability companies and private limited liability companies whose shares or a part of shares carrying more than \xbd of all the votes at the general meeting of shareholders of these companies are held by the right of ownership by the State;"}),(0,q.jsx)("li",{children:"Members of the management or supervisory bodies of municipal enterprises, public limited liability companies and private limited liability companies whose shares or a part of shares carrying more than \xbd of all the votes at the general meeting of shareholders of these companies are held by the right of ownership by municipalities and which are considered to be large undertakings under the Law of the Republic of Lithuania on Financial Reporting by Undertakings;"}),(0,q.jsx)("li",{children:"Heads and deputy heads of international intergovernmental organisations and members of their management or supervisory bodies;"}),(0,q.jsx)("li",{children:"Heads and deputy heads of political parties and members of their management bodies."})]})]}),setValue:t=>{te.setFieldValue(e.key,t)},value:te.values[e.key],options:e.options.map(e=>e.label.EN),error:te.errors[e.key],disabled:F}),(null===e||void 0===e?void 0:e.field_for_other_variant)&&"Other"===te.values[null===e||void 0===e?void 0:e.key]&&(0,q.jsx)(p.A,{id:null===e||void 0===e?void 0:e.field_for_other_variant,classInput:d()(Q,P,te.errors[null===e||void 0===e?void 0:e.field_for_other_variant]&&M),name:null===e||void 0===e?void 0:e.field_for_other_variant,type:"date"===(null===e||void 0===e?void 0:e.options_type)?"date":"text",placeholder:m("".concat(J,".form.customValue")),onChange:te.handleChange,value:null!==(a=te.values[null===e||void 0===e?void 0:e.field_for_other_variant])&&void 0!==a?a:"",error:te.errors[null===e||void 0===e?void 0:e.field_for_other_variant],disabled:F})]},t):(0,q.jsx)("div",{children:(0,q.jsx)(p.A,{id:e.key,classInput:d()(Q,te.errors[e.key]&&M),name:e.key,type:"date"===(null===e||void 0===e?void 0:e.options_type)?"date":"text",label:e.label.EN,onChange:te.handleChange,value:null!==(n=te.values[e.key])&&void 0!==n?n:"",error:te.errors[e.key],disabled:F})},t)}),(0,q.jsxs)("div",{className:L,children:[(0,q.jsx)("button",{className:d()("button button-stroke",G),type:"button",onClick:()=>{i("fio"),b.push("/verification/fio")},disabled:$,children:$?(0,q.jsx)(h.A,{}):m("".concat(z,".buttonBack"))}),(0,q.jsx)("button",{className:d()("button",G),type:"submit",disabled:$,children:$?(0,q.jsx)(h.A,{}):m("".concat(z,".buttonNext"))})]})]})]}):(0,q.jsx)(q.Fragment,{children:(0,q.jsx)(h.A,{})})};var $=i(62582);const ee="Confirmation_box__l8YDM",te="Confirmation_result__bzv+Y",ie="Confirmation_info__c8nfw",ae="Confirmation_buttonLink__9y5TD",ne="profile.verification.KYC.confirmation",oe=()=>{const e=(0,o.useParams)().step,t=(0,s.Bd)().t;return(0,q.jsxs)(q.Fragment,{children:["success"===e&&(0,q.jsxs)("div",{className:ee,children:[(0,q.jsx)("div",{className:te,children:t("".concat(ne,".success"))}),(0,q.jsx)("div",{className:ie,children:t("".concat(ne,".successInfo"))}),(0,q.jsx)($.N_,{to:"/verification",className:d()("button-green",ae),children:t("".concat(ne,".done"))})]}),"fail"===e&&(0,q.jsxs)("div",{className:ee,children:[(0,q.jsx)("div",{className:te,children:t("".concat(ne,".fail"))}),(0,q.jsx)("div",{className:ie,children:t("".concat(ne,".failInfo"))}),(0,q.jsx)($.N_,{to:"/verification",className:d()("button-green",ae),children:t("".concat(ne,".done"))})]})]})};i(85721);var re=i(3868),se=i(21914),le=i.n(se);const de="profile.verification.KYC",ce="profile.verification.KYC.address",ue=e=>{var t,i,l,_,m,x;let g=e.setExternalData,k=e.switchStep,N=e.submitRequest;const S=(0,r.wA)(),E=(0,s.Bd)().t,F=((0,o.useRouteMatch)().path,(0,o.useHistory)()),D=(0,r.d4)(e=>e.user.account_info),Y=(0,r.d4)(e=>
1e.user.verification_data),I=(0,n.useState)(!0),O=(0,a.A)(I,2),B=O[0],R=O[1],H=(0,n.useState)(!1),T=(0,a.A)(H,2),V=T[0],K=T[1],M=(0,r.d4)(e=>e.config.default_countries),Q=null!==(t=null===M||void 0===M?void 0:M.map(e=>e.label.EN))&&void 0!==t?t:[],L=(0,n.useState)(!1),G=(0,a.A)(L,2),P=G[0],U=G[1];(0,n.useEffect)(()=>{S((0,A.A)()),S((0,j.Ay)()),S((0,C.A)())},[]),(0,n.useEffect)(()=>{Y&&U(6===Y.verification.status)},[Y]);const z=(0,u.useFormik)({initialValues:{country:"",state:"",city:"",street:"",post_code:""},validateOnMount:!1,validateOnChange:!1,validationSchema:v.Ik().shape({country:v.Yj().required(E("".concat(ce,".validation.required"))),state:v.Yj(),city:v.Yj().required(E("".concat(ce,".validation.required"))),street:v.Yj().required(E("".concat(ce,".validation.required"))),post_code:v.Yj().required(E("".concat(ce,".validation.required")))}),onSubmit:async e=>{var t;K(!0);const i=await w.A.post("/api/verification/address",{physical:{country:null===M||void 0===M||null===(t=M.find(t=>t.label.EN===e.country))||void 0===t?void 0:t.key,state:e.state,city:e.city,street:e.street,post_code:e.post_code}}),a=i.data;le().event.push("poa_page_submitted",{userId:D.profile.id}),a.status?await N():(f.oR.error(Object.values(a.errors)[0]),i.data.data.data_external.external_user_id&&(g({id:i.data.data.data_external.external_user_id,url:i.data.data.data_external.external_ui_url}),k("documents"),F.push("/verification/documents"))),K(!1)}});return(0,n.useEffect)(()=>{var e,t,i,a,n,o,r,s,l,d,c,u,f,_,v,m;Y&&null!==D&&void 0!==D&&null!==(e=D.profile)&&void 0!==e&&e.country_of_residence&&(z.setFieldValue("country",null===M||void 0===M||null===(t=M.find(e=>{var t;return e.key===(null===D||void 0===D||null===(t=D.profile)||void 0===t?void 0:t.country_of_residence)}))||void 0===t?void 0:t.label.EN),Y.address.physical&&z.setValues({country:null!==(i=null===M||void 0===M||null===(a=M.find(e=>{var t;return e.key===(null===D||void 0===D||null===(t=D.profile)||void 0===t?void 0:t.country_of_residence)}))||void 0===a?void 0:a.label.EN)&&void 0!==i?i:"",state:null!==(n=null===Y||void 0===Y||null===(o=Y.address)||void 0===o||null===(r=o.physical)||void 0===r?void 0:r.state)&&void 0!==n?n:"",city:null!==(s=null===Y||void 0===Y||null===(l=Y.address)||void 0===l||null===(d=l.physical)||void 0===d?void 0:d.city)&&void 0!==s?s:"",street:null!==(c=null===Y||void 0===Y||null===(u=Y.address)||void 0===u||null===(f=u.physical)||void 0===f?void 0:f.street)&&void 0!==c?c:"",post_code:null!==(_=null===Y||void 0===Y||null===(v=Y.address)||void 0===v||null===(m=v.physical)||void 0===m?void 0:m.post_code)&&void 0!==_?_:""}))},[Y,D]),Y?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)("div",{className:re.A.head,children:[(0,q.jsx)("div",{className:d()("h4",re.A.title),children:E("".concat(ce,".title"))}),(0,q.jsx)("div",{className:d()(re.A.hint),onClick:()=>R(!0),children:"?"})]}),(0,q.jsx)("div",{className:d()(re.A.text),children:E("".concat(ce,".info"))}),(0,q.jsxs)("form",{onSubmit:z.handleSubmit,className:re.A.form,children:[(0,q.jsx)("div",{children:(0,q.jsx)(y.A,{addSearchBar:!0,classDropdownHead:d()(z.errors.country?re.A.red:null,re.A.dropdownHead),classDropdownBody:re.A.dropdownBody,classDropdownOption:re.A.dropdownOption,label:E("".concat(ce,".form.country")),value:null!==(i=z.values.country)&&void 0!==i?i:E("".concat(ce,".form.selectCountry")),setValue:e=>z.setValues(t=>(0,c.A)((0,c.A)({},t),{},{country:e})),options:Q,error:z.errors.country,disabled:P})}),(0,q.jsx)(p.A,{className:re.A.field,label:E("".concat(ce,".form.street")),name:"street",type:"text",value:z.values.street,placeholder:E("".concat(ce,".form.street")),autoComplete:"off",onChange:z.handleChange,error:null!==(l=z.errors.street)&&void 0!==l?l:"",disabled:P}),(0,q.jsxs)("div",{className:re.A.row,children:[(0,q.jsx)(p.A,{className:re.A.field,label:E("".concat(ce,".form.city")),name:"city",type:"text",value:z.values.city,placeholder:E("".concat(ce,".form.city")),autoComplete:"off",onChange:z.handleChange,error:null!==(_=z.errors.city)&&void 0!==_?_:"",disabled:P}),(0,q.jsx)(p.A,{className:re.A.field,label:E("".concat(ce,".form.postCode")),name:"post_code",type:"text",value:z.values.post_code,autoComplete:"off",onChange:z.handleChange,error:null!==(m=z.errors.post_code)&&void 0!==m?m:"",disabled:P})]}),(0,q.jsx)(p.A,{className:re.A.field,label:E("".concat(ce,".form.state")),name:"state",type:"text",value:z.values.state,placeholder:E("".concat(ce,".form.state")),autoComplete:"off",onChange:z.handleChange,error:null!==(x=z.errors.state)&&void 0!==x?x:"",disabled:P}),(0,q.jsxs)("div",{className:re.A.btns,children:[(0,q.jsx)("button",{className:d()("button button-stroke",re.A.button),type:"button",onClick:()=>{k("questionnaire"),F.push("/verification/questionnaire")},disabled:V,children:V?(0,q.jsx)(h.A,{}):E("".concat(de,".buttonBack"))}),(0,q.jsx)("button",{className:d()("button",re.A.button),type:"submit",disabled:V,children:V?(0,q.jsx)(h.A,{}):E("".concat(de,".buttonNext"))})]})]}),(0,q.jsx)(b.A,{disableGoBackButton:!0,visible:B,title:E("Notification"),onClose:()=>{R(!1)},children:(0,q.jsxs)("div",{className:re.A.message,children:[(0,q.jsx)("h4",{children:E("".concat(ce,".requirements.title"))}),(0,q.jsx)("p",{children:E("".concat(ce,".requirements.list1.text"))}),(0,q.jsxs)("ul",{children:[(0,q.jsx)("li",{children:E("".concat(ce,".requirements.list1.1"))}),(0,q.jsx)("li",{children:E("".concat(ce,".requirements.list1.2"))}),(0,q.jsx)("li",{children:E("".concat(ce,".requirements.list1.3"))})]}),(0,q.jsx)("p",{children:E("".concat(ce,".requirements.list2.text"))}),(0,q.jsxs)("ul",{children:[(0,q.jsx)("li",{children:E("".concat(ce,".requirements.list2.1"))}),(0,q.jsx)("li",{children:E("".concat(ce,".requirements.list2.2"))}),(0,q.jsx)("li",{children:E("".concat(ce,".requirements.list2.3"))}),(0,q.jsx)("li",{children:E("".concat(ce,".requirements.list2.4"))})]}),(0,q.jsx)("p",{children:E("".concat(ce,".requirements.list3.text"))}),(0,q.jsxs)("ul",{children:[(0,q.jsx)("li",{children:E("".concat(ce,".requirements.list3.1"))}),(0,q.jsx)("li",{children:E("".concat(ce,".requirements.list3.2"))})]}),(0,q.jsx)("p",{children:E("".concat(ce,".requirements.note"))}),(0,q.jsx)("div",{className:re.A.modalBtn,children:(0,q.jsx)("button",{className:d()("button"),onClick:()=>R(!1),children:E("profile.verification.KYC.underReview.ok")})})]})})]}):(0,q.jsx)(q.Fragment,{children:(0,q.jsx)(h.A,{})})},fe={iframe:"KYC_iframe__uY9-J",profile:"KYC_profile__hQ5hA",head:"KYC_head__vN2Hg",title:"KYC_title__jGzt0",body:"KYC_body__ZF2Ju",container:"KYC_container__Gu2Cs",sidebar:"KYC_sidebar__e7b8m",wrapper:"KYC_wrapper__sUigg",steps:"KYC_steps__Cj9M3",link:"KYC_link__RYSng",linkIcon:"KYC_linkIcon__JUi4s",line:"KYC_line__0rsQJ",active:"KYC_active__xBAkd",modalBody:"KYC_modalBody__iOzGe",modalBtn:"KYC_modalBtn__fiGkq"};var _e=i(19784),ve=i(56622),me=i(68171);const he="profile.verification.KYC",pe=["fio","questionnaire","documents","address","confirmation","fail","success"],ye=()=>{const e=(0,n.useRef)(null);let t=(0,o.useParams)().step;const i=(0,s.Bd)().t,l=(0,o.useLocation)().pathname,c=(0,r.wA)(),u=(0,o.useHistory)(),_=(0,r.d4)(e=>
1e.user.verification_data),v=(0,n.useState)(!1),m=(0,a.A)(v,2),h=m[0],p=m[1],y=(0,n.useState)({}),x=(0,a.A)(y,2),j=x[0],g=x[1],k=(0,n.useState)(!1),C=(0,a.A)(k,2),N=C[0],S=C[1],E=(0,n.useState)(!1),F=(0,a.A)(E,2),D=F[0],I=F[1],O=[{title:i("".concat(he,"address"!==t?".navigation.questionnaire":".navigation.addressDetails")),icon:_e.A,url:"/verification/".concat(["fio","questionnaire","address"].includes(t)&&t)},{title:i("".concat(he,".navigation.documents")),icon:ve.A,url:"/verification/documents"},{title:i("".concat(he,".navigation.confirmation")),icon:me.A,url:"/verification/success"}],B=O.find(e=>l.includes(e.url)),R=O.indexOf(B),H=e=>{t=e,"documents"===t&&S(!0)},T=async()=>{var e,t,a;const n=await w.A.post("/api/verification/submit",{headers:{"Content-Type":"multipart/form-data"}});if(null!==(e=n.data)&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&null!==(a=t.risk_ban_result)&&void 0!==a&&a.is_banned)I(!0);else if(n.data.status&&n.data.data.external_user_id&&n.data.data.external_ui_url)g({id:n.data.data.external_user_id,url:n.data.data.external_ui_url}),H("documents"),u.push("/verification/documents");else switch(n.data.code){case 360:f.Ay.error(i("".concat(he,".submitErrorCode.360")));break;case 361:f.Ay.error(i("".concat(he,".submitErrorCode.361")));break;case 362:f.Ay.error(i("".concat(he,".submitErrorCode.362")));break;case 363:f.Ay.error(i("".concat(he,".submitErrorCode.363")));break;default:return void f.Ay.error(i("".concat(he,".submitErrorCode.default")))}},V=async()=>{var e,t;const i=await w.A.get("/api/verification/check");return null!==(e=i.data)&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&t.status?i.data.data:null};return(0,n.useEffect)(()=>{c((0,A.A)())},[]),(0,n.useEffect)(()=>{if("documents"!==t)return;const e=setInterval(async()=>{const e=await V();e&&((e.status.approved||e.approve_qre_after_external&&10===e.verification.status)&&(S(!1),u.push("/verification/success")),e.status.rejected&&(S(!1),u.push("/verification/fail")))},12e3);return()=>clearInterval(e)},[t]),(0,n.useEffect)(()=>{if("documents"===t&&!N&&_){const e=async()=>{await T(),S(!0)};null!==_&&void 0!==_&&_.data_external.need_reset?e():(g({id:null===_||void 0===_?void 0:_.data_external.external_user_id,url:null===_||void 0===_?void 0:_.data_external.external_ui_url}),S(!0))}},[_]),pe.includes(t)?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)("div",{className:fe.profile,children:[(0,q.jsx)("div",{className:fe.head,children:(0,q.jsx)("div",{className:d()("container",fe.container),children:(0,q.jsx)("h3",{className:d()("h3",fe.title),children:i("".concat(he,".title"))})})}),(0,q.jsx)("div",{className:fe.body,children:(0,q.jsxs)("div",{className:d()("container",fe.container),children:[(0,q.jsxs)("div",{className:fe.sidebar,children:[(0,q.jsx)("div",{className:fe.top,onClick:()=>p(!h)}),(0,q.jsx)("div",{className:fe.steps,children:O.map((e,t)=>(0,q.jsxs)("p",{className:d()(fe.link,{[fe.active]:t<=R}),onClick:()=>p(!1),children:[(0,q.jsx)("img",{className:fe.linkIcon,src:e.icon,alt:e.title}),e.title,(0,q.jsx)("span",{className:fe.line})]},t))})]}),(0,q.jsxs)("div",{className:fe.wrapper,children:["fio"===t&&(0,q.jsx)(Y,{setExternalData:g,switchStep:H,submitRequest:T}),"questionnaire"===t&&(0,q.jsx)(X,{setExternalData:g,switchStep:H,submitRequest:T}),"address"===t&&(0,q.jsx)(ue,{setExternalData:g,switchStep:H,submitRequest:T}),"documents"===t&&(0,q.jsx)("div",{children:(0,q.jsx)("button",{className:d()("button-stroke button-small",fe.button),onClick:()=>{(async()=>{const e=await V();e&&(e.data_external.need_reset&&await T(),S(!0))})().then(e=>{})},children:i("".concat(he,".resumeVerification"))})}),"confirmation"===t&&(0,q.jsx)(oe,{}),"fail"===t&&(0,q.jsx)(oe,{}),"success"===t&&(0,q.jsx)(oe,{})]})]})})]}),(0,q.jsx)(b.A,{disableGoBackButton:!0,visible:N,title:i("".concat(he,".title")),onClose:()=>{(async()=>{const e=await V();e&&(S(!1),e.status.approved&&u.push("/verification/success"),e.status.rejected&&u.push("/verification/fail"))})().then(e=>{})},children:(0,q.jsx)("iframe",{ref:e,title:"Ondato",className:fe.iframe,allow:"camera",src:j.url})}),(0,q.jsxs)(b.A,{disableGoBackButton:!0,visible:D,title:i("Notification"),onClose:()=>{I(!1)},children:[(0,q.jsxs)("div",{className:fe.modalBody,children:[(0,q.jsx)("p",{children:i("".concat(he,".underReview.0"))}),(0,q.jsx)("br",{}),(0,q.jsx)("p",{children:i("".concat(he,".underReview.1"))})]}),(0,q.jsx)("div",{className:fe.modalBtn,children:(0,q.jsx)("button",{className:d()("button"),onClick:()=>I(!1),children:i("".concat(he,".underReview.ok"))})})]})]}):(0,q.jsxs)("h4",{className:"h4 text-center",children:["404: ",i("errors.404")]})}},54875(e,t,i){var a=i(76442);const n=function(){return e=>{a.A.get("/v3/users/onesignal-hash").then(e=>e.data).then(t=>e({type:"FETCH_USER_ONESIGNAL_HASH",payload:t})).catch(()=>{})}};i.d(t,["A",0,n])},54630(e,t,i){i.d(t,{m:()=>n});var a=i(76442);function n(e,t){return i=>{a.A.get("api/verification/questionnaire-settings",{headers:{"Login-Token":e,"X-Auth-Jwt":t}}).then(e=>e.data).then(e=>i({type:"FETCH_QUESTIONNAIRE_SETTINGS",payload:e})).catch(()=>{})}}const o=function(){return e=>{(0,a.A)({url:"api/verification/questionnaire-settings",method:"POST"}).then(e=>e.data).then(t=>e({type:"FETCH_QUESTIONNAIRE_SETTINGS",payload:t})).catch(()=>{})}};i.d(t,["A",0,o])},70521(e,t,i){var a=i(89379),n=i(26842),o=i(76442),r=i(23768);i.d(t,["c",0,async(e,t,i)=>{var s,l;const d=r.Ay.loading((0,n.t)("toast.loading")),c=await(async(e,t)=>(await o.A.post(e,t)).data)(e,(0,a.A)((0,a.A)({},t),{},{send_to_email:1,send_to_phone:1}));if(c.status)r.Ay.success((0,n.t)("toast.success.sendCodes"),{id:d});else{var u,f;const e=null!==c&&void 0!==c&&null!==(u=c.data)&&void 0!==u&&u.errors?Object.values(null===c||void 0===c||null===(f=c.data)||void 0===f?void 0:f.errors)[0]:null===c||void 0===c?void 0:c.code;switch(e.toString()){case"343":const t=c.data.time_before_new_code[Object.keys(null===c||void 0===c||null===(s=c.data)||void 0===s?void 0:s.errors)[0]],i=Math.floor(t/60),a=t%60,o=a<10?"0".concat(a):a;r.Ay.error("".concat((0,n.t)("toast.error"),": ").concat((0,n.t)("toast.errorCode.343",{minutes:"".concat(i,":").concat(o)})),{id:d});break;case"344":r.Ay.error("".concat((0,n.t)("toast.error"),": ").concat((0,n.t)("toast.errorCode.344")),{id:d});break;case"364":r.Ay.error("".concat((0,n.t)("toast.error"),": ").concat((0,n.t)("toast.errorCode.364")),{id:d});break;case"365":r.Ay.error("".concat((0,n.t)("toast.error"),": ").concat((0,n.t)("toast.errorCode.365")),{id:d});break;default:r.Ay.error("".concat((0,n.t)("toast.error"),": ").concat(e),{id:d})}}return{data:c,toastSendCode:d,required:null===c||void 0===c||null===(l=c.data)||void 0===l?void 0:l.required,status:null===c||void 0===c?void 0:c.status}}])}
1,3868(e,t,i){i.d(t,["A",0,{head:"AddressDetails_head__iWZEv",title:"AddressDetails_title__e4A2s",hint:"AddressDetails_hint__ILSrU",text:"AddressDetails_text__uRRMJ",textWithIcon:"AddressDetails_textWithIcon__gbGZR",list:"AddressDetails_list__tYuC+",subtitle:"AddressDetails_subtitle__CesQy",info:"AddressDetails_info__DXrn-",form:"AddressDetails_form__KrA+m",dropdown:"AddressDetails_dropdown__Nhhos",dropdownHead:"AddressDetails_dropdownHead__x8mNn",noOptionSelected:"AddressDetails_noOptionSelected__hkQb6",red:"AddressDetails_red__9k-36",textInput:"AddressDetails_textInput__79WYj",error:"AddressDetails_error__UUgef",row:"AddressDetails_row__s8y9R",field:"AddressDetails_field__J971X",btns:"AddressDetails_btns__naeo7",button:"AddressDetails_button__Ac4KH",message:"AddressDetails_message__ukTXs",modalBtn:"AddressDetails_modalBtn__afLmZ"}])}}]);
2//# sourceMappingURL=1532.b16f3ff6.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.