1import{aW as T,aN as V,aZ as D,aP as n,a_ as d,bj as y,a$ as p,b2 as m,aR as i,b0 as b,aY as w,b4 as _,aO as a,aQ as s,aT as F,b3 as x,aU as C,bb as H,bc as $,aV as A,aM as E}from"./DjSkQinV.js";import{S as R}from"./CLAxByrO.js";import{E as O}from"./UKiPo9hk.js";import{u as U}from"./BtPCwuaT.js";import"./DjRkFr8Q.js";(function(){try{var c=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new c.Error().stack;o&&(c._sentryDebugIds=c._sentryDebugIds||{},c._sentryDebugIds[o]="9bc9b96a-c207-4952-886d-f1c67f19183f",c._sentryDebugIdIdentifier="sentry-dbid-9bc9b96a-c207-4952-886d-f1c67f19183f")}catch{}})();const P={class:"page fade-in"},Q={key:0,class:"grid-skel"},W={key:1,class:"ch-grid"},Y={class:"tile-head"},Z=["innerHTML"],q={class:"tile-name"},G={class:"tile-body"},J={class:"tile-kpi"},K={class:"tile-val"},X={class:"tile-unit"},ee={class:"tile-meta"},te={key:1,class:"tile-delta tile-delta-flat"},se={class:"tile-trend"},ae={key:1,class:"tile-trend-empty"},ne={class:"tile-foot"},ie={class:"tile-last"},oe={key:0,class:"tile-cta-wrap"},le=["onClick"],re={key:2,class:"err-panel"},de=T({__name:"index",setup(c){V({title:"Signals",meta:[{name:"robots",content:"noindex"}]});const o=w("activeBiz",_(null)),f=w("bizVersion",_(0)),{auto:M}=U(),u=_([]),k=_(!0),v=_("");async function B(){if(!o.value?.id){u.value=[];return}k.value=!0,v.value="";try{const e=await $fetch(`/api/backend/v1/businesses/${o.value.id}/channels-grid`);u.value=e?.channels||[]}catch(e){v.value=e?.data?.message||e?.message||"Failed to load channels",u.value=[]}finally{k.value=!1}}D([o,f],B,{immediate:!0});function g(e){return(Array.isArray(e?.spark)?e.spark:[]).map(r=>Number(r?.v)||0)}function N(e){return(Array.isArray(e?.spark)?e.spark:[]).map(r=>r?.at||"")}function S(e){return e.value===null||e.value===void 0?"â":e.value_format==="score_100"?Number(e.value).toFixed(1):typeof e.value=="number"&&e.value>=1e3?e.value.toLocaleString():String(e.value)}function j(e){const r={ai_pulse:"ai",ai:"ai",web_search:"web_serp",web_content:"competitor_crawl",directory_citations:"directory",citations:"directory",socials:"social_pull",gsc_insights:"gsc_deep",ga4_insights:"ga4_deep",competitor_intel:"backlinks_refresh"}[e.id]||e.id;$(`/app/new-scan?channel=${encodeURIComponent(r)}`)}function z(e){return e.value===null||e.value===void 0?"":e.value_format==="score_100"?"/ 100":e.unit||""}function I(e){return e>0?"pos":e<0?"neg":"flat"}const h={home:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 10.5L12 3l9 7.5V20a1 1 0 01-1 1h-5v-7h-6v7H4a1 1 0 01-1-1z"/></svg>',globe:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10 15.3 15.3 0 01-4-10 15.3 15.3 0 014-10z"/></svg>',layers:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2l10 5-10 5L2 7z"/><path d="M2 12l10 5 10-5M2 17l10 5 10-5"/></svg>',link:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71"/></svg>',users:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75"/></svg>',search:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>',"bar-chart":'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="20" x2="18" y2="10"/><line x1="12" y1="20" x2="12" y2="4"/><line x1="6" y1="20" x2="6" y2="14"/><line x1="3" y1="20" x2="21" y2="20"/></svg>'};function L(e){return h[e]||h.layers}return(e,l)=>{const r=A;return a(),n("div",P,[d(o)?.id?(a(),n(p,{key:1},[d(k)&&!d(u).length?(a(),n("div",Q,[(a(),n(p,null,m(7,t=>s("div",{key:t,class:"tile tile-skel"},[...l[0]||(l[0]=[s("div",{class:"skel-line",style:{width:"50%",height:"14px","margin-bottom":"10px"}},null,-1),s("div",{class:"skel-line",style:{width:"70%",height:"26px","margin-bottom":"8px"}},null,-1),s("div",{class:"skel-line",style:{width:"100%",height:"28px"}},null,-1)])])),64))])):(a(),n("div",W,[(a(!0),n(p,null,m(d(u),t=>(a(),y(r,{key:t.id,to:t.to,class:x(["tile",{"tile-empty":t.value===null||t.value===void 0}])},{default:F(()=>[s("div",Y,[s("span",{class:"tile-icon",innerHTML:L(t.icon)},null,8,Z),s("span",q,i(t.name),1),l[1]||(l[1]=s("span",{class:"tile-arrow"}
1,"â",-1))]),s("div",G,[s("div",J,[s("span",K,i(S(t)),1),s("span",X,i(z(t)),1)]),s("div",ee,[t.delta_7d!==null&&t.delta_7d!==void 0?(a(),n("span",{key:0,class:x(["tile-delta",I(t.delta_7d)])},i(t.delta_7d>0?"â²":t.delta_7d<0?"â¼":"·")+" "+i(t.delta_7d>0?"+":"")+i(t.delta_7d)+" 7d ",3)):(a(),n("span",te,"no 7d delta yet"))])]),s("div",se,[g(t).length>=2?(a(),y(R,{key:0,series:g(t),timestamps:N(t),label:t.name,width:160,height:32},null,8,["series","timestamps","label"])):(a(),n("span",ae,"No trend data yet"))]),s("div",ne,[s("span",ie,[t.last_at?(a(),n(p,{key:0},[C("Last activity "+i(d(M)(t.last_at)),1)],64)):(a(),n(p,{key:1},[C("No activity yet")],64))]),t.last_at?b("",!0):(a(),n("span",oe,[s("button",{type:"button",class:"tile-cta",onClick:H(ce=>j(t),["prevent","stop"])},"Run a scan â",8,le)]))])]),_:2},1032,["to","class"]))),128))])),d(v)?(a(),n("div",re,i(d(v)),1)):b("",!0)],64)):(a(),y(O,{key:0}))])}}}),ye=E(de,[["__scopeId","data-v-709976bd"]]);export{ye 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.