PageSourceSearch

https://xyrus.ai/_next/static/chunks/7729.33c2d99016e3ba8a.js

js xyrus.ai collected 2026-10-05 15:10:44 UTC 21,974 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7729],{15992:(e,t,s)=>{s.d(t,{A7:()=>y,DI:()=>v,Dz:()=>h,M9:()=>d,Rt:()=>o,Tm:()=>u,V_:()=>p,Wl:()=>l,bR:()=>n,cZ:()=>m,ds:()=>x,h2:()=>i,lU:()=>g,oW:()=>a,sJ:()=>f,wp:()=>c,z5:()=>r});let r="/images/icons/pencil-edit.svg",n="/images/icons/phone-icon.svg",l="/images/icons/globe-icon.svg",i="/images/icons/email-icon.svg",a="/images/icons/location-icon.svg",o="/images/icons/link-icon.svg",d="/images/icons/refresh-icon.svg",c="/images/icons/share-icon.svg",u="/images/icons/bag-icon.svg",m="/images/icons/document-icon.svg",x="/images/icons/right-arrow-icon.svg",p="/images/icons/linkedinIcon.svg",h="/images/icons/scheduled-calendar-icon.svg",v="/images/icons/placeholder-no-engagements.svg",f="/images/icons/impersonate-user-icon.svg",g="/images/icons/UserContactsExpand.svg",y="/images/client/client-information-circle.svg"},60919:(e,t,s)=>{s.d(t,{pe:()=>n});let{Axios:r,AxiosError:n,CanceledError:l,isCancel:i,CancelToken:a,VERSION:o,all:d,Cancel:c,isAxiosError:u,spread:m,toFormData:x,AxiosHeaders:p,HttpStatusCode:h,formToJSON:v,getAdapter:f,mergeConfig:g}=s(95125).A},69048:(e,t,s)=>{s.d(t,{E5:()=>g,Gg:()=>v,YP:()=>h,nJ:()=>f});var r=s(38511);let n=1024*r.F.FILE_UPLOAD.MAX_SIZE_MB*1024,l=["application/pdf","application/x-pdf"],i=["application/msword"],a=["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],o=["image/jpeg","image/jpg","image/pjpeg"],d=["image/png","image/x-png"],c=["application/vnd.ms-excel","application/msexcel","application/x-msexcel","application/x-ms-excel"],u=["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],m=["text/plain"],x={DOCUMENTS:{extensions:[".pdf",".doc",".docx"],mimeTypes:[...l,...i,...a],label:"PDF, DOC, DOCX"},IMAGES:{extensions:[".jpg",".jpeg",".png"],mimeTypes:[...o,...d],label:"JPG, JPEG, PNG"},EXCEL:{extensions:[".xlsx",".xls"],mimeTypes:[...u,...c],label:"XLSX, XLS"},TRANSCRIPTS:{extensions:[".pdf",".docx",".txt"],mimeTypes:[...l,...a,...m],label:"PDF, DOCX, TXT"}},p=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return t.flat().join(",")},h={DOCUMENTS:p(l,i,a),IMAGES:p(o,d),EXCEL:p(u,c),TRANSCRIPTS:p(l,a,m)},v=e=>{if(!e)return{isValid:!1,errorMessage:"No file selected"};let t=e.size/1048576;return e.size>n?{isValid:!1,errorMessage:"File size exceeds the maximum limit of ".concat(r.F.FILE_UPLOAD.MAX_SIZE_MB,"MB. Current size: ").concat(t.toFixed(2),"MB"),fileSizeInMB:t}:{isValid:!0,fileSizeInMB:t}},f=(e,t)=>{if(!e)return{isValid:!1,errorMessage:"No file selected"};let s=((e,t)=>{if(!e)return{isValid:!1,errorMessage:"No file selected"};let s=[],r=[];return(t.forEach(e=>{let t=x[e];s.push(...t.mimeTypes),r.push(t.label)}),s.includes(e.type))?{isValid:!0}:{isValid:!1,errorMessage:"Invalid file format. Only ".concat(r.join(", ")," files are allowed. Selected file type: ").concat(e.type||"unknown")}})(e,t);if(!s.isValid)return s;let r=v(e);return!r.isValid,r},g=()=>"".concat(r.F.FILE_UPLOAD.MAX_SIZE_MB," MB")},73952:(e,t,s)=>{s.d(t,{X:()=>n});var r=s(12115);function n(e){let{onLoadMore:t,hasMore:s,isLoading:n,threshold:l=100,debounceMs:i=100}=e,a=(0,r.useRef)(null),o=(0,r.useRef)(null),d=(0,r.useRef)(null),c=(0,r.useCallback)(e=>{let r=e[0];r&&r.isIntersecting&&s&&!n&&(d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{t()},i))},[t,s,n,i]);return(0,r.useEffect)(()=>{let e=o.current;if(e)return a.current=new IntersectionObserver(c,{root:null,rootMargin:"0px 0px ".concat(l,"px 0px"),threshold:.1}),a.current.observe(e),()=>{a.current&&a.current.disconnect(),d.current&&clearTimeout(d.current)}},[l,s,n,i,c]),o}},87419:(e,t,s)=>{s.r(t),s.d(t,{default:()=>w});var r=s(95155),n=s(12115),l=s(18720),i=s(41180),a=s(27638),o=s(69048),d=s(65229),c=s(24033),u=s(87133),m=s(97450),x=s(15992),p=s(28990),h=s(97610);function v(e){let{formData:t,allowTypes:s,errors:i,isSubmitting:a,onFileChange:v,onDocumentTypeChange:f,onSave:g,onCancel:y,isUploadingDocument:b=!1,isRemovingDocument:j=!1}=e,N=(0,n.useRef)(null),[T,w]=(0,n.useState)(!1),[D,E]=(0,n.useState)(!1);return(0,r.jsxs)("div",{className:"h-full flex flex-col","data-testid":"documents-form",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between py-3",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-card-foreground",children:"Add Document"}),(0,r.jsx)("button",{onClick:y,className:"p-2 rounded-lg cursor-pointer","data-testid":"close-documents-form",children:(0,r.jsx)(d.A,{className:"h-4 w-4 text-icon-primary"})})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto py-3",children:(0,r.jsxs)("div",{className:"space-y-6 px-0",children:[s?(0,r.jsxs)("div",{className:"space-y-2","data-error":!!i.documentType,children:[(0,r.jsx)(u.JU,{htmlFor:"documentType",className:"text-s font-semibold",style:{color:"var(--color-foreground)"},children:"Document Type *"}),(0,r.jsxs)(m.AM,{open:D,onOpenChange:E,children:[(0,r.jsx)(m.Wv,{asChild:!0,children:(0,r.jsxs)("button",{type:"button",className:"bg-white flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none md:text-sm focus-visible:border-brand-primary focus-visible:ring-brand-primary/50 focus-visible:ring-[3px] ".concat(i.documentType?"aria-invalid:ring-error-solid/20 dark:aria-invalid:ring-error-solid/40 aria-invalid:border-error-solid":"border-text-stroke"," items-center justify-between cursor-pointer"),"data-testid":"document-type-select",children:[(0,r.jsx)("span",{className:"text-left",children:t.documentType?h.Vt[t.documentType]:"Select"}),(0,r.jsx)(c.A,{className:"h-4 w-4 opacity-50"})]})}),(0,r.jsx)(m.hl,{className:"p-0 bg-white z-[10000]",align:"start",sideOffset:4,style:{width:"var(--radix-popover-trigger-width)"},children:(0,r.jsx)("div",{className:"max-h-60 overflow-y-auto",children:Object.entries(h.eR).map(e=>{let[,t]=e;return(0,r.jsx)("div",{className:"px-3 py-2 hover:bg-[var(--color-text-stroke)] cursor-pointer",onClick:()=>{f(t),E(!1)},children:(0,r.jsx)("span",{children:h.Vt[t]})},t)})})})]}),i.documentType&&(0,r.jsx)("p",{className:"text-xs text-error-solid","data-testid":"document-type-error",children:i.documentType})]}):null,(0,r.jsxs)("div",{className:"space-y-2","data-error":!!i.file,children:[(0,r.jsx)(u.JU,{className:"text-s font-semibold",style:{color:"var(--color-foreground)"},children:"Upload File *"}),(0,r.jsxs)("div",{className:"border-2 border-dashed rounded-lg p-6 text-center cursor-pointer transition-colors bg-bg-nav ".concat(i.file?"border-error-solid bg-error-bg":T?"border-brand-primary bg-brand-primary/5":"border-text-stroke hover:border-brand-primary"),onClick:()=>{var e;null==(e=N.current)||e.click()},onDrop:e=>{var t;e.preventDefault(),w(!1);let s=(null==(t=e.dataTransfer.files)?void 0:t[0])||null;if(s){let e=(0,o.nJ)(s,["DOCUMENTS"]);if(!e.isValid)return void l.oR.error("Invalid File",{description:e.errorMessage});v(s)}},onDragOver:e=>{e.preventDefault(),w(!0)},onDragLeave:e=>{e.preventDefault(),w(!1)},"data-testid":"file-upload-area",children:[(0,r.jsx)("input",{ref:N,type:"file",accept:o.YP.DOCUMENTS,onChange:e=>{var t;let s=(null==(t=e.target.files)?void 0:t[0])||null;if(s){let t=(0,o.nJ)(s,["DOCUMENTS"]);if(!t.isValid){e.target&&(e.target.value=""),l.oR.error("Invalid File",{description:t.errorMessage});return}}v(s)},className:"hidden","data-testid":"file-input"}),t.file?(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(p.A,{icon:"".concat(x.cZ,"#document_icon"),width:24,height:24,color:"var(--color-icon-primary)"}),(0,r.jsx)("div",{className:"text-sm font-medium text-text-primary",children:t.file.name}),(0,r.jsxs)("div",{className:"text-xs text-text-secondary",children:[(t.file.size/1024/1024).toFixed(2)," MB"]})]}):(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(p.A,{icon:"".concat(x.cZ,"#document_icon"),width:24,height:24,color:"var(--color-icon-primary)"}),(0,r.jsx)("div",{className:"text-sm font-medium text-text-primary",children:"Upload"}),(0,r.jsx)("div",{className:"text-xs text-text-secondary",children:"PDF, Doc formats are supported"})]})]}),i.file&&(0,r.jsx)("p",{className:"text-xs text-error-solid","data-testid":"file-error",children:i.file}),(0,r.jsxs)("p",{className:"text-xs text-text-secondary mt-1",children:["Maximum file size: ",(0,o.E5)()]})]})]})}),(0,r.jsxs)("div",{className:"flex gap-3 justify-start",children:[(0,r.jsx)(u.$
1n,{onClick:()=>{g()},variant:"primary",size:"md",disabled:a||b||j,dataTestId:"save-document-button",children:a||b?"Uploading...":"Save"}),(0,r.jsx)(u.$n,{onClick:y,variant:"outline",size:"md",disabled:a||b||j,dataTestId:"cancel-document-button",children:"Cancel"})]})]})}var f=s(35299),g=s(27992),y=s(30482),b=s(73952),j=s(75557),N=s(71761);function T(e){let{documents:t,simpleDocuments:s,onAdd:n,onRemove:l,onClose:i,isRemovingDocument:a,finalMode:o,allowTypes:c=!0,aiFieldsMetaData:u,onLoadMore:m,hasMore:v,isLoadingMore:T}=e,w=(0,b.X)({onLoadMore:()=>m&&!c&&m(),hasMore:!c&&!!v,isLoading:!!T,threshold:200,debounceMs:150}),D=e=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(p.A,{icon:"".concat(x.cZ,"#document_icon"),width:24,height:24,color:"var(--color-icon-primary)"}),(0,r.jsx)("span",{children:e})]}),E=e=>{try{return(0,y.GP)(new Date(e),"MMM dd, yyyy")}catch(t){return e}};return(0,r.jsxs)("div",{className:"h-full flex flex-col relative","data-testid":"documents-list",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between shrink-0",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-card-foreground",children:"add"===o?"Add Document":"Documents"}),(0,r.jsx)("button",{onClick:i,className:"p-2 rounded-lg cursor-pointer","data-testid":"close-documents-modal",children:(0,r.jsx)(d.A,{className:"h-4 w-4 text-icon-primary"})})]}),(0,r.jsx)("div",{className:"flex-1 overflow-y-auto py-3 min-h-0 pr-3",children:(0,r.jsxs)("div",{className:"space-y-4 px-0",children:[(0,r.jsx)("div",{className:"text-left",children:(0,r.jsx)("button",{onClick:n,className:"text-sm text-card-foreground hover:text-card-foreground/80 font-medium cursor-pointer flex items-center gap-1","data-testid":"add-new-document",children:"+ Add new"})}),(0,r.jsx)("div",{children:c?(()=>{if(!t)return(0,r.jsx)("div",{className:"text-center py-8 text-gray-500 text-sm bg-gray-50 rounded-lg",children:"No documents available"});let e=t.resume.length>0?t.resume.reduce((e,t)=>new Date(t.uploadedAt)>new Date(e.uploadedAt)?t:e).id:null;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g.default,{title:D("Resume (".concat(t.resume.length,")")),isExpanded:!0,showPlusIcon:!1,dataTestId:"resume-section",variant:"card",className:"bg-bg-card",children:t.resume.length>0?(0,r.jsx)("div",{className:"space-y-2",children:t.resume.map(t=>{var s;return(0,r.jsxs)("div",{className:"flex items-center justify-between py-2 px-3 hover:bg-gray-50 rounded-lg","data-testid":"resume-document-".concat(t.id),children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 flex-1",children:[(0,r.jsx)("button",{onClick:()=>l(t.id,h.KG.RESUME),className:"p-1 hover:bg-gray-200 rounded cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed","data-testid":"remove-resume-".concat(t.id),disabled:a,children:(0,r.jsx)(d.A,{className:"h-3 w-3 text-gray-500"})}),(0,r.jsxs)("span",{className:"text-sm text-text-placeholder hover:text-text-primary cursor-pointer",children:[e&&t.id===e&&(null==u||null==(s=u.resume)?void 0:s.is_ai_generated)?(0,r.jsx)("div",{className:"flex items-center gap-2 text-xs -ml-2 mb-0.5",children:(0,r.jsx)(N.A,{showBackground:!1,showTooltip:!1,text:"AI reviewed"})}):null,t.url?(0,r.jsx)("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:t.name}):t.name]})]}),(0,r.jsx)("span",{className:"text-xs text-secondary-text",children:(0,j.r6)(t.uploadedAt)})]},t.id)})}):(0,r.jsx)("div",{className:"text-center py-4 text-gray-500 text-sm",children:"No resume documents"})}),(0,r.jsx)(g.default,{title:D("Cover Letter (".concat(t.cvletter.length,")")),isExpanded:!1,showPlusIcon:!1,dataTestId:"cover-letter-section",variant:"card",className:"bg-bg-card",children:t.cvletter.length>0?(0,r.jsx)("div",{className:"space-y-2",children:t.cvletter.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-between py-2 px-3 hover:bg-gray-50 rounded-lg","data-testid":"cv-letter-document-".concat(e.id),children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 flex-1",children:[(0,r.jsx)("button",{onClick:()=>
1l(e.id,h.KG.COVER_LETTER),className:"p-1 hover:bg-gray-200 rounded cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed","data-testid":"remove-cv-letter-".concat(e.id),disabled:a,children:(0,r.jsx)(d.A,{className:"h-3 w-3 text-gray-500"})}),(0,r.jsx)("span",{className:"text-sm text-text-placeholder hover:text-text-primary cursor-pointer",children:e.url?(0,r.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:e.name}):e.name})]}),(0,r.jsx)("span",{className:"text-xs text-secondary-text",children:E(e.uploadedAt)})]},e.id))}):(0,r.jsx)("div",{className:"text-center py-4 text-gray-500 text-sm",children:"No cover letter documents"})}),(0,r.jsx)(g.default,{title:D("Other Docs (".concat(t.others.length,")")),isExpanded:!1,showPlusIcon:!1,dataTestId:"other-docs-section",variant:"card",className:"bg-bg-card",children:t.others.length>0?(0,r.jsx)("div",{className:"space-y-2",children:t.others.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-between py-2 px-3 hover:bg-gray-50 rounded-lg","data-testid":"other-document-".concat(e.id),children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 flex-1",children:[(0,r.jsx)("button",{onClick:()=>l(e.id,h.KG.OTHER),className:"p-1 hover:bg-gray-200 rounded cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed","data-testid":"remove-other-".concat(e.id),disabled:a,children:(0,r.jsx)(d.A,{className:"h-3 w-3 text-gray-500"})}),(0,r.jsx)("span",{className:"text-sm text-text-placeholder hover:text-text-primary cursor-pointer",children:e.url?(0,r.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:e.name}):e.name})]}),(0,r.jsx)("span",{className:"text-xs text-secondary-text",children:E(e.uploadedAt)})]},e.id))}):(0,r.jsx)("div",{className:"text-center py-4 text-gray-500 text-sm",children:"No other documents"})})]})})():s&&0!==s.length?(0,r.jsxs)("div",{className:"space-y-3",children:[s.map(e=>(0,r.jsx)("div",{className:"bg-gray-50 hover:bg-gray-100 rounded-lg p-3 border border-text-stroke transition-colors duration-200 cursor-pointer","data-testid":"simple-document-".concat(e.id),children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 flex-1",children:[(0,r.jsx)(p.A,{icon:"/DocumentWithPin.svg",className:"h-10"}),(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("span",{className:"text-base font-semibold text-gray-800",children:e.url?(0,r.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:e.name}):e.name}),(0,r.jsxs)("span",{className:"text-xs text-gray-500",children:["Uploaded On: ",E(e.uploadedAt)||"N/A"]})]})]}),(0,r.jsx)("button",{onClick:()=>l(e.id,h.KG.OTHER),className:"p-1 hover:bg-gray-200 rounded cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-colors duration-200","data-testid":"remove-simple-".concat(e.id),disabled:a,children:(0,r.jsx)(d.A,{className:"h-4 w-4 text-gray-600"})})]})},e.id)),(0,r.jsx)("div",{ref:w}),T&&(0,r.jsx)("div",{className:"flex items-center justify-center py-3",children:(0,r.jsx)(f.A,{className:"h-4 w-4 animate-spin text-brand-primary"})})]}):(0,r.jsx)("div",{className:"text-center py-8 text-gray-500 text-sm bg-gray-50 rounded-lg",children:"No documents uploaded yet"})})]})})]})}function w(e){var t,s,d,c;let{data:u,mode:m="list"}=e,x=null!==u&&"object"==typeof u&&"documents"in u&&"object"==typeof u.documents&&null!==u.documents&&("resume"in u.documents||"cvletter"in u.documents||"others"in u.documents)?u:void 0,p=null!==u&&"object"==typeof u&&"documents"in u&&Array.isArray(u.documents)?u:void 0,h=null==u?void 0:u.deletedDocumentIds,f=null==(t=null==u?void 0:u.allowTypes)||t,g=null==u?void 0:u.uploadDocument,y=null==u?void 0:u.removeDocument,b=null!=(s=null==u?void 0:u.loadMoreDocuments)?s:()=>{},j=null!=(d=null==u?void 0:u.hasMoreDocuments)&&d,N=null!=(c=null==u?void 0:u.isLoadingMoreDocuments)&&c,{documents:w,simpleDocuments:D,aiFieldsMetaData:E,isEditing:M,editingIndex:C,formData:S,errors:A,isUploadingDocument:R,isRemovingDocument:I,allowTypes:O,handleAdd:k,handleCancel:F,handleFileChange:L,handleDocumentTypeChange:_,handleSave:P,handleRemoveClick:U}=function(){var e;let{uploadDocument:t,removeDocument:s,data:r,allowTypes:d=!0,showLoading:c}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
1,u=null!=(e=null==r?void 0:r.allowTypes)?e:d,[m,x]=(0,n.useState)({resume:[],cvletter:[],others:[]}),[p,h]=(0,n.useState)([]),[v,f]=(0,n.useState)(void 0);(0,n.useEffect)(()=>{var e,t,s,n,l,i,a;if(null!==r&&"object"==typeof r&&"documents"in r&&"object"==typeof r.documents&&null!==r.documents&&("resume"in r.documents||"cvletter"in r.documents||"others"in r.documents)){let a=r.deletedDocumentIds;x({resume:(null!=(n=null==(e=r.documents)?void 0:e.resume)?n:[]).filter(e=>!(null==a?void 0:a.has(e.id))),cvletter:(null!=(l=null==(t=r.documents)?void 0:t.cvletter)?l:[]).filter(e=>!(null==a?void 0:a.has(e.id))),others:(null!=(i=null==(s=r.documents)?void 0:s.others)?i:[]).filter(e=>!(null==a?void 0:a.has(e.id)))}),f(null==r?void 0:r.aiFieldsMetaData)}else if(null!==r&&"object"==typeof r&&"documents"in r&&Array.isArray(r.documents)){let e=r.deletedDocumentIds;h((null!=(a=r.documents)?a:[]).filter(t=>!(null==e?void 0:e.has(t.id))))}},[null==r?void 0:r.documents,(null==r?void 0:r.deletedDocumentIds)?Array.from(r.deletedDocumentIds).join(","):"",d,u]),(0,n.useEffect)(()=>{let e=a.cJ.subscribe(e=>{if(e&&"object"==typeof e&&"resume"in e&&"cvletter"in e&&"others"in e){let t={resume:e.resume||[],cvletter:e.cvletter||[],others:e.others||[]};x(e=>JSON.stringify(e.resume)!==JSON.stringify(t.resume)||JSON.stringify(e.cvletter)!==JSON.stringify(t.cvletter)||JSON.stringify(e.others)!==JSON.stringify(t.others)?t:e),void 0!==e.aiFieldsMetaData&&f(e.aiFieldsMetaData)}});return()=>e.unsubscribe()},[m]),(0,n.useEffect)(()=>{let e=a.zb.subscribe(e=>{x(t=>({resume:t.resume.filter(t=>t.id!==e),cvletter:t.cvletter.filter(t=>t.id!==e),others:t.others.filter(t=>t.id!==e)})),h(t=>t.filter(t=>t.id!==e))});return()=>e.unsubscribe()},[]);let[g,y]=(0,n.useState)(!1),[b,j]=(0,n.useState)(null),[N,T]=(0,n.use
1State)({file:null,documentType:""}),[w,D]=(0,n.useState)({}),[E,M]=(0,n.useState)(!1),[C,S]=(0,n.useState)(!1),A=async()=>{if((()=>{let e={};if(N.file){let t=(0,o.nJ)(N.file,["DOCUMENTS"]);t.isValid||(e.file=t.errorMessage||"Invalid file")}else e.file="File is required";return u&&!N.documentType&&(e.documentType="Document type is required"),D(e),0===Object.keys(e).length})()){if(!t||!N.file||u&&!N.documentType){y(!1),j(null),T({file:null,documentType:""}),D({});return}try{M(!0),null==c||c(!0,"Uploading document..."),await t({file:N.file,documentType:u?N.documentType:"OTHER"}),l.oR.success("Document Uploaded",{description:"Document has been uploaded successfully"}),y(!1),j(null),T({file:null,documentType:""}),D({})}catch(e){D({general:"Failed to save document. Please try again."})}finally{M(!1),null==c||c(!1)}}};return{documents:u?m:void 0,simpleDocuments:u?void 0:p,aiFieldsMetaData:u?v:void 0,isEditing:g,editingIndex:b,formData:N,errors:w,isUploadingDocument:E,isRemovingDocument:C,allowTypes:u,handleAdd:()=>{y(!0),j(null),T({file:null,documentType:""}),D({})},handleCancel:()=>{y(!1),j(null),T({file:null,documentType:""}),D({})},handleFileChange:e=>{if(w.file&&D(e=>({...e,file:""})),e){let t=(0,o.nJ)(e,["DOCUMENTS"]);if(!t.isValid){D(e=>({...e,file:t.errorMessage||"Invalid file"})),T(e=>({...e,file:null}));return}}T(t=>({...t,file:e}))},handleDocumentTypeChange:e=>{T(t=>({...t,documentType:e})),w.documentType&&D(e=>({...e,documentType:""}))},handleSave:A,handleRemoveClick:(e,t)=>{i.Lx.openDialog("confirmation",{title:"Delete Document",data:{message:"Are you sure you want to delete this document? This action cannot be undone.",confirmText:"Delete",cancelText:"Cancel",onConfirm:async()=>{if(s)try{S(!0),null==c||c(!0,"Removing document..."),await s({documentId:e,documentType:t}),a.zb.next(e),l.oR.success("Document Removed",{description:"Document has been removed successfully"})}catch(t){let e=t instanceof Error?t.message:"Failed to remove document";l.oR.error("Remove Failed",{description:e})}finally{S(!1),null==c||c(!1)}}}})}}}({initialMode:m,...g&&{uploadDocument:g},...y&&{removeDocument:y},...x&&{data:{...x,deletedDocumentIds:h||new Set}},...p&&{data:{...p,deletedDocumentIds:h||new Set}},allowTypes:f,...(null==u?void 0:u.showLoading)&&{showLoading:u.showLoading}});return M?(0,r.jsx)(v,{editingIndex:C,formData:S,errors:A,isSubmitting:!1,onFileChange:L,onDocumentTypeChange:_,onSave:P,onCancel:F,isUploadingDocument:R,isRemovingDocument:I,allowTypes:O}):(0,r.jsx)(T,{documents:O?w:void 0,simpleDocuments:O?void 0:D,onAdd:k,onRemove:U,onClose:()=>{var e;return null==u||null==(e=u.closeModal)?void 0:e.call(u)},isRemovingDocument:I,finalMode:m,allowTypes:O,...null!=E?{aiFieldsMetaData:E}:{},onLoadMore:b,hasMore:j,isLoadingMore:N})}},97610:(e,t,s)=>{s.d(t,{KG:()=>r,Lq:()=>i,Vt:()=>l,eR:()=>n,mW:()=>a});var r=function(e){return e.RESUME="resume",e.COVER_LETTER="cvletter",e.OTHER="others",e}({});let n={RESUME:"resume",COVER_LETTER:"cvletter",OTHER:"others"},l={resume:"Resume",cvletter:"Cover Letter",others:"Other"};var i=function(e){return e.PENDING="Pending",e.IN_PROGRESS="In progress",e.COMPLETED="Completed",e}({});let a={Pending:"Not Started","In progress":"In progress",Completed:"Completed"}}}]);

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.