PageSourceSearch

https://deepsearchai.co/assets/SavedPeople-ByjVlYZQ.js

js deepsearchai.co collected 2026-09-24 14:37:34 UTC 5,099 bytes, 2 lines download raw bytes

1import{j as t}from"./motion-media-gStjI0N3.js";import{e as F}from"./eventsEnum-DcLi6CiT.js";import{u as M,r as D,M as k,y as L,B as T,F as w}from"./index-CJowTBIz.js";import{r as n}from"./redux-DOY1rMCd.js";import{C as b,R as I,a as P,F as q}from"./RemoveFromSavedDialog-BjHKMeYE.js";import{u as R}from"./date-format-BKKdFs3i.js";import{u as H}from"./PricingPlan-UqW8w35N.js";import{a as K}from"./pro-Stoo-vQL.js";import{d as B,e as O}from"./react-vendor-DUUXGqhU.js";import{u as U}from"./saved-people-DREG0iME.js";import{C as V}from"./Table-kJ5ExKgr.js";import"./carousels-DHdzMqlr.js";import{T as N}from"./i18n-CGpzbggT.js";import"./hubx-analytics-D19Vo-9A.js";import"./forms-Kwu4rUch.js";import"./firebase-core-B5vpvvhb.js";import"./growth-payment-B1wQ8toD.js";import"./user-CKuQ7kN8.js";import"./index-D4UPA4de.js";import"./Modal-Cswphj1I.js";import"./firestore-BlaZ4Z77.js";import"./user-preferences-BZELLsYu.js";import"./user-x8tAkV4a.js";import"./names-BMg9Zd4j.js";import"./log-event-DLIdaaIF.js";import"./log-big-query-event-x5rvQ5FB.js";import"./custom-event-push-BxXk6Oit.js";import"./cdn-urls-KBX8KpJq.js";import"./landing-flow-B2xXuew3.js";import"./path-CLekxzdU.js";import"./calculate-price-diff-Cbq6Bh6w.js";import"./content-rendering-C2G3YXCj.js";function z({conversation:r,onUnsaved:v}){const p=B(),m=M(),{displayPaywall:a}=H(),{data:i}=K(),[l,_]=n.useState(r.savedPerson===!0),[x,c]=n.useState(!1);n.useEffect(()=>{_(r.savedPerson===!0)},[r.savedPerson]);const f=()=>{m(D()),m(k()),p(`/chats/${r.id}`),L({eventName:F.EventsEnum.BTN_SAVED_RESULT})},y=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),f())},S=e=>{if(e.stopPropagation(),i===!1){a();return}if(l){c(!0);return}const s=!0;_(s),R({savedPerson:s,conversationId:r.id})},C=()=>{_(!1),c(!1),v!==void 0&&v(r.id),R({savedPerson:!1,conversationId:r.id})};return t.jsxs(t.Fragment,{children:[t.jsx(b,{conversation:r,tagsSource:"keywords",onClick:f,onKeyDown:y,isSaved:l,onSaveToggle:S}),t.jsx(I,{open:x,onClose:()=>{c(!1)},onConfirm:C})]})}const d={"saved-people__container":"_saved-people__container_1j2gd_1","saved-people__container--empty":"_saved-people__container--empty_1j2gd_1","saved-people__grid":"_saved-people__grid_1j2gd_1","saved-people__grid--single":"_saved-people__grid--single_1j2gd_1","saved-people__empty":"_saved-people__empty_1j2gd_1","saved-people__empty-content":"_saved-people__empty-content_1j2gd_1","saved-people__empty-icon":"_saved-people__empty-icon_1j2gd_1","saved-people__empty-title":"_saved-people__empty-title_1j2gd_1","saved-people__empty-subtitle":"_saved-people__empty-subtitle_1j2gd_1"};function Pe(){const r=n.useRef(null),{data:v,hasMore:p,loadMore:m,loading:a,loadingMore:i}=U(),{searchQuery:l}=O(),[_,x]=n.useState(new Set);T(()=>{L({eventName:F.EventsEnum.LND_SAVED_PAGE,event_params:{event_type:"page_view",screen:"saved"}})});const c=n.useMemo(()=>{const e=v.filter(o=>o?.id!=null&&!_.has(o.id)),s=Array.from(new Map(e.map(o=>[o.id,o])).values());if(l.trim().length<2)return s;const g=l.toLowerCase().trim();return s.filter(o=>{const{personName:u,profession:j,location:h}=o.person??{};return[o.title,u,j,h].some(A=>(A?.toLowerCase()??"").includes(g))})},[v,_,l]);n.useEffect(()=>{if(l.trim().length>=2)return;const e=r.current;if(e===null)return;const s=()=>{const{scrollTop:g,scrollHeight:o,clientHeight:u}=e;if(o===0)return;if(o<=u){p&&!a&&!i&&m();return}(g+u)/o>=.9&&p&&!a&&!i&&m()};return e.addEventListener("scroll",s),requestAnimationFrame(()=>{requestAnimationFrame(()=>{s()})}),()=>{e.removeEventListener("scroll",s)}},[p,a,i,m,l]);const f=n.useRef(!1),y=n.useRef(!0),S=n.useRef(!1);n.useEffect(()=>{if(l.trim().length>=2)return;const e=f.current,s=y.current,g=e&&!i,o=s&&!a&&!S.current;if(f.current=i,y.current=a,o&&(S.current=!0),a||i||!p||!g&&!o||r.current===null)return;const u=r.current,j=()=>{const{scrollHeight:h,clientHeight:E}=u;h!==0&&h<=E&&p&&!a&&!i&&m()};requestAnimationFrame(()=>{requestAnimationFrame(()=>{j()})})},[a,i,p,m,l]);const C=n.useCallback(e=>{x(s=>new Set([...s,e]))},[]);return t.jsx("div",{className:w(d["saved-people__container"],{[d["saved-people__container--empty"]]:!a&&c.length===0}),ref:r,children:a?t.jsx("div",{className:d["saved-people__grid"],children:Array.from({length:6}).map((e,s)=>t.jsx(P,{},s))}):c.length===0?t.jsx("div",{className:d["saved-people__empty"],children:t.jsxs("div",{className:d["saved-people__empty-content"],
1children:[t.jsx(V,{icon:q,size:"large",className:d["saved-people__empty-icon"]}),t.jsx("h2",{className:d["saved-people__empty-title"],children:t.jsx(N,{i18nKey:"savedPeople.emptyTitle",children:"Oops! No saved searches yet!"})}),t.jsx("p",{className:d["saved-people__empty-subtitle"],children:t.jsx(N,{i18nKey:"savedPeople.emptySubtitle",children:"Save your search and find it here."})})]})}):t.jsxs("div",{className:w(d["saved-people__grid"],{[d["saved-people__grid--single"]]:c.length===1}),children:[c.map(e=>t.jsx(z,{conversation:e,onUnsaved:C},e.id)),i&&t.jsxs(t.Fragment,{children:[t.jsx(P,{}),t.jsx(P,{})]})]})})}export{Pe as SavedPeopleRoute};
2//# sourceMappingURL=SavedPeople-ByjVlYZQ.js.map

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.