1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6111],{8072:(e,l,n)=>{"use strict";n.d(l,{A:()=>a});var o=n(37876),i=n(89099),r=n(2171);let a=e=>l=>{let n=(0,i.useRouter)(),{primaryUserData:a}=(0,r.useSelector)(e=>e.PrimaryUserData);if(null==a?void 0:a.id)return(null==a?void 0:a.isInternalUser)||(null==a?void 0:a.isInternalJobPostUser)?(0,o.jsx)(e,{...l}):(n.push("/404"),null)}},32288:(e,l,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/company/job-board/pl-job",function(){return n(55350)}])},46397:(e,l,n)=>{"use strict";n.d(l,{A:()=>h});var o=n(37876),i=n(14232),r=n(97160),a=n(6815),t=n(34321),s=n(89311),d=n(61028),u=n(63819),c=n(96940);let E=e=>e?e.city?"".concat(e.city).concat(e.countryCode||e.country?", ".concat(e.countryCode||e.country):""):"".concat(e.country||"WorldWide"):"",v=e=>{let{data:l}=e;return l?(0,o.jsx)(r.c.MultiValueLabel,{...e,children:(0,o.jsxs)("div",{className:"flex items-center gap-1",children:[(0,o.jsx)(s.default.MediumText,{xs:!0,children:E(l)}),(0,o.jsx)(c.Vn,{})]})}):null},h=e=>{var l;let{error:n,setError:r=()=>{},location:s,setLocation:c,label:h="",isClearable:m=!1,isDisabled:p=!1,required:b=!1,placeholder:N="Search Cities / Country",cacheCity:S=!0,onClear:C=()=>{},isMulti:O=!0,subText:x,max:j=null}=e,[R,f]=(0,i.useState)(!1),y=(0,i.useRef)(null),[A,T]=(0,i.useState)(""),[_,P]=(0,i.useState)(s);(0,i.useEffect)(()=>()=>{y.current&&clearTimeout(y.current)},[]);let I=async e=>{f(!0);try{var l,n;let o=await (0,t.g$)({query:e,country:(null==s?void 0:s.countryCode)||""}),i=null==o||null==(n=o.data)||null==(l=n.data)?void 0:l.data;return f(!1),(i||[]).map(e=>({...e,label:E(e),value:E(e)}))}catch(e){}finally{f(!1)}},g=async e=>{try{await (0,t.UA)(e)}catch(e){}};return(0,i.useEffect)(()=>{O?(null==s?void 0:s.length)?P(s.map(e=>({...e,label:E(e),value:E(e)}))):P([]):Object.keys(s||{}).length>0?P({...s,label:E(s),value:E(s)}):P(null)},[JSON.stringify(s)]),(0,o.jsx)("div",{children:(0,o.jsx)("div",{children:(0,o.jsx)(d.A,{isMulti:O,as:a.A,label:h,subText:x,max:j,id:"location",inputId:"location",instanceId:"location",cacheOptions:S,loadOptions:e=>new Promise(l=>{if(!e||e.trim().length<2)return void l([]);y.current&&clearTimeout(y.current),y.current=setTimeout(()=>l(I(e)),700)}),placeholder:N,components:{MultiValueLabel:v},isClearable:m,disabled:p,isLoading:R,onChange:e=>{if((A||n)&&(T(""),r()),!e)return void C();(e=>{c(e),O?e.filter(e=>!(null==_?void 0:_.some(l=>u.default.convertLocationObjectToString(e)===u.default.convertLocationObjectToString(l)))).forEach(e=>{g(e)}):g(e),P(e)})(e)},value:_,noOptionsMessage:e=>{let{inputValue:l}=e;return l?"No results found":"Start typing.."},required:b,error:A||n,menuPortalTarget:"undefined"!=typeof document?null==(l=document)?void 0:l.body:void 0})})})}},55350:(e,l,n)=>{"use strict";n.r(l),n.d(l,{default:()=>eO});var o=n(37876),i=n(77328),r=n.n(i),a=n(89099),t=n(14232),s=n(2171),d=n(81515),u=n.n(d),c=n(48230),E=n.n(c),v=n(47553),h=n(57994),m=n(70514),p=n(16495),b=n(63819),N=n(68827),S=n(41205),C=n(34321),O=n(71297),x=n(69198),j=n(34217),R=n(82669),f=n(20901),y=n(89311),A=n(21639),T=n(99478),_=n(8072),P=n(95726),I=n(86425),g=n(66247),L=n(46250),F=n(95205),J=n(50803),B=n(78063),D=n(61028),w=n(19635),M=n.n(w);let{INTERNSHIP:k,INTERNSHIP_DURATION:q}=m.A,{APPLY_LINK:U,EXPERIENCE:W,JOB_ROLES:Y,JOB_TYPES:H,SKILLS:X,DEPARTMENT:K,LOCATION_PREFERENCES:V,JOB_TITLE:z,SALARY:G,JOB_DESCRIPTION:Q,LOCATION:$}=p.JOB_PREFERENCES_CONST;var Z=n(43642);let ee=m.A.INTERNSHIP,el=m.A.INTERNSHIP_DURATION,en=p.JOB_PREFERENCES_CONST.EQUITY,eo=p.JOB_PREFERENCES_CONST.APPLY_LINK,ei=p.JOB_PREFERENCES_CONST.EXPERIENCE,er=p.JOB_PREFERENCES_CONST.JOB_ROLES,ea=p.JOB_PREFERENCES_CONST.JOB_TYPES,et=p.JOB_PREFERENCES_CONST.SKILLS,es=p.JOB_PREFERENCES_CONST.DEPARTMENT,ed=p.JOB_PREFERENCES_CONST.MIN,eu=p.JOB_PREFERENCES_CONST.MAX,ec=p.JOB_PREFERENCES_CONST.LOCATION_PREFERENCES,eE=p.JOB_PREFERENCES_CONST.JOB_TITLE,ev=m.A.FULL_TIME_OPPORTUNITY,eh=p.JOB_PREFERENCES_CONST.SALARY,{SECONDARY_SKILLS:em}=m.A,ep="officeSetup",eb="otherOptions",eN="relocation",eS="companyName",eC="companyDomain",eO=(0,v.A)((0,_.A)(()=>{var e,l,n,i,d,c,v,_,w,eO;let ex=(0,a.useRouter)(),{allRecruiterJobs:ej}
1=(0,s.useSelector)(e=>e.RecruiterData),{primaryUserData:eR}=(0,s.useSelector)(e=>e.PrimaryUserData),[ef,ey]=(0,t.useState)(!1),[eA,eT]=(0,t.useState)(),[e_,eP]=(0,t.useState)({}),[eI,eg]=(0,t.useState)(!1),[eL,eF]=(0,t.useState)(!1),[eJ,eB]=(0,t.useState)([]),[eD,ew]=(0,t.useState)({}),[eM,ek]=(0,t.useState)(""),eq=e=>{eD[e]&&(delete eD[e],ew(eD))},eU=(e,l)=>{(null==eD?void 0:eD.API_ERROR)&&eq("API_ERROR"),eP(n=>({...n,[e]:l}))},eW=async(e,l)=>{var n,o,i,r,a,t;if(e.preventDefault(),(null==l?void 0:l.saveAsDraft)&&b.default.isEmptyString(null==e_?void 0:e_[p.JOB_PREFERENCES_CONST.JOB_TITLE]))return void ew(e=>({...e,[p.JOB_PREFERENCES_CONST.JOB_TITLE]:N.A.JOB_PREFERENCES.jobTitle}));let s=(e=>{var l,n,o,i,r;let a=["hiringManagerDetails","publishedAt"];if((null==e?void 0:e.jobType)===ee&&a.push(ei),(null==e?void 0:e.noExperience)&&a.push(ei),[m.A.FREELANCE,m.A.CONSULTANT,m.A.INTERNSHIP].includes(null==e?void 0:e.jobType)){a.push(en);let i={currency:null==e||null==(l=e.salary)?void 0:l.currency,min:null==e||null==(n=e.salary)?void 0:n.min,unit:null==e||null==(o=e.salary)?void 0:o.unit};e.salary=i}let t=u()(e,a);if(null==t?void 0:t[en]){let e={min:(null==(i=t.equity)?void 0:i.min)&&parseFloat(t.equity.min)||null,max:(null==t||null==(r=t.equity)?void 0:r.max)&&parseFloat(t.equity.max)||null,option:t.equity.option};t[en]=e}return(null==t?void 0:t[p.JOB_PREFERENCES_CONST.JOB_DESCRIPTION])&&(t[p.JOB_PREFERENCES_CONST.JOB_DESCRIPTION]=(0,B.sanitizeRichText)(null==t?void 0:t.jobDescription)),t})(e_);if(null==l?void 0:l.publish){let e=S.Ay.jobPostData(s,{canPostJobWithoutSalary:!0,canPostInternshipWithoutSalary:!0});if(b.default.isEmptyString(null==s?void 0:s[eS])&&(e[eS]="Company name is required"),b.default.isEmptyString(null==s?void 0:s[eC])&&(e[eC]="Company domain is required"),console.log("error",e),(null==(n=Object.keys(e))?void 0:n.length)>0){ew(e),ek(N.A.JOB_PREFERENCES.inCompleteJobPrefData);return}}try{eg(!0),(null==s?void 0:s.atsType)&&!(null==s||null==(o=s.jobId)?void 0:o.startsWith("JOB"))&&delete s.jobId;let e=await C.vS.privatelyPostAJob({...s,...l});if(null==l?void 0:l.publish){eP({}),O.A.SuccessToast(x.A.JOB.jobPostPublished),ew({});let l=eJ;l.includes(e.data.id)&&(l=l.filter(l=>l!==e.data.id)),l.unshift(e.data.id),eB(l),localStorage.setItem("private-jobs",JSON.stringify(l)),alert("\uD83D\uDC4D\uD83C\uDFFB Job Added successfully"),ex.push("/company/job-board/pl-job");return}l.saveAsDraft&&(null==(i=Object.keys(eD))?void 0:i.length)>0&&ew({})}catch(e){ek((null==e||null==(t=e.response)||null==(a=t.data)||null==(r=a.error)?void 0:r.message)||N.A.GLOBAL.wrong)}finally{eg(!1)}},eY=e=>{var l,n;let o={...e};(null==ex||null==(l=ex.query)?void 0:l.duplicate)==="true"&&(delete o.jobId,delete o.jobsViewCount,delete o.jobsPeerlistApplyClickCount,delete o.jobsApplyClickCount,delete o.hiringManagerId,delete o.publishedAt,delete o.archivedAt),o.companyName=null==e||null==(n=e.company)?void 0:n.name,o.jobDescription=null==e?void 0:e.jobDescription,eP(o)},eH=async e=>{try{var l;eF(!0);let n=await C.vS.getJobById(e);eY(null==n||null==(l=n.data)?void 0:l.data)}catch(e){O.A.ErrorToast(N.A.COMPANY_PROFILES.jobPostFetchError)}finally{eF(!1)}};(0,t.useEffect)(()=>{var e;eD&&(null==(e=Object.keys(eD))?void 0:e.length)===0&&ek("")},[JSON.stringify(eD)]),(0,t.useEffect)(()=>{var e,l,n;if(null==ex||null==(e=ex.query)?void 0:e.id){let e=null==ex||null==(n=ex.query)||null==(l=n.id)?void 0:l.toUpperCase(),o=ej.find(l=>l.jobId===e);if(!o){if(!(null==e?void 0:e.startsWith("JOB")))return;eH(e);return}eY(o)}try{let e=localStorage.getItem("private-jobs");eB(JSON.parse(e)||[])}catch(e){}},[ex.isReady]);let eX=(e=>{let l=[z,H,K,V,Q,$,Y,X,"otherOptions",G,U];return(null==e?void 0:e.jobType)===k?l.push(q):l.push(W),Math.min(100,Math.round(Object.entries(M()(e,l)).filter(e=>{let[l,n]=e;return Array.isArray(n)?n.length>0:"string"==typeof n?""!==n.trim():"boolean"==typeof n||!("object"!=typeof n||null===n||Array.isArray(n))&&("equity"===l?null==n?void 0:n.option:Object.keys(n).length>0)}).length/l.length*100))})(e_),eK=async()=>{var e,l,n,o,i;if(null==e_?void 0:e_.jobDescription)try{ey(!0);let n=await C.vS.fetchJobFromURL({jobDescription:null==e_?void 0:e_.jobDescription});(null==n||null==(l=n.data)||null==(e=l.data)?void 0:e.jobsData)&&eP(e=>{var l,o;return{...null==n||null==(o=n.data)||null==(l=o.data)?void 0:l.jobsData,...e}})}catch(e){eT((null==e||null==(i=e.response)||null==(o=i.data)||null==(n=o.error)?void 0:n.message)||"Could not fetch job details from job description")}finally{ey(!1)}};if((null==eR?void 0:eR.id)&&!((null==eR?void 0:eR.isInternalUser)||(null==eR?void 0:eR.isInternalJobPostUser)))return(0,o.jsx)(j.A.NonAuthorisedPageErr,{});let eV=(e,l)=>{(null==l?void 0:l.length)>p.MAX_SKILLS&&ew(l=>({...l,[e]:N.A.AUTH.maxSkillsError})),eU(e||et,l)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r(),{children:(0,o.jsx)("title",{children:"Post a Job | Peerlist"})}),(0,o.jsxs)(h.A.Center,{children:[(0,o.jsxs)(h.A.CenterTop,{internalPage:!0,children:[eL&&(0,o.jsx)("div",{className:"ml-4 flex justify-end",children:(0,o.jsx)(R.A,{})}),(0,o.jsx)(A.Ay.Carbon,{small:!0,form:"pl-job-clear-all",onClick:()=>{eP({}),ex.push("/company/job-board/pl-job")},children:"Clear All"})]}),(0,o.jsxs)("div",{className:"py-4 px-6",children:[(0,o.jsx)(f.A.JobDescription,{jobPostDetailState:e_,updateJobDetailState:eU,error:eD,setError:ew}),(0,o.jsx)("div",{children:(0,o.jsx)(A.Ay.Primary,{small:!0,className:"mt-4 ml-auto",onClick:()=>eK(),loading:ef,children:"Fetch From Job Description"})})]}),(0,o.jsx)("div",{className:"p-4 lg:p-6",children:(0,o.jsxs)("form",{id:"post-a-job-form",children:[(0,o.jsxs)(I.A.SubSection,{sectionLabel:"Ap
1ply Link",required:!0,children:[(0,o.jsx)(P.Ay,{id:"applyLink",label:"Apply Link",placeholder:"https://apply.link",error:null==eD?void 0:eD.applyLink,value:(null==e_?void 0:e_[eo])||"",onChange:e=>{eU(eo,e.target.value.trim())}}),eA?(0,o.jsx)(y.default.ErrorText,{children:eA}):null]}),(0,o.jsxs)("div",{className:"mb-10",children:[(0,o.jsxs)(I.A.SubSection,{sectionLabel:"Company",required:!0,children:[(0,o.jsx)(Z.A,{label:"Select company",allowCustom:!0,setCompany:e=>{e&&(console.log("Company selected:",e),eU(eS,e.label||e),eU(eC,e.value||""),(null==eD?void 0:eD[eS])&&eq(eS),(null==eD?void 0:eD[eC])&&eq(eC))},error:null==eD?void 0:eD[eS],required:!0,value:(null==e_?void 0:e_[eS])?{label:e_[eS],value:e_[eC]||""}:null}),(null==eD?void 0:eD[eS])&&(0,o.jsx)(y.default.ErrorText,{className:"mt-1",children:eD[eS]})]}),(0,o.jsxs)(I.A.SubSection,{sectionLabel:"Company domain",required:!0,children:[(0,o.jsx)(P.Ay,{id:"companyDomain",label:"Company domain website",placeholder:"peerlist.io",value:(null==e_?void 0:e_[eC])||"",onChange:e=>{eU(eC,e.target.value)},error:null==eD?void 0:eD[eC],showError:null==eD?void 0:eD[eC]}),(null==eD?void 0:eD[eC])&&(0,o.jsx)(y.default.ErrorText,{className:"mt-1",children:eD[eC]})]}),(0,o.jsx)(I.A.SubSection,{sectionLabel:"Title of the position",required:!0,children:(0,o.jsx)(P.Ay,{id:"jobTitle",label:"Title",placeholder:"Software Engineer (Frontend)",value:(null==e_?void 0:e_[eE])||"",onChange:e=>{eU(eE,e.target.value)}})}),(0,o.jsx)(I.A.SubSection,{sectionLabel:"What type of a position is this?",required:!0,children:(0,o.jsx)(g.Ay.JobType,{id:ea,label:"Job type",placeholder:"Ex: Full-Time",value:(null==e_?void 0:e_[ea])?{value:null==e_?void 0:e_[ea],label:null==e_?void 0:e_[ea]}:"",onChange:e=>{(null==eD?void 0:eD[ea])&&eq(ea),(null==eD?void 0:eD[eh])&&eq(eh),(null==eD?void 0:eD[el])&&eq(el),eU(ea,e.value)},error:null==eD?void 0:eD[ea],showError:null==eD?void 0:eD[ea]})}),(0,o.jsx)(I.A.SubSection,{sectionLabel:"What type of role is this?",required:!0,children:(0,o.jsx)(g.Ay.JobRoles,{id:er,placeholder:"Upto 3",error:null==eD?void 0:eD[er],showError:null==eD?void 0:eD[er],isMulti:!0,value:null==e_||null==(e=e_.roles)?void 0:e.map(e=>({label:e.name,value:e.name})),onChange:e=>{(null==eD?void 0:eD[er])&&eq(er),eU(er,e.map(e=>({name:e.label})))}})}),(0,o.jsx)(I.A.SubSection,{sectionLabel:"Which department/team this position is for?",required:!0,children:(0,o.jsx)(g.Ay.Department,{id:es,onChange:e=>{(null==eD?void 0:eD[es])&&eq(es),eU(es,e.value)},getOptionLabel:e=>(0,o.jsx)("p",{className:"capitalize",children:e.label.toLowerCase()}),error:null==eD?void 0:eD[es],showError:null==eD?void 0:eD[es],value:(null==e_?void 0:e_[es])?{value:null==e_?void 0:e_[es],label:null==e_?void 0:e_[es]}:""})}),(0,o.jsx)(I.A.SubSection,{sectionLabel:(0,o.jsxs)(o.Fragment,{children:["What skills are required for ",(0,o.jsx)("br",{})," this job?"]}),subText:"These are typically the user profile tags which consists of tools, technologies, skills, roles and responsibilities.",required:!0,children:(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsx)(L.T,{label:"Must have skills",max:p.MAX_SKILLS,min:p.MIN_SKILLS,error:null==eD?void 0:eD[et],onChange:e=>{(null==eD?void 0:eD[et])&&eq(et),eV(et,e)},value:(null==e_?void 0:e_[et])||[],isMulti:!0,required:!0,hideHelperText:!0}),(0,o.jsxs)("div",{children:[(0,o.jsx)(L.m,{label:"Good to have skills",max:p.MAX_SKILLS,min:0,error:null==eD?void 0:eD[em],onChange:e=>{(null==eD?void 0:eD[em])&&eq(em),eV(em,e)},value:(null==e_?void 0:e_[em])||[],isMulti:!0}),(null==eD?void 0:eD[em])&&(0,o.jsx)(y.default.ErrorText,{className:"mt-1",children:null==eD?void 0:eD[em]})]})]})}),(0,o.jsxs)(I.A.SubSection,{sectionLabel:"What is a preferred location for this position?",border:"border-none",required:!0,children:[(0,o.jsx)(F.A,{setLocationPreference:e=>{let l="";(null==e?void 0:e[p.LOCATION_PREFERENCES.REMOTE])&&(l=p.LOCATION_PREFERENCES.REMOTE),(null==e?void 0:e[null===p.LOCATION_PREFERENCES||void 0===p.LOCATION_PREFERENCES?void 0:p.LOCATION_PREFERENCES.IN_OFFICE])&&(l=null===p.LOCATION_PREFERENCES||void 0===p.LOCATION_PREFERENCES?void 0:p.LOCATION_PREFERENCES.IN_OFFICE),(null==e?void 0:e[null===p.LOCATION_PREFERENCES||void 0===p.LOCATION_PREFERENCES?void 0:p.LOCATION_PREFERENCES.HYBRID])&&(l=null===p.LOCATION_PREFERENCES||void 0===p.LOCATION_PREFERENCES?void 0:p.LOCATION_PREFERENCES.HYBRID);let n=(null==e?void 0:e.location)&&(null==e?void 0:e.location.length)>0?null==e?void 0:e.location.map(e=>u()(e,"name")):[];eP(o=>({...o,[ec]:l,preference:e.preference,[p.JOB_PREFERENCES_CONST.LOCATION]:n}))},locationPreference:{preference:null==e_?void 0:e_.preference,[null==e_?void 0:e_[ec]]:!0,location:null==e_?void 0:e_[p.JOB_PREFERENCES_CONST.LOCATION]},removeError:eq,parentError:eD,locationLimit:p.MAX_LOCATIONS_JOB_BOARD_LIMIT,maxLimitErrorMessage:N.A.JOB_PREFERENCES.maxJobBoardLocations}),(null==eD?void 0:eD[ec])&&(0,o.jsx)(y.default.ErrorText,{className:"mt-1",children:null==eD?void 0:eD[ec]})]}),(null==e_?void 0:e_[ec])&&(0,o.jsxs)(o.Fragment,{children:[(null==e_?void 0:e_[ec])!==p.LOCATION_PREFERENCES.REMOTE&&(0,o.jsx)(I.A.SubSection,{sectionLabel:"Do you provide relocation assistance?",border:"border-none",children:(0,o.jsx)(J.A,{id:eN,label:"Yes",onChange:()=>{var e;return eU(eb,{...null==e_?void 0:e_[eb],[eN]:!(null==e_||null==(e=e_[eb])?void 0:e[eN])})},checked:null==e_||null==(l=e_[eb])?void 0:l[eN]})}),(null==e_?void 0:e_[ec])!==p.LOCATION_PREFERENCES.IN_OFFICE&&(0,o.jsx)(I.A.SubSection,{sectionLabel:"Do you provide home office setup allowance?",border:"border-none",children:(0,o.jsx)(J.A,{id:ep,label:"Yes",onChange:()=>{var e;return eU(eb,{...null==e_?void 0:e_[eb],[ep]:!(null==e_||null==(e=e_[eb])?void 0:e[ep])})},checked:null==e_||null==(n=e_[eb])?void 0:n[ep]})})]}),(null==e_?void 0:e_.jobType)===ee&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"border-t border-primaryBorder",children:(0,o.jsx)(I.A.SubSection,{sectionLabel:"What is the duration of this internship?",border:"border-none",required:!0,children:(0,o.jsx)(D.A,{id:el,options:Array(6).fill(null).map((e,l)=>({label:l+1,value:l+1})),placeholder:"In Months",getOptionLabel:e=>(0,o.jsxs)("span",{children:[e.label," ",b.default.addPlural({word:"Month",count:e.label})]}),isSearchable:!1,error:null==eD?void 0:eD[el],onChange:e=>{(null==eD?void 0:eD[el])&&eq(el),eU(el,e.value)},value:(null==e_?void 0:e_[el])?{label:null==e_?void 0:e_[el],value:null==e_?void 0:e_[el]}:"",showError:null==eD?void 0:eD[el]})})}),(0,o.jsx)("div",{className:"border-t border-primaryBorder",children:(0,o.jsx)(I.A.SubSection,{sectionLabel:"Is there a full-time opportunity at the end of this internship?",border:"border-none",children:(0,o.jsx)(J.A,{id:ev,label:"Yes",onChange:()=>{var e;return eU(eb,{...null==e_?void 0:e_[eb],[ev]:!(null==e_||null==(e=e_[eb])?void 0:e[ev])})},checked:null==e_||null==(i=e_[eb])?void 0:i[ev]})})})]}),(null==e_?void 0:e_.jobType)!==ee&&(0,o.jsx)("div",{className:"border-t border-primaryBorder",children:(0,o.jsxs)(I.A.SubSection,{sectionLabel:"Work experience?",border:"border-none",children:[(0,o.jsx)(J.A,{id:"noExperience",label:"No experience",onChange:()=>{eU("noExperience",!(null==e_?void 0:e_.noExperience))},checked:(null==e_?void 0:e_.noExperience)||!1}),!(null==e_?void 0:e_.noExperience)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(y.default.NormalText,{xs:!0,className:"mt-4",children:"In years"}),(0,o.jsxs)("div",{className:"grid grid-cols-2 gap-1 mt-1",children:[(0,o.jsx)(D.A,{id:ed,options:Array(11).fill(null).map((e,l)=>({label:l,value:l})),placeholder:"Min",isSearchable:!1,isOptionDisabled:e=>{var l;return e.value>=(null==e_||null==(l=e_[ei])?void 0:l[eu])},onChange:e=>{(null==eD?void 0:eD[ei])&&eq(ei),eU(ei,{...null==e_?void 0:e_[ei],[ed]:e.value})},value:(null==e_||null==(d=e_[ei])?void 0:d[ed])>=0?{label:null==e_||null==(c=e_[ei])?void 0:c[ed],value:null==e_||null==(v=e_[ei])?void 0:v[ed]}:"",showError:null==eD?void 0:eD[ei]}),(0,o.jsx)(D.A,{id:eu,options:Array(10).fill(null).map((e,l)=>({label:l+1,value:l+1}
1)),placeholder:"Max",isSearchable:!1,isOptionDisabled:e=>{var l;return e.value<=(null==e_||null==(l=e_[ei])?void 0:l[ed])},onChange:e=>{(null==eD?void 0:eD[ei])&&eq(ei),eU(ei,{...null==e_?void 0:e_[ei],[eu]:e.value})},value:(null==e_||null==(_=e_[ei])?void 0:_[eu])>0?{label:null==e_||null==(w=e_[ei])?void 0:w[eu],value:null==e_||null==(eO=e_[ei])?void 0:eO[eu]}:"",showError:null==eD?void 0:eD[ei]})]}),(null==eD?void 0:eD[ei])&&(0,o.jsx)(y.default.ErrorText,{className:"mt-1",children:null==eD?void 0:eD[ei]})]}),(null==eD?void 0:eD[ei])&&(0,o.jsx)(y.default.ErrorText,{className:"mt-1",children:null==eD?void 0:eD[ei]})]})})]}),(0,o.jsx)("div",{className:"mb-10",children:(0,o.jsx)(f.A.Compensation,{error:eD,removeError:eq,jobPostDetailState:e_,updateJobDetailState:eU,setJobPostDetailState:eP})})]})}),(0,o.jsxs)(j.A.SaveBottomBanner,{className:"flex-col",bottomPosition:"bottom-[72px]",children:[eM&&(0,o.jsx)("div",{className:"flex items-start w-full mb-2",children:(0,o.jsx)(y.default.ErrorText,{className:"text-left ml-0",children:eM})}),(0,o.jsx)("div",{className:"flex items-center justify-between w-full",children:(0,o.jsx)(A.Ay.Primary,{small:!0,form:"post-a-job-form",type:"submit",onClick:e=>eW(e,{publish:!0}),loading:eI,disabled:eI||0===Object.keys(e_).length,children:(null==e_?void 0:e_.publishedAt)?"Update":"Publish"})})]})]}),(0,o.jsx)(h.A.Right,{children:(0,o.jsxs)("div",{className:"overflow-y-scroll",children:[(0,o.jsxs)("div",{className:"max-w-full bg-orange-00 p-4 border border-border-secondary rounded-lg",children:[(0,o.jsxs)(y.default.SemiBoldText,{className:"mb-2",children:["Job Post Completion: ",eX,"%"," "]}),(0,o.jsx)(T.A,{profilePercentage:eX}),(0,o.jsx)(y.default.NormalText,{xs:!0,className:"mt-4",children:"Try to fill in 100% job details for the best candidate experience and matching"})]}),(0,o.jsxs)("div",{className:"mt-8",children:[(0,o.jsx)(y.default.SemiBoldText,{xs:!0,className:"mb-2",children:"Saved Job Ids"}),(0,o.jsx)("ul",{children:eJ.map(e=>(0,o.jsx)("li",{children:(0,o.jsx)(E(),{href:"/company/job-board/pl-job?id=".concat(e),onClick:()=>eH(e),children:(0,o.jsx)(y.default.SemiBoldText,{xs:!0,className:"mb-2",children:e})})}))})]})]})})]})}))},95205:(e,l,n)=>{"use strict";n.d(l,{A:()=>c});var o=n(37876),i=n(14232),r=n(68827),a=n(89311),t=n(16495),s=n(50803),d=n(46397);let u=[{name:t.LOCATION_PREFERENCES.REMOTE,label:"Remote Only"},{name:t.LOCATION_PREFERENCES.IN_OFFICE,label:"In-office"},{name:t.LOCATION_PREFERENCES.HYBRID,label:"Hybrid"}],c=e=>{let{isMulti:l=!1,locationPreference:n,setLocationPreference:c,isFormDisabled:E,removeError:v,parentError:h,locationLimit:m=t.MAX_LOCATION_PREF,maxLimitErrorMessage:p=r.A.JOB_PREFERENCES.maxLocationError}=e,[b,N]=(0,i.useState)("");return(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"flex flex-wrap gap-2",children:u.map(e=>(0,o.jsx)("div",{className:"mr-4",children:(0,o.jsx)(s.A,{id:e.name,name:t.JOB_PREFERENCES_CONST.LOCATION_PREFERENCES,label:e.label,checked:(null==n?void 0:n[e.name])||!1,onChange:()=>(e=>{(null==h?void 0:h[t.JOB_PREFERENCES_CONST.LOCATION_PREFERENCES])&&v(t.JOB_PREFERENCES_CONST.LOCATION_PREFERENCES);let o={preference:e.name,[e.name]:!n[e.name],location:(null==n?void 0:n.location)||[]};l&&(o={...n||{},...o}),c(o)})(e),disabled:E})},"".concat(e.name,"-work-type")))}),(0,o.jsxs)("div",{children:[(0,o.jsx)(d.A,{location:(null==n?void 0:n.location)||[],setLocation:e=>(e=>{(null==h?void 0:h[t.JOB_PREFERENCES_CONST.LOCATION_PREFERENCES])&&v(t.JOB_PREFERENCES_CONST.LOCATION_PREFERENCES);let l=e.map(e=>({...e,preference:n.preference}));if(c({...n,location:l}),!(l.length>m))return b&&N("");N(p)})(e),subText:m>0?"Max ".concat(m):null}),b&&(0,o.jsx)(a.ErrorText,{className:"mt-1",children:b})]})]})}},98713:(e,l,n)=>{"use strict";n.d(l,{A:()=>S});var o=n(37876),i=n(14232),r=n(2171),a=n(69964),t=n.n(a),s=n(38243),d=n(89311),u=n(21639),c=n(34321),E=n(68827),v=n(71297),h=n(44445),m=n(46397),p=n(51915),b=n(16495);let N=[{name:b.LOCATION_PREFERENCES.REMOTE,label:"Remote Only"},{name:b.LOCATION_PREFERENCES.IN_OFFICE,label:"In-office"},{name:b.LOCATION_PREFERENCES.HYBRID,label:"Hybrid"}],S=e=>{let{showModal:l,setShowModal:n,onLocationAdd:a=()=>{}}=e,{company:S}=(0,r.useSelector)(e=>e.Company),[C,O]=(0,i.useState)(!1),[x,j]=(0,i.useState)({}),[R,f]=(0,i.useState)({}),y=(0,r.useDispatch)(),A=async()=>{var e,l,o,i;try{O(!0);let l=[...x.location||[]];
1null==(e=R.location)||e.forEach(e=>{let{preference:n}=R;l.some(l=>l.preference===n&&e.city===l.city&&e.country===l.country)||l.push({...e,preference:n})}),a([...(R.location||[]).map(e=>({...e,preference:R.preference}))]),x.location=l,await c.gz.saveHiringDefaults(x),y(h.LS.updatePartialCompanyData({hiringDefaults:x})),j(x),n(!1)}catch(e){v.A.ErrorToast((null==e||null==(i=e.response)||null==(o=i.data)||null==(l=o.error)?void 0:l.message)||E.A.GLOBAL.serverError)}finally{O(!1)}};return(0,i.useEffect)(()=>{(null==S?void 0:S.hiringDefaults)&&j({...null==S?void 0:S.hiringDefaults})},[S]),(0,o.jsxs)(s.Ay,{showModal:l,setShowModal:n,title:"Add default locations",children:[(0,o.jsxs)(s.Ep.Body,{className:"flex flex-col gap-6",children:[(0,o.jsx)(d.default.NormalText,{xs:!0,textColor:"text-gray-1k",children:"Add locations where you are hiring. In case of Remote, add a preferred country/region."}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"mb-4 flex flex-wrap gap-2",children:N.map(e=>(0,o.jsx)("div",{className:"mr-4 mb-2",children:(0,o.jsx)(p.A,{id:e.name,name:b.JOB_PREFERENCES_CONST.LOCATION_PREFERENCES,label:e.label,checked:(null==R?void 0:R[e.name])||!1,onChange:()=>(e=>{let l=(null==R?void 0:R.location)||[],n={preference:b.LOCATION_PREFERENCES.REMOTE};if(e.name===b.LOCATION_PREFERENCES.REMOTE){let e=x.location||[];(null==e?void 0:e.some(e=>t()(n,e)))||(null==l?void 0:l.some(e=>t()(n,e)))||l.push(n)}else l=l.filter(e=>!t()(n,e));f({[e.name]:!R[e.name],preference:e.name,location:l.map(l=>({...l,preference:e.name}))})})(e)})},"".concat(e.name,"-work-type")))}),(0,o.jsx)(m.A,{isDisabled:!(null==R?void 0:R.preference),location:(null==R?void 0:R.location)||[],setLocation:e=>{f({...R,location:e})}})]})]}),(0,o.jsx)(s.Ep.Footer,{className:"justify-end",children:(0,o.jsx)(u.Ay.Carbon,{loading:C,disabled:C,onClick:()=>{A()},small:!0,children:"Save"})})]})}}},e=>{e.O(0,[1515,901,636,6593,8792],()=>e(e.s=32288)),_N_E=e.O()}]);
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.