1import{c as f,j as e,E as g,G as v,J as y,K as N,Q as U,r as c,V as _,W as M,d as q,Y,T as X,k as ee,B as R,I as se,l as E,Z as te,m as ae,_ as re,z as ie,F as ne,L as W,M as le,$ as oe,a0 as ce}from"./index-BG-vFjXE.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const H=f("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const de=f("CalendarCheck",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m9 16 2 2 4-4",key:"19s6y9"}]]);/** 12 * @license lucide-react v0.462.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const me=f("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 17 * @license lucide-react v0.462.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const xe=f("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 22 * @license lucide-react v0.462.0 - ISC 23 * 24 * This source code is licensed under the ISC license. 25 * See the LICENSE file in the root directory of this source tree. 26 */const pe=f("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 27 * @license lucide-react v0.462.0 - ISC 28 * 29 * This source code is licensed under the ISC license. 30 * See the LICENSE file in the root directory of this source tree. 31 */const he=f("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),V=({title:s,entries:t})=>e.jsxs("div",{className:"rounded-xl border border-gray-200 bg-white p-5",children:[e.jsx("p",{className:"text-sm font-semibold text-geodark",children:s}),e.jsx("div",{className:"mt-3 space-y-2",children:t.length?t.map(a=>{const r=y(a.brand_name,a.domain||"Competitor");return e.jsxs("div",{className:`flex items-center justify-between rounded-lg border px-3 py-2.5 ${a.is_user_brand?"border-geoblue/40 bg-blue-50":"border-gray-100 bg-white"}`,children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsxs("span",{className:`w-6 text-sm ${a.is_user_brand?"font-bold text-geoblue":"text-geodark-light"}`,children:["#",a.rank]}),e.jsx(N,{domain:a.domain,name:r}),e.jsxs("span",{className:`truncate text-sm ${a.is_user_brand?"font-bold text-geodark":"font-medium text-geodark"}`,children:[r,a.is_user_brand?" (you)":""]})]}),e.jsxs("span",{className:`text-sm font-semibold ${a.is_user_brand?"text-geoblue":"text-geodark"}`,children:[a.pct,"%"]})]},`${a.rank}-${r}`)}):e.jsx("p",{className:"py-4 text-sm text-geodark-light",children:"No ranking data available yet."})})]}),ue=({benchmark:s})=>{var r,i;const t=((r=s.visibility_ranking.find(n=>n.is_user_brand))==null?void 0:r.pct)??s.visibility_pct,a=((i=s.sov_ranking.find(n=>n.is_user_brand))==null?void 0:i.pct)??s.sov_pct;return e.jsxs(g,{title:"Competitive Benchmark",subtitle:"How your brand's AI visibility and share of voice compare against direct competitors, measured from live AI answers.",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-xl border border-gray-200 bg-gradient-to-br from-blue-50 to-white p-5 text-center",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.06em] text-geodark-light",children:"Your AI visibility"}),e.jsx("p",{className:"mt-2 text-4xl font-semibold text-geodark",children:t!=null?`${t}%`:"â"}),e.jsx("p",{className:"mt-1 text-xs text-geodark-light",children:"Share of AI answers that mention your brand"})]}),e.jsxs("div",{className:"rounded-xl border border-gray-200 bg-gradient-to-br from-purple-50 to-white p-5 text-center",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.06em] text-geodark-light",children:"Share of voice"}),e.jsx("p",{className:"mt-2 text-4xl font-semibold text-geodark",children:a!=null?`${a}%`:"â"}),e.jsx("p",{className:"mt-1 text-xs text-geodark-light",children:"Your share of all brand mentions in AI answers"})]})]}),e.jsxs("div",{className:"mt-4 grid gap-4 lg:grid-cols-2",children:[e.jsx(V,{title:"Top Visible Brands",entries:s.visibility_ranking}),e.jsx(V,{title:"Share of Voice",entries:s.sov_ranking})]}),(()=>{const n=s.topic_visibility.filter(l=>!v(l.topic_name));return n.length?e.jsxs("div",{className:"mt-4 rounded-xl border border-gray-200 bg-white p-5",children:[e.jsx("p",{className:"text-sm font-semibold text-geodark",children:"Your Topic Visibility"}),e.jsx("div",{className:"mt-3 space-y-2.5",children:n.map(l=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-1/3 truncate text-sm text-geodark",children:y(l.topic_name,"Topic")}),e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-geolight",children:e.jsx("div",{className:"h-full rounded-full bg-geoblue",style:{width:`${Math.min(100,Math.max(0,l.visibility_pct))}%`}})}),e.jsxs("span",{className:"w-12 text-right text-sm font-semibold text-geodark",children:[l.visibility_pct,"%"]})]},l.topic_name))})]}):null})()]})},ge=({landscape:s})=>{const t=s.filter(a=>!v(a.name));return t.length?e.jsx(g,{title:"Competitive Landscape",subtitle:"Top competitors mentioned across AI models, showing how your brand compares in the market.",children:e.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:t.map(a=>{const r=y(a.name,a.domain||"Competitor");return e.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl border border-gray-200 bg-white px-4 py-3",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx(N,{domain:a.domain,name:r,size:28}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-semibold text-geodark",children:r}),a.domain?e.jsx("a",{href:`https://${a.domain}`,target:"_blank",rel:"noopener noreferrer",className:"block truncate text-xs text-geoblue hover:underline",children:a.domain}):null]})]}),e.jsxs("span",{className:"shrink-0 text-xs text-geodark-light",children:["Mentioned ",a.mention_count," time",a.mention_count===1?"":"s"]})]},r)})})}):null},be=({status:s})=>{const t={visible:"bg-[#84bf99] text-white",blocked:"bg-[#e2726e] text-white",unknown:"bg-gray-300 text-gray-700"}[s],a={visible:"Visible",blocked:"Blocked",unknown:"Unknown"}[s];return e.jsx("span",{"data-pdf-pill":"",className:`inline-block h-6 rounded-full px-4 text-center text-xs font-bold uppercase leading-6 tracking-[0.08em] ${t}`,children:a})},S=({icon:s,label:t,status:a,detail:r,bots:i})=>{const n=!!(i&&i.length),l=n&&r.includes(":")?`${r.slice(0,r.lastIndexOf(":"))}:`:r;return e.jsxs("div",{className:"flex flex-col gap-3 py-5 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex w-full shrink-0 items-center gap-3 sm:w-[170px]",children:[e.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-blue-50 text-geoblue",children:s}),e.jsx("span",{className:"text-base font-semibold text-geodark",children:t})]}),e.jsx("div",{className:"shrink-0 sm:w-[110px]",children:e.jsx(be,{status:a})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm leading-6 text-geodark",children:l}),n?e.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:i.map(p=>e.jsx("span",{className:"rounded-md bg-gray-100 px-2 py-0.5 text-xs font-medium text-geodark",children:p},p))}):null]})]})},fe=({diagnostics:s})=>{var i;if(!s)return null;const{ccbot:t,robots:a}=s,r=(i=a.blocked_bots)!=null&&i.length?a.blocked_bots:a.partially_blocked_bots||[];return e.jsx(g,{title:"AI Crawler Diagnostics",subtitle:"Check if AI systems can see your site.",children:e.jsxs("div",{className:"divide-y divide-gray-100 border-t border-gray-100",children:[e.jsx(S,{icon:e.jsx(H,{className:"h-5 w-5"}),label:"CCBot",status:t.status,detail:t.detail}),e.jsx(S,{icon:e.jsx(U,{className:"h-5 w-5"}),label:"Robots.txt",status:a.status,detail:a.detail,bots:r})]})})},je=s=>s>=60?"green":s>=25?"blue":"red",ye=({card:s})=>{const[t,a]=c.useState(!1);return e.jsxs("div",{className:"rounded-xl border border-gray-200 bg-white p-5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex h-11 w-11 items-center justify-center rounded-xl border border-gray-100 bg-white shadow-sm",children:e.jsx(_,{platform:s.platform,size:28})}),e.jsx("p",{className:"text-lg font-semibold text-geodark",children:s.display_name})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[e.jsx(M,{tone:je(s.visibility_score),label:`${s.visibility_score}/100`}),s.share_of_voice_pct>0?e.jsx(M,{tone:"purple",label:`${s.share_of_voice_pct}% Share`}):null,s.mentioned?e.jsx(M,{tone:"blue",label:"Mentioned"}):null]})]}),e.jsx("p",{className:"mt-4 text-sm leading-6 text-geodark-light",children:s.mentioned?`Your brand is visible in ${s.display_name}, with a ${s.share_of_voice_pct}% share of all brand mentions observed for this model.`:`Your brand was not visible in the answers we collected from ${s.display_name} â competitors are filling that space.`}),s.raw_response?e.jsxs("div",{className:"mt-4","data-pdf-hide":"",children:[e.jsxs("button",{type:"button",onClick:()=>a(r=>!r),className:"inline-flex items-center gap-1 text-sm font-medium text-geoblue hover:underline",children:[t?e.jsx(q,{className:"h-4 w-4"}):e.jsx(Y,{className:"h-4 w-4"}),"View raw AI response"]}),t?e.jsx("div",{className:"mt-3 max-h-72 overflow-y-auto whitespace-pre-wrap rounded-lg border border-gray-100 bg-geo-page p-4 text-xs leading-5 text-geodark",children:s.raw_response}):null]}):null]})},Ne=({cards:s})=>s.length?e.jsx(g,{title:"Detailed Results by AI Model",subtitle:"Each AI model has its own personality and knowledge gaps. Here's how each performed when asked about your market.",children:e.jsx("div",{className:"space-y-4",children:s.map(t=>e.jsx(ye,{card:t},t.platform))})}):null,ke=s=>s>=60?"#16a34a":s>=25?"#2563eb":"#dc2626",h=132,L=12,T=(h-L)/2,F=2*Math.PI*T,we=[{platform:"copilot",display_name:"Copilot"},{platform:"aio",display_name:"Google AI Overviews"}],O=({score:s,teaser:t})=>{const a=Math.max(0,Math.min(100,s)),r=F*(1-a/100),i=ke(a);return e.jsxs("div",{className:"relative",style:{width:h,height:h},children:[e.jsxs("svg",{width:h,height:h,className:"-rotate-90",children:[e.jsx("circle",{cx:h/2,cy:h/2,r:T,f
31ill:"none",stroke:"#e5e7eb",strokeWidth:L}),t?null:e.jsx("circle",{cx:h/2,cy:h/2,r:T,fill:"none",stroke:i,strokeWidth:L,strokeLinecap:"round",strokeDasharray:F,strokeDashoffset:r,style:{transition:"stroke-dashoffset 0.8s ease"}})]}),e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[t?e.jsx(pe,{className:"h-6 w-6 text-geodark-light"}):e.jsxs("span",{className:"text-2xl font-semibold text-geodark",children:[a,"%"]}),e.jsx("span",{className:"text-[11px] uppercase tracking-[0.06em] text-geodark-light",children:"Visibility"})]})]})},ve=({cards:s})=>{if(!s.length)return null;const t=new Set(s.map(r=>r.platform.toLowerCase())),a=we.filter(r=>!t.has(r.platform));return e.jsx(g,{title:"Visibility by AI Model",subtitle:"How often your brand appears in each AI model's answers, as a share of the responses we analyzed.",children:e.jsxs("div",{className:"grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-5",children:[s.map(r=>e.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-gray-200 bg-white px-4 py-6",children:[e.jsx(O,{score:r.visibility_score}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{platform:r.platform,size:20}),e.jsx("span",{className:"text-sm font-semibold text-geodark",children:r.display_name})]})]},r.platform)),a.map(r=>e.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-gray-200 bg-white px-4 py-6 opacity-40",children:[e.jsx(O,{score:0,teaser:!0}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{platform:r.platform,size:20}),e.jsx("span",{className:"text-center text-sm font-semibold text-geodark",children:r.display_name})]})]},r.platform))]})})},_e=({gaps:s})=>s.examples.length?e.jsxs(g,{title:"Purchase-Intent Citation Gaps",subtitle:'Sources AI models cite on "buy now" style queries where your competitors are present â and your brand is not.',children:[e.jsx("div",{className:"grid gap-4 md:grid-cols-3",children:s.examples.map(t=>e.jsxs("div",{className:"flex flex-col rounded-xl border border-gray-200 bg-white p-5",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(N,{domain:t.source_domain,name:t.source_domain,size:28}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-semibold text-geodark",children:t.source_domain}),e.jsx("p",{className:"text-xs text-geodark-light",children:"Purchase-intent opportunity"})]})]}),e.jsxs("p",{className:"mt-3 line-clamp-2 text-xs italic text-geodark-light",children:["â",t.prompt_text,"â"]}),t.competitors_cited.filter(a=>!v(a)).length?e.jsxs("p",{className:"mt-3 text-xs text-geodark-light",children:[e.jsx("span",{className:"font-semibold text-red-600",children:"Competitors cited:"})," ",t.competitors_cited.filter(a=>!v(a)).map(a=>y(a)).join(", ")]}):null,e.jsxs("a",{href:t.example_url,target:"_blank",rel:"noopener noreferrer",className:"mt-auto inline-flex items-center gap-1 pt-3 text-xs font-medium text-geoblue hover:underline",children:["View source",e.jsx(xe,{className:"h-3 w-3"})]})]},t.source_domain))}),s.more_opportunities>0?e.jsxs("div",{className:"mt-4 flex items-center gap-3 rounded-xl border border-geoblue/30 bg-blue-50 px-5 py-4",children:[e.jsx(X,{className:"h-5 w-5 shrink-0 text-geoblue"}),e.jsxs("p",{className:"text-sm text-geodark",children:[e.jsxs("span",{className:"font-semibold",children:["Full list of ",s.more_opportunities," more opportunit",s.more_opportunities===1?"y":"ies"]})," ","available on the platform."]})]}):null]}):e.jsx(g,{title:"Purchase-Intent Citation Gaps",subtitle:'Sources AI models cite on "buy now" style queries where competitors appear but you do not.',children:e.jsx("p",{className:"py-4 text-sm text-geodark-light",children:"No purchase-intent citation gaps detected in this run â either your brand is present on the key sources, or more prompt data is needed. The full platform monitors these continuously."})}),Se="https://cal.com/geogenie.ai/demo",Ie=({reportId:s,token:t,calendarUrl:a})=>{const{toast:r}=ee(),[i,n]=c.useState(!1),[l,p]=c.useState(""),[u,k]=c.useState(!1),[j,w]=c.useState(null),I=async()=>
31{if(!(u||!l))try{k(!0);const m=await te(s,t,l);w(m.login_url),r({title:"Account ready",description:"Your GeoGenie account has been created. You can now sign in."})}catch(m){r({title:"Could not create account",description:m instanceof Error?m.message:"Please try again.",variant:"destructive"})}finally{k(!1)}};return e.jsxs("section",{className:"rounded-2xl border border-geoblue/30 bg-gradient-to-r from-blue-50 via-white to-purple-50 p-6 md:p-8",children:[e.jsxs("div",{className:"flex flex-col items-start justify-between gap-5 md:flex-row md:items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold text-geodark",children:"Interested in a holistic approach and need assistance?"}),e.jsx("p",{className:"mt-1 text-sm text-geodark-light",children:"Walk through your report with a GEO specialist and get a concrete action plan."})]}),e.jsxs(R,{type:"button",onClick:()=>window.open(a||Se,"_blank","noopener,noreferrer"),className:"h-12 shrink-0 rounded-lg bg-geoblue px-6 text-sm font-medium text-white hover:bg-geoblue-light",children:[e.jsx(de,{className:"mr-2 h-4 w-4"}),"Book a call"]})]}),e.jsx("div",{className:"mt-6 border-t border-gray-200 pt-5",children:j?e.jsxs("p",{className:"text-sm text-geodark",children:["Your account is ready."," ",e.jsx("a",{href:j,className:"font-medium text-geoblue underline underline-offset-2",children:"Sign in to the GeoGenie console"})," ","to keep monitoring your AI visibility."]}):e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:()=>n(m=>!m),className:"inline-flex items-center gap-1 text-sm font-medium text-geodark hover:text-geoblue",children:[i?e.jsx(q,{className:"h-4 w-4"}):e.jsx(Y,{className:"h-4 w-4"}),"Want the full report? Create your GeoGenie account"]}),i?e.jsxs("div",{className:"mt-4 flex max-w-md flex-col gap-3 sm:flex-row",children:[e.jsx(se,{type:"password",placeholder:"Choose a password*",className:"h-12 rounded-xl border-geo-border px-3 text-sm focus-visible:ring-1 focus-visible:ring-geoblue focus-visible:ring-offset-0",value:l,onChange:m=>p(m.target.value)}),e.jsx(R,{type:"button",onClick:I,disabled:u||!l,className:"h-12 shrink-0 rounded-lg bg-geodark px-5 text-sm font-medium text-white hover:bg-geodark/90",children:u?e.jsxs(e.Fragment,{children:[e.jsx(E,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating..."]}):"Create account"})]}):null,i?e.jsx("p",{className:"mt-2 text-xs text-geodark-light",children:"Use at least 8 characters with uppercase, lowercase, number and special character. Your report workspace and data carry over."}):null]})})]})},Ce=({metrics:s})=>e.jsx(g,{title:"Visibility Metrics",subtitle:"Baseline metrics from live AI answers: how often your brand appears and which sources AI models cite alongside it.",children:e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"rounded-xl border border-gray-200 bg-white p-5 text-center",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.06em] text-geodark-light",children:"Brand mentions"}),e.jsx("p",{className:"mt-2 text-4xl font-semibold text-geodark",children:s.brand_mention_count}),e.jsx("p",{className:"mt-1 text-xs text-geodark-light",children:"Times your brand appeared in AI answers"})]}),e.jsxs("div",{className:"rounded-xl border border-gray-200 bg-white p-5",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.06em] text-geodark-light",children:"Top citation sources"}),s.top_citation_sources.length?e.jsx("div",{className:"mt-3 space-y-2",children:s.top_citation_sources.slice(0,5).map(t=>e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(N,{domain:t.domain,name:t.domain,size:20}),e.jsx("span",{className:"truncate text-sm text-geodark",children:t.domain})]}),e.jsx("span",{className:"shrink-0 rounded-full bg-geolight px-2 py-0.5 text-xs font-semibold text-geodark",children:t.citation_count})]},t.domain))}):e.jsx("p",{className:"mt-3 text-sm text-geodark-light",children:"No citations recorded alongside your brand yet."})]})]})}),Ae=5e3,J="freeReportAccess",K=()=>typeof sessionStorage<"u",Me=()=>{if(!K())return null;try{const s=sessionStorage.getItem(J);if(!s)return null;const t=JSON.parse(s);if(t.reportId&&t.token)return{reportId:t.reportId,token:t.token,domain:t.domain||""}}catch{}return null},Re=()=>e.jsx("header",{className:"fixed left-0 right-0 top-0 z-50 border-b border-[rgba(82,82,82,0.2)] bg-geo-page",children:e.jsx("div",{className:"mx-auto w-[1440px] max-w-full px-4 md:px-[120px]",children:e.jsx("div",{className:"flex h-16 w-full items-center md:h-20 md:pl-[5px]",children:e.jsx(W,{to:"/",className:"shrink-0","aria-label":"GeoGenie home",children:e.jsx("img",{src:"/images/geogenie-logo-colorful.png",alt:"GeoGenie",className:"h-8 w-auto md:h-10"})})})})}),P=[{key:"queued",label:"Queued for analysis"},{key:"provisioning",label:"Setting up your workspace"},{key:"researching",label:"Researching your brand and competitors"},{key:"executing",label:"Running live prompts across AI models"},{key:"building",label:"Compiling your report"}],Ee=s=>{const t=P.findIndex(a=>a.key===s);return t===-1?P.length:t},Le=({diagnostics:s,domain:t})=>{var r;const a=(r=s.robots.blocked_bots)!=null&&r.length?s.robots.blocked_bots:s.robots.partially_blocked_bots||[];return e.jsxs("div",{className:"mt-6 rounded-2xl border border-gray-100 bg-white px-5 shadow-[0_10px_30px_rgba(26,48,83,0.08)]",children:[e.jsxs("p",{className:"border-b border-gray-100 py-4 text-xs font-semibold uppercase tracking-[0.08em] text-geodark-light",children:["Early diagnostics for ",t]}),e.jsxs("div",{className:"divide-y divide-gray-100",children:[e.jsx(S,{icon:e.jsx(H,{className:"h-5 w-5"}),label:"CCBot",status:s.ccbot.status,detail:s.ccbot.detail}),e.jsx(S,{icon:e.jsx(U,{className:"h-5 w-5"}),label:"Robots.txt",status:s.robots.status,detail:s.robots.detail,bots:a})]})]})},Te=["chatgpt","perplexity","gemini"],Pe=()=>e.jsx("div",{className:"flex items-center justify-center gap-3 sm:gap-4",children:Te.map((s,t)=>e.jsxs("span",{className:"relative flex h-12 w-12 items-center justify-center overflow-hidden rounded-xl border border-gray-100 bg-white shadow-sm",children:[e.jsx(_,{platform:s,size:26}),e.jsx("span",{className:"absolute inset-y-0 w-2/3 animate-shimmer bg-gradient-to-r from-transparent via-white/80 to-transparent",style:{animationDelay:`${t*.35}s`}})]},s))}),Q=({children:s})=>e.jsxs("div",{className:"relative w-full overflow-hidden rounded-3xl px-4 py-12 sm:px-8 sm:py-16 md:px-16 md:py-20",style:{backgroundImage:"linear-gradient(-60.32deg, rgba(190, 209, 255, 0.4) 2.16%, rgba(248, 237, 255, 0.4) 51.66%, rgba(202, 229, 250, 0.4) 100%)"},children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-[0.35]",style:{backgroundImage:"linear-gradient(rgba(158, 119, 237, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(158, 119, 237, 0.12) 1px, transparent 1px)",backgroundSize:"118px 118px"}}),e.jsx("img",{src:"/images/home/hero-mesh.png",alt:"",className:"pointer-events-none absolute bottom-0 left-1/2 w-full -translate-x-1/2 object-cover object-bottom opacity-90","aria-hidden":!0}),e.jsx("div",{className:"relative z-10 mx-auto w-full max-w-[640px]",children:s})]}),Ge=({status:s,stepLabel:t,diagnostics:a,domain:r})=>{const i=Ee(s);return e.jsxs(Q,{children:[e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("p",{className:"text-sm font-medium text-geo-muted",children:"AI visibility report"}),e.jsx("h1",{className:"mt-2 text-[28px] font-semibold leading-tight tracking-tight text-[#171717] sm:text-[36px]",children:"Generating report for"}),e.jsx("p",{className:"mt-1 font-display text-[28px] font-bold italic leading-tight text-geo-primary sm:text-[36px]",children:r}),e.jsxs("p",{className:"mt-4 max-w-[480px] text-sm leading-6 text-geo-muted sm:text-base",children:[t||"Working on it..."," This runs live prompts across AI models and can take several minutes."]}),e.jsxs("div",{className:"mt-5 flex w-full max-w-[480px] items-start gap-3 rounded-2xl border border-geo-primary/20 bg-geo-primary/5 px-4 py-3 text-left sm:px-5 sm:py-3.5",children:[e.jsx("span",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-geo-primary/10 text-geo-primary",children:e.jsx(le,{className:"h-4 w-4"})}),e.jsxs("p",{className:"text-sm leading-6 text-[#171717] sm:text-[15px]",children:[e.jsx("span",{className:"font-semibold",children:"Don't want to wait?"}
31)," ","We'll email you a link when your report is ready â you can close this tab and come back anytime."]})]}),e.jsx("div",{className:"mt-8",children:e.jsx(Pe,{})})]}),e.jsxs("div",{className:"relative mt-8 w-full rounded-3xl bg-white p-7 shadow-[0px_12px_29px_rgba(0,0,0,0.08),0px_40px_48px_rgba(0,0,0,0.06)] sm:p-8",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(E,{className:"mt-0.5 h-5 w-5 shrink-0 animate-spin text-geo-primary"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-[#171717]",children:t||"Analyzing your brand across AI search engines"}),e.jsx("p",{className:"mt-1 text-sm text-geo-muted",children:"Progress updates as each stage finishes."})]})]}),e.jsx("div",{className:"mt-6 space-y-3",children:P.map((n,l)=>{const p=l<i,u=l===i;return e.jsxs("div",{className:"flex items-center gap-3",children:[p?e.jsx(me,{className:"h-5 w-5 shrink-0 text-green-600"}):u?e.jsx(E,{className:"h-5 w-5 shrink-0 animate-spin text-geo-primary"}):e.jsx("span",{className:"h-5 w-5 shrink-0 rounded-full border-2 border-gray-200"}),e.jsx("span",{className:`text-sm ${p?"text-geo-muted line-through":u?"font-medium text-[#171717]":"text-geo-muted"}`,children:n.label})]},n.key)})}),a?e.jsx(Le,{diagnostics:a,domain:r}):null]})]})},$e=s=>{if(!s)return!1;const t=s.toLowerCase();return!(t.includes("psycopg")||t.includes("sqlalchemy")||t.includes("traceback")||t.includes("undefinedcolumn")||t.includes("[sql:")||s.length>280)},De=({error:s})=>e.jsx(Q,{children:e.jsxs("div",{className:"rounded-3xl bg-white p-8 text-center shadow-[0px_12px_29px_rgba(0,0,0,0.08),0px_40px_48px_rgba(0,0,0,0.06)]",children:[e.jsx("div",{className:"mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-red-50",children:e.jsx(he,{className:"h-7 w-7 text-red-600"})}),e.jsx("h1",{className:"mt-4 text-xl font-semibold tracking-tight text-[#171717]",children:"We couldn't finish your report"}),e.jsx("p",{className:"mt-2 text-sm text-geo-muted",children:$e(s)?s:"Something went wrong while generating your report. Please try again later."}),e.jsx(R,{asChild:!0,className:"mt-6 h-11 rounded-lg bg-geo-primary px-6 text-sm text-white hover:bg-geo-primary-dark",children:e.jsx(W,{to:"/",children:"Back to homepage"})})]})}),ze=()=>{var D,B,z;const[s]=ae(),t=re(),a=c.useMemo(()=>{const x={reportId:s.get("reportId")||"",token:s.get("token")||"",domain:s.get("domain")||""};return x.reportId&&x.token?(K()&&sessionStorage.setItem(J,JSON.stringify(x)),x):Me()||x},[s]),{reportId:r,token:i}=a,n=a.domain||s.get("domain")||"";c.useEffect(()=>{if(!s.get("reportId")&&!s.get("token"))return;const x=new URLSearchParams;n&&x.set("domain",n);const d=x.toString();t({pathname:"/free-report/results",search:d?`?${d}`:""},{replace:!0})},[n,t,s]);const[l,p]=c.useState("queued"),[u,k]=c.useState(null),[j,w]=c.useState(null),[I,m]=c.useState(null),[o,Z]=c.useState(null),C=c.useRef(null),b=c.useRef(!1);if(c.useEffect(()=>{if(!r||!i)return;b.current=!1;const x=async()=>{if(!b.current){try{const d=await oe(r,i);if(b.current)return;if(p(d.status),k(d.step_label||null),d.diagnostics&&w(d.diagnostics),d.status==="ready"){const A=await ce(r,i);if(b.current)return;Z(A.report),A.report.diagnostics&&w(A.report.diagnostics);return}if(d.status==="failed"){m(d.error||null);return}}catch(d){if(b.current)return;if(d instanceof Error&&"status"in d&&d.status===404){p("failed"),m("This report link is invalid or has expired. Please request a new report.");return}}C.current=setTimeout(x,Ae)}};return x(),()=>{b.current=!0,C.current&&clearTimeout(C.current)}},[r,i]),!r||!i)return e.jsx(ie,{to:"/",replace:!0});const G=((D=o==null?void 0:o.brand)==null?void 0:D.domain)||n,$=y(((B=o==null?void 0:o.brand)==null?void 0:B.name)||n,G||"Your brand");return e.jsxs("main",{className:"min-h-screen bg-geo-page text-geo-black",children:[e.jsx(Re,{}),e.jsx("div",{className:"mx-auto w-full max-w-[1440px]",children:o?e.jsx("section",{className:"px-4 pb-20 pt-24 md:px-8 md:pt-28 lg:px-20",children:e.jsxs("div",{className:"mx-auto w-full max-w-[1000px]",children:[e.jsxs("div",{className:"rounded-3xl p-6 md:p-10",style:{background:"linear-gradient(-47.76deg, rgba(190, 209, 255, 0.4) 7.74%, rgba(248, 237, 255, 0.4) 50%, rgba(202, 229, 250, 0.4) 92.26%), #f9faff"},children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[e.jsx(N,{domain:G,name:$,size:48}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("h1",{className:"text-3xl font-semibold text-geodark md:text-4xl",children:[$," AI Visibility Report"]}),e.jsx("p",{className:"mt-1 text-sm text-geodark-light",children:"Measured from live AI answers across ChatGPT, Perplexity and Gemini â not estimates."})]})]}),o.brand.business_summary?e.jsx("p",{className:"mt-5 max-w-[760px] text-sm leading-6 text-geodark-light",children:o.brand.business_summary}):null]}),e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx(fe,{diagnostics:o.diagnostics||j}),e.jsx(ue,{benchmark:o.benchmark}),e.jsx(_e,{gaps:o.purchase_intent_gaps}),e.jsx(Ce,{metrics:o.standard_metrics}),e.jsx(ve,{cards:o.model_analysis}),e.jsx(Ne,{cards:o.model_analysis}
31),e.jsx(ge,{landscape:o.competitive_landscape}),e.jsx(Ie,{reportId:r,token:i,calendarUrl:(z=o.cta)==null?void 0:z.calendar_url})]})]})}):e.jsx("section",{className:"bg-geo-page px-4 pb-16 pt-24 md:px-[120px] md:pt-28",children:l==="failed"?e.jsx(De,{error:I}):e.jsx(Ge,{status:l,stepLabel:u,diagnostics:j,domain:n})})}),e.jsx(ne,{})]})};export{ze 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.