PageSourceSearch

https://www.callings.ai/assets/talents.index.lazy-CBl2qkvA.js

js callings.ai collected 2026-10-05 11:54:17 UTC 12,343 bytes, 1 lines download raw bytes

1import{r as a,j as e,M,bI as P,h as T,F as p,A as j,I as f,k as b,B as y,c as z,ac as A,s as q,C as F,d as W}from"./index-D5TufL99.js";import{p as _,a as I,b as V,c as D,d as L,e as N,f as Y}from"./talentService-BTIIMg-3.js";import{R as C}from"./EyeTwoTone-DEqzQeMS.js";const{Text:S}=T;function w(l,t){const c=l;return c?.response?.data?.error||c?.message||t}const u="#037DB2",U=({open:l,initialMode:t="signin",resetToken:c,resetEmail:m,onClose:d,onSuccess:n})=>{const[s,i]=a.useState(t);a.useEffect(()=>{l&&i(t)},[l,t]);const r=s==="signup"?"Create your recruiter account":s==="forgot"?"Reset your password":s==="reset"?"Set a new password":s==="verify"?"Verify your email":"Sign in to Find Candidates";return e.jsxs(M,{open:l,onCancel:d,footer:null,destroyOnClose:!0,maskClosable:!0,centered:!0,width:420,title:null,closable:!0,children:[e.jsxs("div",{style:{textAlign:"center",padding:"8px 8px 0"},children:[e.jsx("img",{src:P,alt:"Callings.ai",style:{height:36,marginBottom:6}}),e.jsx("div",{style:{fontSize:11,fontWeight:600,letterSpacing:"0.12em",textTransform:"uppercase",color:u,marginBottom:12},children:"for Recruiters"}),e.jsx("h2",{style:{margin:0,fontSize:22,fontWeight:600},children:r}),e.jsx(S,{type:"secondary",style:{display:"block",marginTop:6,marginBottom:20},children:"Recruiter access for the Callings.ai talent search pilot."})]}),s==="signin"&&e.jsx($,{onSuccess:n,onSwitchToSignUp:()=>i("signup"),onForgot:()=>i("forgot")}),s==="signup"&&e.jsx(O,{onSuccess:n,onSwitchToSignIn:()=>i("signin")}),s==="forgot"&&e.jsx(H,{onBack:()=>i("signin")}),s==="reset"&&e.jsx(G,{token:c||"",email:m,onSuccess:n,onBack:()=>i("signin")}),s==="verify"&&e.jsx(J,{token:c||"",email:m,onSuccess:n,onBack:()=>i("signin")}),s==="signup"&&e.jsx("p",{style:{marginTop:12,marginBottom:0,fontSize:12,color:"#8c8c8c",textAlign:"center"},children:"New accounts are reviewed and activated manually for the pilot."})]})};function $({onSuccess:l,onSwitchToSignUp:t,onForgot:c}){const[m,d]=a.useState(!1),[n,s]=a.useState(null),i=async r=>{s(null),d(!0);try{await _({email:r.email.trim().toLowerCase(),password:r.password}),l()}catch(o){s(w(o,"Invalid email or password"))}finally{d(!1)}};return e.jsxs(p,{layout:"vertical",onFinish:i,requiredMark:!1,disabled:m,size:"large",children:[n&&e.jsx(j,{type:"error",showIcon:!0,message:n,style:{marginBottom:16}}),e.jsx(p.Item,{name:"email",rules:[{required:!0,message:"Email is required"},{type:"email",message:"Enter a valid email"}],children:e.jsx(f,{placeholder:"Email",autoComplete:"email"})}),e.jsx(p.Item,{name:"password",rules:[{required:!0,message:"Password is required"}],children:e.jsx(f.Password,{placeholder:"Password",autoComplete:"current-password",iconRender:r=>r?e.jsx(C,{}):e.jsx(b,{})})}),e.jsx("div",{style:{textAlign:"right",marginTop:-8,marginBottom:12},children:e.jsx("a",{onClick:r=>{r.preventDefault(),c()},style:{fontSize:13},children:"Forgot password?"})}),e.jsx(y,{type:"primary",htmlType:"submit",loading:m,block:!0,style:{background:u,borderColor:u,height:44,fontWeight:600},children:"Sign in"}),e.jsxs("p",{style:{textAlign:"center",marginTop:16,marginBottom:0},children:["Don't have an account?"," ",e.jsx("a",{onClick:r=>{r.preventDefault(),t()},children:"Sign up"})]})]})}function O({onSuccess:l,onSwitchToSignIn:t}){const[c,m]=a.useState(!1),[d,n]=a.useState(null),[s,i]=a.useState(null),[r,o]=a.useState(!1),[g,h]=a.useState("idle"),B=async x=>{n(null),m(!0);try{const k=x.email.trim().toLowerCase(),R={email:k,password:x.password,first_name:x.first_name?.trim()||null,last_name:x.last_name?.trim()||null,company_name:x.company_name?.trim()||null},E=await V(R);i(k),o(!!E.verification_email_sent)}catch(k){n(w(k,"Sign-up failed"))}finally{m(!1)}},v=async()=>{if(!(!s||g==="sending")){h("sending");try{await I({email:s})}catch{}finally{h("sent")}}};return s?e.jsxs("div",{children:[e.jsx(j,{type:"success",showIcon:!0,message:"Check your email",description:r?`We sent a verification link to ${s}. Click the link to verify your email, then sign in.`:"Your account was created. We could not send the verification email automatically -- please contact support if you do not receive one shortly.",style:{marginBottom:16}}),e.jsx(y,{block:!0,size:"large",onClick:v,loading:g==="sending",disabled:g==="sent",style:{height:44,marginBottom:12},children:g==="sent"?"Verification email resent":"Resend verification email"}),e.jsx(y,{type:"primary",block:!0,size:"large",onClick:t,style:{background:u,borderColor:u,height:44,fontWeight:600},children:"Back to sign in"}),e.jsx("p",{style:{marginTop:16,marginBottom:0,fontSize:12,color:"#8c8c8c",textAlign:"center"},children:"Find Candidates unlocks once your pilot subscription is activated."})]}):e.jsxs(p,{layout:"vertical",onFinish:B,requiredMark:!1,disabled:c,size:"large",children:[d&&e.jsx(j,{type:"error",showIcon:!0,message:d,style:{marginBottom:16}}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:[e.jsx(p.Item,{name:"first_name",style:{marginBottom:12},children:e.jsx(f,{placeholder:"First name",autoComplete:"given-name"})}),e.jsx(p.Item,{name:"last_name",style:{marginBottom:12},children:e.jsx(f,{placeholder:"Last name",autoComplete:"family-name"})})]}),e.jsx(p.Item,{name:"company_name",style:{marginBottom:12},children:e.jsx(f,{placeholder:"Company",autoComplete:"organization"})}),e.jsx(p.Item,{name:"email",rules:[{required:!0,message:"Email is required"},{type:"email",message:"Enter a valid email"}],style:{marginBottom:12},children:e.jsx(f,{placeholder:"Work email",autoComplete:"email"})}),e.jsx(p.Item,{name:"password",rules:[{required:!0,message:"Password is required"},{min:8,message:"At least 8 characters"}],children:e.jsx(f.Password,{placeholder:"Password (min 8 characters)",autoComplete:"new-password",iconRender:x=>x?e.jsx(C,{}):e.jsx(b,{})})}),e.jsx(y,{type:"primary",htmlType:"submit",loading:c,block:!0,style:{background:u,borderColor:u,height:44,fontWeight:600},children:"Create account"}),e.jsxs("p",{style:{textAlign:"center",marginTop:16,marginBottom:0},children:["Already have an account?"," ",e.jsx("a",{onClick:x=>{x.preventDefault(),t()},children:"Sign in"})]})]})}function H({onBack:l}
1){const[t,c]=a.useState(!1),[m,d]=a.useState(null),[n,s]=a.useState(null),i=async r=>{d(null),s(null),c(!0);try{const o=await D({email:r.email.trim().toLowerCase()});s(o.message||"If the email address exists, a password reset link has been sent.")}catch(o){d(w(o,"Could not send reset email"))}finally{c(!1)}};return n?e.jsxs("div",{children:[e.jsx(j,{type:"success",showIcon:!0,message:"Check your email",description:n,style:{marginBottom:16}}),e.jsx(y,{block:!0,size:"large",onClick:l,style:{height:44},children:"Back to sign in"})]}):e.jsxs(p,{layout:"vertical",onFinish:i,requiredMark:!1,disabled:t,size:"large",children:[e.jsx(S,{type:"secondary",style:{display:"block",marginBottom:16},children:"Enter the email associated with your recruiter account and we will send you a link to reset your password."}),m&&e.jsx(j,{type:"error",showIcon:!0,message:m,style:{marginBottom:16}}),e.jsx(p.Item,{name:"email",rules:[{required:!0,message:"Email is required"},{type:"email",message:"Enter a valid email"}],children:e.jsx(f,{placeholder:"Email",autoComplete:"email"})}),e.jsx(y,{type:"primary",htmlType:"submit",loading:t,block:!0,style:{background:u,borderColor:u,height:44,fontWeight:600},children:"Send reset link"}),e.jsx("p",{style:{textAlign:"center",marginTop:16,marginBottom:0},children:e.jsx("a",{onClick:r=>{r.preventDefault(),l()},children:"Back to sign in"})})]})}function G({token:l,email:t,onSuccess:c,onBack:m}){const[d,n]=a.useState(!1),[s,i]=a.useState(null),r=async o=>{if(i(null),o.password!==o.confirm){i("Passwords do not match");return}if(!l){i("Reset token is missing. Please request a new reset email.");return}n(!0);try{await L({token:l,password:o.password}),c()}catch(g){i(w(g,"The password reset link is invalid or has expired."))}finally{n(!1)}};return e.jsxs(p,{layout:"vertical",onFinish:r,requiredMark:!1,disabled:d,size:"large",children:[t&&e.jsxs(S,{type:"secondary",style:{display:"block",marginBottom:12},children:["Resetting password for ",e.jsx("strong",{children:t})]}),s&&e.jsx(j,{type:"error",showIcon:!0,message:s,style:{marginBottom:16}}),e.jsx(p.Item,{name:"password",rules:[{required:!0,message:"New password is required"},{min:8,message:"At least 8 characters"}],children:e.jsx(f.Password,{placeholder:"New password",autoComplete:"new-password",iconRender:o=>o?e.jsx(C,{}):e.jsx(b,{})})}),e.jsx(p.Item,{name:"confirm",dependencies:["password"],rules:[{required:!0,message:"Please confirm your new password"}],children:e.jsx(f.Password,{placeholder:"Confirm new password",autoComplete:"new-password",iconRender:o=>o?e.jsx(C,{}):e.jsx(b,{})})}),e.jsx(y,{type:"primary",htmlType:"submit",loading:d,block:!0,style:{background:u,borderColor:u,height:44,fontWeight:600},children:"Set new password"}),e.jsx("p",{style:{textAlign:"center",marginTop:16,marginBottom:0},children:e.jsx("a",{onClick:o=>{o.preventDefault(),m()},children:"Back to sign in"})})]})}function J({token:l,email:t,onSuccess:c,onBack:m}){const[d,n]=a.useState("verifying"),[s,i]=a.useState(null),[r,o]=a.useState("idle");a.useEffect(()=>{let h=!1;return(async()=>{if(!l){i("Verification token is missing. Please use the link from your email."),n("error");return}try{await N({token:l}),h||n("success")}catch(v){h||(i(w(v,"The verification link is invalid or has expired.")),n("error"))}})(),()=>{h=!0}},[l]);const g=async()=>{if(!(!t||r==="sending")){o("sending");try{await I({email:t})}catch{}finally{o("sent")}}};return d==="verifying"?e.jsx("div",{style:{textAlign:"center",padding:"12px 0"},children:e.jsx(S,{type:"secondary",children:"Verifying your email..."})}):d==="success"?e.jsxs("div",{children:[e.jsx(j,{type:"success",showIcon:!0,message:"Email verified",description:t?`${t} has been verified. You can now sign in.`:"Your email has been verified. You can now sign in.",style:{marginBottom:16}}),e.jsx(y,{type:"primary",block:!0,size:"large",onClick:m,style:{background:u,borderColor:u,height:44,fontWeight:600},children:"Continue to sign in"})]}):e.jsxs("div",{children:[e.jsx(j,{type:"error",showIcon:!0,message:"Verification failed",description:s||"The verification link is invali
1d or has expired.",style:{marginBottom:16}}),t&&e.jsx(y,{block:!0,size:"large",onClick:g,loading:r==="sending",disabled:r==="sent",style:{height:44,marginBottom:12},children:r==="sent"?"Verification email resent":"Resend verification email"}),e.jsx(y,{type:"primary",block:!0,size:"large",onClick:m,style:{background:u,borderColor:u,height:44,fontWeight:600},children:"Back to sign in"})]})}const{Title:K,Paragraph:Q}=T,se=z("/talents/")({component:X});function X(){const l=A(),t=q({from:"/talents/"}),c=a.useRef(!1);a.useEffect(()=>{c.current||t.mode||t.token||(c.current=!0,Y().then(()=>{window.location.replace("/talents/console")}).catch(()=>{c.current=!1}))},[t.mode,t.token]);const m=t.mode==="signup"?"signup":t.mode==="forgot"?"forgot":t.mode==="reset"?"reset":t.mode==="verify"?"verify":"signin",d=t.mode==="signin"||t.mode==="signup"||t.mode==="forgot"||t.mode==="reset"||t.mode==="verify",[n,s]=a.useState(void 0);a.useEffect(()=>{d&&s(t.next)},[d,t.next]);const i=a.useMemo(()=>()=>{const g=n&&n.startsWith("/talents")?n:"/talents/console";window.location.replace(g)},[n]),r=g=>{l({to:"/talents",search:h=>({...h,mode:g})})},o=()=>{l({to:"/talents",search:g=>{const h={...g};return delete h.mode,delete h.token,delete h.email,h}})};return e.jsxs("div",{style:{minHeight:"100vh",background:"#f5f7fa",display:"flex",alignItems:"center",justifyContent:"center",padding:24},children:[e.jsxs(F,{style:{maxWidth:560,width:"100%",textAlign:"center"},children:[e.jsx(K,{level:2,style:{marginBottom:8},children:"Find Candidates"}),e.jsx(Q,{type:"secondary",style:{marginBottom:24},children:"Source the right people for your roles with Callings.ai. A private pilot for recruiters and hiring managers."}),e.jsxs(W,{size:"middle",children:[e.jsx(y,{type:"primary",size:"large",onClick:()=>r("signin"),style:{background:"#037DB2",borderColor:"#037DB2"},children:"Sign in"}),e.jsx(y,{size:"large",onClick:()=>r("signup"),children:"Create account"})]})]}),e.jsx(U,{open:d,initialMode:m,resetToken:t.token,resetEmail:t.email,onClose:o,onSuccess:i})]})}export{se as Route};

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.