1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,367428,442551,935586,e=>{"use strict";var a=e.i(843476),t=e.i(271645),r=e.i(607486),l=e.i(643531),i=e.i(520958),n=e.i(629377),o=e.i(16715),s=e.i(37727),c=e.i(581949),d=e.i(295903);let m=d.CHATSERVER_BASE_URL,p=["builtwith","wappalyzer","datanyze_tech","stackshare","hginsights","slintel","enlyft","bombora"],h=()=>{try{let e=localStorage.getItem("parsedProfileAttributes"),a=e?JSON.parse(e):null,t=a?.api_keys;if(!t)return{};let r={};for(let e of p){let a=t[e]?.key;"string"==typeof a&&a.trim()&&(r[e]=a.trim())}let l=t.apollo_io?.key??t.apollo?.key;return"string"==typeof l&&l.trim()&&(r.apollo=l.trim()),r}catch{return{}}},u=async e=>{try{if(!e.domain)return{success:!1,domain:e.domain||"",error:"Domain is required"};let a={};e.api_keys&&Object.entries(e.api_keys).forEach(([e,t])=>{t&&"string"==typeof t&&t.trim().length>0&&(a[e]=t)});let t=e.api_order?.filter(e=>a[e]||a[`${e}_tech`]||a[e.replace("_tech","")])||[],r={domain:e.domain,...e.userId&&{userId:e.userId},...Object.keys(a).length>0&&{api_keys:a},...t.length>0&&{api_order:t}},l=`${m}/api/technographics`;return console.log("Calling backend API directly:",l),(await c.default.post(l,r,{headers:{Accept:"application/json","Content-Type":"application/json"},timeout:3e4})).data}catch(a){if(console.error("Error fetching technographic data:",a),c.default.isAxiosError(a)){if(a.response?.data)return a.response.data;return{success:!0,message:"Technographic data unavailable",domain:e.domain,data:{domain:e.domain,technologies:[],company_info:{},intent_data:{},source:"none"},source:"none",api_errors:{network:a.message||"Network error occurred"}}}return{success:!0,message:"Technographic data unavailable",domain:e.domain,data:{domain:e.domain,technologies:[],company_info:{},intent_data:{},source:"none"},source:"none",api_errors:{unknown:a instanceof Error?a.message:"Unknown error occurred"}}}},g=e=>{try{if(!e.includes("://")&&!e.startsWith("www."))return e.replace(/^www\./,"");return new URL(e.startsWith("http")?e:`https://${e}`).hostname.replace(/^www\./,"")}catch{return e.replace(/^https?:\/\//,"").replace(/^www\./,"").split("/")[0]}};e.s(["extractDomain",0,g,"getTechnographicData",0,u,"readProfileTechnographicKeys",0,h],442551);var x=e.i(546475);let f=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"");function y({domain:e,userId:o,apiKeys:c,checks:d}){let[m,p]=(0,t.useState)("loading"),[h,x]=(0,t.useState)([]),[y,b]=(0,t.useState)(null),[_,k]=(0,t.useState)(null),[v,w]=(0,t.useState)(null),[N,j]=(0,t.useState)(!1);(0,t.useEffect)(()=>{let a=!1;return p("loading"),u({domain:g(e),userId:o,...Object.keys(c).length>0?{api_keys:c}:{}}).then(e=>{a||(x((e.data?.technologies||[]).filter(e=>e&&e.name).map(e=>({name:e.name,category:e.category}))),b(e.source&&"none"!==e.source?e.source:null),k(e.data?.company_info?.name||null),w(e.success?null:e.error||e.message||"Lookup failed"),p(e.success?"done":"error"))}).catch(e=>{a||(w(e instanceof Error?e.message:"Lookup failed"),p("error"))}),()=>{a=!0}},[e,o,c]);let S=(0,t.useMemo)(()=>d.map(e=>({query:e,matched:h.filter(a=>{var t;let r,l;return t=a.name,r=f(t),l=f(e),!!r&&!!l&&(r===l||r.includes(l)||r.length>=4&&l.includes(r))})})),[d,h]),C=(0,t.useMemo)(()=>{let e=new Set;return S.forEach(a=>a.matched.forEach(a=>e.add(a.name))),e},[S]),E=(0,t.useMemo)(()=>0===C.size?h:[...h.filter(e=>C.has(e.name)),...h.filter(e=>!C.has(e.name))],[h,C]),P=N?E:E.slice(0,14);return(0,a.jsxs)("div",{className:"border border-gray-200 rounded-xl px-3.5 py-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)(r.Building2,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-800 truncate",children:g(e)}),_&&(0,a.jsxs)("span",{className:"text-xs text-gray-400 truncate",children:["· ",_]})]}),"loading"===m&&(0,a.jsx)(n.Loader2,{className:"w-3.5 h-3.5 text-gray-400 animate-spin flex-shrink-0"}),"done"===m&&y&&(0,a.jsx)("span",{className:"flex-shrink-0 text-[10px] font-semibold uppercase tracking-wide text-violet-600 bg-violet-50 border border-violet-100 rounded px-1.5 py-0.5",children:y})]}),d.length>0&&("done"===m||"error"===m)&&(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:S.map(({query:e,matched:t})=>{let r=0===h.length,n=t.length>0;return(0,a.jsxs)("span",{title:n?`Matched: ${t.map(e=>e.name).join(", ")}`:void 0,className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-md text-xs font-medium border ${r?"bg-amber-50 text-amber-700 border-amber-200":n?"bg-emerald-50 text-emerald-700 border-emerald-200":"bg-gray-50 text-gray-500 border-gray-200"}`,children:[r?(0,a.jsx)(i.HelpCircle,{className:"w-3 h-3 flex-shrink-0"}):n?(0,a.jsx)(l.Check,{className:"w-3 h-3 flex-shrink-0"}):(0,a.jsx)(s.X,{className:"w-3 h-3 flex-shrink-0"}),e,r?" · canât verify":n?t.length>1?` \xb7 ${t.length} matches`:"":" · not detected"]},e)})}),"error"===m&&(0,a.jsx)("p",{className:"mt-1.5 text-xs text-red-500",children:v}),"done"===m&&0===h.length&&(0,a.jsx)("p",{className:"mt-1.5 text-xs text-gray-400",children:"Nothing detected â the site may be unreachable, or add an Apollo / BuiltWith / Wappalyzer key in Profile â API keys for a deeper scan."}),"done"===m&&h.length>0&&(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:[P.map((e,t)=>{let r=C.has(e.name);return(0,a.jsx)("span",{title:e.category||void 0,className:`inline-flex items-center px-2 py-0.5 rounded-md text-xs ${r?"bg-violet-100 text-violet-700 font-medium ring-1 ring-violet-200":"bg-gray-100 text-gray-700"}`,children:e.name},`${e.name}-${t}`)}),E.length>14&&(0,a.jsx)("button",{type:"button",onClick:()=>j(e=>!e),className:"text-xs font-semibold text-violet-600 hover:text-violet-700",children:N?"Show less":`+${E.length-14} more`})]})]})}function b({domains:e,className:r=""}){let[l,i]=(0,t.useState)(!1),[n,c]=(0,t.useState)(0),d=(0,t.useMemo)(()=>(0,x.getUserId)(),[]),m=(0,t.useMemo)(()=>h(),[]),p=Object.keys(m).length>0,[u,g]=(0,t.useState)([]),[f,b]=(0,t.useState)(""),_=e=>{let a=e.trim().replace(/,+$/,"").trim();a&&(g(e=>e.some(e=>e.toLowerCase()===a.toLowerCase())?e:[...e,a]),b(""))};return 0===e.length?null:(0,a.jsxs)("div",{className:`space-y-3 ${r}`,children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 flex-wrap",children:[(0,a.jsx)("p",{className:"text-xs text-gray-500 max-w-md",children:p?"Uses your Apollo / BuiltWith / Wappalyzer keys, then falls back to a live-site scan (headers, cookies, page markup).":"Detects each domain's stack from its live site (headers, cookies, page markup). Add an Apollo / BuiltWith / Wappalyzer key in Profile â API keys for a deeper scan."}),(0,a.jsxs)("button",{type:"button",onClick:()=>{i(!0),c(e=>e+1)},className:"flex items-center gap-1.5 px-3 py-1.5 border border-violet-200 hover:border-violet-400 hover:bg-violet-50 text-violet-700 rounded-xl font-semibold text-xs transition-all whitespace-nowrap",children:[(0,a.jsx)(o.RefreshCw,{className:"w-3.5 h-3.5"}),l?"Refresh":`Look up ${e.length} ${1===e.length?"company":"companies"}`]})]}),(0,a.jsxs)("div",{className:"rounded-xl bg-gray-50 border border-gray-200 px-3 py-2.5 space-y-2",children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-gray-500",children:"Check for specific tech"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[u.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-vi
1olet-50 text-violet-700 border border-violet-200 text-xs font-medium",children:[e,(0,a.jsx)("button",{type:"button",onClick:()=>g(a=>a.filter(a=>a!==e)),className:"hover:text-violet-900","aria-label":`Remove ${e}`,children:(0,a.jsx)(s.X,{className:"w-3 h-3"})})]},e)),(0,a.jsx)("input",{value:f,onChange:e=>b(e.target.value),onKeyDown:e=>{("Enter"===e.key||","===e.key)&&f.trim()?(e.preventDefault(),_(f)):"Backspace"===e.key&&!f&&u.length>0&&g(e=>e.slice(0,-1))},onBlur:()=>f.trim()&&_(f),placeholder:u.length>0?"Add anotherâ¦":"e.g. Salesforce â press Enter",className:"flex-1 min-w-[180px] text-xs px-2 py-1 bg-white border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-violet-500/20 focus:border-violet-400"})]}),u.length>0&&(0,a.jsx)("p",{className:"text-[11px] text-gray-400",children:"Each company below is flagged â / â for these."})]}),l&&(0,a.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,a.jsx)(y,{domain:e,userId:d,apiKeys:m,checks:u},`${e}-${n}`))})]})}e.s(["DomainTechStackPanel",()=>b],367428);let _=async(e,a=25,t=1,r,l)=>(await c.default.post(`${d.CHATSERVER_BASE_URL}/api/find-employees`,{salesNavUrl:e,limit:a,page:t,...r?{requestId:r}:{},...l?{userId:l}:{}},{headers:{"Content-Type":"application/json"}})).data;e.s(["findEmployees",0,_],935586)},758472,e=>{"use strict";let a=(0,e.i(475254).default)("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);e.s(["Code",()=>a],758472)},254756,e=>{"use strict";var a=e.i(581949);let t=async(e,t,r)=>{console.log("peopleToEnrich",e);let l=r?.apiKeys;l||(l=(()=>{try{let e=localStorage.getItem("parsedProfileAttributes"),a=null;if(e?(a=JSON.parse(e),console.log("Found parsedProfileAttributes in localStorage")):(e=localStorage.getItem("profileAttributes"))&&(a=JSON.parse(e),console.log("Found profileAttributes in localStorage (fallback)")),!a)return console.warn("No profile attributes found in localStorage"),console.log("Available localStorage keys:",Object.keys(localStorage)),{apollo:"",leadmagic:"",skrapp:"",pdl:"",lusha:""};let t=a?.api_keys||{};console.log("Raw API keys from localStorage:",t),console.log("Full profile attributes structure:",a);let r={apollo:t.apollo_io?.key||"",leadmagic:t.seamless_ai?.key||"",skrapp:t.skrapp_io?.key||"",pdl:t.pdl?.key||"",lusha:t.lusha?.key||""};console.log("Extracted API keys:",r);let l={apollo:""!==r.apollo.trim()?r.apollo:void 0,leadmagic:""!==r.leadmagic.trim()?r.leadmagic:void 0,skrapp:""!==r.skrapp.trim()?r.skrapp:void 0,pdl:""!==r.pdl.trim()?r.pdl:void 0,lusha:""!==r.lusha.trim()?r.lusha:void 0};return console.log("Filtered API keys for backend:",l),r}catch(e){return console.error("Error getting API keys from localStorage:",e),{apollo:"",leadmagic:"",skrapp:"",pdl:"",lusha:""}}})()),console.log("Using API keys for enrichment:",{apollo:l.apollo?.trim()?"Configured":"Not configured",leadmagic:l.leadmagic?.trim()?"Configured":"Not configured",skrapp:l.skrapp?.trim()?"Configured":"Not configured",pdl:l.pdl?.trim()?"Configured":"Not configured",lusha:l.lusha?.trim()?"Configured":"Not configured"});let i={apollo:l.apollo?.trim()?l.apollo:void 0,leadmagic:l.leadmagic?.trim()?l.leadmagic:void 0,skrapp:l.skrapp?.trim()?l.skrapp:void 0,pdl:l.pdl?.trim()?l.pdl:void 0,lusha:l.lusha?.trim()?l.lusha:void 0},n=r?.userId,o=r?.apiOrder||[];try{if(!n||0===o.length)try{let e=localStorage.getItem("parsedProfileAttributes");if(e){let a=JSON.parse(e);if(n||(n=a.user_id||a.id),0===o.length){let e=a.data_source_order;if(e&&"object"==typeof e&&Object.keys(e).length>0)console.log("Using data_source_order from profile (fallback):",e),o=Object.keys(e);else{let e=a.api_keys||{},t=[],r={pdl:"pdl",apollo_io:"apollo",skrapp_io:"skrapp",leadmagic:"leadmagic",lusha:"lusha",seamless_ai:"leadmagic"};Object.keys(e).forEach(a=>{let l=e[a];if(l&&"object"==typeof l&&"order"in l&&l.order){let e=r[a];e&&t.push({name:e,order:parseInt(l.order)})}}),t.length>0&&(o=t.sort((e,a)=>e.order-a.order).map(e=>e.name))}}}}catch(e){console.warn("Could not get userId or API order from localStorage fallback:",e)}0===o.length&&(console.log("Using fallback API order based on available keys"),i.pdl&&o.push("pdl"),i.apollo&&o.push("apollo"),i.leadmagic&&o.push("leadmagic"),i.skrapp&&o.push("skrapp"),i.lusha&&o.push("lusha"));let r={people:e,enrichType:t,userId:n,api_keys:i,api_order:o};console.log("Sending enrichment data to /api/enrich-people:",JSON.stringify(r,null,2));let l=await a.default.post("https://chatserver.onepgr.com/api/enrich-people",r,{headers:{"Content-Type":"application/json"}});if(console.log("enriched response from /api/enrich-people --->",l),l.data.success)return l.data;throw Error(l.data.error||"Unknown error")}catch(e){if(console.error("Enrichment API call failed:",e),"ERR_NETWORK"===e.code||"Network Error"===e.message)throw console.error("CORS Error: The server is sending duplicate Access-Control-Allow-Origin headers."),console.error("This is a server-side configuration issue that needs to be fixed on the backend."),Error("CORS Error: Server configuration issue. Please contact support to fix the duplicate CORS headers.");if("ECONNABORTED"===e.code)throw Error("Request timeout: The enrichment service took too long to respond.");throw e}};e.s(["enrichPeopleData",0,t,"generateUniqueId",0,()=>Math.random().toString(36).substr(2,9),"isEnrichmentEnabled",0,()=>{try{let e=localStorage.getItem("parsedProfileAttributes"),a=null;if(e?a=JSON.parse(e):(e=localStorage.getItem("profileAttributes"))&&(a=JSON.parse(e)),!a)return!1;let t=a?.session_flags2?.enrich_databank_options||{};return"1"===t.apollo||"1"===t.skrapp||"1"===t.lead_magic}catch(e){return console.error("Error checking enrichment status:",e),!1}}])},630511,e=>{"use strict";var a=e.i(271645),t=e.i(254756),r=e.i(286151);e.s(["useEnrichment",0,()=>{let[e,l]=(0,a.useState)(!1),[i,n]=(0,a.useState)([]),[o,s]=(0,a.useState)(!1),c=async(e,a,i)=>{l(!0);try{if(!a||0===a.length)throw Error("No people data available for enrichment");let r=await (0,t.enrichPeopleData)(a,e,i);if(console.log("enrich people response --->",r),r.success&&r.data?.enriched_people){let e=r.data.enriched_people.map(e=>{let a,r,l,i,n=e.location?.split(", ")||[],o=e.organization||e.account||{};return{id:e.id||(0,t.generateUniqueId)(),first_name:e.first_name||e.name?.split(",")[0]||"",last_name:e.last_name||e.name?.split(",")[1]?.trim()||"",name:e.enriched_name||e.name||`${e.first_name||""} ${e.last_name||""}`.trim(),enriched_name:e.enriched_name||null,title:e.enriched_title||e.jobTitle||e.title||e.headline||"",enriched_title:e.enriched_title||null,headline:e.headline||"",seniority:e.seniority||null,departments:e.departments||[],functions:e.functions||[],subdepartments:e.subdepartments||[],city:e.city||n?.[0]||"",state:e.state||n?.[1]||"",country:e.country||n?.[2]||"",enriched_location:e.enriched_location||e.location||"",enriched_email:(a=e.enriched_email)&&"Email not found"!==a&&"[email protected]"!==a?a:null,enriched_phone:(r=e.enriched_phone)&&"null"!==r&&"Phone number not found"!==r?r
1:null,email:(l=e.enriched_email)&&"Email not found"!==l&&"[email protected]"!==l?l:e.email||"[email protected]",phone:(i=e.enriched_phone||e.phone)&&"null"!==i&&"Phone number not found"!==i?i:null,email_status:e.enriched_email&&""!==e.enriched_email.trim()?"verified":"unverified",email_domain_catchall:e.email_domain_catchall||!1,company:o?.name||e.company||e.organization_name||"",company_domain:o?.primary_domain||e.domain||"",company_size:o?.size||e.company_employee_range||"",company_industry:o?.industry||e.company_industry||"",company_linkedin_url:o?.linkedin_url||e.company_linkedin_url||"",company_website:o?.website_url||e.company_website||"",company_founded:o?.founded_year||e.company_year_founded||"",company_market_cap:o?.market_cap||null,company_social:{facebook:o?.facebook_url||null,twitter:o?.twitter_url||null,linkedin:o?.linkedin_url||null},linkedin_url:e.linkedin_url||e.profileLink||"",enriched_linkedin_url:e.enriched_linkedin_url||null,profile_image_url:e.photo_url||e.profile_image_url||"",photo_url:e.photo_url||e.profile_image_url||"",education:e.educations||[],employment_history:e.employment_history||e.experiences||[],about:e.about||"",source:e.source||"",post_url:e.postUrl||"",timestamp:e.timestamp||new Date().toISOString(),is_likely_to_engage:!0,revealed_for_current_team:!0,show_intent:!0,intent_strength:null,extrapolated_email_confidence:null}});e.forEach(e=>{e.id2=(0,t.generateUniqueId)()});let a={totalPeople:e.length,validEmails:0,validPhones:0,validLinkedIns:0};e.forEach(e=>{(e.enriched_email&&"[email protected]"!==e.enriched_email&&"Email not found"!==e.enriched_email&&""!==e.enriched_email.trim()||e.email&&"[email protected]"!==e.email&&"Email not found"!==e.email&&""!==e.email.trim())&&a.validEmails++,(e.enriched_phone&&"Phone number not found"!==e.enriched_phone&&""!==e.enriched_phone.trim()||e.phone&&"Phone number not found"!==e.phone&&""!==e.phone.trim())&&a.validPhones++,(e.enriched_linkedin_url&&""!==e.enriched_linkedin_url.trim()||e.linkedin_url&&""!==e.linkedin_url.trim())&&a.validLinkedIns++});let l="",i=[];if(a.validEmails>0&&i.push(`${a.validEmails} email${a.validEmails>1?"s":""}`),a.validPhones>0&&i.push(`${a.validPhones} phone number${a.validPhones>1?"s":""}`),a.validLinkedIns>0&&i.push(`${a.validLinkedIns} LinkedIn profile${a.validLinkedIns>1?"s":""}`),0===i.length)l="No valid data was found during enrichment.";else{let t=e[0]?.source||"multiple sources",r=i.length>1?i.slice(0,-1).join(", ")+" and "+i.slice(-1):i[0];l=`Successfully enriched ${a.totalPeople} contact${a.totalPeople>1?"s":""} with ${r} using ${t}.`,1===a.totalPeople?l+=" Would you like to save this contact to OnePgr?":l+=" Would you like to save these contacts to OnePgr?"}return console.log("updated people data--->",e),n(e),s(!0),{success:!0,data:e,message:l}}throw Error(r.error||"Unknown error occurred during enrichment")}catch(a){console.error("Error enriching data:",a);let e=a.message;return a.message.includes("CORS Error")?e="Server configuration issue: CORS headers are duplicated. Please contact support.":a.message.includes("Network Error")||"ERR_NETWORK"===a.code?e="Network error: Unable to connect to enrichment service. Please check your connection.":a.message.includes("timeout")&&(e="Request timeout: The enrichment service took too long to respond."),r.default.error(`Error enriching data: ${e}`),{success:!1,error:e}}finally{l(!1)}};return{isEnriching:e,enrichedPeopleData:i,setEnrichedPeopleData:n,isEnriched:o,performEnrichment:c,resetEnrichment:()=>{n([]),s(!1)},setIsEnriched:s}}])},268969,499266,e=>{"use strict";var a=e.i(843476),t=e.i(271645),r=e.i(37727),l=e.i(643531),i=e.i(664659),n=e.i(409867);let o=({value:e,onRemove:t,color:l="emerald",icon:i})=>(0,a.jsxs)(n.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:`inline-flex items-center gap-2 px-3 py-1.5 rounded-lg border text-sm font-medium transition-all duration-200 ${{emerald:"bg-emerald-100 text-emerald-700 border-emerald-200 hover:bg-emerald-200",blue:"bg-blue-100 text-blue-700 border-blue-200 hover:bg-blue-200",purple:"bg-purple-100 text-purple-700 border-purple-200 hover:bg-purple-200",yellow:"bg-yellow-100 text-yellow-700 border-yellow-200 hover:bg-yellow-200"}[l]}`,children:[i&&(0,a.jsx)("span",{className:"text-xs",children:i}),(0,a.jsx)("span",{className:"truncate max-w-[200px]",children:e}),(0,a.jsx)("button",{onClick:t,className:"ml-1 p-0.5 hover:bg-white/50 rounded-full transition-colors",children:(0,a.jsx)(r.X,{className:"w-3 h-3"})})]});e.s(["TagInput",0,({tags:e,onTagsChange:s,placeholder:c,suggestions:d,color:m,icon:p,label:h,showDropdown:u=!1})=>{let[g,x]=(0,t.useState)(""),[f,y]=(0,t.useState)(!1),[b,_]=(0,t.useState)(!1),[k,v]=(0,t.useState)(d),w=(0,t.useRef)(null),N=(0,t.useRef)(null),j=a=>{a&&!e.includes(a)&&(s([...e,a]),x(""),y(!1),_(!1))},S=a=>{s(e.filter(e=>e!==a))},C=e=>{j(e)};return(0,t.useEffect)(()=>{let e=e=>{N.current&&!N.current.contains(e.target)&&_(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:h}),(0,a.jsxs)("div",{className:"relative",ref:N,children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{ref:w,type:"text",value:g,onChange:a=>{let t=a.target.value;x(t),v(d.filter(a=>a.toLowerCase().includes(t.toLowerCase())&&!e.includes(a))),y(t.length>0)},onKeyDown:a=>{"Enter"===a.key||","===a.key?(a.preventDefault(),j(g.trim())):"Backspace"===a.key&&""===g&&e.length>0&&S(e[e.length-1])},onPaste:a=>{a.preventDefault();let t=a.clipboardData.getData("text").split(/[,\n]+/).map(e=>
1e.trim()).filter(Boolean).filter(a=>!e.includes(a));t.length>0&&s([...e,...t])},onFocus:()=>y(g.length>0),onBlur:()=>setTimeout(()=>y(!1),200),placeholder:c,className:`w-full px-5 py-4 pr-12 border-2 rounded-2xl focus:outline-none focus:ring-2 transition-all duration-300 bg-white/70 backdrop-blur-sm shadow-lg hover:shadow-xl text-gray-900 placeholder-gray-500 ${"emerald"===m?"border-gray-200 hover:border-emerald-300 focus:ring-emerald-500/20 focus:border-emerald-500":"blue"===m?"border-gray-200 hover:border-blue-300 focus:ring-blue-500/20 focus:border-blue-500":"purple"===m?"border-gray-200 hover:border-purple-300 focus:ring-purple-500/20 focus:border-purple-500":"border-gray-200 hover:border-yellow-300 focus:ring-yellow-500/20 focus:border-yellow-500"}`}),u&&(0,a.jsx)("button",{type:"button",onClick:()=>_(!b),className:`absolute right-3 top-1/2 transform -translate-y-1/2 p-2 rounded-lg transition-all duration-300 ${"emerald"===m?"text-emerald-600 hover:bg-emerald-50 hover:text-emerald-700":"blue"===m?"text-blue-600 hover:bg-blue-50 hover:text-blue-700":"purple"===m?"text-purple-600 hover:bg-purple-50 hover:text-purple-700":"text-yellow-600 hover:bg-yellow-50 hover:text-yellow-700"}`,children:(0,a.jsx)(i.ChevronDown,{className:`w-5 h-5 transition-transform duration-300 ${b?"rotate-180":""}`})})]}),f&&k.length>0&&(0,a.jsx)(n.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"absolute z-50 w-full mt-2 bg-white/95 backdrop-blur-xl border-2 border-gray-200 rounded-xl shadow-2xl max-h-60 overflow-y-auto",children:(0,a.jsx)("div",{className:"p-2",children:k.map((e,t)=>(0,a.jsx)(n.motion.button,{onClick:()=>C(e),whileHover:{backgroundColor:"#f3f4f6"},className:"w-full px-4 py-3 text-left hover:bg-gray-100 focus:bg-gray-100 focus:outline-none transition-colors duration-200 rounded-lg text-gray-700 hover:text-gray-900 font-medium",children:e},t))})}),u&&b&&(0,a.jsx)(n.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"absolute z-50 w-full mt-2 bg-white/95 backdrop-blur-xl border-2 border-gray-200 rounded-xl shadow-2xl max-h-60 overflow-y-auto",children:(0,a.jsxs)("div",{className:"p-2",children:[(0,a.jsxs)("div",{className:"sticky top-0 bg-white/95 backdrop-blur-xl border-b border-gray-100 px-4 py-2 rounded-t-xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("span",{className:"text-sm font-semibold text-gray-700",children:["Select ",h]}),(0,a.jsx)("button",{onClick:()=>_(!1),className:"p-1 hover:bg-gray-100 rounded-lg transition-colors",children:(0,a.jsx)(r.X,{className:"w-4 h-4 text-gray-500"})})]}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Click to select multiple items"})]}),d.map((t,r)=>{let i=e.includes(t);return(0,a.jsxs)(n.motion.button,{onClick:()=>C(t),whileHover:{backgroundColor:i?"#fef3c7":"#faf5ff"},className:`w-full px-4 py-3 text-left focus:outline-none transition-colors duration-200 last:rounded-b-xl font-medium flex items-center justify-between ${i?"bg-yellow-50 text-purple-700 border-l-4 border-yellow-400":"text-gray-700 hover:text-purple-700"}`,children:[(0,a.jsx)("span",{children:t}),i&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(l.Check,{className:"w-4 h-4 text-yellow-600"}),(0,a.jsx)("span",{className:"text-xs text-yellow-600 font-semibold",children:"Selected"})]})]},r)}),e.length>0&&(0,a.jsx)("div",{className:"sticky bottom-0 bg-white/95 backdrop-blur-xl border-t border-gray-100 px-4 py-2 rounded-b-xl",children:(0,a.jsx)("button",{onClick:()=>{s([]),_(!1)},className:"w-full px-3 py-2 text-sm text-red-600 hover:bg-red-50 rounded-lg transition-colors font-semibold",children:"Clear All Selections"})})]})})]}),e.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,a.jsx)(o,{value:e,onRemove:()=>S(e),color:m,icon:p},e))})]})}],268969),e.s(["COMPANIES",0,["Google","Microsoft","Apple","Amazon","Meta","Netflix","Tesla","Salesforce","Adobe","Oracle","IBM","Intel","Cisco","Nvidia","Uber","Airbnb","Lyft","Spotify","Twitter","LinkedIn","Zoom","Slack","Atlassian","Twilio","Shopify","Stripe","Square","Coinbase","Dropbox","Box","DocuSign","Okta","Workday","ServiceNow","Snowflake","Datadog","Splunk","CrowdStrike","Palo Alto Networks","Fortinet","Zscaler","Cloudflare","MongoDB","Elastic","Unity","Roblox","McKinsey & Company","Boston Consulting Group","Bain & Company","Deloitte","PwC","EY","KPMG","Goldman Sachs","JPMorgan Chase","Morgan Stanley","Bank of America","Citi","Wells Fargo","BlackRock","Visa","Mastercard","American Express","Capital One"],"JOB_TITLES",0,["CEO","CTO","CFO","COO","CMO","CRO","CPO","CIO","CISO","Chief Executive Officer","Chief Technology Officer","Chief Financial Officer","Chief Operating Officer","Chief Marketing Officer","Chief Revenue Officer","Chief Product Officer","VP Engineering","VP Sales","VP Marketing","VP Product","VP Operations","VP Finance","VP HR","VP Design","Vice President of Engineering","Vice President of Sales","Vice President of Marketing","Director of Engineering","Director of Sales","Director of Marketing","Director of Product","Director of Operations","Director of Finance","Director of HR","Director of Design","Senior Director","Engineering Manager","Sales Manager","Marketing Manager","Product Manager","Operations Manager","Finance Manager","HR Manager","Design Manager","Senior Manager","Software Engineer","Senior Softw
1are Engineer","Staff Software Engineer","Principal Engineer","Frontend Developer","Backend Developer","Full Stack Developer","DevOps Engineer","Sales Development Representative","Account Executive","Account Manager","Customer Success Manager","Product Designer","UX Researcher","Data Scientist","Data Analyst","Business Analyst","Recruiter","Talent Acquisition","Office Manager","Executive Assistant"],"LOCATIONS",0,["San Francisco, CA","New York, NY","Los Angeles, CA","Chicago, IL","Austin, TX","Seattle, WA","Boston, MA","Denver, CO","Atlanta, GA","Miami, FL","Washington, DC","San Diego, CA","San Jose, CA","Portland, OR","Las Vegas, NV","Nashville, TN","Philadelphia, PA","Dallas, TX","Houston, TX","Phoenix, AZ","London, UK","Toronto, Canada","Vancouver, Canada","Berlin, Germany","Munich, Germany","Paris, France","Amsterdam, Netherlands","Dublin, Ireland","Sydney, Australia","Melbourne, Australia","Singapore","Tokyo, Japan","Bangalore, India","Mumbai, India","Tel Aviv, Israel","Dubai, UAE","Sao Paulo, Brazil","Mexico City, Mexico","United States","Canada","United Kingdom","Germany","France","Australia","India","Japan","China","Brazil","Mexico","Netherlands","Sweden","Switzerland","Ireland","Israel","Singapore","United Arab Emirates"]],499266)},716286,e=>{"use strict";var a=e.i(843476),t=e.i(271645),r=e.i(854878),l=e.i(581949),i=e.i(37727),n=e.i(555436),o=e.i(551348),s=e.i(758472),c=e.i(629377),d=e.i(283086),m=e.i(643531),p=e.i(607486),h=e.i(346897),u=e.i(370956),g=e.i(248256),x=e.i(879002),f=e.i(373375),y=e.i(463059),b=e.i(286151),_=e.i(546475),k=e.i(268969),v=e.i(367428),w=e.i(499266),N=e.i(630511),j=e.i(254756),S=e.i(935586),C=e.i(421188),E=e.i(295903);let P=`${E.CHATSERVER_BASE_URL}/api/find-people`,A=()=>{let e=localStorage.getItem("parsedProfileAttributes"),a=e?JSON.parse(e):null;return{apiKeys:{apollo:a?.api_keys?.apollo_io?.key,pdl:a?.api_keys?.pdl?.key,leadmagic:a?.api_keys?.leadmagic?.key,skrapp:a?.api_keys?.skrapp_io?.key,lusha:a?.api_keys?.lusha?.key},apiOrder:{apollo:a?.api_keys?.apollo_io?.order,pdl:a?.api_keys?.pdl?.order,leadmagic:a?.api_keys?.leadmagic?.order,skrapp:a?.api_keys?.skrapp_io?.order,lusha:a?.api_keys?.lusha?.order},userId:a?.user_id||a?.id||(0,_.getUserId)()}},O=e=>e.map(e=>({id:e.id||e.contactId||`${e.first_name||""}-${e.last_name||""}-${Math.random().toString(36).slice(2,8)}`,name:e.enriched_name||e.name||`${e.first_name||""} ${e.last_name||""}`.trim(),first_name:e.first_name,last_name:e.last_name,company:e.organization_name||e.company||e.organization?.name||"",domain:e.organization?.primary_domain||e.organization_domain||e.company_domain||e.domain||"",email:e.email||(e.emails?.length>0?e.emails[0].address||e.emails[0]:e.has_email?"Email Locked":"Not available"),phone:e.phone||(e.phone_numbers?.length>
10?e.phone_numbers[0].number||e.phone_numbers[0]:e.has_phone?"Phone Locked":"Not available"),linkedin_url:e.enriched_linkedin_url||e.linkedin_url||"",jobTitle:e.title||e.jobTitle||"",location:e.location||[e.city,e.state,e.country].filter(e=>e?.trim()).join(", ")||"",is_enriched:e.is_enriched||!1,enriched_email:e.enriched_email,enriched_phone:e.enriched_phone,photo_url:e.photo_url||""}));function $({isOpen:e,onClose:E,onContactsAdded:$,existingEmails:I=[],initialListId:L,confirmLabel:T="Add to Campaign",subtitle:D="Search, enrich, and add contacts"}){let[M,R]=(0,t.useState)("detail"),[U,B]=(0,t.useState)([]),[z,F]=(0,t.useState)([]),[J,V]=(0,t.useState)([]),[W,K]=(0,t.useState)(1),[G,q]=(0,t.useState)(0),[H,X]=(0,t.useState)(""),[Y,Z]=(0,t.useState)(25),[Q,ee]=(0,t.useState)(!1),[ea,et]=(0,t.useState)(""),[er,el]=(0,t.useState)(null),[ei,en]=(0,t.useState)(!1),[eo,es]=(0,t.useState)([]),[ec,ed]=(0,t.useState)({}),[em,ep]=(0,t.useState)(!1),[eh,eu]=(0,t.useState)(!1),{isEnriching:eg,performEnrichment:ex}=(0,N.useEnrichment)(),ef=(0,j.isEnrichmentEnabled)(),[ey,eb]=(0,t.useState)(L?"existing":"global"),[e_,ek]=(0,t.useState)(""),[ev,ew]=(0,t.useState)(L||""),[eN,ej]=(0,t.useState)([]),[eS,eC]=(0,t.useState)(!1),[eE,eP]=(0,t.useState)(!1),eA=()=>{es([]),ed({}),eu(!1),K(1),q(0)},eO=async()=>{if(!(eN.length>0)&&!eS){eC(!0);try{let e=await (0,C.fetchContactLists)(!1);ej(e)}catch{b.default.error("Failed to load lists")}finally{eC(!1)}}},e$=async(e=1)=>{ep(!0);try{let{apiKeys:a,apiOrder:t}=A(),r=await l.default.post(P,{userId:(0,_.getUserId)(),domains:U,locations:z,titles:J,seniorities:[],page:e,perPage:25,location:z[0]||"",title:J[0]||"",seniority:"",companySizes:[],api_keys:a,api_order:t});if(r.data.success){let a=r.data.data.people||[];es(O(a)),q(r.data.data.total_count||a.length),K(e),eu(!0),b.default.success(`Found ${r.data.data.total_count??a.length} contact${(r.data.data.total_count??a.length)===1?"":"s"}`)}else b.default.error("Failed to find contacts"),eu(!0)}catch(e){console.error("Detail search error:",e),b.default.error("An error occurred while searching")}finally{ep(!1)}},eI=async()=>{if(H.trim()){ee(!0);try{let e=await (0,S.findEmployees)(H,Y);if(e.queued)return void b.default.info(e.message||"Your search was queued. Please try again shortly.");let a=e.data||[],t=Array.isArray(a)?a.map(e=>({id:e.id||e.urn_id||Math.random().toString(36).slice(2,9),name:e.name||`${e.first_name||""} ${e.last_name||""}`.trim(),first_name:e.first_name,last_name:e.last_name,company:e.company||e.organization?.name||"",domain:"",email:e.email||"Not available",phone:e.phone||"Not available",linkedin_url:e.linkedin_url||e.linkedinUrl||"",jobTitle:e.role||e.title||e.jobTitle||"",location:e.location||"",is_enriched:!1})):[];es(t),eu(!0),b.default.success(`Found ${t.length} contact${1===t.length?"":"s"}`)}catch(e){console.error("Sales Navigator search error:",e),b.default.error("An error occurred while searching Sales Navigator")}finally{ee(!1)}}},eL=async()=>{if(!ea.trim())return void b.default.error("Please provide JSON data");en(!0);try{let e=JSON.parse(ea);if(Array.isArray(e)){let a=e.map((e,a)=>({id:e.id||e.contact_id||`json-${a}`,name:e.name||`${e.first_name||""} ${e.last_name||""}`.trim(),first_name:e.first_name,last_name:e.last_name,company:e.company||"",domain:e.domain||"",email:e.email||"Not available",phone:e.phone||"Not available",linkedin_url:e.linkedin||e.linkedin_url||"",jobTitle:e.jobTitle||e.title||"",location:e.location||""}));es(a),eu(!0),el(null),b.default.success(`Loaded ${a.length} contact${1===a.length?"":"s"}`)}else{let{apiKeys:a,apiOrder:t}=A(),r=await l.default.post(P,{userId:(0,_.getUserId)(),domains:e.domains||[],locations:e.locations||[],titles:e.titles||[],seniorities:e.seniorities||[],page:1,perPage:25,api_keys:a,api_order:t});if(r.data.success){let e=r.data.data.people||[];es(O(e)),eu(!0),el(null),b.default.success(`Found ${e.length} contact${1===e.length?"":"s"}`)}else b.default.error("Failed to find contacts")}}catch(e){el(e.message||"Invalid JSON"),b.default.error("Failed to process JSON. Please check the format.")}finally{en(!1)}},eT=e=>{ed(a=>{let t={...a};
1return t[e.id]?delete t[e.id]:t[e.id]=e,t})},eD=async()=>{let e=Object.values(ec);if(0===e.length)return void b.default.warning("Select contacts to enrich first");let{apiKeys:a,apiOrder:t,userId:r}=A(),l=e.map(e=>({id:e.id,name:e.name,first_name:e.first_name||e.name.split(" ")[0]||e.name,last_name:e.last_name||(e.name.includes(" ")?e.name.split(" ").slice(1).join(" "):""),company:e.company,domain:e.domain||"",email:"Email Locked"===e.email||"Not available"===e.email?"N/A":e.email,phone:"Phone Locked"===e.phone||"Not available"===e.phone?"":e.phone,organization_name:e.company,linkedin_url:"Not available"===e.linkedin_url?"":e.linkedin_url,jobTitle:e.jobTitle,location:e.location,photo_url:e.photo_url,profile_id:e.id})),i=await ex("both",l,{userId:r,apiKeys:a,apiOrder:Object.keys(t)});if(i?.success&&i.data){let e=new Map(i.data.map(e=>[e.id,e]));es(a=>a.map(a=>{let t=e.get(a.id);return t?{...a,name:t.enriched_name||t.name||a.name,is_enriched:!0,enriched_email:t.enriched_email||t.email,enriched_phone:t.enriched_phone||t.phone,enriched_linkedin_url:t.enriched_linkedin_url||a.linkedin_url,photo_url:t.photo_url||a.photo_url}:a})),ed(a=>{let t={};return Object.keys(a).forEach(r=>{let l=e.get(r);t[r]=l?{...a[r],enriched_email:l.enriched_email||l.email,enriched_phone:l.enriched_phone||l.phone,enriched_linkedin_url:l.enriched_linkedin_url||a[r].linkedin_url,is_enriched:!0}:a[r]}),t}),b.default.success(`Enriched ${i.data.length} contact${1===i.data.length?"":"s"}`)}},eM=async()=>{if("new"===ey){if(!e_.trim())throw Error("Please enter a name for the new list");return(0,C.createContactList)(e_.trim())}if("existing"===ey){if(!ev)throw Error("Please choose an existing list");return ev}return(0,C.getOrCreateGlobalContactList)()},eR=async()=>{let e=Object.values(ec);if(0===e.length)return void b.default.warning("Select contacts to add");eP(!0);try{let a=await eM(),t=new Set(I.map(e=>(e||"").toLowerCase()).filter(Boolean)),r=[],l=0,i=0,n=0;for(let o of e){let e=o.enriched_email||o.email;if(!e||"Not available"===e||"Email Locked"===e){i++;continue}if(t.has(e.toLowerCase())){n++;continue}let s=o.enriched_phone||o.phone,c=s&&"Not available"!==s&&"Phone Locked"!==s?s:"",d=o.enriched_linkedin_url||o.linkedin_url||"";try{let i=await (0,C.createContact)({firstName:o.first_name||o.name.split(" ")[0]||"",lastName:o.last_name||o.name.split(" ").slice(1).join(" ")||"",email:e,officePhone:c,mobilePhone:c,companyName:o.company||"",title:o.jobTitle||"",linkedin:d,listId:a}),n=i?.contact_id||i?.id||null;if(!n&&i?.response){let e="string"==typeof i.response?JSON.parse(i.response):i.response;n=e?.contact_id||e?.id||null}n&&(r.push({contact_id:String(n),name:o.name,firstname:o.first_name||"",lastname:o.last_name||"",email:e,email_2:e,phone:c,mobile:c,company:o.company||"",company_url:o.domain||"",title:o.jobTitle||"",linkedin:d,list_id:a}),t.add(e.toLowerCase()),l++)}catch(e){console.error("Error creating contact:",e)}}if(0===l)return void(i>0&&ef?b.default.error(`${i} selected contact${1===i?"":"s"} don't have an email yet â click "Enrich Selected" first, then try again.`):i>0?b.default.error(`${i} selected contact${1===i?"":"s"} don't have an email address available.`):n>0?b.default.warning("Selected contacts are already in this campaign."):b.default.error("No contacts were added"));$(r,a),b.default.success(`Added ${l} contact${1===l?"":"s"}`),eA(),E()}catch(e){b.default.error(e.message||"Failed to add contacts")}finally{eP(!1)}},eU=em||Q||ei,eB=Object.keys(ec).length;return(0,a.jsxs)(r.Dialog,{open:e,onClose:E,className:"relative z-[9000]",children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm","aria-hidden":"true"}),(0,a.jsx)("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:(0,a.jsxs)(r.Dialog.Panel,{className:"mx-auto w-[90vw] max-w-6xl bg-white rounded-2xl shadow-2xl max-h-[90vh] flex flex-col overflow-hidden",children:[(0,a.jsxs)("div",{className:"relative flex-shrink-0 flex items-center justify-between px-6 py-5 bg-gradient-to-r from-emerald-600 via-emerald-700 to-emerald-800",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3.5",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-11 h-11 bg-white/15 rounded-2xl ring-1 ring-white/20",children:(0,a.jsx)(n.Search,{className:"w-5 h-5 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-white leading-tight",children:"Find Contacts"}),(0,a.jsx)("p",{className:"text-sm text-emerald-100/90 mt-0.5",children:D})]})]}),(0,a.jsx)("button",{onClick:()=>{eA(),E()},className:"p-2 rounded-xl bg-white/10 hover:bg-white/20 text-white/80 hover:text-white transition-colors","aria-label":"Close",children:(0,a.jsx)(i.X,{className:"w-5 h-5"})})]}),(0,a.jsx)("div",{className:"flex-shrink-0 flex items-center gap-2 px-6 pt-4 border-b border-gray-100",children:[{id:"detail",label:"Detail Search",icon:n.Search},{id:"sales-nav",label:"Sales Navigator",icon:o.Linkedin}
1,{id:"json-wizard",label:"JSON Wizard",icon:s.Code}].map(e=>(0,a.jsxs)("button",{onClick:()=>R(e.id),className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-t-lg transition-colors ${M===e.id?"bg-emerald-50 text-emerald-700 border border-b-0 border-emerald-200":"text-gray-500 hover:text-gray-700"}`,children:[(0,a.jsx)(e.icon,{className:"w-4 h-4"}),e.label]},e.id))}),(0,a.jsxs)("div",{className:"flex-1 min-h-0 overflow-y-auto p-6 space-y-5",children:["detail"===M&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(k.TagInput,{tags:U,onTagsChange:B,placeholder:"Add a company domain (e.g. acme.com)",suggestions:w.COMPANIES,color:"blue",icon:(0,a.jsx)(p.Building2,{className:"w-3.5 h-3.5"}),label:"Company Domains"}),U.length>0&&(0,a.jsxs)("div",{className:"rounded-xl border border-gray-100 bg-white p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"p-1.5 bg-violet-100 rounded-lg",children:(0,a.jsx)(s.Code,{className:"w-4 h-4 text-violet-600"})}),(0,a.jsx)("span",{className:"font-semibold text-sm text-gray-800",children:"Tech stack"}),(0,a.jsxs)("span",{className:"ml-auto text-xs text-gray-400",children:[U.length," ",1===U.length?"company":"companies"]})]}),(0,a.jsx)(v.DomainTechStackPanel,{domains:U})]}),(0,a.jsx)(k.TagInput,{tags:z,onTagsChange:F,placeholder:"Add a location",suggestions:w.LOCATIONS,color:"purple",icon:(0,a.jsx)(h.MapPin,{className:"w-3.5 h-3.5"}),label:"Locations"}),(0,a.jsx)(k.TagInput,{tags:J,onTagsChange:V,placeholder:"Add a job title",suggestions:w.JOB_TITLES,color:"emerald",icon:(0,a.jsx)(x.UserPlus,{className:"w-3.5 h-3.5"}),label:"Job Titles"}),(0,a.jsxs)("button",{onClick:()=>e$(1),disabled:em||0===U.length&&0===z.length&&0===J.length,className:"flex items-center gap-2 px-4 py-2.5 bg-emerald-600 hover:bg-emerald-700 disabled:opacity-50 text-white text-sm font-semibold rounded-xl transition-colors",children:[em?(0,a.jsx)(c.Loader2,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(n.Search,{className:"w-4 h-4"}),"Search"]})]}),"sales-nav"===M&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("label",{className:"block text-sm font-semibold text-gray-700",children:"LinkedIn Sales Navigator URL"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border-2 border-gray-200 focus-within:border-[#0a66c2] px-3 py-2.5 bg-white",children:[(0,a.jsx)(o.Linkedin,{className:"w-4 h-4 text-[#0a66c2] flex-shrink-0"}),(0,a.jsx)("input",{value:H,onChange:e=>X(e.target.value),placeholder:"Paste a Sales Navigator search or list URL",className:"flex-1 outline-none text-sm"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"Limit"}),[10,25,50,100].map(e=>(0,a.jsx)("button",{onClick:()=>Z(e),className:`px-2.5 py-1 rounded-lg text-xs font-semibold border transition-all ${Y===e?"bg-[#0a66c2] border-[#0a66c2] text-white":"border-gray-200 text-gray-600 hover:border-gray-300"}`,children:e},e))]}),(0,a.jsxs)("button",{onClick:eI,disabled:Q||!H.trim(),className:"flex items-center gap-2 px-4 py-2.5 bg-[#0a66c2] hover:bg-[#004182] disabled:opacity-50 text-white text-sm font-semibold rounded-xl transition-colors",children:[Q?(0,a.jsx)(c.Loader2,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(n.Search,{className:"w-4 h-4"}),"Search"]})]}),"json-wizard"===M&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("label",{className:"block text-sm font-semibold text-gray-700",children:"Paste search criteria JSON, or a JSON array of people"}),(0,a.jsx)("textarea",{value:ea,onChange:e=>et(e.target.value),placeholder:'{"domains": ["example.com"], "titles": ["CEO"]}',rows:8,className:`w-full font-mono text-xs rounded-xl border-2 p-3 outline-none ${er?"border-red-300":"border-gray-200 focus:border-emerald-400"}`}),er&&(0,a.jsx)("p",{className:"text-xs text-red-600",children:er}),(0,a.jsxs)("button",{onClick:eL,disabled:ei||!ea.trim(),className:"flex items-center gap-2 px-4 py-2.5 bg-emerald-600 hover:bg-emerald-700 disabled:opacity-50 text-white text-sm font-semibold rounded-xl transition-colors",children:[ei?(0,a.jsx)(c.Loader2,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(d.Sparkles,{className:"w-4 h-4"}),"Process"]})]}),eh&&(0,a.jsxs)("div",{className:"border border-gray-200 rounded-xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-gray-50 border-b border-gray-200",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-gray-700 cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",checked:eo.length>0&&eB===eo.length,onChange:()=>{if(Object.keys(ec).length===eo.length&&eo.length>0)ed({});else{let e={};eo.forEach(a=>{e[a.id]=a}),ed(e)}},className:"rounded"}),"detail"===M&&G>0?`${G} result${1===G?"":"s"}`:`${eo.length} result${1===eo.length?"":"s"}`," · ",eB," selected"]}),ef&&(0,a.jsxs)("button",{onClick:eD,disabled:eg||0===eB,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-semibold text-amber-700 bg-amber-50 hover:bg-amber-100 disabled:opacity-50 rounded-lg transition-colors",children:[eg?(0,a.jsx)(c.Loader2,{className:"w-3.5 h-3.5 animate-spin"}):(0,a.jsx)(d.Sparkles,{className:"w-3.5 h-3.5"}),"Enrich Selected"]})]}),(0,a.jsx)("div",{className:"max-h-96 overflow-auto",children:0===eo.length?(0,a.jsx)("div",{className:"px-4 py-8 text-center text-sm text-gray-400",children:"No results. Try a different search."}):(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"sticky top-0 bg-gray-50 border-b border-gray-200 text-xs font-semibold text-gray-500 uppercase tracking-wide",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left w-8"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Name"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Title"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Company"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Email"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Phone"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"Location"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left",children:"LinkedIn"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-gray-100",children:eo.map(e=>{let t=e.enriched_email||e.email,r=e.enriched_phone||e.phone,l=!!ec[e.id];return(0,a.jsxs)("tr",{onClick:()=>
1eT(e),className:`cursor-pointer transition-colors ${l?"bg-emerald-50":"hover:bg-gray-50"}`,children:[(0,a.jsx)("td",{className:"px-4 py-2",children:(0,a.jsx)("input",{type:"checkbox",checked:l,onChange:()=>eT(e),onClick:e=>e.stopPropagation(),className:"rounded"})}),(0,a.jsx)("td",{className:"px-4 py-2 font-medium text-gray-900 whitespace-nowrap",children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[e.name||"Unknown",e.is_enriched&&(0,a.jsxs)("span",{className:"flex items-center gap-1 text-[10px] font-semibold text-amber-600 bg-amber-50 px-1.5 py-0.5 rounded-full",children:[(0,a.jsx)(m.Check,{className:"w-2.5 h-2.5"})," enriched"]})]})}),(0,a.jsx)("td",{className:"px-4 py-2 text-gray-600 whitespace-nowrap",children:e.jobTitle||"â"}),(0,a.jsx)("td",{className:"px-4 py-2 text-gray-600 whitespace-nowrap",children:e.company||"â"}),(0,a.jsx)("td",{className:"px-4 py-2 text-gray-600 whitespace-nowrap",children:t||"Not available"}),(0,a.jsx)("td",{className:"px-4 py-2 text-gray-600 whitespace-nowrap",children:r||"Not available"}),(0,a.jsx)("td",{className:"px-4 py-2 text-gray-600 whitespace-nowrap",children:e.location||"â"}),(0,a.jsx)("td",{className:"px-4 py-2",children:e.linkedin_url?(0,a.jsx)("a",{href:e.linkedin_url,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"text-[#0a66c2] hover:text-[#004182]",children:(0,a.jsx)(o.Linkedin,{className:"w-4 h-4"})}):"â"})]},e.id)})})]})}),"detail"===M&&G>25&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 bg-gray-50 border-t border-gray-200 text-xs text-gray-600",children:[(0,a.jsxs)("span",{children:["Page ",W," of ",Math.max(1,Math.ceil(G/25))," · ",G," total"]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsxs)("button",{onClick:()=>e$(W-1),disabled:W<=1||em,className:"flex items-center gap-1 px-2 py-1 rounded-lg border border-gray-200 disabled:opacity-40 hover:border-gray-300",children:[(0,a.jsx)(f.ChevronLeft,{className:"w-3.5 h-3.5"})," Prev"]}),(0,a.jsxs)("button",{onClick:()=>e$(W+1),disabled:W>=Math.ceil(G/25)||em,className:"flex items-center gap-1 px-2 py-1 rounded-lg border border-gray-200 disabled:opacity-40 hover:border-gray-300",children:["Next ",(0,a.jsx)(y.ChevronRight,{className:"w-3.5 h-3.5"})]})]})]})]})]}),(0,a.jsxs)("div",{className:"flex-shrink-0 flex flex-col sm:flex-row items-stretch sm:items-center justify-between gap-3 px-6 py-4 bg-white border-t border-gray-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsxs)("button",{onClick:()=>eb("global"),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-semibold rounded-lg border transition-colors ${"global"===ey?"border-emerald-500 bg-emerald-50 text-emerald-700":"border-gray-200 text-gray-600 hover:border-gray-300"}`,children:[(0,a.jsx)(g.Globe,{className:"w-3.5 h-3.5"})," Global List"]}),(0,a.jsxs)("button",{onClick:()=>eb("new"),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-semibold rounded-lg border transition-colors ${"new"===ey?"border-emerald-500 bg-emerald-50 text-emerald-700":"border-gray-200 text-gray-600 hover:border-gray-300"}`,children:[(0,a.jsx)(u.List,{className:"w-3.5 h-3.5"})," New List"]}),(0,a.jsxs)("button",{onClick:()=>{eb("existing"),eO()},className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-semibold rounded-lg border transition-colors ${"existing"===ey?"border-emerald-500 bg-emerald-50 text-emerald-700":"border-gray-200 text-gray-600 hover:border-gray-300"}`,children:[(0,a.jsx)(u.List,{className:"w-3.5 h-3.5"})," Existing List"]}),"new"===ey&&(0,a.jsx)("input",{value:e_,onChange:e=>ek(e.target.value),placeholder:"New list name",className:"px-3 py-1.5 text-xs rounded-lg border border-gray-200 outline-none focus:border-emerald-400 w-40"}),"existing"===ey&&(0,a.jsxs)("select",{value:ev,onChange:e=>ew(e.target.value),disabled:eS,className:"px-3 py-1.5 text-xs rounded-lg border border-gray-200 outline-none focus:border-emerald-400 w-44",children:[(0,a.jsx)("option",{value:"",children:eS?"Loadingâ¦":"Choose a list"}),eN.map(e=>(0,a.jsx)("option",{value:e.list_id,children:e.list_name},e.list_id))]})]}),(0,a.jsxs)("button",{onClick:eR,disabled:eE||eU||0===eB,className:"flex items-center justify-center gap-2 px-5 py-2.5 bg-emerald-600 hover:bg-emerald-700 disabled:opacity-50 text-white text-sm font-semibold rounded-xl transition-colors",children:[eE?(0,a.jsx)(c.Loader2,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(x.UserPlus,{className:"w-4 h-4"}),T,eB>0?` (${eB})`:""]})]})]})})]})}e.s(["default",()=>$])}]);
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.