1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RankTrendChart-0q9ZuSyZ.js","assets/rolldown-runtime-CfSZB2vO.js","assets/vendor-CGs6yKKL.js","assets/vendor-wlILZtm7.css","assets/vendor-icons-CoRu_7QJ.js","assets/RegionalRankComparison-CFi9AcVG.js","assets/SeoPageScorer-S5Xzk7Wu.js","assets/SEO-tT1j_0fe.js","assets/schemaBuilders-BNrx6KJC.js","assets/ToastContext-CC53Hfth.js","assets/logger-D9ecC_RD.js"])))=>i.map(i=>d[i]); 2import{o as u}from"./rolldown-runtime-CfSZB2vO.js";import{od as n,sd as b,ud as h}from"./vendor-CGs6yKKL.js";import{o as f,s as j}from"./vendor-firebase-WwinrTOX.js";import{Di as _,Ln as v,Un as y,Wr as S,ea as N,oi as E,xr as x}from"./vendor-icons-CoRu_7QJ.js";import{S as k}from"./constants-oL--gzth.js";import{n as w}from"./ToastContext-CC53Hfth.js";import{t as C}from"./logger-D9ecC_RD.js";import{t as R}from"./ScheduleReportModal-B6Vlm5VW.js";var t=u(h(),1),e=b(),T=(0,t.lazy)(()=>n(()=>import("./RankTrendChart-0q9ZuSyZ.js"),__vite__mapDeps([0,1,2,3,4]))),z=(0,t.lazy)(()=>n(()=>import("./RegionalRankComparison-CFi9AcVG.js"),__vite__mapDeps([5,1,2,3,4]))),D=(0,t.lazy)(()=>n(()=>import("./SeoPageScorer-S5Xzk7Wu.js"),__vite__mapDeps([6,1,2,3,4,7,8,9,10])));function $(){const[s,r]=(0,t.useState)("trend"),{addToast:i}=w(),[o,d]=(0,t.useState)(!1),[m,c]=(0,t.useState)(!1),p=(0,t.useMemo)(()=>f(void 0,k),[]),g=async()=>{d(!0);try{const a=(await j(p,"generateDocumentExport")({format:"pdf",content:`# Search & Geo Analytics Report 3 4**Date:** ${new Date().toISOString()} 5 6*This is an automated export of the Search & Geo Analytics.*`,metadata:{type:"seo_geo"}})).data;if(a&&a.data){const l=document.createElement("a");l.href="data:application/pdf;base64,"+a.data,l.download="search_geo_analytics.pdf",l.click(),i("PDF exported successfully!","success")}else throw new Error("No PDF data returned")}catch(a){C.warn("SearchGeoAnalytics","Operation failed",a),i(a.message||"Export failed","error")}finally{d(!1)}};return(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"flex justify-between items-center bg-slate-800/50 p-4 rounded-xl border border-slate-700/50",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:(0,e.jsx)(x,{size:20})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h2",{className:"text-slate-200 font-bold",children:"Search & Geo Analytics"}),(0,e.jsx)("p",{className:"text-slate-400 text-sm",children:"Unified view of queries, regions, and page scoring."})]})]}),(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-yellow-500/10 text-yellow-500 rounded-lg text-xs font-semibold border border-yellow-500/20",children:[(0,e.jsx)(_,{size:14})," GSC data lag = ~48h"]}),(0,e.jsxs)("button",{onClick:g,disabled:o,className:"flex items-center gap-2 px-3 py-1.5 bg-slate-700 hover:bg-slate-600 text-slate-200 rounded-lg text-xs font-semibold transition-colors disabled:opacity-50",children:[o?(0,e.jsx)(y,{size:14,className:"animate-spin"}):(0,e.jsx)(E,{size:14}),o?"Exporting...":"Export PDF"]}),(0,e.jsxs)("button",{onClick:()=>c(!0),className:"flex items-center gap-2 px-3 py-1.5 bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 rounded-lg text-xs font-semibold border border-indigo-500/20 transition-colors",children:[(0,e.jsx)(v,{size:14})," Schedule Report"]})]})]}),(0,e.jsxs)("div",{className:"flex gap-2 p-1 bg-slate-800/50 rounded-lg border border-slate-700/50 w-fit",children:[(0,e.jsxs)("button",{onClick:()=>r("trend"),className:`flex items-center gap-2 px-4 py-2 rounded-md text-sm font-semibold transition-all ${s==="trend"?"bg-blue-500/20 text-blue-400":"text-slate-400 hover:text-slate-300 hover:bg-slate-700/50"}`,children:[(0,e.jsx)(N,{size:16})," Rank Trend & Queries"]}),(0,e.jsxs)("button",{onClick:()=>r("regional"),className:`flex items-center gap-2 px-4 py-2 rounded-md text-sm font-semibold transition-all ${s==="regional"?"bg-blue-500/20 text-blue-400":"text-slate-400 hover:text-slate-300 hover:bg-slate-700/50"}`,children:[(0,e.jsx)(x,{size:16})," Geo Rankings"]}),(0,e.jsxs)("button",{onClick:()=>r("scorer"),className:`flex items-center gap-2 px-4 py-2 rounded-md text-sm font-semibold transition-all ${s==="scorer"?"bg-blue-500/20 text-blue-400":"text-slate-400 hover:text-slate-300 hover:bg-slate-700/50"}`,children:[(0,e.jsx)(S,{size:16})," Page Scorer"]})]}),(0,e.jsxs)("div",{className:"min-h-[500px]",children:[s==="trend"&&(0,e.jsx)(t.Suspense,{fallback:(0,e.jsx)("div",{className:"p-8 text-center text-slate-500",children:"Loading trend..."}),children:(0,e.jsx)(T,{})}),s==="regional"&&(0,e.jsx)(t.Suspense,{fallback:(0,e.jsx)("div",{className:"p-8 text-center text-slate-500",children:"Loading regional..."}),children:(0,e.jsx)(z,{})}),s==="scorer"&&(0,e.jsx)(t.Suspense,{fallback:(0,e.jsx)("div",{className:"p-8 text-center text-slate-500",children:"Loading scorer..."}),children:(0,e.jsx)(D,{})})]}),m&&(0,e.jsx)(R,{reportType:"seo_geo",onClose:()=>c(!1)})]})}export{$ 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.