PageSourceSearch

https://consult.cybersight.org/assets/registration-Bjm4EGKb.js

js cybersight.org collected 2026-09-25 02:31:10 UTC 42,274 bytes, 1 lines download raw bytes

1import{j as t}from"./index-BFGGYG-d.js";import{aM as G,c as ae,u as he,e as xe,aN as M,aL as T,g as R,d as W,D as Ze,aT as Te,k as ne,L as Me,y as ye,G as be,S as Oe,T as Ge,A as We,aP as Ke,C as ke,U as ge,P as Ye,B as et,h as Re,aO as Ae}from"./localeMessages-2x95f0oM.js";import{r as $}from"./index-BB3fnRJh.js";import{o as de,s as Q,P as tt,_ as qe,b as st,d as Ne,e as lt,f as nt,h as se,i as it,j as rt,n as Ce,p as ot,k as at,l as ct,A as dt,m as ut,L as _e,E as je,q as mt,I as Je,r as Qe,t as He,C as ft,O as pt,v as ht,w as xt,x as gt,y as _t,z as Le,B as jt,D as bt,F as yt}from"./App-BkeKg1fS.js";import{logger as ze}from"./logger-DhFe1xSG.js";import{C as St}from"./Checkbox-BGmlFDWS.js";import{R as Pe}from"./Radio-BKEjn5VV.js";import{C as vt}from"./ConsultationEligibility-DgQMvpOW.js";import{D as ve}from"./useSingleAttachmentPreview-DTCrnMSD.js";import{L as kt}from"./LocalPdfPreviewAction-BIn6l4ac.js";import{I as Ve}from"./IconFile-pqauoyr5.js";import"./sentry-Dg_I0_8u.js";import"./InlineInput-CO3eFu5g.js";import"./utils-BcJg8yzc.js";import"./IconEye-X0W19nVi.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"[email protected]"};var e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="9169704b-6024-4eb4-8a71-1443115b481f",s._sentryDebugIdIdentifier="sentry-dbid-9169704b-6024-4eb4-8a71-1443115b481f")}catch{}})();const Fe=de({first_name:Q().min(1,{error:()=>G._({id:"4pwejF"})}).min(2,{error:()=>G._({id:"u9/F5l"})})}),De=de({last_name:Q().min(1,{error:()=>G._({id:"ve9JTU"})}).min(2,{error:()=>G._({id:"EzqINj"})})}),Ee=de({email:Q().min(1,{error:()=>G._({id:"ZsZeV2"})}).email({error:()=>G._({id:"OtjenF"})})});de({confirm_email:Q().min(1,{error:()=>G._({id:"bLI0xp"})})});de({gender:Q().min(1,{error:()=>G._({id:"AHDUQq"})})});de({country:Q().min(1,{error:()=>G._({id:"D1+cE9"})})});const Be=de({password:Q().min(1,{error:()=>G._({id:"chRwq/"})}).min(6,{error:()=>G._({id:"BfZAc7"})}).regex(tt,{error:()=>G._({id:"f675VF"})})});de({confirm_password:Q().min(1,{error:()=>G._({id:"c79FCY"})})});de({organization_id:Q().min(1,{error:()=>G._({id:"MxPti/"})})});de({job_title_id:Q().min(1,{error:()=>G._({id:"Qi4dAJ"})})});de({account_type:qe(["lms","consult",""])});de({first_name:Q().default(""),last_name:Q().default(""),email:Q().default(""),confirm_email:Q().default(""),gender:Q().default(""),country:Q().default(""),password:Q().default(""),confirm_password:Q().default(""),organization_id:Q().default(""),job_title_id:Q().default(""),job_title_other_text:Q().default(""),account_type:qe(["lms","consult",""]).default(""),accepted_terms_and_conditions:st().default(!1)});const wt={first_name:"",last_name:"",email:"",confirm_email:"",gender:"",country:"",password:"",confirm_password:"",organization_id:"",job_title_id:"",job_title_other_text:"",account_type:"",accepted_terms_and_conditions:!1};function Ct(s,e,l,f){const a={email:s.email,password:s.password,first_name:s.first_name,last_name:s.last_name,gender:s.gender,account_type:s.account_type,job_title_id:s.job_title_id,job_title_other_text:s.job_title_other_text||null,language_preference:f};return l&&(a.registration_token=l),s.organization_id&&!s.organization_id.startsWith("new-org-")?a.organization_id=s.organization_id:e&&(a.new_organization=e),a}function zt(){const[s,e]=$.useState(1),[l,f]=$.useState(!1),[a,n]=$.useState(null),[r,b]=$.useState(!1),[c,g]=$.useState(!1),[m,u]=$.useState(!1),[d,h]=$.useState(null),[o,y]=$.useState(!1),[C,k]=$.useState([]),F=$.useRef(0),i=$.useRef(null),[x,S]=$.useState(null),{data:_=[],isLoading:j}=Ne({queryKey:["jobTitles",G.locale],queryFn:()=>lt(),staleTime:300*1e3}),v=nt({defaultValues:wt}),w=se(v.store,p=>p.values.email),L=se(v.store,p=>p.values.account_type)==="consult"&&d?.email===w?d.token:null,z=it({mutationFn:async p=>{const E=p.account_type==="consult"&&d?.email===p.email?d.token:null,q=Ct(p,x,E);return ot(q)},onMutate:()=>{Ce.show({id:"registration-create",title:G._({id:"G1aQOP"}),message:G._({id:"XND9fQ"}),autoClose:!1,withCloseButton:!1,loading:!0})},onSuccess:()=>{Ce.update({id:"registration-create",title:G._({id:"s8iUxi"}),message:G._({id:"b6QIUw"}),autoClose:3e3,loading:!1,color:"green"}),e(7)},onError:p=>{const E=rt(p)||G._({id:"MJOyyj"});Ce.update({id:"registration-create",title:G._({id:"kXHzAA"}),message:E,autoClose:5e3,loading:!1,color:"red"}),n(E),ze.error("Registration failed",p)}}),B=$.useCallback(()=>{e(1),n(null),b(!1),u(!1),F.current+=1,i.current=null,h(null),y(!1),k([]),S(null),v.reset()},[v]),P=$.useCallback(async p=>{if(!p||p.length<5){b(!1),u(!1);return}g(!0),u(!1);try{const E=await at(p);b(E)}catch{u(!0),b(!1)}finally{g(!1)}},[]),V=$.useCallback(async()=>{const p=v.getFieldValue("email");if(!p||v.getFieldValue("account_type")!=="consult")return null;if(d?.email===p)return d.token;if(i.current?.email===p)return null;const E=F.current+1;F.current=E,i.current={id:E,email:p},y(!0);try{const q=await ct(p),O=i.current?.id===E,N=v.getFieldValue("email")===p&&v.getFieldValue("account_type")==="consult";return!O||!N?null:(h({token:q.token,email:p}),q.token)}catch(q){return i.current?.id===E&&(ze.error("Failed to generate registration token",q),n(G._({id:"cBvhCj"}))),null}finally{i.current?.id===E&&(i.current=null,y(!1))}},[v,d]);$.useEffect(()=>{d&&d.email!==w&&(h(null),k([]))},[w,d]);const U=$.useCallback(async()=>
1{if(n(null),s===5){const p=v.state.values;p.account_type==="consult"?(d?.email===p.email?d.token:await V())&&e(6):z.mutate(p);return}if(s===6){const p=v.state.values;if(o||p.account_type!=="consult"||d?.email!==p.email){n(G._({id:"cBvhCj"}));return}z.mutate(v.state.values);return}s<7&&e(s+1)},[s,v,o,d,V,z]),I=$.useCallback(()=>{if(n(null),s!==7){if(s===6){e(5);return}s>1&&e(s-1)}},[s]),D=$.useCallback(async()=>{f(!0),n(null);try{const p=v.state.values;if(p.account_type==="consult"&&(o||d?.email!==p.email)){n(G._({id:"cBvhCj"}));return}await z.mutateAsync(p)}finally{f(!1)}},[v,o,d,z]);return $.useEffect(()=>{if(s===2&&w&&w.includes("@")){const p=setTimeout(()=>{P(w)},500);return()=>clearTimeout(p)}},[w,s,P]),{form:v,step:s,setStep:e,goNext:U,goBack:I,loading:l||o||z.isPending,setLoading:f,error:a,setError:n,emailExists:r,checkingEmail:c,emailCheckError:m,checkEmail:P,jobTitles:_,jobTitlesLoading:j,registrationToken:L,tokenLoading:o,generateToken:V,documents:C,setDocuments:k,pendingOrganization:x,setPendingOrganization:S,handleSubmit:D,isSuccess:z.isSuccess,isSubmitting:z.isPending,resetFlow:B}}function Tt(s){const e=ae.c(4),{children:l,toastMessage:f,onToastClose:a}=s;let n;return e[0]!==l||e[1]!==a||e[2]!==f?(n=t.jsx(dt,{toastMessage:f,onToastClose:a,logoMarginBottom:"16px",children:l}),e[0]=l,e[1]=a,e[2]=f,e[3]=n):n=e[3],n}function Ft(s){const e=ae.c(63),{form:l,onSubmit:f,loading:a}=s,{i18n:n,_:r}=he();let b;e[0]!==n.locale?(b={queryKey:["genders",n.locale],queryFn:ut,staleTime:36e5},e[0]=n.locale,e[1]=b):b=e[1];const{data:c,isLoading:g}=Ne(b);let m;e[2]!==c?(m=c===void 0?[]:c,e[2]=c,e[3]=m):m=e[3];const u=m;let d;e[4]!==u?(d=u.map(Pt),e[4]=u,e[5]=d):d=e[5];const h=d,o=se(l.store,Lt)||"",y=se(l.store,At)||"",C=se(l.store,Rt)||"";let k;e[6]!==l?(k=J=>{l.setFieldValue("gender",J||"")},e[6]=l,e[7]=k):k=e[7];const F=k;let i;e[8]!==o||e[9]!==y||e[10]!==C?(i=Fe.shape.first_name.safeParse(o).success&&De.shape.last_name.safeParse(y).success&&C.length>0,e[8]=o,e[9]=y,e[10]=C,e[11]=i):i=e[11];const x=i;let S;e[12]!==x||e[13]!==f?(S=J=>{J.preventDefault(),x&&f()},e[12]=x,e[13]=f,e[14]=S):S=e[14];let _;e[15]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(xe,{order:3,c:M.orbisDarkBlue,children:t.jsx(T,{id:"3T8ziB"})}),e[15]=_):_=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs(R,{gap:"sm",ta:"center",w:"100%",children:[_,t.jsx(W,{c:M.textBody,fz:"16px",fw:600,children:t.jsx(T,{id:"+pWkaD"})})]}),e[16]=j):j=e[16];let v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v={onChange:It,onBlur:Bt},e[17]=v):v=e[17];let w;e[18]!==a?(w=J=>t.jsx(_e,{children:te=>{const K=J.state.meta.errors[0],ie=!!K;return t.jsxs(R,{gap:0,children:[t.jsx(J.TextInputField,{label:te({id:"kODvZJ"}),errorMode:"boolean",disabled:a,autoComplete:"given-name","data-autofocus":!0,styles:ie?{input:{borderBottomLeftRadius:0,borderBottomRightRadius:0},error:{display:"none"}}:{error:{display:"none"}}}),K&&t.jsx(je,{message:K})]})}}),e[18]=a,e[19]=w):w=e[19];let A;e[20]!==l.AppField||e[21]!==w?(A=t.jsx(l.AppField,{name:"first_name",validators:v,children:w}),e[20]=l.AppField,e[21]=w,e[22]=A):A=e[22];let L;e[23]===Symbol.for("react.memo_cache_sentinel")?(L={onChange:Et,onBlur:Dt},e[23]=L):L=e[23];let z;e[24]!==a?(z=J=>t.jsx(_e,{children:te=>{const K=J.state.meta.errors[0],ie=!!K;return t.jsxs(R,{gap:0,children:[t.jsx(J.TextInputField,{label:te({id:"UXBCwc"}),errorMode:"boolean",disabled:a,autoComplete:"family-name",styles:ie?{input:{borderBottomLeftRadius:0,borderBottomRightRadius:0},error:{display:"none"}}:{error:{display:"none"}}}),K&&t.jsx(je,{message:K})]})}}),e[24]=a,e[25]=z):z=e[25];let B;e[26]!==l.AppField||e[27]!==z?(B=t.jsx(l.AppField,{name:"last_name",validators:L,children:z}),e[26]=l.AppField,e[27]=z,e[28]=B):B=e[28];let P;e[29]!==r?(P=r({id:"5iyJje"}),e[29]=r,e[30]=P):P=e[30];let V;e[31]!==r?(V=r({id:"hid6Sx"}),e[31]=r,e[32]=V):V=e[32];const U=C||null,I=a||g;let D;e[33]!==h||e[34]!==F||e[35]!==P||e[36]!==V||e[37]!==U||e[38]!==I?(D=t.jsx(Te,{label:P,placeholder:V,data:h,value:U,onChange:F,disabled:I,searchable:!0,clearable:!1}),e[33]=h,e[34]=F,e[35]=P,e[36]=V,e[37]=U,e[38]=I,e[39]=D):D=e[39];const p=!x;let E,q;e[40]===Symbol.for("react.memo_cache_sentinel")?(E={type:"dots"},q=t.jsx(T,{id:"xGVfLh"}),e[40]=E,e[41]=q):(E=e[40],q=e[41]);let O;e[42]!==a||e[43]!==p?(O=t.jsx(ne,{fullWidth:!0,size:"md",radius:"md",color:"blue",type:"submit",loading:a,disabled:p,loaderProps:E,children:q}),e[42]=a,e[43]=p,e[44]=O):O=e[44];let N;e[45]!==r?(N=r({id:"Qm1NmK"}),e[45]=r,e[46]=N):N=e[46];let le;e[47]===Symbol.for("react.memo_cache_sentinel")?(le={label:{color:M.backgroundLowEmphasis,fontSize:"16px",fontWeight:600}},e[47]=le):le=e[47];let H;e[48]!==N?(H=t.jsx(Ze,{label:N,labelPosition:"center",c:M.backgroundLowEmphasis,styles:le}),e[48]=N,e[49]=H):H=e[49];let X;e[50]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(T,{id:"7SjwpF"}),e[50]=X):X=e[50];let Z;e[51]!==a?(Z=t.jsx(ne,{component:mt,to:"/login",fullWidth:!0,size:"sm",radiu
1s:"md",variant:"subtle",disabled:a,children:X}),e[51]=a,e[52]=Z):Z=e[52];let ee;e[53]!==A||e[54]!==B||e[55]!==D||e[56]!==O||e[57]!==H||e[58]!==Z?(ee=t.jsxs(R,{gap:"xl",children:[j,A,B,D,O,H,Z]}),e[53]=A,e[54]=B,e[55]=D,e[56]=O,e[57]=H,e[58]=Z,e[59]=ee):ee=e[59];let ce;return e[60]!==ee||e[61]!==S?(ce=t.jsx("form",{onSubmit:S,children:ee}),e[60]=ee,e[61]=S,e[62]=ce):ce=e[62],ce}function Dt(s){const{value:e}=s,l=De.shape.last_name.safeParse(e);return l.success?void 0:l.error.issues[0]?.message}function Et(s){const{value:e}=s;if(!e)return;const l=De.shape.last_name.safeParse(e);return l.success?void 0:l.error.issues[0]?.message}function Bt(s){const{value:e}=s,l=Fe.shape.first_name.safeParse(e);return l.success?void 0:l.error.issues[0]?.message}function It(s){const{value:e}=s;if(!e)return;const l=Fe.shape.first_name.safeParse(e);return l.success?void 0:l.error.issues[0]?.message}function Rt(s){return s.values.gender}function At(s){return s.values.last_name}function Lt(s){return s.values.first_name}function Pt(s){return{value:s.value,label:s.label}}function Vt(s){const e=ae.c(48),{form:l,onSubmit:f,onBack:a,loading:n,emailExists:r,checkingEmail:b,emailCheckError:c}=s,{_:g}=he(),m=se(l.store,Ot)||"",u=se(l.store,Mt)||"";let d;e[0]!==b||e[1]!==u||e[2]!==m||e[3]!==c||e[4]!==r?(d=Ee.shape.email.safeParse(m).success&&u.length>0&&m===u&&!r&&!b&&!c,e[0]=b,e[1]=u,e[2]=m,e[3]=c,e[4]=r,e[5]=d):d=e[5];const h=d;let o;e[6]!==h||e[7]!==f?(o=I=>{I.preventDefault(),h&&f()},e[6]=h,e[7]=f,e[8]=o):o=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(xe,{order:3,c:M.orbisDarkBlue,children:t.jsx(T,{id:"r5FOa9"})}),e[9]=y):y=e[9];let C;e[10]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(R,{gap:"sm",ta:"center",w:"100%",children:[y,t.jsx(W,{c:M.textBody,fz:"16px",fw:600,children:t.jsx(T,{id:"pQGkyB"})})]}),e[10]=C):C=e[10];let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k={onChange:$t,onBlur:Ut},e[11]=k):k=e[11];let F;e[12]!==b||e[13]!==c||e[14]!==r||e[15]!==n?(F=I=>t.jsx(_e,{children:D=>{const p=I.state.meta.errors[0],E=r?D({id:"ZQ4ZHs"}):null,q=c?D({id:"ukWh9x"}):null,O=p||E||q,N=!!O;return t.jsxs(R,{gap:0,children:[t.jsx(I.TextInputField,{label:D({id:"hzKQCy"}),errorMode:"boolean",disabled:n,autoComplete:"email","data-autofocus":!0,rightSection:b?t.jsx(Me,{size:"xs"}):null,styles:N?{input:{borderBottomLeftRadius:0,borderBottomRightRadius:0},error:{display:"none"}}:{error:{display:"none"}}}),N&&t.jsx(je,{message:O})]})}}),e[12]=b,e[13]=c,e[14]=r,e[15]=n,e[16]=F):F=e[16];let i;e[17]!==l.AppField||e[18]!==F?(i=t.jsx(l.AppField,{name:"email",validators:k,children:F}),e[17]=l.AppField,e[18]=F,e[19]=i):i=e[19];let x;e[20]===Symbol.for("react.memo_cache_sentinel")?(x=["email"],e[20]=x):x=e[20];let S;e[21]!==g?(S={onChangeListenTo:x,onChange:I=>{const{value:D,fieldApi:p}=I;if(!D)return;const E=p.form.getFieldValue("email");if(D!==E)return g({id:"dSyJj6"})},onBlur:I=>{const{value:D,fieldApi:p}=I;if(!D)return g({id:"bLI0xp"});const E=p.form.getFieldValue("email");if(D!==E)return g({id:"dSyJj6"})}},e[21]=g,e[22]=S):S=e[22];let _;e[23]!==n?(_=I=>t.jsx(_e,{children:D=>{const p=I.state.meta.errors[0],E=!!p;return t.jsxs(R,{gap:0,children:[t.jsx(I.TextInputField,{label:D({id:"NGXKG/"}),errorMode:"boolean",disabled:n,autoComplete:"email",styles:E?{input:{borderBottomLeftRadius:0,borderBottomRightRadius:0},error:{display:"none"}}:{error:{display:"none"}}}),p&&t.jsx(je,{message:p})]})}}),e[23]=n,e[24]=_):_=e[24];let j;e[25]!==l.AppField||e[26]!==_||e[27]!==S?(j=t.jsx(l.AppField,{name:"confirm_email",validators:S,children:_}),e[25]=l.AppField,e[26]=_,e[27]=S,e[28]=j):j=e[28];const v=!h;let w,A;e[29]===Symbol.for("react.memo_cache_sentinel")?(w={type:"dots"},A=t.jsx(T,{id:"xGVfLh"}),e[29]=w,e[30]=A):(w=e[29],A=e[30]);let L;e[31]!==n||e[32]!==v?(L=t.jsx(ne,{fullWidth:!0,size:"md",radius:"md",color:"blue",type:"submit",loading:n,disabled:v,loaderProps:w,children:A}),e[31]=n,e[32]=v,e[33]=L):L=e[33];let z;e[34]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(T,{id:"iH8pgl"}),e[34]=z):z=e[34];let B;
1e[35]!==n||e[36]!==a?(B=t.jsx(ne,{fullWidth:!0,size:"sm",radius:"md",variant:"subtle",color:"cyan",onClick:a,disabled:n,children:z}),e[35]=n,e[36]=a,e[37]=B):B=e[37];let P;e[38]!==L||e[39]!==B?(P=t.jsxs(R,{gap:"sm",children:[L,B]}),e[38]=L,e[39]=B,e[40]=P):P=e[40];let V;e[41]!==j||e[42]!==P||e[43]!==i?(V=t.jsxs(R,{gap:"xl",children:[C,i,j,P]}),e[41]=j,e[42]=P,e[43]=i,e[44]=V):V=e[44];let U;return e[45]!==V||e[46]!==o?(U=t.jsx("form",{onSubmit:o,children:V}),e[45]=V,e[46]=o,e[47]=U):U=e[47],U}function Ut(s){const{value:e}=s,l=Ee.shape.email.safeParse(e);return l.success?void 0:l.error.issues[0]?.message}function $t(s){const{value:e}=s;if(!e)return;const l=Ee.shape.email.safeParse(e);return l.success?void 0:l.error.issues[0]?.message}function Mt(s){return s.values.confirm_email}function Ot(s){return s.values.email}function Ue(s){const e=ae.c(14),{label:l,met:f}=s,a=f?M.successGreenBackground:M.surfaceSubtle;let n;e[0]!==a?(n={width:16,height:16,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:a},e[0]=a,e[1]=n):n=e[1];let r;e[2]!==f?(r=f?t.jsx(Je,{size:12,color:M.successGreen,stroke:3}):t.jsx(Qe,{size:12,color:M.textSubtle,stroke:2}),e[2]=f,e[3]=r):r=e[3];let b;e[4]!==n||e[5]!==r?(b=t.jsx(ye,{style:n,children:r}),e[4]=n,e[5]=r,e[6]=b):b=e[6];const c=f?M.successGreen:M.textSubtle,g=f?500:400;let m;e[7]!==l||e[8]!==c||e[9]!==g?(m=t.jsx(W,{size:"sm",c,fw:g,children:l}),e[7]=l,e[8]=c,e[9]=g,e[10]=m):m=e[10];let u;return e[11]!==b||e[12]!==m?(u=t.jsxs(be,{gap:"xs",wrap:"nowrap",children:[b,m]}),e[11]=b,e[12]=m,e[13]=u):u=e[13],u}function Gt(s){const e=ae.c(13),{password:l,visible:f}=s;if(!(f===void 0?!0:f)||!l)return null;const n=l.length>=6;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=/^[A-Za-z0-9\-!@#$%^&*()_+]*$/,e[0]=r):r=e[0];let b;e[1]!==l?(b=r.test(l),e[1]=l,e[2]=b):b=e[2];const c=b;let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g={backgroundColor:"rgba(0, 0, 0, 0.02)",borderRadius:"8px"},e[3]=g):g=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(T,{id:"NVslhT"}),e[4]=m):m=e[4];let u;e[5]!==n?(u=t.jsx(Ue,{label:m,met:n}),e[5]=n,e[6]=u):u=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(T,{id:"fpUEEq"}),e[7]=d):d=e[7];let h;e[8]!==c?(h=t.jsx(Ue,{label:d,met:c}),e[8]=c,e[9]=h):h=e[9];let o;return e[10]!==u||e[11]!==h?(o=t.jsx(ye,{p:"sm",style:g,children:t.jsxs(R,{gap:"xs",children:[u,h]})}),e[10]=u,e[11]=h,e[12]=o):o=e[12],o}function $e(s){const e=ae.c(24),{title:l,description:f,imageSrc:a,selected:n,onClick:r,disabled:b}=s,c=b===void 0?!1:b,g=c?"not-allowed":"pointer",m=c?.6:1;let u;e[0]!==g||e[1]!==m?(u={flex:1,padding:"16px",cursor:g,opacity:m},e[0]=g,e[1]=m,e[2]=u):u=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={width:"100%",height:"120px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},e[3]=d):d=e[3];let h;e[4]!==a||e[5]!==l?(h=t.jsx(ye,{style:d,children:t.jsx(He,{src:a,alt:l,fit:"contain",h:100,w:"auto"})}),e[4]=a,e[5]=l,e[6]=h):h=e[6];let o;e[7]!==l?(o=t.jsx(W,{fw:600,size:"lg",c:M.orbisDarkBlue,children:l}),e[7]=l,e[8]=o):o=e[8];let y;e[9]!==f?(y=t.jsx(W,{size:"sm",c:M.textSubtle,lh:1.4,children:f}),e[9]=f,e[10]=y):y=e[10];let C;e[11]!==o||e[12]!==y?(C=t.jsxs(R,{gap:"xs",align:"center",ta:"center",children:[o,y]}),e[11]=o,e[12]=y,e[13]=C):C=e[13];let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Pe.Indicator,{}),e[14]=k):k=e[14];let F;e[15]!==h||e[16]!==C?(F=t.jsxs(R,{gap:"md",align:"center",children:[h,C,k]}),e[15]=h,e[16]=C,e[17]=F):F=e[17];let i;return e[18]!==c||e[19]!==r||e[20]!==n||e[21]!==F||e[22]!==u?(i=t.jsx(Pe.Card,{checked:n,onClick:r,disabled:c,radius:"md",style:u,children:F}),e[18]=c,e[19]=r,e[20]=n,e[21]=F,e[22]=u,e[23]=i):i=e[23],i}function Wt(s){const e=ae.c(3),{children:l}=s;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={base:1,sm:2},e[0]=f):f=e[0];let a;return e[1]!==l?(a=t.jsx(Oe,{cols:f,spacing:"md",children:l}),e[1]=l,e[2]=a):a=e[2],a}function qt(s){const e=ae.c(43),{form:l,onSubmit:f,onBack:a,loading:n}=s,{_:r}=he(),[b,c]=$.useState(!1),g=se(l.store,Ht)||"",m=se(l.store,Qt)||"";let u;e[0]!==m||e[1]!==g?(u=Be.shape.password.safeParse(g).success&&m.length>0&&g===m,e[0]=m,e[1]=g,e[2]=u):u=e[2];const d=u;let h;e[3]!==d||e[4]!==f?(h=U=>{U.preventDefault(),d&&f()},e[3]=d,e[4]=f,e[5]=h):h=e[5];let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(xe,{order:3,c:M.orbisDarkBlue,children:t.jsx(T,{id:"vPAex+"})}),e[6]=o):o=e[6];let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs(R,{gap:"sm",ta:"center",w:"100%",children:[o,t.jsx(W,{c:M.textBody,fz:"16
1px",fw:600,children:t.jsx(T,{id:"kmn1XS"})})]}),e[7]=y):y=e[7];let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C={onChange:Jt,onBlur:Nt},e[8]=C):C=e[8];let k;e[9]!==n||e[10]!==b?(k=U=>t.jsx(_e,{children:I=>{const D=U.state.meta.errors[0],p=!!D,E=U.state.value||"";return t.jsxs(R,{gap:"xs",children:[t.jsxs(R,{gap:0,children:[t.jsx(U.PasswordInputField,{label:I({id:"7vhWI8"}),onFocus:()=>c(!0),errorMode:"boolean",disabled:n,autoComplete:"new-password","data-autofocus":!0,styles:p?{input:{borderBottomLeftRadius:0,borderBottomRightRadius:0},error:{display:"none"}}:{error:{display:"none"}}}),D&&t.jsx(je,{message:D})]}),t.jsx(Gt,{password:E,visible:b})]})}}),e[9]=n,e[10]=b,e[11]=k):k=e[11];let F;e[12]!==l.AppField||e[13]!==k?(F=t.jsx(l.AppField,{name:"password",validators:C,children:k}),e[12]=l.AppField,e[13]=k,e[14]=F):F=e[14];let i;e[15]===Symbol.for("react.memo_cache_sentinel")?(i=["password"],e[15]=i):i=e[15];let x;e[16]!==r?(x={onChangeListenTo:i,onChange:U=>{const{value:I,fieldApi:D}=U;if(!I)return;const p=D.form.getFieldValue("password");if(I!==p)return r({id:"lpIMne"})},onBlur:U=>{const{value:I,fieldApi:D}=U;if(!I)return r({id:"c79FCY"});const p=D.form.getFieldValue("password");if(I!==p)return r({id:"lpIMne"})}},e[16]=r,e[17]=x):x=e[17];let S;e[18]!==n?(S=U=>t.jsx(_e,{children:I=>{const D=U.state.meta.errors[0],p=!!D;return t.jsxs(R,{gap:0,children:[t.jsx(U.PasswordInputField,{label:I({id:"p2/GCq"}),errorMode:"boolean",disabled:n,autoComplete:"new-password",styles:p?{input:{borderBottomLeftRadius:0,borderBottomRightRadius:0},error:{display:"none"}}:{error:{display:"none"}}}),D&&t.jsx(je,{message:D})]})}}),e[18]=n,e[19]=S):S=e[19];let _;e[20]!==l.AppField||e[21]!==S||e[22]!==x?(_=t.jsx(l.AppField,{name:"confirm_password",validators:x,children:S}),e[20]=l.AppField,e[21]=S,e[22]=x,e[23]=_):_=e[23];const j=!d;let v,w;e[24]===Symbol.for("react.memo_cache_sentinel")?(v={type:"dots"},w=t.jsx(T,{id:"xGVfLh"}),e[24]=v,e[25]=w):(v=e[24],w=e[25]);let A;e[26]!==n||e[27]!==j?(A=t.jsx(ne,{fullWidth:!0,size:"md",radius:"md",color:"blue",type:"submit",loading:n,disabled:j,loaderProps:v,children:w}),e[26]=n,e[27]=j,e[28]=A):A=e[28];let L;e[29]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(T,{id:"iH8pgl"}),e[29]=L):L=e[29];let z;e[30]!==n||e[31]!==a?(z=t.jsx(ne,{fullWidth:!0,size:"sm",radius:"md",variant:"subtle",color:"cyan",onClick:a,disabled:n,children:L}),e[30]=n,e[31]=a,e[32]=z):z=e[32];let B;e[33]!==A||e[34]!==z?(B=t.jsxs(R,{gap:"sm",children:[A,z]}),e[33]=A,e[34]=z,e[35]=B):B=e[35];let P;e[36]!==_||e[37]!==B||e[38]!==F?(P=t.jsxs(R,{gap:"xl",children:[y,F,_,B]}),e[36]=_,e[37]=B,e[38]=F,e[39]=P):P=e[39];let V;return e[40]!==P||e[41]!==h?(V=t.jsx("form",{onSubmit:h,children:P}),e[40]=P,e[41]=h,e[42]=V):V=e[42],V}function Nt(s){const{value:e}=s,l=Be.shape.password.safeParse(e);return l.success?void 0:l.error.issues[0]?.message}function Jt(s){const{value:e}=s;if(!e)return;const l=Be.shape.password.safeParse(e);return l.success?void 0:l.error.issues[0]?.message}function Qt(s){return s.values.confirm_password}function Ht(s){return s.values.password}const Xt="user-application-other";function Zt(s){const e=ae.c(88),{form:l,onSubmit:f,onBack:a,loading:n,jobTitles:r,jobTitlesLoading:b,pendingOrganization:c,setPendingOrganization:g}=s,{_:m}=he(),u=se(l.store,ss),d=se(l.store,ts),h=se(l.store,es),o=se(l.store,Yt);let y;e[0]!==l||e[1]!==g?(y=oe=>{l.setFieldValue("country",oe||""),l.setFieldValue("organization_id",""),l.setFieldValue("account_type",""),g(null)},e[0]=l,e[1]=g,e[2]=y):y=e[2];const C=y;let k;e[3]!==r?(k=r.map(Kt),e[3]=r,e[4]=k):k=e[4];const F=k;let i;e[5]!==r?(i=oe=>r.find(we=>we.id===oe)?.requires_other_text??oe===Xt,e[5]=r,e[6]=i):i=e[6];const x=i;let S;e[7]!==h||e[8]!==x?(S=x(h),e[7]=h,e[8]=x,e[9]=S):S=e[9];const _=S;let j;e[10]!==l?(j=oe=>{l.setFieldValue("organization_id",oe||"")},e[10]=l,e[11]=j):j=e[11];const v=j;let w;e[12]!==l||e[13]!==x?(w=oe=>{l.setFieldValue("job_title_id",oe||""),x(oe)||l.setFieldValue("job_title_other_text","")},e[12]=l,e[13]=x,e[14]=w):w=e[14];const A=w;let L;e[15]!==l?(L=oe=>{l.setFieldValue("job_title_other_text",oe.target.value)},e[15]=l,e[16]=L):L=e[16];const z=L;let B;e[17]!==h||e[18]!==o||e[19]!==f||e[20]!==d||e[21]!==c||e[22]!==u||e[23]!==_?(B=oe=>{oe.preventDefault();const Ie=!!u,we=d||c,Xe=h&&(!_||o.trim());Ie&&we&&Xe&&f()},e[17]=h,e[18]=o,e[19]=f,e[20]=d,e[21]=c,e[22]=u,e[23]=_,e[24]=B):B=e[24];const P=B;let V;e[25]!==h||e[26]!==o||e[27]!==d||e[28]!==c||e[29]!==u||e[30]!==_?(V=u&&(d||c)&&h&&(!_||o.trim()),e[25]=h,e[26]=o,e[27]=d,e[28]=c,e[29]=u,e[30]=_,e[31]=V):V=e[31];const U=V;let I;e[32]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(xe,{order:3,c:M.orbisDarkBlue,children:t.jsx(T,{id:"EHOMD3"})}),e[32]=I):I=e[32];let D;e[33]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsxs(R,{gap:"sm",ta:"center",w:"100%",children:[I,t.jsx(W,{c:M.textBody,fz:"16
1px",fw:600,children:t.jsx(T,{id:"5307WI"})})]}),e[33]=D):D=e[33];let p;e[34]!==m?(p=m({id:"Kyz5YE"}),e[34]=m,e[35]=p):p=e[35];let E;e[36]!==m?(E=m({id:"hJmVtD"}),e[36]=m,e[37]=E):E=e[37];const q=u||null;let O;e[38]!==C||e[39]!==n||e[40]!==p||e[41]!==E||e[42]!==q?(O=t.jsx(ft,{label:p,placeholder:E,value:q,onChange:C,disabled:n,mt:0}),e[38]=C,e[39]=n,e[40]=p,e[41]=E,e[42]=q,e[43]=O):O=e[43];const N=d||null,le=n||!u;let H;e[44]!==v||e[45]!==u||e[46]!==g||e[47]!==N||e[48]!==le?(H=t.jsx(pt,{value:N,onChange:v,country:u,disabled:le,onNewOrganization:g}),e[44]=v,e[45]=u,e[46]=g,e[47]=N,e[48]=le,e[49]=H):H=e[49];let X;e[50]!==m?(X=m({id:"27z+FV"}),e[50]=m,e[51]=X):X=e[51];let Z;e[52]!==m?(Z=m({id:"PNFHJo"}),e[52]=m,e[53]=Z):Z=e[53];const ee=h||null,ce=n||b;let J;e[54]!==A||e[55]!==F||e[56]!==X||e[57]!==Z||e[58]!==ee||e[59]!==ce?(J=t.jsx(Te,{label:X,placeholder:Z,data:F,value:ee,onChange:A,disabled:ce,searchable:!0,clearable:!1}),e[54]=A,e[55]=F,e[56]=X,e[57]=Z,e[58]=ee,e[59]=ce,e[60]=J):J=e[60];let te;e[61]!==m||e[62]!==z||e[63]!==o||e[64]!==n||e[65]!==_?(te=_&&t.jsx(Ge,{label:m({id:"D6ZvbN"}),placeholder:m({id:"4FWdQc"}),value:o||"",onChange:z,disabled:n}),e[61]=m,e[62]=z,e[63]=o,e[64]=n,e[65]=_,e[66]=te):te=e[66];const K=!U;let ie,ue;e[67]===Symbol.for("react.memo_cache_sentinel")?(ie={type:"dots"},ue=t.jsx(T,{id:"xGVfLh"}),e[67]=ie,e[68]=ue):(ie=e[67],ue=e[68]);let re;e[69]!==n||e[70]!==K?(re=t.jsx(ne,{fullWidth:!0,type:"submit",loading:n,disabled:K,loaderProps:ie,children:ue}),e[69]=n,e[70]=K,e[71]=re):re=e[71];let me;e[72]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(T,{id:"iH8pgl"}),e[72]=me):me=e[72];let fe;e[73]!==n||e[74]!==a?(fe=t.jsx(ne,{fullWidth:!0,variant:"subtle",color:"cyan",onClick:a,disabled:n,children:me}),e[73]=n,e[74]=a,e[75]=fe):fe=e[75];let Y;e[76]!==re||e[77]!==fe?(Y=t.jsxs(R,{gap:"sm",children:[re,fe]}),e[76]=re,e[77]=fe,e[78]=Y):Y=e[78];let pe;e[79]!==O||e[80]!==H||e[81]!==J||e[82]!==te||e[83]!==Y?(pe=t.jsxs(R,{gap:"xl",children:[D,O,H,J,te,Y]}),e[79]=O,e[80]=H,e[81]=J,e[82]=te,e[83]=Y,e[84]=pe):pe=e[84];let Se;return e[85]!==P||e[86]!==pe?(Se=t.jsx("form",{onSubmit:P,children:pe}),e[85]=P,e[86]=pe,e[87]=Se):Se=e[87],Se}function Kt(s){return{value:s.id,label:s.name}}function Yt(s){return s.values.job_title_other_text}function es(s){return s.values.job_title_id}function ts(s){return s.values.organization_id}function ss(s){return s.values.country}function ls(s){const e=ae.c(84),{form:l,onSubmit:f,onBack:a,loading:n}=s,{_:r}=he(),{data:b,isLoading:c,isError:g,isFetching:m,refetch:u}=ht();let d;e[0]!==b?(d=b===void 0?[]:b,e[0]=b,e[1]=d):d=e[1];const h=d,o=se(l.store,rs),y=se(l.store,is),C=se(l.store,ns);let k;if(e[2]!==h||e[3]!==C){let Y;e[5]!==C?(Y=pe=>pe.code===C,e[5]=C,e[6]=Y):Y=e[6],k=h.find(Y),e[2]=h,e[3]=C,e[4]=k}else k=e[4];const i=!C||c||g||k?.high_resource!==!1;let x,S;e[7]!==o||e[8]!==i||e[9]!==l?(x=()=>{i&&o==="consult"&&l.setFieldValue("account_type","")},S=[o,i,l],e[7]=o,e[8]=i,e[9]=l,e[10]=x,e[11]=S):(x=e[10],S=e[11]),$.useEffect(x,S);let _;e[12]!==i||e[13]!==l?(_=Y=>{Y==="consult"&&i||l.setFieldValue("account_type",Y)},e[12]=i,e[13]=l,e[14]=_):_=e[14];const j=_;let v;e[15]!==y||e[16]!==o||e[17]!==i||e[18]!==f?(v=Y=>{Y.preventDefault(),y&&(o==="lms"||o==="consult"&&!i)&&f()},e[15]=y,e[16]=o,e[17]=i,e[18]=f,e[19]=v):v=e[19];const w=v;let A;e[20]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(xe,{order:3,c:M.orbisDarkBlue,children:t.jsx(T,{id:"UsVItg"})}),e[20]=A):A=e[20];let L;e[21]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsxs(R,{gap:"sm",ta:"center",w:"100%",children:[A,t.jsx(W,{c:M.textBody,fz:"16px",fw:600,children:t.jsx(T,{id:"vbn+5T"})})]}),e[21]=L):L=e[21];let z;e[22]!==r?(z=r({id:"hDCu/X"}),e[22]=r,e[23]=z):z=e[23];let B;e[24]!==r?(B=r({id:"cH3iRl"}),e[24]=r,e[25]=B):B=e[25];const P=o==="lms";let V;e[26]!==j?(V=()=>j("lms"),e[26]=j,e[27]=V):V=e[27];let U;e[28]!==n||e[29]!==z||e[30]!==B||e[31]!==P||e[32]!==V?(U=t.jsx($e,{title:z,description:B,imageSrc:"/images/registration/online-courses.svg",selected:P,onClick:V,disabled:n}),e[28]=n,e[29]=z,e[30]=B,e[31]=P,e[32]=V,e[33]=U):U=e[33];let I;e[34]!==r?(I=r({id:"QKEXP3"}),e[34]=r,e[35]=I):I=e[35];let D;e[36]!==r?(D=r({id:"UjK1Oa"}),e[36]=r,e[37]=D):D=e[37];const p=o==="consult";let E;e[38]!==j?(E=()=>j("consult"),e[38]=j,e[39]=E):E=e[39];const q=n||i;let O;e[40]!==I||e[41]!==D||e[42]!==p||e[43]!==E||e[44]!==q?(O=t.jsx($e,{title:I,description:D,imageSrc:"/images/registration/expert-advice.svg",selected:p,onClick:E,disabled:q}),e[40]=I,e[41]=D,e[42]=p,e[43]=E,e[44]=q,e[45]=O):O=e[45];let N;e[46]!==U||e[47]!==O?(N=t.jsxs(Wt,{children:[U,O]}),e[46]=U,e[47]=O,e[48]=N):N=e[48];let le;e[49]!==g||e[50]!==m||e[51]!==n||e[52]!==u?(le=g&&t.jsx(We,{color:"red",variant:"light",title:t.jsx(T,{id:"e2L60G"}),role:"alert",children:t.jsxs(R,{gap:"xs",align:"flex-start",children:[t.jsx(W,{size:"sm",children:t.jsx(T,{id:"5aoh/c"})}),t.jsx(ne,{type:"button",color:"red",variant:"light",size:"xs",loading:m,disabled:n,onClick:()=>{u()},children:t.jsx(T,{id:"6gRgw8"})})]})}),e[49]=g,e[50]=m,e[51]=n,e[52]=u,e[53]=le):le=e[53];let H;e[54]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(W,{size:"sm",c:M.textSubtle,ta:"center",children:t.jsx(vt,{})}),e[54]=H):H=e[54];let X;e[55]!==l?(X=Y=>l.setFieldValue("accepted_terms_and_conditions",Y.currentTarget.checked),e[55]=l,e[56]=X):X=e[56];let Z;e[57]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(T,{id:"dGrutU",components:{0:t.jsx(Ke,{href:"https://cybersight.org/terms-conditions/",target:"_blank",rel:"noopener noreferrer"})}}),e[57]=Z):Z=e[57];let ee;e[58]!==y||e[59]!==n||e[60]!==X?(ee=t.jsx(St,{checked:y,onChange:X,disabled:n,required:!0,label:Z}),e[58]=y,e[59]=n,e[60]=X,e[61]=ee):ee=e[61];const ce=!o||o==="consult"&&i;let J;e[62]===Symbol.for("react.memo_cache_sentinel")?(J={type:"dots"},e[62]=J):J=e[62];let te;e[63]!==o?(te=o==="consult"?t.jsx(T,{id:"lRC5aI"}):t.jsx(T,{id:"IS0nrP"}),e[63]=o,e[64]=te):te=e[64];let K;e[65]!==n||e[66]!==ce||e[67]!==te?(K=t.jsx(ne,{fullWidth:!0,size:"md",radius:"md",color:"blue",type:"submit",loading:n,disabled:ce,loaderProps:J,children:te}),e[65]=n,e[66]=ce,e[67]=te,e[68]=K):K=e[68];let ie;e[69]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(T,{id:"iH8pgl"}),e[69]=ie):ie=e[69];let ue;
1e[70]!==n||e[71]!==a?(ue=t.jsx(ne,{fullWidth:!0,size:"sm",radius:"md",variant:"subtle",color:"cyan",onClick:a,disabled:n,children:ie}),e[70]=n,e[71]=a,e[72]=ue):ue=e[72];let re;e[73]!==K||e[74]!==ue?(re=t.jsxs(R,{gap:"sm",children:[K,ue]}),e[73]=K,e[74]=ue,e[75]=re):re=e[75];let me;e[76]!==N||e[77]!==le||e[78]!==ee||e[79]!==re?(me=t.jsxs(R,{gap:"xl",children:[L,N,le,H,ee,re]}),e[76]=N,e[77]=le,e[78]=ee,e[79]=re,e[80]=me):me=e[80];let fe;return e[81]!==w||e[82]!==me?(fe=t.jsx("form",{onSubmit:w,children:me}),e[81]=w,e[82]=me,e[83]=fe):fe=e[83],fe}function ns(s){return s.values.country}function is(s){return s.values.accepted_terms_and_conditions}function rs(s){return s.values.account_type}const os=100*1024*1024,as=()=>{const s=Date.now().toString().slice(-8),e=Math.random().toString(36).substr(2,6);return`doc_${s}_${e}`};function cs({onDocumentsChange:s,isUploading:e=!1,initialDocuments:l=[],isRegistration:f=!1,registrationToken:a,email:n}){const{_:r}=he(),b=[{value:"medical_license",label:r({id:"O5o4A1"})},{value:"professional_certificate",label:r({id:"rmNdzA"})},{value:"diploma",label:r({id:"PdRInt"})},{value:"id_card",label:r({id:"v5B4ZN"})},{value:"other",label:r({id:"/IX/7x"})}],[c,g]=$.useState(l),[m,u]=$.useState("medical_license"),[d,h]=$.useState(""),o=xt();$.useEffect(()=>{l.length>0&&c.length===0&&g(l)},[l,c.length]);const y=$.useCallback(async(i,x)=>{try{g(_=>{const j=[..._];return j[x]={...j[x],status:"uploading"},j});let S;if(f&&a&&n)S=await gt(a,n,"standard",i.file,i.clientLinkId,_=>{const j=Math.round(_/100*100);g(v=>{const w=[...v];return w[x]={...w[x],progress:j},w})},i.documentType,i.description);else{if(!o.isAuthenticated)throw new Error("Authentication required");S=await _t("standard",i.file,i.clientLinkId,_=>{const j=Math.round(_/100*100);g(v=>{const w=[...v];return w[x]={...w[x],progress:j},w})})}g(_=>{const j=[..._];return j[x]={...j[x],status:"completed",attachmentId:S.id,attachment:S,progress:100},s(j),j})}catch(S){ze.error("Failed to upload document",S),g(_=>{const j=[..._];return j[x]={...j[x],status:"error",error:S instanceof Error?S.message:r({id:"b3Thhd"})},j})}},[o.isAuthenticated,s,f,a,n,r]),C=$.useCallback(async i=>{const x=i.map(j=>({file:j,documentType:m,description:d||void 0,progress:0,status:"pending",clientLinkId:as()})),S=c.length,_=[...c,...x];g(_),s(_),u("medical_license"),h(""),x.forEach((j,v)=>{y(j,S+v)})},[c,s,m,d,y]),k=$.useCallback(i=>{const x=c.filter((S,_)=>_!==i);g(x),s(x)},[c,s]),F=$.useCallback(i=>{const x=c[i];x&&x.status==="error"&&y(x,i)},[c,y]);return t.jsxs(R,{gap:"md","data-sentry-element":"Stack","data-sentry-component":"DocumentUpload","data-sentry-source-file":"DocumentUpload.tsx",children:[t.jsxs(R,{gap:"md","data-sentry-element":"Stack","data-sentry-source-file":"DocumentUpload.tsx",children:[t.jsx(Te,{label:r({id:"7BDsqQ"}),placeholder:r({id:"JaJa5K"}),data:b,value:m,onChange:i=>u(i||"medical_license"),"data-sentry-element":"Select","data-sentry-source-file":"DocumentUpload.tsx"}),t.jsx(Ge,{label:r({id:"/mo9tB"}),placeholder:r({id:"oA7EU/"}),value:d,onChange:i=>h(i.target.value),"data-sentry-element":"TextInput","data-sentry-source-file":"DocumentUpload.tsx"})]}),t.jsx(ve,{onDrop:C,accept:{"application/pdf":[".pdf"],"image/*":[".png",".jpg",".jpeg",".gif",".bmp",".webp"]},maxSize:os,disabled:e,"data-sentry-element":"Dropzone","data-sentry-source-file":"DocumentUpload.tsx",children:t.jsx(ke,{p:"xl","data-sentry-element":"Center","data-sentry-source-file":"DocumentUpload.tsx",children:t.jsxs(R,{gap:"md",align:"center","data-sentry-element":"Stack","data-sentry-source-file":"DocumentUpload.tsx",children:[t.jsx(ve.Accept,{"data-sentry-element":"Dropzone.Accept","data-sentry-source-file":"DocumentUpload.tsx",children:t.jsx(Le,{style:{width:ge(50),height:ge(50)},stroke:1.5,"data-sentry-element":"IconUpload","data-sentry-source-file":"DocumentUpload.tsx"})}),t.jsx(ve.Reject,{"data-sentry-element":"Dropzone.Reject","data-sentry-source-file":"DocumentUpload.tsx",children:t.jsx(Qe,{style:{width:ge(50),height:ge(50)},stroke:1.5,"data-sentry-element":"IconX","data-sentry-source-file":"DocumentUpload.tsx"})}),t.jsx(ve.Idle,{"data-sentry-element":"Dropzone.Idle","data-sentry-source-file":"DocumentUpload.tsx",children:t.jsx(Ve,{style:{width:ge(50),height:ge(50)},stroke:1.5,"data-sentry-element":"IconFile","data-sentry-source-file":"DocumentUpload.tsx"})}),t.jsxs(ye,{"data-sentry-element":"Box","data-sentry-source-file":"DocumentUpload.tsx",children:[t.jsx(W,{size:"xl",ta:"center","data-sentry-element":"Text","data-sentry-source-file":"DocumentUpload.tsx",children:t.jsx(T,{id:"IoUgVF","data-sentry-element":"_Trans","data-sentry-source-file":"DocumentUpload.tsx"})}),t.jsx(W,{size:"sm",c:"dimmed",ta:"center",mt:7,"data-sentry-element":"Text","data-sentry-source-file":"DocumentUpload.tsx",children:t.jsx(T,{id:"xDFWtF","data-sentry-element":"_Trans","data-sentry-source-file":"DocumentUpload.tsx"})})]})]})})}),c.length>0&&t.jsxs(R,{gap:"sm",children:[t.jsx(W,{size:"sm",fw:500,children:t.jsx(T,{id:"FAWG7h",values:{0:c.length}})}),t.jsx(Oe,{cols:1,children:c.map((i,x)=>t.jsxs(Ye,{p:"sm",withBorder:!0,children:[t.jsxs(be,{justify:"space-between",wrap:"nowrap",children:[t.jsxs(be,{gap:"sm",wrap:"nowrap",style:{flex:1,minWidth:0},children:[t.jsx(Ve,{size:24}),t.jsxs(ye,{style:{flex:1,minWidth:0},children:[t.jsx(W,{size:"sm",fw:500,truncate:!0,children:i.file.name}),t.jsxs(be,{gap:"xs",children:[t.jsx(et,{size:"xs",variant:"light",children:b.find(S=>S.value===i.documentType)?.label||i.documentType}),i.description&&t.jsx(W,{size:"xs",c:"dimmed",children:i.description})]})]})]}),t.jsxs(be,{gap:"xs",children:[t.jsx(kt,{file:i.file,attachment:i.attachment}),i.status==="completed"&&t.jsx(Je,{size:20,color:"var(--mantine-color-green-6)"}),i.status==="error"&&t.jsxs(t.Fragment,{children:[t.jsx(Re,{size:20,color:"var(--mantine-color-red-6)"}),t.jsx(Ae,{size:"sm",variant:"subtle","aria-label":r({id:"pDjTCG"}),onClick:()=>F(x),children:t.jsx(Le,{size:16})})]}),!e&&i.status!=="uploading"&&t.jsx(Ae,{size:"sm",variant:"subtle",color:"red","aria-label":r({id:"uZ0SPS"}),onClick:()=>k(x),children:t.jsx(jt,{size:16})})]})]}),i.status==="uploading"&&t.jsx(bt,{value:i.progress,size:"xs",mt:"xs"}),i.status==="error"&&t.jsx(W,{size:"xs",c:"red",mt:"xs",children:i.error||r({id:"b3Thhd"})})]},x))})]}),c.length===0&&t.jsx(We,{variant:"light",color:"yellow",icon:t.jsx(Re,{}),children:t.jsx(W,{size:"sm",children:t.jsx(T,{id:"C3+7ap"})})})]})}function ds(s){const e=ae.c(35),{form:l,onSubmit:f,onBack:a,loading:n,registrationToken:r,tokenLoading:b,documents:c,setDocuments:g}=s,m=se(l.store,fs);let u;e[0]!==c?(u=c.length>0&&c.every(ms),e[0]=c,e[1]=u):u=e[1];const d=u;let h;e[2]!==c?(h=c.some(us),e[2]=c,e[3]=h):h=e[3];const o=h;let y;e[4]!==d||e[5]!==f?(y=P=>{P.preventDefault(),d&&f()},e[4]=d,e[5]=f,e[6]=y):y=e[6];const C=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(xe,{order:3,c:M.orbisDarkBlue,children:t.jsx(T,{id:"LbSrSM"})}),e[7]=k):k=e[7];let F;e[8]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsxs(R,{gap:"sm",ta:"center",w:"100%",children:[k,t.jsx(W,{c:M.textBody,fz:"16
1px",fw:600,children:t.jsx(T,{id:"lseEiV"})})]}),e[8]=F):F=e[8];let i;e[9]!==c||e[10]!==m||e[11]!==r||e[12]!==g||e[13]!==b?(i=b?t.jsx(ke,{py:"xl",children:t.jsxs(R,{align:"center",gap:"md",children:[t.jsx(Me,{size:"lg"}),t.jsx(W,{c:"dimmed",size:"sm",children:t.jsx(T,{id:"tNmtuQ"})})]})}):r?t.jsx(cs,{onDocumentsChange:g,initialDocuments:c,isRegistration:!0,registrationToken:r,email:m}):t.jsx(ke,{py:"xl",children:t.jsx(W,{c:"red",size:"sm",children:t.jsx(T,{id:"kXF3hd"})})}),e[9]=c,e[10]=m,e[11]=r,e[12]=g,e[13]=b,e[14]=i):i=e[14];const x=!d||o;let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S={type:"dots"},e[15]=S):S=e[15];let _;e[16]!==o?(_=o?t.jsx(T,{id:"GxkJXS"}):t.jsx(T,{id:"FzMr5e"}),e[16]=o,e[17]=_):_=e[17];let j;e[18]!==n||e[19]!==x||e[20]!==_?(j=t.jsx(ne,{fullWidth:!0,size:"md",radius:"md",color:"blue",type:"submit",loading:n,disabled:x,loaderProps:S,children:_}),e[18]=n,e[19]=x,e[20]=_,e[21]=j):j=e[21];const v=n||o;let w;e[22]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(T,{id:"iH8pgl"}),e[22]=w):w=e[22];let A;e[23]!==a||e[24]!==v?(A=t.jsx(ne,{fullWidth:!0,size:"sm",radius:"md",variant:"subtle",color:"cyan",onClick:a,disabled:v,children:w}),e[23]=a,e[24]=v,e[25]=A):A=e[25];let L;e[26]!==j||e[27]!==A?(L=t.jsxs(R,{gap:"sm",children:[j,A]}),e[26]=j,e[27]=A,e[28]=L):L=e[28];let z;e[29]!==L||e[30]!==i?(z=t.jsxs(R,{gap:"xl",children:[F,i,L]}),e[29]=L,e[30]=i,e[31]=z):z=e[31];let B;return e[32]!==C||e[33]!==z?(B=t.jsx("form",{onSubmit:C,children:z}),e[32]=C,e[33]=z,e[34]=B):B=e[34],B}function us(s){return s.status==="uploading"}function ms(s){return s.status==="completed"}function fs(s){return s.values.email??""}function ps(s){const e=ae.c(20),{accountType:l}=s,{_:f}=he(),a=yt();let n;e[0]!==a?(n=()=>{a({to:"/login"})},e[0]=a,e[1]=n):n=e[1];const r=n,b=l==="consult";let c;e[2]!==f?(c=f({id:"ug8qDe"}),e[2]=f,e[3]=c):c=e[3];let g;e[4]!==c?(g=t.jsx(ke,{children:t.jsx(He,{src:"/images/registration/welcome.svg",alt:c,h:150,w:"auto",fit:"contain",fallbackSrc:"/images/placeholder-welcome.svg"})}),e[4]=c,e[5]=g):g=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(xe,{order:3,c:M.orbisDarkBlue,children:t.jsx(T,{id:"S6H0fA"})}),e[6]=m):m=e[6];let u,d;e[7]!==b?(u=t.jsxs(R,{gap:"md",ta:"center",w:"100%",children:[m,t.jsx(W,{c:M.textBody,fz:"16px",fw:500,lh:1.5,children:b?t.jsx(T,{id:"G5J+8s"}):t.jsx(T,{id:"akvTpc"})})]}),d=b&&t.jsxs(R,{gap:"xs",p:"md",style:{backgroundColor:"rgba(0, 163, 224, 0.05)",borderRadius:"8px",width:"100%"},children:[t.jsx(W,{size:"sm",fw:600,c:M.orbisDarkBlue,children:t.jsx(T,{id:"pvzjDj"})}),t.jsx(W,{size:"sm",c:M.textSubtle,children:t.jsx(T,{id:"00lP3D"})})]}),e[7]=b,e[8]=u,e[9]=d):(u=e[8],d=e[9]);let h,o;e[10]===Symbol.for("react.memo_cache_sentinel")?(h={type:"dots"},o=t.jsx(T,{id:"n1ekoW"}),e[10]=h,e[11]=o):(h=e[10],o=e[11]);let y;e[12]!==r?(y=t.jsx(ne,{fullWidth:!0,size:"md",radius:"md",color:"blue",onClick:r,loaderProps:h,children:o}),e[12]=r,e[13]=y):y=e[13];let C;e[14]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(W,{size:"sm",c:M.textSubtle,ta:"center",children:t.jsx(T,{id:"fL8OvP"})}),e[14]=C):C=e[14];let k;return e[15]!==g||e[16]!==u||e[17]!==d||e[18]!==y?(k=t.jsxs(R,{gap:"xl",align:"center",children:[g,u,d,y,C]}),e[15]=g,e[16]=u,e[17]=d,e[18]=y,e[19]=k):k=e[19],k}function hs(){const s=ae.c(25),{form:e,step:l,goNext:f,goBack:a,loading:n,error:r,setError:b,emailExists:c,checkingEmail:g,emailCheckError:m,jobTitles:u,jobTitlesLoading:d,registrationToken:h,tokenLoading:o,documents:y,setDocuments:C,pendingOrganization:k,setPendingOrganization:F}=zt(),i=e;let x;s[0]!==b?(x=()=>b(null),s[0]=b,s[1]=x):x=s[1];const S=x;let _;s[2]!==g||s[3]!==y||s[4]!==m||s[5]!==c||s[6]!==a||s[7]!==f||s[8]!==u||s[9]!==d||s[10]!==n||s[11]!==k||s[12]!==i||s[13]!==h||s[14]!==C||s[15]!==F||s[16]!==l||s[17]!==o?(_=()=>{switch(l){case 1:return t.jsx(Ft,{form:i,onSubmit:f,loading:n});case 2:return t.jsx(Vt,{form:i,onSubmit:f,onBack:a,loading:n,emailExists:c,checkingEmail:g,emailCheckError:m});case 3:return t.jsx(Zt,{form:i,onSubmit:f,onBack:a,loading:n,jobTitles:u,jobTitlesLoading:d,pendingOrganization:k,setPendingOrganization:F});case 4:return t.jsx(qt,{form:i,onSubmit:f,onBack:a,loading:n});case 5:return t.jsx(ls,{form:i,onSubmit:f,onBack:a,loading:n});case 6:return t.jsx(ds,{form:i,onSubmit:f,onBack:a,loading:n,registrationToken:h,tokenLoading:o,documents:y,setDocuments:C});case 7:return t.jsx(ps,{accountType:i.getFieldValue("account_type")});default:return null}},s[2]=g,s[3]=y,s[4]=m,s[5]=c,s[6]=a,s[7]=f,s[8]=u,s[9]=d,s[10]=n,s[11]=k,s[12]=i,s[13]=h,s[14]=C,s[15]=F,s[16]=l,s[17]=o,s[18]=_):_=s[18];const j=_;let v;s[19]!==j?(v=j(),s[19]=j,s[20]=v):v=s[20];let w;return s[21]!==r||s[22]!==S||s[23]!==v?(w=t.jsx(Tt,{toastMessage:r,onToastClose:S,children:v}),s[21]=r,s[22]=S,s[23]=v,s[24]=w):w=s[24],w}const Es=hs;export{Es as component};

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.