1import{b as R,f as U,r as a,t as V,A as v,j as e,y,q as W,o as D,au as O,c as G,u as H,av as Y}from"./index-DOEDGpFv.js";import{G as K,F as Z,E as J}from"./ForgotPassqordRecuiter-C2HhNl_v.js";import{F as E,f as Q,g as k,c as T,a as L,b}from"./index.esm-DaRz_fRj.js";import{u as M}from"./user.service-vzbCZA7Y.js";import{R as X}from"./recaptcha-wrapper-B-SbVzhn.js";import ee from"./ResetPasswordRecuiter-BLGScF8k.js";import{R as se}from"./RadioGroup-BVZKrqaO.js";import{F as I}from"./FormControlLabel-Cv1jetH4.js";import{R as B}from"./Radio-BcikqwZL.js";import"./VisibilityOffOutlined-CSqV7B5e.js";import"./InputAdornment-CYJ-dB-y.js";const te=T({fullName:b().trim().required("Full name is required").min(2,"Full name must be at least 2 characters"),phoneNumber:b().required("Phone number is required").matches(/^[1-9][0-9]{9}$/,"Phone number must be 10 digits and cannot start with 0").test("not-all-same","Phone number cannot have all same digits",t=>t?!/^(\d)\1{9}$/.test(t):!0).test("not-sequential-ascending","Phone number cannot be sequential (e.g., 0123456789)",t=>t?!["0123456789","1234567890"].some(s=>s.includes(t)||t.includes(s)):!0).test("not-sequential-descending","Phone number cannot be in descending order (e.g., 9876543210)",t=>t?!["9876543210","0987654321"].some(s=>s.includes(t)||t.includes(s)):!0).test("not-repeating-pattern","Phone number cannot have repeating patterns",t=>t?!/^(\d{2})\1{4}$/.test(t):!0),email:b().trim().email("Invalid email format").required("Email id is required"),companyName:b().trim(),recaptcha:L().oneOf([!0],"Please verify that you are not a robot").required("Please complete the reCAPTCHA")});function ae({setSubmitted:t}){const h=R(),[s,f]=U.useState(!1),{openSnackbar:x}
1=a.useContext(V),[m,u]=a.useState(""),[d,p]=a.useState(""),{setIsSignUpPopup:j,setIsSignInPopup:N}=a.useContext(v),n=async(r,{setSubmitting:l})=>{var o,c;f(!0),u(""),p("");try{const g={full_name:r.fullName.trim(),phone_number:r.phoneNumber.trim(),email:r.email.trim(),company_name:r.companyName.trim()||""},i=await O.basicInfo(g);(i.sucess||i.user)&&(t(!0),x("Details submitted successfully!","success"))}catch(g){console.error("Submission error:",g);const i=((c=(o=g.response)==null?void 0:o.data)==null?void 0:c.message)||"Something went wrong. Please try again.";i.toLowerCase().includes("phone")||i.toLowerCase().includes("mobile")?u(i):i.toLowerCase().includes("email")?p(i):x(i,"error")}finally{f(!1),l(!1)}};return e.jsxs("div",{className:"Requiterdetails form_action_container",children:[e.jsx("small",{children:"Please leave your details below:"}),e.jsx(E,{initialValues:{fullName:"",phoneNumber:"",email:"",companyName:"",recaptcha:!1},validationSchema:te,onSubmit:n,children:({errors:r,touched:l,isSubmitting:o,setFieldValue:c,values:g})=>e.jsxs(Q,{children:[e.jsxs("div",{className:"mb-5 cxpart",children:[e.jsx("p",{children:"Your full name"}),e.jsx(k,{as:y,name:"fullName",variant:"standard",fullWidth:!0,error:l.fullName&&!!r.fullName,helperText:l.fullName&&r.fullName})]}),e.jsxs("div",{className:"mb-5 cxpart",children:[e.jsx("p",{children:"Your phone number (10-digits)"}),e.jsx(k,{as:y,name:"phoneNumber",variant:"standard",fullWidth:!0,inputProps:{maxLength:10,inputMode:"numeric",pattern:"[0-9]*"},error:l.phoneNumber&&!!r.phoneNumber||!!m,helperText:l.phoneNumber&&r.phoneNumber?r.phoneNumber:m,onChange:i=>{c("phoneNumber",i.target.value),u("")}})]}),e.jsxs("div",{className:"mb-5 cxpart",children:[e.jsx("p",{children:"Your email ID"}),e.jsx(k,{as:y,name:"email",variant:"standard",fullWidth:!0,type:"email",error:l.email&&!!r.email||!!d,helperText:l.email&&r.email?r.email:d,onChange:i=>{c("email",i.target.value),p("")}})]}),e.jsxs("div",{className:"mb-5 cxpart",children:[e.jsx("p",{children:"Name of your company (optional)"}),e.jsx(k,{as:y,name:"companyName",variant:"standard",fullWidth:!0})]}),e.jsxs("div",{className:"mb-4 recaptcha",children:[e.jsx(X,{sitekey:W.recapchaKey,onChange:i=>{c("recaptcha",!!i)}}),l.recaptcha&&r.recaptcha&&e.jsx("p",{style:{color:"#d32f2f",fontSize:"0.75rem",marginTop:"3px",marginLeft:"14px"},children:r.recaptcha})]}),e.jsx(D,{text:"Submit",type:"submit",disabled:s||o}),e.jsxs("p",{className:"terms_info pt-3 pb-5",style:{color:"#44454d",fontSize:"12px",fontWeight:"500"},children:["By signing up, you accept the"," ",e.jsx("button",{onClick:()=>{h("/view-cms/terms-and-condition"),j(!1),N(!1)},className:"link terms_conditon",type:"button",children:e.jsx("b",{children:"Terms of Use"})})]}),e.jsxs("h6",{className:"footer_text text-center",children:["Already have an account?"," ",e.jsx("span",{className:"link",onClick:()=>{j(!1),N(!0)},children:e.jsx("b",{children:"Sign in"})})]})]})})]})}function re({onClose:t,setSubmitted:h}){const s=R(),{setIsSignUpPopup:f,setIsSignInPopup:x}=a.useContext(v);return e.jsxs("div",{className:"submitted_confirm",children:[e.jsx("h2",{children:"Submitted!"}),e.jsx("p",{children:"We will get back to you soon!"}),e.jsxs("p",{style:{marginTop:"1.5rem",marginBottom:"1rem"},children:["Meanwhile, you can find talents by visiting"," ",e.jsx("button",{onClick:()=>{s("/find-talents"),h(!1),x(!1),f(!1)},className:"link",style:{background:"none",border:"none",color:"inherit",textDecoration:"underline",cursor:"pointer",padding:0,font:"inherit",fontWeight:"bold"},children:"this page"}),"."]})]})}function A({onClick:t,isRecruiter:h,role:s,onClose:f}){const x=R(),{setIsSignUpPopup:m,setIsSignInPopup:u,isForgotPopup:d,isResetPopup:p}=a.useContext(v),[j,N]=a.useState(!1),[n,r]=a.useState(""),[l,o]=a.useState(""),[c,g]=a.useState(""),[i,w]=a.useState(!1),[P,_]=a.useState(""),[$,q]=a.useState(!1),C=()=>{m(!1),u(!1),x("/about/contact-us")};a.useEffect(()=>{const S=new URLSearchParams(window.location.search).get("ref");S&&(g(S.toUpperCase()),w(!0))},[]);const z=F=>{const S=F.target.value;g(S),S.length<4?_("Referral code must be at least 4 characters"):_("")};return e.jsxs("div",{className:"form_action_container",children:[j===!0?e.jsxs("div",{className:"errMsgcontainer p-4 mb-3",children:[" ",e.jsxs("p",{className:"emailErrText ",style:{marginBottom:25},children:["Oops! We need an email!"," "]}),e.jsxs("p",{className:"fontStyl",style:{marginBottom:25},children:["Sorry, we could not find the email address linked to your Sign-up choice."," "]}),e.jsxs("p",{className:"fontStyl",children:["Please ",e.jsx("b",{children:"use another Sign-up"})," option."]})]}):null,n==="Deleted"?e.jsxs("div",{className:"errMsgcontainer p-4 mb-3",children:[" ",e.jsx("p",{className:"emailErrText ",style:{marginBottom:10},children:"Profile Deleted"}),e.jsxs("p",{className:"fontStyl",children:["Sorry, this profile no longer exists. Please"," ",e.jsx("span",{onClick:C,className:"linkText",children:"contact"})," ","the admin for more information."]})]}):n==="Banned"?e.jsxs("div",{className:"errMsgcontainer p-4 mb-3",children:[" ",e.jsx("p",{className:"emailErrText ",style:{marginBottom:10},children:"Profile Banned"}),e.jsxs("p",{className:"fontStyl",children:["Sorry, your profile is banned and you wonât be able to login or create another profile using the same credentials. Please"," ",e.jsx("span",{onClick:C,className:"linkText",children:"contact"})," ","the admin for more information."," "]})]}):n==="Locked"?e.jsxs("div",{className:"errMsgcontainer p-4 mb-3",children:[" ",e.jsx("p",{className:"emailErrText ",style:{marginBottom:10},children:"Profile Locked"}),e.jsxs("p",{className:"fontStyl",children:["Sorry, your profile is locked and you will not be able login. Please"," ",e.jsx("span",{onClick:C,className:"linkText",children:"contact"})," ","the admin for more information."," "]})]}):n==="Freeze"?e.jsxs("div",{className:"errMsgcontainer p-4 mb-3",children:[" ",e.jsx("p",{className:"emailErrText ",style:{marginBottom:10},children:"Profile Freeze"}),e.jsxs("p",{className:"fontStyl",children:["Sorry, your profile is under freeze and
1you will not be able to apply to new jobs or make any changes to the profile. Please"," ",e.jsx("span",{onClick:C,className:"linkText",children:"contact"})," ","the admin for more information."]})]}):(n==null?void 0:n.length)>6&&e.jsxs("div",{className:"errMsgcontainer p-4 mb-3",children:[e.jsxs("p",{className:"emailErrText ",style:{marginBottom:10},children:["Error"," "]}),e.jsx("p",{className:"fontStyl",children:n})]}),n==="error"&&e.jsxs("div",{className:"errMsgcontainer p-4 mb-3",children:[" ",e.jsx("p",{className:"emailErrText ",style:{marginBottom:10},children:"Something went wrong"}),e.jsx("p",{className:"fontStyl",children:l})]}),(s==0||s==-1)&&!d&&!p&&e.jsxs(e.Fragment,{children:[e.jsx(y,{className:"refereral_codes",id:"outlined-multiline-flexible",placeholder:"Enter your REFERRAL CODE, if available",onChange:z,value:c,multiline:!0,maxRows:4,error:!!P,helperText:P,disabled:i}),e.jsx(K,{closemodel:()=>m(!1),name:"Sign up with Google",setAccountStatus:r,isRecruiter:h,referral:c,setReferral:g})]}),s==1&&!d&&!p&&($&&s==1?e.jsx(re,{onClose:f,setSubmitted:q}):e.jsx(ae,{setSubmitted:q})),d&&e.jsx(Z,{}),p&&e.jsx(ee,{}),(s==0||s==-1)&&!d&&!p&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"terms_info pt-3 pb-5",children:["By signing up, you accept the"," ",e.jsx("button",{onClick:()=>{x("/view-cms/terms-and-condition"),m(!1),u(!1)},className:"link",children:e.jsx("b",{children:"Terms of Use"})})]}),e.jsxs("h6",{className:"footer_text text-center",children:["Already have an account?"," ",e.jsx("span",{className:"link",onClick:()=>{m(!1),u(!0)},children:e.jsx("b",{children:"Sign in"})})]})]})]})}function ne({open:t,onClose:h,role:s}){const f=/^(?:(?:\+|0{0,2})91(\s*[\-]\s*)?|[0]?)?[6789]\d{9}$/,x={name:"",phone_number:""},m=T().shape({name:b().required("Please enter your name"),phone_number:b().required("Phone number is not valid").matches(f,"Please enter valid mobile number"),recaptcha:L().oneOf([!0],"Field must be checked").required("")});return e.jsx("div",{className:"signup_form_recruiter",children:e.jsx("div",{className:"form__container",children:e.jsx(E,{initialValues:x,validationSchema:m,onSubmit:(u,d)=>{M.createLeads(u).then(p=>{d.resetForm(),d.setSubmitting(!1)})},children:({errors:u,handleBlur:d,handleChange:p,handleSubmit:j,touched:N,isValid:n,setFieldValue:r,values:l,isSubmitting:o})=>e.jsx("div",{className:"signup__form",children:e.jsx(A,{onClick:()=>{j()},isRecruiter:!0,role:s,onClose:h})})})})})}function ie({openVerify:t,role:h}){const{setSignup:s}=a.useContext(v),f={first_name:"",email:"",password:"",otp:""},x=T().shape({first_name:b().required("Please enter first name"),email:b().required("Please enter you email").email("Please enter valid email"),password:b().min(8).matches("^.*[0-9].*$","Atleast one number required").matches("^.*[a-zA-Z].*$","Atleast one letter required").required("Password is required")});return e.jsx("div",{className:"form__container",children:e.jsx(E,{initialValues:f,validationSchema:x,onSubmit:m=>{M.createSignup(m).then(u=>{s(u.data.user),t(!0)})},children:({errors:m,handleBlur:u,handleChange:d,handleSubmit:p,touched:j,isValid:N,values:n})=>e.jsx("div",{className:"signup__form",children:e.jsx(A,{onClick:()=>{p()},role:h})})})})}const le=G(e.jsx("path",{d:"M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z"}));function je({open:t,onClose:h}){const{pathname:s}=H(),{signInTabs:f,setSignInTabs:x,isResetPopup:m,setIsResetPopup:u,submitted:d,resetSubmitted:p,setResetSubmittedState:j}=a.useContext(v),[N,n]=a.useState(t),[r,l]=a.useState(!1),[o,c]=a.useState(-1);a.useEffect(()=>{c(s==="/talents"||s==="/talents/"?0:s==="/recruiters"||s==="/recruiters/"?1:-1)},[s]);const g=()=>{n(!1),h(!1),x(null),s=="/"&&c(-1),u(!1)},i=()=>{l(!0),g()};a.useEffect(()=>{n(t)},[t]),a.useEffect(()=>{f==="recruiter"&&c(1)},[f]);const w=()=>{},P=()=>{c(-1),u(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(J,{open:r,onClose:()=>{n(!1),l(!1)},back:()=>{n(!0),l(!1)}}),e.jsx("div",{className:N?"overlay block":"hidden",onClick:g}),e.jsxs("div",{className:N?"singup__screen signup_open":"singup__screen",children:[e.jsxs("div",{className:"signup__header flex justify-between items-center",children:[e.jsxs("h4",{className:"font-semibold text-gray-700 signup__title",children:[(m||d||p)&&e.jsx(le,{style:{marginRight:"10px",cursor:"pointer"},onClick:d?w:P}),m||p?"Reset Password":o>=0?`Sign Up as a ${o==1?"Recruiter":"Talent"}`:"Select your role below"]}),e.jsx(Y,{className:"close_icon",onClick:g})]}),!m&&e.jsx("div",{style:{marginBottom:25},className:s==="/talents"||s==="/talents/"||s==="/recruiters"||s==="/recruiters/"?"role_selecter1 role_selecter1out
1s":" role_selecter1",children:e.jsxs(se,{row:!0,"aria-labelledby":"demo-row-radio-buttons-group-label",name:"use-radio-group",value:o,onChange:_=>{c(_.target.value)},children:[s!=="/recruiter"&&s!=="/recruiters/"&&e.jsx(I,{value:0,control:e.jsx(B,{}),label:"Iâm a Talent",size:"small",className:o==0?"active_customradio":"talent",disabled:s==="/recruiter"||s==="/recruiters/"}),s!=="/talents"&&s!=="/talents/"&&e.jsx(I,{value:1,className:o==1?"active_customradio":"recruiter",control:e.jsx(B,{}),label:"Iâm a Recruiter",size:"small",disabled:s==="/talents"||s==="/talents/"})]})}),e.jsx("div",{className:`form__container ${o==0||o==1?"":"disabledform__container"}`,children:o==1?e.jsx(ne,{open:r,onClose:()=>{n(!1),l(!1)},role:o}):e.jsx(ie,{openVerify:()=>{i()},role:o})})]})]})}export{je as default};
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.