PageSourceSearch

https://app.gosherloq.com/static/frontend/assets/index-CuC_oOGY.js

js gosherloq.com collected 2026-09-24 14:00:11 UTC 57,659 bytes, 3 lines download raw bytes

1import{r as e}from"./rolldown-runtime-hePW80VL.js";import{B as t}from"./utils-BlvXUAK9.js";import{_ as n,o as r,t as i}from"./jsx-runtime-CbkpsQZ0.js";import{i as a}from"./lib-5d2MXFI2.js";import{G as o,I as s,a as c,m as l,n as u,p as d,r as f,t as p,z as m}from"./Text-DjqRmEnZ.js";import{M as h,a as g,t as _}from"./Popover-PX3YVywJ.js";import{a as ee,i as v}from"./VisuallyHidden-BC1yYl6X.js";import{a as te}from"./layout-H8WXqA-o.js";import{$ as y,B as b,F as x,G as S,H as C,K as w,L as ne,N as re,Q as ie,R as ae,S as oe,U as se,V as T,X as E,Y as ce,Z as D,a as le,dt as ue,f as O,gt as k,ht as de,it as A,j as fe,lt as pe,mt as j,o as M,pt as me,q as N,r as he,s as ge,st as _e,ut as P,x as ve,yt as F,z as I}from"./hooks-B_vsyOCm.js";import{t as ye}from"./Title-BP2UPT5s.js";import{n as be,t as L}from"./Button-BlPb0QvD.js";import{f as xe,g as R,i as Se,o as Ce,p as we,t as Te,v as z}from"./inputs-DNB4wUAw.js";import{t as Ee}from"./use-merged-ref-D2IJVWkB.js";import{t as B}from"./Group-C9hsIZXt.js";import{n as De}from"./stats-tOTOvVeT.js";import{t as Oe}from"./use-disclosure-BlhxO3WE.js";import{a as ke,o as Ae,t as je}from"./events-D-RIpHhU.js";import{t as Me}from"./use-resolved-styles-api-Cj1vI6Uy.js";import{n as Ne,t as Pe}from"./Tooltip-DdqKe480.js";import{t as V}from"./Paper-DksCIqPr.js";import{t as Fe}from"./ActionIcon-4PwUaTv_.js";import{t as Ie}from"./CloseButton-Y8GDFeHl.js";import{n as H}from"./use-form-gcOMQhdA.js";import{t as U}from"./Stack-Coq64YNZ.js";import{n as Le,t as Re}from"./IconHelpCircle-DfreIJh6.js";import{t as ze}from"./Alert-7bOzZ-SG.js";import{a as W,d as Be,g as Ve,y as He}from"./data-UmTHumKF.js";import{t as Ue}from"./Center-qxd5H97i.js";import{i as We,n as Ge,r as G,t as Ke}from"./IconTrash-CHlNmt51.js";import{t as qe}from"./Image-CkZ9rptq.js";import{t as Je}from"./SimpleGrid-CgsOzNvF.js";import{t as Ye}from"./Switch-CvA7CfY0.js";import{i as Xe,n as Ze}from"./helper-D9NymF7L.js";import{v as Qe}from"./QueryClientProvider-BBm4PAeV.js";import{a as $e,t as K}from"./axios-Ck6tlWK1.js";import{t as q}from"./createReactComponent-DjXh-NdD.js";import{n as et,t as tt}from"./howItWorks-EbwpqXuI.js";import{t as nt}from"./IconHeartHandshake-BkkpyTEi.js";import{t as rt}from"./IconInfoCircle-KJIjvkZJ.js";import{t as it}from"./IconPlus-DY2J7B6B.js";import{t as at}from"./IconUserPlus-CuD5vLFq.js";import{t as ot}from"./Loader-_caCu6uS.js";import{t as st}from"./useOneTimeState-BmqEWfYb.js";import{t as ct}from"./LinkedInProfile-BLdFmHuY.js";import{t as lt}from"./data-tgUkUFRx.js";function ut(e){return typeof e==`string`?e.charAt(0).toUpperCase()+e.slice(1):``}var dt=q(`outline`,`address-book`,`AddressBook`,[[`path`,{d:`M20 6v12a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2`,key:`svg-0`}],[`path`,{d:`M10 16h6`,key:`svg-1`}],[`path`,{d:`M11 11a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-2`}],[`path`,{d:`M4 8h3`,key:`svg-3`}],[`path`,{d:`M4 12h3`,key:`svg-4`}],[`path`,{d:`M4 16h3`,key:`svg-5`}]]),ft=q(`outline`,`align-left`,`AlignLeft`,[[`path`,{d:`M4 6l16 0`,key:`svg-0`}],[`path`,{d:`M4 12l10 0`,key:`svg-1`}],[`path`,{d:`M4 18l14 0`,key:`svg-2`}]]),pt=q(`outline`,`category`,`Category`,[[`path`,{d:`M4 4h6v6h-6l0 -6`,key:`svg-0`}],[`path`,{d:`M14 4h6v6h-6l0 -6`,key:`svg-1`}],[`path`,{d:`M4 14h6v6h-6l0 -6`,key:`svg-2`}],[`path`,{d:`M14 17a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`,key:`svg-3`}]]),mt=q(`outline`,`file-type-xls`,`FileTypeXls`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4`,key:`svg-1`}],[`path`,{d:`M4 15l4 6`,key:`svg-2`}],[`path`,{d:`M4 21l4 -6`,key:`svg-3`}],[`path`,{d:`M17 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75`,key:`svg-4`}],[`path`,{d:`M11 15v6h3`,key:`svg-5`}]]),ht=q(`outline`,`file-upload`,`FileUpload`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2`,key:`svg-1`}],[`path`,{d:`M12 11v6`,key:`svg-2`}],[`path`,{d:`M9.5 13.5l2.5 -2.5l2.5 2.5`,key:`svg-3`}]]),gt=q(`outline`,`puzzle`,`Puzzle`,[[`path`,{d:`M4 7h3a1 1 0 0 0 1 -1v-1a2 2 0 0 1 4 0v1a1 1 0 0 0 1 1h3a1 1 0 0 1 1 1v3a1 1 0 0 0 1 1h1a2 2 0 0 1 0 4h-1a1 1 0 0 0 -1 1v3a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1v-1a2 2 0 0 0 -4 0v1a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h1a2 2 0 0 0 0 -4h-1a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1`,key:`svg-0`}]]),_t=q(`outline`,`unlink`,`Unlink`,[[`path`,{d:`M17 22v-2`,key:`svg-0`}],[`path`,{d:`M9 15l6 -6`,key:`svg-1`}],[`path`,{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`,key:`svg-2`}],[`path`,{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`,key:`svg-3`}],[`path`,{d:`M20 17h2`,key:`svg-4`}],[`path`,{d:`M2 7h2`,key:`svg-5`}],[`path`,{d:`M7 2v2`,key:`svg-6`}]]),vt=q(`outline`,`upload`,`Upload`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 9l5 -5l5 5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),yt=q(`outline`,`user-x`,`UserX`,[[`path`,{d:`M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0`,key:`svg-0`}],[`path`,{d:`M6 21v-2a4 4 0 0 1 4 -4h3.5`,key:`svg-1`}],[`path`,{d:`M22 22l-5 -5`,key:`svg-2`}],[`path`,{d:`M17 22l5 -5`,key:`svg-3`}]]),J=e(t(),1),Y=i();function bt({profile:e,selected:t,onToggle:r,onClick:i,onDelete:a,onEnrich:s}){let[c,l]=(0,J.useState)(!1),d=c||t,m=n(),{user:h}=ve(!0),g=(e,t)=>{m(`/activities`,{state:{profile:e,activityType:t,onlyMy:h?.id===e.user.id}})};return(0,Y.jsx)(V,{px:`md`,py:`sm`,radius:`lg`,style:{borderColor:t?`var(--mantine-color-sherloq-7)`:void 0,backgroundColor:t?`var(--mantine-color-sherloq-0)`:`white`,transition:`all 0.2s ease`,cursor:`pointer`},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onClick:e=>{e.target.closest(`button, a, input[type="checkbox"]`)||i?.()}
1,children:(0,Y.jsxs)(Ae,{mih:55,gap:`md`,align:`center`,direction:`row`,wrap:`nowrap`,children:[(0,Y.jsx)(f,{style:{width:d?o(24):0,opacity:+!!d,overflow:`hidden`,transition:`all 0.2s ease`,display:`flex`,alignItems:`center`,justifyContent:`flex-start`},children:(0,Y.jsx)(He,{checked:t,onChange:r,color:`sherloq`,radius:`xs`,size:`md`,styles:{input:{cursor:`pointer`}}})}),(0,Y.jsx)(U,{w:280,children:(0,Y.jsx)(ct,{profile:e.profile,smallVersion:!0,hideActions:!0,lists:e.lists})}),(0,Y.jsx)(ce,{profile:e.profile}),(0,Y.jsxs)(B,{gap:`sm`,wrap:`nowrap`,w:180,children:[(0,Y.jsx)(F,{radius:`md`,src:e.profile.company?.logo,size:`sm`,name:e.profile.company?.name||`..`,variant:`filled`,color:`gray.4`}),(0,Y.jsx)(p,{fw:600,size:`sm`,c:`gray.8`,lineClamp:1,children:e.profile.company?.name||`No Company`})]}),(0,Y.jsxs)(B,{gap:`xl`,wrap:`nowrap`,style:{flex:1},children:[(0,Y.jsx)(u,{onClick:()=>g(e,`s`),children:(0,Y.jsx)(Pe,{label:`Posts`,withArrow:!0,children:(0,Y.jsxs)(B,{gap:6,miw:55,wrap:`nowrap`,justify:`space-between`,children:[(0,Y.jsx)(ft,{size:20,color:`#94a3b8`,stroke:1}),(0,Y.jsx)(p,{size:`sm`,fw:600,c:`#475569`,children:Xe(e.post_count)})]})})}),(0,Y.jsx)(u,{onClick:()=>g(e,`c`),children:(0,Y.jsx)(Pe,{label:`Comments`,withArrow:!0,children:(0,Y.jsxs)(B,{gap:6,miw:55,wrap:`nowrap`,justify:`space-between`,children:[(0,Y.jsx)(A,{size:20,color:`#94a3b8`,stroke:1}),(0,Y.jsx)(p,{size:`sm`,fw:600,c:`#475569`,children:Xe(e.comment_count)})]})})}),(0,Y.jsx)(u,{onClick:()=>g(e,`r`),children:(0,Y.jsx)(Pe,{label:`Reactions`,withArrow:!0,children:(0,Y.jsxs)(B,{gap:6,miw:55,wrap:`nowrap`,justify:`space-between`,children:[(0,Y.jsx)(et,{size:20,color:`#94a3b8`,stroke:1}),(0,Y.jsx)(p,{size:`sm`,fw:600,c:`#475569`,children:Xe(e.reaction_count)})]})})})]}),(0,Y.jsxs)(B,{gap:`sm`,wrap:`nowrap`,children:[C.map(t=>(0,Y.jsx)(se,{data:e.additional_data.enrichment,dataKey:t.dataKey,colorActive:t.color,icon:t.icon,onEnrich:()=>s?.(t.dataKey)},t.id)),(0,Y.jsx)(We,{orientation:`vertical`,h:34,mx:`xs`}),(0,Y.jsx)(Pe,{label:`Coming soon - Download contact`,withArrow:!0,children:(0,Y.jsx)(Fe,{variant:`subtle`,color:`gray.8`,radius:`md`,disabled:!0,children:(0,Y.jsx)(_e,{size:18})})}),(0,Y.jsx)(Pe,{label:`Delete`,withArrow:!0,children:(0,Y.jsx)(Fe,{variant:`subtle`,color:`red`,radius:`md`,onClick:a,children:(0,Y.jsx)(Ke,{size:20,stroke:1.5})})})]})]})})}function xt({watchlistItems:e,onSelectItem:t,onDeleteItem:n,onUpdateItemsLists:r,onDeleteItems:i,onEnrichItems:a}){let[o,s]=(0,J.useState)([]),[c,l]=(0,J.useState)([]),{contactLists:d}=w(!1),[f,m]=(0,J.useState)(!1),h=e=>{s(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},g=()=>s([]),ee=()=>{o.length===e?.length?s([]):s(e?.map(e=>e.id)||[])},v=o.length===e?.length,te=e?e.map(e=>(0,Y.jsx)(bt,{profile:e,selected:o.includes(e.id),onToggle:()=>h(e.id),onClick:()=>t(e),onDelete:()=>n(e.id,e.profile.name),onEnrich:t=>a([e.id],()=>{},t)},e.id)):[];return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(U,{gap:`md`,children:te.length>0?(0,Y.jsxs)(Y.Fragment,{children:[o.length>0&&(0,Y.jsx)(u,{onClick:ee,ml:`md`,children:(0,Y.jsxs)(B,{wrap:`nowrap`,gap:`xs`,children:[(0,Y.jsx)(G,{w:24,variant:`transparent`,children:v?(0,Y.jsx)(y,{size:20}):(0,Y.jsx)(ie,{size:20})}),(0,Y.jsx)(p,{size:`sm`,children:`All from current page`})]})}),te.map(e=>e)]}):(0,Y.jsx)(ze,{title:`No profiles found`,color:`blue`,children:`We cant find any profiles matching your search criteria or you dont have any profiles.`})}),(0,Y.jsx)(Le,{position:{bottom:20,left:`50%`},zIndex:90,children:(0,Y.jsx)(be,{transition:`slide-up`,mounted:o.length>0,children:e=>(0,Y.jsx)(V,{style:{...e,transform:`translateX(-50%)`},radius:`xl`,py:`xs`,px:`md`,bg:`sherloq.9`,withBorder:!1,children:(0,Y.jsxs)(Ae,{gap:`md`,wrap:`nowrap`,justify:`center`,align:`center`,direction:`row`,children:[(0,Y.jsxs)(Ne,{size:`lg`,radius:`md`,children:[o.length,` Selected`]}),(0,Y.jsx)(We,{orientation:`vertical`,h:28,color:`white`,opacity:.2}),(0,Y.jsxs)(_,{width:250,position:`top`,withArrow:!0,shadow:`md`,opened:f,children:[(0,Y.jsx)(_.Target,{children:(0,Y.jsx)(L,{variant:`subtle`,color:`white`,leftSection:(0,Y.jsx)(it,{size:16}),size:`compact-sm`,onClick:()=>m(e=>!e),children:`Add to List`})}),(0,Y.jsx)(_.Dropdown,{children:(0,Y.jsxs)(U,{children:[d&&d.map(e=>(0,Y.jsx)(He,{checked:c.includes(e.id),onChange:()=>{l(t=>t.includes(e.id)?t.filter(t=>t!==e.id):[...t,e.id])},label:(0,Y.jsx)(Ne,{variant:`outline`,style:{cursor:`pointer`},color:W(e.relation_type),children:e.name})},e.id)),(0,Y.jsx)(L,{size:`sm`,onClick:()=>r(o,c,()=>{l([]),m(!1)}),children:`Add to selected lists`})]})})]}),(0,Y.jsx)(L,{variant:`subtle`,color:`white`,leftSection:(0,Y.jsx)(Be,{size:16}),size:`compact-sm`,onClick:()=>a(o,()=>{s([]),l([])}),children:`Enrich`}),(0,Y.jsx)(L,{variant:`subtle`,color:`red.4`,c:`red.2`,leftSection:(0,Y.jsx)(Ke,{size:16}),size:`compact-sm`,onClick:()=>i(o,()=>{s([]),l([])}),children:`Delete`}),(0,Y.jsx)(We,{orientation:`vertical`,h:28,color:`white`,opacity:.2}),(0,Y.jsx)(Ie,{variant:`transparent`,c:`white`,onClick:g,size:`md`})]})})})})]})}var St=[{icon:E,label:`TOTAL PROFILES`,value:`124`,color:`gray`,iconColor:`#64748b`,iconBg:`#f1f5f9`,dataKey:`total`},{icon:Ge,label:`TARGETS`,value:`45`,color:`green`,iconColor:`#10b981`,iconBg:`#ecfdf5`,dataKey:`targets`},{icon:D,label:`COMPETITORS`,value:`12`,color:`red`,iconColor:`#ef4444`,iconBg:`#fef2f2`,dataKey:`competitors`},{icon:E,label:`NEUTRAL`,value:`67`,color:`blue`,iconColor:`#3b82f6`,iconBg:`#eff6ff`,dataKey:`neutral`}];function Ct({isLoading:e,stats:t}){return(0,Y.jsx)(Je,{cols:{base:1,sm:2,lg:4},spacing:`md`,mb:`xl`,children:St.map((n,r)=>(0,Y.jsx)(De,{p:`lg`,radius:`lg`,isLoading:e,children:(0,Y.jsxs)(B,{children:[(0,Y.jsx)(G,{size:48,color:n.color,variant:`light`,style:{backgroundColor:n.iconBg},children:(0,Y.jsx)(n.icon,{size:24,color:n.iconColor})}),(0,Y.jsxs)(f,{children:[(0,Y.jsx)(p,{size:`xs`,c:`dimmed`,fw:700,tt
1:`uppercase`,mb:4,children:n.label}),(0,Y.jsxs)(B,{align:`flex-end`,gap:4,children:[(0,Y.jsx)(p,{size:`1.75rem`,fw:700,lh:1,c:`#111827`,children:t?t.by_relation_type[n.dataKey]:`-`}),n.dataKey===`total`&&t&&(0,Y.jsxs)(p,{size:`lg`,c:`dimmed`,fw:500,mb:2,children:[`/ `,t.credits_available]})]})]})]})},r))})}function wt({...e}){let t=()=>{e.onClose()};return(0,Y.jsx)(ke,{title:`Manage watchlist`,position:`right`,size:`lg`,...e,children:(0,Y.jsx)(I,{externallyManaged:!1,onUpdateSuccess:t})})}var Tt=`/static/frontend/img/sherloq.svg`;function Et({title:e,description:t}){let r=n();return(0,Y.jsxs)(V,{ta:`center`,bg:`gray.1`,p:`xl`,radius:`md`,h:555,children:[(0,Y.jsx)(ye,{order:1,mt:`xl`,children:e}),(0,Y.jsx)(p,{size:`md`,mt:`md`,children:t}),(0,Y.jsx)(L,{mt:`md`,onClick:()=>r(`/connections`),children:`Manage connections`}),(0,Y.jsx)(qe,{src:Tt,h:320,w:`auto`,mx:`auto`})]})}var[Dt,Ot]=ee(`Dropzone component was not found in tree`);function kt(e){let t=t=>{let{children:n,...r}=l(`Dropzone${ut(e)}`,{},t),i=Ot(),a=h(n)?n:(0,Y.jsx)(`span`,{children:n});return i[e]?(0,J.cloneElement)(a,r):null};return t.displayName=`@mantine/dropzone/${ut(e)}`,t}var At=kt(`accept`),jt=kt(`reject`),Mt=kt(`idle`),Nt={root:`m_d46a4834`,inner:`m_b85f7144`,fullScreen:`m_96f6e9ad`,dropzone:`m_7946116d`},Pt=new Map([[`avif`,`image/avif`],[`bmp`,`image/bmp`],[`css`,`text/css`],[`csv`,`text/csv`],[`doc`,`application/msword`],[`docx`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`],[`gif`,`image/gif`],[`gz`,`application/gzip`],[`htm`,`text/html`],[`html`,`text/html`],[`ico`,`image/x-icon`],[`jpeg`,`image/jpeg`],[`jpg`,`image/jpeg`],[`js`,`application/javascript`],[`json`,`application/json`],[`md`,`text/markdown`],[`mjs`,`application/javascript`],[`mp3`,`audio/mpeg`],[`mp4`,`video/mp4`],[`ogg`,`audio/ogg`],[`pdf`,`application/pdf`],[`png`,`image/png`],[`ppt`,`application/powerpoint`],[`pptx`,`application/vnd.openxmlformats-officedocument.presentationml.presentation`],[`svg`,`image/svg+xml`],[`tif`,`image/tiff`],[`tiff`,`image/tiff`],[`txt`,`text/plain`],[`wasm`,`application/wasm`],[`wav`,`audio/x-wav`],[`weba`,`audio/webm`],[`webm`,`video/webm`],[`webp`,`image/webp`],[`xls`,`application/vnd.ms-excel`],[`xlsx`,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`],[`xml`,`application/xml`],[`zip`,`application/zip`]]),Ft=class extends Error{constructor(e){super(`DataTransferItem is not a file`),this.item=e,this.name=`UnexpectedObjectError`}};function It(e,t,n){let r=e,{webkitRelativePath:i}=e,a=typeof t==`string`?t:typeof i==`string`&&i.length>0?i:`./${e.name}`;return typeof r.path!=`string`&&Rt(r,`path`,a),n!==void 0&&Object.defineProperty(r,"handle",{value:n,writable:!1,configurable:!1,enumerable:!0}),Rt(r,`relativePath`,a),r}function Lt(e,t=Pt){let{name:n}=e;if(n&&n.lastIndexOf(`.`)!==-1&&!e.type){let r=n.split(`.`).pop().toLowerCase(),i=t.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Rt(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}var zt=[`.DS_Store`,`Thumbs.db`];async function Bt(e,{mimeTypes:t=Pt}={}){return(await Vt(e)).map(e=>e instanceof File?Lt(e,t):e)}async function Vt(e){return Gt(e)&&Ht(e.dataTransfer)?Jt(e.dataTransfer,e.type):Ut(e)?Yt(e.clipboardData):Wt(e)?Kt(e):Array.isArray(e)&&e.every(e=>`getFile`in e&&typeof e.getFile==`function`)?qt(e):[]}function Ht(e){return Gt(e)}function Ut(e){return Gt(e)&&Ht(e.clipboardData)}function Wt(e){return Gt(e)&&Gt(e.target)}function Gt(e){return typeof e==`object`&&!!e}function Kt(e){return Zt(e.target.files).map(e=>It(e))}async function qt(e){return(await Promise.all(e.map(e=>e.getFile()))).map(e=>It(e))}async function Jt(e,t){let n=Zt(e.items).filter(e=>e.kind===`file`);return t===`drop`?Xt($t(await Promise.all(n.map(Qt)))):n}function Yt(e){let t=Zt(e.items).filter(e=>e.kind===`file`).map(e=>e.getAsFile()).filter(e=>e!==null);return Xt((t.length>0?t:Zt(e.files)).map(e=>It(e)))}function Xt(e){return e.filter(e=>zt.indexOf(e.name)===-1)}function Zt(e){return e===null?[]:Array.from(e)}async function Qt(e){if(typeof e.webkitGetAsEntry!=`function`)return en(e);let t=e.webkitGetAsEntry();if(t?.isDirectory){let n=await tn(e);return n?.kind===`directory`?nn(n,`/${n.name}`):an(t)}return en(e,t)}function $t(e){let t=[];for(let n of e)Array.isArray(n)?t.push(...$t(n)):t.push(n);return t}async function en(e,t){let n=e.getAsFile(),r=await tn(e);if(r!=null){let e=n??await r.getFile();return e.handle=r,It(e)}if(!n)throw new Ft(e);return It(n,t?.fullPath??void 0)}async function tn(e){if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle==`function`)return e.getAsFileSystemHandle()}async function nn(e,t){let n=[];for await(let r of e.values()){let e=`${t}/${r.name}`;if(r.kind===`directory`)n.push(...await nn(r,e));else{let t=await r.getFile();n.push(It(t,e,r))}}return n}async function rn(e){return e.isDirectory?an(e):on(e)}function an(e){let t=e.createReader();
1return new Promise((e,n)=>{let r=[];function i(){t.readEntries(async t=>{if(t.length){let e=Promise.all(t.map(rn));r.push(e),i()}else try{e(await Promise.all(r))}catch(e){n(e)}},e=>{n(e)})}i()})}async function on(e){return new Promise((t,n)=>{e.file(n=>{t(It(n,e.fullPath))},e=>{n(e)})})}function sn(e,t){if(e&&t){let n=Array.isArray(t)?t:t.split(`,`);if(n.length===0)return!0;let r=e.name||``,i=(e.type||``).toLowerCase(),a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim().toLowerCase();return t.charAt(0)===`.`?r.toLowerCase().endsWith(t):t.endsWith(`/*`)?a===t.replace(/\/.*$/,``):i===t})}return!0}var cn=typeof sn==`function`?sn:sn.default,ln=`file-invalid-type`,un=`file-too-large`,dn=`file-too-small`,fn=`too-many-files`;function pn(e=``){let t=e.split(`,`);return{code:ln,message:`File type must be ${t.length>1?`one of ${t.join(`, `)}`:t[0]}`}}var mn=[`KB`,`MB`,`GB`,`TB`,`PB`];function hn(e){if(e<1024)return`${e} ${e===1?`byte`:`bytes`}`;let t=e/1024,n=0;for(;t>=1024&&n<mn.length-1;)t/=1024,n++;return`${Number(t.toFixed(2))} ${mn[n]}`}function gn(e){return{code:un,message:`File is larger than ${hn(e)}`}}function _n(e){return{code:dn,message:`File is smaller than ${hn(e)}`}}var vn={code:fn,message:`Too many files`};function yn(e){return e.type===``&&typeof e.getAsFile==`function`}function bn(e,t){let n=e.type===`application/x-moz-file`||cn(e,t??``)||yn(e);return[n,n?null:pn(t)]}function xn(e,t,n){if(X(e.size)){if(X(t)&&X(n)){if(e.size>n)return[!1,gn(n)];if(e.size<t)return[!1,_n(t)]}else if(X(t)&&e.size<t)return[!1,_n(t)];else if(X(n)&&e.size>n)return[!1,gn(n)]}return[!0,null]}function X(e){return e!=null}function Sn(e){return e!=null&&typeof e.then==`function`}function Cn({files:e,accept:t,minSize:n,maxSize:r,multiple:i,maxFiles:a=0,validator:o,getErrorMessage:s}){let c=[],l=[],u=(e,t)=>s&&typeof File<`u`&&t instanceof File?{...e,message:s(e,t)}:e;e.forEach(e=>{let[i,a]=bn(e,t),[o,s]=xn(e,n,r);i&&o?c.push(e):l.push({file:e,errors:[a,s].filter(e=>e!=null).map(t=>u(t,e))})});let d=i?a>=1?a:1/0:1;return c.length>d&&c.slice(d).forEach(e=>{l.push({file:e,errors:[u(vn,e)]})}),l.length>0?{verdict:`reject`,rejections:l}:{verdict:o?`unknown`:`accept`,rejections:l}}function wn(e){return typeof e.isPropagationStopped==`function`?e.isPropagationStopped():e.cancelBubble!==void 0&&e.cancelBubble}function Tn(e){let t=e.dataTransfer??e.clipboardData;return t?Array.prototype.some.call(t.types,e=>e===`Files`||e===`application/x-moz-file`)||Array.prototype.some.call(t.items??[],En):!!e.target&&!!e.target.files}function En(e){return typeof e==`object`&&!!e&&e.kind===`file`}function Dn(e){e.preventDefault()}function On(e){return e.indexOf(`MSIE`)!==-1||e.indexOf(`Trident/`)!==-1}function kn(e){return e.indexOf(`Edge/`)!==-1}function An(e=window.navigator.userAgent){return On(e)||kn(e)}function Z(...e){return(t,...n)=>e.some(e=>(!wn(t)&&e&&e(t,...n),wn(t)))}function jn(){return`showOpenFilePicker`in window}function Mn(e){return Array.isArray(e)?e:typeof e==`string`?[e]:[]}function Nn(e){if(X(e))return Array.isArray(e)?e.filter(e=>X(e)&&X(e.accept)):[{accept:e}]}function Pn(e){let t=[],n=Object.keys(e);for(let n of Object.values(e))for(let e of Mn(n))t.includes(e)||t.push(e);return t.length>0?t.join(`, `):n.length>0?n.join(`, `):`Files`}function Fn(e){let t=Nn(e);if(!X(t))return;let n={};for(let e of t)for(let[t,r]of Object.entries(e.accept)){let e=n[t]??(n[t]=[]);for(let t of Mn(r))e.includes(t)||e.push(t)}return n}function In(e){let t=Nn(e);if(!X(t))return;let n=t.map(e=>{let t=Object.entries(e.accept).filter(([e,t])=>{let n=!0;return Vn(e)||(console.warn(`Skipped "${e}" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.`),n=!1),(!(Array.isArray(t)||typeof t==`string`)||!Mn(t).every(Un))&&(console.warn(`Skipped "${e}" because an invalid file extension was provided.`),n=!1),n}).reduce((e,[t,n])=>(e[t]=Mn(n),e),{});return{description:X(e.description)&&e.description!==``?e.description:Pn(t),accept:t}}).filter(e=>Object.keys(e.accept).length>0);return n.length>0?n:void 0}function Ln(e,{omitWildcardMimeTypesWithExtensions:t=!1}={}){if(X(e))return Object.entries(e).reduce((e,[n,r])=>{let i=Mn(r);return t&&Hn(n)&&i.some(Un)?e.push(...i):e.push(n,...i),e},[]).filter(e=>Vn(e)||Un(e)).join(`,`)}function Rn(e){return e instanceof DOMException&&(e.name===`AbortError`||e.code===e.ABORT_ERR)}function zn(e){return e instanceof DOMException&&(e.name===`SecurityError`||e.code===e.SECURITY_ERR)}function Bn(e){return e instanceof DOMException&&e.name===`NotAllowedError`}function Vn(e){return e===`audio/*`||e===`video/*`||e===`image/*`||e===`text/*`||e===`application/*`||/\w+\/[-+.\w]+/g.test(e)}function Hn(e){return e.endsWith(`/*`)}function Un(e){return/^.*\.[\w]+$/.test(e)}var Wn=(0,J.forwardRef)(({children:e,...t},n)=>{let{open:r,...i}=Kn(t);return(0,J.useImperativeHandle)(n,()=>({open:r}),[r]),(0,Y.jsx)(Y.Fragment,{children:e?.({...i,open:r})})});Wn.displayName=`Dropzone`;var Gn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragUnknown:!1,isDragGlobal:!1,isProcessing:!1,acceptedFiles:[],fileRejections:[],dragFileRejections:[]};function Kn(e={}){let{accept:t,disabled:n=!1,getFilesFromEvent:r=Bt,maxSize:i=1/0,minSize:a=0,multiple:o=!0,maxFiles:s=0,onDragEnter:c,onDragLeave:l,onDragOver:u,onDrop:d,onDropAccepted:f,onDropRejected:p,onFileDialogCancel:m,onFileDialogOpen:h,useFsAccessApi:g=!1,autoFocus:_=!1,preventDropOnDocument:ee=!0,noClick:v=!1,noKeyboard:te=!1,noDrag:y=!1,noDragEventsBubbling:b=!1,noPaste:x=!1,onError:S,validator:C,getErrorMessage:w}=e,ne=(0,J.useMemo)(()=>Fn(t),[t]),re=(0,J.useMemo)(()=>Ln(ne),[ne]),ie=(0,J.useMemo)(()=>Ln(ne,{omitWildcardMimeTypesWithExtensions:!0}),[ne]),ae=(0,J.useMemo)(()=>In(t),[t]),oe=(0,J.useMemo)(()=>typeof h==`function`?h:Jn,[h]),se=(0,J.useMemo)(()=>typeof m==`function`?m:Jn,[m]),T=(0,J.useRef)(null),E=(0,J.useRef)(null),[ce,D]=(0,J.useReducer)(qn,Gn),{isFocused:le,isFileDialogActive:ue}=ce,O=(0,J.useRef)(ue);O.current=ue;let k=(0,J.useRef)(null),de=(0,J.useCallback)(()=>{k.current?.abort();let e=new AbortController;return k.current=e,D({type:`setProcessing`,isProcessing:!0}),e.signal},[]),A=(0,J.useCallback)(e=>{e.aborted||D({type:`setProcessing`,isProcessing:!1})},[]),fe=(0,J.useRef)(typeof window<`u`&&window.isSecureContext&&g&&jn()),pe=()=>{!fe.current&&ue&&setTimeout(()=>{if(E.current){let{files:e}=E.current;e?.length||(D({type:`closeDialog`}),se())}},300)};(0,J.useEffect)(()=>(window.addEventListener(`focus`,pe,!1),()=>{window.removeEventListener(`focus`,pe,!1)}),[E,ue,se,fe]);let j=(0,J.useRef)([]),M=(0,J.useRef)([]),me=e=>{T.current&&e.target&&T.current.contains(e.target)&&e.defaultPrevented||(e.preventDefault(),j.current=[])};(0,J.useEffect)(()=>(ee&&(document.addEventListener(`dragover`,Dn,!1),document.addEventListener(`drop`,me,!1)),()=>{ee&&(document.removeEventListener(`dragover`,Dn),document.removeEventListener(`drop`,me))}),[T,ee]),(0,J.useEffect)(()=>{let e=e=>{e.target&&(M.current=[...M.current,e.target]),Tn(e)&&D({isDragGlobal:!0,type:`setDragGlobal`})},t=e=>{M.current=M.current.filter(t=>t!==e.target&&t!==null),!(M.current.length>0)&&D({isDragGlobal:!1,type:`setDragGlobal`})},n=()=>{M.current=[],D({isDragGlobal:!1,type:`setDragGlobal`})},r=()=>
1{M.current=[],D({isDragGlobal:!1,type:`setDragGlobal`})};return document.addEventListener(`dragenter`,e,!1),document.addEventListener(`dragleave`,t,!1),document.addEventListener(`dragend`,n,!1),document.addEventListener(`drop`,r,!1),()=>{document.removeEventListener(`dragenter`,e),document.removeEventListener(`dragleave`,t),document.removeEventListener(`dragend`,n),document.removeEventListener(`drop`,r)}},[T]),(0,J.useEffect)(()=>(!n&&_&&T.current&&T.current.focus(),()=>{}),[T,_,n]);let N=(0,J.useCallback)(e=>{S?S(e):console.error(e)},[S]),he=(0,J.useCallback)(e=>{e.preventDefault(),e.persist?.(),Te(e),!O.current&&(j.current=[...j.current,e.target],Tn(e)&&Promise.resolve(r(e)).then(t=>{if(wn(e)&&!b)return;let n=t.length>0?Cn({files:t,accept:re,minSize:a,maxSize:i,multiple:o,maxFiles:s,validator:C,getErrorMessage:w}):null;D({isDragAccept:n?.verdict===`accept`,isDragReject:n?.verdict===`reject`,isDragUnknown:n?.verdict===`unknown`,isDragActive:!0,dragFileRejections:n?.rejections??[],type:`setDraggedFiles`}),c&&c(e)}).catch(e=>N(e)))},[r,c,N,b,re,a,i,o,s,C,w]),ge=(0,J.useCallback)(e=>{if(e.preventDefault(),e.persist?.(),Te(e),O.current)return!1;let t=Tn(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect=`copy`}catch{}return t&&u&&u(e),!1},[u,b]),_e=(0,J.useCallback)(e=>{e.preventDefault(),e.persist?.(),Te(e);let t=j.current.filter(e=>T.current?.contains(e)),n=t.indexOf(e.target);n!==-1&&t.splice(n,1),j.current=t,!(t.length>0)&&(D({type:`setDraggedFiles`,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragUnknown:!1,dragFileRejections:[]}),Tn(e)&&l&&l(e))},[T,l,b]),P=(0,J.useCallback)(async(e,t,n)=>{let r=(e,t)=>w?{...e,message:w(e,t)}:e,c=e=>{let n=[],i=[];e.forEach(({file:e,accepted:t,acceptError:a,sizeMatch:o,sizeError:s,customErrors:c})=>{if(t&&o&&!c)n.push(e);else{let t=[a,s];
1c&&(t=t.concat(c)),i.push({file:e,errors:t.filter(e=>e!=null).map(t=>r(t,e))})}});let a=o?s>=1?s:1/0:1;n.length>a&&n.splice(a).forEach(e=>{i.push({file:e,errors:[r(vn,e)]})}),D({acceptedFiles:n,fileRejections:i,type:`setFiles`}),d&&d(n,i,t),i.length>0&&p&&p(i,t),n.length>0&&f&&f(n,t)},l=e.map(e=>{let[t,n]=bn(e,ie),[r,o]=xn(e,a,i);return{file:e,accepted:t,acceptError:n,sizeMatch:r,sizeError:o,customErrors:C?C(e):null}});if(!l.some(({customErrors:e})=>Sn(e))){c(l);return}let u;try{u=await Promise.all(l.map(async({customErrors:e,...t})=>({...t,customErrors:await e})))}catch(e){n.aborted||(A(n),N(e));return}n.aborted||c(u)},[D,o,ie,a,i,s,d,f,p,C,w,N,A]),ve=(0,J.useCallback)(e=>{if(e.preventDefault(),e.persist?.(),Te(e),j.current=[],!(O.current&&e.dataTransfer)&&(D({type:`reset`}),Tn(e))){let t=de();Promise.resolve(r(e)).then(n=>{if(!t.aborted){if(wn(e)&&!b){A(t);return}return P(n,e,t)}}).catch(e=>{t.aborted||(A(t),N(e))})}},[r,P,N,b,de,A]),F=(0,J.useCallback)(e=>{if(!Tn(e))return;e.preventDefault(),e.persist?.(),Te(e);let t=de();Promise.resolve(r(e)).then(n=>{if(!t.aborted){if(wn(e)&&!b){A(t);return}return P(n,e,t)}}).catch(e=>{t.aborted||(A(t),N(e))})},[r,P,N,b,de,A]),I=(0,J.useCallback)(()=>{if(fe.current){D({type:`openDialog`}),oe();let e={multiple:o,types:ae},t;window.showOpenFilePicker(e).then(e=>(t=de(),r(e))).then(e=>{if(D({type:`closeDialog`}),!t.aborted)return P(e,null,t)}).catch(e=>{t&&A(t),Rn(e)?(se(e),D({type:`closeDialog`})):zn(e)||Bn(e)?(fe.current=!1,E.current?(E.current.value=``,E.current.click()):N(Error(`Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.`))):N(e)});return}E.current&&(D({type:`openDialog`}),oe(),E.current.value=``,E.current.click())},[D,oe,se,g,P,N,ae,o,de,A]),ye=(0,J.useCallback)(e=>{T.current?.isEqualNode(e.target)&&(e.key===` `||e.key===`Enter`||e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),I())},[T,I]),be=(0,J.useCallback)(()=>{D({type:`focus`})},[]),L=(0,J.useCallback)(()=>{D({type:`blur`})},[]),xe=(0,J.useCallback)(()=>{v||(An()?setTimeout(I,0):I())},[v,I]),R=e=>n?null:e,Se=e=>te?null:R(e),Ce=e=>y?null:R(e),we=e=>x?null:R(e),Te=e=>{b&&e.stopPropagation()},z=(0,J.useMemo)(()=>({refKey:e=`ref`,role:t,onKeyDown:r,onFocus:i,onBlur:a,onClick:o,onDragEnter:s,onDragOver:c,onDragLeave:l,onDrop:u,onPaste:d,...f}={})=>({onKeyDown:Se(Z(r,ye)),onFocus:Se(Z(i,be)),onBlur:Se(Z(a,L)),onClick:R(Z(o,xe)),onDragEnter:Ce(Z(s,he)),onDragOver:Ce(Z(c,ge)),onDragLeave:Ce(Z(l,_e)),onDrop:Ce(Z(u,ve)),onPaste:we(Z(d,F)),role:typeof t==`string`&&t!==``?t:`presentation`,[e]:T,...!n&&!te?{tabIndex:0}:{},...n?{"aria-disabled":!0}:{},...f}),[T,ye,be,L,xe,he,ge,_e,ve,F,te,y,x,n]),Ee=(0,J.useCallback)(e=>{e.stopPropagation()},[]),B=(0,J.useMemo)(()=>({refKey:e=`ref`,onChange:t,onClick:n,...r}={})=>({accept:ie,multiple:o,type:`file`,"aria-label":`file upload`,style:{border:0,display:`block`,height:0,margin:0,opacity:0,overflow:`hidden`,padding:0,width:0},onChange:R(Z(t,ve)),onClick:R(Z(n,Ee)),tabIndex:-1,[e]:E,...r}),[E,t,o,ve,n]);return{...ce,isFocused:le&&!n,getRootProps:z,getInputProps:B,rootRef:T,inputRef:E,open:R(I)}}function qn(e,t){switch(t.type){case`focus`:return{...e,isFocused:!0};case`blur`:return{...e,isFocused:!1};case`openDialog`:return{...Gn,isFileDialogActive:!0};case`closeDialog`:return{...e,isFileDialogActive:!1};case`setDraggedFiles`:return{...e,isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject,isDragUnknown:t.isDragUnknown,dragFileRejections:t.dragFileRejections};case`setProcessing`:return{...e,isProcessing:t.isProcessing};case`setFiles`:return{...e,acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,dragFileRejections:[],isProcessing:!1,isDragReject:!1,isDragUnknown:!1};case`setDragGlobal`:return{...e,isDragGlobal:t.isDragGlobal};case`reset`:return{...Gn};default:return e}}function Jn(){}function Yn(e){let t=e,{webkitRelativePath:n}=e,r=typeof n==`string`&&n.length>0?n:`./${e.name}`;return typeof t.path!=`string`&&Object.defineProperty(e,"path",{value:r,writable:!1,
1configurable:!0}),typeof t.relativePath!=`string`&&Object.defineProperty(e,"relativePath",{value:r,writable:!1,configurable:!0}),e}function Xn(e){return async t=>(await e(t)).map(e=>e instanceof File?Yn(e):e)}var Zn={multiple:!0,maxSize:1/0,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,useFsAccessApi:!1,variant:`light`,rejectColor:`red`},Qn=s((e,{radius:t,variant:n,acceptColor:r,rejectColor:i})=>{let a=e.variantColorResolver({color:r||e.primaryColor,theme:e,variant:n}),o=e.variantColorResolver({color:i||`red`,theme:e,variant:n});return{root:{"--dropzone-radius":m(t),"--dropzone-accept-color":a.color,"--dropzone-accept-bg":a.background,"--dropzone-reject-color":o.color,"--dropzone-reject-bg":o.background}}}),Q=c(e=>{let t=l(`Dropzone`,Zn,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,disabled:u,loading:p,multiple:m,maxSize:h,accept:g,children:_,onDropAny:ee,onDrop:v,onReject:te,openRef:y,name:b,maxFiles:x,autoFocus:S,activateOnClick:C,activateOnDrag:w,dragEventsBubbling:ne,activateOnKeyboard:re,onDragEnter:ie,onDragLeave:ae,onDragOver:oe,onFileDialogCancel:se,onFileDialogOpen:T,preventDropOnDocument:E,useFsAccessApi:ce,getFilesFromEvent:D,validator:le,rejectColor:ue,acceptColor:O,enablePointerEvents:de,loaderProps:A,inputProps:fe,mod:pe,attributes:j,...M}=t,me=d({name:`Dropzone`,classes:Nt,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:j,vars:s,varsResolver:Qn}),{getRootProps:N,getInputProps:he,isDragAccept:ge,isDragReject:_e,isDragActive:P,open:ve}=Kn({onDrop:ee,onDropAccepted:v,onDropRejected:te,disabled:u||p,accept:Array.isArray(g)?g.reduce((e,t)=>({...e,[t]:[]}),{}):g,multiple:m,maxSize:h,maxFiles:x,autoFocus:S,noClick:!C,noDrag:!w,noDragEventsBubbling:!ne,noKeyboard:!re,onDragEnter:ie,onDragLeave:ae,onDragOver:oe,onFileDialogCancel:se,onFileDialogOpen:T,preventDropOnDocument:E,useFsAccessApi:ce,validator:le,...D?{getFilesFromEvent:Xn(D)}:null});Ee(y,ve);let F=P&&ge,I=P&&_e,ye=!F&&!I;return(0,Y.jsx)(Dt,{value:{accept:F,reject:I,idle:ye},children:(0,Y.jsxs)(f,{...N(),...me(`root`,{focusable:!0}),...M,mod:[{accept:F,reject:I,idle:ye,disabled:u,loading:p,"activate-on-click":C},pe],children:[(0,Y.jsx)(k,{visible:p,overlayProps:{radius:c},unstyled:o,loaderProps:A}),(0,Y.jsx)(`input`,{...he(fe),name:b}),(0,Y.jsx)(`div`,{...me(`inner`),"data-enable-pointer-events":de||void 0,children:_})]})})});Q.classes=Nt,Q.varsResolver=Qn,Q.displayName=`@mantine/dropzone/Dropzone`,Q.Accept=At,Q.Idle=Mt,Q.Reject=jt;var $n={maxSize:1/0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,active:!0,zIndex:v(`max`),withinPortal:!0},er=c(e=>{let t=l(`DropzoneFullScreen`,$n,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,active:c,onDrop:u,onReject:p,zIndex:m,withinPortal:h,portalProps:_,attributes:ee,mod:v,...te}=t,y=d({name:`DropzoneFullScreen`,classes:Nt,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:ee,rootSelector:`fullScreen`}),{resolvedClassNames:b,resolvedStyles:x}=Me({classNames:n,styles:a,props:t}),[S,C]=(0,J.useState)(0),[w,{open:ne,close:re}]=Oe(!1),ie=e=>{e.dataTransfer?.types.includes(`Files`)&&(C(e=>e+1),ne())},ae=()=>{C(e=>e-1)};return(0,J.useEffect)(()=>{S===0&&re()},[S]),(0,J.useEffect)(()=>{if(c)return document.addEventListener(`dragenter`,ie,!1),document.addEventListener(`dragleave`,ae,!1),()=>{document.removeEventListener(`dragenter`,ie,!1),document.removeEventListener(`dragleave`,ae,!1)}},[c]),(0,Y.jsx)(g,{..._,withinPortal:h,children:(0,Y.jsx)(f,{...y(`fullScreen`,{style:{opacity:+!!w,pointerEvents:w?`all`:`none`,zIndex:m}}),children:(0,Y.jsx)(Q,{activateOnClick:!1,...te,classNames:b,styles:x,unstyled:o,className:Nt.dropzone,onDrop:e=>{u?.(e),re(),C(0)},onReject:e=>{p?.(e),re(),C(0)}})})})});er.classes=Nt,er.displayName=`@mantine/dropzone/DropzoneFullScreen`;var $={png:`image/png`,gif:`image/gif`,jpeg:`image/jpeg`,svg:`image/svg+xml`,webp:`image/webp`,avif:`image/avif`,heic:`image/heic`,heif:`image/heif`,mp4:`video/mp4`,zip:`application/zip`,rar:`application/x-rar`,"7z":`application/x-7z-compressed`,csv:`text/csv`,pdf:`application/pdf`,doc:`application/msword`,docx:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,xls:`application/vnd.ms-excel`,xlsx:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,ppt:`application/vnd.ms-powerpoint`,pptx:`application/vnd.openxmlformats-officedocument.presentationml.presentation`,exe:`application/vnd.microsoft.portable-executable`};$.png,$.gif,$.jpeg,$.svg,$.webp,$.avif,$.heic,$.heif,$.pdf,$.doc,$.docx,$.xls,$.xlsx,$.ppt,$.pptx,$.exe,Q.FullScreen=er;var tr=Q;function nr({profiles:e,profilesToAdd:t,setProfilesToAdd:n,submittingValues:r,onSubmitValue:i,pageSize:a=10}){let[o,s]=(0,J.useState)(1),[c,l]=(0,J.useState)(!0),u=(0,J.useMemo)(()=>e.filter(e=>!c||!e.in_watchlist),[e,c]),d=(0,J.useMemo)(()=>e.filter(e=>!e.in_watchlist),[e]),f=Math.max(1,Math.ceil(u.length/a));(0,J.useEffect)(()=>{o>f&&s(1)},[f,o]);let p=u.slice((o-1)*a,o*a);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(x,{profiles:p,profilesToAdd:t,setProfilesToAdd:n,submittingValues:r,onSubmitValue:i,additionalFilter:(0,Y.jsxs)(B,{wrap:`nowrap`,children:[(0,Y.jsx)(Ye,{checked:c,onChange:e=>l(e.currentTarget.checked),label:`Hide added profiles`}),(0,Y.jsx)(L,{size:`compact-sm`,onClick:()=>{t.length>=d.length?n([]):n(d)},children:t.length>=d.length?`Deselect all`:`Select all`})]})}),(0,Y.jsx)(S,{total:f,value:o,onChange:s,mt:`sm`,hideWithOnePage:!0})]})}function rr({onSubmitValue:e,submittingValues:t}){let[n,r]=(0,J.useState)(!1),[i,a]=(0,J.useState)([]),[o,s]=(0,J.useState)([]);return i.length>0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(L,{size:`compact-sm`,onClick:()=>a([]),mb:`md`,leftSection:(0,Y.jsx)(xe,{size:14}),children:`Upload another file`}),(0,Y.jsx)(nr,{profiles:i,profilesToAdd:o,setProfilesToAdd:s,submittingValues:t,onSubmitValue:e})]}):(0,Y.jsx)(tr,{onDrop:e=>{if(e.length===0)return;r(!0);let t=new FormData;t.append(`file`,e[0]),K.post(`/crm/watchlist/upload/`,t,{headers:{Accept:`application/json`,"Content-Type":`multipart/form-data`}}).then(e=>{a(e.data),s([])}).catch(e=>{e.response&&e.response.status===400&&e.response.data&&typeof e.response.data==`object`&&`error`in e.response.data?Ze(`Error uploading file: ${e.response.data.error}`):Ze(`Failed to upload file. Please try again later.`)}).finally(()=>r(!1))},maxFiles:1,maxSize:5*1024**2,accept:[$.csv,$.xls,$.xlsx],loading:n,children:(0,Y.jsxs)(B,{justify:`center`,gap:`xl`,mih:220,style:{pointerEvents:`none`},children:[(0,Y.jsx)(tr.Accept,{children:(0,Y.jsx)(vt,{size:52,color:`var(--mantine-color-blue-6)`,stroke:1.5})}),(0,Y.jsx)(tr.Reject,{children:(0,Y.jsx)(xe,{size:52,color:`var(--mantine-color-red-6)`,stroke:1.5})}),(0,Y.jsx)(tr.Idle,{children:(0,Y.jsx)(mt,{size:52,color:`var(--mantine-color-dimmed)`,stroke:1.5})}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(p,{size:`xl`,inline:!0,children:`Drag an Excel or CSV file here with LinkedIn profile URLs`}),(0,Y.jsx)(p,{size:`sm`,c:`dimmed`,inline:!0,mt:7,children:`Or click to select a file. The uploaded file should not exceed 5mb.`})]})]})})}function ir({onSubmitValue:e,submittingValues:t}){let[n,r]=(0,J.useState)(``),[i,a]=(0,J.useState)([]),{data:o,fetchNextPage:s,hasNextPage:c,isFetching:l,isFetchingNextPage:u,isPending:d}=ue({queryKey:[`linkedin`,`profile`,`contact_selector_2`,n],queryFn:({pageParam:e})=>K.get(`/linkedin/contacts/`,{params:{search:n,cursor:e}}).then(e=>e.data),initialPageParam:null,getNextPageParam:e=>e.next_cursor||null,staleTime:6e4,meta:{errorMessage:`Failed to load contacts.`}}),p=o?o.pages.flatMap(e=>e.results):[];return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Se,{placeholder:`Search contact`,onSearch:e=>{r(e)}}),(0,Y.jsx)(f,{mt:`md`,children:(0,Y.jsxs)(ot,{isPending:d,isFetching:l&&!u,children:[o?p.length===0?(0,Y.jsx)(ze,{variant:`light`,color:`blue`,title:`No contacts found`,icon:(0,Y.jsx)(rt,{})}):(0,Y.jsx)(x,{profiles:p,profilesToAdd:i,setProfilesToAdd:a,submittingValues:t,onSubmitValue:e}):null,c&&(0,Y.jsx)(B,{justify:`center`,mt:`md`,children:(0,Y.jsx)(L,{onClick:()=>s(),loading:u,variant:`light`,size:`sm`,children:`Load more`})})]})})]})}function ar({onSubmitValue:e,submittingValues:t,selectedPublicId:n}){let[r,i]=(0,J.useState)(null),[a,o]=(0,J.useState)([]),[s,c]=(0,J.useState)(1),[l,u]=(0,J.useState)([]),[d,p]=(0,J.useState)([]),m=l.length>0||d.length>0,{data:h,isFetching:g,isPending:_}=Ve({queryKey:[`watchlist`,`similar`,l,d,s],queryFn:()=>
1{if(!m)return null;let e={page:s},t={list_ids:l?l.map(e=>e.value):[],profile_ids:d?d.map(e=>e.profile.id):[]};return K.post(`/crm/watchlist/similar/`,t,{params:e}).then(e=>e.data)},meta:{errorMessage:`Failed to load similar profiles.`}});return(0,J.useEffect)(()=>{!r&&n&&K.get(`/crm/watchlist/${n}/`).then(e=>{let t=e.data;i(t),p(e=>!t||typeof t!=`object`||e.some(e=>e.id===t.id)?e:[...e,t])}).catch(()=>{Ze(`Failed to load profile ${n}.`)})},[n,r]),(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(ne,{selectedLists:l,onSelectedListsChange:e=>{c(1),u(e)},selectedProfiles:d,onSelectedProfilesChange:e=>{c(1),p(e)},completeWatchlistOnEmpty:!1}),(0,Y.jsx)(f,{mt:`md`,children:m?(0,Y.jsxs)(ot,{isPending:_,isFetching:g,children:[!h||!m?null:h.count===0?(0,Y.jsx)(ze,{variant:`light`,color:`blue`,title:`No similar profiles found`,icon:(0,Y.jsx)(rt,{})}):(0,Y.jsx)(x,{profiles:h?.results,profilesToAdd:a,setProfilesToAdd:o,submittingValues:t,onSubmitValue:e}),h&&(0,Y.jsx)(S,{total:h.pages,value:s,onChange:c,mt:`sm`,hideWithOnePage:!0})]}):(0,Y.jsx)(ze,{variant:`light`,color:`blue`,title:`Select at least one list or profile`,icon:(0,Y.jsx)(rt,{})})})]})}var or=()=>{let e=n();return(0,Y.jsxs)(ze,{variant:`light`,color:`red`,title:`All watchlist credits used`,icon:(0,Y.jsx)(yt,{}),mb:`md`,children:[`You have used all your watchlist credits. Please delete some items or upgrade your subscription to add more items to your watchlist.`,(0,Y.jsx)(L,{ml:`sm`,size:`compact-xs`,onClick:()=>e(`/settings/billing`),children:`Check out plans`})]})};function sr({similarSearch:e,openTab:t,...n}){let[r,i]=(0,J.useState)(!1),[a,o]=(0,J.useState)(`url`),{allWatchlistUsed:s}=M();(0,J.useEffect)(()=>{e?o(`lookalike`):t&&o(t)},[e,t]);let c=(e,t)=>{i(!0);try{$e.event(`watchlist-profile-added`)}catch{}K.post(`/crm/watchlist/`,e).then(()=>{t(),n.onClose()}).catch(e=>{e.response?.data&&e.response?.data.constructor===Array&&e.response.data.length>0&&e.response.data[0].subscription_error?Ze(e.response?.data[0].subscription_error):Ze(`Error adding watchlist items.`,e.response)}).finally(()=>i(!1))},{connections:l}=oe(),u=l?lt.filter(e=>e.search&&l[e.key]):[],d=u.map(e=>(0,Y.jsx)(z.Tab,{value:e.key,leftSection:(0,Y.jsx)(qe,{w:12,src:e.logo}),children:e.name},`connection`)),f=u.map(e=>(0,Y.jsxs)(z.Panel,{value:e.key,children:[s&&(0,Y.jsx)(or,{}),e.Component&&(0,Y.jsx)(e.Component,{onSubmitValue:c,submittingValues:r})]},e.key));return(0,Y.jsx)(N,{headerSection:(0,Y.jsx)(p,{fw:500,children:`Add to Watchlist`}),...n,children:(0,Y.jsxs)(z,{value:a,onChange:o,id:`add-watchlist-tabs`,children:[(0,Y.jsxs)(z.List,{mb:`xl`,children:[(0,Y.jsx)(z.Tab,{value:`url`,leftSection:(0,Y.jsx)(_t,{size:14}),children:`URL`}),(0,Y.jsx)(z.Tab,{value:`contacts`,leftSection:(0,Y.jsx)(dt,{size:14}),children:`Contacts`}),(0,Y.jsx)(z.Tab,{value:`lookalike`,leftSection:(0,Y.jsx)(pe,{size:14}),children:`Lookalike`}),(0,Y.jsx)(z.Tab,{value:`upload`,leftSection:(0,Y.jsx)(ht,{size:14}),children:`Upload`}),l&&d?.length==0&&(0,Y.jsx)(z.Tab,{value:`connections`,leftSection:(0,Y.jsx)(gt,{size:14}),children:`Connections`}),d]}),(0,Y.jsxs)(z.Panel,{value:`url`,children:[s&&(0,Y.jsx)(or,{}),(0,Y.jsx)(ae,{minProfiles:1,onSubmitValue:c,loading:r,paperProps:{shadow:`none`,p:`md`}})]}),(0,Y.jsxs)(z.Panel,{value:`contacts`,children:[s&&(0,Y.jsx)(or,{}),(0,Y.jsx)(ir,{onSubmitValue:c,submittingValues:r})]}),(0,Y.jsxs)(z.Panel,{value:`lookalike`,children:[s&&(0,Y.jsx)(or,{}),(0,Y.jsx)(ar,{onSubmitValue:c,submittingValues:r,selectedPublicId:e})]}),(0,Y.jsxs)(z.Panel,{value:`upload`,children:[s&&(0,Y.jsx)(or,{}),(0,Y.jsx)(rr,{onSubmitValue:c,submittingValues:r})]}),(0,Y.jsx)(z.Panel,{value:`connections`,children:(0,Y.jsx)(Et,{title:`Add external Connections`,description:`You have credits from tools such as coresignal, Apollo.io, FullEnrich, Cognism, and more?
2                     Sherloq runs these tools to enusre you have the best experience. Just add your API key in our connection settings.`})}),f]})})}var cr=[{icon:_t,label:`LinkedIn URL`,teaser:`Paste one or more profile links`}
2,{icon:dt,label:`Contacts`,teaser:`Pick from your own LinkedIn contacts`}],lr=[{icon:at,label:`From a profile`,teaser:`Hit the plus button on any profile as you browse`},{icon:nt,label:`From a post`,teaser:`Grab everyone who liked or commented`}];function ur({icon:e,label:t,teaser:n}){return(0,Y.jsx)(V,{withBorder:!0,radius:`md`,p:`sm`,children:(0,Y.jsxs)(B,{gap:`sm`,wrap:`nowrap`,style:{minWidth:0},children:[(0,Y.jsx)(G,{variant:`light`,color:`sherloq`,radius:`md`,size:`lg`,children:(0,Y.jsx)(e,{size:18,stroke:1.8})}),(0,Y.jsxs)(f,{style:{minWidth:0},children:[(0,Y.jsx)(p,{size:`sm`,fw:700,children:t}),(0,Y.jsx)(p,{size:`xs`,c:`dimmed`,children:n})]})]})})}function dr({children:e}){return(0,Y.jsx)(p,{size:`xs`,fw:700,c:`dimmed`,tt:`uppercase`,style:{letterSpacing:.6},children:e})}function fr(){return(0,Y.jsxs)(U,{gap:`sm`,children:[(0,Y.jsx)(dr,{children:`In Sherloq`}),cr.map(e=>(0,Y.jsx)(ur,{...e},e.label)),(0,Y.jsx)(V,{withBorder:!0,radius:`md`,p:`xs`,children:(0,Y.jsx)(p,{size:`xs`,c:`dimmed`,fw:600,ta:`center`,children:`Lookalike & Upload`})}),(0,Y.jsx)(dr,{children:`On LinkedIn (extension)`}),lr.map(e=>(0,Y.jsx)(ur,{...e},e.label))]})}function pr(){return(0,Y.jsxs)(U,{gap:8,children:[(0,Y.jsx)(V,{withBorder:!0,radius:`md`,p:`xs`,bg:`gray.0`,children:(0,Y.jsxs)(B,{wrap:`nowrap`,gap:`xs`,children:[(0,Y.jsx)(H,{placeholder:`Add the name of the Watchlist`,size:`sm`,readOnly:!0,style:{flex:1}}),(0,Y.jsxs)(f,{style:{position:`relative`,flexShrink:0},children:[(0,Y.jsx)(Fe,{variant:`light`,color:`gray`,size:`lg`,radius:`md`,children:(0,Y.jsx)(E,{style:{width:`80%`,height:`80%`},stroke:1.5})}),(0,Y.jsx)(hr,{})]}),(0,Y.jsx)(Fe,{variant:`filled`,color:`sherloq`,size:`lg`,radius:`xl`,style:{flexShrink:0},children:(0,Y.jsx)(Ke,{size:18,stroke:1.5})})]})}),(0,Y.jsx)(B,{justify:`flex-end`,children:(0,Y.jsxs)(V,{shadow:`md`,withBorder:!0,radius:`md`,p:4,w:190,children:[(0,Y.jsx)(mr,{label:`Competitor`}),(0,Y.jsx)(mr,{label:`Target`}),(0,Y.jsx)(mr,{label:`Neutral`,checked:!0})]})})]})}function mr({label:e,checked:t}){return(0,Y.jsxs)(B,{gap:`xs`,wrap:`nowrap`,px:`xs`,py:6,style:{borderRadius:6},bg:t?`gray.0`:void 0,children:[(0,Y.jsx)(f,{w:16,style:{flexShrink:0},children:t&&(0,Y.jsx)(R,{size:16,color:`var(--mantine-color-gray-6)`})}),(0,Y.jsx)(p,{size:`sm`,fw:t?700:500,children:e})]})}function hr(){return(0,Y.jsxs)(f,{style:{position:`absolute`,top:24,left:18,display:`flex`,alignItems:`center`,gap:4,zIndex:3,pointerEvents:`none`},children:[(0,Y.jsx)(`svg`,{width:18,height:18,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,Y.jsx)(`path`,{d:`M5 3l14 7-6 2-2 6-6-15z`,fill:`var(--mantine-color-dark-6)`,stroke:`white`,strokeWidth:1.2,strokeLinejoin:`round`})}),(0,Y.jsx)(G,{component:`span`,variant:`filled`,color:`sherloq`,radius:`xl`,style:{width:`auto`,paddingInline:8,height:20},children:(0,Y.jsx)(p,{size:`10px`,fw:700,c:`white`,children:`Click`})})]})}var gr={T:{label:`Target`,color:`lime`,icon:Ge},C:{label:`Competitor`,color:`red`,icon:D},N:{label:`Neutral`,color:`gray`,icon:E}};function _r({type:e}){let{label:t,color:n,icon:r}=gr[e];return(0,Y.jsx)(Ne,{color:n,variant:`light`,radius:`sm`,leftSection:(0,Y.jsx)(r,{size:12,stroke:2}),tt:`none`,fw:600,children:t})}function vr({name:e}){return(0,Y.jsx)(V,{withBorder:!0,radius:`md`,p:`sm`,children:(0,Y.jsxs)(B,{gap:`sm`,wrap:`nowrap`,style:{minWidth:0},children:[(0,Y.jsx)(G,{variant:`light`,color:`sherloq`,radius:`md`,size:`lg`,children:(0,Y.jsx)(br,{})}),(0,Y.jsx)(p,{size:`sm`,fw:700,truncate:!0,children:e})]})})}function yr({name:e,type:t}){return(0,Y.jsxs)(V,{withBorder:!0,radius:`md`,p:`sm`,bg:`gray.0`,children:[(0,Y.jsxs)(B,{gap:6,wrap:`nowrap`,mb:`sm`,style:{minWidth:0},children:[(0,Y.jsx)(G,{variant:`light`,color:`gray`,radius:`sm`,size:`sm`,children:(0,Y.jsx)(br,{})}),(0,Y.jsx)(p,{size:`sm`,fw:700,truncate:!0,children:e})]}),(0,Y.jsx)(_r,{type:t})]})}function br(){return(0,Y.jsx)(`svg`,{width:16,height:16,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,Y.jsx)(`path`,{d:`M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z`,stroke:`currentColor`,strokeWidth:1.8,strokeLinejoin:`round`})})}function xr(){return(0,Y.jsxs)(U,{gap:`lg`,children:[(0,Y.jsx)(pr,{}),(0,Y.jsxs)(Je,{cols:2,spacing:`sm`,children:[(0,Y.jsx)(yr,{name:`Leads`,type:`T`}),(0,Y.jsx)(yr,{name:`Customers`,type:`T`}),(0,Y.jsx)(yr,{name:`Competitors`,type:`C`}),(0,Y.jsx)(yr,{name:`Experts`,type:`N`})]})]})}function Sr(){return(0,Y.jsxs)(U,{gap:`sm`,children:[(0,Y.jsx)(vr,{name:`Leads`}),(0,Y.jsx)(vr,{name:`Customers`}),(0,Y.jsx)(vr,{name:`Competitors`}),(0,Y.jsx)(vr,{name:`Experts & Influencers`}),(0,Y.jsx)(p,{size:`xs`,c:`dimmed`,ta:`center`,mt:2,children:`N
2ame them however you like. These four are just a strong start.`})]})}var Cr=[{name:`Alex Rivera`,company:`Northwind Labs`,score:88,color:`green`,avatar:`#4c6ef5`},{name:`Jordan Blake`,company:`Acme Cloud`,score:64,color:`yellow`,avatar:`#e8590c`},{name:`Sam Okafor`,company:`Bright Ventures`,score:27,color:`gray`,avatar:`#ae3ec9`}];function wr(){return(0,Y.jsxs)(U,{gap:`sm`,children:[Cr.map(({name:e,company:t,score:n,color:r})=>(0,Y.jsx)(V,{withBorder:!0,radius:`md`,p:`sm`,children:(0,Y.jsxs)(B,{justify:`space-between`,wrap:`nowrap`,gap:`sm`,children:[(0,Y.jsxs)(B,{gap:`sm`,wrap:`nowrap`,style:{minWidth:0},children:[(0,Y.jsx)(F,{name:e,color:`initials`,radius:`xl`,size:`md`}),(0,Y.jsxs)(f,{style:{minWidth:0},children:[(0,Y.jsx)(p,{size:`sm`,fw:600,truncate:!0,children:e}),(0,Y.jsx)(p,{size:`xs`,c:`dimmed`,truncate:!0,children:t})]})]}),(0,Y.jsx)(Tr,{value:n,color:r,size:48})]})},e)),(0,Y.jsxs)(V,{withBorder:!0,radius:`md`,p:`sm`,bg:`gray.0`,children:[(0,Y.jsx)(p,{size:`xs`,c:`dimmed`,fw:600,ta:`center`,mb:`xs`,children:`Every score is built from three values.`}),(0,Y.jsxs)(B,{grow:!0,preventGrowOverflow:!1,wrap:`nowrap`,children:[(0,Y.jsx)(Er,{label:`Persona`,value:90,color:`green`}),(0,Y.jsx)(Er,{label:`Company`,value:86,color:`green`}),(0,Y.jsx)(Er,{label:`Confidence`,value:92,color:`blue`})]})]})]})}function Tr({value:e,color:t,size:n}){return(0,Y.jsx)(j,{size:n,thickness:4,roundCaps:!0,sections:[{value:e,color:t}],style:{flexShrink:0},label:(0,Y.jsx)(p,{c:t,fw:700,ta:`center`,size:`sm`,children:e})})}function Er({label:e,value:t,color:n}){return(0,Y.jsxs)(U,{gap:0,align:`center`,children:[(0,Y.jsx)(j,{size:40,thickness:3,roundCaps:!0,sections:[{value:t,color:n}],label:(0,Y.jsx)(Ue,{children:(0,Y.jsx)(p,{size:`xs`,fw:700,children:t})})}),(0,Y.jsx)(p,{size:`xs`,c:`dimmed`,fw:500,children:e})]})}function Dr(){return(0,Y.jsxs)(U,{gap:`md`,children:[(0,Y.jsx)(V,{withBorder:!0,radius:`md`,p:`sm`,children:(0,Y.jsxs)(B,{gap:`sm`,wrap:`nowrap`,children:[(0,Y.jsx)(G,{variant:`light`,color:`orange`,radius:`xl`,size:`md`,children:(0,Y.jsx)(P,{size:16})}),(0,Y.jsx)(p,{size:`sm`,fw:700,children:`Competitor interaction`})]})}),(0,Y.jsxs)(B,{gap:0,wrap:`nowrap`,justify:`center`,children:[(0,Y.jsx)(_r,{type:`T`}),(0,Y.jsx)(f,{style:{flex:1,maxWidth:90,margin:`0 8px`,borderTop:`2px dashed var(--mantine-color-gray-4)`}}),(0,Y.jsx)(_r,{type:`C`})]})]})}var Or=[{value:`watchlist`,steps:[{title:`What is a Watchlist?`,body:`Think of a watchlist as an empty folder you name yourself. One for leads, one for customers, one for competitors, one for the experts and influencers in your space. We recommend starting with those four. Inside each folder you collect the LinkedIn people you want Sherloq to keep an eye on. Sherloq then tracks everything they do on LinkedIn and surfaces what actually matters to you.`,demo:(0,Y.jsx)(Sr,{})},{title:`Give every folder a tag`,body:`The folder name is yours to choose. The tag is one of exactly three fixed types, Target, Competitor or Neutral. The name is just a label for you; the tag is what Sherloq reads. So a Leads folder and a Customers folder are both tagged Target, Competitors is tagged Competitor, and experts you only want to observe are Neutral. Set the tag when you create or manage a folder.`,demo:(0,Y.jsx)(xr,{})},{title:`Why the tag matters`,body:`This is the important part. Sherloq tracks everyone on your watchlist, but the tag is how it judges relevance. Tag your buyers as Targets and Sherloq weights their signals for ICP fit. Tag your rivals as Competitors and Sherloq can spot when one of your targets engages with them, so it warns you in time. Skip the tags and Sherloq still watches, but it can no longer tell a competitor move from any other activity.`,demo:(0,Y.jsx)(Dr,{})},{title:`Fill your folders`,body:`Add people in whatever way fits the moment. Inside Sherloq you can paste a LinkedIn URL, pick from your own contacts, run a lookalike search, or upload an Excel or CSV file (a LinkedIn URL column is required). Straight from LinkedIn with the browser extension, hit the plus button on any profile as you browse, or open a post and pull in everyone who liked or c
2ommented on it.`,demo:(0,Y.jsx)(fr,{})},{title:`Every profile gets an ICP score`,body:`Sherloq does not score at random. It already knows your company, what you sell and the problems you solve, so it can score every single person for you and you no longer have to. Each profile is judged on three values, the persona fit, the company fit and a confidence score. Together they form one reliable number you can trust, so you instantly see who is truly relevant and keep your focus on the leads that really matter.`,demo:(0,Y.jsx)(wr,{})}]}],kr=r(function(){let{user:e}=ve(!0),[t,n]=(0,J.useState)(1),[r,i]=O(``,n),[o,s]=O([],n),[c,l]=O(``,n),[u,d]=O([],n),[f,m]=O(e?String(e.id):``,n),[h,g]=O(null,n),[_,ee]=(0,J.useState)(`20`),[v,y]=(0,J.useState)(null),[x,C]=(0,J.useState)(null),[w,ie]=(0,J.useState)(null),[ae,oe]=(0,J.useState)([]),[se]=a(),[E,{open:ce,close:D}]=Oe(!1),[ue,{open:k,close:A}]=Oe(!1),[pe,{open:j,close:M}]=Oe(!1),[N,{open:_e,close:P}]=Oe(!1),[F,{open:I,close:ye}]=Oe(!1),[be,xe]=(0,J.useState)(null),R=(0,J.useRef)(null),z=(0,J.use)(re),{watchlistTags:Ee}=he(),{userList:De}=le(!0,!0,!0),{state:ke}=st(),{isLoading:Ae,stats:Me,refetch:Ne}=ge();(0,J.useEffect)(()=>{e&&!f&&m(String(e.id))},[e,f,m]),(0,J.useEffect)(()=>{se.get(`add_profile`)==`1`&&k()},[se,k]),(0,J.useEffect)(()=>{ke?.similar_profile?(C(ke.similar_profile),k()):ke?.open_adder_tab?(ie(ke.open_adder_tab),k()):ke?.close_adder_tab?A():ke?.open_adder&&k()},[ke,k,A]);let Pe=async()=>{if(!c)return null;let e={page_size:_===`100`?100:_===`50`?50:20,page:t,search:r||null,list_ids:o?o.map(e=>e.value):null,ordering:h,tags:u.length>0?u.join(`,`):null,user:f||null,date_range:c};return(await K.get(`/crm/watchlist/`,{params:e})).data},{isPending:V,isError:Fe,error:Ie,data:H,isFetching:U,isPlaceholderData:Le,refetch:ze}=Ve({queryKey:[`watchlist`,`profiles`,_,t,r,o,h,u,f,c],queryFn:()=>Pe(),meta:{errorMessage:`Failed to load watchlist.`},placeholderData:Qe});(0,J.useEffect)(()=>{if(!H||!v||!H.results)return;let e=H.results.find(e=>e.id==v.id);e&&y(e)},[H,v]);let W=(0,J.useCallback)((e=!0)=>{t!=1&&e?n(1):ze(),Ne()},[ze,t,Ne]),Be=(0,J.useCallback)(e=>{e.event_type===`notification`&&[`profile_loaded`,`activity_loaded`,`profile_enriched`,`profile_scored`].includes(e.event.event_id)&&W(e.event.event_id===`profile_loaded`)},[W]);z?.subscribe(`watchlist`,Be);let He=e=>{y(e),ce()},Ue=(e,t)=>{je.openConfirmModal({title:`Delete watchlist item`,centered:!0,children:(0,Y.jsxs)(p,{size:`sm`,children:[`Are you sure you want to delete `,t,`?`]}),labels:{confirm:`Delete`,cancel:`Cancel`},confirmProps:{color:`red`},onConfirm:()=>{K.delete(`/crm/watchlist/${e}/`).then(()=>W(!1)).catch(()=>Ze(`An error occurred while deleting the entry.`))}})},We=(e,t,n)=>{if(!e.length)return;let r=e.map(e=>({id:e,lists:t}));K.patch(`/crm/watchlist/bulk_update/`,r).then(()=>{W(),n()}).catch(()=>Ze(`An error occurred while updating the entries.`))},Ge=(e,t)=>{e.length&&je.openConfirmModal({title:`Delete watchlist items`,centered:!0,children:(0,Y.jsxs)(p,{size:`sm`,children:[`Are you sure you want to delete `,e.length,` items?`]}),labels:{confirm:`Delete`,cancel:`Cancel`},confirmProps:{color:`red`},onConfirm:()=>{let n=e.map(e=>({id:e}));K.post(`/crm/watchlist/bulk_delete/`,n).then(()=>{W(!1),t()}).catch(()=>Ze(`An error occurred while deleting the entries.`))}})},G=(e,t,n=null)=>{let r=H?.results.filter(t=>e.includes(t.id));r&&(oe(r),xe(n),_e(),R.current=t??null)};return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(te,{title:`Watchlist`,description:`Manage and expand your watchlist: add profiles, group them by relevance,
3          or discover new targets with powerful lookalike and parameter-based searches.`,rightSection:(0,Y.jsxs)(B,{id:`add-watchlist-button`,wrap:`nowrap`,children:[(0,Y.jsx)(L,{variant:`light`,leftSection:(0,Y.jsx)(Re,{size:16}),onClick:I,children:`How it works`}),(0,Y.jsx)(L,{leftSection:(0,Y.jsx)(we,{size:14}),onClick:()=>{y(null),k()},children:`Add watchlist item`}),(0,Y.jsx)(L,{leftSection:(0,Y.jsx)(pt,{size:14}),onClick:()=>{j()},children:`Manage watchlist`})]})}),(0,Y.jsx)(Ct,{stats:Me,isLoading:Ae}),(0,Y.jsx)(fe,{}),(0,Y.jsxs)(B,{preventGrowOverflow:!1,wrap:`nowrap`,gap:`xs`,children:[(0,Y.jsx)(Se,{placeholder:`Search watchlist`,onSearch:i}),(0,Y.jsx)(ne,{selectedLists:o,onSelectedListsChange:s,onlyMyProfiles:!0,lightVariant:!0}),De.length>1&&(0,Y.jsx)(me,{placeholder:`Filter by user`,data:De,value:f,onChange:m,f
3w:500}),Ee.length>1&&(0,Y.jsx)(de,{placeholder:`Filter by tags`,data:Ee,value:u,onChange:d,fw:500}),(0,Y.jsx)(Ce,{label:``,onChange:l})]}),(0,Y.jsxs)(B,{mt:`xl`,justify:`space-between`,mb:`md`,children:[(0,Y.jsxs)(p,{fw:600,children:[`Watched profiles`,` `,(0,Y.jsxs)(p,{span:!0,size:`xs`,c:`dimmed`,children:[`(Found `,H?.count,` profiles)`]})]}),(0,Y.jsxs)(B,{wrap:`nowrap`,gap:`xs`,children:[(0,Y.jsx)(Te,{label:`per Page`,defaultValue:`20`,onChange:ee,options:[{value:`20`,label:`20`},{value:`50`,label:`50`},{value:`100`,label:`100`}]}),(0,Y.jsx)(Te,{label:`Order by`,defaultValue:``,onChange:g,options:[{value:``,label:`Recently added`},{value:`profile__name`,label:`Name (asc)`},{value:`-profile__name`,label:`Name (desc)`},{value:`profile__company__name`,label:`Company (asc)`},{value:`-profile__company__name`,label:`Company (desc)`},{value:`lists__name`,label:`List (asc)`},{value:`-lists__name`,label:`List (desc)`},{value:`user__first_name,user__last_name`,label:`Assigned User (asc)`},{value:`-user__first_name,-user__last_name`,label:`Assigned User (
3desc)`}]})]})]}),(0,Y.jsx)(ot,{isPending:V,isFetching:U,isError:Fe,error:Ie,children:(0,Y.jsx)(xt,{watchlistItems:H?.results,onSelectItem:He,onDeleteItem:Ue,onUpdateItemsLists:We,onDeleteItems:Ge,onEnrichItems:G})}),(0,Y.jsx)(S,{total:H?.pages||0,value:t,onChange:n,disabled:Le,mt:`sm`,hideWithOnePage:!0}),(0,Y.jsx)(b,{opened:E,onClose:D,selectedItem:v,onSuccess:()=>W(!1),onEnrich:e=>{v&&G([v.id],void 0,e)}}),(0,Y.jsx)(sr,{opened:ue,similarSearch:x,openTab:w,onClose:A,onExitTransitionEnd:()=>C(null)}),(0,Y.jsx)(wt,{opened:pe,onClose:M}),(0,Y.jsx)(tt,{groups:Or,opened:F,onClose:ye}),(0,Y.jsx)(T,{opened:N,onClose:P,selectedItems:ae,dataKey:be,onSuccess:()=>{W(!1),R.current?.()}})]})});export{kr as 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.