PageSourceSearch

https://www.connectupskill.com/_next/static/chunks/pages/candidate…/search/[query]-2eb2dfc977260848.js

js connectupskill.com collected 2026-10-04 04:16:13 UTC 10,269 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4414],{66242:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/candidate-discovery/search/[query]",function(){return r(78730)}])},78730:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return SearchPage}});var i=r(85893),n=r(11163),s=r(64761),a=r(97564),o=r(96768),l=r(74403),c=r(95117),d=r(67841),h=r(64523),u=r(72445),m=r(17010),x=r(34065),p=r(97307),g=r(40743),v=r(67294),j=r(58959),w=r(74922);let f=(0,v.createContext)(null),useWebsetPreview=()=>{let e=(0,v.useContext)(f);if(!e)throw Error("useWebsetPreview must be used within a WebsetPreviewProvider");return e},WebsetPreviewProvider=e=>{let{children:t,query:r}=e,s=(0,n.useRouter)(),[a,o]=(0,v.useState)(r),[l,c]=(0,v.useState)([]),[d,h]=(0,v.useState)([]),[u,m]=(0,v.useState)([]),[x,p]=(0,v.useState)(0),[g,b]=(0,v.useState)(!0),[C,y]=(0,v.useState)(!1),[k,S]=(0,v.useState)(5),P=(0,v.useRef)(null),z=j.h.candidateDiscovery.previewWebSet.useMutation({onSuccess:e=>{let t=e.criteria.map((e,t)=>({id:"criteria-".concat(t,"-").concat(Date.now()),description:"string"==typeof e?e:e.description}));c(t);let r=e.enrichments.map(e=>{var t,r,i;return{id:null!==(t=e.id)&&void 0!==t?t:"enrichment-".concat(Date.now()),description:null!==(i=null!==(r=e.description)&&void 0!==r?r:e.title)&&void 0!==i?i:"",format:"text"}});h(r),e.items&&(m(e.items),p(e.totalItems||e.items.length)),b(!1)},onError:e=>{console.error("Failed to preview webset:",e),w.N9.show({title:"Preview Failed",message:e.message||"Failed to generate preview",color:"red"}),b(!1)}}),F=j.h.candidateDiscovery.saveSearchRequest.useMutation({onSuccess:e=>{s.push("/candidate-discovery/search/queue/".concat(e.id))},onError:e=>{console.error("Failed to save search request:",e),w.N9.show({title:"Error",message:e.message||"Failed to save search request",color:"red"}),y(!1)}});(0,v.useEffect)(()=>(P.current&&clearTimeout(P.current),a&&a.trim()&&(P.current=setTimeout(()=>{b(!0),z.mutate({query:a.trim()})},1e3)),()=>{P.current&&clearTimeout(P.current)}),[a]);let R=(0,v.useCallback)(e=>{o(e),e&&e.trim()&&s.replace("/candidate-discovery/search/".concat(encodeURIComponent(e.trim())),void 0,{shallow:!0})},[s]),E=(0,v.useCallback)(e=>{S(e)},[]),W=(0,v.useCallback)(e=>{let t={id:"criteria-".concat(Date.now()),description:e};c(e=>[...e,t])},[]),_=(0,v.useCallback)(e=>{c(t=>t.filter(t=>t.id!==e))},[]),A=(0,v.useCallback)((e,t)=>{c(r=>r.map(r=>r.id===e?{...r,description:t}:r))},[]),N=(0,v.useCallback)(e=>{c(e)},[]),K=(0,v.useCallback)(e=>{let t={...e,id:"enrichment-".concat(Date.now())};h(e=>[...e,t])},[]),T=(0,v.useCallback)(e=>{h(t=>t.filter(t=>t.id!==e))},[]),D=(0,v.useCallback)((e,t)=>{h(r=>r.map(r=>r.id===e?{...r,...t}:r))},[]),q=(0,v.useCallback)(e=>{h(e)},[]),I=(0,v.useCallback)(()=>{y(!0);let e=l.map(e=>({description:e.description,successRate:80})),t=d.filter(e=>e.description&&e.description.trim().length>0).map(e=>({description:e.description,format:e.format,options:e.options}));F.mutate({query:a,criteria:e,enrichments:t,count:k})},[a,l,d,k,F]),U=(0,v.useMemo)(()=>({query:a,criteria:l,enrichments:d,previewItems:u,isLoadingPreview:g,isConfirmingSearch:C,totalPreviewItems:x,count:k,updateQuery:R,updateCount:E,updateCriteria:N,addCriterion:W,removeCriterion:_,updateCriterion:A,updateEnrichments:q,addEnrichment:K,removeEnrichment:T,updateEnrichment:D,confirmSearch:I}),[a,l,d,u,g,C,x,k,R,E,N,W,_,A,q,K,T,D,I]);return(0,i.jsx)(f.Provider,{value:U,children:t})};var b=r(66431),C=r(82623),y=r(52615),k=r(71232),S=r(49834),P=r(1177),z=r(75274),F=r(57595);let CriteriaPreviewForm=()=>{let{query:e,criteria:t,updateQuery:r,addCriterion:n,removeCriterion:s,updateCriterion:l,isLoadingPreview:d}=useWebsetPreview(),[u,m]=(0,v.useState)(null),[x,p]=(0,v.useState)(e);(0,v.useEffect)(()=>{p(e)},[e]);let handleUpdateCriterion=(e,r)=>{let i=t[e];i&&l(i.id,r),m(null)},handleRemoveCriterion=e=>{let r=t[e];r&&s(r.id)};return(0,i.jsx)(C.X,{p:(0,o.h)(16),radius:"md",withBorder:!0,style:{background:"rgba(255,255,255,0.95)"},children:(0,i.jsxs)(a.K,{spacing:(0,o.h)(12),children:[(0,i.jsx)(y.g,{placeholder:"Describe who you want to find...",size:"sm",radiu
1s:"md",minRows:2,maxRows:4,autosize:!0,value:x,onChange:e=>{let t=e.currentTarget.value;p(t),r(t)}}),(0,i.jsxs)(h.x,{mb:(0,o.h)(8),mt:(0,o.h)(8),children:[(0,i.jsxs)(k.Z,{position:"apart",mb:(0,o.h)(12),noWrap:!0,align:"start",children:[(0,i.jsxs)(a.K,{spacing:0,align:"flex-start",children:[(0,i.jsx)(c.x,{fw:600,size:"sm",children:"Criteria"}),(0,i.jsx)(c.x,{size:"xs",c:"dimmed",children:"Filter for candidates that match this criteria"})]}),!d&&(0,i.jsx)(S.A,{variant:"light",color:"blue",onClick:()=>{let e=t.length;n(""),m(e)},style:{marginTop:(0,o.h)(8)},children:(0,i.jsx)(P.Z,{size:16})})]}),(0,i.jsx)(a.K,{spacing:(0,o.h)(12),align:"flex-start",children:d?Array.from({length:Math.max(t.length,1)}).map((e,t)=>(0,i.jsx)(F.y,{},"skeleton-".concat(t))):(0,i.jsxs)(i.Fragment,{children:[t.map((e,t)=>(0,i.jsx)(z.J,{criterion:e.description,index:t,onUpdate:handleUpdateCriterion,onRemove:handleRemoveCriterion,autoFocus:u===t},e.id)),0===t.length&&(0,i.jsx)(c.x,{size:"sm",c:"dimmed",ta:"center",py:(0,o.h)(20),children:'No criteria added yet. Click "Add Criterion" to get started.'})]})})]})]})})};var R=r(97549),E=r(56162);let FieldsPreviewForm=()=>{let{enrichments:e,addEnrichment:t,removeEnrichment:r,updateEnrichment:n,isLoadingPreview:s}=useWebsetPreview(),[l,d]=(0,v.useState)(!1),handleAddEnrichment=e=>{t(e),d(!1)},handleUpdateEnrichment=(e,t)=>{n(t.id,{description:t.description,format:t.format,options:t.options})};return(0,i.jsx)(C.X,{p:(0,o.h)(16),radius:"md",withBorder:!0,style:{background:"rgba(255,255,255,0.95)"},children:(0,i.jsxs)(a.K,{spacing:(0,o.h)(12),children:[(0,i.jsxs)(k.Z,{position:"apart",mb:(0,o.h)(12),noWrap:!0,align:"start",children:[(0,i.jsxs)(a.K,{spacing:0,align:"flex-start",children:[(0,i.jsx)(c.x,{fw:600,size:"sm",children:"Data Enrichment"}),(0,i.jsx)(c.x,{size:"xs",c:"dimmed",ta:"left",children:"Find information you want to know about each candidate"})]}),!l&&!s&&(0,i.jsx)(S.A,{variant:"light",color:"blue",onClick:()=>d(!0),style:{marginTop:(0,o.h)(8)},children:(0,i.jsx)(P.Z,{size:16})})]}),(0,i.jsx)(a.K,{spacing:(0,o.h)(8),children:s?Array.from({length:Math.max(e.length,1)}).map((e,t)=>(0,i.jsx)(E.m,{},"skeleton-".concat(t))):(0,i.jsxs)(i.Fragment,{children:[e.map((e,t)=>(0,i.jsx)(R.c,{enrichment:e,index:t,onUpdate:handleUpdateEnrichment,onRemove:()=>r(e.id)},e.id)),l&&(0,i.jsx)(h.x,{children:(0,i.jsx)(R.c,{enrichment:{id:"new-enrichment",description:"",format:"text",options:void 0},index:e.length,onUpdate:(e,t)=>{t.description.trim()&&handleAddEnrichment({description:t.description,format:t.format,options:t.options})},onRemove:()=>d(!1),autoFocus:!0})}),0===e.length&&!l&&(0,i.jsxs)(c.x,{size:"sm",c:"dimmed",ta:"center",py:(0,o.h)(20),children:["No additional fields yet."," ",(0,i.jsx)(c.x,{component:"span",c:"primary",style:{cursor:"pointer"},onClick:()=>d(!0),children:"Add one"})," ","to collect more information."]})]})})]})})};var W=r(89814),_=r(80061),A=r(11864);let AmountPreviewForm=()=>{let{updateCount:e,isConfirmingSearch:t}=useWebsetPreview(),[r,n]=(0,v.useState)(null),[s,l]=(0,v.useState)(""),handlePresetAmountClick=t=>{n(t),e(t)},handleCustomInputChange=t=>{l(t);let r=parseInt(t,10);!isNaN(r)&&r>0&&(n(r),e(r))};return(0,i.jsx)(C.X,{p:(0,o.h)(16),radius:"md",withBorder:!0,style:{background:"rgba(255,255,255,0.95)"},children:(0,i.jsxs)(a.K,{spacing:(0,o.h)(12),children:[(0,i.jsxs)(a.K,{spacing:0,align:"flex-start",children:[(0,i.jsx)(c.x,{fw:600,size:"sm",children:"Number of Results"}),(0,i.jsx)(c.x,{size:"xs",c:"dimmed",ta:"left",children:"Default search is 5 candidates"})]}),(0,i.jsxs)(W.M,{cols:4,spacing:(0,o.h)(8),children:[A.G.map(e=>(0,i.jsx)(d.z,{variant:r===e?"filled":"outline",size:"xs",px:(0,o.h)(4),radius:"md",onClick:()=>handlePresetAmountClick(e),disabled:t,children:e},e)),(0,i.jsx)(_.o,{value:s,onChange:e=>handleCustomInputChange(e.currentTarget.value),size:"xs",radius:"md",placeholder:"Custom",disabled:t,type:"number",min:1,max:100,styles:{input:{textAlign:"center",fontWeight:500}}})]})]})})};var N=r(25903);function SearchPreviewContent(){let{confirmSearch:e,isConfirmingSearch:t,count:r}=useWebsetPreview(),n=(0,s.rZ)(),h=(0,x.a)("(max-width: ".concat(n.breakpoints.md,")")),handleStartSearch=()=>{e()},u=h?(0,i.jsxs)(a.K,{spacing:(0,o.h)(16),children:[(0,i.jsx)(l.b,{icon:(0,i.jsx)(m.Z,{size:16}),color:"blue",radius:"md",children:(0,i.jsx)(c.x,{size:"sm",children:"Review your search criteria using the panel on the right. Start the search when you're ready."})}),(0,i.jsx)(CriteriaPreviewForm,{}),(0,i.jsx)(FieldsPreviewForm,{}),(0,i.jsx)(AmountPreviewForm,{}),(0,i.jsx)(d.z,{size:"md",radius:"md",loading:t,fullWidth:!0,disabled:t||r<=0,onClick:()=>void handleStartSearch(),variant:"filled",color:"blue",children:"Start Search"})]}):(0,i.jsxs)(a.K,{spacing:(0,o.h)(12),children:[(0,i.jsx)(l.b,{icon:(0,i.jsx)(m.Z,{size:16}),color:"blue",radius:"md",children:(0,i.jsx)(c.x,{size:"sm",children:"Review your search criteria using the panel on the right. Start the search when you're ready."})}),(0,i.jsx)(N.I,{animated:!1}),(0,i.jsx)(N.I,{animated:!1}),(0,i.jsx)(N.I,{animated:!1})]}),p=(0,i.jsxs)(a.K,{spacing:(0,o.h)(16),children:[(0,i.jsx)(CriteriaPreviewForm,{}),(0,i.jsx)(FieldsPreviewForm,{}),(0,i.jsx)(AmountPreviewForm,{}),(0,i.jsx)(d.z,{size:"md",radius:"md",loading:t,fullWidth:!0,disabled:t||r<=0,onClick:()=>void handleStartSearch(),variant:"filled",color:"blue",children:"Start Search"})]});return(0,i.jsx)(b._,{resultsBar:null,resultsContent:u,rightPanel:p})}function SearchPage(){let e=(0,n.useRouter)(),{query:t}=e.query;return e.isReady&&t&&"string"==typeof t?(0,i.jsx)(p.R,{userType:g.F.RECRUITER,logoHref:"/candidate-discovery",isCandidateDiscovery:!0,children:(0,i.jsx)(h.x,{style:{minHeight:"100%",background:"url(/landing/Hero_blank_3.png) center / cover no-repeat"},children:(0,i.jsx)(u.W,{size:"xl",py:(0,o.h)(20),children:(0,i.jsx)(WebsetPreviewProvider,{query:t,children:(0,i.jsx)(SearchPreviewContent,{})})})})}):null}}},function(e){e.O(0,[4871,5675,750,9117,2424,8908,5664,3754,353,2928,4617,7307,8315,9774,2888,179],function(){return e(e.s=66242)}),_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.