PageSourceSearch

https://www.brandcrux.ai/_nuxt/hRd7uQS1.js

js brandcrux.ai collected 2026-10-05 15:30:03 UTC 7,955 bytes, 1 lines download raw bytes

1import{E as G}from"./UKiPo9hk.js";import{aW as H,aN as Q,aZ as Z,aP as i,a_ as o,bj as q,a$ as b,aQ as s,b8 as M,ba as R,bg as S,b2 as U,aR as n,bb as J,b0 as A,b3 as k,aY as V,b4 as r,b5 as K,aO as l,aM as X}from"./DjSkQinV.js";(function(){try{var _=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new _.Error().stack;u&&(_._sentryDebugIds=_._sentryDebugIds||{},_._sentryDebugIds[u]="fcd24011-0764-49ab-84c3-a548b0733499",_._sentryDebugIdIdentifier="sentry-dbid-fcd24011-0764-49ab-84c3-a548b0733499")}catch{}})();const ss={class:"ca-strip"},ts={class:"ca-filters"},as={class:"ca-filter"},es=["value"],os={class:"ca-filter"},ns={class:"ca-filter"},ls={class:"ca-stats"},is={class:"panel ca-panel"},cs={key:0,class:"ca-empty"},rs={key:1,class:"ca-empty"},ds={key:2,class:"ca-table"},us=["onClick"],ps={class:"ca-cell-page"},_s=["title"],vs={key:0,class:"ca-you"},hs={key:1,class:"ca-comp"},fs={class:"ca-cell-topic"},gs={class:"ca-cell-val"},ys={class:"ca-cell-val"},ms={class:"ca-cell-val"},bs={class:"ca-cell-val"},ks={class:"ca-drawer-card"},ws={class:"ca-drawer-head"},Cs={class:"ca-drawer-eyebrow"},$s={class:"ca-drawer-title"},xs=["href"],Ms={key:0,class:"ca-drawer-loading"},Rs={key:1,class:"ca-drawer-section"},Ss={class:"ca-spark-list"},Us={class:"ca-spark-topic"},As={class:"ca-spark",viewBox:"0 0 200 30",preserveAspectRatio:"none"},Bs=["points"],Is={class:"ca-spark-last"},Ts={class:"ca-drawer-section"},Ds={class:"ca-signals"},Fs={class:"ca-signal"},Ls={class:"ca-signal"},Vs={class:"ca-sig-v"},zs={class:"ca-signal"},Es={class:"ca-sig-v"},Ps={class:"ca-signal"},js={class:"ca-sig-v"},Ns={class:"ca-signal"},Ys={class:"ca-sig-v"},Ws={class:"ca-signal"},Os={class:"ca-sig-v"},Gs={class:"ca-signal"},Hs={class:"ca-sig-v"},Qs=H({__name:"content-authority",setup(_){Q({title:"Content Authority"});const u=V("activeBiz",r(null)),B=V("bizVersion",r(0)),h=r([]),I=r([]),w=r(!1),f=r(""),g=r(""),y=r("authority_desc"),p=r(null),d=r(null),C=r(null),$=r(!1),z=K(()=>{const a=C.value?.per_topic_series||[],t={};for(const c of a)t[c.topic]||(t[c.topic]=[]),t[c.topic].push(c);return t});async function m(){if(u.value?.id){w.value=!0;try{const a=new URLSearchParams({business_id:u.value.id,sort:y.value,limit:"50"});f.value&&a.set("topic",f.value),g.value==="brand"?a.set("is_brand","true"):g.value==="competitor"&&a.set("is_brand","false");const t=await $fetch(`/api/backend/content-authority/pages?${a.toString()}`);h.value=t.rows||[],I.value=t.available_topics||[]}catch(a){console.warn("content-authority load failed",a),h.value=[]}finally{w.value=!1}}}async function E(a){p.value=a.url,d.value=a,$.value=!0;try{C.value=await $fetch(`/api/backend/content-authority/url-history?business_id=${u.value.id}&url=${encodeURIComponent(a.url)}&days=90`)}catch{}finally{$.value=!1}}function T(a){if(!a)return"";try{const t=new URL(a),c=t.pathname.length>36?t.pathname.slice(0,33)+"…":t.pathname;return`${t.hostname}${c==="/"?"":c}`}catch{return a.slice(0,50)}}function D(a){return a==null?"—":a.toLocaleString()}function F(a){return a==null?"—":a<=30?`${a}d`:a<=365?`${Math.round(a/30)}mo`:`${Math.round(a/365)}y`}function L(a){return a==null?"":a>=70?"ca-good":a>=45?"ca-warn":"ca-bad"}function P(a,t,c){if(!a.length)return"";const e=a.map(x=>x.authority_score||0),v=Math.min(...e,0),j=Math.max(...e,1)-v||1,N=t/Math.max(a.length-1,1);return a.map((x,Y)=>{const W=Y*N,O=c-(x.authority_score-v)/j*(c-4)-2;return`${W.toFixed(1)},${O.toFixed(1)}`}).join(" ")}return Z([u,B],async()=>{u.value?.id&&await m()},{deep:!0,immediate:!0}),(a,t)=>{const c=G;return l(),i("div",null,[o(u)?.id?(l(),i(b,{key:1},[s("div",ss,[s("div",ts,[s("label",as,[t[6]||(t[6]=s("span",{class:"ca-filter-label"},"Topic",-1)),M(s("select",{"onUpdate:modelValue":t[0]||(t[0]=e=>S(f)?f.value=e:null),onChange:m},[t[5]||(t[5]=s("option",{value:""},"All topics",-1)),(l(!0),i(b,null,U(o(I),e=>(l(),i("option",{key:e,value:e},n(e),9,es))),128))],544),[[R,o(f)]])]),s("label",os,[t[8]||(t[8]=s("span",{class:"ca-filter-label"},"Source",-1)),M(s("select",{"onUpdate:modelValue":t[1]||(t[1]=e=>S(g)?g.value=e:null),onChange:m},[...t[7]||(t[7]=[s("option",{value:""},"All pages",-1),s("option",{value:"brand"},"Your pages only",-1),s("option",{value:"competitor"},"Competitor pages only",-1)])],544),[[R,o(g)]])]),s("label",ns,[t[10]||(t[10]=s("span",{class:"ca-filter-label"},"Sort",-1)),M(s("select",{"onUpdate:modelValue":t[2]||(t[2]=e=>S(y)?y.value=e:null),onChange:m},[...t[9]||(t[9]=[s("option",{value:"authority_desc"},"Authority score",-1),s("option",{value:"technical_desc"},"Technical score",-1),s("option",{value:"relevance_desc"},"Relevance",-1),s("option",{value:"freshness_desc"},"Freshness",-1)])],544),[[R,o(y)]])])]),s("div",ls,[s("span",null,n(o(h).length)+" pages shown",1)])]),s("section",is,[o(w)?(l(),i("p",cs,"Loading…")):o(h).length?(l(),i("div",ds,[t[11]||(t[11]=s("div",{class:"ca-row ca-row--head"},[s("span",null,"Page"),s("span",null,"Topic"),s("span",null,"Authority"),s("span",null,"Technical"),s("span",null,"Relevance"),s("span",null,"Words"),s("span",null,"Fresh"),s("span",null,"Mode")],-1)),(l(!0),i(b,null,U(o(h),e=>(l(),i("div",{key:e.id,class:k(["ca-row",e.is_brand?"ca-row--you":""]),onClick:v=>E(e)},[s("span",ps,[s("span",{class:"ca-cell-url",title:e.url},n(T(e.url)),9,_s),e.is_brand?(l(),i("span",vs,"YOU")):e.competitor_name?(l(),i("span",hs,n(e.competitor_name),1)):A("",!0)]),s("span",fs,n(e.topic),1),s("span",{class:k(["ca-cell-val",L(e.authority_score)])},n(e.authority_score),3),s("span",gs,n(e.technical_score??"—"),1),s("span",ys,n(e.relevance_score),1),s("span",ms,n(D(e.word_count)),1),s("span",bs,n(F(e.freshness_days)),1),s("span",{class:k(["ca-cell-mode",`ca-cell-mode--${e.mode}`])},n(e.mode.toUpperCase()),3)],10,us))),128))])):(l(),i("p",rs," No page scores yet for this filter. Run a discovery scan from Mission Control to populate. "))]),o(p
1)?(l(),i("div",{key:0,class:"ca-drawer",onClick:t[4]||(t[4]=J(e=>p.value=null,["self"]))},[s("div",ks,[s("div",ws,[s("div",null,[s("div",Cs,n(o(d)?.is_brand?"Your page":o(d)?.competitor_name||"Competitor page"),1),s("div",$s,n(T(o(p))),1),s("a",{href:o(p),target:"_blank",class:"ca-drawer-link"},n(o(p))+" ↗",9,xs)]),s("button",{class:"btn ghost xs",onClick:t[3]||(t[3]=e=>p.value=null)},"Close")]),o($)?(l(),i("div",Ms,"Loading history…")):o(C)?.per_topic_series?.length?(l(),i("div",Rs,[t[12]||(t[12]=s("div",{class:"ca-drawer-section-label"},"Authority score over the last 90 days",-1)),s("div",Ss,[(l(!0),i(b,null,U(o(z),(e,v)=>(l(),i("div",{key:v,class:"ca-spark-row"},[s("span",Us,n(v),1),(l(),i("svg",As,[s("polyline",{points:P(e,200,30),fill:"none",stroke:"var(--accent)","stroke-width":"1.5","stroke-linecap":"round"},null,8,Bs)])),s("span",Is,n(e[e.length-1]?.authority_score??"—"),1)]))),128))])])):A("",!0),s("div",Ts,[t[20]||(t[20]=s("div",{class:"ca-drawer-section-label"},"Page signals",-1)),s("div",Ds,[s("div",Fs,[t[13]||(t[13]=s("span",{class:"ca-sig-k"},"Authority",-1)),s("span",{class:k(["ca-sig-v",L(o(d)?.authority_score)])},n(o(d)?.authority_score??"—"),3)]),s("div",Ls,[t[14]||(t[14]=s("span",{class:"ca-sig-k"},"Technical",-1)),s("span",Vs,n(o(d)?.technical_score??"—"),1)]),s("div",zs,[t[15]||(t[15]=s("span",{class:"ca-sig-k"},"Relevance",-1)),s("span",Es,n(o(d)?.relevance_score??"—"),1)]),s("div",Ps,[t[16]||(t[16]=s("span",{class:"ca-sig-k"},"Word count",-1)),s("span",js,n(D(o(d)?.word_count)),1)]),s("div",Ns,[t[17]||(t[17]=s("span",{class:"ca-sig-k"},"Freshness",-1)),s("span",Ys,n(F(o(d)?.freshness_days)),1)]),s("div",Ws,[t[18]||(t[18]=s("span",{class:"ca-sig-k"},"Schema",-1)),s("span",Os,n((o(d)?.schema_present||[]).join(", ")||"none"),1)]),s("div",Gs,[t[19]||(t[19]=s("span",{class:"ca-sig-k"},"Mode",-1)),s("span",Hs,n((o(d)?.mode||"").toUpperCase()),1)])])])])])):A("",!0)],64)):(l(),q(c,{key:0}))])}}}),Ks=X(Qs,[["__scopeId","data-v-c04fedd1"]]);export{Ks 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.