1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="316c3861-c034-4177-a236-1066fc2519df",e._sentryDebugIdIdentifier="sentry-dbid-316c3861-c034-4177-a236-1066fc2519df")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2845],{83168:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/hr/[tenant]/hiring/[id]/interviews/[interview-id]",function(){return n(62628)}])},62628:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ef}});var s=n(52322),a=n(16049),i=n(1973),r=n(22406),l=n(65232),o=n(77590),c=n(3316),d=n(90269),u=n(79663),m=n(65405),p=n(51634),g=n(84475),x=n(74618),f=n(59417),h=n(99603),b=n(14010),v=n(36160),y=n.n(v),j=n(13980),w=n.n(j),N=n(2784),C=n(47023),I=n(57989),k=n(17047),q=n(59578),E=n(23640),R=n(62202),T=n(85052),_=n(59434),Z=n(40652);let A=Object.freeze({technical:"bg-blue-50 text-blue",behavioral:"bg-green-100 text-green-800",experience:"bg-purple-100 text-purple-800",cultural:"bg-orange-100 text-orange-800",default:"bg-gray-100 text-gray-800"}),S=(0,N.memo)(e=>{let{category:t,getCategoryColor:n,index:a,isCopied:i,onCopy:r,questionText:l,rationale:o,showRationales:c}=e;return!l||"string"!=typeof l||l.length<10||"number"!=typeof a||a<0?null:(0,s.jsx)("div",{className:"group border border-gray-200 rounded-lg p-4 hover:border-gray-300 transition-colors relative",role:"listitem",children:(0,s.jsxs)("div",{className:"flex items-start justify-between",children:[(0,s.jsx)("div",{className:"flex-1",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("span",{"aria-label":"Question ".concat(a+1),className:"inline-flex absolute -top-1 -left-2 items-center justify-center w-6 h-6 bg-blue-50 text-blue text-sm font-medium rounded-full mr-3 mt-0.5 flex-shrink-0",children:a+1}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between my-2",children:[(0,s.jsx)("p",{className:"text-gray-800 leading-relaxed pr-4",children:l}),!!t&&(0,s.jsx)("span",{"aria-label":"Category: ".concat(t),className:"px-2 py-1 text-xs font-medium rounded-full capitalize flex-shrink-0 ".concat(n(t)),children:t})]}),!!(c&&o)&&(0,s.jsx)("div",{className:"mt-3 p-3 bg-gray-50 rounded-lg border-l-4 border-blue-100",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)(h.G,{"aria-hidden":"true",className:"mr-2 text-blue mt-0.5 flex-shrink-0",icon:f.sqG,size:"sm"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium text-gray-700 mb-1",children:"Rationale:"}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:o})]})]})})]})]})}),(0,s.jsx)("button",{"aria-label":"Copy question ".concat(a+1," to clipboard"),className:"p-2 text-gray-400 hover:text-gray-600 focus:text-gray-600 opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity flex-shrink-0 absolute top-0 right-0 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 rounded",onClick:r,title:"Copy question ".concat(a+1),type:"button",children:i?(0,s.jsx)(h.G,{"aria-label":"Copied",className:"text-green-600",icon:f.LEp}):(0,s.jsx)(h.G,{"aria-label":"Copy",icon:f.kZ_})})]})})});S.displayName="QuestionItem",S.propTypes={category:w().oneOf(["technical","behavioral","experience","cultural"]),getCategoryColor:w().func.isRequired,index:w().number.isRequired,isCopied:w().bool.isRequired,onCopy:w().func.isRequired,questionText:w().string.isRequired,rationale:w().string,showRationales:w().bool.isRequired};let G=e=>{let{application:t,onQuestionsGenerated:n,onError:a}=e,{data:r,error:o,isError:c}=(0,E.NN)({applicationId:null==t?void 0:t.aid}),d=(0,E.NV)(),u=d.isPending,m=(0,b.NL)(),p=(0,_.G)({enabled:!0}),[g,x]=(0,N.useState)({copiedIndex:null,showRationales:!1,selectedCategory:"all",hasUserInteracted:!1,isPolling:!1,pollingStartTime:null,remainingTime:null,showUsageLimitModal:!1}),{copiedIndex:v,showRationales:y,selectedCategory:j,hasUserInteracted:w,isPolling:G,pollingStartTime:O,showUsageLimitModal:M}=g,P=(0,N.useCallback)(e=>{x(t=>({...t,...e}))},[]);(0,N.useEffect)(()=>
1{if(c&&o&&(null==t?void 0:t.aid)){let e=(null==o?void 0:o.message)||"Failed to load interview questions";q.RY(o,{tags:{component:"AIInterviewQuestions",action:"fetchQuestions",applicationId:t.aid}}),w&&R.default.error(e),null==a||a(o)}},[c,o,null==t?void 0:t.aid,a,w]),(0,N.useEffect)(()=>{let e=null,s=null,a=null;return G&&(null==t?void 0:t.aid)&&O&&(a=setInterval(()=>{let e=Math.max(0,12e4-(Date.now()-O));P({remainingTime:e}),e<=0&&clearInterval(a)},1e3),e=setInterval(async()=>{try{await m.invalidateQueries({queryKey:["application-interview-questions",t.aid]});let e=m.getQueryData(["application-interview-questions",t.aid]);e&&e.questions&&e.questions.length>0&&(P({isPolling:!1,pollingStartTime:null,remainingTime:null}),R.default.success("Interview questions generated successfully!"),null==n||n())}catch(e){q.RY(e,{tags:{component:"AIInterviewQuestions",action:"pollingRefetch",applicationId:t.aid}})}},1e4),s=setTimeout(()=>{P({isPolling:!1,pollingStartTime:null,remainingTime:null}),R.default.error("Question generation timed out. Please try again or check back later.")},12e4)),()=>{e&&clearInterval(e),s&&clearTimeout(s),a&&clearInterval(a)}},[G,null==t?void 0:t.aid,O,m,P,n]);let{questions:L=[],categories:Q=[]}=r||{},D=(0,N.useCallback)(e=>e&&"string"==typeof e&&A[e.toLowerCase()]||A.default,[]),z=(0,N.useMemo)(()=>Array.isArray(L)&&0!==L.length&&Array.isArray(Q)?Q.reduce((e,t)=>("string"==typeof t&&(e[t]=L.filter(e=>("object"==typeof e?null==e?void 0:e.category:null)===t).length),e),{}):{},[L,Q]),F=(0,N.useMemo)(()=>Array.isArray(L)?L.filter(e=>{if(!e)return!1;let t="string"==typeof e?e:null==e?void 0:e.question;return t&&"string"==typeof t&&t.length>=10}):[],[L]),U=(0,N.useMemo)(()=>"all"===j?F:F.filter(e=>("object"==typeof e?e.category:null)===j),[F,j]),B=(0,N.useCallback)(async(e,n)=>{if(e){P({hasUserInteracted:!0});try{let t="string"==typeof e?e:null==e?void 0:e.question;if(!t||"string"!=typeof t){R.default.error("No question text to copy");return}if(navigator.clipboard)await navigator.clipboard.writeText(t);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}P({copiedIndex:n}),R.default.success("Question copied to clipboard!"),setTimeout(()=>P({copiedIndex:null}),2e3)}catch(e){q.RY(e,{tags:{component:"AIInterviewQuestions",action:"copyQuestion",applicationId:null==t?void 0:t.aid}}),R.default.error("Failed to copy question"),null==a||a(e)}}},[a,null==t?void 0:t.aid,P]),V=(0,N.useCallback)(async()=>{if(!(null==t?void 0:t.aid)){R.default.error("Application ID is required");return}let{canProceed:e,message:n}=p.checkCanProceed();if(!e){P({showUsageLimitModal:!0,hasUserInteracted:!0}),R.default.error(n);return}P({hasUserInteracted:!0});try{await d.mutateAsync({applicationId:t.aid});let e=Date.now();P({isPolling:!0,pollingStartTime:e,remainingTime:12e4}),R.default.success("Interview questions generation started successfully")}catch(n){q.RY(n,{tags:{applicationId:t.aid,component:"AIInterviewQuestions",action:"generateQuestions"}});let e=(null==n?void 0:n.message)||"Failed to generate questions";R.default.error(e),null==a||a(n)}},[null==t?void 0:t.aid,d,a,P,p]),W=(0,N.useCallback)(()=>{(0,k.Z)({title:"Regenerate Interview Questions",message:"This will generate a new set of interview questions. The current questions will be replaced. Are you sure you want to proceed?",confirmButtonText:"Yes, Regenerate",cancelButtonText:"Cancel",handler:async()=>{if(!(null==t?void 0:t.aid)){R.default.error("Application ID is required");return}let{canProceed:e,message:n}=p.checkCanProceed();if(!e){P({showUsageLimitModal:!0,hasUserInteracted:!0}),R.default.error(n);return}P({hasUserInteracted:!0});try{await d.mutateAsync({applicationId:t.aid});let e=Date.now();P({isPolling:!0,pollingStartTime:e,remainingTime:12e4}),R.default.success("Regenerating interview questions...")}catch(n){q.RY(n,{tags:{applicationId:t.aid,component:"AIInterviewQuestions",action:"regenerateQuestions"}});let e=(null==n?void 0:n.message)||"Failed to regenerate questions";R.default.error(e),null==a||a(n)}}})},[null==t?void 0:t.aid,d,a,P,p]),K=(0,N.useCallback)(e=>{"string"==typeof e&&P({selectedCategory:e,hasUserInteracted:!0})},[P]),Y=(0,N.useCallback)(()=>{P({showRationales:!y,hasUserInteracted:!0})},[y,P]);if(!(null==t?void 0:t.aid))return(0,s.jsx)(l.ZP,{children:(0,s.jsx)(l.eW,{className:"p-6",children:(0,s.jsxs)("div",{className:"text-center py-8",children:[(0,s.jsx)(h.G,{className:"text-red-500 mb-4",icon:f.eHv,size:"2x"}),(0,s.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Invalid Application"}),(0,s.jsx)("p",{className:"text-gray-600",children:"Unable to load interview questions without a valid application ID."})]})})});if(!(null==F?void 0:F.length)&&!u&&!G)return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.ZP,{children:(0,s.jsx)(l.eW,{children:(0,s.jsx)(i.Z,{action:(0,s.jsx)(C.Z,{afterIcon:(0,s.jsx)(h.G,{className:"ml-2",icon:f.QDM}),"aria-label":"Generate AI interview questions for this candidate",design:"primary",disabled:!(null==t?void 0:t.aid)||u||G,onClick:V,size:"sm",children:"Generate Questions"}),design:"wrapped",icon:f.VE0,message:"Get ElevoltAI-generated interview questions tailored to this candidate.",subtitle:"Questions are customized based on their application and the job requirements.",title:"No Interview Questions Available"})})}),!!g.showUsageLimitModal&&(0,s.jsx)(Z.Z,{actionType:"ElevoltAI interview question generation",onClose:()=>P({showUsageLimitModal:!1}),reason:p.hasSubscription?"limit_reached":"no_subscription",show:g.showUsageLimitModal,usageInfo:p})]});if(u||G){let e=G&&!u;return(0,s.jsx)(l.ZP,{children:(0,s.jsx)(l.eW,{children:(0,s.jsxs)("div",{"aria-live":"polite",className:"text-center py-12",role:"status",children:[(0,s.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-blue-50 rounded-full flex items-center justify-center",children:(0,s.jsx)(h.G,{"aria-hidden":"true",className:"animate-spin text-blue",icon:f.LM3,size:"lg"})}),(0,s.jsx)("h4",{className:"text-lg font-medium text-gray-900 mb-2",children:e?"Checking for Questions":"Generating Questions"}),(0,s.jsx)("p",{className:"text-gray-600 mb-2",children:e?"Waiting for ElevoltAI to generate interview questions...":"ElevoltAI is creating personalized interview questions..."})]})})})}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.ZP,{children:(0,s.jsx)(l.eW,{className:"p-6",children:(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(I.W,{description:"These questions are AI-generated and tailored to this specific candidate and role. Use them as conversation starters and feel free to ask follow-up questions based on their responses.",title:"Please Note"}),(0,s.jsxs)("div",{className:"bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-4 space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(T.c,{showModal:!0,variant:"compact"})}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(C.Z,{"aria-label":"Regenerate interview questions",beforeIcon:(0,s.jsx)(h.G,{"aria-hidden":"true",className:"mr-2",icon:f.QDM}),design:"outlined",disabled:!(null==t?void 0:t.aid)||u||G,onClick:W,size:"sm",children:"Regenerate Questions"}),(0,s.jsxs)(C.Z,{"aria-label":"".concat(y?"Hide":"Show"," question rationales"),"aria-pressed":y,beforeIcon:(0,s.jsx)(h.G,{"aria-hidden":"true",className:"mr-2",icon:y?f.Aq:f.Mdf}),design:"secondary",onClick:Y,size:"sm",children:[y?"Hide":"Show"," Rationales"]})]})]}),!!(null==Q?void 0:Q.length)&&(0,s.jsxs)("div",{"aria-label":"Filter questions by category",className:"flex flex-wrap items-center gap-2 min-w-0",role:"group",children:[(0,s.jsx)(h.G,{"aria-hidden":"true",className:"text-gray-500",icon:f.G_j}),(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700",i
1d:"category-filter-label",children:"Filter By Category:"}),(0,s.jsxs)("button",{"aria-describedby":"category-filter-label","aria-pressed":"all"===j,className:"px-3 py-1 text-xs font-medium rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue focus:ring-offset-1 ".concat("all"===j?"bg-blue text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"),onClick:()=>K("all"),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),K("all"))},type:"button",children:["All (",F.length,")"]}),Q.map(e=>{if("string"!=typeof e)return null;let t=z[e]||0,n=j===e;return(0,s.jsxs)("button",{"aria-describedby":"category-filter-label","aria-pressed":n,className:"px-3 py-1 capitalize text-xs font-medium rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue focus:ring-offset-1 ".concat(n?"bg-blue text-white":"".concat(D(e)," hover:opacity-80")),onClick:()=>K(e),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),K(e))},type:"button",children:[e," (",t,")"]},e)})]})]}),(0,s.jsxs)("section",{"aria-labelledby":"questions-heading",children:[(0,s.jsxs)("h4",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center",id:"questions-heading",children:["Interview Questions (",(null==U?void 0:U.length)||0,")","all"!==j&&(0,s.jsx)("span",{"aria-label":"Filtered by ".concat(j," category"),className:"ml-2 px-2 py-1 text-xs font-medium rounded-full capitalize ".concat(D(j)),children:j})]}),(null==U?void 0:U.length)>0?(0,s.jsx)("div",{"aria-label":"Interview questions",className:"space-y-4",role:"list",children:U.map((e,t)=>{let n={text:"string"==typeof e?e:(null==e?void 0:e.question)||"",category:"object"==typeof e?null==e?void 0:e.category:null,rationale:"object"==typeof e?null==e?void 0:e.rationale:null},a=n.text?"".concat(t,"-").concat(n.text.replace(/[^a-zA-Z0-9]/g,"").slice(0,20)):"question-".concat(t);return(0,s.jsx)(S,{category:n.category,getCategoryColor:D,index:t,isCopied:v===t,onCopy:()=>B(e,t),questionText:n.text,rationale:n.rationale,showRationales:y},a)})}):(0,s.jsxs)("div",{className:"text-center py-8 text-gray-500",role:"status",children:[(0,s.jsx)(h.G,{"aria-hidden":"true",className:"mb-2",icon:f.sqG,size:"lg"}),(0,s.jsx)("p",{children:"No questions found for the selected category."}),(0,s.jsx)("p",{className:"text-sm mt-2",children:"Try selecting a different category or generate new questions."})]})]})]})})}),!!M&&(0,s.jsx)(Z.Z,{actionType:"AI interview question generation",onClose:()=>P({showUsageLimitModal:!1}),reason:p.hasSubscription?"limit_reached":"no_subscription",show:M,usageInfo:p})]})};G.propTypes={application:w().shape({aid:w().string.isRequired}).isRequired,onError:w().func,onQuestionsGenerated:w().func},G.defaultProps={onError:null,onQuestionsGenerated:null},G.displayName="AIInterviewQuestions";var O=n(79337),M=n(19317),P=n(47477),L=n(76467),Q=n(12524),D=n.n(Q);let z=e=>{let{icon:t,label:n,children:a,iconColor:i="text-blue",iconBgColor:r="bg-blue-50"}=e;return(0,s.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,s.jsx)("div",{className:"flex items-center justify-center w-8 h-8 rounded-full ".concat(r),children:(0,s.jsx)(h.G,{className:i,icon:t,size:"sm"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)(L.Z,{variant:"label",children:n}),(0,s.jsx)(L.Z,{as:"div",variant:"labelValue",children:a})]})]})};z.propTypes={icon:w().object.isRequired,label:w().string.isRequired,children:w().node.isRequired,iconColor:w().string,iconBgColor:w().string};let F={completed:{bg:"bg-blue-100",text:"text-blue-800"},no_show:{bg:"bg-red-100",text:"text-red-800"},cancelled:{bg:"bg-gray-100",text:"text-gray-800"},past:{bg:"bg-gray-100",text:"text-gray-600"},ongoing:{bg:"bg-orange-100",text:"text-orange-800"},upcoming:{bg:"bg-green-100",text:"text-green-800"}},U=e=>F[e]||F.upcoming,B=e=>{let t=new Date,n=new Date("".concat(e.date,"T").concat(e.start_at)),s=new Date("".concat(e.date,"T").concat(e.end_at));return"completed"===e.status?{status:"completed",label:"Completed"}:"no_show"===e.status?{status:"no_show",label:"No Show"}:"cancelled"===e.status?{status:"cancelled",label:"Cancelled"}:t>s?{status:"past",label:"Past"}:t>=n&&t<=s?{status:"ongoing",label:"In Progress"}:{status:"upcoming",label:"Upcoming"}},V=e=>{let{interview:t}=e,n=B(t),a=U(n.status);return(0,s.jsx)("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ".concat(a.bg," ").concat(a.text),children:n.label})};V.propTypes={interview:w().shape({status:w().string,date:w().string.isRequired,start_at:w().string.isRequired,end_at:w().string.isRequired}).isRequired};let W=e=>{let{interviewers:t,iconColor:n="text-gray-600",iconBgColor:a="bg-gray-100"}=e;return(null==t?void 0:t.length)?(0,s.jsx)("div",{className:"space-y-3",children:(0,s.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,s.jsx)("div",{className:"flex items-center justify-center w-8 h-8 rounded-full ".concat(a),children:(0,s.jsx)(h.G,{className:n,icon:f.FVb,
1size:"sm"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)(L.Z,{className:"mb-1",variant:"labelValue",children:["Interviewer",t.length>1?"s":""]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map((e,t)=>(0,s.jsx)(L.Z,{as:"span",className:"inline-flex items-center px-2 py-1 rounded-full bg-blue-50 border border-blue-100",color:"text-blue",variant:"caption",weight:"font-medium",children:e.name},e.uid||t))})]})]})}):null};W.propTypes={interviewers:w().arrayOf(w().shape({name:w().string.isRequired,uid:w().string})),iconColor:w().string,iconBgColor:w().string};var K=n(31184);let Y=e=>{let t={completed:{iconBg:"bg-blue-50",iconColor:"text-blue"},no_show:{iconBg:"bg-red-50",iconColor:"text-red"},cancelled:{iconBg:"bg-gray-100",iconColor:"text-gray-500"},past:{iconBg:"bg-gray-100",iconColor:"text-gray-500"},ongoing:{iconBg:"bg-orange-50",iconColor:"text-orange"},upcoming:{iconBg:"bg-green-50",iconColor:"text-green-600"}};return t[e]||t.upcoming},J=e=>{var t,n,a,i;let{interview:r,application:l,getInterviews:o,mode:c="restricted",flex:u="row",outline:m=!1,tenantName:p}=e,g=(0,b.NL)(),v=(0,d.xu)(),y=(0,d.vv)(),j=(0,d.fX)(),w=(0,d.wT)(),[C,I]=(0,N.useState)(!1),q=(0,N.useMemo)(()=>B(r),[r]),E=(0,N.useMemo)(()=>Y(q.status),[q.status]),T=(null===(t=r.user)||void 0===t?void 0:t.name)||(null===(n=r.applicant)||void 0===n?void 0:n.name)||"Unknown",_=()=>{(0,k.Z)({handler:()=>{v.mutate({interview:r.iid},{onSuccess:()=>{R.default.success("Interview deleted successfully!"),o(),g.invalidateQueries(["interviews"])},onError:e=>{R.default.error(e.message||"Failed to delete interview")}})}})},Z=()=>{(0,k.Z)({handler:()=>{y.mutate({interview:r.iid},{onSuccess:()=>{R.default.success("Interview marked as completed!"),o(),g.invalidateQueries(["interviews"])},onError:e=>{R.default.error(e.message||"Failed to mark interview as complete")}})},title:"Mark Interview as Complete",message:"Are you sure you want to mark this interview as completed?"})},A=()=>{(0,k.Z)({handler:()=>{j.mutate({interview:r.iid},{onSuccess:()=>{R.default.success("Interview marked as no-show!"),o(),g.invalidateQueries(["interviews"])},onError:e=>{R.default.error(e.message||"Failed to mark interview as no-show")}})},title:"Mark Interview as No-Show",message:"Are you sure you want to mark this interview as no-show?"})},S=()=>{(0,k.Z)({handler:()=>{w.mutate({interview:r.iid},{onSuccess:()=>{R.default.success("Interview cancelled successfully!"),o(),g.invalidateQueries(["interviews"])},onError:e=>{R.default.error(e.message||"Failed to cancel interview")}})},title:"Cancel Interview",message:"Are you sure you want to cancel this interview? This action cannot be undone."})},G=(()=>{var e,t,n;let a=[{text:"View Details",icon:(0,s.jsx)(h.G,{className:"mr-2 text-inherit fill-inherit",icon:f.gJF,size:"sm"}),href:"/hr/".concat(p,"/hiring/").concat(null===(e=r.jobpost)||void 0===e?void 0:e.jid,"/interviews/").concat(r.iid)},{text:"Edit Details",icon:(0,s.jsx)(h.G,{className:"mr-2 text-inherit fill-inherit",icon:f.Xcf,size:"sm"}),action:()=>{I(!0)}},{text:"View Application",icon:(0,s.jsx)(h.G,{className:"mr-2 text-inherit fill-inherit",icon:f.U6l,size:"sm"}),href:"/hr/".concat(p,"/hiring/").concat(null===(t=r.jobpost)||void 0===t?void 0:t.jid,"/applications/").concat(null===(n=r.application)||void 0===n?void 0:n.aid)}];return"completed"!==r.status&&"no_show"!==r.status&&new Date>new Date("".concat(r.date,"T").concat(r.end_at))&&a.push({text:"Mark as Complete",icon:(0,s.jsx)(h.G,{className:"mr-2 text-inherit fill-inherit",icon:f.LEp,size:"sm"}),action:()=>{Z()}},{text:"Mark as No-Show",icon:(0,s.jsx)(h.G,{className:"mr-2 text-inherit fill-inherit",icon:f.NBC,size:"sm"}),action:()=>{A()}}),"cancelled"!==r.status&&a.push({text:"Cancel Interview",icon:(0,s.jsx)(h.G,{className:"mr-2 text-inherit fill-inherit",icon:f.NBC,size:"sm"}),action:()=>{S()}}),a.push({text:"Delete",icon:(0,s.jsx)(h.G,{className:"mr-2 text-inherit fill-inherit",icon:f.$aW,size:"sm"}),action:()=>{_()}}),a})();return(0,s.jsxs)(s.Fragment,{children:[!!("restricted"!==c&&C)&&(0,s.jsx)(K.Z,{application:l,getInterviews:o,interview:r,mode:"edit",onClose:()=>{I(!1),o()},show:!0}),(0,s.jsxs)("article",{"aria-label":"Interview with ".concat(T),className:D()("w-full bg-white",m?"rounded-lg border border-gray-200":"border-b border-gray-100"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-4 pb-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(L.Z,{className:"capitalize",color:"text-gray-900",variant:"labelValue",children:T}),(0,s.jsx)(V,{interview:r})]}),"restricted"!==c&&(0,s.jsx)(M.C,{menuItems:G,subject:r})]}),(0,s.jsx)("div",{className:"px-4 pb-4",children:(0,s.jsxs)("div",{className:D()("grid gap-4","row"!==u?"grid-cols-1":(null===(i=r.interviewers)||void 0===i?void 0:i.length)?"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3":"grid-cols-1 sm:grid-cols-2"),children:[(0,s.jsxs)(z,{icon:f.IV4,iconBgColor:E.iconBg,iconColor:E.iconColor,label:"Date & Time",children:[(0,s.jsx)(L.Z,{variant:"labelValue",weight:"font-medium",children:(0,P.p6)(r.date,"EEEE, MMM dd, yyyy")}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,s.jsx)(h.G,{className:"text-gray-400",icon:f.SZw,size:"sm"}),(0,s.jsxs)(L.Z,{color:"text-gray-600",variant:"caption",children:[(0,P.p6)("".concat(r.date,"T").concat(r.start_at),"p"),(0,s.jsx)("span",{className:"mx-1",children:"-"}),(0,P.p6)("".concat(r.date,"T").concat(r.end_at),"p")]})]})]}),(0,s.jsx)(z,{icon:"physical"===r.type?f.FGq:f.IyC,iconBgColor:E.iconBg,iconColor:E.iconColor,label:"physical"===r.type?"Location":"Video Conference",children:"physical"===r.type?(0,s.jsx)(L.Z,{className:"truncate",variant:"labelValue",children:r.location}):(0,s.jsxs)("a",{className:"text-blue hover:text-blue-dark font-medium inline-flex items-center gap-1 transition-colors duration-200",href:(0,x.Ld)(r.location),rel:"noreferrer",target:"_blank",children:[(0,s.jsx)(L.Z,{as:"span",color:"text-blue",variant:"labelValue",children:"Join Meeting"}),(0,s.jsx)(h.G,{icon:f.gJF,size:"sm"})]})}),!!(null===(a=r.interviewers)||void 0===a?void 0:a.length)&&(0,s.jsx)(W,{iconBgColor:E.iconBg,iconColor:E.iconColor,interviewers:r.interviewers})]})})]})]})};var X=n(5120),H=n(90551),$=n(62372),ee=n(63798);let et=[1,2,3,4,5],en=e=>{let{label:t,field:n,icon:a,category:i,value:r,notes:l,onChange:o,isEditable:c=!0,error:d}=e,u=(0,N.useCallback)(e=>{o(n,e,i)},[n,i,o]),m=(0,N.useCallback)(e=>{o("".concat(n,"_notes"),e,i)},[n,i,o]),p=(0,N.useMemo)(()=>"space-y-3 border rounded-lg bg-gray-50 p-4 ".concat(d?"border-red":"border-gray-200"),[d]);return(0,s.jsxs)("div",{className:p,children:[(0,s.jsxs)("label",{className:"flex items-center space-x-2 text-sm font-medium text-gray-700",children:[(0,s.jsx)(h.G,{className:"text-blue",icon:a}),(0,s.jsx)("span",{children:t}),(0,s.jsx)("span",{className:"text-red",children:"*"})]}),(0,s.jsx)("div",{className:"flex space-x-2",children:et.map(e=>(0,s.jsx)("button",{className:"w-8 h-8 rounded-full border flex items-center justify-center text-sm font-medium transition-colors duration-200 ".concat(r>=e?"bg-blue border-blue-dark text-white":"bg-gray-100 border-gray-300 text-gray-500 hover:bg-gray-200"," ").concat(c?"hover:scale-105":"cursor-not-allowed opacity-60"),disabled:!c,onClick:()=>u(e),type:"button",children:(0,s.jsx)(h.G,{icon:f.Tab,size:"sm"})},e))}),!!d&&(0,s.jsx)("p",{className:"text-xs text-red mt-1",children:d}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("label",{className:"block text-xs font-medium text-gray-600",htmlFor:"".concat(n,"_notes"),children:"Notes (optional)"}),(0,s.jsx)($.K,{disabled:!c,name:"".concat(n,"_notes"),onChange:e=>m(e.target.value),placeholder:"Add notes about ".concat(t.toLowerCase(),"..."),rows:2,value:l||""})]})]})};en.propTypes={label:w().string.isRequired,field:w().string.isRequired,icon:w().shape({icon:w().array,iconName:w().string,prefix:w().string}).isRequired,category:w().string,value:w().number,notes:w().string,onChange:w().func.isRequired,isEditable:w().bool,error:w().string};let es=e=>{let{label:t,field:n,icon:a,category:i,value:r,onChange:l,isEditable:o=!0,error:c}=e,d=(0,N.useCallback)(e=>{l(n,e,i)},[n,i,l]),u=(0,N.useMemo)(()=>"space-y-3 border rounded-lg bg-gray-50 p-4 ".concat(c?"border-red":"border-gray-200"),[c]);return(0,s.jsxs)("div",{className:u,children:[(0,s.jsxs)("label",{className:"flex items-center space-x-2 text-sm font-medium text-gray-700",children:[(0,s.jsx)(h.G,{className:"text-blue",icon:a}),(0,s.jsx)("span",{children:t}),(0,s.jsx)("span",{className:"text-red",children:"*"})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)($.K,{disabled:!o,name:n,onChange:e=>d(e.target.value),placeholder:"Add notes about ".concat(t.toLowerCase(),"..."),rows:3,value:r||""}),!!c&&(0,s.jsx)("p",{className:"text-xs text-red mt-1",children:c})]})]})};es.propTypes={label:w().string.isRequired,field:w().string.isRequired,icon:w().shape({icon:w().array,iconName:w().string,prefix:w().string}).isRequired,category:w().string,value:w().string,onChange:w().func.isRequired,isEditable:w().bool,error:w().string};let ea=e=>{let{label:t,field:n,icon:a,category:i,value:r,notes:l,onChange:o,isEditable:c=!0,error:d}=e,u=(0,N.useCallback)(e=>{o(n,e,i)},[n,i,o]),m=(0,N.useCallback)(e=>{o("".concat(n,"_notes"),e,i)},[n,i,o]),p=(0,N.useMemo)(()=>"space-y-3 border rounded-lg bg-gray-50 p-4 ".concat(d?"border-red":"border-gray-200"),[d]);return(0,s.jsxs)("div",{className:p,children:[(0,s.jsxs)("label",{className:"flex items-center space-x-2 text-sm font-medium text-gray-700",children:[(0,s.jsx)(h.G,{className:"text-blue",icon:a}),(0,s.jsx)("span",{children:t}),(0,s.jsx)("span",{className:"text-red",children:"*"})]}),(0,s.jsxs)("div",{className:"flex space-x-4",children:[(0,s.jsx)("button",{className:"px-4 py-2 rounded-lg border text-sm font-medium transition-colors duration-200 ".concat("yes"===r?"bg-blue-dark border-blue-darkest text-white":"bg-gray-100 border-gray-300 text-gray-700 hover:bg-gray-200"," ").concat(c?"hover:scale-105":"cursor-not-allowed opacity-60"),disabled:!c,onClick:()=>
1u("yes"),type:"button",children:"Yes"}),(0,s.jsx)("button",{className:"px-4 py-2 rounded-lg border text-sm font-medium transition-colors duration-200 ".concat("no"===r?"bg-red border-red-rose text-white":"bg-gray-100 border-gray-300 text-gray-700 hover:bg-gray-200"," ").concat(c?"hover:scale-105":"cursor-not-allowed opacity-60"),disabled:!c,onClick:()=>u("no"),type:"button",children:"No"})]}),!!d&&(0,s.jsx)("p",{className:"text-xs text-red mt-1",children:d}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("label",{className:"block text-xs font-medium text-gray-600",htmlFor:"".concat(n,"_notes"),children:"Notes (optional)"}),(0,s.jsx)($.K,{disabled:!c,name:"".concat(n,"_notes"),onChange:e=>m(e.target.value),placeholder:"Add notes about ".concat(t.toLowerCase(),"..."),rows:2,value:l||""})]})]})};ea.propTypes={label:w().string.isRequired,field:w().string.isRequired,icon:w().shape({icon:w().array,iconName:w().string,prefix:w().string}).isRequired,category:w().string,value:w().string,notes:w().string,onChange:w().func.isRequired,isEditable:w().bool,error:w().string};let ei=["hire","maybe","no_hire"],er=e=>{let{recommendation:t,notes:n,onChange:a,isEditable:i=!0,recommendationError:r}=e,l=(0,N.useCallback)(e=>{a("recommendation",e.target.value)},[a]),o=(0,N.useCallback)(e=>{a("notes",e.target.value)},[a]);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("h4",{className:"text-lg font-semibold text-gray-900 border-b border-gray-200 pb-2",children:"Final Assessment"}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("label",{className:"flex items-center space-x-2 text-sm font-medium text-gray-700",htmlFor:"recommendation",children:[(0,s.jsx)("span",{children:"Recommendation"}),(0,s.jsx)("span",{className:"text-red",children:"*"})]}),(0,s.jsx)(ee.P,{disabled:!i,name:"recommendation",onChange:l,options:ei,selected:t||""}),!!r&&(0,s.jsx)("p",{className:"text-xs text-red mt-1",children:r})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-gray-700",htmlFor:"notes",children:"Notes & Comments"}),(0,s.jsx)($.K,{disabled:!i,name:"notes",onChange:o,placeholder:"Add your notes about the interview...",rows:4,value:n||""})]})]})]})};er.propTypes={recommendation:w().string,notes:w().string,onChange:w().func.isRequired,isEditable:w().bool,recommendationError:w().string};var el=n(77973);let eo={attributes:f.LEp,company_values:f.FVb,overall:f.Tab,default:f.U6l},ec=e=>{let{scorecard:t,onScorecardChange:n,isEditable:a=!0,template:i=null,validationErrors:r={}}=e,[l,o]=(0,N.useState)(t||{}),[c,d]=(0,N.useState)(r);(0,N.useEffect)(()=>{o(t||{})},[t]),(0,N.useEffect)(()=>{d(r)},[r]);let u=(0,N.useCallback)((e,t,n)=>{try{var s,a,r,l;let o=(0,el.Pd)(i);if(n&&("attributes"===n||"company_values"===n)){let i=o.shape[n];(null==i?void 0:null===(a=i._def)||void 0===a?void 0:null===(s=a.innerType)||void 0===s?void 0:s.shape)&&(null===(r=i._def.innerType.shape[e])||void 0===r||r.parse(t))}else null===(l=o.shape[e])||void 0===l||l.parse(t);d(t=>{let s={...t},a=n?"".concat(n,".").concat(e):e;return delete s[a],s})}catch(t){t.errors&&t.errors[0]&&d(s=>({...s,[n?"".concat(n,".").concat(e):e]:t.errors[0].message}))}},[i]),m=(0,N.useCallback)(function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a={...l};s&&("attributes"===s||"company_values"===s)?(a[s]||(a[s]={}),a[s][e]=t):a[e]=t,u(e,t,s),o(a),null==n||n(a)},[l,n,u]),p=(0,N.useCallback)((e,t)=>{if(t&&("attributes"===t||"company_values"===t)){var n;return null===(n=l[t])||void 0===n?void 0:n[e]}return l[e]},[l]),g=(0,N.useCallback)((e,t)=>c[t?"".concat(t,".").concat(e):e],[c]),x=(0,N.useCallback)(e=>eo[e]||eo.default,[]),f=(0,N.useCallback)(e=>{let{label:t,field:n,type:i,category:r}=e,l=x(r),o=p(n,r),c=p("".concat(n,"_notes"),r),d=g(n,r),u={category:r,error:d,field:n,icon:l,isEditable:a,key:"".concat(r,"-").concat(n),label:t,onChange:m};switch(i){case"text":return(0,s.jsx)(es,{...u,value:o});case"yes/no":return(0,s.jsx)(ea,{...u,notes:c,value:o});default:return(0,s.jsx)(en,{...u,notes:c,value:o})}},[x,p,g,a,m]),h=(0,N.useMemo)(()=>(0,el.b1)(i),[i]);return(0,s.jsxs)("div",{className:"space-y-8",children:[h.map(e=>(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("h4",{className:"text-lg font-semibold text-gray-900 border-b border-gray-200 pb-2",children:e.title}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4",children:e.fields.map(e=>f(e))})]},e.title)),(0,s.jsx)(er,{isEditable:a,notes:l.notes,onChange:m,recommendation:l.recommendation,recommendationError:g("recommendation")})]})};ec.propTypes={scorecard:w().object,onScorecardChange:w().func,isEditable:w().bool,template:w().object,validationErrors:w().object};let ed=e=>{let{interview:t,interviewId:n,template:a,isInterviewer:r,onRefetch:o}=e,d=(0,b.NL)(),{scorecards:u=[],jobpost:m,application:p}=t||{},g=null==m?void 0:m.jid,x=null==p?void 0:p.aid,v=(0,c.GR)({jobpostId:g,applicationId:x,interviewId:n}),[y,j]=(0,N.useState)(!1),[w,I]=(0,N.useState)({}),[q,E]=(0,N.useState)({}),T=(0,N.useMemo)(()=>(0,el.Qo)(a),[a]),_=(0,N.useMemo)(()=>u.length>0,[u.length]),Z=(0,N.useMemo)(()=>(0,el.j)(u,T,a),[u,T,a]);(0,N.useEffect)(()=>{I(Z)},[Z]);let A=(0,N.useCallback)(async()=>(await d.invalidateQueries(["interview",n]),await d.invalidateQueries(["scorecards",g,x,n]),null==o?void 0:o()),[d,n,g,x,o]),S=(0,N.useCallback)(async()=>{try{(0,el.Pd)(a).parse(w),E({});let e=async()=>{await v.mutateAsync({jobpostId:g,applicationId:x,interviewId:n,candidate_attributes:JSON.stringify(w.attributes),company_values:JSON.stringify(w.company_values),overall_rating:w.overall_rating,
1notes:w.notes,recommendation:w.recommendation}),R.default.success("Scorecard saved successfully!"),j(!1),A()};(0,k.Z)({handler:e,title:"Save Scorecard?",message:"You will not be able to edit the scorecard after saving. Are you sure you want to save?",confirmButtonText:"Yes, save",cancelButtonText:"Cancel"})}catch(e){if(e instanceof X.jmq){let t={};e.issues.forEach(e=>{t[e.path.join(".")]=e.message}),E(t),R.default.error("Please fix the validation errors before saving")}else R.default.error(e.message||"Failed to save scorecard")}},[a,w,v,g,x,n,A]),G=(0,N.useCallback)(()=>{j(!1),I(Z),E({})},[Z]);return(0,s.jsxs)(l.ZP,{className:"mb-6",children:[(0,s.jsx)(l.Ol,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("h3",{className:"text-xl font-semibold",children:"Scorecards"}),!y&&!_&&!!r&&(0,s.jsxs)(C.Z,{design:"secondary",onClick:()=>j(!0),children:[(0,s.jsx)(h.G,{className:"mr-2",icon:f.Xcf}),"Add Scorecard"]})]})}),(0,s.jsxs)(l.eW,{children:[0===u.length&&!y&&(0,s.jsx)(i.Z,{description:r?"No scorecard has been created for this interview yet. Click 'Add Scorecard' to evaluate the candidate.":"No scorecard has been created for this interview yet. Only assigned interviewers can create scorecards.",design:"wrapped",isError:!1,isLoading:!1,items:"scorecard"}),u.length>0&&!y&&(0,s.jsx)(H.N,{scorecards:u,template:a}),!!(y&&r)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ec,{isEditable:y,onScorecardChange:I,scorecard:w,template:a,validationErrors:q}),(0,s.jsxs)("div",{className:"flex justify-end space-x-3 mt-4",children:[(0,s.jsx)(C.Z,{design:"secondary",onClick:G,children:"Cancel"}),(0,s.jsxs)(C.Z,{design:"primary",disabled:v.isPending,onClick:S,children:[(0,s.jsx)(h.G,{className:"mr-2",icon:f.r6l}),v.isPending?"Saving...":"Save Scorecard"]})]})]})]})]})};ed.propTypes={interview:w().object,interviewId:w().string.isRequired,template:w().object,isInterviewer:w().bool.isRequired,onRefetch:w().func};let eu=e=>{let{tenantName:t,jobpost:n,jobpostId:a}=e;return(0,s.jsxs)("a",{className:"appearance-none flex justify-start items-center text-sm font-medium hover:text-blue-dark rounded-sm py-3 px-4 bg-blue-50 hover:bg-blue-100",href:"/hr/".concat(t,"/hiring/").concat(n.jid||a),children:[(0,s.jsx)(h.G,{className:"mr-3",icon:f.FVb}),"Manage Jobpost",(0,s.jsx)(h.G,{className:"ml-auto text-sm text-inherit",icon:f._tD,size:"1x"})]},"manage-jobpost")};eu.propTypes={tenantName:w().string.isRequired,jobpost:w().object.isRequired,jobpostId:w().string.isRequired};let em=e=>{let{tenantName:t,jobpost:n,jobpostId:a,application:i}=e;return(0,s.jsxs)("a",{className:"appearance-none flex justify-start items-center text-sm font-medium hover:text-blue-dark rounded-sm py-3 px-4 bg-blue-50 hover:bg-blue-100",href:"/hr/".concat(t,"/hiring/").concat(n.jid||a,"/applications/").concat(i.aid),children:[(0,s.jsx)(h.G,{className:"mr-3",icon:f.U6l}),"View Application",(0,s.jsx)(h.G,{className:"ml-auto text-sm text-inherit",icon:f._tD,size:"1x"})]},"view-application")};em.propTypes={tenantName:w().string.isRequired,jobpost:w().object.isRequired,jobpostId:w().string.isRequired,application:w().object.isRequired};let ep=e=>{let{tenantName:t,jobpost:n,jobpostId:a}=e;return(0,s.jsxs)("a",{className:"appearance-none flex justify-start items-center text-sm font-medium hover:text-blue-dark rounded-sm py-3 px-4 bg-blue-50 hover:bg-blue-100",href:"/hr/".concat(t,"/hiring/").concat(n.jid||a,"/interviews"),children:[(0,s.jsx)(h.G,{className:"mr-3",icon:f.IV4}),"All Interviews",(0,s.jsx)(h.G,{className:"ml-auto text-sm text-inherit",icon:f._tD,size:"1x"})]},"all-interviews")};ep.propTypes={tenantName:w().string.isRequired,jobpost:w().object.isRequired,jobpostId:w().string.isRequired};let eg=e=>{let{application:t}=e;return(null==t?void 0:t.cv)?(0,s.jsxs)("a",{className:"appearance-none flex justify-start items-center text-sm font-medium hover:text-blue-dark rounded-sm py-3 px-4 bg-blue-50 hover:bg-blue-100",href:(0,x.Ld)(t.cv),rel:"noopener noreferrer",target:"_blank",children:[(0,s.jsx)(h.G,{className:"mr-3",icon:f.gSj}),"View Candidate CV",(0,s.jsx)(h.G,{className:"ml-auto text-sm text-inherit",icon:f._tD,size:"1x"})]},"view-cv"):null};
1eg.propTypes={application:w().object.isRequired};let ex=e=>{var t;let{tenantName:n,jobpostId:g,interviewId:x,user:v}=e,j=(0,b.NL)(),{data:w,isLoading:C,error:I,refetch:k}=(0,d.KW)({interviewId:x,enabled:!!x}),{jobpost:q={},application:E={}}=w||{},{data:R}=(0,c.aG)({jobpostId:q.jid||g,enabled:!!(q.jid||g)}),T=(null==R?void 0:null===(t=R.data)||void 0===t?void 0:t[0])||null,_=(0,N.useMemo)(()=>null!=v&&!!v.uid&&null!=w&&!!w.interviewers&&w.interviewers.some(e=>e.uid===v.uid),[null==v?void 0:v.uid,null==w?void 0:w.interviewers]),Z=(0,N.useMemo)(()=>async()=>(await j.invalidateQueries(["interview",x]),k()),[j,x,k]),A=(0,N.useMemo)(()=>[{href:"/hr/".concat(n,"/hiring/"),name:"Hiring",nodeType:"Link"},{href:"/hr/".concat(n,"/hiring/").concat(q.jid||g),name:(0,o.excerpt)(q.title||"Job Post",40),nodeType:"Link"},{href:"/hr/".concat(n,"/hiring/").concat(q.jid||g,"/interviews"),name:"Interviews",nodeType:"Link"},{href:"#",name:"Interview Details",nodeType:"a"}],[n,q.jid,q.title,g]),S=(0,N.useMemo)(()=>[()=>(0,s.jsx)(eu,{jobpost:q,jobpostId:g,tenantName:n}),()=>(0,s.jsx)(em,{application:E,jobpost:q,jobpostId:g,tenantName:n}),()=>(0,s.jsx)(eg,{application:E}),()=>(0,s.jsx)(ep,{jobpost:q,jobpostId:g,tenantName:n})],[q,g,n,E]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(O.Z,{title:"".concat((0,o.kC)((0,o.parseUnderScore)(n))," - Interview Details")}),(0,s.jsx)("div",{className:"container mx-auto px-6 md:px-8 lg:px-12",children:(0,s.jsx)(a.Z,{home:"/hr/".concat(n,"/"),links:A})}),(0,s.jsx)("div",{className:"container mx-auto px-6 md:px-8 lg:px-12 flex flex-col",children:(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row",children:[(0,s.jsxs)("div",{className:"w-full md:w-9/12 md:pr-2 xl:pr-4 flex flex-col",children:[(0,s.jsxs)(l.ZP,{children:[(0,s.jsx)(l.Ol,{children:(0,s.jsx)("h3",{className:"text-xl",children:"Interview Details"})}),(0,s.jsxs)(l.eW,{padding:0,children:[!!C&&(0,s.jsx)(i.Z,{design:"wrapped",isLoading:!0,message:"Loading interview details..."}),!!I&&(0,s.jsx)(i.Z,{design:"wrapped",isError:!0,message:"Failed to load interview details"}),!!(!C&&!I&&y()(w))&&(0,s.jsx)(i.Z,{design:"wrapped",message:"Interview not found"}),!!(!C&&!I&&!y()(w))&&(0,s.jsx)(J,{application:E,flex:"row",getInterviews:Z,interview:w,mode:"non-restricted",outline:!1,showCandidateInfo:!0,tenantName:n})]})]}),!!(!C&&!I&&!y()(w))&&(0,s.jsxs)(u.ZP,{defaultIndex:0,direction:"horizontal",justify:"start",lazyMount:!0,syncWithUrl:!1,children:[(0,s.jsx)(m.Z,{icon:(0,s.jsx)(h.G,{icon:f.OGB}),label:"Scorecards"}),(0,s.jsx)(m.Z,{icon:(0,s.jsx)(h.G,{icon:f.qxT}),label:"AI Interview Questions"}),(0,s.jsx)(p.Z,{padding:0,children:(0,s.jsx)(ed,{interview:w,interviewId:x,isInterviewer:_,onRefetch:Z,template:T})}),(0,s.jsxs)(p.Z,{padding:0,children:[!y()(E)&&(0,s.jsx)(G,{application:E}),!!y()(E)&&(0,s.jsx)(i.Z,{design:"wrapped",message:"No application data available"})]})]})]}),(0,s.jsx)("div",{className:"w-full md:w-3/12 md:pl-2 xl:pl-4 flex flex-col",children:(0,s.jsx)(r.Z,{addons:S,user:v})})]})})]})};ex.getInitialProps=async e=>{let t=e.query.tenant,n=e.query.id,s=e.query["interview-id"];return t&&n&&s?{tenantName:t,jobpostId:n,interviewId:s}:{notFound:!0}},ex.propTypes={tenantName:w().string.isRequired,jobpostId:w().string.isRequired,interviewId:w().string.isRequired,user:w().object.isRequired};var ef=(0,g.withAuthSync)(ex)},51634:function(e,t,n){"use strict";var s=n(52322),a=n(13980),i=n.n(a);let r=(0,n(2784).memo)(function(e){let{children:t,padding:n=0,className:a=""}=e;return(0,s.jsx)("div",{className:"w-full ".concat(n?"p-".concat(n):""," ").concat(a).trim(),children:t})});r.displayName="TabPanel",r.propTypes={children:i().node,padding:i().oneOfType([i().number,i().string]),className:i().string},t.Z=r},56486:function(){},91516:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var s=n(7896),a=n(2784),i=n(26202),r=n(88137),l=n(56666),o=n(33028),c=n(76854),d=n(59740),u=n(407),m=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];n(28316),n(84337);var p=(0,a.forwardRef)(function(e,t){var n,p,g,x,f,h,b,v,y,j,w,N,C,I,k,q,
1E,R,T,_,Z,A,S,G,O,M,P,L,Q,D,z,F,U,B,V,W,K,Y,J,X,H,$,ee,et,en,es,ea,ei,er,el,eo,ec=(p=void 0!==(n=e.defaultOptions)&&n,x=void 0!==(g=e.cacheOptions)&&g,f=e.loadOptions,e.options,h=e.isLoading,b=e.onInputChange,v=e.filterOption,j=(y=(0,d.Z)(e,m)).inputValue,w=(0,a.useRef)(void 0),N=(0,a.useRef)(!1),C=(0,a.useState)(Array.isArray(p)?p:void 0),k=(I=(0,c.Z)(C,2))[0],q=I[1],E=(0,a.useState)(void 0!==j?j:""),T=(R=(0,c.Z)(E,2))[0],_=R[1],Z=(0,a.useState)(!0===p),S=(A=(0,c.Z)(Z,2))[0],G=A[1],O=(0,a.useState)(void 0),P=(M=(0,c.Z)(O,2))[0],L=M[1],Q=(0,a.useState)([]),z=(D=(0,c.Z)(Q,2))[0],F=D[1],U=(0,a.useState)(!1),V=(B=(0,c.Z)(U,2))[0],W=B[1],K=(0,a.useState)({}),J=(Y=(0,c.Z)(K,2))[0],X=Y[1],H=(0,a.useState)(void 0),ee=($=(0,c.Z)(H,2))[0],et=$[1],en=(0,a.useState)(void 0),ea=(es=(0,c.Z)(en,2))[0],ei=es[1],x!==ea&&(X({}),ei(x)),p!==ee&&(q(Array.isArray(p)?p:void 0),et(p)),(0,a.useEffect)(function(){return N.current=!0,function(){N.current=!1}},[]),er=(0,a.useCallback)(function(e,t){if(!f)return t();var n=f(e,t);n&&"function"==typeof n.then&&n.then(t,function(){return t()})},[f]),(0,a.useEffect)(function(){!0===p&&er(T,function(e){N.current&&(q(e||[]),G(!!w.current))})},[]),el=(0,a.useCallback)(function(e,t){var n=(0,u.L)(e,t,b);if(!n){w.current=void 0,_(""),L(""),F([]),G(!1),W(!1);return}if(x&&J[n])_(n),L(n),F(J[n]),G(!1),W(!1);else{var s=w.current={};_(n),G(!0),W(!P),er(n,function(e){N&&s===w.current&&(w.current=void 0,G(!1),L(n),F(e||[]),W(!1),X(e?(0,o.Z)((0,o.Z)({},J),{},(0,l.Z)({},n,e)):J))})}},[x,er,P,J,b]),eo=V?[]:T&&P?z:k||[],(0,o.Z)((0,o.Z)({},y),{},{options:eo,isLoading:S||void 0!==h&&h,onInputChange:el,filterOption:void 0===v?null:v})),ed=(0,r.u)(ec);return a.createElement(i.S,(0,s.Z)({ref:t},ed))})},94217:function(e,t,n){"use strict";var s,a,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}();t._1=function(e){var t;document.body.classList.add("react-confirm-alert-body-element"),function(){if(!document.getElementById("react-confirm-alert-firm-svg")){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"feGaussianBlur");t.setAttribute("stdDeviation","0.3");var n=document.createElementNS(e,"filter");n.setAttribute("id","gaussian-blur"),n.appendChild(t);var s=document.createElementNS(e,"svg");s.setAttribute("id","react-confirm-alert-firm-svg"),s.setAttribute("class","react-confirm-alert-svg"),s.appendChild(n),document.body.appendChild(s)}}(),t=document.getElementById(e.targetId||x),e.targetId&&!t&&console.error("React Confirm Alert:","Can not get element id (#"+e.targetId+")"),t||(document.body.children[0].classList.add("react-confirm-alert-blur"),(t=document.createElement("div")).id=x,document.body.appendChild(t)),(g=(0,d.createRoot)(t)).render(o.default.createElement(p,e))};var l=n(2784),o=u(l),c=u(n(13980)),d=n(17029);function u(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var p=(a=s=function(e){function t(){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,t);for(var e,n,s,a=arguments.length,i=Array(a),r=0;r<a;r++)i[r]=arguments[r];return n=s=m(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),s.handleClickButton=function(e){e.onClick&&e.onClick(),s.close()},s.handleClickOverlay=function(e){var t=s.props,n=t.closeOnClickOutside,a=t.onClickOutside,i=e.target===s.overlay;n&&i&&(a(),s.close()),e.stopPropagation()},s.close=function(){var e,t,n,a=s.props.afterClose;document.body.classList.remove("react-confirm-alert-body-element"),e=s.props,(t=document.getElementById(e.targetId||x))&&g.unmount(t),(n=document.getElementById("react-confirm-alert-firm-svg"))&&n.parentNode.removeChild(n),document.body.children[0].classList.remove("react-confirm-alert-blur"),a()},s.keyboard=function(e){var t=s.props,n=t.closeOnEscape,a=t.onKeypressEscape,i=t.onkeyPress,r=t.keyCodeForClose,l=e.keyCode,o=27===l;r.includes(l)&&s.close(),n&&o&&(a(e),s.close()),i&&i()},s.componentDidMount=function(){document.addEventListener("keydown",s.keyboard,!1)},s.componentWillUnmount=function(){document.removeEventListener("keydown",s.keyboard,!1),s.props.willUnmount()},s.renderCustomUI=function(){var e=s.props,t=e.title,n=e.message,a=e.buttons;return(0,e.customUI)({title:t,message:n,buttons:a,onClose:s.close})},m(s,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.title,s=t.message,a=t.buttons,r=t.childrenElement,l=t.customUI,c=t.overlayClassName;return o.default.createElement("div",{className:"react-confirm-alert-overlay "+c,ref:function(t){return e.overlay=t},onClick:this.handleClickOverlay},o.default.createElement("div",{className:"react-confirm-alert"},l?this.renderCustomUI():o.default.createElement("div",{className:"react-confirm-alert-body"},n&&o.default.createElement("h1",null,n),s,r(),o.default.createElement("div",{className:"react-confirm-alert-button-group"},a.map(function(t,n){return o.default.createElement("button",i({ke
1y:n,className:t.className},t,{onClick:function(n){return e.handleClickButton(t)}}),t.label)})))))}}]),t}(l.Component),s.propTypes={title:c.default.string,message:c.default.string,buttons:c.default.array.isRequired,childrenElement:c.default.func,customUI:c.default.func,closeOnClickOutside:c.default.bool,closeOnEscape:c.default.bool,keyCodeForClose:c.default.arrayOf(c.default.number),willUnmount:c.default.func,afterClose:c.default.func,onClickOutside:c.default.func,onKeypressEscape:c.default.func,onkeyPress:c.default.func,overlayClassName:c.default.string},s.defaultProps={buttons:[{label:"Cancel",onClick:function(){return null},className:null},{label:"Confirm",onClick:function(){return null},className:null}],childrenElement:function(){return null},closeOnClickOutside:!0,closeOnEscape:!0,keyCodeForClose:[],willUnmount:function(){return null},afterClose:function(){return null},onClickOutside:function(){return null},onKeypressEscape:function(){return null}},a),g=null,x="react-confirm-alert"}},function(e){e.O(0,[4976,5351,9603,6383,1985,9436,9400,974,1282,8422,1184,551,5052,2888,9774,179],function(){return e(e.s=83168)}),_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.