PageSourceSearch

https://seaplify.com/_next/static/chunks/pages/jobs/[slug]-5b327f2f93de323d.js

js seaplify.com collected 2026-09-24 09:46:31 UTC 33,928 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[560],{94429:function(e,i,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/jobs/[slug]",function(){return l(37600)}])},64749:function(e,i,l){"use strict";var t=l(85893),n=l(25852);i.Z=e=>{let{tabs:i,className:l,activeTab:s,setSelectedTab:a}=e,o=void 0!==s?e=>{a&&a(e.index)}:void 0,d=void 0===s?e=>{a&&a(e.index)}:void 0;return(0,t.jsx)(n.f,{className:l,activeIndex:s,onTabChange:o,onBeforeTabChange:d,children:i.map((e,i)=>(0,t.jsx)(n.x,{header:e.name,children:e.children},i))})}},32667:function(e,i,l){"use strict";l.d(i,{K:function(){return c}});var t=l(85893),n=l(94184),s=l.n(n),a=l(66367),o=l(42552),d=l(19521),r=l(81440);let c=e=>{let{name:i,label:l,error:n,...d}=e;return(0,t.jsxs)(u,{children:[l&&(0,t.jsx)("label",{htmlFor:i,className:"block",children:l}),(0,t.jsxs)("span",{className:"p-input-icon-right",children:[n&&(0,t.jsx)("i",{className:"".concat(a.dv.EXCLAMATION_TRIANGLE," errorColor")}),(0,t.jsx)(o.g,{name:i,className:s()({"p-invalid block":n}),...d})]}),(0,t.jsx)("div",{className:"helper-text",children:"string"==typeof n&&(0,t.jsx)("small",{id:"error-".concat(i),className:"p-error block text-sm",children:n})})]})},u=d.ZP.div.withConfig({componentId:"sc-5568a18b-0"})(["> label{font-style:normal;font-weight:400;font-size:12px;line-height:18px;color:",";}.p-input-icon-right > .p-inputtext{padding-right:1.05rem !important;}textarea{display:block;border:1px solid ",";border-radius:8px;}.p-input-icon-right{width:100%;}.helper-text{font-family:",";height:0.75rem;font-size:0.75rem;width:100%;margin-top:-4px;}.errorColor{top:17px;color:"," !important;}"],e=>{let{theme:i}=e;return i.colors.gray_70},e=>{let{theme:i}=e;return i.colors.gray_70},r.I.style.fontFamily,e=>{let{theme:i}=e;return i.colors.error})},37600:function(e,i,l){"use strict";l.r(i),l.d(i,{default:function(){return eq}});var t,n,s=l(85893),a=l(94184),o=l.n(a),d=l(78231),r=l(96054),c=l(92233),u=l(22377),v=l(72138),p=l(23019),m=l(64749),h=l(87060),g=l(61451),x=l(27210),f=l(47366),b=l(82392),j=l(48583),y=l(30381),w=l.n(y),N=l(41664),C=l.n(N),_=l(39332),O=l(11163),A=l(66367),E=l(91202),I=l(67294),D=l(28493),k=l(36963),S=l(22920),T=l(29246),L=l(394),q=l(70520),z=l(634),P=l(44459),F=l(36446),X=l(23242),M=l(19521),Y=l(6008),R=l(31205),Z=l(11752),B=l.n(Z),J=l(99272),H=l(70888),W=l(81307),K=l(59375),V=l(44334),Q=["title","titleId"];function U(){return(U=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var l=arguments[i];for(var t in l)Object.prototype.hasOwnProperty.call(l,t)&&(e[t]=l[t])}return e}).apply(this,arguments)}var G=function(e){var i=e.title,l=e.titleId,n=function(e,i){if(null==e)return{};var l,t,n=function(e,i){if(null==e)return{};var l,t,n={},s=Object.keys(e);for(t=0;t<s.length;t++)l=s[t],i.indexOf(l)>=0||(n[l]=e[l]);return n}(e,i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(t=0;t<s.length;t++)l=s[t],!(i.indexOf(l)>=0)&&Object.prototype.propertyIsEnumerable.call(e,l)&&(n[l]=e[l])}return n}(e,Q);return I.createElement("svg",U({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":l},n),i?I.createElement("title",{id:l},i):null,t||(t=I.createElement("path",{d:"m8.275 11.919 3.15 2c.407.256.907-.125.788-.594l-.912-3.587a.543.543 0 0 1 .18-.55l2.826-2.357c.368-.306.181-.925-.3-.956l-3.688-.237a.519.519 0 0 1-.456-.338L8.488 1.838a.519.519 0 0 0-.975 0L6.138 5.3a.519.519 0 0 1-.456.338l-3.688.237c-.481.031-.669.65-.3.956L4.52 9.188a.544.544 0 0 1 .181.55l-.843 3.325c-.144.562.456 1.018.937.712l2.931-1.856a.512.512 0 0 1 .55 0Z",fill:"#FFC046"})))},$=l(57907),ee=l(59180),ei=l(25133);let el=e=>{if(!e)return!1;try{return new URL(e),!0}catch(e){return!1}};var et=l(25675),en=l.n(et),es=l(84870),ea=l(57074),eo=l(49294),ed=l(93864),er=l(3793),ec=l(48191),eu=l(32667),ev=l(58205),ep=["title","titleId"];function em(){return(em=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var l=arguments[i];for(var t in l)Object.prototype.hasOwnProperty.call(l,t)&&(e[t]=l[t])}return e}).apply(this,arguments)}var eh=function(e){var i=e.title,l=e.titleId,t=function(e,i){if(null==e)return{};var l,t,n=function(e,i){if(null==e)return{};var l,t,n={},s=Object.keys(e);for(t=0;t<s.length;t++)l=s[t],i.indexOf(l)>=0||(n[l]=e[l]);return n}(e,i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(t=0;t<s.length;t++)l=s[t],!(i.indexOf(l)>=0)&&Object.prototype.propertyIsEnumerable.call(e,l)&&(n[l]=e[l])}return n}(e,ep);return I.createElement("svg",em({xmlns:"http://www.w3.org/2000/svg",width:4,height:4,viewBox:"0 0 4 4",fill:"none","aria-labelledby":l},t),i?I.createElement("title",{id:l},i):null,n||(n=I.createElement("circle",{cx:2,cy:2,r:2,fill:"#D9D9D9"})))},eg=l(12935),ex=l(68037);let ef=e=>{var i,l;let{note:t,jobApplication:n}=e,[a,o]=(0,I.useState)(t.text),[r,c]=(0,I.useState)(!1),{data:u}=(0,ed.a)(),{trigger:v,isMutating:p}=(0,h.R2)(K.W0.jobApplicationNote(t.id)),{trigger:m,isMutating:g}=(0,h.JY)(K.W0.jobApplicationNotes(n.id)),{mutate:x}=(0,h.XD)(K.W0.jobApplicationNotes(n.id)),f=t.creatorUserId===(null==u?void 0:null===(l=u.recruiter)||void 0===l?void 0:null===(i=l.company)||void 0===i?void 0:i.id);return(0,s.jsxs)("div",{className:"bg-secondary_10 text-sm p-3 flex flex-column gap-2 border-round-xl",children:[r?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(eu.K,{className:"w-full py-2",value:a,max:2e4,onChange:e=>o(e.target.value.slice(0,2e4)),label:"Comments",width:"100%",placeholder:"Type your note here"})}):(0,s.jsx)("div",{className:"black",children:t.text}),(0,s.jsxs)("div",{className:"flex align-items-center justify-content-between gap-0 gray_70",children:[(0,s.jsxs)("div",{className:"flex align-items-center gap-2 gray_70",children:[(0,s.jsxs)("div",{children:["by ",(0,s.jsx)("span",{className:"capitalize",children:f?"Me":t.creatorName})]}),(0,s.jsx)(eh,{}),(0,s.jsx)("div",{children:(0,ex.Z)(new Date(t.createdAt),"MMM d, yyyy")}),t.edited&&"(Edited)"]}),f&&(r?(0,s.jsxs)("div",{className:"flex justify-content-end align-items-center gap-2",children:[(0,s.jsx)(d.z,{variant:"outline",size:"large",width:"130px",onClick:()=>c(!1),disabled:g,children:"Cancel"}),(0,s.jsx)(d.z,{size:"large",width:"130px",onClick:()=>a?a.trim().length<3||a.trim().length>2e3?S.Am.error("Note must be between 3 and 2000 characters",{toastId:"noteLengthWrong"}):a.match(eg.v)?void m({text:a,id:t.id},{onSuccess:()=>{S.Am.success("Note successfully updated",{toastId:"noteUpdated"}),c(!1)},onError:e=>{var i;console.log({err:e}),S.Am.error("Note could not be updated: ".concat(null==e?void 0:null===(i=e.response)||void 0===i?void 0:i.data),{toastId:"noteCouldNotBeUpdated"})}}):S.Am.error("Special characters that are not preceded or followed by words are not allowed",{toastId:"noteSpecialCharactersWrong"}):S.Am.error("Note cannot be empty",{toastId:"noteCannotBeEmpty"}),isLoading:g,children:"Save"})]}):(0,s.jsxs)("div",{className:"flex justify-content-end align-items-center",children:[(0,s.jsx)(d.z,{size:"large",variant:"ghost",onClick:()=>c(!0),children:(0,s.jsx)("i",{className:A.dv.PENCIL})}),(0,s.jsx)(d.z,{size:"large",variant:"ghost",onClick:()=>{v(void 0,{onSuccess:async()=>{await x(),S.Am.success("Note successfully deleted",{toastId:"noteDeleted"}),o("")},onError:e=>{var i;console.log({err:e}),S.Am.error("Note could not be deleted: ".concat(null==e?void 0:null===(i=e.response)||void 0===i?void 0:i.data),{toastId:"noteCouldNotBeDeleted"})}})},isLoading:p,children:(0,s.jsx)("i",{className:A.dv.TRASH})})]}))]})]},t.id)};M.ZP.div.withConfig({componentId:"sc-5f086914-0"})(["padding-inline:16px;textarea{min-height:140px;max-height:400px;}"]);let eb=e=>{var i;let{visible:l,setVisible:t,notes:n,jobApplication:a}=e,[o,r]=(0,I.useState)(""),c="".concat(a.candidate.user.firstName," ").concat(a.candidate.user.lastName),{trigger:u,isMutating:v}=(0,h.JY)(K.W0.jobApplicationNotes(a.id));return(0,s.jsx)(ev.Y,{style:{width:"600px"},position:"right",visible:l,onHide:()=>t(!1),children:(0,s.jsxs)(ej,{children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("div",{className:"w-2rem",children:a.candidate.image?(0,s.jsx)(en(),{width:32,height:32,src:a.candidate.image,alt:c,style:{borderRadius:"8px",objectFit:"cover"}}):(0,s.jsx)(ec.Z,{})}),(0,s.jsxs)("div",{className:"flex flex-column",children:[(0,s.jsx)("div",{className:"font-bold",children:c}),(0,s.jsx)("div",{className:"text-sm",children:null===(i=a.candidate.position)||void 0===i?void 0:i.name})]})]}),(null==n?void 0:n.length)<300?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("hr",{className:"my-5 opacity-40"}),(0,s.jsx)(eu.K,{className:"w-full py-2",value:o,max:2e4,onChange:e=>r(e.target.value.slice(0,2e4)),label:"Comments",width:"100%",placeholder:"Type your note here"}),(0,s.jsx)("div",{className:"flex justify-content-end w-full",children:(0,s.jsx)(d.z,{size:"large",width:"130px",onClick:()=>o?o.trim().length<3||o.trim().length>2e3?S.Am.error("Note must be between 3 and 2000 characters",{toastId:"noteLengthWrong"}):o.match(eg.v)?void u({text:o},{onSuccess:()=>{S.Am.success("Note successfully added",{toastId:"noteAdded"}),r("")},onError:e=>{var i;console.log({err:e}),S.Am.error("Note could not be added: ".concat(null==e?void 0:null===(i=e.response)||void 0===i?void 0:i.data),{toastId:"noteCouldNotBeAdded"})}}):S.Am.error("Special characters that are not preceded or followed by words are not allowed",{toastId:"noteSpecialCharactersWrong"}):S.Am.error("Note cannot be empty",{toastId:"noteCannotBeEmpty"}),isLoading:v,children:"Save"})})]}):(0,s.jsx)("h2",{className:"mt-4",children:"You reached the maximum number of notes allowed (300)"}),(0,s.jsx)("hr",{className:"my-5 opacity-40"}),(0,s.jsx)("div",{className:"font-semibold text-2xl mb-4",children:"History"}),(null==n?void 0:n.length)?(0,s.jsx)("div",{className:"flex flex-column gap-2 w-full",children:n.map(e=>(0,s.jsx)(ef,{note:e,jobApplication:a},e.id))}):(0,s.jsx)("div",{children:"There are no notes."})]})})},ej=M.ZP.div.withConfig({componentId:"sc-ae626d29-0"})(["padding-inline:16px;textarea{min-height:140px;max-height:400px;}"]),ey=e=>{var i,l;
1let{jobApplication:t,onRemove:n,onItemChange:a,columns:r,column:c,handleOptimisticItemChange:u}=e,[v,p]=(0,I.useState)(!1),m=(0,O.useRouter)(),{data:x}=(0,ed.a)(),[,f]=(0,eo.c)(()=>({type:"card",item:t})),b="".concat(t.candidate.user.firstName," ").concat(t.candidate.user.lastName),j=(0,I.useRef)(null),{data:y,isLoading:w}=(0,h.XD)(K.W0.jobApplicationNotes(t.id)),{trigger:N}=(0,h.aH)(K.W0.jobApplicationViewed((null==x?void 0:null===(i=x.recruiter)||void 0===i?void 0:i.company.id)||"",t.id)),C=[{label:"Move to",items:r.filter(e=>e.id!==c.id&&e.status!==W.Qf.inquiry).map(e=>({label:e.name,id:e.status,className:"w-15rem",command:()=>u(t,e.status)}))},{label:"View profile",id:t.id,command:()=>m.push(g.O.candidate(t.candidate.id))},{label:"Notes (".concat(w?(0,s.jsx)(ei.p,{}):null!==(l=null==y?void 0:y.meta.totalItems)&&void 0!==l?l:0,")"),id:t.candidate.id,disabled:w,command:()=>p(!0)},{label:"Remove",id:t.candidate.id,command:()=>n()},{label:t.viewed?"Highlight this Profile":"Remove Highlight",command:()=>{let e=!t.viewed;a(t.id,t.status,e),N({viewed:e},{onError:()=>{a(t.id,t.status,!e),S.Am.error("Could not highlight the profile")}})}}],_=![W.Qf.inquiry].includes(t.status)&&!t.viewed;return(0,s.jsxs)(ew,{ref:c.status!==W.Qf.inquiry?f:void 0,className:o()("flex gap-2 p-2",{"bg-white":!_,"bg-secondary_25":_}),children:[(0,s.jsx)(eb,{jobApplication:t,notes:(null==y?void 0:y.data)||[],visible:v,setVisible:p}),(0,s.jsx)("div",{className:"w-2rem",children:t.candidate.image&&el(t.candidate.image)?(0,s.jsx)(en(),{width:32,height:32,src:t.candidate.image,alt:b,style:{borderRadius:"8px",objectFit:"cover"}}):(0,s.jsx)(ee.Z,{className:"w-2rem h-2rem"})}),(0,s.jsxs)("div",{className:"flex flex-column gap-2 flex-1 align-items-start",children:[(0,s.jsxs)("div",{className:"flex justify-content-between align-items-start w-full",children:[(0,s.jsxs)("div",{className:"flex flex-column align-items-stretch overflow-hidden",children:[(0,s.jsxs)("div",{className:"title-container flex align-items-center gap-2 font-bold mb-1",children:[(0,s.jsx)(ea.u,{target:".title-tooltip",showDelay:1e3}),(0,s.jsxs)("div",{"data-pr-tooltip":b,"data-pr-position":"top",className:"title-tooltip overflow-ellipses flex-1",children:[_&&(0,s.jsx)(G,{size:16,className:"star"})," ",b]})]}),(0,s.jsx)("div",{className:"flex gap-2 mb-1",children:t.status===W.Qf.inquiry&&(0,s.jsx)($.V,{className:"tag-text bg-warning warning",children:"Pending invitation"})}),(0,s.jsxs)("div",{className:"text-sm",children:[(0,er.Sf)(t.candidate.birthdate),", ",t.candidate.nationality.name]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(es.y,{model:C,popup:!0,ref:j,id:"popup_menu"}),(0,s.jsx)(d.z,{variant:"ghost",className:"h-2rem px-0",onClick:e=>j.current&&j.current.toggle(e),"aria-controls":"popup_menu","aria-haspopup":!0,children:(0,s.jsx)("i",{className:A.dv.ELLIPSIS_V})})]})]}),(0,s.jsxs)("div",{className:"flex flex-column text-sm",children:[(0,s.jsx)("div",{className:"gray_70",children:"Last Position"}),(0,s.jsx)("div",{children:t.candidate.position.name})]})]})]})},ew=M.ZP.div.withConfig({componentId:"sc-728f8375-0"})(["border-radius:16px;margin-inline:8px 4px;cursor:grab;.star{position:relative;top:2px;}.title-container{max-width:250px;}.tag-text{font-size:10px;font-weight:bold;text-transform:uppercase;}.text-sm{font-size:13px !important;}"]),eN=e=>{let{column:i,onItemChange:l,items:t,columns:n}=e,a=(0,I.useRef)(null);(0,F.$h)(a,{});let{trigger:d}=(0,V.Z)("mutateJobApplicationState",async(e,i)=>{let{arg:l}=i,{data:t}=await H.dJ.patch(l.path,{status:l.status});return t},{...B()}),r=(e,i)=>{let t={...e};d({path:K.W0.jobApplication(e.id),status:i},{onError:()=>{S.Am.error("Failed to update, change reverted",{toastId:"status-update-failed",autoClose:3e3}),l(e.id,t.status,t.viewed)}}),l(e.id,i,t.viewed)},[{isOver:c,canDrop:u},v]=(0,J.L)(()=>({accept:"card",drop:e=>r(e,i.status),canDrop:()=>i.status!==W.Qf.inquiry,collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()})})),p=c&&u,m=c&&!u,h=i.status===W.Qf.inquiry&&!t.length;return(0,s.jsxs)(eC,{className:o()({"shadow-5 is-droppable":p}),ref:v,children:[(0,s.jsxs)("h3",{className:"text-sm pt-4 pb-3 px-2",children:[i.name," ",!!t.length&&"(".concat(t.length,")")]}),(0,s.jsxs)("div",{ref:a,className:"drag-area relative flex flex-column gap-3",children:[m&&(0,s.jsx)(Y.a,{blur:"100px",children:(0,s.jsxs)("div",{className:"flex flex-column align-items-center gap-2",children:[(0,s.jsx)("i",{className:"".concat(A.dv.LOCK)}),(0,s.jsx)("div",{children:"Cannot drag to this column"})]})}),p&&(0,s.jsx)(Y.a,{blur:"100px",children:(0,s.jsxs)("div",{className:"flex flex-column align-items-center gap-2",children:[(0,s.jsx)("i",{className:"".concat(A.dv.LOCK_OPEN)}),(0,s.jsx)("div",{children:"Drop item here"})]})}),h&&(0,s.jsxs)("div",{className:"text-center flex flex-column gap-4 p-3",children:[(0,s.jsx)("p",{children:"No invites yet. Find your ideal candidate on the Headhunting page using dedicated filters."}),(0,s.jsx)("p",{children:"Unlock their profile to send an invite for this job."}),(0,s.jsx)(C(),{className:"text-md secondary_blue font-semibold",href:R.V.headhunting,children:"Go to Headhunting"})]}),t.map(e=>(0,s.jsx)(ey,{columns:n,column:i,onRemove:()=>l(e.id,W.Qf.cancelled,!0),jobApplication:e,onItemChange:l,handleOptimisticItemChange:r},e.id))]})]})},eC=M.ZP.div.withConfig({componentId:"sc-359b512d-0"})(["padding-right:4px;background-color:",";height:100%;overflow:hidden;position:relative;&.is-droppable{background-color:",";}&.is-blocked-column{background-color:",";opacity:0.5;}.drag-area{height:calc(100% - 70px);overflow-y:auto;}"],e=>{let{theme:i}=e;return i.colors.secondary_10},e=>{let{theme:i}=e;return i.colors.secondary_25},e=>{let{theme:i}=e;return i.colors.secondary_10}),e_=e=>{var i;let{job:l}=e,t=(0,I.useRef)(null);(0,F.$h)(t,{horizontalStrength:(0,F.v7)(3500),strengthMultiplier:500});let{data:n,isLoading:a}=(0,h.XD)(l?X.T5.companyFunnelBoardForJob(null==l?void 0:null===(i=l.company)||void 0===i?void 0:i.id,null==l?void 0:l.id):null,{onSuccess:e=>r(e.map(e=>e.jobApplications).flat())}),o=n||[],[d,r]=(0,I.useState)(o.map(e=>e.jobApplications).flat()),c=(e,i,l)=>{r(t=>t.map(t=>(t.id===e&&(t.status=i,t.viewed=l),t)))};return a?(0,s.jsx)(p.p,{minHeight:"70"}):(0,s.jsx)(eO,{ref:t,children:o.map(e=>{let i=d.filter(i=>{var l;return(null===(l=i.column)||void 0===l?void 0:l.id)===e.id});return(0,s.jsx)(eN,{items:i,onItemChange:c,column:e,columns:o},e.id)})})},eO=M.ZP.div.withConfig({componentId:"sc-9630119d-0"})(["display:grid;grid-auto-flow:column;grid-auto-columns:345px;gap:1px;width:calc(100vw - "," - 48px);height:100%;overflow:auto;border-radius:16px;background-color:#d9dee5;"],e=>{let{theme:i}=e;return i.constants.sideBarWidth});var eA=l(48084),eE=l(50516);let eI=e=>{let{job:i}=e,l=eA.m[i.status],t=eA.tk[i.status];return(0,s.jsxs)(eD,{children:[(0,s.jsxs)("div",{className:"job-detail-row",children:[(0,s.jsx)("span",{children:"Job ID"})," ",(0,s.jsxs)("span",{className:"flex align-items-center gap-1",children:[i.id.slice(0,8),(0,s.jsx)("i",{className:"".concat(A.dv.COPY," cursor-pointer"),onClick:()=>{navigator.clipboard.writeText(i.id),S.Am.success("Job ID successfully copied",{toastId:"jobIdCopy"})}})," "]})]}),(0,s.jsxs)("div",{className:"job-detail-row",children:[(0,s.jsx)("span",{children:"Posted"})," ",(0,s.jsx)("span",{children:(0,ex.Z)(new Date(i.createdAt),"MMM dd, yyyy")})]}),(0,s.jsxs)("div",{className:"job-detail-row",children:[(0,s.jsx)("span",{children:"Last update"})," ",(0,s.jsx)("span",{children:(0,ex.Z)(new Date(i.updatedAt),"MMM dd, yyyy")})]}),(0,s.jsxs)("div",{className:"job-detail-row",children:[(0,s.jsx)("span",{children:"Status"})," ",(0,s.jsxs)("span",{className:"flex gap-2 align-items-center",children:[(0,s.jsx)(eE.bq,{variant:t}),l]})]})]})},eD=M.ZP.div.withConfig({componentId:"sc-e7d47502-0"})(["width:254px;border-radius:16px;background-color:",";padding:24px;font-size:14px;color:",";display:flex;flex-direction:column;gap:1rem;.job-detail-row{display:flex;justify-content:space-between;span:first-child{font-weight:400;}span:last-child{font-weight:500;}}"],e=>{let{theme:i}=e;return i.colors.gray_25},e=>{let{theme:i}=e;return i.colors.black});var ek=l(94942);let eS=M.ZP.div.withConfig({componentId:"sc-e9d80a52-0"})(["display:grid;grid-template-columns:1fr 260px;"]),eT=M.ZP.div.withConfig({componentId:"sc-e9d80a52-1"})(["position:sticky;display:flex;justify-content:space-between;padding:1.5rem 0.25rem;",";"],e=>{let{onlyButtons:i}=e;return i&&(0,M.iv)(["justify-content:end;border-top:1px solid ",";"],e=>{let{theme:i}=e;return i.colors.gray_25})}),eL=M.ZP.div.withConfig({componentId:"sc-e9d80a52-2"})(["padding:1.5rem;padding-top:0px;height:calc(100% - 40px);position:relative;.tab-height{height:",";}.p-tabview .p-tabview-panels{padding:1rem 0 0 0;}.p-tabview-panels{height:calc(100% - 40px);> div{height:100%;}}.title{font-weight:600;font-size:22px;}.url{font-weight:400;font-size:14px;color:",";}.p-dropdown{width:195px;}.children{position:absolute;z-index:1;right:2rem;top:6rem;}.pb-6rem{padding-bottom:6rem;}"],e=>{let{selectedTab:i}=e;return i?"calc(100% - 50px);":""},e=>{let{theme:i}=e;return i.colors.secondary_100});var eq=()=>{var e,i,l,t,n,a,y,N,F,X,M,Y,R,Z,B,J,H,V,Q,U,G,$,ee,ei,el,et,en,es,ea,eo;let ed=(0,I.useRef)(null),er=(0,O.useRouter)(),ec=(0,_.useSearchParams)(),[eu,ev]=(0,I.useState)(!1),ep=(0,I.useRef)("Job updated successfully"),[,em]=(0,j.KO)(z.K5),[,eh]=(0,j.KO)(x.b),[eg,ex]=(0,I.useState)(!1),[ef,eb]=(0,I.useState)(1),ej=[{code:0,label:"Today"},{code:1,label:"Yesterday"},{code:2,label:"Last 7 Days"},{code:3,label:"Last 30 Days"},{code:4,label:"This Month"},{code:5,label:"Last Month"},{code:6,label:"This Quarter"}],[ey,ew]=(0,I.useState)(ej[2]),{data:eN,isLoading:eC}=(0,h.XD)(T.Y4.jobAnalytics(er.query.id,ey.code)),{isLoading:eO}=(0,q.mN)({onSuccess:e=>{em(e)}}),[eA]=(0,j.KO)(ek.s),{mutate:eD}=(0,K.iU)(eA),{job:eq,isLoading:ez,mutate:eP,error:eF}=(0,K.t)(er.query.slug,{onSuccess:e=>{(null==e?void 0:e.slug)&&(null==e?void 0:e.slug[(null==e?void 0:e.slug.length)-1])!==er.query.slug&&er.push("/jobs/".concat(null==e?void 0:e.slug[(null==e?void 0:e.slug.length)-1]))}}),{trigger:eX,isMutating:eM}=(0,K.Rb)({onError(e){var i,l,t;(null==e?void 0:null===(l=e.response)||void 0===l?void 0:null===(i=l.data)||void 0===i?void 0:i.error)&&("string"!=typeof e.response.data.message?null===(t=e.response.data.message)||void 0===t||t.forEach(e
1=>{var i,l,t;let n=Object.keys(e)[0];"vesselYearBuild"===n?null===(i=ed.current)||void 0===i||i.setFieldError("vessel_details.".concat(n),null==e?void 0:e[n].replace([n],(0,b.Yl)(n))):n.includes("salary")?null===(l=ed.current)||void 0===l||l.setFieldError("salary.".concat(n),null==e?void 0:e[n].replace([n],(0,b.Yl)(n))):null===(t=ed.current)||void 0===t||t.setFieldError(n,null==e?void 0:e[n].replace([n],(0,b.Yl)(n)))}):S.Am.error("Failed to edit job. Please try again later.",{toastId:"failedToEditJob"})),setTimeout(()=>{(0,f.z)(document.querySelector(".p-error"))},1)},onSuccess:async e=>{eP(e,!1),eD(),S.Am.success(ep.current)}});(0,I.useEffect)(()=>{let e={overview:0,candidates:1,analytics:2},i=ec.get("initialTab"),l=i?e[i]:null;i&&"number"==typeof l&&Object.values(e).includes(l)&&eb(l)},[ec]);let eY=async e=>{ed.current&&(e===W.Xu.active&&(ep.current="Your job post is now active."),e===W.Xu.paused&&(ep.current="Your job post is now disabled."),e===W.Xu.closed&&(ep.current="Your job post is now closed."),e||(ep.current="Your job post has been updated."),e&&ed.current.setValues({...ed.current.values,status:e}),await ed.current.submitForm())},eR=async e=>{var i,l,t,n,s,a,o,d,r,c,u,v,p,m,h,g,x,f,b,j,y,N,C,_,O,A,E;let I={title:e.title,jobCategory:e.jobCategory,position:e.position,description:(null===(i=e.description)||void 0===i?void 0:i.value)?null===(l=e.description)||void 0===l?void 0:l.value:e.description,requiredDocuments:(null===(t=e.requiredDocuments)||void 0===t?void 0:t.value)!==void 0?(null===(n=e.requiredDocuments)||void 0===n?void 0:n.value)===null?null:null===(s=e.requiredDocuments)||void 0===s?void 0:s.value:e.requiredDocuments,hiringLocation:W.nm[null==e?void 0:e.hiringLocation],contractType:W.Xt[null==e?void 0:e.contractType],signOnDate:e.signOnDate?w()(e.signOnDate).format("YYYY-MM-DD"):null,vessel:e.vessel_details.vessel||null,vesselName:e.vessel_details.vesselName||null,vesselEngineType:e.vessel_details.vesselEngineType||null,vesselYearBuild:void 0!==e.vessel_details.vesselYearBuild&&null!==e.vessel_details.vesselYearBuild?e.vessel_details.vesselYearBuild:null,vesselFlag:e.vessel_details.vesselFlag||null,bhp:e.vessel_details.bhp||null,kw:e.vessel_details.kw||null,dwt:e.vessel_details.dwt||null,gt:e.vessel_details.gt||null,teu:e.vessel_details.teu||null,salaryCurrency:e.salary.salaryCurrency||null,salaryFrom:e.salary.salaryFrom||null,salaryTo:e.salary.salaryTo||null,totalExperience:(null===(a=e.min_requirements)||void 0===a?void 0:a.totalExperience)||null,languages:(null===(o=e.min_requirements)||void 0===o?void 0:o.languages)||null,acceptedNationalities:null!==(_=e.acceptedNationalities)&&void 0!==_?_:null,visas:(null===(d=e.min_requirements)||void 0===d?void 0:d.visas)?null===(r=e.min_requirements)||void 0===r?void 0:r.visas:null,travelDocuments:(null===(c=e.min_requirements)||void 0===c?void 0:c.travelDocuments)?null===(u=e.min_requirements)||void 0===u?void 0:u.travelDocuments:null,candidatesAvailabilityOptions:(null===(v=e.min_requirements)||void 0===v?void 0:v.candidatesAvailabilityOptions)?null===(p=e.min_requirements)||void 0===p?void 0:p.candidatesAvailabilityOptions:null,candidateStatusOptions:(null===(m=e.min_requirements)||void 0===m?void 0:m.candidateStatusOptions)?null===(h=e.min_requirements)||void 0===h?void 0:h.candidateStatusOptions:null,certificates:(null===(g=e.min_requirements)||void 0===g?void 0:g.certificates)?null===(x=e.min_requirements)||void 0===x?void 0:x.certificates:null,dpLicences:(null===(f=e.min_requirements)||void 0===f?void 0:f.dpLicences)?null===(b=e.min_requirements)||void 0===b?void 0:b.dpLicences:null,endorsements:(null===(j=e.min_requirements)||void 0===j?void 0:j.endorsements)?null===(y=e.min_requirements)||void 0===y?void 0:y.endorsements:null,mainEngineTypes:(null===(N=e.min_requirements)||void 0===N?void 0:N.mainEngineTypes)?null===(C=e.min_requirements)||void 0===C?void 0:C.mainEngineTypes:null,hiringMultiple:(null==e?void 0:e.hiringMultiple)&&(null==e?void 0:e.hiringMultipleCount)>0,hiringMultipleCount:e.hiringMultipleCount>0?e.hiringMultipleCount:null,status:null!==(O=e.status)&&void 0!==O?O:1};if(void 0===I.description){if(null===(A=e.description)||void 0===A?void 0:A.includes(eE.o8))return S.Am.error("Please wait for the AI to generate the description, and then submit the form.");await eX({...I,id:e.id})}else if(I.description.length>0){if(null===(E=I.description)||void 0===E?void 0:E.includes(eE.o8))return S.Am.error("Please wait for the AI to generate the description, and then submit the form.");await eX({...I,id:e.id})}},eZ={id:null==eq?void 0:eq.id,title:null==eq?void 0:eq.title,jobCategory:null!==(en=null==eq?void 0:null===(e=eq.jobCategory)||void 0===e?void 0:e.id)&&void 0!==en?en:null==eq?void 0:eq.jobCategory,position:null==eq?void 0:null===(i=eq.position)||void 0===i?void 0:i.id,description:null==eq?void 0:eq.description,requiredDocuments:null==eq?void 0:eq.requiredDocuments,hiringLocation:W.nm[null==eq?void 0:eq.hiringLocation],contractType:W.Xt[null==eq?void 0:eq.contractType],jobAvailability:(null==eq?void 0:eq.jobAvailability)?new Date(eq.jobAvailability):"",signOnDate:(null==eq?void 0:eq.signOnDate)?new Date(eq.signOnDate):"",vessel_details:{vesselName:(null==eq?void 0:eq.vesselName)||"",vessel:null==eq?void 0:null===(l=eq.vessel)||void 0===l?void 0:l.id,vesselEngineType:null==eq?void 0:null===(t=eq.vesselEngineType)||void 0===t?void 0:t.id,vesselYearBuild:null==eq?void 0:eq.vesselYearBuild,vesselFlag:null==eq?void 0:null===(n=eq.vesselFlag)||void 0===n?void 0:n.id,teu:null!==(es=null==eq?void 0:eq.teu)&&void 0!==es?es:"",bhp:(null==eq?void 0:eq.bhp)?parseFloat("".concat(null==eq?void 0:eq.bhp)):"",kw:(null==eq?void 0:eq.kw)?parseFloat("".concat(null==eq?void 0:eq.kw)):"",dwt:null!==(ea=null==eq?void 0:eq.dwt)&&void 0!==ea?ea:"",gt:null!==(eo=null==eq?void 0:eq.gt)&&void 0!==eo?eo:""},salary:{salaryCurrency:null==eq?void 0:eq.salaryCurrency,salaryFrom:null==eq?void 0:eq.salaryFrom,salaryTo:null==eq?void 0:eq.salaryTo},min_requirements:{totalExperience:null==eq?void 0:null===(a=eq.totalExperience)||void 0===a?void 0:a.id,languages:(null==eq?void 0:eq.languages)&&eq.languages.length?null===(y=eq.languages)||void 0===y?void 0:y.map(e=>e.id):void 0,visas:(null==eq?void 0:null===(N=eq.visas)||void 0===N?void 0:N.length)?null==eq?void 0:null===(F=eq.visas)||void 0===F?void 0:F.map(e=>e.id):void 0,travelDocuments:(null==eq?void 0:null===(X=eq.travelDocuments)||void 0===X?void 0:X.length)?null==eq?void 0:null===(M=eq.travelDocuments)||void 0===M?void 0:M.map(e=>e.id):void 0,candidatesAvailabilityOptions:(null==eq?void 0:null===(Y=eq.candidatesAvailabilityOptions)||void 0===Y?void 0:Y.length)?null==eq?void 0:null===(R=eq.candidatesAvailabilityOptions)||void 0===R?void 0:R.map(e=>e.id):void 0,candidateStatusOptions:(null==eq?void 0:null===(Z=eq.candidateStatusOptions)||void 0===Z?void 0:Z.length)?null==eq?void 0:null===(B=eq.candidateStatusOptions)||void 0===B?void 0:B.map(e=>e.id):void 0,certificates:(null==eq?void 0:null===(J=eq.certificates)||void 0===J?void 0:J.length)?null==eq?void 0:null===(H=eq.certificates)||void 0===H?void 0:H.map(e=>e.id):void 0,dpLicences:(null==eq?void 0:null===(V=eq.dpLicences)||void 0===V?void 0:V.length)?null==eq?void 0:null===(Q=eq.dpLicences)||void 0===Q?void 0:Q.map(e=>e.id):void 0,endorsements:(null==eq?void 0:null===(U=eq.endorsements)||void 0===U?void 0:U.length)?null==eq?void 0:null===(G=eq.endorsements)||void 0===G?void 0:G.map(e=>e.id):void 0,mainEngineTypes:(null==eq?void 0:null===($=eq.mainEngineTypes)||void 0===$?void 0:$.length)?null==eq?void 0:null===(ee=eq.mainEngineTypes)||void 0===ee?void 0:ee.map(e=>e.id):void 0},hiringMultiple:null==eq?void 0:eq.hiringMultiple,hiringMultipleCount:null==eq?void 0:eq.hiringMultipleCount,acceptedNationalities:null==eq?void 0:null===(ei=eq.acceptedNationalities)||void 0===ei?void 0:ei.map(e=>e.id),status:null==eq?void 0:eq.status},eB=()=>{er.push({pathname:g.O.newJob,query:{duplicateJobSlug:er.query.slug}})},eJ="".concat(window.location.origin,"/jobs/").concat((null==eq?void 0:eq.slug)?null==eq?void 0:eq.slug[(null==eq?void 0:eq.slug.length)-1]:null==eq?void 0:eq.id,"/view"),eH=()=>{navigator.clipboard.writeText(eJ),S.Am.success("Link successfully copied",{toastId:"JobLinkCopy"})},eW=()=>{if(navigator.share){let e=(0,eE.kX)(eq);navigator.share({title:e,text:"Seaplify provides the tools, resources, and opportunities to create a more connected, equitable, and prosperous future for all maritime industry professionals.",url:eJ}).then(()=>{S.Am.success("Job successfully shared",{toastId:"JobLinkShared"})}).catch(console.error)}else eH()},eK=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=[{label:"Duplicate",command:eB},{label:eZ.status===W.Xu.active?"Disable":"Activate",command:()=>eY(eZ.status===W.Xu.active?W.Xu.paused:W.Xu.active)},{label:"Close",command:()=>eY(W.Xu.closed)}];return(0,s.jsxs)(eT,{onlyButtons:e,children:[(0,s.jsxs)("div",{className:o()({hidden:e}),children:[(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)(d.z,{variant:"ghost",size:"large",onClick:()=>{var e;return(null===(e=ed.current)||void 0===e?void 0:e.dirty)?ex(!0):er.back()},className:"title",children:(0,s.jsx)("i",{className:A.dv.ARROW_LEFT})}),null==eq?void 0:eq.title]}),(null==eq?void 0:eq.status)===W.Xu.active&&(0,s.jsxs)("div",{className:"flex align-items-center",children:[(0,s.jsxs)(d.z,{variant:"ghost",className:"url",onClick:eH,children:[window.location.origin,"/jobs/",(null==eq?void 0:eq.slug)?null==eq?void 0:eq.slug[(null==eq?void 0:eq.slug.length)-1]:null==eq?void 0:eq.id,"/view"]}),(0,s.jsxs)(d.z,{variant:"blue",onClick:eW,className:"text-xs",children:[(0,s.jsx)("i",{className:"".concat(A.dv.SEND," text-xs")}),"Share"]})]}),[W.Xu.paused].includes(null==eq?void 0:eq.status)&&(0,s.jsx)("p",{className:"text-sm",children:"This job post is now disabled. It will no longer be visible to potential applicants."}),(null==eq?void 0:eq.status)&&[W.Xu.archived,W.Xu.closed,W.Xu.closedWithoutHire].includes(eq.status)&&(0,s.jsx)("p",{className:"text-sm error",children:"This job post has been closed. It is no longer accepting applications and has been removed from public view."})]}),0===ef&&(0,s.jsxs)("div",{className:"flex gap-3 flex-wrap align-items-center",children:[(0,s.jsx)(C(),{href:"".concat(g.O.jobs,"/").concat((null==eq?void 0:eq.slug)?null==eq?void 0:eq.slug[(null==eq?void 0:eq.slug.length)-1]:null==eq?void 0:eq.id,"/view"),target:"_blank",children:(0,s.jsxs)(d.z,{size:"large",variant:"outline",children:[(0,s.jsx)("i",{className:A.dv.EYE})," Preview"]})}),(null==eq?void 0:eq.status)&&[W.Xu.active,W.Xu.paused,W.Xu.draft].includes(eq.status)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Z,{className:"dropdown-menu",options:i,placeholder:"Action",onChange:e=>e.value.command(),disabled:eM}),(0,s.jsxs)(d.z,{onClick:()=>eY(),size:"large",isLoading:eM,disabled:eM||!eu,children:[(0,s.jsx)("i",{className:A.dv.CHECK}),"Update"]})]}),(null==eq?void 0:eq.status)&&![W.Xu.active,W.Xu.paused,W.Xu.draft].includes(eq.status)&&(0,s.jsxs)(d.z,{size:"large",children:[(0,s.jsx)("i",{className:A.dv.COPY})," Duplicate"]})]})]})};(0,I.useEffect)(()=>{eh(null==eq?void 0:eq.title)},[eq,eh]);let eV=[{name:"Overview",children:(0,s.jsxs)(eS,{children:[(0,s.jsx)(P.J,{isLoading:ez,jobData:eZ,onSubmit:eR,formRef:ed,disabled:(null==eZ?void 0:eZ.status)===W.Xu.closed,setUpdated:ev,updated:eu}),(0,s.jsx)("div",{children:(0,s.jsx)(eI,{job:eq})})]})},{name:"Candidates",children:(0,s.jsx)(D.W,{backend:k.PD,children:(0,s.jsx)(e_,{job:eq})})}];if("seaplify.com"!==window.location.host&&eV.push({name:"Analytics",children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"children mt-2",children:(0,s.jsx)(E.L,{value:ey,options:ej,name:"Date Filter",onChange:e=>ew(e.value)})}),eC?(0,s.jsx)(p.p,{size:56,minHeight:"70vh"}):eN&&(0,s.jsx)(L.C,{hoverText:"Views",analytics:eN,type:0})]})}),ez||eO)return(0,s.jsx)(p.p,{size:56,minHeight:"70vh"});if(eF&&!ez)return(0,s.jsx)(v.T,{title:"Could not get the job details",message:JSON.stringify(null==eF?void 0:null===(et=eF.response)||void 0===et?void 0:null===(el=et.data)||void 0===el?void 0:el.message),minHeight:"70vh"});let eQ=0===ef;return(0,s.jsxs)(eL,{selectedTab:ef,children:[(0,s.jsx)(u.m,{className:"pb-6rem",title:eK()}),(0,s.jsx)(c.P,{title:"Are you sure you want to leave this page?",defaultVisible:eg,onHide:()=>{ex(!1)},children:(0,s.jsxs)("div",{className:"flex flex-column",children:[(0,s.jsx)("div",{children:'By clicking "Confirm", you will be redirected to a different page and any unsaved changes will be lost. To stay on the current page, click "Cancel."'}),(0,s.jsxs)("div",{className:"flex justify-content-around mt-3",children:[(0,s.jsx)(d.z,{size:"large",variant:"ghost",onClick:()=>ex(!1),children:"Cancel"}),(0,s.jsx)(d.z,{size:"large",variant:"primary",onClick:()=>{ex(!1),er.back()},children:"Confirm"})]})]})}),(0,s.jsx)("div",{className:"tab-height",children:(0,s.jsx)(m.Z,{tabs:eV,setSelectedTab:eb,activeTab:ef,className:"mt-2 h-full"})}),eQ&&(0,s.jsx)(u.m,{title:eK(!0)})]})}}},function(e){e.O(0,[5257,2196,7074,1202,1176,2727,8037,5122,425,3621,4742,4857,8751,7856,6699,1123,3693,6001,7283,2918,4749,9774,2888,179],function(){return e(e.s=94429)}),_N_E=e.O()}]);
2//# sourceMappingURL=[slug]-5b327f2f93de323d.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.