1import{j as e,r as l,n as ue,q as me}from"./vendor-react-14ONC-yq.js";import{K as xe,v as z,X as F,W as U,L as W,ay as he,J as fe,M as ie,w as pe,q as ge,aI as be,aG as ve,al as je,aH as ye,A as we,aJ as Ne,ai as ke,P as Se}from"./index-B3ArjiUf.js";import{c as Ce}from"./http-client-gEzuxUHA.js";import{u as Re}from"./index-B_FpV0pL.js";import"./underwritingStore-CZp2raFQ.js";import{T as q}from"./trash-2-o5NH4M5r.js";import{M as K}from"./message-square-Ciq_aEoX.js";import{g as D,a as ce}from"./index-DV12uPJN.js";import{u as Ee,M as Le,S as Me}from"./usePOIClick-BRT_jBZV.js";import{P as Y}from"./play-BtTh9ZOD.js";import{S as $e}from"./send-DHYeyH0-.js";import{S as Ie}from"./star-CqrsW6Gq.js";import{I as _e}from"./image-CMSlMBbc.js";import{V as Pe,R as Ve,M as Te}from"./ResearchHomeButton-DuU3MGms.js";import{C as ze}from"./chevron-right-CyW2h4yx.js";import{R as Oe,a as Ae}from"./ReportsSidebar-CtYs-prZ.js";import{Q as De}from"./quote-BvLHTHbp.js";import"./vendor-query-DF2mAjY6.js";import"./vendor-charts-Byh2YVOQ.js";import"./vendor-radix-CeIbOqmj.js";import"./vendor-markdown-TRQC3W4o.js";import"./middleware-BoeWS_xQ.js";import"./chevron-up-BKwDk656.js";import"./pencil-DZyP_yxH.js";import"./message-circle-D0fMwqX_.js";import"./newspaper-DyHq1sdb.js";function Fe({href:s,children:t}){return e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"bg-blue-500/20 px-1.5 py-0.5 rounded text-xs text-blue-500 hover:text-blue-300 hover:bg-blue-500/30 no-underline ml-0.5 transition-colors",children:t})}function Ue(s,t){if(!t||t.length===0)return s;const r=/\[(\d+(?:,\s*\d+)*)\]/g;return s.replace(r,(c,o)=>o.split(",").map(i=>i.trim()).map(i=>{const n=parseInt(i,10);if(isNaN(n)||n<1||n>t.length)return`[${i}]`;const x=t[n-1];return x!=null&&x.url?`<citation href="${x.url}">${i}</citation>`:`[${i}]`}).join(""))}function Be({content:s,sources:t=[]}){const r=Ue(s,t);return e.jsx(xe,{className:`prose prose-sm prose-invert max-w-none 2 prose-headings:text-foreground prose-headings:font-semibold 3 prose-h2:text-lg prose-h2:mt-6 prose-h2:mb-2 4 prose-h3:text-base prose-h3:mt-4 prose-h3:mb-1.5 5 prose-p:text-foreground prose-p:leading-relaxed prose-p:my-2 6 prose-strong:text-foreground prose-strong:font-semibold 7 prose-em:text-muted-foreground 8 prose-ul:my-2 prose-ol:my-2 9 prose-li:text-foreground prose-li:my-0.5 10 prose-a:text-primary prose-a:no-underline hover:prose-a:text-primary 11 prose-code:text-sky-300 prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-sm 12 prose-pre:bg-muted prose-pre:border prose-pre:border-border prose-pre:rounded-lg 13 prose-blockquote:border-primary prose-blockquote:text-muted-foreground`,options:{overrides:{citation:{component:Fe}}},children:r})}function G(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{const t=Math.random()*16|0;return(s==="x"?t:t&3|8).toString(16)})}function Z(s){return s!=null&&s.length?s.map(t=>({title:t.title,url:t.url,img_src:t.image_url,thumbnail_src:t.thumbnail_url})):[]}function ee(s){return s!=null&&s.length?s.map(t=>({title:t.title,url:t.url,thumbnail:t.thumbnail,author:t.channel,length:t.duration})):[]}function He(s){return s!=null&&s.length?s.map(t=>({title:t.title,address:t.address,phone:t.phone,website:t.website,rating:t.rating,reviewCount:t.review_count,category:t.category,lat:t.latitude,lng:t.longitude,cid:t.cid})):[]}function Ge(){const[s,t]=l.useState([]),[r,c]=l.useState(!1),[o,d]=l.useState(),[a,i]=l.useState(null),[n,x]=l.useState([]),{settings:v,getActiveDirective:S}=Re(),L=l.useCallback(async(j,R)=>{if(!j.trim()||r)return;const N=G(),$=G();t(g=>[...g,{id:N,role:"user",content:j},{id:$,role:"assistant",content:"",isLoading:!0}]),c(!0);try{const g=S(),u=await Ce({message:j,chat_id:o,message_id:N,focus_mode:v.focusMode,max_steps:v.maxSteps,max_results:v.maxResults,optimization_mode:v.optimizationMode,search_provider:v.searchProvider,directive:g,...R!=null&&R.articleUrl?{article_url:R.articleUrl,skip_media:!0}:{}});d(u.chat_id);const y=Z(u.images),I=ee(u.videos);(y.length||I.length)&&i({images:y,videos:I});const T=He(u.places);x(T),t(h=>h.map(b=>b.id===$?{...b,content:u.answer,sources:u.sources,isLoading:!1}:b))}catch(g){t(u=>u.map(y=>y.id===$?{...y,content:"",isLoading:!1,error:g instanceof Error?g.message:"Research failed"}:y))}finally{c(!1)}},[r,o,v,S]),M=l.useCallback(()=>{t([]),d(void 0),i(null),x([])},[]),C=l.useCallback((j,R)=>{d(j);let N={images:[],videos:[]};const $=R.filter(g=>g.role==="user"||g.role==="assistant").map(g=>{var y;const u=(y=g.content_json)==null?void 0:y.sources;if(g.role==="assistant"){const I=Z(g.images),T=ee(g.videos);(I.length||T.length)&&(N={images:I,videos:T})}return{id:G(),role:g.role,content:g.content,sources:u}});return t($),i(N.images.length||N.videos.length?N:null),N},[]);return{messages:s,isResearching:r,chatId:o,responseMedia:a,places:n,submitQuestion:L,clearMessages:M,loadSession:C}}function We(){const[s,t]=l.useState({images:null,videos:null,imagesLoading:!1,videosLoading:!1,imagesError:null,videosError:null}),r=l.useCallback(async a=>{t(i=>({...i,imagesLoading:!0,imagesError:null}));try{const i=await z.get("/api/v1/research/images",{params:{q:a,limit:10}});t(n=>({...n,images:i.data.results||[],imagesLoading:!1}))}catch(i){console.error("[useMediaSearch] Image search error:",i),t(n=>({...n,images:[],imagesLoading:!1,imagesError:i instanceof Error?i.message:"Failed to search images"}))}},[]),c=l.useCallback(async a=>{t(i=>({...i,videosLoading:!0,videosError:null}));try{const i=await z.get("/api/v1/research/videos",{params:{q:a,limit:10}});t(n=>({...n,videos:i.data.results||[],videosLoading:!1}))}catch(i){console.error("[useMediaSearch] Video search error:",i),t(n=>({...n,videos:[],videosLoading:!1,videosError:i instanceof Error?i.message:"Failed to search videos"}))}},[]),o=l.useCallback(()=>{t({images:null,videos:null,imagesLoading:!1,videosLoading:!1,imagesError:null,videosError:null})},[]),d=l.useCallback((a,i)=>{t({images:a.length?a:null,videos:i.length?i:null,imagesLoading:!1,videosLoading:!1,imagesError:null,videosError:null})},[]);return{...s,searchImages:r,searchVideos:c,reset:o,setMedia:d}}function Qe(){const[s,t]=l.useState([]),[r,c]=l.useState(!1),o=l.useCallback(async()=>{c(!0);try{const n=await z.get("/api/v1/chat/sessions",{params:{limit:50}});t(n.data)}catch(n){console.error("[useChatHistory] Failed to load sessions",n),t([])}finally{c(!1)}},[]),d=l.useCallback(async n=>(await z.get(`/api/v1/chat/sessions/${n}/messages`,{params:{limit:100}})).data,[]),a=l.useCallback(async n=>{await z.delete(`/api/v1/chat/sessions/${n}`),t(x=>x.filter(v=>v.id!==n))},[]),i=l.useCallback(async()=>{await z.delete("/api/v1/chat/sessions"),t([])},[]);return{sessions:s,loading:r,fetchSessions:o,fetchMessages:d,deleteSession:a,deleteAllSessions:i}}function Je({open:s,onClose:t,sessions:r,loading:c,onFetchSessions:o,onSelectSession:d,onDeleteSession:a,onDeleteAll:i}){return l.useEffect(()=>{s&&o()},[s,o]),l.useEffect(()=>{if(!s)return;const n=x=>{x.key==="Escape"&&t()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[s,t]),s?e.jsxs("div",{className:"flex flex-col h-full w-[300px] border-r border-border bg-card shrink-0",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Chat History"}),e.jsxs("div",{className:"flex items-center gap-1",children:[r.length>0&&e.jsx("button",{onClick:()=>{window.confirm("Delete all chat history?")&&i()},className:"p-1 rounded-md text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors",title:"Delete all chats",children:e.jsx(q,{className:"w-4 h-4"})}),e.jsx("button",{onClick:t,className:"p-1 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:e.jsx(F,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto",children:[c&&e.jsxs("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:[e.jsx(U,{className:"w-4 h-4 animate-spin mr-2"}),e.jsx("span",{className:"text-sm",children:"Loading..."})]}),!c&&r.length===0&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e.jsx(K,{className:"w-8 h-8 mb-2 opacity-40"}),e.jsx("p",{className:"text-sm",children:"No chat history yet"})]}),!c&&r.map(n=>e.jsxs("div",{className:"group flex items-start gap-2 px-4 py-3 hover:bg-muted/50 cursor-pointer border-b border-border/50 transition-colors",onClick:()=>d(n),children:[e.jsx(K,{className:"w-4 h-4 mt-0.5 text-muted-foreground shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm text-foreground truncate",children:n.title||"Untitled chat"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:Xe(n.last_message_at||n.created_at)})]}),e.jsx("button",{onClick:x=>{x.stopPropagation(),a(n.id)},className:"p-1 rounded-md text-muted-foreground opacity-0 group-hover:opacity-100 hover:text-destructive hover:bg-destructive/10 transition-all",title:"Delete chat",children:e.jsx(q,{className:"w-3.5 h-3.5"})})]},n.id))]})]}):null}function Xe(s){const t=new Date(s),c=new Date().getTime()-t.getTime(),o=Math.floor(c/6e4),d=Math.floor(o/60),a=Math.floor(d/24);return o<1?"Just now":o<60?`${o}m ago`:d<24?`${d}h ago`:a<7?`${a}d ago`:t.toLocaleDateString()}function qe({sources:s,onClose:t}){return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:t}),e.jsxs("div",{className:"relative bg-background border border-border rounded-xl shadow-2xl max-w-2xl w-full mx-4 max-h-[80vh] flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[e.jsxs("h2",{className:"text-lg font-semibold text-foreground",children:["All Sources (",s.length,")"]}),e.jsx("button",{onClick:t,className:"p-2 text-muted-foreground hover:text-foreground hover:bg-accent rounded-lg transition-colors",children:e.jsx(F,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-2",children:s.map((r,c)=>e.jsx(Ke,{source:r,index:c+1},c))})]})]})}function Ke({source:s,index:t}){const r=D(s.url),c=ce(s.url);return e.jsxs("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-start gap-3 p-3 bg-muted border border-border rounded-lg hover:border-blue-500/50 transition-colors group",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 flex items-center justify-center bg-blue-500/20 text-blue-500 text-sm font-medium rounded",children:t}),e.jsx("img",{src:c,alt:"",className:"w-5 h-5 flex-shrink-0 mt-0.5",onError:o=>{o.target.style.display="none"}}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:r}),e.jsx(W,{className:"w-3 h-3 text-muted-foreground group-hover:text-blue-500 transition-colors"})]}),e.jsx("p",{className:"text-sm text-foreground group-hover:text-blue-300 transition-colors line-clamp-2",children:s.title}),s.snippet&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:s.snippet})]})]})}function Ye({title:s,rows:t}){return!t||t.length===0?null:e.jsxs("div",{className:"bg-muted border border-border rounded-lg overflow-hidden",children:[e.jsx("div",{className:"px-4 py-3 border-b border-border",children:e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:s})}),e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Feature"}),e.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Detail"})]})}),e.jsx("tbody",{className:"divide-y divide-border",children:t.map((r,c)=>e.jsxs("tr",{className:"hover:bg-accent transition-colors",children:[e.jsx("td",{className:"px-4 py-2 text-sm text-muted-foreground",children:r.label}),e.jsxs("td",{className:"px-4 py-2 text-sm text-foreground flex items-center gap-2",children:[r.value,r.verified&&e.jsx("span",{title:"Verified from source",children:e.jsx(he,{className:"w-4 h-4 text-green-400"})})]})]},c))})]})]})}function te({content:s,sources:t,propertyTable:r,isLoading:c}){return c?e.jsx(Ze,{}):e.jsxs("div",{children:[e.jsx("div",{className:"prose prose-invert prose-sm max-w-none",children:e.jsx(Be,{content:s,sources:t})}),r&&e.jsx("div",{className:"mt-6",children:e.jsx(Ye,{title:r.title,rows:r.rows})})]})}function Ze(){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 gap-5",children:[e.jsxs("div",{className:"relative p-6",children:[e.jsx("div",{className:"absolute inset-0 rounded-full bg-blue-500/20 animate-ping",style:{animationDuration:"2s"}}),e.jsx("img",{src:fe,alt:"Atlas",className:"relative z-10 w-32 h-32 rounded-full object-cover ring-4 ring-blue-500/50"})]}),e.jsx("p",{className:"text-2xl font-semibold text-muted-foreground",children:"Atlas is researching..."})]})}const et=()=>{if(document.getElementById("gm-infowindow-styles"))return;const s=document.createElement("style");s.id="gm-infowindow-styles",s.textContent=` 14 .gm-style .gm-style-iw-c { 15 background-color: #1e293b !important; 16 padding: 0 !important; 17 border-radius: 8px !important; 18 box-shadow: 0 2px 7px 1px rgba(0,0,0,0.3) !important; 19 } 20 .gm-style .gm-style-iw-d { 21 overflow: hidden !important; 22 max-height: none !important; 23 } 24 .gm-style .gm-style-iw-t::after { 25 background: #1e293b !important; 26 box-shadow: -2px 2px 2px 0 rgba(0,0,0,0.2) !important; 27 } 28 .gm-ui-hover-effect {
29 background-color: rgba(30, 41, 59, 0.7) !important; 30 border-radius: 50% !important; 31 opacity: 1 !important; 32 top: 4px !important; 33 right: 4px !important; 34 } 35 .gm-ui-hover-effect:hover { 36 background-color: #334155 !important; 37 } 38 .gm-ui-hover-effect > span { 39 background-color: #e2e8f0 !important; 40 margin: 0 !important; 41 } 42 `,document.head.appendChild(s)};function se(s,t,r){var n;const c=s.source==="serper"?"#3b82f6":"#22c55e",o=s.rating?"â ".repeat(Math.round(s.rating))+"â".repeat(5-Math.round(s.rating)):"",d=s.category||"",a=r!=null&&r.priceLevel?"$".repeat(r.priceLevel):"",i=(n=r==null?void 0:r.hours)!=null&&n.length?`<details style="margin-top: 8px;"> 43 <summary style="cursor: pointer; color: #3b82f6; font-size: 13px; font-weight: 500;">View Hours</summary> 44 <div style="margin-top: 8px; font-size: 12px; color: #b0b0b0; line-height: 1.6;"> 45 ${r.hours.map(x=>`<div>${x}</div>`).join("")} 46 </div> 47 </details>`:"";return` 48 <div style="position: relative; min-width: 240px; max-width: 300px; font-family: system-ui, -apple-system, sans-serif; background: #1e293b; color: #e2e8f0; padding: 12px; border-radius: 8px;"> 49 ${t?` 50 <div style="margin: -12px -12px 10px -12px; border-radius: 8px 8px 0 0; overflow: hidden;"> 51 <img src="${t}" alt="${s.title}" 52 style="width: 100%; height: 200px; object-fit: cover; display: block;" 53 onerror="this.style.display='none'" /> 54 </div> 55 `:""} 56 57 <h3 style="margin: 0 0 4px 0; font-size: 15px; font-weight: 600; color: #e2e8f0; display: flex; align-items: center; gap: 6px;"> 58 <span style="background: ${c}; color: #fff; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; flex-shrink: 0;">${s.label}</span> 59 ${s.title} 60 </h3> 61 62 ${s.rating?` 63 <div style="display: flex; align-items: center; gap: 4px; margin-bottom: 4px; font-size: 12px;"> 64 <span style="color: #f59e0b;">${o}</span> 65 <span style="color: #cbd5e1;">${s.rating.toFixed(1)}</span> 66 ${s.reviewCount?`<span style="color: #94a3b8;">(${s.reviewCount.toLocaleString()})</span>`:""} 67 </div> 68 `:""} 69 70 <div style="display: flex; align-items: center; gap: 4px; margin-bottom: 4px; color: #cbd5e1; font-size: 11px; flex-wrap: wrap;"> 71 ${a?`<span style="font-weight: 500;">${a}</span><span>·</span>`:""} 72 ${d?`<span style="text-transform: capitalize;">${d}</span>`:""} 73 ${(r==null?void 0:r.isOpen)!==void 0?` 74 <span>·</span> 75 <span style="color: ${r.isOpen?"#22c55e":"#ef4444"}; font-weight: 500;"> 76 ${r.isOpen?"Open":"Closed"} 77 </span> 78 `:""} 79 </div> 80 81 ${s.address?`<div style="color: #cbd5e1; font-size: 11px; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">ð ${s.address}</div>`:""} 82 ${s.phone?`<div style="color: #cbd5e1; font-size: 12px; margin-bottom: 4px;">ð <a href="tel:${s.phone}" style="color: #60a5fa; text-decoration: none;">${s.phone}</a></div>`:""} 83 84 ${i} 85 86 ${s.website?` 87 <a href="${s.website}" target="_blank" rel="noopener" 88 style="display: inline-block; margin-top: 6px; padding: 5px 12px; background: #3b82f6; color: white; text-decoration: none; border-radius: 6px; font-size: 11px; font-weight: 500;"> 89 Website 90 </a> 91 `:""} 92 </div> 93 `}async function re(s,t,r,c){var o,d,a;t.setContent(se(s)),t.open({anchor:c,map:r});try{const{places:i}=await google.maps.places.Place.searchByText({textQuery:`${s.title} ${s.address||""}`,maxResultCount:1,fields:["photos","regularOpeningHours","priceLevel","nationalPhoneNumber","websiteURI"]});if(!(i!=null&&i.length))return;const n=i[0],x=(d=(o=n.photos)==null?void 0:o[0])==null?void 0:d.getURI({maxWidth:600}),v=(a=n.regularOpeningHours)==null?void 0:a.weekdayDescriptions,S={FREE:0,INEXPENSIVE:1,MODERATE:2,EXPENSIVE:3,VERY_EXPENSIVE:4},L=n.priceLevel?S[n.priceLevel]??void 0:void 0;let M;try{M=await n.isOpen()}catch{}const C={...s};!C.phone&&n.nationalPhoneNumber&&(C.phone=n.nationalPhoneNumber),!C.website&&n.websiteURI&&(C.website=n.websiteURI),t.setContent(se(C,x||void 0,{isOpen:M,priceLevel:L,hours:v||void 0}))}catch{}}function tt({places:s,query:t,onPlacesLoaded:r,onMapReady:c}){const o=l.useRef(null),d=l.useRef(null),[a,i]=l.useState(null),n=l.useRef([]),x=l.useRef(null),[v,S]=l.useState(!0),[L,M]=l.useState(null),[,C]=l.useState(null),[j,R]=l.useState([]),[N,$]=l.useState("roadmap"),[g,u]=l.useState(!1),[y,I]=l.useState({places:!1,traffic:!1,transit:!1}),T=s.filter(h=>h.lat!=null&&h.lng!=null);return Ee({map:a,enabled:!0}),l.useEffect(()=>{j.length>0&&(r==null||r(j))},[j,r]),l.useEffect(()=>{!d.current||j.length===0||c==null||c(h=>{const b=d.current;if(!b||h.lat==null||h.lng==null)return;b.panTo({lat:h.lat,lng:h.lng}),b.setZoom(15);const V=j.indexOf(h);V>
93=0&&n.current[V]&&(x.current||(x.current=new google.maps.InfoWindow({maxWidth:320,headerDisabled:!0})),re(h,x.current,b,n.current[V]))})},[j,c]),l.useEffect(()=>{et()},[]),l.useEffect(()=>{if(!o.current)return;if(T.length===0){S(!0);return}let h=!1;function b(w,f,E){x.current||(x.current=new google.maps.InfoWindow({maxWidth:300,headerDisabled:!0,pixelOffset:new google.maps.Size(0,40)})),C(E),re(E,x.current,w,f)}function V(w,f,E,m){E.forEach(p=>{const k=document.createElement("div");k.style.cssText=`background:${m};color:#fff;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;border:2px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.4);cursor:pointer`,k.textContent=p.label;const _=new w.marker.AdvancedMarkerElement({map:f,position:{lat:p.lat,lng:p.lng},content:k,title:p.title});_.addListener("click",()=>b(f,_,p)),n.current.push(_)})}async function B(w,f,E,m,p){var k;try{const{places:_}=await w.places.Place.searchByText({textQuery:E,maxResultCount:20,locationBias:p,fields:["displayName","formattedAddress","location","rating","userRatingCount","nationalPhoneNumber","websiteURI","primaryType"]});if(h||!(_!=null&&_.length))return;const de=new Set(m.map(P=>P.title.trim().toLowerCase())),Q="ABCDEFGHIJKLMNOPQRST";let J=0;const O=[];for(const P of _){if(J>=Q.length)break;const X=P.displayName||"";if(de.has(X.trim().toLowerCase()))continue;const A=P.location;A&&(O.push({title:X,address:P.formattedAddress||void 0,phone:P.nationalPhoneNumber||void 0,website:P.websiteURI||void 0,rating:P.rating||void 0,reviewCount:P.userRatingCount||void 0,category:((k=P.primaryType)==null?void 0:k.replace(/_/g," "))||void 0,lat:A.lat(),lng:A.lng(),cid:void 0,source:"google",label:Q[J++]}),p.extend(A))}O.length>0&&(V(w,f,O,"#22c55e"),f.fitBounds(p,{top:40,right:40,bottom:40,left:40}),R(P=>[...P,...O]))}catch(_){console.warn("Google Places search failed:",_)}}async function H(){S(!0),M(null);try{const w=await pe();if(h||!o.current)return;const f=T.map((k,_)=>({...k,source:"serper",label:String(_+1)})),E=new w.LatLngBounds;f.forEach(k=>E.extend({lat:k.lat,lng:k.lng}));const m=new w.Map(o.current,{center:E.getCenter().toJSON(),zoom:12,mapTypeControl:!1,fullscreenControl:!0,fullscreenControlOptions:{position:w.ControlPosition.RIGHT_BOTTOM},streetViewControl:!0,streetViewControlOptions:{position:w.ControlPosition.RIGHT_BOTTOM},zoomControl:!0,zoomControlOptions:{position:w.ControlPosition.RIGHT_BOTTOM},mapTypeId:N,mapId:"DOMUS_PROPERTY_MAP",clickableIcons:!0}),p=m.getStreetView();p.addListener("visible_changed",()=>{u(p.getVisible())}),d.current=m,i(m),n.current.forEach(k=>k.map=null),n.current=[],V(w,m,f,"#3b82f6"),f.length>1?m.fitBounds(E,{top:40,right:40,bottom:40,left:40}):(m.setCenter({lat:f[0].lat,lng:f[0].lng}),m.setZoom(14)),R(f),S(!1),t&&B(w,m,t,f,E)}catch(w){console.error("ServiceMap failed:",w),M(w instanceof Error?w.message:"Failed to load map"),S(!1)}}return H(),()=>{var w;h=!0,(w=x.current)==null||w.close(),n.current.forEach(f=>f.map=null),n.current=[],d.current=null}},[T.length,t]),e.jsxs("div",{className:"mb-6 rounded-xl border border-border overflow-hidden bg-muted",children:[e.jsxs("div",{className:"relative w-full",style:{paddingBottom:"56.25%"},children:[e.jsx("div",{ref:o,className:"absolute inset-0"}),!v&&!L&&d.current&&e.jsxs("div",{className:"absolute top-2 right-2 md:top-3 md:right-[10px] z-20 flex items-center gap-1.5 md:gap-2",children:[e.jsx(Le,{mapType:N,onMapTypeChange:h=>{var b;$(h),(b=d.current)==null||b.setMapTypeId(h)},streetViewActive:g,onStreetViewToggle:()=>{const h=d.current;if(!h)return;const b=h.getStreetView();g?b.setVisible(!1):(b.setPosition(h.getCenter()),b.setVisible(!0))},streetViewEnabled:!0,layers:y,onLayerToggle:h=>I(b=>({...b,[h]:!b[h]}))}),e.jsx(Me,{onClick:()=>{const h=d.current;if(!h)return;const b=h.getStreetView();g?b.setVisible(!1):(b.setPosition(h.getCenter()),b.setVisible(!0))},disabled:!1,active:g})]}),v&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted z-10",children:e.jsxs("div",{className:"text-center text-muted-foreground",children:[e.jsx(U,{className:"w-8 h-8 animate-spin mx-auto mb-2"}),e.jsx("p",{className:"text-sm",children:"Loading map..."})]})}),L&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted z-10",children:e.jsxs("div",{className:"text-center text-muted-foreground",children:[e.jsx(ie,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:L})]})})]}),j.some(h=>h.source==="google")&&e.jsxs("div",{className:"flex items-center gap-4 px-4 py-2 border-t border-border bg-background/60 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"w-3 h-3 rounded-full bg-blue-500 inline-block"}
93),"Serper (",j.filter(h=>h.source==="serper").length,")"]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"w-3 h-3 rounded-full bg-green-500 inline-block"}),"Google Places (",j.filter(h=>h.source==="google").length,")"]})]})]})}function ne(s){return s.img_src?s.img_src:s.thumbnail_src?s.thumbnail_src:null}function st({images:s}){var a,i;const[t,r]=l.useState(null),c=s.filter(n=>ne(n)),o=c.slice(0,6),d=Math.max(0,c.length-6);return o.length===0?e.jsx("p",{className:"text-xs text-muted-foreground",children:"No images found"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 gap-1.5",children:o.map((n,x)=>e.jsxs("button",{onClick:()=>r(x),className:"relative aspect-[4/3] overflow-hidden rounded-md bg-muted hover:opacity-80 transition-opacity",children:[e.jsx("img",{src:ne(n),alt:n.title,className:"w-full h-full object-cover",loading:"lazy",onError:v=>{v.target.parentElement.style.display="none"}}),x===5&&d>0&&e.jsx("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center",children:e.jsxs("span",{className:"text-white text-sm font-medium",children:["+",d]})})]},x))}),t!==null&&e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/90",onClick:()=>r(null),children:[e.jsx("button",{onClick:()=>r(null),className:"absolute top-4 right-4 p-2 text-white/70 hover:text-white hover:bg-accent rounded-full transition-colors z-10",children:e.jsx(F,{className:"w-6 h-6"})}),e.jsx("img",{src:(a=o[t])==null?void 0:a.img_src,alt:(i=o[t])==null?void 0:i.title,className:"max-w-[90vw] max-h-[90vh] object-contain rounded-lg",onClick:n=>n.stopPropagation()})]})]})}function rt(s){var t;if(s.iframe_src)return{url:s.iframe_src,aspect:"horizontal"};try{const r=new URL(s.url),c=r.hostname.replace(/^www\./,"");if(c.includes("youtube.com")){const o=r.pathname.startsWith("/shorts/"),d=r.searchParams.get("v")||((t=r.pathname.match(/\/(?:shorts|embed)\/([^/?]+)/))==null?void 0:t[1]);if(d)return{url:`https://www.youtube.com/embed/${d}?autoplay=1`,aspect:o?"vertical":"horizontal"}}if(c==="youtu.be"){const o=r.pathname.slice(1).split("/")[0];if(o)return{url:`https://www.youtube.com/embed/${o}?autoplay=1`,aspect:"horizontal"}}if(c==="vimeo.com"){const o=r.pathname.slice(1).split("/")[0];if(o&&/^\d+$/.test(o))return{url:`https://player.vimeo.com/video/${o}?autoplay=1`,aspect:"horizontal"}}}catch{}return null}function nt({videos:s}){const[t,r]=l.useState(null),o=s.filter(a=>a.thumbnail||a.img_src||a.iframe_src||a.url).slice(0,4);if(o.length===0)return e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"No videos found"});const d=t?rt(t):null;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-1",children:o.map((a,i)=>e.jsxs("button",{onClick:()=>r(a),className:"flex items-center gap-1.5 w-full rounded-md overflow-hidden bg-muted hover:bg-accent transition-colors group",children:[e.jsxs("div",{className:"relative w-20 flex-shrink-0 aspect-video overflow-hidden bg-muted",children:[a.thumbnail||a.img_src?e.jsx("img",{src:a.thumbnail||a.img_src,alt:a.title,className:"w-full h-full object-cover",loading:"lazy",onError:n=>{n.target.style.display="none"}}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsx(Y,{className:"w-3 h-3 text-muted-foreground"})}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"w-5 h-5 flex items-center justify-center bg-black/50 rounded-full",children:e.jsx(Y,{className:"w-2.5 h-2.5 text-white fill-white"})})})]}),e.jsxs("div",{className:"flex-1 min-w-0 py-1 pr-1.5",children:[e.jsx("p",{className:"text-[11px] leading-tight text-foreground group-hover:text-foreground transition-colors line-clamp-2 text-left",children:a.title}),e.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 text-left",children:D(a.url)})]})]},i))}),t&&e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/90",children:[e.jsx("button",{onClick:()=>r(null),className:"absolute top-4 right-4 p-2 text-white/70 hover:text-white hover:bg-white/10 rounded-full transition-colors z-10",children:e.jsx(F,{className:"w-6 h-6"})}),d?e.jsx("div",{className:d.aspect==="vertical"?"h-[80vh] aspect-[9/16] mx-4":"w-full max-w-4xl aspect-video mx-4",children:e.jsx("iframe",{src:d.url,title:t.title,className:"w-full h-full rounded-lg",allowFullScreen:!0,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"})}):e.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-sm mx-4",children:[(t.thumbnail||t.img_src)&&e.jsx("img",{src:t.thumbnail||t.img_src,alt:t.title,className:"max-h-[50vh] rounded-lg object-contain"}),e.jsx("p",{className:"text-white/90 text-sm text-center line-clamp-3",children:t.title}),e.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-4 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition-colors",children:[e.jsx(W,{className:"w-4 h-4"}),"Watch on ",D(t.url)]})]}),e.jsx("div",{className:"absolute inset-0 -z-10",onClick:()=>r(null)})]})]})}function oe({onSubmit:s,disabled:t=!1,placeholder:r="Ask a follow-up..."}){const c=l.useRef(null),o=d=>{d.preventDefault();const a=c.current;!(a!=null&&a.value.trim())||t||(s(a.value.trim()),a.value="")};return e.jsxs("form",{onSubmit:o,className:"flex items-center gap-2 px-4 py-3 bg-muted border border-border rounded-xl backdrop-blur-sm",children:[e.jsx(ge,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("input",{ref:c,type:"text",placeholder:r,disabled:t,className:"flex-1 bg-transparent text-foreground placeholder:text-muted-foreground focus:outline-none text-sm"}),e.jsx("button",{type:"submit",disabled:t,className:"p-1.5 text-muted-foreground hover:text-foreground disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:t?e.jsx(U,{className:"w-4 h-4 animate-spin"}):e.jsx($e,{className:"w-4 h-4"})})]})}function ot({content:s,sources:t,isLoading:r,propertyTable:c,query:o,centerTitle:d=!1,places:a,images:i,videos:n,imagesLoading:x,videosLoading:v,onSearchImages:S,onSearchVideos:L,onFollowUp:M}){const C=a&&a.length>0,[j,R]=l.useState([]),N=l.useRef(null),$=l.useCallback(u=>R(u),[]),g=l.useCallback(u=>{N.current=u},[]);return C?e.jsxs("div",{className:"relative flex flex-col h-full overflow-hidden",children:[e.jsx("div",{className:"flex-1 overflow-y-auto dark-scrollbar",children:e.jsxs("div",{className:"flex min-h-full justify-center",children:[e.jsxs("div",{className:"w-full min-w-0 px-8 py-6 pb-24",children:[e.jsx("h1",{className:`text-2xl font-semibold text-foreground mb-6 ${d?"text-center":""}`,children:o}),e.jsx(tt,{places:a,query:o,onPlacesLoaded:$,onMapReady:g}),e.jsx(te,{content:s,sources:t,propertyTable:c,isLoading:r})]}),e.jsx("div",{className:"hidden lg:block w-[280px] flex-shrink-0",children:e.jsxs("div",{className:"sticky top-0 p-4 space-y-4 max-h-screen overflow-y-auto scrollbar-hide",children:[j.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider flex items-center gap-2",children:[e.jsx(ie,{className:"w-4 h-4"}),"Services (",j.length,")"]}),e.jsx("div",{className:"space-y-1.5",children:j.map((u,y)=>e.jsxs("button",{type:"button",onClick:()=>{var I;return(I=N.current)==null?void 0:I.call(N,u)},className:"flex items-start gap-2.5 px-3 py-2.5 bg-muted border border-border rounded-md hover:border-blue-500/50 transition-colors w-full text-left",children:[e.jsx("span",{className:`flex-shrink-0 w-5 h-5 rounded-full text-white text-xs font-semibold flex items-center justify-center mt-0.5 ${u.source==="serper"?"bg-blue-500":"bg-green-500"}`,children:u.label}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:u.title}),e.jsx("div",{className:"flex items-center gap-2 mt-0.5",children:u.rating!=null&&e.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[e.jsx(Ie,{className:"w-3 h-3 text-amber-400 fill-amber-400"}),u.rating.toFixed(1),u.reviewCount!=null&&e.jsxs("span",{children:["(",u.reviewCount,")"]})]})}),u.address&&e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:u.address}),u.phone&&e.jsx("span",{className:"text-xs text-blue-500 mt-0.5 block",children:u.phone})]})]},`${u.source}-${y}`))})]}),t.length>0&&e.jsx(ae,{sources:t})]})})]})}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 px-8 pb-4 pt-6 bg-gradient-to-t from-background via-background/95 to-transparent pointer-events-none",children:e.jsx("div",{className:"pointer-events-auto mx-auto max-w-3xl",children:e.jsx(oe,{onSubmit:M,disabled:r})})})]}):e.jsxs("div",{className:"relative flex flex-col h-full overflow-hidden",children:[e.jsx("div",{className:"flex-1 overflow-y-auto dark-scrollbar",children:e.jsxs("div",{className:"flex min-h-full justify-center",children:[e.jsxs("div",{className:"w-full min-w-0 px-8 py-6 pb-24",children:[e.jsx("h1",{className:`text-2xl font-semibold text-foreground mb-6 ${d?"text-center":""}`,children:o}),e.jsx(te,{content:s,sources:t,propertyTable:c,isLoading:r})]}),e.jsx("div",{className:"hidden lg:block w-[280px] flex-shrink-0",children:e.jsxs("div",{className:"sticky top-0 p-4 space-y-4 max-h-screen overflow-y-auto scrollbar-hide",children:[e.jsx(le,{title:"Images",icon:e.jsx(_e,{className:"w-4 h-4"}),data:i,isLoading:x,onSearch:S,renderContent:u=>e.jsx(st,{images:u,query:o})}),e.jsx(le,{title:"Videos",icon:e.jsx(Pe,{className:"w-4 h-4"}),data:n,isLoading:v,onSearch:L,renderContent:u=>e.jsx(nt,{videos:u})}),t.length>0&&e.jsx(ae,{sources:t})]})})]})}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 px-8 pb-4 pt-6 bg-gradient-to-t from-background via-background/95 to-transparent pointer-events-none",children:e.jsx("div",{className:"pointer-events-auto mx-auto max-w-3xl",children:e.jsx(oe,{onSubmit:M,disabled:r})})})]})}function ae({sources:s,maxVisible:t=8}){const[r,c]=l.useState(!1),o=s.slice(0,t),d=Math.max(0,s.length-t);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider flex items-center gap-2",children:[e.jsx(W,{className:"w-4 h-4"}),"Sources"]}),e.jsxs("div",{className:"space-y-1.5",children:[o.map((a,i)=>{const n=D(a.url),x=ce(a.url),v=a.title||n;return e.jsxs("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:"flex flex-col gap-0.5 px-2 py-1.5 bg-muted border border-border rounded-md hover:border-blue-500/50 transition-colors group",children:[e.jsx("span",{className:"text-xs text-foreground group-hover:text-foreground transition-colors truncate",children:v}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("img",{src:x,alt:"",className:"w-3 h-3 flex-shrink-0",onError:S=>{S.target.style.display="none"}}),e.jsx("span",{className:"text-[11px] text-muted-foreground truncate",children:n}),e.jsxs("span",{className:"text-[11px] text-muted-foreground flex-shrink-0",children:["⢠",i+1]})]})]},i)}),d>0&&e.jsxs("button",{onClick:()=>c(!0),className:"flex items-center gap-1 w-full px-2 py-1.5 bg-muted border border-border rounded-md text-xs text-muted-foreground hover:text-foreground hover:border-blue-500/50 transition-colors",children:[e.jsxs("span",{children:["+",d," more"]}),e.jsx(ze,{className:"w-3 h-3"})]})]})]}),r&&e.jsx(qe,{sources:s,onClose:()=>c(!1)})]})}function le({title:s,icon:t,data:r,isLoading:c,onSearch:o,renderContent:d}){return r===null&&!c?e.jsxs("button",{onClick:o,className:"flex items-center justify-center gap-1.5 w-full px-2 py-2 bg-muted border border-border rounded-md text-muted-foreground hover:text-foreground hover:border-blue-500/50 transition-colors",children:[t,e.jsxs("span",{className:"text-xs",children:["Search ",s.toLowerCase()]})]}):c?e.jsxs("div",{className:"flex items-center justify-center gap-1.5 px-2 py-2 bg-muted border border-border rounded-md text-muted-foreground",children:[e.jsx(U,{className:"w-3.5 h-3.5 animate-spin"}),e.jsx("span",{className:"text-xs",children:"Loading..."})]}):r&&r.length===0?e.jsxs("div",{className:"flex items-center justify-center gap-1.5 px-2 py-2 bg-muted border border-border rounded-md text-muted-foreground",children:[t,e.jsxs("span",{className:"text-xs",children:["No ",s.toLowerCase()," found"]}
93)]}):e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider flex items-center gap-2",children:[t,s]}),r&&d(r)]})}function at(){const s=l.useRef(null),[t,r]=l.useState(""),[c,o]=l.useState(!1),[d,a]=l.useState(!1),[i,n]=l.useState(!1),[x,v]=l.useState(null),S=ue(),L=me(),{messages:M,isResearching:C,responseMedia:j,places:R,submitQuestion:N,clearMessages:$,loadSession:g}=Ge(),u=We(),y=Qe();l.useEffect(()=>{const m=S.state;m!=null&&m.openChats&&(a(!0),y.fetchSessions(),L(S.pathname,{replace:!0,state:{}}))},[]),l.useEffect(()=>{j&&u.setMedia(j.images,j.videos)},[j]),l.useEffect(()=>{const m=S.state;if(m!=null&&m.articleUrl){const p=m.articleTitle||m.articleUrl;r(p),o(!0),u.reset(),N(p,{articleUrl:m.articleUrl}),L(S.pathname,{replace:!0,state:{}})}},[]);const I=m=>{m.preventDefault();const p=s.current;if(!(p!=null&&p.value.trim())||C)return;const k=p.value.trim();r(k),o(!1),u.reset(),N(k),p.value=""},T=l.useCallback(m=>{r(m),o(!1),u.reset(),N(m)},[N,u]),h=l.useCallback(()=>{t&&u.searchImages(t)},[t,u]),b=l.useCallback(()=>{t&&u.searchVideos(t)},[t,u]),V=l.useCallback(()=>{$(),u.reset(),r(""),o(!1),v(null)},[$,u]),B=l.useCallback(async()=>{try{await y.deleteAllSessions(),V()}catch(m){console.error("Failed to delete all sessions",m)}},[y,V]),H=l.useCallback(async m=>{try{const p=await y.fetchMessages(m.id),k=g(m.id,p);r(m.title||""),u.setMedia(k.images,k.videos),v(null),a(!1)}catch(p){console.error("Failed to load session",p)}},[y,g,u]),w=l.useCallback(async m=>{try{v(await be(m))}catch(p){console.error("Failed to load report:",p)}},[]),f=M.filter(m=>m.role==="assistant").slice(-1)[0],E=!!(f!=null&&f.content)||R.length>0;return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsx(ve,{children:e.jsx(Oe,{inline:!0,disabled:C,onNewsNavigate:V,onFocusChange:V,leftSlot:e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:()=>{a(m=>!m),n(!1)},className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg transition-colors ${d?"bg-blue-500/20 text-blue-500":"text-foreground/70 hover:text-foreground hover:bg-accent"}`,title:"Chat history",children:[e.jsx(Te,{className:`w-4 h-4 ${d?"":"text-sky-400"}`}),e.jsx("span",{className:"text-sm",children:"Chats"})]}),e.jsx("div",{className:"w-px h-5 bg-border"}),e.jsxs("button",{type:"button",onClick:()=>{n(m=>!m),a(!1)},className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg transition-colors ${i?"bg-blue-500/20 text-blue-500":"text-foreground/70 hover:text-foreground hover:bg-accent"}`,title:"Reports",children:[e.jsx(je,{className:`w-4 h-4 ${i?"":"text-emerald-400"}`}),e.jsx("span",{className:"text-sm",children:"Reports"})]})]}),rightSlot:e.jsx(Ve,{})})}),e.jsxs("div",{className:"flex flex-1 min-w-0 min-h-0 overflow-hidden",children:[e.jsx(Je,{open:d,onClose:()=>a(!1),sessions:y.sessions,loading:y.loading,onFetchSessions:y.fetchSessions,onSelectSession:H,onDeleteSession:y.deleteSession,onDeleteAll:B}),e.jsx(Ae,{open:i,onClose:()=>n(!1),onSelect:w}),e.jsx("div",{className:"flex flex-col min-w-0 min-h-0 flex-1 overflow-hidden bg-background",children:x?e.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e.jsx(ye,{runLog:x,onNewResearch:()=>v(null)})}):E||C?e.jsx(ot,{content:(f==null?void 0:f.content)||"",sources:(f==null?void 0:f.sources)||[],isLoading:C||!!(f!=null&&f.isLoading),propertyTable:null,query:t,centerTitle:c,places:R,images:u.images,videos:u.videos,imagesLoading:u.imagesLoading,videosLoading:u.videosLoading,onSearchImages:h,onSearchVideos:b,onFollowUp:T}):e.jsx(lt,{inputRef:s,onSubmit:I,disabled:C})})]})]})}function lt({inputRef:s,onSubmit:t,disabled:r}){return e.jsx("div",{className:"flex-1 flex flex-col items-center p-8 pt-[15vh]",children:e.jsxs("div",{className:"max-w-2xl w-full text-center",children:[e.jsx("h1",{className:"text-3xl font-semibold text-foreground mb-2",children:"Research begins here."}),e.jsx("p",{className:"text-muted-foreground mb-8",children:"Search the web, read sources, and get comprehensive answers with citations."}),e.jsx("form",{onSubmit:t,children:e.jsx("div",{className:"bg-muted border border-border rounded-xl focus-within:ring-2 focus-within:ring-blue-500 focus-within:border-blue-500",children:e.jsxs("div",{className:"flex items-center px-4",children:[e.jsx("input",{ref:s,t
93ype:"text",placeholder:"Ask anything...",disabled:r,className:"flex-1 py-4 bg-transparent text-foreground placeholder:text-muted-foreground focus:outline-none text-base"}),e.jsx("button",{type:"submit",disabled:r,className:"p-2 text-muted-foreground hover:text-foreground disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:e.jsx(we,{className:"w-5 h-5"})})]})})}),e.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-8",children:[e.jsxs("div",{className:"bg-muted/60 border border-border rounded-xl p-5 text-left",children:[e.jsx(De,{className:"w-5 h-5 text-blue-400 mb-3"}),e.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:"Cited sources"}),e.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Every answer is backed by sources you can open and verify yourself."})]}),e.jsxs("div",{className:"bg-muted/60 border border-border rounded-xl p-5 text-left",children:[e.jsx(Ne,{className:"w-5 h-5 text-emerald-400 mb-3"}),e.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:"Live web"}),e.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Searches the current web and reads the results â not a stale model snapshot."})]}),e.jsxs("div",{className:"bg-muted/60 border border-border rounded-xl p-5 text-left",children:[e.jsx(ke,{className:"w-5 h-5 text-rose-400 mb-3"}),e.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:"Property-savvy"}),e.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Built for real estate research â co-living, RV parks, and the numbers behind them."})]})]})]})})}function Pt(){return e.jsx(Se,{hideHeader:!0,fullWidth:!0,children:e.jsx(at,{})})}export{Pt 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.