PageSourceSearch

https://avua.com/assets/CreateResume-CClhM6JZ.js

js avua.com collected 2026-09-24 12:54:10 UTC 113,800 bytes, 4 lines download raw bytes

1import{u as Le,j as e,c as r,t as Ee,b as _e,a5 as oe,aa as ae,ae as U,dq as Rt,dr as It,ds as Dt,dt as At,du as qt,dv as Tt,i as Se,e as Ae,bh as Lt,bp as ut,dw as Xe,dx as ue,bv as lt,B as Vt,A as Bt,f as Ot,c9 as Ut,y as ce,af as Ze,dy as Yt,dz as Mt,dA as Gt,dB as Ht,cu as dt,cw as Wt,dC as pt,cx as zt,dD as Qt,dE as $t,dF as xt,cv as Jt,dG as Kt,dH as qe,ac as mt,dI as Xt,bI as fe,dJ as he,dK as Zt,bx as es,dL as ts,dM as ss,dN as ls,dO as as,bG as ns,v as ft,dP as rs,dQ as os,dR as is,dS as cs,dT as us,bF as ds,ck as ps,dU as te,dV as je,dW as xs,dX as ms,h as at,cL as fs,aA as hs,aB as bs}from"./index-B9q78oLf.js";import{e as vs}from"./index.esm-Bhgyfkla.js";import{T as X}from"./TextInputField-DNJqyglp.js";import{N as ht}from"./NextBtn-ePTLzLbY.js";/* empty css                            */import{R as nt}from"./react-country-flag.esm-CBTvU6qH.js";import{c as gs}from"./countryPhoneCodes-CKP6OwhM.js";import{A as J}from"./AddBtn-DrQHE5z3.js";import{B as js}from"./BackBtn-xtlpGWC4.js";import{N as ys}from"./NationalitySearchInput-B2rGg5sa.js";import{L as ws}from"./LocationCountryInput-Bs7vZNSn.js";import{L as Ns,C as Te}from"./LanguageComponent-BbHRIYVj.js";import"./index-4bdnOsvc.js";import"./SalaryDropDown-BJEynQeb.js";import{g as rt}from"./CurrencySalaryDropdown-YciAkfHL.js";import{M as bt}from"./MultiButtonField-zu1mDuZR.js";import{L as _s}from"./LocationSearchInput-B6D4CweL.js";import{S as vt}from"./SeachSkillInput-g_ejobd5.js";/* empty css                     */import{D as gt}from"./DropdownField-B2-c6sm_.js";import{D as Ce}from"./DatePickerField-Dy7KZEHe.js";import{C as ks}from"./CommonHeader-8Py0L8jL.js";import Cs from"./RealTimeResume-Cg-4zE_H.js";import"./DatePicker-QPwJfQzJ.js";import"./unsupportedIterableToArray-yxopmGhp.js";import"./inheritsLoose-DR8r8Ogv.js";import"./dashboard-BaS_FCEE.js";import"./moment-BJba-qMG.js";const jt=({handler:i})=>{const h=Le(),y=()=>{h("/dashboard")};return e.jsx("button",{type:"button",onClick:y,className:" text-caption text-darkPurple hover:scale-110 transition-all duration-200 active:scale-100",children:"I will do this later"})},Re=({handlePrevPage:i,handleNextPage:h})=>e.jsxs("div",{className:"w-full flex flex-col md:flex-row justify-between items-center mt-12",children:[e.jsx(jt,{}),e.jsxs("div",{className:"flex space-x-4 mt-3 md:mt-0",children:[e.jsx(js,{handlePrevPage:i}),e.jsx(ht,{type:"submit",handleNextPage:h})]})]}),Ss={toolbar:[["bold","italic","underline"],[{list:"bullet"}]]},Es=()=>{const i=r.useRef(),h=Le(),y=Ee(),P=_e(C=>C.auth.token),[w,_]=r.useState(null),[f,v]=r.useState(!1),x=oe({initialValues:{first_name:"",last_name:"",profile_pic_path:"",introduction:""},validationSchema:ae({first_name:U().max(20,"Name must be 20 characters or less.").required("First Name is required"),introduction:U().min(100,"Introduction must be 100 characters or more.")}),onSubmit:C=>{console.log("form submitted"),console.log(C)}}),b=async()=>{try{const S=(await ut(P)).data.data,K=S?.dob?new Date(S.dob).toISOString().split("T")[0]:"";x.setValues({...x.values,first_name:S?.first_name||"",last_name:S?.last_name||"",profile_pic_path:S?.image_url||null,introduction:S?.introduction||null})}catch{console.log("error fetching profile")}},j=async()=>{if(!x.errors.first_name)try{const C=await Xe(x.values,P);console.log("user data updated : ",C),window.scrollTo(0,0),y(ue("contactInfo"))}catch(C){console.log("error updating profile : ",C.response.data)}},d=async C=>{let S;if(C.size>5*1024*1024)throw lt.warning("image size should be less than 5 MB"),new Error("File size exceeds 5 MB.");if(!["image/jpeg","image/jpg","image/png"].includes(C.type))throw lt.warning("Only .jpeg .jpg formats permitted"),new Error("Invalid file format. Only JPEG and JPG formats are allowed.");v(!0);const Y=Vt(C.name);try{const m=await Bt(Y,"profile_pic",P);console.log("Presigned URL : ",m.data),S=m.data.data}catch(m){console.log("ERROR getting presigned URL : ",m);return}try{console.log("Presigned URL : ",S);const m=await Ot.put(S.url,C,{headers:{"Content-Type":"image/jpg"},onUploadProgress:A=>{const p=Math.round(A.loaded*100/A.total);console.log(`Upload progress: ${p}%`)}});console.log("uploaded on S3 : ",m)}catch(m){console.log("ERROR uploading image on S3 : ",m);return}const k=x.values;k.profile_pic_path=S.path,console.log("PATCH DETAILS : ",k);try{const m=await Xe(k,P);h("/create-resume")}catch(m){console.log("ERROR patching data to backend : ",m);return}b()},a=async()=>{i.current&&(i.current.value="");const C=x.values;C.profile_pic_path=null,console.log("DELETE IMG PATCH DETAILS : ",C);try{const S=await Xe(C,P);h("/create-resume")}catch(S){console.log("ERROR patching data to backend : ",S);return}v(!1),b()},z=C=>{_(C.target.files[0]);const S=C.target.files[0];S&&d(S)},n=C=>{console.log("EVENT : ",C),C=="<p><br></p>"||C==""?x.setFieldValue("introduction",null):x.setFieldValue("introduction",C)};return r.useEffect(()=>{b()},[]),r.useEffect(()=>{y(Rt(x.values.first_name+" "+x.values.last_name)),y(It(x.values.first_name)),y(Dt(x.values.last_name))},[x.values.first_name,x.values.last_name]),r.useEffect(()=>{console.log("FORMIK VALUES : ",x.values),y(At(x.values.introduction))},[x.values.introduction]),e.jsxs("div",{className:"w-[560px] min-h-[1000px] flex flex-col pr-10 mt-12",children:[e.jsx("p",{className:"w-full text-h4 text-pureBlack  font-poppins font-[500] mb-7",children:"Let employers know who you are"}),e.jsxs("form",{onSubmit:x.handleSubmit,className:"bg-white w-full flex flex-col rounded-lg",children:[e.jsxs("div",{className:"w-full h-full flex",children:[e.jsxs("div",{className:"w-[50%] md:w-[30%] flex justify-center items-center mt-10 md:mt-0",children:[e.jsx("div",{onClick:()=>i.current.click(),className:x.values.profile_pic_path?"w-[140px] h-[140px] border border-purple roun
1ded-full flex justify-center items-center":"w-[120px] md:w-[140px] h-[120px] md:h-[140px] bg-lightPurple rounded-full flex justify-center items-center cursor-pointer hover:scale-105 transition-all duration-200 active:scale-100 relative",style:{backgroundImage:`url(${x.values.profile_pic_path})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"},children:x.values?.profile_pic_path?e.jsx("div",{onClick:C=>{a(),C.stopPropagation()},className:" flex justify-center items-center mt-auto ml-auto mr-2 mb-2 w-6 h-6 rounded-full bg-red bg-opacity-100 hover:scale-110 transition-all duration-200 active:scale-100",children:e.jsx(qt,{color:"#FFFFFF",strokeWidth:.2})}):e.jsxs(e.Fragment,{children:[e.jsx(Tt,{height:"101%",width:"101%",color:"#E5D7FF",wrapperStyle:{},wrapperClass:"absolute",visible:f,ariaLabel:"oval-loading",secondaryColor:"#6F3EB2",strokeWidth:1,strokeWidthSecondary:1}),e.jsx("img",{src:Se.Profile.plus_icon,className:"w-[32px] h-[32px]",alt:"add image icon"})]})}),e.jsx("input",{type:"file",accept:"image/jpeg, image/png",onChange:z,style:{display:"none"},ref:i})]}),e.jsxs("div",{className:"w-[70%] h-full",children:[e.jsx(X,{label:"First Name",name:"first_name",value:x.values.first_name,onChange:x.handleChange,mandatory:!0,error:x.touched.first_name&&x.errors.first_name?x.errors.first_name:"",placeholder:"First name"}),e.jsx(X,{label:"Last Name",name:"last_name",value:x.values.last_name,onChange:x.handleChange,error:x.touched.last_name&&x.errors.last_name?x.errors.last_name:"",placeholder:"Last name"})]})]}),e.jsxs("div",{className:"h-[300px] flex flex-col justify-center items-center",children:[e.jsxs("label",{htmlFor:"introduction",className:"w-full text-start text-subtitle2 font-poppins pb-2 flex justify-between items-center font-[500]",children:[e.jsxs("p",{className:"flex justify-center items-center",children:["Introduction ",e.jsx(vs,{className:"ml-2"})]}),e.jsx("p",{className:"text-red text-[10px] mt-1",children:"min 100 characters *"})]}),e.jsx(Ae,{style:{height:"200px",width:"100%"},theme:"snow",name:"introduction",value:x.values.introduction,onChange:C=>n(C),modules:Ss})]}),e.jsxs("div",{className:"w-full flex justify-between items-center mt-12",children:[e.jsx(jt,{}),e.jsx("div",{className:"flex space-x-4 ",children:e.jsx(ht,{type:"submit",handleNextPage:j})})]})]}),e.jsx(Lt,{position:"bottom-right"})]})},Fs=({data:i,label:h,name:y,cid:P,phoneData:w,changeNumber:_,error:f,placeholder:v,disabled:x,changeCountry:b,isLoading:j,isRegister:d=!1,isUpdate:a=!1})=>{const[z,n]=r.useState(P?i.find(L=>L.phone===P):i[0]),[C,S]=r.useState(z.phoneLength||10),[K,Y]=r.useState(!1),[k,m]=r.useState(i),[A,p]=r.useState(""),F=r.useRef();r.useEffect(()=>{const L=i.find(se=>se.phone===P);L&&(n(L),S(L.phoneLength||10))},[P,i]);const I=L=>{const se=i.find(re=>re.phone===L);n(se),S(se.phoneLength||10),b(L),p(""),m(i),Y(!1)},ie=L=>{const se=L.target.value;_(se,z.phoneLength)},de=()=>{Y(L=>!L)},ke=L=>{const se=L.target.value.toLowerCase();p(se);const re=i.filter(o=>o.label.toLowerCase().includes(se)||o.phone.includes(se));m(re)};return r.useEffect(()=>{let L=se=>{F.current&&!F.current.contains(se.target)&&Y(!1)};document.addEventListener("mousedown",L)}),e.jsxs("div",{className:"w-full flex flex-col mt-[14px]",ref:F,children:[e.jsxs("label",{htmlFor:y,className:"block text-subtitle2 font-poppins font-[500] pb-2",children:[h,e.jsx("span",{className:" ml-1",children:"*"})]}),e.jsx("div",{className:`relative flex items-center w-full h-[40px] ${a?"rounded-md":"rounded-[10px]"}  font-normal border px-2 
2          focus:outline-none  placeholder:text-body-1 bg-white
3        `,children:j?e.jsx(e.Fragment,{}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"",children:[e.jsxs("div",{className:"flex items-center cursor-pointer",onClick:de,children:[e.jsx(nt,{countryCode:z.code,"aria-label":z.label,svg:!0,className:"mr-2"}),e.jsx("span",{className:"whitespace-nowrap w-fit mr-5px",children:z.phone}),e.jsx(Ut,{className:"h-8 w-8 text-black"})]}),K&&e.jsx("div",{className:"absolute top-12 right-0 left-0 pb-10 z-10",children:e.jsxs("div",{className:"bg-[#f8f9fe] border border-gray-300 rounded-md shadow-lg w-full",children:[e.jsx("input",{type:"text",className:"p-2 placeholder:text-[14px] text-black w-full rounded-md border focus:outline-none",placeholder:"Search by country name or code...",value:A,onChange:ke}),e.jsx("div",{className:"p-2 overflow-auto max-h-60",children:k.map(L=>e.jsxs("div",{onClick:()=>I(L.phone),className:"flex items-center p-1 text-[14px] hover:bg-white cursor-pointer border-b border-grayLight",children:[e.jsx(nt,{countryCode:L.code,"aria-label":L.label,svg:!0,className:"mx-2"}),e.jsxs("span",{children:[L.label," (",L.phone,")"]})]},L.code))})]})})]}),e.jsx("input",{className:"border-none rounded-[10px] bg-white focus:outline-none focus:bg-white  w-full placeholder:text-[14px]",type:"text",maxLength:C,name:y,placeholder:`${v} - ${C} digit`,value:w?w.number:"",onChange:ie})]})}),e.jsx("p",{className:"text-red text-caption",children:f})]})},Ps=({portfolioData:i,updatePortfolioField:h,error:y,setError:P})=>{const[w,_]=r.useState(i),f=()=>{const b=[...w,{name:"",url:""}];_(b),h(b)},v=b=>{P("");const j=[...w];j.splice(b,1),_(j),h(j)},x=(b,j)=>{P("");const d=[...w];d[b][j.target.name]=j.target.value,_(d),h(d)};return r.useEffect(()=>{_(i)},[i]),e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"w-full mt-7 flex justify-between",children:[e.jsx("p",{className:"text-h4  font-poppins text-pureBlack font-[500]",children:"Portfolio Link"}),e.jsx(J,{type:"button",handler:f})]}),e.jsx("p",{className:"font-poppins text-body1 text-pureBlack mt-3",children:'If you include your portfolio link and then click the "Add" button'}),e.jsx("p",{className:"font-poppins text-body1 text-lightGray ",children:"(for platforms like LinkedIn, Behance, GitHub)."}),w.length>0&&e.jsxs("div",{className:"flex mt-6 w-full",children:[e.jsxs("p",{className:"font-poppins text-body1 text-pureBlack w-1/3 mr-3",children:["Name",e.jsx("span",{className:"text-red ml-1",children:"*"})]}),e.jsxs("p",{className:"font-poppins text-body1 text-pureBlack w-2/3",children:["URL",e.jsx("span",{className:"text-red ml-1",children:"*"})]}),e.jsx("p",{className:"w-[43px] h-1 ml-1"})]}),w.map((b,j)=>e.jsxs("div",{className:"flex mt-3 justify-start items-center",children:[e.jsx("input",{type:"text",name:"name",value:b.name,onChange:d=>x(j,d),placeholder:"Name",className:"border-[1px] border-sandDune hover:border-pureBlack p-2 rounded-md w-1/3 outline-purple px-[14px] py-2 mr-2"}),e.jsx("div",{className:"border-[1px] border-sandDune hover:border-pureBlack p-2 rounded-md w-2/3 outline-purple px-[14px] py-2 flex justify-between items-center",children:e.jsx("input",{type:"text",name:"url",value:b.url,onChange:d=>x(j,d),placeholder:"URL",className:"w-full outline-none"})}),e.jsx("div",{className:"ml-1 bg-red bg-opacity-20 rounded-md w-[43px] h-[42px] flex justify-center items-center hover:scale-105 active:scale-100 duration-100 transition-all",children:e.jsx(ce,{color:"#e55451",className:"w-[25px] h-[25px]",onClick:()=>v(j)})})]},j)),y&&e.jsx("p",{className:"text-red mt-3 text-caption",children:y})]})},Rs=({geoResponse:i})=>{const h=Ee(),y=_e(p=>p.auth.token),[P,w]=r.useState(""),[_,f]=r.useState(""),[v,x]=r.useState(""),[b,j]=r.useState({id:"",name:"",code:"",nationality:""}),d=oe({initialValues:{job_location:{id:"",name:"",state:"",country:"",country_code:""},country:{id:"",name:"",code:""},phone:{id:"",cid:"",number:"",country_code:""},email:"",portfolio:[]},validationSchema:ae().shape({country:ae({id:U().required("Country is required")}),phone:ae({number:U().matches(/^\d+$/,"Phone Number must contain only digits").required("Phone Number is required")}),portfolio:Ze().of(ae().shape({name:U().required("Name is required"),url:U().required("URL is required").url("Invalid URL")}))}),onSubmit:p=>{console.log("form submitted"),console.log(p)}}),z=d.values?.job_location?.code?!Ht.some(F=>F.code===d.values?.job_location?.code):!1,n=()=>{window.scrollTo(0,0),h(ue("profile"))},C=p=>
3{j(p)},S=async()=>{console.log("api call");const p=y;if(d?.errors?.job_location?.id||d?.errors?.phone?.number){console.log(d.errors,"ERROERS");return}if(b.id==""&&z){w("Please select Nationality");return}if(d.values.portfolio.filter(ie=>!ie.url||!ie.name).length>0){f("Please fill in all portfolio link details");return}const I={phone:{cid:d.values?.phone?.cid,phone_number:d.values?.phone?.number,country_code:d.values?.phone?.country_code},location_id:d.values.job_location.id?d.values.job_location.id:null,country_id:b?.id&&z?b?.id:null,portfolio_links:d.values.portfolio};try{let ie;console.log("patching...."),ie=await Wt(I,p),window.scrollTo(0,0),h(ue("preferences"))}catch(ie){console.log("ERROR UPDATING CONTACT INFO",ie)}},K=p=>{d.setFieldValue("portfolio",p)},Y=p=>{d.setFieldValue("job_location",p);const F=[p.city,p.state,p.country].filter(Boolean).join(", ");x(F)},k=p=>{d.setValues({...d.values,phone:{...d.values.phone,cid:p,number:"",id:""}})},m=(p,F)=>{console.log("CODE : ",p,F),!(p.length>F)&&d.setValues({...d.values,phone:{...d.values.phone,number:p}})},A=async p=>{try{const I=(await dt(p)).data.data;d.setValues({...d.values,job_location:{id:I?.location?.id||"",name:I?.location?.name||"",state:I?.location?.state||"",country:I?.location?.country||"",code:I?.location?.country_code||""},country:{id:I?.country_details?.id||"",name:I?.country_details?.name||"",code:I?.country_details?.code||""},phone:{cid:I?.phone?.cid||"+91",country:I?.phone?.country_code,id:I?.phone?.id,number:I?.phone?.ph_number},email:I.email,portfolio:I?.portfolio_links||[]}),j({id:I.country_id,name:"",code:"",nationality:I.nationality})}catch(F){console.log("error fetching profile !! ",F)}};return r.useEffect(()=>{A(y)},[]),r.useEffect(()=>{const p=d?.values?.job_location.state?d?.values?.job_location?.state+", "+d?.values?.job_location.country:"";h(Yt(p))},[d?.values?.job_location]),r.useEffect(()=>{h(Mt(d.values.phone.cid+" "+d.values.phone.number))},[d.values.phone]),r.useEffect(()=>{const p=d.values.portfolio.map(F=>({name:F.name,url:F.url}));h(Gt(p))},[d.values.portfolio]),e.jsxs("div",{className:"w-[560px] min-h-[1000px] flex flex-col pr-10 mt-12",children:[e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] mb-7",children:"Contact Information"}),e.jsxs("form",{onSubmit:d.handleSubmit,className:"bg-white w-full flex flex-col  rounded-lg",children:[e.jsxs("div",{className:"w-full h-full  flex flex-col  md:flex-row justify-between",children:[e.jsx("div",{className:"w-full md:w-[49%]",children:e.jsx(Fs,{data:gs,label:"Phone Number",name:"phone.number",cid:d.values.phone.cid,phoneData:d.values.phone,changeNumber:m,error:d.touched.phone&&d?.errors?.phone?.number?d?.errors?.phone?.number:"",placeholder:"Phone number",changeCountry:k,isUpdate:!0})}),e.jsx("div",{className:"w-full md:w-[49%]",children:e.jsx(X,{disabled:!0,label:"Email",name:"email",value:d.values.email,onChange:d.handleChange,placeholder:"[email protected]",isPrefered:!0})})]}),e.jsx("div",{className:"w-full h-full  mt-7",children:e.jsx(ws,{label:"Location*",name:" job_location",inputStyle:" border border-sandDune hover:border-pureBlack p-2 rounded-md w-full outline-purple px-[14px] py-2",value:v||[d?.values?.job_location?.name,d?.values?.job_location?.state,d?.values?.job_location?.country].filter(Boolean).join(", "),onChange:p=>{const F=p.target.value;x(F),F.trim()===""&&d.setFieldValue("job_location",{id:"",city:"",state:"",country:"",code:""})},placeholder:"Enter location",saveLocation:Y,isPrefered:!1})}),z&&e.jsxs("div",{className:"mt-7",children:[e.jsx(ys,{label:"Nationality",name:"nationality",value:b.nationality,onChange:C,placeholder:"Select Nationality",saveCountry:C,isUpdate:!0}),P&&e.jsx("p",{className:" text-red font-poppins text-hint",children:P})]}),e.jsx("div",{className:"w-full",children:e.jsx(Ps,{portfolioData:d.values.portfolio,updatePortfolioField:K,error:_,setError:f})}),e.jsx(Re,{handlePrevPage:n,handleNextPage:S})]})]})},Is=({onSkillChange:i,roles:h,mandatory:y,isPrefered:P})=>{const w=_e(k=>k.auth.token),[_,f]=r.useState(""),[v,x]=r.useState([]),[b,j]=r.useState([]),[d,a]=r.useState(0),z=(k,m)=>{d!==0&&clearTimeout(d);const A=setTimeout(()=>n(k),600);a(A)},n=async k=>{try{const p=(await pt(k,w)).data.data;j(p)}catch(m){console.error("Error fetching skill suggestions:",m)}},C=async k=>{const{value:m}=k.target;f(m),console.log("QUERY :",!m),m?z(m):j([])},S=k=>{if(console.log("add: ",k,v),v?.length<5){const m=v.find(A=>A.id===k.id);console.log("existing : ",m),m||(x([...v,k]),f(""),j([]),i(k))}},K=k=>{const m=v.filter(A=>A!==k);i(k),x(m)},Y=()=>b?.length===0||_===""?null:(console.log("QUERY SUGGEST RENDER : ",b),e.jsx("div",{className:"relative max-h-[310px] z-40 left-0 mt-2 w-full bg-white border border-gray-300 shadow-xl rounded-sm overflow-scroll",children:b?.map((k,m)=>e.jsx("div",{className:"px-4 py-2 cursor-pointer hover:bg-gray-100 border-b",onClick:()=>S(k),children:k.title},m))}));return r.useEffect(()=>{x(h)},[h]),r.useEffect(()=>{const k=m=>{m.target.closest(".suggestion-dropdown")||j([])};return document.addEventListener("click",k),()=>{document.removeEventListener("click",k)}},[]),e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:" flex justify-between",children:[e.jsxs("label",{className:"flex space-x-2",children:[e.jsx("p",{className:` ${P?"block text-h5 font-poppins pb-2 font-[500]":"block text-subtitle2 font-poppins pb-2 font-[500]"}`,children:"Preferred Job Role"}),y?e.jsx("span",{className:"text-red ml-1",children:"*"}):""]}),e.jsx("span",{className:"text-caption mt-4",children:"Maximum 5"})]}),e.jsxs("div",{className:"border border-sandDune rounded focus:outline-none focus:shadow-outline flex flex-wrap items-center",children:[v?.map(k=>e.jsx("div",{className:"flex px-3 w-min-[50px] h-[25px] border bg-darkPurple roun
3ded-tr-lg rounded-bl-lg  justify-center items-center m-1 cursor-pointer",onClick:()=>K(k),children:e.jsxs("p",{className:" flex items-center justify-center text-center text-caption font-poppins text-white",children:[k.title,e.jsx(ce,{color:"#FF8383",className:"w-[15px] h-[15px] ml-1"})]})},k?.id)),e.jsx("input",{type:"text",placeholder:"Search...",className:"outline-none w-[250px] rounded py-2 px-4 flex flex-wrap",value:_,onChange:C,onKeyDown:C})]})]}),Y()]})},Ds=({geoResponse:i})=>{const h=Ee(),y=_e(V=>V.auth.token),[P,w]=r.useState(!1),[_,f]=r.useState(!1),[v,x]=r.useState(""),[b,j]=r.useState(!1),[d,a]=r.useState(!1),[z,n]=r.useState([]),[C,S]=r.useState(null),[K,Y]=r.useState([]),[k,m]=r.useState(0),[A,p]=r.useState(""),[F,I]=r.useState(""),[ie,de]=r.useState(""),[ke,L]=r.useState(!1),[se,re]=r.useState(!1),[o,l]=r.useState(!1),[g,O]=r.useState(""),[c,M]=r.useState(!1),[$,G]=r.useState(!1),[W,q]=r.useState("annually"),[T,H]=r.useState({id:"",city:"",state:"",country:"",code:""}),[pe,Q]=r.useState(rt("INR")),[Pe,me]=r.useState({first_name:"",last_name:"",seekPref:"",gender:"",dob:""}),[ge,Ve]=r.useState({phone:{id:"",cid:"",number:"",country_code:""},email:"",portfolio:[]}),[et,Be]=r.useState({id:"",salary:""}),[tt,Oe]=r.useState({id:"",salary:""}),le=oe({initialValues:{id:"",prefRole:[],prefLoc:[],jobPref:[],openToReloc:!1,empMode:[],salaryType:null,currency:null,currencyId:null,noticePeriod:null,languages:[]},validationSchema:ae().shape({prefRole:Ze().min(1,"Select a role from the suggested list only")}),onSubmit:V=>{console.log("form submitted :",V)}}),Ue=async()=>{try{const B=(await ut(y)).data.data,D=B?.dob?new Date(B.dob).toISOString().split("T")[0]:"";me({first_name:B.first_name,last_name:B.last_name,seekPref:B.job_seeking_status,gender:B.gender,dob:D})}catch(V){console.log(V)}},Ye=async()=>{try{const B=(await dt(y)).data.data;console.log("GET contact info : ",B),H({id:B?.location?.id||"",city:B?.location?.name||"",state:B?.location?.state||"",country:B?.location?.country||"",code:B?.location?.country_code||""});const D=B?.phone?.ph_number?{cid:B?.phone?.cid||"+91",country_code:B?.phone?.country_code,id:B?.phone?.id,number:B?.phone?.ph_number}:{cid:null,country_code:null,id:null,number:null};Ve({phone:D,email:B.email,portfolio:B?.portfolio_links||[]})}catch(V){console.log("error fetching profile !! ",V)}},Me=async()=>{try{const V=await xt(y);console.log(V),V.data.is_experienced===null?(w(!0),j(!1)):(w(V.data.is_experienced),j(!V.data.is_experienced))}catch(V){console.log(V)}},Ge=V=>{const B=Array.isArray(le.values.prefRole)?le.values.prefRole:[],D=B.some(xe=>xe.id===V.id);let ne;D?ne=B.filter(xe=>xe.id!==V.id):ne=[...B,V],le.setFieldValue("prefRole",ne)},Ie=V=>{if(console.log("form lng update : ",V),V.some(D=>!D.id)){x("Please select from the dropdown only");return}le.setFieldValue("languages",V),x("")},He=()=>{window.scrollTo(0,0),h(ue("contactInfo"))},We=async()=>{if(c&&O("please  select laguage Proficiency"),v||g||le.errors.prefRole)return;const V=le.values.prefRole.map(ne=>ne.title),B=le.values.languages.map(ne=>({language_id:ne.id,proficiency:ne.proficiency.toLowerCase()}));let D;le.values.id==="00000000-0000-0000-0000-000000000000"?D={job_roles:V,is_international:!1,open_to_relocate:!1,job_preferences:[],preferred_location:[],employment_mode:[],salary_type:null,currency_id:null,current_salary:0,expected_salary:0,notice_period:null,languages:B||[]}:D={id:le.values.id||"",job_roles:V,is_international:!1,open_to_relocate:!1,job_preferences:[],preferred_location:[],employment_mode:[],salary_type:null,currency_id:null,current_salary:0,expected_salary:0,notice_period:null,languages:B||[]};try{if(D.id){const ne=await zt(D,y);h(ue("experience"))}else{const ne=await Qt(D,y);h(ue("experience"))}window.scrollTo(0,0)}catch(ne){console.log("error updating preferences : ",ne)}},ze=V=>{switch(V){case 0:m(0);break;case 7:m(17);break;case 14:m(34);break;case 30:m(51);break;case 60:m(68);break;case 90:m(85);break;case 180:m(100);break}},Qe=async V=>{try{const D=(await Jt(V)).data.data;console.log("Getting user preferences...",D);const ne=D.languages?.map(xe=>({id:xe.id,language:xe.language,proficiency:xe.proficiency.charAt(0).toUpperCase()+xe.proficiency.slice(1)}));D.languages=ne,le.setValues({...le.values,id:D?.id||"",prefRole:D.job_roles||[],jobPref:D.job_prefrences||[],empMode:D.employment_mode||[],salaryType:D.salary_type,currencyId:D.currency_id?.id||"",currency:D.currency_id?.code||"",noticePeriod:D.notice_period.toString()||"",languages:D.languages||[]}),q(D.salary_type),Oe({id:D.expected_salary,salary:D.expected_salary||""}),Be({id:D.current_salary,salary:D.current_salary||""}),l(D?.open_to_relocate),G(D?.is_international),ze(D.notice_period)}catch(B){console.error("ERROR FETCHING USER PREFERENCES:",B)}},$e=async V=>{try{const D=(await $t(V)).data.data,ne=i?.country,xe=D.filter(Fe=>Fe.code==="INR"||Fe.code==="USD");Y(xe);let De=ne==="IN"?"INR":"USD",Ke=xe.find(Fe=>Fe.code===De).id;SalaryPref.setFieldValue("currency",De),SalaryPref.setFieldValue("currencyId",Ke)}catch{console.log("Currencies not found")}},Je=async()=>{$e(),Me(),Qe(y)};return r.useEffect(()=>{Je()},[]),r.useEffect(()=>{h(ue("preferences"))},[le.values.languages]),r.useEffect(()=>{Ue(),Ye()},[]),r.useEffect(()=>{Q(rt(T?.country==="India"?"INR":"USD",T?.code))},[T?.country]),e.jsxs("div",{className:"w-[560px] min-h-[1000px] flex flex-col pr-10 mt-12",children:[e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] mb-7",children:"Preferences"}),e.jsxs("form",{onSubmit:le.handleSubmit,className:"bg-white w-full flex flex-col rounded-lg",children:[e.jsxs("div",{className:"w-full h-full flex flex-col space-y-6",children:[e.jsxs("div",{children:[e.jsx(Is,{onSkillChange:Ge,roles:le.values.prefRole,mandatory:!0}),e.jsx("p",{className:" text-red text-caption",children:le.touched.prefRole&&le.errors.prefRole})]}),e.jsx("div",{className:" flex flex-col space-y-8",children:e.jsx(Ns,{languages:le.values.languages,formLngUpdate:Ie,languageError:v,setLanguageError:x,profError:g,setProfError:O,isProficiencyMissing:c,setIsProficiencyMissing:M})})]}),e.jsx(Re,{handlePrevPage:He,handleNextPage:We})]})]})},As=({label:i,name:h,value:y,onChange:P,error:w,placeholder:_,handleTitleChange:f})=>{const[v,x]=r.useState([]),[b,j]=r.useState(0),[d,a]=r.useState(!1),[z,n]=r.useState(h),[C,S]=r.useState(!1),K=(p,F)=>{b!==0&&clearTimeout(b);const I=setTimeout(()=>Y(p),600);j(I)},Y=async p=>{a(!0);try{const F=await pt(p);if(console.log("RES : ",F.data.data),F.data.data==null){x([]),S(!1);return}else x(F.data.data),S(!0)}catch(F){console.error("Error:",F)}finally{a(!1)}},k=p=>{x([]);const F={id:p.id,title:p.title};S(!1),f(F)},m=p=>{if(p.target.value==""){S(!1);return}const F=p.target.value;K(F),P(p)},A=()=>v.length===0||C==!1?null:e.jsx("div",{className:"absolute z-40 left-0 mt-2 w-full bg-white border shadow-xl rounded-sm",children:v?.map(p=>e.jsx("div",{className:"px-4 py-2 cursor-pointer hover:bg-gray-100 border-b",onClick:()=>k(p),children:p.title},p.id))});return e.jsxs("div",{className:"w-full mt-3 relative",children:[e.jsxs("label",{htmlFor:h,className:"block text-subtitle2 font-poppins pb-2 font-[500]",children:[i,e.jsx("span",{className:"text-red ml-1",children:"*"})]}),e.jsx("input",{className:`border-[1px] border-sandDune hover:border-pureBlack p-2 rounded-md w-full outline-purple px-[14px] py-2 ${w?"border-red":""}`,type:"text",name:h,placeholder:_,value:y,onChange:m}),d&&e.jsx("p",{className:"text-caption",children:"Loading..."}),w&&e.jsx("p",{className:"text-red text-caption",children:w}),A()]})},be=({save:i})=>e.jsx("button",{type:"submit",onClick:i,className:"w-[60px] h-[25px] text-caption bg-purple text-white rounded-md flex justify-center items-center hover:scale-105 active:scale-95 transition-all duration-200",children:"Save"}),ve=({cancelSave:i})=>e.jsx("button",{type:"button",onClick:i,className:"w-[60px] h-[25px] text-caption border border-red text-red rounded-md flex justify-center items-center hover:scale-105 active:scale-95 transition-all duration-200",children:"Cancel"}),qs=({label:i,name:h,value:y,onChange:P,error:w,placeholder:_,handleCompanyChange:f})=>{const[v,x]=r.useState([]),[b,j]=r.useState(0),[d,a]=r.useState(!1),[z,n]=r.useState(h),[C,S]=r.useState(!1),K=(p,F)=>{b!==0&&clearTimeout(b);const I=setTimeout(()=>Y(p),600);j(I)},Y=async p=>{a(!0);try{const I=(await Kt(p)).data.data.companies;console.log("RES : ",I),I?(x(I),S(!0)):(S(!1),x([]),console.log("No companies found"))}catch(F){console.error("Error:",F)}finally{a(!1)}},k=p=>{x([]);const F=p.name;f(F)},m=p=>{console.log("INPUT : ",p.target.value);const F=p.target.value;if(P(p),p.target.value==""){S(!1);return}K(F)},A=()=>v.length===0||C==!1?null:e.jsx("div",{className:"absolute z-40 left-0 mt-2 w-full bg-white border shadow-xl rounded-sm",children:v?.map(p=>e.jsx("div",{className:"px-4 py-2 cursor-pointer hover:bg-gray-100 border-b",onClick:()=>k(p),children:p.name},p.id))});return e.jsxs("div",{className:"w-full mt-3 relative",children:[e.jsxs("label",{htmlFor:h,className:"block text-subtitle2 font-poppins pb-2 font-[500]",children:[i,e.jsx("span",{className:"text-red ml-1",children:"*"})]}),e.jsx("input",{className:`border-[1px] border-sandDune hover:border-pureBlack p-2 rounded-md w-full outline-purple px-[14px] py-2 ${w?"border-red":""}`,type:"text",name:h,placeholder:_,value:y,onChange:m}),d&&e.jsx("p",{className:"text-caption",children:"Loading..."}),w&&e.jsx("p",{className:"text-red text-caption",children:w}),A()]})},Ts=[{id:"full_time",label:"Full Time"},{id:"part_time",label:"Part Time"},{id:"contract_freelancer",label:"Contract/Freelance"},{id:"internship",label:"Internship"}],ot={toolbar:[["bold","italic","underline"],[{list:"bullet"}]]},Ls=()=>{const i=Ee(),h=_e(o=>o.auth.token),[y,P]=r.useState([]),[w,_]=r.useState(!1),[f,v]=r.useState(!1),[x,b]=r.useState([]),[j,d]=r.useState(!1),a=oe({initialValues:{id:"",job_role:{id:"",title:""},company:"",start_date:"",end_date:"",currently_working:!1,location:{id:"",city:"",state:"",country:""},employment_status:"",responsibilities:"",skills:[]},validationSchema:ae({"job_role.title":U().required("Job role is required"),
3company:U().trim().required("Company is required"),start_date:qe().required("Start date is required"),end_date:qe().required("End date is required").min(mt("start_date"),"End date must be after start date"),"location.state":U().required("Location is required"),employment_status:U().required("Please select status"),responsibilities:U().required("Responsibilities are required").min(100,"must be 100 characters or more.")}),onSubmit:o=>{console.log("form submitted")}}),z=async o=>{a.setFieldValue("job_role",{id:o.id,title:o.title});try{const l=await es(o.title,h);console.log("SUGGESTED SKILLS : ",l),b(l.data.data)}catch{}},n=async o=>{a.setFieldValue("company",o)},C=()=>{a.values.currently_working==!1&&a.setFieldValue("end_date",null),a.setFieldValue("currently_working",!a.values.currently_working)},S=o=>{console.log("SKILL CHANGE : ",o);const l=Array.isArray(a.values.skills)?a.values.skills:[],g=l.some(c=>c.name===o.name);console.log("SKILL EXITS: ",g);let O;g?O=l.filter(c=>c.name!==o.name):O=[...l,o],console.log("updated skills: ",O),a.setFieldValue("skills",O)},K=o=>{a.setFieldValue("responsibilities",o)},Y=()=>{a.resetForm({values:{id:"",job_role:{id:"",title:""},company:"",start_date:"",end_date:"",currently_working:!1,location:{id:"",location:"",state:"",country:""},employment_status:"",responsibilities:"",skills:[]}}),w||(_(!0),v(!1))},k=o=>{console.log(o),m(o),_(!0),v(!1)},m=o=>{a.setValues({id:o?.id||"",job_role:o?.job_role||"",company:o.company?.name||"",start_date:o?.start_date?.split(" ")[0]||"",end_date:o?.end_date?o.end_date?.split(" ")[0]:"",currently_working:o?.currently_working||!1,location:{id:o?.location?.id,location:o?.location?.name,state:o?.location?.state,country:o?.location?.country},employment_status:o?.employment_status||"",responsibilities:o?.responsibilities||"",skills:o.skills?.map(l=>l)||[]})},A=o=>{a.setFieldValue("location",o)},p=async o=>{try{const g=(await Zt(o)).data.data;g?(P(g),v(!0)):(P([]),v(!0))}catch(l){console.error("Error fetching user experience:",l)}},F=async o=>{try{const l=await xt(o);console.log(l.data),l.data.is_experienced||d(!0)}catch(l){console.error("Error fetching user experience:",l)}},I=async o=>{try{await ls(o.id,h),await p(h),console.log("Experience deleted successfully.")}catch(l){console.error("Error deleting experience:",l)}};console.log(h);const ie=async()=>{try{const l=await as(!!j,h);console.log(l)}catch(o){console.log(o)}},de=async()=>{if(a.values.currently_working==!0){if(a.errors.company||a.errors.start_date||a.errors.employment_status||a.errors.responsibilities||a.values.job_role.title==""||a.values.location.state==""){console.log("ERRORS 1 : ",a.errors);return}}else if(a.errors.company||a.errors.start_date||a.errors.end_date||a.errors.employment_status||a.errors.responsibilities||a.values.job_role.title==""||a.values.location.state==""){console.log("ERRORS 2 : ",a.errors);return}let o=!1;const l={id:a.values?.id,job_title:a.values.job_role.title?.trim(),company:a.values.company?.name||a.values?.company.trim(),start_date:a.values.start_date,end_date:a.values.currently_working==!0?null:a.values.end_date,currently_working:a.values.currently_working,location_id:a.values.location.id,employment_status:a.values.employment_status,responsibilities:a.values.responsibilities,skills:a.values.skills.map(g=>g.name)};console.log("SAVE EXP : ",l);try{a.values.id!==""?(o=await ts(l,h),console.log("patched work exp : ",o)):a.values.title!==""&&(o=await ss(l,h),console.log("posted work exp : ",o)),a.resetForm()}catch(g){console.error("Error saving work experience:",g)}o&&(await p(h),_(!1),v(!0))},ke=()=>{a.resetForm(),_(!1),v(!0)},L=()=>{window.scrollTo(0,0),i(ue("preferences"))},se=()=>{window.scrollTo(0,0),i(ue("education"))},re=o=>{const l=o.target.checked;d(l),ie()};return r.useEffect(()=>{p(h)},[]),r.useEffect(()=>{let o=y?.map(g=>({id:g?.id||"",job_role:g?.job_role?.title,company:g?.company?.name,start_date:g?.start_date,end_date:g?.end_date,currently_working:g?.currently_working,location:g?.location,employment_status:g?.employment_status,responsibilities:g?.responsibilities,skills:g.skills?.map(O=>O?.name)||[]}));const l={id:a.values?.id||"",job_role:a.values.job_role?.title||a.values.job_role||"",company:a.values.company?.name||a.values.company||"",start_date:a.values.start_date||"",end_date:a.values.end_date||"",currently_working:a.values.currently_working,location:a.values.location||"",employment_status:a.values.employment_status||"",responsibilities:a.values.responsibilities||"",skills:a.values.skills?.map(g=>g?.name)||[]};if(!l.id)l.job_role.title==""&&l.company==""&&l.start_date==""&&l.end_date==""?console.log("EMPTY FORM"):o.push(l);else{const g=o.findIndex(O=>O.id===l.id);g!==-1?o[g]=l:o.push(l)}console.log("***** WORK EXPERIENCE REDUX : ",o),i(Xt(o))},[y,a.values]),r.useEffect(()=>{F(h)}
3,[h]),e.jsxs("div",{className:"w-[560px] md:min-h-[1000px] flex flex-col pr-10 mt-12",children:[!y[0]?.id&&e.jsxs("label",{className:"flex items-center space-x-2 mt-4",children:[e.jsx("input",{name:"openToReloc",type:"checkbox",className:"form-checkbox w-5 h-5 outline-none",checked:j,onChange:re}),e.jsx("span",{className:"block text-subtitle2 font-poppins  font-[500]",children:"I am fresher"})]}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center",children:[e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] mb-7 mt-7",children:"Work Experience"}),!j&&e.jsx(J,{handler:Y,lg:"lg"})]}),w?e.jsxs("form",{onSubmit:a.handleSubmit,className:"w-full flex flex-col space-y-5 mb-10",children:[e.jsxs("div",{className:"w-full flex space-x-[14px]",children:[e.jsx(As,{label:"Job Role",name:"job_role",value:a.values.job_role.title,onChange:a.handleChange,error:!a.values.job_role.title&&a.touched.job_role&&a.errors["job_role.title"],placeholder:"Enter job role",handleTitleChange:z}),e.jsx(qs,{label:"Company",name:"company",value:a.values.company,onChange:a.handleChange,error:a.touched.company&&a.errors.company?a.errors.company:"",placeholder:"abcd.ltd",handleCompanyChange:n})]}),e.jsxs("div",{className:"flex  md:flex-row flex-col w-full md:space-x-[14px] gap-[14px] md:gap-0",children:[e.jsx(Te,{label:"Start Date",name:"start_date",value:a.values.start_date,error:a.touched.start_date&&a.errors.start_date?a.errors.start_date:"",onChange:a.setFieldValue,mandatory:!0,placeholder:"Start date"}),a.values.currently_working?e.jsx(e.Fragment,{}):e.jsx(Te,{label:"End Date",name:"end_date",value:a.values.end_date,error:a.touched.end_date&&a.errors.end_date?a.errors.end_date:"",onChange:a.setFieldValue,mandatory:!0,placeholder:"End date"})]}),e.jsxs("label",{className:"flex items-center space-x-2 mt-4",children:[e.jsx("input",{name:"currently_working",type:"checkbox",className:"form-checkbox w-5 h-5 outline-none",checked:a.values.currently_working,onChange:()=>C()}),e.jsx("span",{className:"text-subtitle2 font-poppins",children:"I currently work here"})]}),e.jsx(_s,{label:"Location",name:"location",value:a.values.location.city?a.values.location.city:a.values.location.state,onChange:a.handleChange,error:a.touched.location&&a.values.location.state==""?a.errors["location.state"]:"",placeholder:"Enter location",saveLocation:A}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx(bt,{mandatory:!0,title:"Employment Type",options:Ts,selected:a.values.employment_status,onSelect:o=>a.setFieldValue("employment_status",o)}),e.jsx("p",{className:" text-red text-caption",children:a.touched.employment_status&&a.errors.employment_status})]}),e.jsxs("div",{className:"h-[300px] flex flex-col justify-start",children:[e.jsxs("label",{htmlFor:"responsibilities",className:"w-full text-start text-subtitle2 font-poppins pb-2 flex justify-between items-center font-[500]",children:[e.jsxs("p",{children:["Roles & Responsibilities",e.jsx("span",{className:"text-red ml-1",children:"*"})]}),e.jsx("p",{className:"text-red text-[10px] mt-1",children:"min 100 characters *"})]}),e.jsx(Ae,{style:{height:"200px",width:"100%"},theme:"snow",value:a.values.responsibilities,onChange:o=>K(o),modules:ot}),e.jsx("div",{children:e.jsx("p",{className:" bg text-red text-caption mt-12 mb-3",children:a.touched.responsibilities&&a.errors.responsibilities})})]}),e.jsx("div",{className:"w-full",style:{marginTop:0,top:"-10px"},children:e.jsx(vt,{suggestedSkills:x,skills:a.values.skills,onSkillChange:S,maxItems:30})}),e.jsxs("div",{className:"w-full flex justify-end space-x-4 mt-12",children:[e.jsx(ve,{cancelSave:ke}),e.jsx(be,{save:de})]})]}):e.jsx(e.Fragment,{}),f&&y.map(o=>{const l=fe(o.start_date?o.start_date?.split(" ")[0]:new Date)?.format("DD/MM/YYYY"),g=fe(o.end_date?o.end_date?.split(" ")[0]:new Date)?.format("DD/MM/YYYY");return e.jsxs("div",{className:"h-full w-full flex flex-col  mb-[17px] items-end mt-3",children:[e.jsxs("div",{className:"w-full h-auto md:h-[145px] bg-wheat rounded-[4px] p-[10px] overflow-hidden bg-opacity-50",children:[e.jsx("p",{className:" text-subtitle1 font-poppins font-[500]",children:o.job_role?.title}),e.jsx("p",{className:"text-gray text-caption font-poppins",children:o.company?.name}),e.jsxs("div",{className:"flex",children:[e.jsxs("p",{className:"text-gray text-caption font-poppins",children:[l," "," "]}),e.jsx("p",{className:"text-gray text-caption font-poppins",children:g?`- ${g}`:""})]}),e.jsx(Ae,{className:"h-auto md:h-[80px]",style:{width:"100%"},theme:"bubble",name:o.id,value:o.responsibilities,modules:ot})]}),e.jsxs("div",{className:"mt-[10px] mr-[10px] absolute flex space-x-[10px] w-[60px] h-[25px]",children:[e.jsx("button",{onClick:()=>k(o),type:"button",className:"flex justify-center items-center rounded-full bg-lightPurple w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(he,{color:"#2B1845",className:"w-[12px] h-[12px]"})}),e.jsx("button",{onClick:()=>I(o),type:"button",className:"flex justify-center items-center rounded-full bg-red w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(ce,{color:"#fff",className:"w-[20px] h-[20px]"})})]})]},o.id)}),f&&e.jsx(Re,{handlePrevPage:L,handleNextPage:se})]})},Vs=({label:i,name:h,value:y,onChange:P,error:w,placeholder:_,handleQualificationChange:f,qualifications:v})=>{const[x,b]=r.useState([]),[j,d]=r.useState(0),[a,z]=r.useState(!1),[n,C]=r.useState(h),S=k=>{b([]);const m={id:k.id,name:k.name};f(m)},K=k=>{const m=k.target.value;console.log(" QUERY : ",m);const A=v.filter(p=>p.name.toLowerCase().includes(m.toLowerCase()));b(A),P(k)},Y=()=>x?.length===0?null:e.jsx("div",{className:"absolute z-40 left-0 mt-2 w-full bg-white border shadow-xl rounded-sm max-h-[310px] overflow-scroll",children:x?.map(k=>e.jsx("div",{className:"px-4 py-2 cursor-pointer hover:bg-gray-100 border-b",onClick:()=>S(k),children:k.name},k.id))});return r.useEffect(()=>{console.log("SETTING ITEMS : ",v),b(v||[])},[v]),e.jsxs("div",{className:"w-full mt-3 relative",children:[e.jsxs("label",{htmlFor:h,className:"block text-subtitle2 font-poppins pb-2 font-[500]",children:[i," ",e.jsx("span",{className:"text-red ml-1",children:"*"})]}),e.jsx("input",{className:`border-[1px] border-sandDune hover:border-pureBlack p-2 rounded-md w-full outline-purple px-[14px] py-2 ${w?"border-red":""}`,type:"text",name:h,placeholder:_,value:y.name,onChange:K,autoComplete:"off"}),a&&e.jsx("p",{className:"text-caption",children:"Loading..."}),w&&e.jsx("p",{className:"text-red text-caption",children:w}),Y()]})},Bs=({label:i,name:h,value:y,onChange:P,error:w,placeholder:_,handleFOSChange:f})=>{const[v,x]=r.useState([]),[b,j]=r.useState(0),[d,a]=r.useState(!1),[z,n]=r.useState(h),C=(m,A)=>{b!==0&&clearTimeout(b);const p=setTimeout(()=>S(m),600);j(p)},S=async m=>{a(!0);try{const A=await ns(m);A.data.data&&x(A.data.data)}catch(A){console.error("Error:",A)}finally{a(!1)}},K=m=>{x([]);const A={id:m.id,name:m.name};f(A)},Y=m=>{const A=m.target.value;console.log(" QUERY : ",A),C(A),P(m)},k=()=>v?.length===0||v===void 0||v===null||v==[]?null:e.jsx("div",{className:"absolute z-40 left-0 mt-2 w-full bg-white border shadow-xl rounded-sm max-h-[310px] overflow-scroll",children:v?.map(m=>e.jsx("div",{className:"px-4 py-2 cursor-pointer hover:bg-gray-100 border-b",onClick:()=>K(m),children:m.name},m.id))});return e.jsxs("div",{className:"w-full mt-3 relative",children:[e.jsxs("label",{htmlFor:h,className:"block text-subtitle2 font-poppins pb-2 font-[500]",children:[i,e.jsx("span",{className:"text-red ml-1",children:"*"})]}),e.jsx("input",{className:`border-[1px] border-sandDune hover:border-pureBlack p-2 rounded-md w-full outline-purple px-[14px] py-2 ${w?"border-red":""}`,type:"text",name:h,placeholder:_,value:y.name,onChange:Y,autoComplete:"off"}),d&&e.jsx("p",{className:"text-caption",children:"Loading..."}),w&&e.jsx("p",{className:"text-red text-caption",children:w}),k()]})},Os={toolbar:[["bold","italic","underline"],[{list:"bullet"}]]},it=[{value:"matriculation",label:"Class 10th"},{value:"intermediate",label:"Class 12th"},{value:"diploma",label:"Diploma"},{value:"graduate",label:"Undergraduate (Bachelor's)"},{value:"post_graduate",label:"Post Graduate (Master's)"},{value:"doctorate",label:"Doctorate"}],Us=[{id:"full_time",label:"Full Time"},{id:"part_time",label:"Part Time"},{id:"online",label:"Online"}],Ys=()=>{const i=Ee(),{geoResponse:h}=ft(),y=_e(l=>l.auth.token),[P,w]=r.useState([]),[_,f]=r.useState(!1),[v,x]=r.useState(!1),[b,j]=r.useState([]),[d,a]=r.useState([]),z=h!=null&&h?.country==="IN",n=oe({initialValues:{id:"",qualificationlevel:"",qualification:{id:"",name:""},course_type:"",fieldofstudy:{id:"",name:""},measuring_type:"percentage",measure_value:"",out_of:"",start_date:"",end_date:"",institute_location:"",description:""},validationSchema:ae({qualificationlevel:U().required("Qualification level is required"),start_date:qe().required("Start date is required"),end_date:qe().required("End date is required").min(mt("start_date"),"End date must be after start date"),institute_location:U().required("Institute location is required"),
3course_type:U().required("Course type is required")}),onSubmit:l=>{console.log("form submitted"),console.log(l)}}),C=l=>{n.setFieldValue("measuring_type",l)},S=l=>{n.setFieldValue("course_type",l)},K=()=>{n.resetForm({values:{id:"",qualificationlevel:"",qualification:{id:"",name:""},course_type:"",fieldofstudy:{id:"",name:""},measuring_type:"percentage",measure_value:0,out_of:0,start_date:"",end_date:"",institute_location:"",description:""}}),_||(f(!0),x(!1))},Y=l=>{console.log("update qualification level : ",l.target.value),se(l.target.value),n.setFieldValue("qualificationlevel",l.target.value),n.setFieldValue("qualification",{id:"",name:""}),n.setFieldValue("fieldofstudy",{id:"",name:""})},k=l=>{n.setFieldValue("qualification",l)},m=l=>{n.setFieldValue("fieldofstudy",l)},A=l=>{n.setFieldValue("description",l)},p=async()=>{if(n.errors.qualificationlevel||n.errors.start_date||n.errors.end_date||n.errors.institute_location||n.errors.course_type){console.log("FORM ERRORS : ",n.errors);return}let l=!1,g={};if(n.values.measuring_type=="percentage")g={id:n.values?.id,qualification_level:n.values.qualificationlevel,qualification:n.values.qualification.name,field_of_study:n.values.fieldofstudy?.name||"",percentage:n.values.measure_value,start_date:fe(n.values.start_date).format("YYYY-MM-DD"),end_date:fe(n.values.end_date).format("YYYY-MM-DD"),institute:n.values.institute_location,course_type:n.values.course_type,description:n.values.description};else if(n.values.measuring_type=="cgpa")g={id:n.values?.id,qualification_level:n.values.qualificationlevel,qualification:n.values.qualification.name,field_of_study:n.values.fieldofstudy.name,cgpa:{cgpa:n.values.measure_value.toString(),out_of:n.values.out_of.toString()},start_date:fe(n.values.start_date).format("YYYY-MM-DD"),end_date:fe(n.values.end_date).format("YYYY-MM-DD"),institute:n.values.institute_location,course_type:n.values.course_type,description:n.values.description};else{console.log("MESASURE TYPE HAS TO BE EITHER percentage or cpga, select 1");return}console.log("UPDATING EDU EXP : ",g);try{n.values.id!==""?(l=await is(g,y),console.log("patched work exp : ",l)):(l=await cs(g,y),console.log("posted work exp : ",l)),n.resetForm({values:{id:"",qualificationlevel:"",qualification:"",course_type:"",fieldofstudy:"",measuring_type:"percentage",measure_value:0,out_of:"",start_date:"",end_date:"",institute_location:"",description:""}}),a([]),j([])}catch(O){console.error("Error saving education :",O)}l&&(await re(y),f(!1),x(!0))},F=()=>{n.resetForm(),a([]),j([]),f(!1),x(!0)},I=l=>{ie(l),f(!0),x(!1)},ie=l=>{console.log("POPULATE : ",l);const g=fe(new Date(l.start_date)).format("YYYY/MM/DD"),O=fe(new Date(l.end_date)).format("YYYY/MM/DD");n.setValues({id:l?.id||"",qualificationlevel:l?.qualification_level||"",qualification:l?.qualification||"",course_type:l?.course_type||"",fieldofstudy:l?.field_of_study||"",measuring_type:l?.cgpa?"cgpa":"percentage",measure_value:l?.cgpa?.cgpa||l?.percentage||0,out_of:l?.cgpa?.out_of||0,start_date:g,end_date:O,institute_location:l?.institute||"",description:l?.description||""})},de=async l=>{try{await us(l.id,y),await re(y),console.log("Experience deleted successfully.")}catch(g){console.error("Error deleting experience:",g)}},ke=()=>{window.scrollTo(0,0),i(ue("experience"))},L=async()=>{window.scrollTo(0,0),i(ue("additional"))},se=async l=>{try{const g=await ds(l);j(g.data.data)}catch(g){console.error("Error:",g)}},re=async l=>{try{const g=await os(l);g.data.data!==null?(w(g.data.data),f(!1),x(!0)):(w([]),x(!0))}catch{console.log("ERROR fetching education details")}};r.useEffect(()=>{re(y)},[]),r.useEffect(()=>{const l=P.map(O=>{const c=fe(O?.start_date?O?.start_date?.split(" ")[0]:new Date)?.format("DD/MM/YYYY"),M=fe(O?.end_date?O.end_date?.split(" ")[0]:new Date).format("DD/MM/YYYY");return{id:O.id,institute:O.institute,qualification:O.qualification?.name,field_of_study:O.field_of_study?.name,qualification_level:O.qualification_level,start_date:c,end_date:M,description:O.description}}),g={id:n.values?.id||"",institute:n.values.institute_location||"",qualification:n.values.qualification?.name||"",field_of_study:n.values.fieldofstudy?.name||"",qualification_level:n.values.qualificationlevel||"",start_date:n.values.start_date||"",end_date:n.values.end_date||"",description:n.values.description||""};if(!g.id)g.institute==""&&g.field_of_study==""&&g.qualification_level==""&&g.start_date==""&&g.end_date==""&&g.description==""||l.push(g);else{const O=l.findIndex(c=>c.id===g.id);O!==-1?l[O]=g:l.push(g)}console.log("EDU DATA ARRAY : ",l),i(rs(l))},[P,n.values]);const o=h?.country==="IN"?it:it.filter(l=>l.value!=="matriculation"&&l.value!=="intermediate");return e.jsxs("div",{className:"w-[560px] min-h-[1000px] flex flex-col pr-10 mt-12",children:[e.jsxs("div",{className:"flex flex-col md:flex-row mb-4 md:mb-0",children:[e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] mb-7",children:"Education"}),e.jsx(J,{handler:K,lg:"lg"})]}),_&&e.jsxs("form",{onSubmit:n.handleSubmit,className:"w-full flex flex-col space-y-5 mb-10",children:[e.jsxs("div",{className:"flex flex-col md:flex-row w-full md:space-x-3",children:[e.jsx(gt,{label:"Qualification Level",name:"qualificationlevel",value:n.values.qualificationlevel,onChange:l=>Y(l),error:n.touched.qualificationlevel&&n.errors.qualificationlevel?n.errors.qualificationlevel:"",options:o,style:"w-full mt-3 relative",mandatory:!0}),n.values.qualificationlevel!=="matriculation"&&n.values.qualificationlevel!=="intermediate"&&n.values.qualificationlevel!=="diploma"?e.jsx(Vs,{label:"Qualification",name:"qualification",value:n.values.qualification,onChange:n.handleChange,qualifications:b,error:n.touched.qualification&&n.values.qualification.name===""?"Qualification is required":"",placeholder:"Ex: B.tech",handleQualificationChange:k}):e.jsx(e.Fragment,{}),n.values.qualificationlevel!=="matriculation"&&n.values.qualificationlevel!=="intermediate"?e.jsx(Bs,{label:"Field of study",name:"fieldofstudy",value:n.values.fieldofstudy,onChange:n.handleChange,error:n.touched.fieldofstudy&&n.values.fieldofstudy.name===""?"Field of study is required":"",placeholder:"Ex: Computer Science",handleFOSChange:m}):e.jsx("div",{className:"w-full"})]}),z&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:" flex flex-col w-[290px] items-start",children:e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsxs("label",{className:"flex w-full items-center space-x-2 cursor-pointer",children:[e.jsx("div",{className:"w-5 h-5 flex justify-center items-center border border-purple shadow-inner rounded-full",children:e.jsx("input",{type:"checkbox",value:"percentage",checked:n.values.measuring_type==="percentage",onCh
3ange:()=>C("percentage"),className:"h-3 w-3 rounded-full border-2 border-none appearance-none checked:bg-purple checked:border-purple focus:outline-none"})}),e.jsx("span",{className:"text-subtitle1 font-[500]",children:"Percentage"})]}),e.jsxs("label",{className:"flex w-full items-center space-x-2 cursor-pointer ml-4",children:[e.jsx("div",{className:"w-5 h-5 flex justify-center items-center border border-purple shadow-inner rounded-full",children:e.jsx("input",{type:"checkbox",value:"CGPA",checked:n.values.measuring_type==="cgpa",onChange:()=>C("cgpa"),className:"h-3 w-3 rounded-full border-2 border-none appearance-none checked:bg-purple checked:border-purple focus:outline-none"})}),e.jsx("span",{className:"text-subtitle1 font-[500]",children:"CGPA"})]})]})}),n.values.measuring_type=="percentage"?e.jsxs("label",{className:"flex flex-col items-start cursor-pointer w-[280px]",children:[e.jsx("span",{className:"text-caption mb-2",children:"Percentage"}),e.jsx("input",{type:"number",name:"measure_value",max:100,value:n.values.measure_value,onChange:n.handleChange,className:"border-[1px] w-full text-textGray border-sandDune rounded-[4px] outline-purple px-[14px] py-2 "})]}):e.jsxs("div",{className:"flex justify-between items-start cursor-pointer w-[300px] space-x-2",children:[e.jsxs("label",{className:"flex flex-col items-start cursor-pointer",children:[e.jsx("span",{className:"text-caption mb-2",children:"Grade"}),e.jsx("input",{type:"number",name:"measure_value",max:100,value:n.values.measure_value,onChange:n.handleChange,className:"border-[1px] w-full text-textGray border-sandDune rounded-[4px] outline-purple px-[14px] py-2 "})]}),e.jsxs("label",{className:"flex flex-col items-start cursor-pointer",children:[e.jsx("span",{className:"text-caption mb-2",children:"Out of"}),e.jsx("input",{type:"number",name:"out_of",max:100,value:n.values.out_of,onChange:n.handleChange,className:"border-[1px] w-full text-textGray border-sandDune rounded-[4px] outline-purple px-[14px] py-2 "})]})]})]}),e.jsxs("div",{className:"flex flex-col md:flex-row w-full md:space-x-[14px]",children:[e.jsx(Te,{label:"Start Date",name:"start_date",value:n.values.start_date,error:n.touched.start_date&&n.errors.start_date?n.errors.start_date:"",onChange:n.setFieldValue,mandatory:!0}),e.jsx(Te,{mandatory:!0,label:"End Date (or expected)",name:"end_date",value:n.values.end_date,onChange:n.setFieldValue,error:n.touched.end_date&&n.errors.end_date?n.errors.end_date:""})]}),e.jsx(X,{label:"Institute",name:"institute_location",mandatory:!0,value:n.values.institute_location,onChange:n.handleChange,error:n.touched.institute_location&&n.errors.institute_location?n.errors.institute_location:"",placeholder:"Enter Institute Name"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx(bt,{title:"Course Type",mandatory:!0,options:Us,selected:n.values.course_type,onSelect:S}),e.jsx("p",{className:" text-red text-caption",children:n.touched.course_type&&n.errors.course_type})]}),e.jsxs("div",{className:"h-[300px] flex flex-col justify-start items-center",children:[e.jsx("label",{htmlFor:"introduction",className:"w-full text-start text-subtitle2 font-poppins pb-2 flex justify-start items-center font-[500]",children:"Description"}),e.jsx(Ae,{style:{height:"200px",width:"100%"},theme:"snow",name:"description",value:n.values.description,onChange:l=>A(l),modules:Os})]}),e.jsxs("div",{className:"w-full flex justify-between items-center space-x-4 mt-12",children:[e.jsx("button",{className:" text-caption text-darkPurple mt-9 hover:scale-110 transition-all duration-200 active:scale-100 mb-5",children:"I will do this later"}),e.jsxs("div",{className:"flex space-x-4",children:[e.jsx(ve,{cancelSave:F}),e.jsx(be,{save:p})]})]})]}),v&&P.map(l=>{const g=fe(l?.start_date?l?.start_date?.split(" ")[0]:new Date)?.format("DD/MM/YYYY"),O=fe(l?.end_date?l.end_date?.split(" ")[0]:new Date)?.format("DD/MM/YYYY");return e.jsxs("div",{className:"h-full w-full flex flex-col  mb-[17px] items-end",children:[e.jsxs("div",{className:"w-full h-[80px] bg-wheat rounded-[4px] p-[10px] overflow-hidden bg-opacity-50",children:[e.jsx("p",{className:" text-subtitle1 font-poppins font-[500]",children:l.institute}),e.jsxs("p",{className:"text-gray text-caption font-poppins",children:[l.qualification?.name?`${l.qualification.name}, `:"",l.field_of_study?.name?`${l.field_of_study.name} - `:"",l.qualification_level||""]}),e.jsxs("div",{className:"flex",children:[e.jsxs("p",{className:"text-gray text-caption font-poppins",children:[g," "]}),e.jsx("p",{className:"text-gray text-caption font-poppins",children:O?` - ${O}`:""})]}),e.jsx("p",{className:"text-gray text-body1 font-poppins mt-4 w-full h-[50px] overflow-hidden"})]}),e.jsxs("div",{className:"mt-[10px] mr-[10px] absolute flex space-x-[10px] w-[60px] h-[25px]",children:[e.jsx("button",{onClick:()=>I(l),type:"button",className:"flex justify-center items-center rounded-full bg-lightPurple w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(he,{color:"#2B1845",className:"w-[12px] h-[12px]"})}),e.jsx("button",{onClick:()=>de(l),type:"button",className:"flex justify-center items-center rounded-full bg-red w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(ce,{color:"#fff",className:"w-[20px] h-[20px]"})})]})]},l.id)}),v&&e.jsx(Re,{handlePrevPage:ke,handleNextPage:L})]})},ct=({title:i,subTitle:h,contributors:y,updateContributors:P})=>{const[w,_]=r.useState(y||[]),f=()=>{_([...w,""])},v=()=>{const b=[...w];b.pop(),_(b),P(b)}
3,x=(b,j)=>{const d=[...w];d[b]=j.target.value,_(d),P(d)};return r.useEffect(()=>{_(y)},[y]),e.jsxs("div",{className:"flex flex-col w-full",children:[e.jsx("p",{className:"text-body1 font-[500]",children:i}),e.jsx("p",{className:"text-caption text-textLightGray",children:h}),e.jsxs("button",{type:"button",onClick:()=>{f()},className:" mt-3 w-[135px] h-[40px] p-2 flex items-center text-btnDarkPurple rounded-full border border-btnDarkPurple hover:scale-105 duration-200 transition-all active:scale-100",children:[e.jsx(ps,{size:20}),e.jsxs("p",{className:" text-buttonSm ml-3",children:["Add ",i]})]}),e.jsx("div",{className:" flex flex-col w-full space-y-2 mt-2",children:w?.map((b,j)=>e.jsxs("div",{className:"border-[1px] flex border-sandDune hover:border-pureBlack p-2 rounded-md w-full outline-purple px-[14px] py-2",children:[e.jsx("input",{type:"text",className:"w-full outline-none",onChange:d=>x(j,d),placeholder:`Enter ${i} ${j+1}`,value:b}),e.jsx(ce,{color:"#ff8383",className:"w-[25px] h-[25px]",onClick:v})]},j))})]})},Ms=({onInterestChange:i,hobbies:h,cancelSave:y,save:P})=>{const[w,_]=r.useState(""),[f,v]=r.useState([]),x=async j=>{const{value:d}=j.target;if(j.key==="Enter"&&d.trim()!==""){if(f.length<10){const a=d;f.some(z=>z===d)||(v([...f,a]),_(""),i(a))}}else _(d)},b=j=>{const d=f.filter(a=>a!==j);i(j),v(d)};return r.useEffect(()=>{v(h)},[h]),e.jsx("div",{className:"relative my-3",children:e.jsxs("div",{className:"w-full",children:[e.jsx("label",{htmlFor:name,className:"w-full text-h4 text-pureBlack font-[500]",children:"Interests / Hobbies"}),e.jsxs("div",{className:"border border-sandDune rounded focus:outline-none focus:shadow-outline flex flex-wrap items-center mt-2",children:[f?.map((j,d)=>e.jsx("div",{className:"flex px-3 w-min-[50px] h-[25px] border bg-darkPurple rounded-tr-lg rounded-bl-lg  justify-center items-center m-1 cursor-pointer",onClick:()=>b(j),children:e.jsxs("p",{className:" flex items-center justify-center text-center text-caption font-poppins text-white",children:[j,e.jsx(ce,{color:"#FF8383",className:"w-[15px] h-[15px] ml-1"})]})},d)),e.jsx("input",{type:"text",placeholder:"Running, Swimming, etc",className:"outline-none w-[250px] rounded py-2 px-4 flex flex-wrap",value:w,onChange:x,onKeyDown:x})]}),e.jsxs("div",{className:"w-full flex justify-end space-x-4 mt-12",children:[e.jsx(ve,{cancelSave:y}),e.jsx(be,{save:P})]})]})})},Gs=[{value:"Submitted",label:"Submitted"},{value:"Under Revision",label:"Under Revision"},{value:"Accepted",label:"Accepted"},{value:"Published",label:"Published"}],Hs=()=>{const i=_e(t=>t.auth.token),[h,y]=r.useState(!1),P=Le(),w=Ee(),[_,f]=r.useState(!0),[v,x]=r.useState(!1),[b,j]=r.useState([]),[d,a]=r.useState(!1),[z,n]=r.useState(!1),[C,S]=r.useState(!1),[K,Y]=r.useState(!1),[k,m]=r.useState(!1),[A,p]=r.useState(!1),[F,I]=r.useState(!1),[ie,de]=r.useState(!1),[ke,L]=r.useState(!1),[se,re]=r.useState(!1),[o,l]=r.useState(!0),g=()=>{x(!v)},O=t=>{switch(f(!1),t){case"Awards":a(!0),l(!1);break;case"Projects":n(!0),l(!1);break;case"Certification":S(!0),l(!1);break;case"Courses":Y(!0),l(!1);break;case"Patent":m(!0),l(!1);break;case"Publication":p(!0),l(!1);break;case"Conferences":I(!0),l(!1);break;case"Extracurricular activities":de(!0),l(!1);break;case"Seminar":L(!0),l(!1);break;case"Hobbies":re(!0),l(!1);break}},c=oe({initialValues:{id:"",awards:[],projects:[],certifications:[],courses:[],patents:[],publications:[],conferences:[],extra_curricular_activities:"",seminars:[],career_gap:[],hobbies:[],overall_skills:[]},validationSchema:ae({overall_skills:Ze().min(5,"You must have at least 5 overall skills")}),onSubmit:t=>{console.log("form submitted"),console.log(t)}}),M=oe({initialValues:{index:null,title:"",associated_with:"",issue_date:"",description:"",image:""},validationSchema:ae({title:U().required("Required")}),onSubmit:t=>{console.log("award form submitted"),console.log(t),ge("Awards",M.values)}}),$=oe({initialValues:{Index:null,title:"",link:"",description:""},validationSchema:ae({title:U().required("Required")}),onSubmit:t=>{console.log("project form submitted"),console.log(t),ge("Projects",$.values)}}),G=oe({initialValues:{index:null,name:"",issuing_org:"",issue_date:"",url:""},validationSchema:ae({name:U().required("Required"),issuing_org:U().required("Required"),issue_date:U().required("Required")}),onSubmit:t=>{console.log("certification form submitted"),console.log(t),ge("Certification",G.values)}}),W=oe({initialValues:{index:null,name:"",issuing_org:"",start_date:"",end_date:""},validationSchema:ae({name:U().required("Required"),issuing_org:U().required("Required")}),onSubmit:t=>{console.log("course form submitted"),console.log(t),ge("Courses",W.values)}}),q=oe({initialValues:{index:null,title:"",patent_number:"",url:"",issue_date:"",status:"Patent Issued",description:"",inventors:[]},validationSchema:ae({title:U().required("Required")}),onSubmit:t=>{console.log("patent form submitted"),console.log(t),ge("Patent",q.values)}}),T=oe({initialValues:{index:null,title:"",publisher:"",url:"",status:"",description:"",authors:[]},validationSchema:ae({title:U().required("Required")}),onSubmit:t=>{console.log("publication form submitted"),console.log(t),ge("Publication",T.values)}}),H=oe({initialValues:{index:null,title:"",start_date:"",end_date:"",description:""},validationSchema:ae({title:U().required("Required"),start_date:U().required("Required"),end_date:U().required("Required"),description:U().required("Required")}),onSubmit:t=>{console.log("conference form submitted"),console.log(t),ge("Conferences",H.values)}}),pe=oe({initialValues:{description:""},validationSchema:ae({description:U().required("Required")}),onSubmit:t=>{console.log("extracurricular form submitted"),console.log(t),ge("Extracurricular",pe.values)}}),Q=oe({initialValues:{index:null,title:"",date:"",description:""},validationSchema:ae({title:U().required("Required"),date:U().required("Required"),description:U().required("Required")}),onSubmit:t=>{console.log("seminar form submitted"),console.log(t),ge("Seminar",Q.values)}}),Pe=oe({initialValues:{hobbies:""},validationSchema:ae({description:U().required("Required")}),onSubmit:t=>{console.log("interest form submitted"),console.log(t)}}),me=t=>{switch(l(!0),console.log("CANCEL SAVE : ",t),t){case"Awards":M.resetForm(),a(!1),f(!0);break;case"Projects":$.resetForm(),n(!1),f(!0);break;case"Certification":G.resetForm(),S(!1),f(!0);break;case"Courses":W.resetForm(),Y(!1),f(!0);break;case"Patent":q.resetForm(),m(!1),f(!0);break;case"Publication":T.resetForm(),p(!1),f(!0);break;case"Conferences":H.resetForm(),I(!1),f(!0);break;case"Extracurricular":pe.resetForm(),de(!1),f(!0);break;case"Seminar":Q.resetForm(),L(!1),f(!0);break;
3case"Hobbies":Pe.resetForm(),re(!1),f(!0);break}},ge=(t,s)=>{if(console.log("SAVE FORM : ",t,s),M.errors.title){console.log("award errors present : ",M.errors);return}else if($.errors.title){console.log("project errors present : ",$.errors);return}else if(G.errors.name){console.log("certification errors present : ",G.errors);return}else if(W.errors.name||W.errors.issuing_org){console.log("course errors present : ",W.errors);return}else if(q.errors.title){console.log("patent errors present : ",q.errors);return}else if(T.errors.title){console.log("publication errors present : ",T.errors);return}else if(H.errors.title){console.log("conference errors present : ",H.errors);return}else if(pe.errors.description){console.log("extracurricular errors present : ",pe.errors);return}else if(Q.errors.title){console.log("seminar errors present : ",Q.errors);return}switch(t){case"Awards":Ve(s);break;case"Projects":et(s);break;case"Certification":Be(s);break;case"Courses":tt(s);break;case"Patent":Oe(s);break;case"Publication":le(s);break;case"Conferences":Ue(s);break;case"Extracurricular":Me(s);break;case"Seminar":Ye(s);break;case"Hobbies":Ge(s);break}},Ve=async t=>{const s=c.values,N={title:t?.title,associated_with:t?.associated_with,date:t?.issue_date,description:t?.description,image:t?.image},R=[];c.values?.overall_skills.forEach(u=>{R.push(u.name)}),s.overall_skills=R,console.log("UPDATING Awards with : ",N),t.index||t.index==0?(console.log("updated award list : ",t.index),s.awards[t.index]=N):(console.log("added to award list"),s.awards.push(N));try{console.log("NEW values : ",s);let u;s.id?u=await te(s,i):u=await je(s,i),M.resetForm(),a(!1),l(!0),f(!0),Z()}catch(u){console.log("ERROR updating award : ",u)}},et=async t=>{const s=c.values,N={title:t?.title,link:t?.link,description:t?.description},R=[];c.values.overall_skills.forEach(u=>{R.push(u.name)}),s.overall_skills=R,console.log("UPDATING Projects with : ",N),t.index||t.index==0?(console.log("updated project list : ",t.index),s.projects[t.index]=N):(console.log("added to project list"),s.projects.push(N));try{console.log("NEW values : ",s);let u;s.id?u=await te(s,i):u=await je(s,i),$.resetForm(),n(!1),l(!0),f(!0),Z()}catch(u){console.log("ERROR updating project : ",u)}},Be=async t=>{const s=c.values,N={name:t?.name,issuing_org:t?.issuing_org,issue_date:t?.issue_date,url:t?.url},R=[];c.values.overall_skills.forEach(u=>{R.push(u.name)}),s.overall_skills=R,console.log("UPDATING Certification with : ",N),t.index||t.index==0?(console.log("updated certification list : ",t.index),s.certifications[t.index]=N):(console.log("added to certification list"),s.certifications.push(N));try{console.log("NEW values : ",s);let u;s.id?u=await te(s,i):u=await je(s,i),G.resetForm(),S(!1),l(!0),f(!0),Z()}catch(u){console.log("ERROR updating certification : ",u)}},tt=async t=>{const s=c.values,N={name:t?.name,issuing_org:t?.issuing_org,start_date:t?.start_date,end_date:t?.end_date},R=[];c.values.overall_skills.forEach(u=>{R.push(u.name)}),s.overall_skills=R,console.log("UPDATING Courses with : ",N),t.index||t.index==0?(console.log("updated course list : ",t.index),s.courses[t.index]=N):(console.log("added to course list"),s.courses.push(N));try{console.log("NEW values : ",s);let u;s.id?u=await te(s,i):u=await je(s,i),W.resetForm(),Y(!1),l(!0),f(!0),Z()}catch(u){console.log("ERROR updating course : ",u)}},Oe=async t=>{const s=c.values,N={title:t?.title,patent_number:t?.patent_number,url:t?.url,issue_date:t?.issue_date,status:t?.status,description:t?.description,inventors:t?.inventors},R=[];c.values.overall_skills.forEach(u=>{R.push(u.name)}),s.overall_skills=R,console.log("UPDATING Patent with : ",N),t.index||t.index==0?(console.log("updated patent list : ",t.index),s.patents[t.index]=N):(console.log("added to patent list"),s.patents.push(N));try{console.log("NEW values : ",s);let u;s.id?u=await te(s,i):u=await je(s,i),q.resetForm(),m(!1),l(!0),f(!0),Z()}catch(u){console.log("ERROR updating patent : ",u)}},le=async t=>{const s=c.values,N={title:t?.title,publisher:t?.publisher,url:t?.url,status:t?.status,description:t?.description,authors:t?.authors},R=[];
3c.values.overall_skills.forEach(u=>{R.push(u.name)}),s.overall_skills=R,console.log("UPDATING Publication with : ",N),t.index||t.index==0?(console.log("updated publication list : ",t.index),s.publications[t.index]=N):(console.log("added to publication list"),s.publications.push(N));try{console.log("NEW values : ",s);let u;s.id?u=await te(s,i):u=await je(s,i),T.resetForm(),p(!1),l(!0),f(!0),Z()}catch(u){console.log("ERROR updating publication : ",u)}},Ue=async t=>{const s=c.values,N={title:t?.title,start_date:t?.start_date,end_date:t?.end_date,description:t?.description},R=[];c.values.overall_skills.forEach(u=>{R.push(u.name)}),s.overall_skills=R,console.log("UPDATING Conference with : ",N),t.index||t.index==0?(console.log("updated conference list : ",t.index),s.conferences[t.index]=N):(console.log("added to conference list"),s.conferences.push(N));try{console.log("NEW values : ",s);let u;s.id?u=await te(s,i):u=await je(s,i),H.resetForm(),T.resetForm(),I(!1),l(!0),f(!0),Z()}catch(u){console.log("ERROR updating conference : ",u)}},Ye=async t=>{const s=c.values,N={title:t?.title,date:t?.date,description:t?.description},R=[];c.values.overall_skills.forEach(u=>{R.push(u.name)}),s.overall_skills=R,console.log("UPDATING Seminar with : ",N),t.index||t.index==0?(console.log("updated seminar list : ",t.index),s.seminars[t.index]=N):(console.log("added to seminar list"),s.seminars.push(N));try{console.log("NEW values : ",s);let u;s.id?u=await te(s,i):u=await je(s,i),Q.resetForm(),L(!1),l(!0),f(!0),Z()}catch(u){console.log("ERROR updating seminar : ",u)}},Me=async t=>{const s=c.values,N=t?.description||null;s.extra_curricular_activities=N;const R=[];c.values.overall_skills.forEach(u=>{R.push(u.name)}),s.overall_skills=R;try{console.log("NEW values : ",s);let u;s.id?u=await te(s,i):u=await je(s,i),pe.resetForm(),de(!1),l(!0),f(!0),Z()}catch(u){console.log("ERROR updating extracurricular : ",u)}},Ge=async t=>{console.log("UPDATING Hobbies with : ",t);const s=c.values;s.hobbies=t;const N=[];c.values.overall_skills.forEach(R=>{N.push(R.name)}),s.overall_skills=N;try{console.log("NEW values : ",s);let R;s.id?R=await te(s,i):R=await je(s,i),Pe.resetForm(),re(!1),l(!0),f(!0),Z()}catch(R){console.log("ERROR updating hobbies : ",R)}},Ie=t=>{q.setFieldValue("status",t)},He=t=>{q.setFieldValue("inventors",t)},We=t=>{T.setFieldValue("authors",t)},ze=t=>{const s=c.values.hobbies,N=s.indexOf(t);N>-1?s.splice(N,1):s.push(t),console.log("ARRAY : ",s),c.setFieldValue("Hobbies",s)},Qe=async t=>{console.log("SKILL CHANGE : ",t);const s=$e(),N=Je(s,t),R=V(N);try{y(!0),console.log("NEW values : ",R);let u;R.id?u=await te(R,i):u=await je(R,i),Z()}catch(u){console.log("ERROR updating overall_skills : ",u)}finally{y(!1)}},$e=()=>{const t=[];return c.values.overall_skills.forEach(s=>{t.push(s.name)}),t},Je=(t,s)=>{const N=t.indexOf(s.name);return N>-1?t.splice(N,1):t.push(s.name),t},V=t=>{const s={...c.values};return s.overall_skills=t,s},B=(t,s)=>{s||s==0?M.setFieldValue("index",s):M.setFieldValue("index",null),M.setFieldValue("title",t?.title),M.setFieldValue("associated_with",t?.associated_with),M.setFieldValue("issue_date",t?.date),M.setFieldValue("description",t?.description),M.setFieldValue("image",t?.image)},D=(t,s)=>{s||s==0?$.setFieldValue("index",s):$.setFieldValue("index",null),$.setFieldValue("title",t?.title),$.setFieldValue("link",t?.link),$.setFieldValue("description",t?.description)},ne=(t,s)=>{s||s==0?G.setFieldValue("index",s):G.setFieldValue("index",null),G.setFieldValue("name",t?.name),G.setFieldValue("issuing_org",t?.issuing_org),G.setFieldValue("issue_date",t?.issue_date),G.setFieldValue("url",t?.url)},xe=(t,s)=>{s||s==0?W.setFieldValue("index",s):W.setFieldValue("index",null),W.setFieldValue("name",t?.name),W.setFieldValue("issuing_org",t?.issuing_org),W.setFieldValue("start_date",t?.start_date),W.setFieldValue("end_date",t?.end_date)},De=(t,s)=>{s||s==0?q.setFieldValue("index",s):q.setFieldValue("index",null),q.setFieldValue("title",t?.title),q.setFieldValue("patent_number",t?.patent_number),q.setFieldValue("url",t?.url),q.setFieldValue("issue_date",t?.issuing_date),q.setFieldValue("status",t?.status),q.setFieldValue("description",t?.description),q.setFieldValue("inventors",t?.inventors)},Ke=(t,s)=>{s||s==0?T.setFieldValue("index",s):T.setFieldValue("index",null),T.setFieldValue("title",t?.title),T.setFieldValue("publisher",t?.publisher),T.setFieldValue("url",t?.url),T.setFieldValue("status",t?.status),T.setFieldValue("description",t?.description),T.setFieldValue("authors",t?.authors)},Fe=(t,s)=>{s||s==0?H.setFieldValue("index",s):H.setFieldValue("index",null),H.setFieldValue("title",t?.title),H.setFieldValue("start_date",t?.start_date),H.setFieldValue("end_date",t?.end_date),H.setFieldValue("description",t?.description)},yt=t=>{console.log("populating extracurricular form : ",t),pe.setFieldValue("description",t)},wt=(t,s)=>{s||s==0?Q.setFieldValue("index",s):Q.setFieldValue("index",null),Q.setFieldValue("title",t?.title),Q.setFieldValue("date",t?.date),Q.setFieldValue("description",t?.description)},Nt=t=>
3{Pe.setFieldValue("hobbies",t?.hobbies)},ye=(t,s,N)=>{switch(console.log("EDIT : ",t,s,N),t){case"Awards":B(s,N),a(!0);break;case"Projects":D(s,N),n(!0);break;case"Certification":ne(s,N),S(!0);break;case"Courses":xe(s,N),Y(!0);break;case"Patent":De(s,N),m(!0);break;case"Publication":Ke(s,N),p(!0);break;case"Conferences":Fe(s,N),I(!0);break;case"Extracurricular":yt(s),de(!0);break;case"Seminar":wt(s,N),L(!0);break;case"Hobbies":Nt(s),re(!0);break}f(!1),l(!1)},we=t=>{switch(t){case"Awards":M.resetForm(),a(!0);break;case"Projects":$.resetForm(),n(!0);break;case"Certification":G.resetForm(),S(!0);break;case"Courses":W.resetForm(),Y(!0);break;case"Patent":q.resetForm(),m(!0);break;case"Publication":T.resetForm(),p(!0);break;case"Conferences":H.resetForm(),I(!0);break;case"Extracurricular":pe.resetForm(),de(!0);break;case"Seminar":Q.resetForm(),L(!0);break;case"Hobbies":Pe.resetForm(),re(!0);break}f(!1),l(!1)},Ne=async(t,s)=>{const N=c.values,R=[];c.values.overall_skills.forEach(ee=>{R.push(ee.name)}),N.overall_skills=R;let u=c.values;switch(t){case"Awards":u.awards.splice(s,1);try{await te(u,i),M.resetForm(),a(!1),l(!0),f(!0),Z()}catch(ee){console.log("ERROR deleting award : ",ee)}break;case"Projects":u.projects.splice(s,1);try{await te(u,i),$.resetForm(),n(!1),l(!0),f(!0),Z()}catch(ee){console.log("ERROR deleting project : ",ee)}break;case"Certification":u.certifications.splice(s,1);try{await te(u,i),G.resetForm(),S(!1),l(!0),f(!0),Z()}catch(ee){console.log("ERROR deleting certification : ",ee)}break;case"Courses":u.courses.splice(s,1);try{await te(u,i),W.resetForm(),Y(!1),l(!0),f(!0),Z()}catch(ee){console.log("ERROR deleting course : ",ee)}break;case"Patent":u.patents.splice(s,1);try{await te(u,i),q.resetForm(),m(!1),l(!0),f(!0),Z()}catch(ee){console.log("ERROR deleting patent : ",ee)}break;case"Publication":u.publications.splice(s,1);try{await te(u,i),T.resetForm(),p(!1),l(!0),f(!0),Z()}catch(ee){console.log("ERROR deleting publication : ",ee)}break;case"Conferences":u.conferences.splice(s,1);try{await te(u,i),I(!1),l(!0),f(!0),Z()}catch(ee){console.log("ERROR deleting conference : ",ee)}break;case"Extracurricular":u.extra_curricular_activities=null;try{await te(u,i),pe.resetForm(),de(!1),l(!0),f(!0),Z(),console.log("userAdditionalInfo : ",u)}catch(ee){console.log("ERROR deleting extracurricular : ",ee)}break;case"Seminar":u.seminars.splice(s,1);try{await te(u,i),L(!1),l(!0),f(!0),Z()}catch(ee){console.log("ERROR deleting seminar : ",ee)}break}},Z=async()=>{try{const s=(await xs(i)).data.data;c.setValues({id:s?.id||"",awards:s?.awards||[],projects:s?.projects||[],certifications:s?.certifications||[],courses:s?.courses||[],patents:s?.patents||[],publications:s?.publications||[],conferences:s?.conferences||[],extra_curricular_activities:s?.extra_curricular_activities||"",seminars:s?.seminars||[],career_gap:s?.career_gap||[],hobbies:s?.hobbies||[],overall_skills:s?.overall_skills||[]})}catch{}};r.useEffect(()=>{Z()},[]),r.useEffect(()=>{let t=[];c.values.awards.length==0&&t.push("Awards"),c.values.projects.length==0&&t.push("Projects"),c.values.certifications.length==0&&t.push("Certification"),c.values.courses.length==0&&t.push("Courses"),c.values.patents.length==0&&t.push("Patent"),c.values.publications.length==0&&t.push("Publication"),c.values.conferences.length==0&&t.push("Conferences"),c.values.extra_curricular_activities.length==0&&t.push("Extracurricular activities"),c.values.seminars.length==0&&t.push("Seminar"),c.values.hobbies.length==0&&t.push("Hobbies"),j(t)},[c.values]);const _t=()=>{window.scrollTo(0,0),w(ue("education"))},kt=()=>{window.scrollTo(0,0),!c.errors.overall_skills&&(w(ue("profile")),P("/dashboard"))};return r.useEffect(()=>{console.log("******* FORMIK ADDITIONAL VALUES : ",c.values);const t=c.values.awards.map(E=>({title:E?.title||"",associated_with:E?.associated_with||"",date:E?.date||"",description:E?.description||"",image:E?.image||""})),s=c.values.projects.map(E=>({title:E?.title||"",link:E?.link||"",description:E?.description||""})),N=c.values.certifications.map(E=>({name:E?.name||"",issuing_org:E?.issuing_org||"",issue_date:E?.issue_date||"",url:E?.url||""})),R=c.values.courses.map(E=>({name:E?.name||"",issuing_org:E?.issuing_org||"",start_date:E?.start_date||"",end_date:E?.end_date||""})),u=c.values.patents.map(E=>({title:E?.title||"",patent_number:E?.patent_number||"",url:E?.url||"",issuing_date:E?.issue_date||"",status:E?.status||"",description:E?.description||"",inventors:E?.inventors||[]})),ee=c.values.publications.map(E=>({title:E?.title||"",publisher:E?.publisher||"",url:E?.url||"",status:E?.status||"",description:E?.description||"",authors:E?.authors||[]})),Ct=c.values.conferences.map(E=>({title:E?.title||"",start_date:E?.start_date||"",end_date:E?.end_date||"",description:E?.description||""})),St=c.values.extra_curricular_activities,Et=c.values.seminars.map(E=>({title:E?.title||"",date:E?.date||"",description:E?.description||""})),Ft=c.values.hobbies.map(E=>E),Pt=c.values.overall_skills.map(E=>E),st={id:c.values.id||"",awards:t||[],projects:s||[],certifications:N||[],courses:R||[],patents:u||[],publications:ee||[],
3conferences:Ct||[],extra_curricular_activities:St||"",seminars:Et||[],career_gap:[],hobbies:Ft||[],overall_skills:Pt||[]};console.log("userAdditionalInfo : ",st),w(ms(st))},[c.values]),e.jsxs("div",{className:"w-[560px] min-h-[1000px] flex flex-col pr-10 mt-12",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex flex-col w-full h-full justify-between",children:[e.jsxs("div",{className:"flex justify-between w-full",children:[e.jsxs("p",{className:" text-h4 text-pureBlack font-poppins font-[500]",children:["Skills ",e.jsx("span",{className:"text-accentError",children:"*"})]}),e.jsx("p",{className:" flex justify-center items-center text-darkPurple text-caption",children:"Max Limit. 30"})]}),e.jsx(vt,{theme:"dark",hideLabels:!0,suggestedSkills:[],skills:c.values.overall_skills,onSkillChange:Qe,maxItems:30,loading:h}),e.jsx("p",{className:" text-caption text-red",children:c.errors.overall_skills})]}),_&&e.jsxs("div",{className:"flex flex-col  mt-5",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Add Another Section"}),e.jsx(J,{handler:g,lg:"lg"})]}),b.length==0&&e.jsx("p",{className:"mt-3 text-caption text-red",children:"You have added all the sections. Please remove any existing section to add a new one."}),v&&e.jsx("div",{className:"flex justify-start items-center flex-wrap mt-2",children:b.map(t=>e.jsx("button",{onClick:()=>O(t),className:"flex h-[35px] justify-between items-center px-[10px] py-[5px] border-[1px] rounded-[5px] border-btnDarkPurple mt-3 mr-4 hover:bg-btnDarkPurple hover:text-white transition-all duration-200",children:e.jsx("p",{className:"w-full text-body1 font-poppins font-[500] ",children:t})},t))})]}),o&&c.values.awards.length>0&&e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Awards"})}),e.jsx(J,{handler:()=>we("Awards")})]}),c.values.awards.map((t,s)=>e.jsxs("div",{className:"flex justify-between w-full h-[80px] bg-wheat rounded-[4px] p-[10px] overflow-hidden bg-opacity-50 mt-2",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("p",{className:"text-subtitle1 text-pureBlack font-poppins font-[500]",children:t?.title}),e.jsx("p",{className:"text-caption text-pureBlack font-normal mt-2",children:t?.description})]}),e.jsxs("div",{className:"mt-[10px] mr-[10px] flex space-x-[10px] w-[60px] h-[25px]",children:[e.jsx("button",{onClick:()=>ye("Awards",t,s),type:"button",className:"flex justify-center items-center rounded-full bg-lightPurple w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(he,{color:"#2B1845",className:"w-[12px] h-[12px]"})}),e.jsx("button",{onClick:()=>Ne("Awards",s),type:"button",className:"flex justify-center items-center rounded-full bg-red w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(ce,{color:"#fff",className:"w-[20px] h-[20px]"})})]})]},s))]}),o&&c.values.projects.length>0&&e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Projects"})}),e.jsx(J,{handler:()=>we("Projects")})]}),c.values.projects.map((t,s)=>e.jsxs("div",{className:"flex justify-between w-full h-[80px] bg-wheat rounded-[4px] p-[10px] overflow-hidden bg-opacity-50 mt-2",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("p",{className:"text-subtitle1 text-pureBlack font-poppins font-[500]",children:t?.title}),e.jsx("p",{className:"text-caption text-pureBlack font-normal mt-2",children:t?.description})]}),e.jsxs("div",{className:"mt-[10px] mr-[10px] flex space-x-[10px] w-[60px] h-[25px]",children:[e.jsx("button",{onClick:()=>ye("Projects",t,s),type:"button",className:"flex justify-center items-center rounded-full bg-lightPurple w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(he,{color:"#2B1845",className:"w-[12px] h-[12px]"})}),e.jsx("button",{onClick:()=>Ne("Projects",s),type:"button",className:"flex justify-center items-center rounded-full bg-red w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(ce,{color:"#fff",className:"w-[20px] h-[20px]"})})]})]},s))]}),o&&c.values.certifications.length>0&&e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Certification"})}),e.jsx(J,{handler:()=>we("Certification")})]}),c.values.certifications.map((t,s)=>e.jsxs("div",{className:"flex justify-between w-full h-[80px] bg-wheat rounded-[4px] p-[10px] overflow-hidden bg-opacity-50 mt-2",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("p",{className:"text-subtitle1 text-pureBlack font-poppins font-[500]",children:t?.name}),e.jsx("p",{className:"text-caption text-pureBlack font-normal mt-2",children:t?.issuing_org})]}),e.jsxs("div",{className:"mt-[10px] mr-[10px] flex space-x-[10px] w-[60px] h-[25px]",children:[e.jsx("button",{onClick:()=>ye("Certification",t,s),type:"button",className:"flex justify-center items-center rounded-full bg-lightPurple w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(he,{color:"#2B1845",className:"w-[12px] h-[12px]"})}),e.jsx("button",{onClick:()=>Ne("Certification",s),type:"button",className:"flex justify-center items-center rounded-full bg-red w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(ce,{color:"#fff",className:"w-[20px] h-[20px]"})})]})]},s))]}),o&&c.values.courses.length>0&&e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Courses"})}),e.jsx(J,{handler:()=>we("Courses")})]}),c.values.courses.map((t,s)=>e.jsxs("div",{className:"flex justify-between w-full h-[80px] bg-wheat rounded-[4px] p-[10px] overflow-hidden bg-opacity-50 mt-2",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("p",{className:"text-subtitle1 text-pureBlack font-poppins font-[500]",children:t?.name}),e.jsx("p",{className:"text-caption text-pureBlack font-normal mt-2",children:t?.issuing_org})]}),e.jsxs("div",{className:"mt-[10px] mr-[10px] flex space-x-[10px] w-[60px] h-[25px]",children:[e.jsx("button",{onClick:()=>ye("Courses",t,s),type:"button",className:"flex justify-center items-center rounded-full bg-lightPurple w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(he,{color:"#2B1845",className:"w-[12px] h-[12px]"})}),e.jsx("button",{onClick:()=>Ne("Courses",s),type:"button",className:"flex justify-center items-center rounded-full bg-red w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(ce,{color:"#fff",className:"w-[20px] h-[20px]"})})]})]},s))]}),o&&c.values.patents.length>0&&e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Patent"})}),e.jsx(J,{handler:()=>we("Patent")})]}),c.values.patents.map((t,s)=>e.jsxs("div",{className:"flex justify-between w-full h-[80px] bg-wheat rounded-[4px] p-[10px] overflow-hidden bg-opacity-50 mt-2",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("p",{className:"text-subtitle1 text-pureBlack font-poppins font-[500]",children:t?.title}),e.jsx("p",{className:"text-caption text-pureBlack font-normal mt-2",children:t?.description})]}),e.jsxs("div",{className:"mt-[10px] mr-[10px] flex space-x-[10px] w-[60px] h-[25px]",children:[e.jsx("button",{onClick:()=>ye("Patent",t,s),type:"button",className:"flex justify-center items-center rounded-full bg-lightPurple w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(he,{color:"#2B1845",className:"w-[12px] h-[12px]"})}),e.jsx("button",{onClick:()=>Ne("Patent",s),type:"button",className:"flex justify-center items-center rounded-full bg-red w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(ce,{color:"#fff",className:"w-[20px] h-[20px]"})})]})]},s))]}),o&&c.values.publications.length>0&&e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Publication"})}),e.jsx(J,{handler:()=>we("Publication")})]}),c.values.publications.map((t,s)=>e.jsxs("div",{className:"flex justify-between w-full h-[80px] bg-wheat rounded-[4px] p-[10px] overflow-hidden bg-opacity-50 mt-2",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("p",{className:"text-subtitle1 text-pureBlack font-poppins font-[500]",children:[t?.title,t?.publisher?" - "+t?.publisher:""]}),e.jsx("p",{className:"text-caption text-pureBlack font-normal mt-2",children:t?.description})]}),e.jsxs("div",{className:"mt-[10px] mr-[10px] flex space-x-[10px] w-[60px] h-[25px]",children:[e.jsx("button",{onClick:()=>ye("Publication",t,s),type:"button",className:"flex justify-center items-center rounded-full bg-lightPurple w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(he,{color:"#2B1845",className:"w-[12px] h-[12px]"})}),e.jsx("button",{onClick:()=>Ne("Publication",s),type:"button",className:"flex justify-center items-center rounded-full bg-red w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(ce,{color:"#fff",className:"w-[20px] h-[20px]"})})]})]},s))]}),o&&c.values.conferences.length>0&&e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Conferences"})}),e.jsx(J,{handler:()=>we("Conferences")})]}),c.values.conferences.map((t,s)=>e.jsxs("div",{className:"flex justify-between w-full h-[80px] bg-wheat rounded-[4px] p-[10px] overflow-hidden bg-opacity-50 mt-2",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("p",{className:"text-subtitle1 text-pureBlack font-poppins font-[500]",children:t?.title}),e.jsx("p",{className:"text-caption text-pureBlack font-normal mt-2",children:t?.description})]}),e.jsxs("div",{className:"mt-[10px] mr-[10px] flex space-x-[10px] w-[60px] h-[25px]",children:[e.jsx("button",{onClick:()=>ye("Conferences",t,s),type:"button",className:"flex justify-center items-center rounded-full bg-lightPurple w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(he,{color:"#2B1845",className:"w-[12px] h-[12px]"})}),e.jsx("button",{onClick:()=>Ne("Conferences",s),type:"button",className:"flex justify-center items-center rounded-full bg-red w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(ce,{color:"#fff",className:"w-[20px] h-[20px]"})})]})]},s))]}),o&&c.values.extra_curricular_activities?.length>0&&e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Extracurricular activities"})}),e.jsx(J,{handler:()=>we("Extracurricular")}
3)]}),e.jsxs("div",{className:"flex justify-between w-full h-[80px] bg-wheat rounded-[4px] p-[10px] overflow-hidden bg-opacity-50 mt-2",children:[e.jsx("p",{children:c.values.extra_curricular_activities}),e.jsxs("div",{className:"mt-[10px] mr-[10px] flex space-x-[10px] w-[60px] h-[25px]",children:[e.jsx("button",{onClick:()=>ye("Extracurricular",c.values.extra_curricular_activities),type:"button",className:"flex justify-center items-center rounded-full bg-lightPurple w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(he,{color:"#2B1845",className:"w-[12px] h-[12px]"})}),e.jsx("button",{onClick:()=>Ne("Extracurricular"),type:"button",className:"flex justify-center items-center rounded-full bg-red w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(ce,{color:"#fff",className:"w-[20px] h-[20px]"})})]})]})]}),o&&c.values.seminars.length>0&&e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Seminar"})}),e.jsx(J,{handler:()=>we("Seminar")})]}),c.values.seminars.map((t,s)=>e.jsxs("div",{className:"flex justify-between w-full h-[80px] bg-wheat rounded-[4px] p-[10px] overflow-hidden bg-opacity-50 mt-2",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("p",{className:"text-subtitle1 text-pureBlack font-poppins font-[500]",children:t?.title}),e.jsx("p",{className:"text-caption text-pureBlack font-normal mt-2",children:t?.description})]}),e.jsxs("div",{className:"mt-[10px] mr-[10px] flex space-x-[10px] w-[60px] h-[25px]",children:[e.jsx("button",{onClick:()=>ye("Seminar",t,s),type:"button",className:"flex justify-center items-center rounded-full bg-lightPurple w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(he,{color:"#2B1845",className:"w-[12px] h-[12px]"})}),e.jsx("button",{onClick:()=>Ne("Seminar",s),type:"button",className:"flex justify-center items-center rounded-full bg-red w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(ce,{color:"#fff",className:"w-[20px] h-[20px]"})})]})]},s))]}),o&&c.values.hobbies.length>0&&e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Interests / Hobbies"})}),e.jsx(J,{})]}),e.jsxs("div",{className:"flex justify-between w-full bg-wheat rounded-[4px] p-[10px] overflow-hidden bg-opacity-50 mt-2",children:[e.jsx("div",{className:"flex flex-col",children:c.values?.hobbies?.map((t,s)=>e.jsx("p",{className:"text-caption text-pureBlack font-normal mt-2",children:t},s))}),e.jsx("div",{className:" mr-[10px] flex w-fit h-[25px]",children:e.jsx("button",{onClick:()=>ye("Hobbies",c.values.hobbies),type:"button",className:"flex justify-center items-center rounded-full bg-lightPurple w-[25px] h-[25px] hover:scale-110 active:scale-100 transition-all duration-200 ",children:e.jsx(he,{color:"#2B1845",className:"w-[12px] h-[12px]"})})})]})]}),d&&e.jsx("form",{onSubmit:M.handleSubmit,children:e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Awards"})}),e.jsx(J,{})]}),e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsx(X,{name:"title",type:"text",placeholder:"Title",label:"Title",value:M.values.title,onChange:M.handleChange,onBlur:M.handleBlur,touched:M.touched.title,error:M.errors.title}),e.jsxs("div",{className:"flex space-x-3",children:[e.jsx(X,{name:"associated_with",type:"text",placeholder:"Associated with",label:"Associated with",value:M.values.associated_with,onChange:M.handleChange}),e.jsx(Ce,{style:"mt-3 w-[49%]",label:"Issue Date",name:"issue_date",value:M.values.issue_date,onChange:M.handleChange,min:"1900-01-01",max:"2200-12-31"})]}),e.jsx(X,{name:"description",type:"text",placeholder:"Description",label:"Description",value:M.values.description,onChange:M.handleChange}),e.jsxs("div",{className:"w-full flex justify-end space-x-4 mt-12",children:[e.jsx(ve,{cancelSave:()=>me("Awards")}),e.jsx(be,{})]})]})]})}),z&&e.jsx("form",{onSubmit:$.handleSubmit,children:e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Projects"})}),e.jsx(J,{})]}),e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full space-x-2",children:[e.jsx(X,{name:"title",type:"text",placeholder:"Title",label:"Title",value:$.values.title,onChange:$.handleChange,onBlur:$.handleBlur,touched:$.touched.title,error:$.errors.title}),e.jsx(X,{name:"link",type:"text",placeholder:"Link",label:"Link",value:$.values.link,onChange:$.handleChange})]}),e.jsxs("div",{className:"mt-3 w-full",children:[e.jsx("label",{htmlFor:"description",className:"block text-subtitle2 font-poppins pb-2",children:"Description"}),e.jsx("textarea",{className:"border-[1px] border-sandDune hover:border-pureBlack p-2 rounded-md w-full min-h-[200px] outline-purple px-[14px] py-2",type:"text",name:"description",placeholder:"Description",value:$.values.description,onChange:$.handleChange})]}),e.jsxs("div",{className:"w-full flex justify-end space-x-4 mt-12",children:[e.jsx(ve,{cancelSave:()=>me("Projects")}),e.jsx(be,{})]})]})]})}),C&&e.jsx("form",{onSubmit:G.handleSubmit,children:e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Certification"})}),e.jsx(J,{})]}),e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex space-x-3",children:[e.jsx(X,{name:"name",type:"text",placeholder:"Name",label:"Name",value:G.values.name,onChange:G.handleChange,onBlur:G.handleBlur,touched:G.touched.name,error:G.errors.name}),e.jsx(X,{name:"issuing_org",type:"text",placeholder:"Issuing Organization",label:"Issuing Organization",value:G.values.issuing_org,onChange:G.handleChange,error:G.errors.issuing_org})]}),e.jsxs("div",{className:"flex space-x-3",children:[e.jsx(Ce,{style:"mt-3 w-full",label:"Issue Date",name:"issue_date",value:G.values.issue_date,onChange:G.handleChange,error:G.errors.issue_date,min:"1900-01-01",max:"2200-12-31"}),e.jsx(X,{name:"url",type:"text",placeholder:"URL",label:"URL",value:G.values.url,onChange:G.handleChange})]}),e.jsxs("div",{className:"w-full flex justify-end space-x-4 mt-12",children:[e.jsx(ve,{cancelSave:()=>me("Certification")}),e.jsx(be,{})]})]})]})}),K&&e.jsx("form",{onSubmit:W.handleSubmit,children:e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Courses"})}),e.jsx(J,{})]}),e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex space-x-3",children:[e.jsx(X,{name:"name",type:"text",placeholder:"Name",label:"Name",value:W.values.name,onChange:W.handleChange,onBlur:W.handleBlur,touched:W.touched.name,error:W.errors.name}),e.jsx(X,{name:"issuing_org",type:"text",placeholder:"Issuing Organization",label:"Issuing Organization",value:W.values.issuing_org,onChange:W.handleChange,error:W.errors.issuing_org})]}),e.jsxs("div",{className:"flex space-x-3",children:[e.jsx(Ce,{style:"mt-3 w-full",label:"Start Date",name:"start_date",value:W.values.start_date,onChange:W.handleChange,min:"1900-01-01",max:"2200-12-31"}),e.jsx(Ce,{style:"mt-3 w-full",label:"End Date",name:"end_date",value:W.values.end_date,onChange:W.handleChange,min:"1900-01-01",max:"2200-12-31"})]}),e.jsxs("div",{className:"w-full flex justify-end space-x-4 mt-12",children:[e.jsx(ve,{cancelSave:()=>me("Courses")}),e.jsx(be,{})]})]})]})}),k&&e.jsx("form",{onSubmit:q.handleSubmit,children:e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Patent"})}),e.jsx(J,{})]}),e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex space-x-3",children:[e.jsx(X,{name:"title",type:"text",placeholder:"Title",label:"Title",value:q.values.title,onChange:q.handleChange,onBlur:q.handleBlur,touched:q.touched.title,error:q.errors.title}),e.jsx(X,{name:"patent_number",type:"text",placeholder:"Patent Number",label:"Patent Number",value:q.values.patent_number,onChange:q.handleChange})]}),e.jsxs("div",{className:"flex space-x-3",children:[e.jsx(X,{name:"url",type:"text",placeholder:"URL",label:"URL",value:q.values.url,onChange:q.handleChange}),e.jsx(Ce,{style:"mt-3 w-full",label:"Issue Date",name:"issue_date",value:q.values.issue_date,onChange:q.handleChange,min:"1900-01-01",max:"2200-12-31"})]}),e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsx("p",{className:" mb-2",children:"Status"}),e.jsxs("div",{className:"flex w-full items-center",children:[e.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[e.jsx("div",{className:"w-5 h-5 flex justify-center items-center border border-purple shadow-inner rounded-full",children:e.jsx("input",{type:"checkbox",value:"Patent Issued",checked:q.values.status==="issued",onChange:()=>Ie("issued"),className:"h-3 w-3 rounded-full border-2 border-none appearance-none checked:bg-darkPurple checked:border-purple focus:outline-none"})}),e.jsx("span",{className:"text-subtitle1 font-poppins font-[500]",children:"Patent Issued"})]}),e.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer ml-4",children:[e.jsx("div",{className:"w-5 h-5 flex justify-center items-center border border-purple shadow-inner rounded-full",children:e.jsx("input",{type:"checkbox",value:"Patent Pending",checked:q.values.status==="pending",onCh
3ange:()=>Ie("pending"),className:"h-3 w-3 rounded-full border-2 border-none appearance-none checked:bg-darkPurple checked:border-purple focus:outline-none"})}),e.jsx("span",{className:"text-subtitle1 font-poppins font-[500]",children:"Patent Pending"})]})]})]}),e.jsxs("div",{className:"mt-5 w-full",children:[e.jsx("label",{htmlFor:"description",className:"block text-body1 font-poppins pb-2",children:"Description"}),e.jsx("textarea",{className:"border-[1px] border-sandDune hover:border-pureBlack p-2 rounded-md w-full min-h-[200px] outline-purple px-[14px] py-2",type:"text",name:"description",placeholder:"Description",value:q.values.description,onChange:q.handleChange})]}),e.jsxs("div",{className:"w-full flex justify-end space-x-4 mt-12",children:[e.jsx(ve,{cancelSave:()=>me("Patent")}),e.jsx(be,{})]}),e.jsx(ct,{title:"Inventor",subTitle:"You are an author. Add others that contributed to the publication.",contributors:q.values.inventors,updateContributors:He})]})]})}),A&&e.jsx("form",{onSubmit:T.handleSubmit,children:e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Publication"})}),e.jsx(J,{})]}),e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsx(X,{name:"title",type:"text",placeholder:"Title",label:"Title",value:T.values.title,onChange:T.handleChange,onBlur:T.handleBlur,touched:T.touched.title,error:T.errors.title}),e.jsxs("div",{className:" flex w-full space-x-2",children:[e.jsx(X,{name:"publisher",type:"text",placeholder:"Publisher",label:"Publisher",value:T.values.publisher,onChange:T.handleChange}),e.jsx(X,{name:"url",type:"text",placeholder:"URL",label:"Publication URL",value:T.values.url,onChange:T.handleChange})]}),e.jsx(gt,{style:"mt-3 w-[49%]",name:"status",label:"Status",value:T.values.status,onChange:T.handleChange,onBlur:T.handleBlur,options:Gs}),e.jsxs("div",{className:"mt-5 w-full",children:[e.jsx("label",{htmlFor:"description",className:"block text-body1 font-poppins pb-2",children:"Description"}),e.jsx("textarea",{className:"border-[1px] border-sandDune hover:border-pureBlack p-2 rounded-md w-full min-h-[200px] outline-purple px-[14px] py-2",type:"text",name:"description",placeholder:"Description",value:T.values.description,onChange:T.handleChange})]}),e.jsxs("div",{className:"w-full flex justify-end space-x-4 mt-12",children:[e.jsx(ve,{cancelSave:()=>me("Publication")}),e.jsx(be,{})]}),e.jsx(ct,{title:"Author",subTitle:"You are an author. Add others that contributed to the publication.",contributors:T.values.authors,updateContributors:We})]})]})}),F&&e.jsx("form",{onSubmit:H.handleSubmit,children:e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Conferences"})}),e.jsx(J,{})]}),e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsx(X,{name:"title",type:"text",placeholder:"Title",label:"Title",value:H.values.title,onChange:H.handleChange,onBlur:H.handleBlur,touched:H.touched.title,error:H.errors.title}),e.jsxs("div",{className:"flex space-x-3",children:[e.jsx(Ce,{style:"mt-3 w-full",label:"Start Date",name:"start_date",value:H.values.start_date,onChange:H.handleChange,error:H.errors.start_date,min:"1900-01-01",max:"2200-12-31"}),e.jsx(Ce,{style:"mt-3 w-full",label:"End Date",name:"end_date",value:H.values.end_date,onChange:H.handleChange,error:H.errors.end_date,min:"1900-01-01",max:"2200-12-31"})]}),e.jsxs("div",{className:"mt-5 w-full",children:[e.jsx("label",{htmlFor:"description",className:"block text-body1 font-poppins font-[500] pb-2",children:"Description"}),e.jsx("textarea",{className:"border-[1px] border-sandDune hover:border-pureBlack p-2 rounded-md w-full min-h-[200px] outline-purple px-[14px] py-2",type:"text",name:"description",placeholder:"Description",value:H.values.description,onChange:H.handleChange}),e.jsx("p",{className:"text-caption text-red",children:H.errors.description})]}),e.jsxs("div",{className:"w-full flex justify-end space-x-4 mt-12",children:[e.jsx(ve,{cancelSave:()=>me("Conferences")}),e.jsx(be,{})]})]})]})}),ie&&e.jsx("form",{onSubmit:pe.handleSubmit,children:e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Extracurricular activities"})}),e.jsx(J,{})]}),e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"mt-5 w-full",children:[e.jsx("label",{htmlFor:"description",className:"block text-body1 font-poppins font-[500] pb-2",children:"Description"}),e.jsx("textarea",{className:"border-[1px] border-sandDune hover:border-pureBlack p-2 rounded-md w-full min-h-[200px] outline-purple px-[14px] py-2",type:"text",name:"description",placeholder:"Description",value:pe.values.description,onChange:pe.handleChange})]}),e.jsx("p",{className:"text-caption text-red",children:pe.errors.description}),e.jsxs("div",{className:"w-full flex justify-end space-x-4 mt-12",children:[e.jsx(ve,{cancelSave:()=>me("Extracurricular")}
3),e.jsx(be,{})]})]})]})}),ke&&e.jsx("form",{onSubmit:Q.handleSubmit,children:e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsxs("div",{className:"flex w-full justify-between",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("p",{className:"w-full text-h4 text-pureBlack font-poppins font-[500] ",children:"Seminar"})}),e.jsx(J,{})]}),e.jsxs("div",{className:"flex flex-col mt-5",children:[e.jsx(X,{name:"title",type:"text",placeholder:"Title",label:"Title",value:Q.values.title,onChange:Q.handleChange,onBlur:Q.handleBlur,touched:Q.touched.title,error:Q.errors.title}),e.jsx("div",{className:"flex space-x-3",children:e.jsx(Ce,{style:"mt-3 w-full",label:"Date",name:"date",value:Q.values.date,onChange:Q.handleChange,error:Q.errors.date,min:"1900-01-01",max:"2200-12-31"})}),e.jsxs("div",{className:"mt-5 w-full",children:[e.jsx("label",{htmlFor:"description",className:"block text-body1 font-poppins font-[500] pb-2",children:"Description"}),e.jsx("textarea",{className:"border-[1px] border-sandDune hover:border-pureBlack p-2 rounded-md w-full min-h-[200px] outline-purple px-[14px] py-2",type:"text",name:"description",placeholder:"Description",value:Q.values.description,onChange:Q.handleChange}),e.jsx("p",{className:"text-caption text-red",children:Q.errors.description})]}),e.jsxs("div",{className:"w-full flex justify-end space-x-4 mt-12",children:[e.jsx(ve,{cancelSave:()=>me("Seminar")}),e.jsx(be,{})]})]})]})}),se&&e.jsx(e.Fragment,{children:e.jsx(Ms,{onInterestChange:ze,hobbies:c.values.hobbies,cancelSave:()=>me("Hobbies"),save:()=>ge("Hobbies",c.values.hobbies)})})]}),_&&e.jsx(Re,{handlePrevPage:_t,handleNextPage:kt})]})},Ws=["profile","contactInfo","preferences","experience","education","additional","completed"],zs=i=>{const h=Ee(),[y,P]=r.useState([]),w=v=>{console.log("PAGE SWITCH : ",v),h(ue(v))},_=v=>y.includes(v),f=v=>{console.log(v,"pages");const x=Ws,b=x.indexOf(v.page),j=x.slice(0,b+1);P(j)};return r.useEffect(()=>{f(i)},[i]),e.jsxs("div",{className:"flex justify-center items-center w-full h-[50px] mt-12 relative px-5 md:px-0",children:[e.jsxs("div",{onClick:()=>w("profile"),className:"flex flex-col justify-center items-center relative-center cursor-pointer",children:[e.jsx("div",{className:"w-[25px] h-[25px] flex justify-center items-center  bg-btnDarkPurple rounded-full",children:e.jsx("img",{src:Se.Stepper.Profile_icon,alt:"Contact_icon",className:"w-[12px] h-[14px]"})}),e.jsx("div",{className:"text-black absolute -bottom-2 text-[9px] md:text-caption font-poppins ",children:"Profile"})]}),e.jsx("div",{className:_("contactInfo")?"w-[170px] h-1 bg-btnDarkPurple":"w-[170px] h-1 bg-zinc"}),e.jsxs("div",{onClick:()=>w("contactInfo"),className:"flex flex-col justify-center items-center relative-center cursor-pointer",children:[e.jsx("div",{className:_("contactInfo")?"w-[25px] h-[25px] flex justify-center items-center  bg-btnDarkPurple rounded-full":"w-[25px] h-[25px] flex justify-center items-center  bg-zinc rounded-full",children:e.jsx("img",{src:Se.Stepper.Contact_icon,alt:"Contact_icon",className:"w-[11px] h-[14px]"})}),e.jsx("div",{className:"text-textLightGray absolute -bottom-2 font-poppins text-[9px] md:text-caption ",children:"Contact Info"})]}),e.jsx("div",{className:_("preferences")?"w-[170px] h-1 bg-btnDarkPurple":"w-[170px] h-1 bg-zinc"}),e.jsxs("div",{onClick:()=>w("preferences"),className:"flex flex-col justify-center items-center relative-center cursor-pointer",children:[e.jsx("div",{className:_("preferences")?"w-[25px] h-[25px] flex justify-center items-center  bg-btnDarkPurple rounded-full":"w-[25px] h-[25px] flex justify-center items-center  bg-zinc rounded-full",children:e.jsx("img",{src:Se.Stepper.Preferences_icon,alt:"Contact_icon",className:"w-[11px] h-[14px]"})}),e.jsx("div",{className:"text-textLightGray absolute -bottom-2 font-poppins text-[9px] md:text-caption  ",children:"Preferences"})]}),e.jsx("div",{className:_("experience")?"w-[170px] h-1 bg-btnDarkPurple":"w-[170px] h-1 bg-zinc"}),e.jsxs("div",{onClick:()=>w("experience"),className:"flex flex-col justify-center items-center relative-center cursor-pointer",children:[e.jsx("div",{className:_("experience")?"w-[25px] h-[25px] flex justify-center items-center  bg-btnDarkPurple roun
3ded-full":"w-[25px] h-[25px] flex justify-center items-center  bg-zinc rounded-full",children:e.jsx("img",{src:Se.Stepper.Experience_icon,alt:"Contact_icon",className:"w-[13px] h-[14px]"})}),e.jsx("div",{className:"text-textLightGray absolute -bottom-2 font-poppins text-[9px] md:text-caption ",children:"Experience"})]}),e.jsx("div",{className:_("education")?"w-[170px] h-1 bg-btnDarkPurple":"w-[170px] h-1 bg-zinc"}),e.jsxs("div",{onClick:()=>w("education"),className:"flex flex-col justify-center items-center relative-center cursor-pointer",children:[e.jsx("div",{className:_("education")?"w-[25px] h-[25px] flex justify-center items-center  bg-btnDarkPurple rounded-full":"w-[25px] h-[25px] flex justify-center items-center  bg-zinc rounded-full",children:e.jsx("img",{src:Se.Stepper.Education_icon,alt:"Contact_icon",className:"w-[15px] h-[15px]"})}),e.jsx("div",{className:"text-textLightGray absolute -bottom-2 font-poppins text-[9px] md:text-caption",children:"Education"})]}),e.jsx("div",{className:_("additional")?"w-[170px] h-1 bg-btnDarkPurple":"w-[170px] h-1 bg-zinc"}),e.jsxs("div",{onClick:()=>w("additional"),className:"flex flex-col justify-center items-center relative-center cursor-pointer",children:[e.jsx("div",{className:_("additional")?"w-[25px] h-[25px] flex justify-center items-center  bg-btnDarkPurple rounded-full":"w-[25px] h-[25px] flex justify-center items-center  bg-zinc rounded-full",children:e.jsx("img",{src:Se.Stepper.Additional_icon,alt:"Contact_icon",className:"w-[11px] h-[14px]"})}),e.jsx("div",{className:"text-textLightGray absolute -bottom-2 font-poppins text-[9px] md:text-caption",children:"Additional"})]}),e.jsx("div",{className:_("completed")?"w-[170px] h-1 bg-btnDarkPurple":"w-[170px] h-1 bg-zinc hidden md:flex"}),e.jsxs("div",{onClick:()=>w("completed"),className:"hidden md:flex flex-col justify-center items-center relative-center cursor-pointer",children:[e.jsx("div",{className:_("completed")?"w-[25px] h-[25px] flex justify-center items-center  bg-btnDarkPurple rounded-full":"w-[25px] h-[25px] flex justify-center items-center  bg-zinc rounded-full",children:e.jsx("img",{src:Se.Stepper.Complete_icon,alt:"Contact_icon",className:"w-[11px] h-[14px]"})}),e.jsx("div",{className:"text-textLightGray absolute -bottom-2 font-poppins text-[9px] md:text-caption",children:"Completed"})]})]})},wl=[{id:"profile",name:"Profile"},{id:"contactInfo",name:"ContactInfo"},{id:"preferences",name:"Preferences"},{id:"experience",name:"Experience"},{id:"education",name:"Education"},{id:"additional",name:"Additional"}],Nl=()=>{const i=Le(),{geoResponse:h}=ft(),y=_e(b=>b.currentPage.currentPage),P=_e(b=>b.auth.token),[w,_]=at.useState(null),f=Ee(),v=()=>{switch(y){case"profile":return e.jsx(Es,{});case"contactInfo":return e.jsx(Rs,{geoResponse:h});case"preferences":return e.jsx(Ds,{geoResponse:h});case"experience":return e.jsx(Ls,{});case"education":return e.jsx(Ys,{});case"additional":return e.jsx(Hs,{});default:return null}},x=async()=>{try{const b=await fs(P);_(b?.data)}catch(b){console.log(b),b.response.data.msg==="this is not a valid token"&&(f(hs()),f(bs()),i("/"),window.location.reload(!0))}};return at.useEffect(()=>{x()},[]),e.jsxs("div",{className:"w-full h-full flex flex-col items-center min-h-[100vh]",children:[e.jsx(ks,{}),e.jsxs("div",{className:"max-w-7xl flex flex-col justify-center items-center w-full h-full",children:[e.jsx(zs,{page:y}),e.jsxs("div",{className:"flex justify-center items-start w-full h-full mb-10 pl-10 md:pl-0",children:[v(),e.jsx(Cs,{uploadedResume:w})]})]})]})};export{Nl as default,wl as resumeSections};
4//# sourceMappingURL=CreateResume-CClhM6JZ.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.