@ainyc/canonry 4.193.1 → 4.193.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/assets/{AuditHistoryPanel-D5qbrXKZ.js → AuditHistoryPanel-BBXiKuD1.js} +1 -1
- package/assets/assets/{BacklinksPage-BkQNTtV9.js → BacklinksPage-CE_-DKWO.js} +1 -1
- package/assets/assets/{HistoryPage-CU2woh-k.js → HistoryPage-D-l4jMt5.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-D5EhcG4V.js → MeasurementPropertyPage-fCJm3sW6.js} +1 -1
- package/assets/assets/{ProjectPage-C6Wg18vZ.js → ProjectPage-Cxrd8lZM.js} +6 -6
- package/assets/assets/{RunRow-CYXAUdeG.js → RunRow-C2kmB04V.js} +1 -1
- package/assets/assets/{RunsPage-BYji7xOv.js → RunsPage-B73hjh_l.js} +1 -1
- package/assets/assets/{SettingsPage-D2VAFJh0.js → SettingsPage-Ba30Jfnn.js} +1 -1
- package/assets/assets/{SiteHealthSection-B-HyC8y6.js → SiteHealthSection-mjpxy6N9.js} +3 -3
- package/assets/assets/{TrafficPage-UoiRx4vW.js → TrafficPage-BZ8H_c8u.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-24Ioy8BG.js → TrafficSourceDetailPage-sCUyzPpH.js} +1 -1
- package/assets/assets/{extract-error-message-COA1TC0-.js → extract-error-message-G-MvSIBA.js} +1 -1
- package/assets/assets/{index-BtyrghBH.js → index-CSktlkUv.js} +2 -2
- package/assets/assets/{react-sigma_core.esm.min-gjGMldEz.js → react-sigma_core.esm.min-CgN2Dnvk.js} +1 -1
- package/assets/assets/{v2-overview-adapter-Df-08Umi.js → v2-overview-adapter-OmeP2l8O.js} +1 -1
- package/assets/index.html +2 -2
- package/dist/{chunk-ZX3QN26Z.js → chunk-KJJMIWVD.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +13 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SiteHealthSection-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SiteHealthSection-mjpxy6N9.js","./vendor-tanstack-ZXXkndVj.js","./vendor-lucide-CW2qe0uH.js","./ChartPrimitives-Bxa_vFmq.js","./vendor-recharts-D-cUuLZo.js","./ProjectPage-Cxrd8lZM.js","./RunRow-C2kmB04V.js","./extract-error-message-G-MvSIBA.js","./v2-overview-adapter-OmeP2l8O.js","./vendor-markdown-B-Oq2NYq.js","./AuditHistoryPanel-BBXiKuD1.js","./vendor-radix-twS1M3FF.js","./vendor-yaml-GWJz5H2G.js","./RunsPage-B73hjh_l.js","./HistoryPage-D-l4jMt5.js","./SettingsPage-Ba30Jfnn.js","./BacklinksPage-CE_-DKWO.js","./TrafficPage-BZ8H_c8u.js","./TrafficSourceDetailPage-sCUyzPpH.js","./MeasurementPropertyPage-fCJm3sW6.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{c as R4,d as D4,r as T,j as c,Q as O4,M as q4,q as pe,e as Rl,L as tt,a as B4,t as Io,u as Et,f as P4,h as da,k as Hs,l as zx,m as M4,n as Ex,O as dh,o as ns,p as I4,s as St,v as Tx,x as as,y as V4,z as L4,A as U4}from"./vendor-tanstack-ZXXkndVj.js";import{S as G4,O as Hh,P as Rx,C as Qh,a as Dx,T as Fh,D as Ox,R as qx}from"./vendor-radix-twS1M3FF.js";import{c as Bx}from"./vendor-recharts-D-cUuLZo.js";import{A as $4,X as sr,S as K4,L as Zo,C as Zh,R as uu,a as Px,M as H4,b as Q4,c as F4,d as Yh,T as Mx,W as Z4,e as Xh,f as Ix,g as Y4,G as X4,P as J4,H as W4,h as eA,i as tA,j as nA,k as aA,l as iA,B as sA,F as oA,m as rA,n as lA,o as cA,p as ab,E as uA}from"./vendor-lucide-CW2qe0uH.js";import{M as dA}from"./vendor-markdown-B-Oq2NYq.js";import{p as mA}from"./vendor-yaml-GWJz5H2G.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const g of f.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&r(g)}).observe(document,{childList:!0,subtree:!0});function s(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(u){if(u.ep)return;u.ep=!0;const f=s(u);fetch(u.href,f)}})();var qp={exports:{}},dl={},Bp={exports:{}},Pp={};var ib;function pA(){return ib||(ib=1,(function(e){function a(P,ae){var he=P.length;P.push(ae);e:for(;0<he;){var je=he-1>>>1,X=P[je];if(0<u(X,ae))P[je]=ae,P[he]=X,he=je;else break e}}function s(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var ae=P[0],he=P.pop();if(he!==ae){P[0]=he;e:for(var je=0,X=P.length,Ie=X>>>1;je<Ie;){var Ne=2*(je+1)-1,Ae=P[Ne],ne=Ne+1,V=P[ne];if(0>u(Ae,he))ne<X&&0>u(V,Ae)?(P[je]=V,P[ne]=he,je=ne):(P[je]=Ae,P[Ne]=he,je=Ne);else if(ne<X&&0>u(V,he))P[je]=V,P[ne]=he,je=ne;else break e}}return ae}function u(P,ae){var he=P.sortIndex-ae.sortIndex;return he!==0?he:P.id-ae.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;e.unstable_now=function(){return f.now()}}else{var g=Date,b=g.now();e.unstable_now=function(){return g.now()-b}}var v=[],k=[],S=1,A=null,C=3,E=!1,Z=!1,_=!1,G=!1,K=typeof setTimeout=="function"?setTimeout:null,te=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function re(P){for(var ae=s(k);ae!==null;){if(ae.callback===null)r(k);else if(ae.startTime<=P)r(k),ae.sortIndex=ae.expirationTime,a(v,ae);else break;ae=s(k)}}function W(P){if(_=!1,re(P),!Z)if(s(v)!==null)Z=!0,oe||(oe=!0,Re());else{var ae=s(k);ae!==null&&be(W,ae.startTime-P)}}var oe=!1,H=-1,$=5,Te=-1;function Ke(){return G?!0:!(e.unstable_now()-Te<$)}function Fe(){if(G=!1,oe){var P=e.unstable_now();Te=P;var ae=!0;try{e:{Z=!1,_&&(_=!1,te(H),H=-1),E=!0;var he=C;try{t:{for(re(P),A=s(v);A!==null&&!(A.expirationTime>P&&Ke());){var je=A.callback;if(typeof je=="function"){A.callback=null,C=A.priorityLevel;var X=je(A.expirationTime<=P);if(P=e.unstable_now(),typeof X=="function"){A.callback=X,re(P),ae=!0;break t}A===s(v)&&r(v),re(P)}else r(v);A=s(v)}if(A!==null)ae=!0;else{var Ie=s(k);Ie!==null&&be(W,Ie.startTime-P),ae=!1}}break e}finally{A=null,C=he,E=!1}ae=void 0}}finally{ae?Re():oe=!1}}}var Re;if(typeof Q=="function")Re=function(){Q(Fe)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,Ue=ve.port2;ve.port1.onmessage=Fe,Re=function(){Ue.postMessage(null)}}else Re=function(){K(Fe,0)};function be(P,ae){H=K(function(){P(e.unstable_now())},ae)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return C},e.unstable_next=function(P){switch(C){case 1:case 2:case 3:var ae=3;break;default:ae=C}var he=C;C=ae;try{return P()}finally{C=he}},e.unstable_requestPaint=function(){G=!0},e.unstable_runWithPriority=function(P,ae){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var he=C;C=P;try{return ae()}finally{C=he}},e.unstable_scheduleCallback=function(P,ae,he){var je=e.unstable_now();switch(typeof he=="object"&&he!==null?(he=he.delay,he=typeof he=="number"&&0<he?je+he:je):he=je,P){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=he+X,P={id:S++,callback:ae,priorityLevel:P,startTime:he,expirationTime:X,sortIndex:-1},he>je?(P.sortIndex=he,a(k,P),s(v)===null&&P===s(k)&&(_?(te(H),H=-1):_=!0,be(W,he-je))):(P.sortIndex=X,a(v,P),Z||E||(Z=!0,oe||(oe=!0,Re()))),P},e.unstable_shouldYield=Ke,e.unstable_wrapCallback=function(P){var ae=C;return function(){var he=C;C=ae;try{return P.apply(this,arguments)}finally{C=he}}}})(Pp)),Pp}var sb;function hA(){return sb||(sb=1,Bp.exports=pA()),Bp.exports}var ob;function fA(){if(ob)return dl;ob=1;var e=hA(),a=R4(),s=D4();function r(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function f(t){var n=t,i=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(i=n.return),t=n.return;while(t)}return n.tag===3?i:null}function g(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function b(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function v(t){if(f(t)!==t)throw Error(r(188))}function k(t){var n=t.alternate;if(!n){if(n=f(t),n===null)throw Error(r(188));return n!==t?null:t}for(var i=t,l=n;;){var m=i.return;if(m===null)break;var h=m.alternate;if(h===null){if(l=m.return,l!==null){i=l;continue}break}if(m.child===h.child){for(h=m.child;h;){if(h===i)return v(m),t;if(h===l)return v(m),n;h=h.sibling}throw Error(r(188))}if(i.return!==l.return)i=m,l=h;else{for(var x=!1,w=m.child;w;){if(w===i){x=!0,i=m,l=h;break}if(w===l){x=!0,l=m,i=h;break}w=w.sibling}if(!x){for(w=h.child;w;){if(w===i){x=!0,i=h,l=m;break}if(w===l){x=!0,l=h,i=m;break}w=w.sibling}if(!x)throw Error(r(189))}}if(i.alternate!==l)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?t:n}function S(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=S(t),n!==null)return n;t=t.sibling}return null}var A=Object.assign,C=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),Z=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),te=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),Te=Symbol.for("react.activity"),Ke=Symbol.for("react.memo_cache_sentinel"),Fe=Symbol.iterator;function Re(t){return t===null||typeof t!="object"?null:(t=Fe&&t[Fe]||t["@@iterator"],typeof t=="function"?t:null)}var ve=Symbol.for("react.client.reference");function Ue(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ve?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case _:return"Fragment";case K:return"Profiler";case G:return"StrictMode";case W:return"Suspense";case oe:return"SuspenseList";case Te:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case Z:return"Portal";case Q:return t.displayName||"Context";case te:return(t._context.displayName||"Context")+".Consumer";case re:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case H:return n=t.displayName||null,n!==null?n:Ue(t.type)||"Memo";case $:n=t._payload,t=t._init;try{return Ue(t(n))}catch{}}return null}var be=Array.isArray,P=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},je=[],X=-1;function Ie(t){return{current:t}}function Ne(t){0>X||(t.current=je[X],je[X]=null,X--)}function Ae(t,n){X++,je[X]=t.current,t.current=n}var ne=Ie(null),V=Ie(null),q=Ie(null),le=Ie(null);function De(t,n){switch(Ae(q,n),Ae(V,t),Ae(ne,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?Cy(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=Cy(n),t=Ny(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Ne(ne),Ae(ne,t)}function ye(){Ne(ne),Ne(V),Ne(q)}function Je(t){t.memoizedState!==null&&Ae(le,t);var n=ne.current,i=Ny(n,t.type);n!==i&&(Ae(V,t),Ae(ne,i))}function Ge(t){V.current===t&&(Ne(ne),Ne(V)),le.current===t&&(Ne(le),rl._currentValue=he)}var Be,de;function Me(t){if(Be===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);Be=n&&n[1]||"",de=-1<i.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+Be+t+de}var $t=!1;function Sn(t,n){if(!t||$t)return"";$t=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(F){var L=F}Reflect.construct(t,[],ie)}else{try{ie.call()}catch(F){L=F}t.call(ie.prototype)}}else{try{throw Error()}catch(F){L=F}(ie=t())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(F){if(F&&L&&typeof F.stack=="string")return[F.stack,L.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=l.DetermineComponentFrameRoot(),x=h[0],w=h[1];if(x&&w){var z=x.split(`
|
|
@@ -83,4 +83,4 @@ spec:
|
|
|
83
83
|
`);ut(Pe),Js(!0)}}catch(U){Yl(U instanceof Error?U.message:"Failed to generate queries"),K({flowVersion:st,onboardingSessionId:_,event:"onboarding.blocked",step:"queries",action:"generate_queries",reasonCode:jl(U,"unknown")},"onboarding.blocked:queries:generate")}finally{eo(!1)}}},Bd=async()=>{if(!Be)return;const U=qa;if(U.length!==0){qt(!0),wi(null);try{await wI(Be,U),ki(!0),await r(),K({flowVersion:st,onboardingSessionId:_,event:"onboarding.step_completed",step:"competitors",method:"manual",countBucket:La(U.length)},"onboarding.step_completed:competitors"),P(4)}catch(Pe){wi(Pe instanceof Error?Pe.message:"Failed to save competitors"),K({flowVersion:st,onboardingSessionId:_,event:"onboarding.blocked",step:"competitors",action:"save",reasonCode:"unknown"},"onboarding.blocked:competitors:save")}finally{qt(!1)}}},oo=async()=>{const U=Sr.trim();if(U){fs(!0),gn(null);try{await ES("gemini",{apiKey:U}),rn({title:"Gemini configured",detail:"Provider is ready — continuing setup.",tone:"positive",dedupeKey:"setup:gemini:configured",dedupeMode:"drop"}),io(""),await r(),Ha(b.providerStatuses.find(Pe=>Pe.name.toLowerCase()==="gemini")?.name??"gemini"),K({flowVersion:st,onboardingSessionId:_,event:"onboarding.step_completed",step:"system",method:"inline"},"onboarding.step_completed:system")}catch(Pe){gn(Pe instanceof Error?Pe.message:"Failed to save Gemini key"),K({flowVersion:st,onboardingSessionId:_,event:"onboarding.blocked",step:"system",action:"configure_provider",reasonCode:"provider_save_failed"},"onboarding.blocked:system:provider_save_failed")}finally{fs(!1)}}},Wn=async()=>{if(!Ps()){if(!Be||_n){Si(_n??"Complete setup before launching the first sweep.");const U=In??(Be?Jn===0?"no_queries":"run_rejected":"unknown");un||K({flowVersion:st,onboardingSessionId:_,event:"run.requested",origin:"dashboard_setup",result:"rejected",providerCountBucket:La(bi),queryCountBucket:La(Jn),reasonCode:U});return}wr(!0),Si(null);try{const U=await Nn.mutateAsync({projectName:Be,projectLabel:Ne||X||Be,sourceAction:"setup-launch"});ba(U.id),Dd(!0),w3(Be,U.id),Ra.current=U.id,un||K({flowVersion:st,onboardingSessionId:_,event:"run.requested",origin:"dashboard_setup",result:"queued",providerCountBucket:La(bi),queryCountBucket:La(Jn)}),await r()}catch(U){Si(U instanceof Error?U.message:"Failed to queue the visibility sweep. Retry when the instance is ready."),un||K({flowVersion:st,onboardingSessionId:_,event:"run.requested",origin:"dashboard_setup",result:"rejected",providerCountBucket:La(bi),queryCountBucket:La(Jn),reasonCode:jl(U,"run_rejected")})}finally{wr(!1)}}},ea=()=>P(U=>C?2:Math.max(0,U-1)),ys=(U,Pe,yn)=>{K({flowVersion:st,onboardingSessionId:_,event:"onboarding.step_completed",step:U,method:"existing",...yn===void 0?{}:{countBucket:La(yn)}},`onboarding.step_completed:${U}`),P(Pe)},ji=()=>{if(K({flowVersion:st,onboardingSessionId:_,event:"onboarding.step_completed",step:"queries",method:"skipped",countBucket:"0"},"onboarding.step_completed:queries"),C){ln();return}P(3)},Ai=()=>{K({flowVersion:st,onboardingSessionId:_,event:"onboarding.step_completed",step:"competitors",method:"skipped",countBucket:"0"},"onboarding.step_completed:competitors"),P(4)},ac=C?"section":ua,ro=Kt!==!0||Ka===!0?c.jsx(fe,{type:"button",variant:"ghost",size:"sm",className:"min-h-11",onClick:()=>{r(),Wt&&Ws.refetch()},children:"Check again"}):null,ic=(Kt===!1||ms)&&!!An,bs=C&&(be===2||be===4)?v?c.jsxs("section",{"aria-labelledby":"setup-provider-heading",className:"space-y-3 border-b border-default pb-6 mb-6",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsx("h2",{id:"setup-provider-heading",className:"text-lg font-semibold text-heading",children:Kt===!1?"Connect a provider":"Answer engine provider"}),c.jsx(pn,{tone:Kt===!0?"positive":"neutral",children:Kt===!0?"Configured":Kt===!1?"Not connected":"Checking"})]}),c.jsx("p",{className:"max-w-prose text-sm text-secondary",children:Kt===!0?Pn.length>0?`${Pn.map(U=>U.displayName??U.name).join(", ")} available for this project. Research and sweeps use your provider account.`:"ChatGPT in Chrome is configured for sweeps. Query Research needs an API provider.":Kt===!1?"An answer engine is required for visibility sweeps. You can save queries now and connect later.":"Checking available providers. You can choose queries while this finishes."}),Kt===!1||ms?An?c.jsx("div",{children:c.jsx(W$,{compact:!0,leadingField:c.jsxs("div",{className:"min-w-0 space-y-1.5",children:[c.jsx("label",{className:"block text-sm font-medium text-secondary",htmlFor:"setup-provider",children:"Provider to connect"}),c.jsx("select",{ref:vr,id:"setup-provider",className:"setup-input",value:An.name,onChange:U=>{U.target.value!==An.name&&(to.current=document.activeElement===U.currentTarget,Jl(U.target.value))},children:ya.map(U=>c.jsx("option",{value:U.name,children:U.displayName??U.name},U.name))})]}),secondaryActions:ro,providerName:An.name,keyUrl:An.keyUrl,modelHint:An.modelHint,onSaved:()=>{xr(!1),r()}},An.name)}):c.jsx("p",{className:"max-w-prose text-sm text-secondary",children:Xn.length>0?`This project's provider selection is ${Xn.join(", ")}. Configure an allowed provider in Settings, or change the selection in project Settings.`:"Provider configuration is unavailable here. Open Settings to connect an answer engine, then check again."}):null,c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Kt===!0&&!ms&&An?c.jsx(fe,{type:"button",variant:"outline",size:"sm",onClick:()=>xr(!0),children:"Configure a provider"}):null,!An||Ka===!0?c.jsx(fe,{type:"button",variant:"outline",size:"sm",asChild:!0,children:c.jsx(tt,{to:"/settings",target:"_blank",rel:"noopener noreferrer",children:"Open provider settings"})}):null,ic?null:ro]})]}):c.jsxs("section",{"aria-labelledby":"setup-provider-heading",className:"space-y-2 border-b border-default pb-6 mb-6",children:[c.jsx("h2",{id:"setup-provider-heading",className:"text-lg font-semibold text-heading",children:"Answer engine provider"}),c.jsx("p",{className:"max-w-prose text-sm text-secondary",children:"Provider settings are managed by an administrator."}),yr?c.jsx("p",{role:"alert",className:"text-sm text-negative",children:"Provider readiness could not be checked. Try again."}):c.jsx("p",{className:"max-w-prose text-sm text-secondary",role:"status",children:Kt===!0?"An answer engine is available for this project.":Kt===!1?"Ask an administrator to connect an answer engine for this project. You can save queries now.":"Checking provider readiness. You can save queries now."}),c.jsx(fe,{type:"button",variant:"ghost",size:"sm",className:"min-h-11",disabled:Rt.isFetching,onClick:()=>{Rt.refetch()},children:yr?"Retry provider check":"Check again"})]}):null,xa=(()=>{switch(be){case 0:return c.jsxs(ua,{className:"surface-card step-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 1 of 5"}),c.jsx("h2",{children:"System check"})]})}),c.jsx("p",{className:"supporting-copy",children:"Checking that your Canonry instance is configured and reachable."}),c.jsx("div",{className:"compact-stack",children:A.healthChecks.map(U=>c.jsxs("div",{className:"health-check-row",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:U.label}),c.jsx("p",{className:"supporting-copy",children:U.detail}),U.id==="provider"&&U.state!=="ready"&&c.jsxs("div",{className:"mt-3 rounded-md border border-default bg-bg-elevated/40 p-3 space-y-2",children:[c.jsxs("p",{className:"text-xs text-secondary",children:["Paste a Gemini key to enable visibility checks (free at"," ",c.jsx("a",{href:"https://aistudio.google.com/apikey",target:"_blank",rel:"noreferrer",className:"text-positive-400 hover:text-positive underline underline-offset-2",children:"aistudio.google.com"}),")."]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("input",{type:"password",value:Sr,onChange:Pe=>io(Pe.target.value),placeholder:"AI... (paste here)",className:"flex-1 rounded-md border border-base bg-bg px-2.5 py-1.5 text-sm text-heading placeholder:text-faint focus:border-mono-600 focus:outline-none font-mono",disabled:so}),c.jsx(fe,{type:"button",size:"sm",disabled:so||!Sr.trim(),onClick:Ft(oo),children:so?"Saving...":"Save"})]}),tc&&c.jsxs("div",{role:"alert",className:"space-y-1 text-xs text-negative",children:[c.jsx("p",{children:tc}),c.jsx("p",{children:"Check that the key is complete, then retry Save."})]}),c.jsxs("p",{className:"text-sm text-secondary",children:["Connect more answer engines later in"," ",c.jsx(tt,{to:"/settings",className:"text-link hover:underline",children:"Settings"}),"."]})]})]}),c.jsx(pn,{tone:U.state==="ready"?"positive":"caution",title:U.id==="api"?ar(S.apiStatus):U.id==="worker"?ar(S.workerStatus):U.detail,children:U.state==="ready"?"Ready":"Attention"})]},U.id))}),c.jsxs("div",{className:"setup-nav",children:[A.launchState.blockedReason?c.jsx("p",{role:"status",className:"supporting-copy text-negative",children:A.launchState.blockedReason}):c.jsx("span",{}),c.jsx(fe,{type:"button",disabled:!A.launchState.enabled,title:A.launchState.blockedReason,onClick:()=>{K({flowVersion:st,onboardingSessionId:_,event:"onboarding.step_completed",step:"system",method:"automatic"},"onboarding.step_completed:system"),P(Ue)},children:"Continue"})]})]});case 1:return c.jsxs(ua,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 2 of 5"}),c.jsx("h2",{children:"Create project"})]}),Be?c.jsx(pn,{tone:"positive",children:"Created"}):null]}),Be?c.jsxs("div",{className:"compact-stack",children:[c.jsxs("p",{className:"text-neutral",children:["Project ",c.jsx("span",{className:"text-heading font-medium",children:Be})," created successfully."]}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(fe,{type:"button",variant:"outline",onClick:ea,children:"Back"}),c.jsx(fe,{type:"button",onClick:()=>ys("project",2),children:"Continue"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"project-name",children:"Project name"}),c.jsx("input",{id:"project-name",className:"setup-input",type:"text",placeholder:"my-website",value:X,onChange:U=>Ie(U.target.value)}),va&&va!==X?c.jsxs("p",{className:"supporting-copy",children:["Slug: ",va]}):null]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"display-name",children:"Display name (optional)"}),c.jsx("input",{id:"display-name",className:"setup-input",type:"text",placeholder:"My Website",value:Ne,onChange:U=>Ae(U.target.value)})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"domain",children:"Canonical domain"}),c.jsx("input",{id:"domain",className:"setup-input",type:"text",placeholder:"example.com",value:ne,onChange:U=>V(U.target.value)})]}),c.jsxs("div",{className:"setup-field-row",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"country",children:"Country"}),c.jsx("input",{id:"country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:q,onChange:U=>le(U.target.value.toUpperCase())})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"language",children:"Language"}),c.jsx("input",{id:"language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:De,onChange:U=>ye(U.target.value.toLowerCase())})]})]}),c.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-default bg-surface p-3 cursor-pointer hover:border-strong",children:[c.jsx("input",{type:"checkbox",className:"mt-0.5 h-4 w-4 rounded border-strong bg-bg",checked:Je,onChange:U=>Ge(U.target.checked)}),c.jsxs("span",{className:"flex-1",children:[c.jsx("span",{className:"block text-sm text-heading",children:"Auto-extract backlinks"}),c.jsxs("span",{className:"block text-xs text-muted mt-0.5",children:["When a new Common Crawl release syncs, automatically extract backlinks for this project."," ",c.jsx(tt,{to:"/backlinks",className:"text-positive-400 hover:text-positive underline underline-offset-2",children:"Manage backlinks"})]})]})]}),Me?c.jsx("p",{className:"text-negative-400 text-sm",children:Me}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(fe,{type:"button",variant:"outline",onClick:ea,children:"Back"}),c.jsx(fe,{type:"button",disabled:!va||!ne||Sn,onClick:Ft(nc),children:Sn?"Creating...":"Create project"})]})]})]});case 2:return c.jsxs(ac,{className:C?"visibility-setup-section step-card":"surface-card step-card","aria-labelledby":"setup-queries-heading",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:C?"Step 1 of 2":"Step 3 of 5"}),c.jsx("h2",{id:"setup-queries-heading",children:"Add queries"})]}),je?c.jsx(pn,{tone:"neutral",children:"Loading"}):oe.isError?c.jsx(pn,{tone:"negative",children:"Load failed"}):Jt?c.jsxs(pn,{tone:"positive",children:[Mn.length," saved"]}):c.jsxs(pn,{tone:"neutral",children:[Mn.length," quer",Mn.length!==1?"ies":"y"]})]}),c.jsx("p",{className:"supporting-copy",children:"Add the queries your customers use, one per line. You can refine your list later."}),c.jsxs("div",{className:"space-y-2 border-b border-default pb-4",children:[c.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[c.jsxs("div",{className:"min-w-0 space-y-1",children:[c.jsx("h3",{className:"text-sm font-semibold text-heading",children:"Research queries with your agent"}),c.jsx("p",{className:"max-w-prose text-sm text-secondary",children:"Ask your agent to compare answers and available sources with Canonry Research, then recommend queries. Research does not change your tracked queries."})]}),c.jsx(fe,{type:"button",variant:"outline",size:"sm",className:"min-h-11 shrink-0 self-start",onClick:Ft(Td),children:Wl?"Research prompt copied":"Copy research prompt"})]}),c.jsxs("details",{open:Mt||void 0,className:"text-sm text-secondary",children:[c.jsx("summary",{className:"min-h-11 cursor-pointer py-3 text-link",children:"View agent prompt"}),c.jsx("textarea",{"aria-label":"Agent query research prompt",readOnly:!0,className:"setup-textarea mt-2 w-full",rows:8,value:ec})]}),Mt?c.jsx("p",{role:"alert",className:"text-sm text-negative",children:"Could not copy. Select and copy the prompt above."}):null]}),je?c.jsx("div",{className:"rounded-md border border-default bg-bg-elevated/40 p-4 text-sm text-secondary",role:"status",children:"Loading saved queries…"}):oe.isError?c.jsxs("div",{className:"compact-stack",children:[c.jsx("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:"Saved queries could not be loaded. Retry before changing the query basket."}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(fe,{type:"button",variant:"outline",onClick:C?ln:ea,children:"Back"}),c.jsx(fe,{type:"button",onClick:()=>{oe.refetch()},children:"Retry loading queries"})]})]}):Jt?c.jsxs("div",{className:"compact-stack",children:[c.jsx("ul",{className:"detail-list",children:Mn.map(U=>c.jsx("li",{children:U},U))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(fe,{type:"button",variant:"outline",onClick:C?ln:ea,children:"Back"}),c.jsx(fe,{type:"button",variant:"outline",onClick:()=>us(!1),children:"Edit queries"}),c.jsx(fe,{type:"button",onClick:()=>ys("queries",C?4:3,Mn.length),children:"Continue"})]})]}):c.jsxs("div",{className:"compact-stack",children:[Pn.length>0?c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"flex items-center gap-2 text-muted text-xs uppercase tracking-wide",children:[c.jsx("span",{className:"flex-1 border-t border-base"}),"auto-generate",c.jsx("span",{className:"flex-1 border-t border-base"})]}),c.jsxs("div",{className:"flex items-end gap-2",children:[c.jsxs("div",{className:"setup-field flex-1",children:[c.jsx("label",{className:"setup-label",htmlFor:"gen-provider",children:"Provider"}),c.jsx("select",{id:"gen-provider",className:"setup-input",value:jn,onChange:U=>Ha(U.target.value),children:Pn.map(U=>c.jsxs("option",{value:U.name,children:[U.displayName??U.name,U.model?` (${U.model})`:""]},U.name))})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"gen-count",children:"Count"}),c.jsx("select",{id:"gen-count",className:"setup-input",value:vi,onChange:U=>Ed(Number(U.target.value)),children:[3,5,10,15,20].map(U=>c.jsx("option",{value:U,children:U},U))})]}),c.jsx(fe,{type:"button",variant:"outline",disabled:br||!jn,onClick:Ft(qd),children:br?"Analyzing site...":"Generate"})]}),xi?c.jsx("p",{className:"text-negative-400 text-sm",children:xi}):null]}):null,C?null:c.jsxs("div",{className:"flex items-center gap-2 text-muted text-xs uppercase tracking-wide",children:[c.jsx("span",{className:"flex-1 border-t border-base"}),"or type manually",c.jsx("span",{className:"flex-1 border-t border-base"})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"queries",children:"Queries (one per line)"}),c.jsx("textarea",{id:"queries",className:"setup-textarea",rows:6,placeholder:`emergency dentist brooklyn
|
|
84
84
|
best invisalign downtown brooklyn
|
|
85
85
|
pediatric dentist brooklyn heights`,value:Ve,onChange:U=>ut(U.target.value)})]}),Kl?c.jsx("p",{className:"text-negative-400 text-sm",children:Kl}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(fe,{type:"button",variant:"outline",onClick:C?ln:ea,children:"Back"}),c.jsx(fe,{type:"button",variant:"ghost",onClick:ji,children:C?"Finish without AI Visibility":"Skip for now"}),c.jsx(fe,{type:"button",disabled:Mn.length===0||Hl,onClick:Ft(jr),children:Hl?"Saving...":`Save ${Mn.length} quer${Mn.length!==1?"ies":"y"}`})]})]})]});case 3:return c.jsxs(ua,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 4 of 5"}),c.jsx("h2",{children:"Add competitors"})]}),no?c.jsx(pn,{tone:"positive",children:"Saved"}):null]}),c.jsx("p",{className:"supporting-copy",children:"Domains that compete for the same queries. One per line."}),no?c.jsxs("div",{className:"compact-stack",children:[c.jsx("ul",{className:"detail-list",children:qa.map(U=>c.jsx("li",{children:U},U))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(fe,{type:"button",variant:"outline",onClick:ea,children:"Back"}),c.jsx(fe,{type:"button",onClick:()=>ys("competitors",4,qa.length),children:"Continue"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"competitors",children:"Competitor domains (one per line)"}),c.jsx("textarea",{id:"competitors",className:"setup-textarea",rows:4,placeholder:`competitor1.com
|
|
86
|
-
competitor2.com`,value:kr,onChange:U=>ps(U.target.value)})]}),Qa?c.jsx("p",{className:"text-negative-400 text-sm",children:Qa}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(fe,{type:"button",variant:"outline",onClick:ea,children:"Back"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(fe,{type:"button",variant:"outline",onClick:Ai,children:"Skip"}),c.jsx(fe,{type:"button",disabled:qa.length===0||Fa,onClick:Ft(Bd),children:Fa?"Saving...":`Save ${qa.length} competitor${qa.length!==1?"s":""}`})]})]})]})]});case 4:{const U=Oa.data,Pe=U?.status??(Da===Ke?.id?Ke.status:void 0),yn=Pe==="completed"||Pe==="partial"||Pe==="failed"||Pe==="cancelled",Ba=U?.snapshots??[],lo=Ba.filter(ta=>ta.citationState==="cited").length,sc=Ba.filter(ta=>ta.answerMentioned===!0).length,vs=new Set(Ba.map(ta=>ta.query).filter(ta=>!!ta)).size,xs=Pe?jx(Pe,Ba.length):!1,Ar=Fe&&!Cn,dn=Za??(U?.error?WI(U.error):Pe==="cancelled"?"The sweep was cancelled before it produced a baseline.":(Pe==="completed"||Pe==="partial")&&Ba.length===0?"The sweep finished without producing any snapshots.":Ke?.statusDetail||"The sweep did not produce a baseline.");let Vn=null;return Ar||xs?Vn=c.jsx(pn,{tone:"positive",children:"Complete"}):Za&&!Cn?Vn=c.jsx(pn,{tone:"negative",children:"Failed"}):yn?Vn=c.jsx(pn,{tone:"negative",children:Pe==="cancelled"?"Cancelled":"Failed"}):Cn&&(Vn=c.jsx(pn,{tone:"caution",children:"Running"})),c.jsxs(ua,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:C?"Step 2 of 2":"Step 5 of 5"}),c.jsx("h2",{children:Ps()?"AI Visibility":"Launch first run"})]}),Vn]}),Ar?c.jsxs("div",{className:"compact-stack",children:[c.jsxs("p",{className:"text-secondary",children:["Setup is complete. ",c.jsx("span",{className:"text-strong font-medium",children:Be})," already has a successful answer-visibility baseline."]}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(fe,{type:"button",onClick:ln,children:g?"Finish and open project":"Open project dashboard →"})]})]}):!Cn&&Ps()?c.jsxs("div",{className:"compact-stack",children:[Be?c.jsx(i$,{projectName:Be}):c.jsx("p",{className:"text-sm text-secondary",children:Gh}),Za&&c.jsx("p",{role:"alert",className:"text-sm text-negative",children:Za}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(fe,{type:"button",onClick:ln,children:"Open project dashboard →"})]})]}):Cn?yn?xs?c.jsxs("div",{className:"compact-stack",children:[c.jsxs("p",{className:"text-neutral",children:["Sweep complete. Your first answer-visibility snapshot for"," ",c.jsx("span",{className:"text-heading font-medium",children:Be}),":"]}),c.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-1",children:[c.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[c.jsx("p",{className:"text-xs font-medium text-secondary",children:"Mentioned"}),c.jsxs("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:[sc,c.jsxs("span",{className:"text-faint text-lg",children:[" / ",vs]})]}),c.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"queries naming your brand"})]}),c.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[c.jsx("p",{className:"text-xs font-medium text-secondary",children:"Cited"}),c.jsxs("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:[lo,c.jsxs("span",{className:"text-faint text-lg",children:[" / ",vs]})]}),c.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"queries citing your site"})]}),c.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[c.jsx("p",{className:"text-xs font-medium text-secondary",children:"Results"}),c.jsx("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:Ba.length}),c.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"completed engine checks"})]})]}),c.jsx("p",{className:"mt-1 text-sm text-secondary",children:g?"Your project is ready. Review the evidence in the project.":"Open the project to review the evidence."}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(fe,{type:"button",onClick:ln,children:g?"Finish and open project":"Open project dashboard →"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:[c.jsx("p",{children:dn}),c.jsx("p",{className:"mt-1 text-xs text-secondary",children:Ps()?Gh:v?"Fix provider or query configuration if needed, then retry without leaving setup.":"Ask an administrator to review the provider and query configuration."})]}),c.jsxs("div",{className:"setup-nav",children:[v&&!Ps()?c.jsx(fe,{type:"button",variant:"outline",asChild:!0,children:c.jsx(tt,{to:"/settings",children:"Configure providers"})}):c.jsx("span",{}),Ps()||!v?c.jsx(fe,{type:"button",onClick:ln,children:"Open project dashboard →"}):c.jsx(fe,{type:"button",disabled:hs||!!_n,onClick:Ft(Wn),children:hs?"Retrying...":"Retry visibility sweep"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsx("p",{className:"text-neutral",children:"Sweep running. This usually takes 30 to 60 seconds."}),c.jsx("div",{className:"rounded-md border border-default bg-surface p-3 text-xs text-muted",children:c.jsxs("p",{children:["Status: ",c.jsx("span",{className:"text-neutral",children:Pe??"queued"})]})}),Oa.isError&&c.jsxs("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:[c.jsx("p",{children:Oa.error instanceof Error?Oa.error.message:"Could not refresh the sweep status."}),c.jsx(fe,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>{Oa.refetch()},children:"Retry status check"})]}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(fe,{type:"button",variant:"outline",onClick:ln,children:g?"Finish and open project":"Watch on project page"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("p",{className:"supporting-copy",children:["Your queries are saved. Run a first sweep to get a baseline for"," ",c.jsx("span",{className:"text-heading font-medium",children:Be}),", or finish and run it later from the project. A sweep calls the answer engines, so it costs provider usage."]}),(_n||Za)&&c.jsxs("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:[c.jsx("p",{children:Za??_n}),c.jsx("p",{className:"mt-1 text-xs text-secondary",children:"Resolve the blocker above, then retry the sweep here."})]}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(fe,{type:"button",variant:"outline",onClick:ea,children:"Back"}),c.jsx(fe,{type:"button",variant:"ghost",onClick:ln,children:"Finish without running"}),In==="no_provider"&&!C?c.jsx(fe,{type:"button",asChild:!0,children:c.jsx(tt,{to:"/settings",children:"Configure a provider"})}):c.jsx(fe,{type:"button",disabled:hs||!!_n,title:_n,onClick:Ft(Wn),children:hs?"Launching...":Za?"Retry visibility sweep":"Launch visibility sweep"})]})]})]})}default:return null}})();return c.jsxs("div",{className:C?"page-container visibility-setup":"page-container",children:[g?c.jsx(ir,{current:"visibility"}):null,c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{ref:u?f:void 0,tabIndex:u?-1:void 0,className:"page-title",children:u?"Set up AI Visibility":"Setup"}),c.jsx("p",{className:"page-subtitle",children:u?"Connect an answer engine, then choose queries for your first sweep.":"Create a project and run its first visibility check."})]}),g?c.jsx("div",{className:"page-header-right",children:c.jsx(fe,{type:"button",variant:"outline",className:"min-h-11",onClick:ln,children:"Skip AI Visibility"})}):null]}),g?null:c.jsx(iK,{current:C?be===4?1:0:be,labels:C?nK:tK}),c.jsxs("section",{className:"setup-wizard",children:[bs,xa]})]})}const rK=T.lazy(async()=>({default:(await yi(()=>import("./SiteHealthSection-B-HyC8y6.js").then(a=>a.d),__vite__mapDeps([0,1,2,3,4]),import.meta.url)).SiteHealthSection})),lK=1800,cK="https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent",uK="Help me set up Canonry for my public site.\n\nUse Canonry's official docs:\n- Agent quickstart: https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent\n- CLI reference: https://github.com/Canonry/canonry/blob/main/skills/canonry/references/canonry-cli.md\n- Plugin setup: https://github.com/Canonry/canonry/blob/main/docs/plugins.md\n- MCP setup: https://github.com/Canonry/canonry/blob/main/docs/mcp.md\n\nUse an existing Canonry installation or connected plugin/MCP if one is already available. Do not create a duplicate. The `cnry` and `canonry` commands are interchangeable.\n\n1. Ask for my public domain, country, and language. Do not create or scan anything yet.\n2. Check the local setup with `command -v cnry`, `cnry --version`, `cnry doctor --format json`, and `cnry project list --format json`. If Canonry is missing, propose `npm install -g @canonry/canonry` and wait for approval. If initialization is required, tell me to run `cnry bootstrap` in my private terminal and wait. Never ask me to paste passwords, API keys, OAuth credentials, or `cnry bootstrap` output.\n3. Show the normalized domain, proposed project name, exact `cnry project create ...` command, and wait for explicit approval before creating it.\n4. Propose a bounded Site Health scan, including `--max-pages` and whether dead-link checking is enabled. Show the exact `cnry technical-aeo run ... --wait --format json` command and wait for separate approval before scanning.\n5. After the crawl, summarize the findings and propose AI Visibility setup. Ask before adding queries, connecting providers, starting any provider-backed or quota-consuming run, editing files, or publishing.";function dK(e,a){return e==="legacy"?"legacy":e==="platform"?"platform":a.state==="success"?a.projectCount===0?"platform":"legacy":a.state==="error"?"retry":"loading"}const C3=[{value:"US",label:"United States"},{value:"CA",label:"Canada"},{value:"GB",label:"United Kingdom"},{value:"AU",label:"Australia"},{value:"NZ",label:"New Zealand"},{value:"IE",label:"Ireland"},{value:"DE",label:"Germany"},{value:"FR",label:"France"},{value:"ES",label:"Spain"},{value:"IT",label:"Italy"},{value:"NL",label:"Netherlands"},{value:"BR",label:"Brazil"},{value:"MX",label:"Mexico"},{value:"IN",label:"India"},{value:"SG",label:"Singapore"},{value:"JP",label:"Japan"}],N3=[{value:"en",label:"English"},{value:"es",label:"Spanish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"it",label:"Italian"},{value:"pt",label:"Portuguese"},{value:"nl",label:"Dutch"},{value:"ja",label:"Japanese"}];function mK(e,a){try{const s=new Intl.DisplayNames(["en"],{type:"region"}),r=new Intl.DisplayNames(["en"],{type:"language"}),u=e.length===2?s.of(e.toUpperCase()):void 0,f=a?r.of(a.toLowerCase()):void 0;return`${u??(e||"Country")} · ${f??(a||"Language")}`}catch{return`${e||"Country"} · ${a||"Language"}`}}function pK(e,a){const s=e.trim().toUpperCase(),r=a.trim().toLowerCase();return{countryValid:C3.some(u=>u.value===s),languageValid:N3.some(u=>u.value===r)}}function hK(e){const a=e.replace(/^\[|\]$/g,"");return/^(?:\d{1,3}\.){3}\d{1,3}$/.test(a)||a.includes(":")}function fK(e){const a=e.trim();if(!a)return null;const s=/^[a-z][a-z\d+.-]*:\/\//i.test(a)?a:`https://${a}`;let r;try{r=new URL(s)}catch{return null}if(r.protocol!=="http:"&&r.protocol!=="https:")return null;const u=r.hostname.toLowerCase().replace(/^www\./,"");if(!u||u==="localhost"||hK(u)||!u.includes("."))return null;const f=u.replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return f?{canonicalDomain:u,projectName:f,displayName:u}:null}async function gK(e,a=lK){let s;const r=new Promise(f=>{s=setTimeout(()=>f({state:"timed-out"}),a)}),u=await Promise.race([e.then(f=>({state:"queued",run:f})),r]);return s&&clearTimeout(s),u}function yK(e,a){e.catch(()=>{rn({title:"Site Health scan did not start",detail:"The project is safe. Choose Run scan in Site Health to retry.",tone:"negative",dedupeKey:`site-health-dispatch:${a}`})})}function _3(e){const a=T.useRef(v3()).current,s=T.useRef(new Set),r=T.useCallback((u,f)=>{if(f){if(s.current.has(f))return;s.current.add(f)}TS({...u,surface:e,eventId:x3()})},[e]);return{onboardingSessionId:a,emit:r}}function Nx(e,a){return e instanceof fn&&e.statusCode===409?"A project with this name already exists. Change the project name, or open the existing project.":e instanceof Error&&e.message?e.message:a}function bK(){return c.jsxs("div",{className:"page-container max-w-3xl","aria-busy":"true","aria-live":"polite",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Preparing setup"}),c.jsx("p",{className:"page-subtitle",children:"Checking the projects already on this install."})]})}),c.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-default bg-surface p-4 text-sm text-secondary",role:"status",children:[c.jsx(Zo,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading projects…"]})]})}function vK({onRetry:e}){return c.jsxs("div",{className:"page-container max-w-3xl",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Can’t load projects"}),c.jsx("p",{className:"page-subtitle",children:"Canonry could not confirm whether this install already has a project."})]})}),c.jsxs("div",{className:"rounded-lg border border-negative bg-negative-soft p-4",role:"alert",tabIndex:-1,children:[c.jsx("p",{className:"text-sm font-medium text-heading",children:"Setup is paused to protect existing projects."}),c.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Check the connection or sign in again, then retry."}),c.jsx(fe,{type:"button",className:"mt-4",variant:"secondary",onClick:e,children:"Retry project check"})]})]})}function xK({projectName:e,initialRunId:a}){return c.jsx(_f,{title:"Site Health setup",children:c.jsx(kK,{projectName:e,initialRunId:a})})}function kK({projectName:e,initialRunId:a}){const s=Hs(),r=Et({...Zs({client:se}),enabled:!!e,retry:!1,refetchOnMount:"always"}),{onboardingSessionId:u,emit:f}=_3("site_health");T.useEffect(()=>{e&&f({flowVersion:st,onboardingSessionId:u,event:"onboarding.started",step:"run",resumed:!!a},"onboarding.started")},[f,a,u,e]),T.useEffect(()=>{!e||!a||S3(e)?.runId!==a&&w3(e,a)},[a,e]);const b=Et({...gf({client:se,path:{id:a??""}}),enabled:!!a,refetchInterval:({state:C})=>{const E=C.data?.status;return E==="completed"||E==="partial"||E==="failed"||E==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}).data?.status;if(T.useEffect(()=>{if(!e||!a||!b)return;if(b==="completed"||b==="partial"){f({flowVersion:st,onboardingSessionId:u,event:"onboarding.step_completed",step:"run",method:"automatic"},"onboarding.step_completed:run"),Fu(a);return}if(b!=="failed"&&b!=="cancelled")return;const C=b==="cancelled"?"run_cancelled":"run_failed";f({flowVersion:st,onboardingSessionId:u,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:C},`onboarding.blocked:run:${C}`),Fu(a)},[f,a,u,e,b]),!e)return c.jsxs("div",{className:"page-container max-w-3xl",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Project not found"}),c.jsx("p",{className:"page-subtitle",children:"This setup link does not identify a project."})]})}),c.jsx(fe,{type:"button",variant:"secondary",onClick:()=>{s({to:"/projects"})},children:"View projects"})]});if(r.isPending)return c.jsxs("div",{className:"page-container max-w-3xl","aria-busy":"true","aria-live":"polite",children:[c.jsx(ir,{current:"site"}),c.jsxs("div",{className:"mt-8 flex items-center gap-3 text-sm text-secondary",role:"status",children:[c.jsx(Zo,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading Site Health setup…"]})]});if(r.isError)return c.jsxs("div",{className:"page-container max-w-3xl",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Can’t resume setup"}),c.jsx("p",{className:"page-subtitle",children:"Canonry could not load the project for this Site Health scan."})]})}),c.jsxs("div",{className:"rounded-lg border border-negative bg-negative-soft p-4",role:"alert",children:[c.jsx("p",{className:"text-sm text-secondary",children:"Check the connection or sign in again, then retry."}),c.jsx(fe,{type:"button",className:"mt-4",variant:"secondary",onClick:()=>{r.refetch()},children:"Retry project check"})]})]});const v=r.data.find(C=>C.name===e);if(!v)return c.jsxs("div",{className:"page-container max-w-3xl",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Project not found"}),c.jsxs("p",{className:"page-subtitle",children:["Canonry could not find ",e,". It will not open a different project."]})]})}),c.jsx(fe,{type:"button",variant:"secondary",onClick:()=>{s({to:"/projects"})},children:"View projects"})]});const k=()=>{s({to:"/setup",search:{onboarding:"site-health",setupProject:v.name},replace:!0})},S=()=>{s({to:"/setup",search:{experience:"legacy",onboarding:"site-health",setupProject:v.name},replace:!0})},A=()=>{f({flowVersion:st,onboardingSessionId:u,event:"onboarding.step_completed",step:"run",method:"skipped"},"onboarding.step_completed:run"),s({to:"/projects/$projectName/technical-aeo",params:{projectName:v.name},replace:!0})};return c.jsxs("div",{className:"page-container max-w-7xl py-8 md:py-10",children:[c.jsx("h1",{className:"sr-only",children:"Set up Canonry"}),c.jsx(T.Suspense,{fallback:c.jsxs("div",{className:"space-y-5",children:[c.jsx(ir,{current:"site"}),c.jsxs("div",{className:"flex min-h-72 items-center justify-center gap-3 text-sm text-secondary",role:"status",children:[c.jsx(Zo,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading Site Health…"]})]}),children:c.jsx(rK,{projectName:v.name,projectId:v.id,initialRunId:a,onReleaseInitialRun:k,showOnboardingActions:!0,onContinueOnboarding:S,onSkipOnboarding:A})})]})}function wK(){const e=zx({from:"/setup"}),a=e.onboarding==="site-health"&&!e.setupProject,s=e.onboarding==="site-health"&&e.experience!=="legacy",r=JM(),u=e.experience==="legacy"?"legacy":e.experience==="platform"?"platform":r,[f,g]=T.useState(!1),b=Et({...Zs({client:se}),enabled:u==="auto",retry:!1,refetchOnMount:"always"}),v=u==="auto"&&b.isSuccess&&b.isFetchedAfterMount&&b.data.length===0;T.useEffect(()=>{v&&g(!0)},[v]);const k=u!=="auto"?{state:"idle"}:b.isSuccess&&b.isFetchedAfterMount?{state:"success",projectCount:b.data.length}:b.isError?{state:"error"}:{state:"loading"},S=u==="legacy"?"legacy":f||v?"platform":dK(u,k);return a||s?c.jsx(xK,{projectName:e.setupProject,initialRunId:e.siteHealthRunId}):S==="legacy"?c.jsx(sK,{visibilityProjectName:e.setupProject,siteHealthOnboarding:e.onboarding==="site-health"}):S==="loading"?c.jsx(bK,{}):S==="retry"?c.jsx(vK,{onRetry:()=>{b.refetch()}}):c.jsx(SK,{onActivationStarted:()=>g(!0),skipSiteScan:e.siteScan==="skip"})}function SK({onActivationStarted:e,skipSiteScan:a}){return c.jsx(_f,{title:"Site Health setup",children:c.jsx(jK,{onActivationStarted:e,skipSiteScan:a})})}function jK({onActivationStarted:e,skipSiteScan:a}){const s=Hs(),r=da(),u=J$(),f=Et({...PV({client:se}),retry:!1}),g=ns(MV()),[b,v]=T.useState(""),[k,S]=T.useState(""),[A,C]=T.useState(""),[E,Z]=T.useState("US"),[_,G]=T.useState("en"),[K,te]=T.useState(!1),[Q,re]=T.useState("idle"),[W,oe]=T.useState(null),[H,$]=T.useState(null),[Te,Ke]=T.useState(!1),[Fe,Re]=T.useState(null),[ve,Ue]=T.useState(!1),be=f.data,P=typeof be?.enabled=="boolean"?be.enabled:null,ae=g.isPending?g.variables.body.enabled:P,[he,je]=T.useState(null),X=T.useRef(null),{onboardingSessionId:Ie,emit:Ne}=_3("platform");T.useEffect(()=>{Ne({flowVersion:st,onboardingSessionId:Ie,event:"onboarding.started",step:"project",resumed:!1},"onboarding.started")},[Ne,Ie]);const Ae=fK(b),ne=k||Ae?.projectName||"",V=A||Ae?.displayName||"",q=Q==="creating"||Q==="dispatching",le=H??Fe,De=mK(E,_),{countryValid:ye,languageValid:Je}=pK(E,_),Ge=ye&&Je;T.useEffect(()=>{le&&X.current?.focus()},[le]);const Be=(Ve,ut)=>s({to:"/setup",search:{...ut?{siteHealthRunId:ut}:{},onboarding:"site-health",setupProject:Ve.name},replace:!0}),de=async Ve=>{re("dispatching"),Re(null);try{const ut=u.mutateAsync({projectName:Ve.name,projectId:Ve.id,projectLabel:Ve.displayName||Ve.name,suppressErrorToast:!0,body:{checkDeadLinks:!0}}),Jt=await gK(ut);if(Jt.state==="queued"){Ne({flowVersion:st,onboardingSessionId:Ie,event:"run.requested",origin:"dashboard_setup",result:"queued",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0"}),await Be(Ve,Jt.run.runId);return}ut.then(()=>{Ne({flowVersion:st,onboardingSessionId:Ie,event:"run.requested",origin:"dashboard_setup",result:"queued",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0"})},us=>{Ne({flowVersion:st,onboardingSessionId:Ie,event:"run.requested",origin:"dashboard_setup",result:"rejected",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0",reasonCode:jl(us,"run_rejected")})}),yK(ut,Ve.id),await Be(Ve)}catch(ut){re("recovery"),Re(Nx(ut,"The project was created, but the Site Health scan could not be started."));const Jt=jl(ut,"run_rejected");Ne({flowVersion:st,onboardingSessionId:Ie,event:"run.requested",origin:"dashboard_setup",result:"rejected",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0",reasonCode:Jt}),Ne({flowVersion:st,onboardingSessionId:Ie,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:Jt},`onboarding.blocked:run:${Jt}`)}},Me=async Ve=>{if(Ve.preventDefault(),!(!Ae||!a&&!K||!Ge||q)){re("creating"),$(null),Ke(!1),Re(null);try{const ut=await bI({name:ne,displayName:V,canonicalDomain:Ae.canonicalDomain,country:E,language:_});if(e(),oe(ut),Ne({flowVersion:st,onboardingSessionId:Ie,event:"onboarding.step_completed",step:"project",method:"manual"},"onboarding.step_completed:project"),await r.invalidateQueries({queryKey:ts({client:se})}),a){await s({to:"/setup",search:{experience:"legacy",onboarding:"first-run",setupProject:ut.name},replace:!0});return}await de(ut)}catch(ut){re("idle");const Jt=ut instanceof fn&&ut.statusCode===409;Ke(Jt),$(Nx(ut,"Could not create the project. Try again.")),Ne({flowVersion:st,onboardingSessionId:Ie,event:"onboarding.blocked",step:"project",action:"save",reasonCode:jl(ut,"project_create_failed")},"onboarding.blocked:project"),Jt&&(e(),r.invalidateQueries({queryKey:ts({client:se})}))}}},$t=()=>{W&&!q&&de(W)},Sn=()=>{q||s({to:"/projects"})},ga=async()=>{try{await navigator.clipboard.writeText(uK),Ue(!0)}catch{rn({tone:"negative",title:"Could not copy setup request",detail:"Open the agent quickstart to continue with the CLI instead."})}},ln=async Ve=>{je(null);try{const ut=await g.mutateAsync({client:se,body:{enabled:Ve}});r.setQueryData(IS({client:se}),ut),ut.enabled!==Ve&&je(`The server kept telemetry ${ut.enabled?"on":"off"}. Check its telemetry settings.`)}catch{je("Could not update telemetry. Try again.")}};return W&&Q==="recovery"?c.jsxs("div",{className:"page-container max-w-3xl",children:[c.jsx(ir,{current:"site"}),c.jsx("div",{className:"page-header mt-8",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Project created"}),c.jsxs("p",{className:"page-subtitle",children:[W.displayName||W.name," is ready. The Site Health scan needs another try."]})]})}),c.jsxs("div",{ref:X,className:"rounded-lg border border-negative bg-negative-soft p-4",role:"alert",tabIndex:-1,children:[c.jsx("p",{className:"text-sm font-medium text-heading",children:Fe}),c.jsx("p",{className:"mt-1 text-sm text-secondary",children:"You can retry the scan or continue setup and retry from Site Health."}),c.jsxs("div",{className:"mt-4 flex flex-wrap gap-3",children:[c.jsx(fe,{type:"button",onClick:$t,children:"Retry Site Health scan"}),c.jsx(fe,{type:"button",variant:"secondary",onClick:()=>{Be(W)},children:"Continue setup"})]})]})]}):c.jsxs("div",{className:"page-container max-w-xl py-8 md:py-12",children:[a?null:c.jsx(ir,{current:"site"}),c.jsxs("header",{className:`mb-8 ${a?"":"mt-8"}`,children:[c.jsx("h1",{id:"site-map-setup-title",className:"text-2xl font-semibold tracking-[-0.025em] text-heading",children:a?"Create a project":"Map your site"}),c.jsx("p",{className:"mt-2 max-w-lg text-sm leading-6 text-secondary",children:a?"Add a public domain, then choose the queries you want to track. No site scan will run.":"Enter your public website to see its pages, structure, internal links, and technical SEO scores."})]}),c.jsxs("form",{"aria-labelledby":"site-map-setup-title",className:"space-y-6",onSubmit:Ft(Me),noValidate:!0,children:[c.jsxs("div",{className:"grid gap-2",children:[c.jsx("label",{className:"text-sm font-medium text-heading",htmlFor:"launchpad-domain",children:"Website URL"}),c.jsx("input",{id:"launchpad-domain",className:"h-11 w-full rounded-md border border-strong bg-bg-elevated/50 px-3 text-base text-heading outline-none transition placeholder:text-muted focus:border-mono-500 focus:ring-1 focus:ring-mono-500",type:"text",inputMode:"url",autoComplete:"url",autoCapitalize:"none",spellCheck:!1,required:!0,"aria-invalid":!!(b&&!Ae),"aria-describedby":b&&!Ae?"launchpad-domain-hint launchpad-domain-error":"launchpad-domain-hint",placeholder:"https://example.com",value:b,onChange:Ve=>{v(Ve.target.value),$(null),Ke(!1)}}),c.jsx("p",{id:"launchpad-domain-hint",className:"text-sm text-secondary",children:a?c.jsxs(c.Fragment,{children:["A public domain is still required."," ",c.jsx(tt,{to:"/setup",search:{experience:"platform"},className:"font-medium text-link underline-offset-4 hover:underline",children:"Map with Site Health instead"})]}):c.jsxs(c.Fragment,{children:["Only public pages are scanned."," ",c.jsx(tt,{to:"/setup",search:{experience:"platform",onboarding:"first-run",siteScan:"skip"},className:"font-medium text-link underline-offset-4 hover:underline",children:"Set up without a site scan"})]})}),b&&!Ae?c.jsx("p",{id:"launchpad-domain-error",className:"text-sm text-negative",role:"alert",children:"Enter a public domain, such as example.com."}):null]}),c.jsxs("details",{className:"group border-y border-default",children:[c.jsxs("summary",{className:"flex min-h-11 cursor-pointer list-none items-center justify-between gap-4 py-3 text-sm [&::-webkit-details-marker]:hidden",children:[c.jsx("span",{className:"font-medium text-heading",children:"Advanced settings"}),c.jsxs("span",{className:"flex items-center gap-2 text-secondary",children:[De,c.jsx(Zh,{className:"size-4 transition-transform group-open:rotate-180 motion-reduce:transition-none","aria-hidden":"true"})]})]}),c.jsxs("div",{className:"space-y-5 border-t border-default py-4",children:[Ae?c.jsxs("div",{children:[c.jsx("p",{className:"mb-3 text-sm font-medium text-heading",children:"Project"}),c.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[c.jsxs("div",{className:"grid gap-2",children:[c.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-project-name",children:"Project name"}),c.jsx("input",{id:"launchpad-project-name",className:"setup-input h-10",type:"text",value:ne,onChange:Ve=>S(Ve.target.value)})]}),c.jsxs("div",{className:"grid gap-2",children:[c.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-display-name",children:"Display name"}),c.jsx("input",{id:"launchpad-display-name",className:"setup-input h-10",type:"text",value:V,onChange:Ve=>C(Ve.target.value)})]})]})]}):null,c.jsxs("div",{children:[c.jsx("p",{className:"mb-3 text-sm font-medium text-heading",children:"Locale"}),c.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[c.jsxs("div",{className:"grid gap-2",children:[c.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-country",children:"Country"}),c.jsx("select",{id:"launchpad-country",className:"setup-input h-10",value:E,onChange:Ve=>Z(Ve.target.value),children:C3.map(Ve=>c.jsx("option",{value:Ve.value,children:Ve.label},Ve.value))})]}),c.jsxs("div",{className:"grid gap-2",children:[c.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-language",children:"Language"}),c.jsx("select",{id:"launchpad-language",className:"setup-input h-10",value:_,onChange:Ve=>G(Ve.target.value),children:N3.map(Ve=>c.jsx("option",{value:Ve.value,children:Ve.label},Ve.value))})]})]})]})]})]}),a?null:c.jsxs("label",{className:"flex min-h-11 cursor-pointer items-start gap-3 py-2",children:[c.jsx("input",{className:"mt-0.5 size-4 shrink-0 rounded border-strong bg-bg",type:"checkbox",checked:K,onChange:Ve=>te(Ve.target.checked),"aria-label":"Allow Canonry to scan this public site.","aria-describedby":"local-crawl-note"}),c.jsxs("span",{className:"grid gap-0.5",children:[c.jsx("span",{className:"text-sm leading-5 text-heading",children:"Allow Canonry to scan this public site."}),c.jsx("span",{id:"local-crawl-note",className:"text-sm leading-5 text-secondary",children:"The crawl runs on this Canonry instance, follows internal links, and stores its results locally."})]})]}),le?c.jsxs("div",{ref:X,className:"rounded-md border border-negative bg-negative-soft p-3",role:"alert",tabIndex:-1,children:[c.jsx("p",{className:"text-sm font-medium text-heading",children:le}),Te?c.jsx(fe,{type:"button",variant:"secondary",size:"sm",className:"mt-3",onClick:Sn,children:"View projects"}):null]}):null,c.jsxs("div",{className:"grid gap-2",children:[c.jsx(fe,{className:"h-11 w-full",type:"submit",disabled:!Ae||!a&&!K||!Ge||q,children:Q==="creating"||Q==="dispatching"?c.jsxs(c.Fragment,{children:[c.jsx(Zo,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"})," ",a?"Creating project…":"Mapping site…"]}):a?"Create project":"Map site"}),Q==="dispatching"?c.jsx("span",{className:"text-center text-sm text-secondary",role:"status",children:"Opening Site Health when the scan is ready."}):null]})]}),c.jsxs("section",{className:"mt-8 border-t border-default pt-6","aria-labelledby":"agent-setup-title",children:[c.jsx("p",{id:"agent-setup-title",className:"text-sm font-medium text-heading",children:"Use your agent instead"}),c.jsx("p",{className:"mt-1 text-sm leading-5 text-secondary",children:"Copy a complete CLI setup request into any coding agent."}),c.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-1",children:[c.jsxs(fe,{type:"button",variant:"ghost",size:"sm",className:"-ml-3",onClick:Ft(ga),children:[ve?c.jsx(Yh,{className:"size-3.5","aria-hidden":"true"}):c.jsx(Ix,{className:"size-3.5","aria-hidden":"true"}),c.jsx("span",{"aria-live":"polite",children:ve?"Copied setup request":"Copy setup request"})]}),c.jsx(fe,{asChild:!0,variant:"ghost",size:"sm",children:c.jsxs("a",{href:cK,target:"_blank",rel:"noopener noreferrer",children:["Agent quickstart",c.jsx(uA,{className:"size-3.5","aria-hidden":"true"}),c.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]})})]})]}),P!==null?c.jsxs("section",{className:"mt-6 border-t border-default pt-5","aria-labelledby":"telemetry-title",children:[c.jsxs("label",{className:`flex min-h-11 items-start gap-3 py-2 ${g.isPending?"cursor-wait":"cursor-pointer"}`,children:[c.jsx("input",{className:"mt-0.5 size-4 shrink-0 rounded border-strong bg-bg accent-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-mono-500 disabled:cursor-wait",type:"checkbox",checked:ae??!1,disabled:g.isPending,onChange:Ve=>{ln(Ve.target.checked)},"aria-describedby":"telemetry-detail"}),c.jsxs("span",{className:"grid gap-0.5",children:[c.jsx("span",{id:"telemetry-title",className:"text-sm leading-5 text-heading",children:"Share anonymous product telemetry"}),c.jsx("span",{id:"telemetry-detail",className:"max-w-[70ch] text-sm leading-5 text-secondary",children:"Helps prioritize improvements. Canonry does not send raw domains, URLs, queries, answer content, or credentials."})]})]}),g.isPending?c.jsx("p",{className:"mt-1 text-sm text-secondary",role:"status",children:"Saving preference…"}):null,he?c.jsx("p",{className:"mt-1 text-sm text-negative",role:"alert",children:he}):null]}):null]})}function AK(){return c.jsx("div",{className:"page-container",children:c.jsx("section",{className:"page-section",children:c.jsxs(ua,{className:"surface-card empty-card",children:[c.jsx("h1",{children:"Route not found"}),c.jsx("p",{children:"The current path does not map to a dashboard view."}),c.jsx(fe,{asChild:!0,children:c.jsx(tt,{to:"/",children:"Return to overview"})})]})})})}const Yn=as(()=>yi(()=>import("./ProjectPage-C6Wg18vZ.js"),__vite__mapDeps([5,1,2,6,0,3,4,7,8,9,10,11,12]),import.meta.url),"ProjectPage"),CK=as(()=>yi(()=>import("./RunsPage-BYji7xOv.js"),__vite__mapDeps([13,1,6,11,4,2,9,12]),import.meta.url),"RunsPage"),NK=as(()=>yi(()=>import("./HistoryPage-CU2woh-k.js"),__vite__mapDeps([14,1,10,11,4,2,9,12]),import.meta.url),"HistoryPage"),_K=as(()=>yi(()=>import("./SettingsPage-D2VAFJh0.js"),__vite__mapDeps([15,1,11,4,2,9,12]),import.meta.url),"SettingsPage"),zK=as(()=>yi(()=>import("./BacklinksPage-BkQNTtV9.js"),__vite__mapDeps([16,1,2,11,4,9,12]),import.meta.url),"BacklinksPage"),EK=as(()=>yi(()=>import("./TrafficPage-UoiRx4vW.js"),__vite__mapDeps([17,1,7,2,11,4,9,12]),import.meta.url),"TrafficPage"),TK=as(()=>yi(()=>import("./TrafficSourceDetailPage-24Ioy8BG.js"),__vite__mapDeps([18,1,7,3,4,2,11,9,12]),import.meta.url),"TrafficSourceDetailPage"),RK=as(()=>yi(()=>import("./MeasurementPropertyPage-D5EhcG4V.js"),__vite__mapDeps([19,1,3,4,8,9,2,11,12]),import.meta.url),"MeasurementPropertyPage");function DK(){return c.jsx(E$,{children:c.jsx(z$,{})})}const kn=I4()({component:DK,validateSearch:e=>({manageQueries:e.manageQueries===!0||e.manageQueries==="true"?!0:void 0,runId:typeof e.runId=="string"?e.runId:void 0,siteHealthRunId:typeof e.siteHealthRunId=="string"?e.siteHealthRunId:void 0,evidenceId:typeof e.evidenceId=="string"?e.evidenceId:void 0,runStatus:typeof e.runStatus=="string"?e.runStatus:void 0,runKind:typeof e.runKind=="string"?e.runKind:void 0,runProject:typeof e.runProject=="string"?e.runProject:void 0,runWindow:typeof e.runWindow=="string"?e.runWindow:void 0,runQuery:typeof e.runQuery=="string"?e.runQuery:void 0,onboarding:e.onboarding==="site-health"||e.onboarding==="first-run"?e.onboarding:void 0,experience:e.experience==="legacy"||e.experience==="platform"?e.experience:void 0,siteScan:e.siteScan==="skip"?"skip":void 0,setupProject:typeof e.setupProject=="string"?e.setupProject:void 0,scope:typeof e.scope=="string"?e.scope:void 0,class:typeof e.class=="string"?e.class:void 0,...Object.fromEntries(["queryWorkspace","researchMode","trackingQueryId","measurementScope","measurementScopeKey","measurementMarketKey","queryClass","measurementProvider","measurementModel","measurementLocation","measurementFrom","measurementTo","measurementRevision","measurementRunId","measurementQueryKey","measurementAnswer"].map(a=>[a,typeof e[a]=="string"?e[a]:void 0]))})}),OK=St({getParentRoute:()=>kn,path:"/",component:q$,beforeLoad:async({context:e})=>{let a=e.queryClient.getQueryData(ts({client:se}));if(a===void 0)try{a=await e.queryClient.ensureQueryData(Zs({client:se}))}catch{return}if(a.length===0)throw Tx({to:"/setup"})}}),qK=St({getParentRoute:()=>kn,path:"/projects",component:I$}),BK=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,wn=St({getParentRoute:()=>kn,path:"/projects/$projectName",component:()=>c.jsx(dh,{}),beforeLoad:async({context:e,params:a,location:s})=>{const r=a.projectName;if(!BK.test(r))return;let u=e.queryClient.getQueryData(ts({client:se}));if(!u)try{u=await e.queryClient.ensureQueryData(Zs({client:se}))}catch{return}const f=u.find(g=>g.id===r);if(f)throw Tx({to:s.pathname.replace(`/projects/${r}`,`/projects/${encodeURIComponent(f.name)}`),replace:!0})}}),PK=St({getParentRoute:()=>wn,path:"/",component:()=>c.jsx(Yn,{tab:"overview"})}),MK=St({getParentRoute:()=>wn,path:"/portfolio",component:()=>c.jsx(Yn,{tab:"portfolio"})}),IK=St({getParentRoute:()=>wn,path:"/search-console",component:()=>c.jsx(Yn,{tab:"search-console"})}),VK=St({getParentRoute:()=>wn,path:"/conversions",component:()=>c.jsx(Yn,{tab:"conversions"})}),LK=St({getParentRoute:()=>wn,path:"/local",component:()=>c.jsx(Yn,{tab:"local"})}),UK=St({getParentRoute:()=>wn,path:"/discovery",component:()=>c.jsx(Yn,{tab:"discovery"})}),GK=St({getParentRoute:()=>wn,path:"/queries",component:()=>c.jsx(Yn,{tab:"queries"})}),$K=St({getParentRoute:()=>wn,path:"/properties/$targetKey",component:()=>c.jsx(RK,{})}),KK=St({getParentRoute:()=>wn,path:"/report",component:()=>c.jsx(Yn,{tab:"report"})}),HK=St({getParentRoute:()=>wn,path:"/activity",component:()=>c.jsx(Yn,{tab:"activity"})}),QK=St({getParentRoute:()=>wn,path:"/backlinks",component:()=>c.jsx(Yn,{tab:"backlinks"})}),FK=St({getParentRoute:()=>wn,path:"/technical-aeo",component:()=>c.jsx(Yn,{tab:"technical-aeo"})}),ZK=St({getParentRoute:()=>wn,path:"/history",component:()=>c.jsx(Yn,{tab:"history"})}),YK=St({getParentRoute:()=>wn,path:"/settings",component:()=>c.jsx(Yn,{tab:"settings"})}),XK=St({getParentRoute:()=>kn,path:"/runs",component:CK}),JK=St({getParentRoute:()=>kn,path:"/history",component:NK}),WK=St({getParentRoute:()=>kn,path:"/settings",component:_K,beforeLoad:({context:e})=>{}}),eH=St({getParentRoute:()=>kn,path:"/setup",component:wK}),tH=St({getParentRoute:()=>kn,path:"/backlinks",component:zK}),nH=St({getParentRoute:()=>kn,path:"/traffic",component:EK}),aH=St({getParentRoute:()=>kn,path:"/traffic/$projectName/$sourceId",component:TK}),iH=St({getParentRoute:()=>kn,path:"*",component:AK}),sH=kn.addChildren([OK,qK,wn.addChildren([PK,MK,IK,VK,LK,UK,GK,$K,KK,HK,QK,FK,ZK,YK]),XK,JK,WK,eH,tH,nH,aH,iH]);function oH(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath:"/"}const _x=oH(),rH=_x==="/"?"":_x.replace(/\/$/,"");function lH(e,a){return V4({routeTree:sH,basepath:rH||"/",context:{queryClient:e},...a?.initialEntries})}const cH=6e4;function uH(){const e=T.useRef(fI()).current,[a,s]=T.useState(e?"ready":"checking"),[r,u]=T.useState(null),[f,g]=T.useState(null),[b,v]=T.useState(e),[k,S]=T.useState(!1),[A,C]=T.useState(""),[E,Z]=T.useState(""),[_,G]=T.useState(""),[K,te]=T.useState(!1),[Q,re]=T.useState("password"),[W,oe]=T.useState(null),[H,$]=T.useState(!1),[Te,Ke]=T.useState(!1),Fe=T.useRef(null),Re=T.useRef(null),ve=T.useRef(null),Ue=()=>{const q=r?`${r.name}:${r.role}`:e?"api-key:explicit":f?`api-key:${f.id}`:"no-accounts";if(!Fe.current||ve.current!==q){Re.current?.clear();const le=ZI();Re.current=le,Fe.current=lH(le),ve.current=q}return{queryClient:Re.current,router:Fe.current}},be=q=>q.authRequired?(S(!0),u(q.user),g(null),v(!1),s(q.user?"ready":"account-login"),!0):!1;T.useEffect(()=>{let q=!1;const le=async(De,ye=!1)=>{try{const Je=await sh();if(q)return;g(Je),v(!1),s("ready")}catch(Je){if(q)return;if(ye&&Je instanceof fn&&Je.statusCode===401)return NI().then(()=>{q||(oe(null),g(null),v(!1),Ke(!0),s("login"))}).catch(Ge=>{q||(oe(Ge instanceof Error?Ge.message:"Could not clear the invalid session"),s(De))});oe(Je instanceof Error?Je.message:"Could not verify API key access"),s(De)}};return e?(le("api-key-error"),()=>{q=!0}):(Promise.allSettled([Vv(),Iv()]).then(([De,ye])=>{if(q||De.status==="fulfilled"&&be(De.value))return;if(ye.status==="rejected"){const Ge=ye.reason;oe(Ge instanceof Error?Ge.message:"Failed to reach the Canonry API"),s("login");return}const Je=ye.value;Je.authenticated?(v(!0),le("api-key-error",!0)):(g(null),v(!1),s(Je.setupRequired?"setup":"login"))}),()=>{q=!0})},[]),T.useEffect(()=>{if(a!=="ready"||e)return;const q=setInterval(()=>{if(k){Vv().then(le=>{le.authRequired&&!le.user&&(Ke(!0),u(null),g(null),s("account-login"))}).catch(()=>{});return}Iv().then(le=>{le.authenticated||(Ke(!0),g(null),s(le.setupRequired?"setup":"login"))}).catch(()=>{})},cH);return Mv(()=>{Ke(!0),u(null),g(null),v(!1),s(k?"account-login":"login")}),()=>{clearInterval(q),Mv(null)}},[a,k,e]);const P=async q=>{if(q.preventDefault(),!E.trim()||E.trim().length<8){oe("Password must be at least 8 characters");return}if(E!==_){oe("Passwords do not match");return}$(!0),oe(null);try{if(!(await jI(E.trim())).authenticated){oe("Setup failed");return}Z(""),G(""),te(!1),Ke(!1),g(null),v(!0),s("checking");try{const De=await sh();g(De),v(!1),s("ready")}catch(De){oe(De instanceof Error?De.message:"Could not verify API key access"),s("api-key-error")}}catch(le){oe(le instanceof fn||le instanceof Error?le.message:"Setup failed")}finally{$(!1)}},ae=q=>{Z(q),oe(null)},he=q=>{G(q),oe(null)},je=async q=>{if(q.preventDefault(),!!E.trim()){$(!0),oe(null);try{if(!(Q==="api-key"?await CI(E.trim()):await AI(E.trim())).authenticated){oe(Q==="api-key"?"Invalid API key":"Incorrect password");return}const De=await sh();g(De),v(!1),Z(""),te(!1),Ke(!1),s("ready")}catch(le){oe(le instanceof fn||le instanceof Error?le.message:"Authentication failed")}finally{$(!1)}}},X=q=>{re(q),Z(""),te(!1),oe(null)},Ie=async q=>{if(q.preventDefault(),!(!A.trim()||!E)){$(!0),oe(null);try{const le=await _I(A.trim(),E);if(!le.user){oe("Incorrect name or password.");return}Z(""),Ke(!1),u(le.user),g(null),v(!1),s("ready")}catch(le){oe(le instanceof fn?le.message:"Incorrect name or password.")}finally{$(!1)}}};if(a==="ready"){const{queryClient:q,router:le}=Ue();return c.jsx(II,{account:r,apiKey:f,apiKeyPending:b,children:c.jsx(L4,{client:q,children:c.jsx(U4,{router:le})})})}const Ne=E.trim(),Ae=E.length>0&&Ne.length<8,ne=_.length>0&&E!==_,V=Ne.length>=8&&E===_;return c.jsx("div",{className:"min-h-screen bg-bg px-4 py-8",children:c.jsxs("div",{className:"mx-auto flex min-h-[calc(100vh-4rem)] max-w-md flex-col items-center justify-center gap-5",children:[c.jsxs("div",{"data-testid":"auth-brand",className:"flex items-center gap-2.5",children:[c.jsx("img",{className:"size-7",src:"./favicon.svg",alt:"","aria-hidden":"true"}),c.jsx("span",{className:"text-lg font-semibold tracking-tight text-heading",children:"Canonry"})]}),c.jsx(ua,{className:"surface-card w-full",children:a==="checking"?c.jsx(Ms,{className:"py-8",children:c.jsx("p",{className:"supporting-copy text-center",children:"Connecting to Canonry…"})}):a==="api-key-error"?c.jsxs(c.Fragment,{children:[c.jsxs(Ko,{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),c.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Could not verify API key access"})]}),c.jsxs(Ms,{className:"space-y-4",children:[c.jsx("p",{className:"supporting-copy",children:W??"Canonry could not verify this session’s access, so the dashboard stayed locked."}),c.jsx(fe,{type:"button",className:"w-full",onClick:()=>{window.location.reload()},children:"Try again"})]})]}):a==="account-login"?c.jsxs(c.Fragment,{children:[c.jsxs(Ko,{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),c.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Sign in to Canonry"})]}),c.jsxs(Ms,{children:[Te?c.jsx("p",{className:"mb-4 rounded-md border border-caution bg-caution-soft px-3 py-2 text-sm text-caution",children:"You were signed out — please sign in again."}):null,c.jsxs("form",{className:"space-y-4",onSubmit:Ft(Ie),children:[c.jsxs("label",{className:"block space-y-1.5",htmlFor:"account-name",children:[c.jsx("span",{className:"text-xs font-medium text-secondary",children:"Name"}),c.jsx("input",{autoFocus:!0,id:"account-name",className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:"text",name:"username",autoComplete:"username",value:A,onChange:q=>{C(q.target.value),oe(null)},"aria-invalid":!!W,"aria-describedby":W?"account-login-error":void 0})]}),c.jsxs("label",{className:"block space-y-1.5",htmlFor:"account-password",children:[c.jsx("span",{className:"text-xs font-medium text-secondary",children:"Password"}),c.jsx("input",{id:"account-password",className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:"password",name:"password",autoComplete:"current-password",value:E,onChange:q=>ae(q.target.value),"aria-invalid":!!W,"aria-describedby":W?"account-login-error":void 0})]}),W?c.jsx("p",{id:"account-login-error",role:"alert",className:"text-sm text-negative-400",children:W}):null,c.jsx(fe,{type:"submit",disabled:H||!A.trim()||!E,children:H?"Signing in…":"Sign in"})]})]})]}):a==="setup"?c.jsxs(c.Fragment,{children:[c.jsxs(Ko,{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"First-time setup"}),c.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Create a dashboard password"}),c.jsx(Hu,{children:"Stored on this Canonry install as a salted, one-way hash. Canonry cannot recover it."})]}),c.jsx(Ms,{children:c.jsxs("form",{className:"space-y-4",onSubmit:Ft(P),children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"block text-xs font-medium text-secondary",htmlFor:"dashboard-password-new",children:"Password"}),c.jsx("input",{autoFocus:!0,id:"dashboard-password-new",className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:K?"text":"password",name:"new-password",autoComplete:"new-password",minLength:8,required:!0,value:E,onChange:q=>ae(q.target.value),"aria-invalid":Ae,"aria-describedby":"dashboard-password-new-help"}),c.jsx("span",{id:"dashboard-password-new-help","aria-live":"polite",className:Ae?"block text-sm text-negative-400":"block text-sm text-secondary",children:Ae?"Enter at least 8 characters.":"Use at least 8 characters."})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"block text-xs font-medium text-secondary",htmlFor:"dashboard-password-confirm",children:"Confirm password"}),c.jsx("input",{id:"dashboard-password-confirm",className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:K?"text":"password",name:"confirm-password",autoComplete:"new-password",minLength:8,required:!0,value:_,onChange:q=>he(q.target.value),"aria-invalid":ne,"aria-describedby":"dashboard-password-confirm-help"}),c.jsx("span",{id:"dashboard-password-confirm-help","aria-live":"polite",className:ne?"block text-sm text-negative-400":"block text-sm text-secondary",children:ne?"Passwords do not match.":"Enter the same password again."})]}),c.jsxs("label",{className:"flex min-h-10 cursor-pointer items-center gap-2 text-sm text-secondary",htmlFor:"dashboard-password-show",children:[c.jsx("input",{id:"dashboard-password-show",type:"checkbox",checked:K,onChange:q=>te(q.target.checked)}),"Show passwords"]}),W?c.jsx("p",{id:"dashboard-password-setup-error",role:"alert",className:"text-sm text-negative-400",children:W}):null,c.jsx(fe,{type:"submit",disabled:H||!V,children:H?"Creating password…":"Create password and continue"})]})})]}):c.jsxs(c.Fragment,{children:[c.jsxs(Ko,{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),c.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Sign in to Canonry"}),c.jsx(Hu,{children:Q==="api-key"?"Enter an API key from this Canonry install. This opens the dashboard with that key’s access and does not change the password.":"Enter your dashboard password to continue."})]}),c.jsxs(Ms,{children:[Te?c.jsx("p",{className:"mb-4 rounded-md border border-caution bg-caution-soft px-3 py-2 text-sm text-caution",children:"Your session expired — please sign in again."}):null,c.jsxs("form",{className:"space-y-4",onSubmit:Ft(je),children:[c.jsxs("label",{className:"block space-y-1.5",htmlFor:"dashboard-password-current",children:[c.jsx("span",{className:"text-xs font-medium text-secondary",children:Q==="api-key"?"Canonry API key":"Password"}),c.jsx("input",{autoFocus:!0,id:"dashboard-password-current",className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:K?"text":"password",name:Q==="api-key"?"apiKey":"password",autoComplete:Q==="api-key"?"off":"current-password",spellCheck:!1,required:!0,value:E,onChange:q=>ae(q.target.value),"aria-invalid":!!W,"aria-describedby":W?"dashboard-password-login-error":void 0})]}),c.jsxs("label",{className:"flex min-h-10 cursor-pointer items-center gap-2 text-sm text-secondary",htmlFor:"dashboard-login-password-show",children:[c.jsx("input",{id:"dashboard-login-password-show",type:"checkbox",checked:K,onChange:q=>te(q.target.checked)}),Q==="api-key"?"Show API key":"Show password"]}),W?c.jsx("p",{id:"dashboard-password-login-error",role:"alert",className:"text-sm text-negative-400",children:W}):null,c.jsx(fe,{type:"submit",disabled:H||!E.trim(),children:H?"Signing in…":"Open dashboard"}),c.jsx(fe,{type:"button",variant:"ghost",onClick:()=>X(Q==="api-key"?"password":"api-key"),children:Q==="api-key"?"Use dashboard password instead":"Forgot password? Use API key"})]})]})]})})]})})}const z3=document.getElementById("root");if(!z3)throw new Error("Expected #root element for web app bootstrap.");yA.createRoot(z3).render(c.jsx(T.StrictMode,{children:c.jsx(uH,{})}));export{NZ as $,CF as A,fe as B,Lu as C,zF as D,_Q as E,CZ as F,AF as G,zZ as H,yl as I,_Z as J,PQ as K,BQ as L,SY as M,QQ as N,rn as O,eG as P,RZ as Q,DZ as R,JI as S,pn as T,UQ as U,OZ as V,GQ as W,IQ as X,LQ as Y,EZ as Z,TZ as _,wY as a,hf as a$,MQ as a0,qZ as a1,UZ as a2,MZ as a3,VZ as a4,IZ as a5,LZ as a6,dF as a7,yf as a8,ze as a9,HI as aA,LF as aB,on as aC,uV as aD,DV as aE,QF as aF,JF as aG,FF as aH,HH as aI,FH as aJ,jO as aK,ZH as aL,kV as aM,HF as aN,CO as aO,Rh as aP,QH as aQ,sI as aR,ZF as aS,KF as aT,SV as aU,YF as aV,AY as aW,XF as aX,oY as aY,rY as aZ,$Q as a_,PZ as aa,GS as ab,gi as ac,BZ as ad,TY as ae,zT as af,ET as ag,vH as ah,bH as ai,hF as aj,xF as ak,kF as al,fn as am,wF as an,vQ as ao,WI as ap,iU as aq,Oh as ar,SF as as,Eu as at,tY as au,s_ as av,Gh as aw,Ps as ax,VQ as ay,yH as az,M9 as b,UH as b$,eY as b0,NV as b1,aZ as b2,sZ as b3,pZ as b4,SZ as b5,wZ as b6,dZ as b7,xZ as b8,AZ as b9,eQ as bA,tQ as bB,oQ as bC,sQ as bD,iQ as bE,nQ as bF,aQ as bG,WH as bH,JH as bI,XH as bJ,YH as bK,eB as bL,OH as bM,EH as bN,TH as bO,RH as bP,qH as bQ,DH as bR,MH as bS,WZ as bT,BH as bU,PH as bV,tF as bW,_H as bX,EY as bY,LH as bZ,IH as b_,rZ as ba,fZ as bb,gZ as bc,yZ as bd,oZ as be,hZ as bf,lZ as bg,bZ as bh,cZ as bi,vZ as bj,mZ as bk,kZ as bl,jZ as bm,Q$ as bn,uZ as bo,ge as bp,gQ as bq,fQ as br,hQ as bs,pQ as bt,uQ as bu,cQ as bv,mQ as bw,dQ as bx,lQ as by,rQ as bz,E2 as c,$Z as c$,GH as c0,zH as c1,VH as c2,CQ as c3,AQ as c4,jQ as c5,nF as c6,BV as c7,iZ as c8,RF as c9,X$ as cA,WF as cB,BF as cC,VF as cD,PF as cE,eZ as cF,jY as cG,MF as cH,xn as cI,yI as cJ,iV as cK,i$ as cL,xQ as cM,xI as cN,kQ as cO,wQ as cP,SQ as cQ,ts as cR,cV as cS,pV as cT,NQ as cU,GZ as cV,RI as cW,JQ as cX,KZ as cY,HZ as cZ,QZ as c_,Kv as ca,EQ as cb,TQ as cc,EF as cd,TF as ce,RQ as cf,DQ as cg,qQ as ch,OQ as ci,$l as cj,Zs as ck,AS as cl,qF as cm,OF as cn,KG as co,tG as cp,r3 as cq,oG as cr,l3 as cs,c3 as ct,hV as cu,Is as cv,Zu as cw,VV as cx,eK as cy,zY as cz,jF as d,e$ as d$,NF as d0,FQ as d1,ZQ as d2,YQ as d3,WQ as d4,XQ as d5,nr as d6,ff as d7,CY as d8,Cd as d9,P$ as dA,KH as dB,nf as dC,DF as dD,nY as dE,sY as dF,cF as dG,$H as dH,rF as dI,lF as dJ,oF as dK,aY as dL,I8 as dM,UF as dN,IF as dO,$F as dP,GF as dQ,wH as dR,yi as dS,fa as dT,kH as dU,iI as dV,lY as dW,uY as dX,cY as dY,J$ as dZ,pY as d_,xf as da,tZ as db,nZ as dc,uI as dd,yQ as de,bQ as df,zQ as dg,KQ as dh,HQ as di,_f as dj,Nd as dk,kf as dl,W$ as dm,eF as dn,ar as dp,Qv as dq,mF as dr,fF as ds,yF as dt,bF as du,pF as dv,gF as dw,vF as dx,uF as dy,iY as dz,YZ as e,SH as e0,vY as e1,xY as e2,kY as e3,dY as e4,mY as e5,xH as e6,fY as e7,bY as e8,hY as e9,yY as ea,ir as eb,jH as ec,gY as ed,p9 as ee,CH as ef,AH as eg,ua as f,FZ as g,ix as h,se as i,oI as j,mn as k,Ft as l,ZZ as m,JZ as n,XZ as o,aF as p,sF as q,iF as r,NH as s,tV as t,wf as u,ha as v,NY as w,_Y as x,Lh as y,_F as z};
|
|
86
|
+
competitor2.com`,value:kr,onChange:U=>ps(U.target.value)})]}),Qa?c.jsx("p",{className:"text-negative-400 text-sm",children:Qa}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(fe,{type:"button",variant:"outline",onClick:ea,children:"Back"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(fe,{type:"button",variant:"outline",onClick:Ai,children:"Skip"}),c.jsx(fe,{type:"button",disabled:qa.length===0||Fa,onClick:Ft(Bd),children:Fa?"Saving...":`Save ${qa.length} competitor${qa.length!==1?"s":""}`})]})]})]})]});case 4:{const U=Oa.data,Pe=U?.status??(Da===Ke?.id?Ke.status:void 0),yn=Pe==="completed"||Pe==="partial"||Pe==="failed"||Pe==="cancelled",Ba=U?.snapshots??[],lo=Ba.filter(ta=>ta.citationState==="cited").length,sc=Ba.filter(ta=>ta.answerMentioned===!0).length,vs=new Set(Ba.map(ta=>ta.query).filter(ta=>!!ta)).size,xs=Pe?jx(Pe,Ba.length):!1,Ar=Fe&&!Cn,dn=Za??(U?.error?WI(U.error):Pe==="cancelled"?"The sweep was cancelled before it produced a baseline.":(Pe==="completed"||Pe==="partial")&&Ba.length===0?"The sweep finished without producing any snapshots.":Ke?.statusDetail||"The sweep did not produce a baseline.");let Vn=null;return Ar||xs?Vn=c.jsx(pn,{tone:"positive",children:"Complete"}):Za&&!Cn?Vn=c.jsx(pn,{tone:"negative",children:"Failed"}):yn?Vn=c.jsx(pn,{tone:"negative",children:Pe==="cancelled"?"Cancelled":"Failed"}):Cn&&(Vn=c.jsx(pn,{tone:"caution",children:"Running"})),c.jsxs(ua,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:C?"Step 2 of 2":"Step 5 of 5"}),c.jsx("h2",{children:Ps()?"AI Visibility":"Launch first run"})]}),Vn]}),Ar?c.jsxs("div",{className:"compact-stack",children:[c.jsxs("p",{className:"text-secondary",children:["Setup is complete. ",c.jsx("span",{className:"text-strong font-medium",children:Be})," already has a successful answer-visibility baseline."]}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(fe,{type:"button",onClick:ln,children:g?"Finish and open project":"Open project dashboard →"})]})]}):!Cn&&Ps()?c.jsxs("div",{className:"compact-stack",children:[Be?c.jsx(i$,{projectName:Be}):c.jsx("p",{className:"text-sm text-secondary",children:Gh}),Za&&c.jsx("p",{role:"alert",className:"text-sm text-negative",children:Za}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(fe,{type:"button",onClick:ln,children:"Open project dashboard →"})]})]}):Cn?yn?xs?c.jsxs("div",{className:"compact-stack",children:[c.jsxs("p",{className:"text-neutral",children:["Sweep complete. Your first answer-visibility snapshot for"," ",c.jsx("span",{className:"text-heading font-medium",children:Be}),":"]}),c.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-1",children:[c.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[c.jsx("p",{className:"text-xs font-medium text-secondary",children:"Mentioned"}),c.jsxs("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:[sc,c.jsxs("span",{className:"text-faint text-lg",children:[" / ",vs]})]}),c.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"queries naming your brand"})]}),c.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[c.jsx("p",{className:"text-xs font-medium text-secondary",children:"Cited"}),c.jsxs("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:[lo,c.jsxs("span",{className:"text-faint text-lg",children:[" / ",vs]})]}),c.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"queries citing your site"})]}),c.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[c.jsx("p",{className:"text-xs font-medium text-secondary",children:"Results"}),c.jsx("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:Ba.length}),c.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"completed engine checks"})]})]}),c.jsx("p",{className:"mt-1 text-sm text-secondary",children:g?"Your project is ready. Review the evidence in the project.":"Open the project to review the evidence."}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(fe,{type:"button",onClick:ln,children:g?"Finish and open project":"Open project dashboard →"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:[c.jsx("p",{children:dn}),c.jsx("p",{className:"mt-1 text-xs text-secondary",children:Ps()?Gh:v?"Fix provider or query configuration if needed, then retry without leaving setup.":"Ask an administrator to review the provider and query configuration."})]}),c.jsxs("div",{className:"setup-nav",children:[v&&!Ps()?c.jsx(fe,{type:"button",variant:"outline",asChild:!0,children:c.jsx(tt,{to:"/settings",children:"Configure providers"})}):c.jsx("span",{}),Ps()||!v?c.jsx(fe,{type:"button",onClick:ln,children:"Open project dashboard →"}):c.jsx(fe,{type:"button",disabled:hs||!!_n,onClick:Ft(Wn),children:hs?"Retrying...":"Retry visibility sweep"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsx("p",{className:"text-neutral",children:"Sweep running. This usually takes 30 to 60 seconds."}),c.jsx("div",{className:"rounded-md border border-default bg-surface p-3 text-xs text-muted",children:c.jsxs("p",{children:["Status: ",c.jsx("span",{className:"text-neutral",children:Pe??"queued"})]})}),Oa.isError&&c.jsxs("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:[c.jsx("p",{children:Oa.error instanceof Error?Oa.error.message:"Could not refresh the sweep status."}),c.jsx(fe,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>{Oa.refetch()},children:"Retry status check"})]}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(fe,{type:"button",variant:"outline",onClick:ln,children:g?"Finish and open project":"Watch on project page"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("p",{className:"supporting-copy",children:["Your queries are saved. Run a first sweep to get a baseline for"," ",c.jsx("span",{className:"text-heading font-medium",children:Be}),", or finish and run it later from the project. A sweep calls the answer engines, so it costs provider usage."]}),(_n||Za)&&c.jsxs("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:[c.jsx("p",{children:Za??_n}),c.jsx("p",{className:"mt-1 text-xs text-secondary",children:"Resolve the blocker above, then retry the sweep here."})]}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(fe,{type:"button",variant:"outline",onClick:ea,children:"Back"}),c.jsx(fe,{type:"button",variant:"ghost",onClick:ln,children:"Finish without running"}),In==="no_provider"&&!C?c.jsx(fe,{type:"button",asChild:!0,children:c.jsx(tt,{to:"/settings",children:"Configure a provider"})}):c.jsx(fe,{type:"button",disabled:hs||!!_n,title:_n,onClick:Ft(Wn),children:hs?"Launching...":Za?"Retry visibility sweep":"Launch visibility sweep"})]})]})]})}default:return null}})();return c.jsxs("div",{className:C?"page-container visibility-setup":"page-container",children:[g?c.jsx(ir,{current:"visibility"}):null,c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{ref:u?f:void 0,tabIndex:u?-1:void 0,className:"page-title",children:u?"Set up AI Visibility":"Setup"}),c.jsx("p",{className:"page-subtitle",children:u?"Connect an answer engine, then choose queries for your first sweep.":"Create a project and run its first visibility check."})]}),g?c.jsx("div",{className:"page-header-right",children:c.jsx(fe,{type:"button",variant:"outline",className:"min-h-11",onClick:ln,children:"Skip AI Visibility"})}):null]}),g?null:c.jsx(iK,{current:C?be===4?1:0:be,labels:C?nK:tK}),c.jsxs("section",{className:"setup-wizard",children:[bs,xa]})]})}const rK=T.lazy(async()=>({default:(await yi(()=>import("./SiteHealthSection-mjpxy6N9.js").then(a=>a.d),__vite__mapDeps([0,1,2,3,4]),import.meta.url)).SiteHealthSection})),lK=1800,cK="https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent",uK="Help me set up Canonry for my public site.\n\nUse Canonry's official docs:\n- Agent quickstart: https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent\n- CLI reference: https://github.com/Canonry/canonry/blob/main/skills/canonry/references/canonry-cli.md\n- Plugin setup: https://github.com/Canonry/canonry/blob/main/docs/plugins.md\n- MCP setup: https://github.com/Canonry/canonry/blob/main/docs/mcp.md\n\nUse an existing Canonry installation or connected plugin/MCP if one is already available. Do not create a duplicate. The `cnry` and `canonry` commands are interchangeable.\n\n1. Ask for my public domain, country, and language. Do not create or scan anything yet.\n2. Check the local setup with `command -v cnry`, `cnry --version`, `cnry doctor --format json`, and `cnry project list --format json`. If Canonry is missing, propose `npm install -g @canonry/canonry` and wait for approval. If initialization is required, tell me to run `cnry bootstrap` in my private terminal and wait. Never ask me to paste passwords, API keys, OAuth credentials, or `cnry bootstrap` output.\n3. Show the normalized domain, proposed project name, exact `cnry project create ...` command, and wait for explicit approval before creating it.\n4. Propose a bounded Site Health scan, including `--max-pages` and whether dead-link checking is enabled. Show the exact `cnry technical-aeo run ... --wait --format json` command and wait for separate approval before scanning.\n5. After the crawl, summarize the findings and propose AI Visibility setup. Ask before adding queries, connecting providers, starting any provider-backed or quota-consuming run, editing files, or publishing.";function dK(e,a){return e==="legacy"?"legacy":e==="platform"?"platform":a.state==="success"?a.projectCount===0?"platform":"legacy":a.state==="error"?"retry":"loading"}const C3=[{value:"US",label:"United States"},{value:"CA",label:"Canada"},{value:"GB",label:"United Kingdom"},{value:"AU",label:"Australia"},{value:"NZ",label:"New Zealand"},{value:"IE",label:"Ireland"},{value:"DE",label:"Germany"},{value:"FR",label:"France"},{value:"ES",label:"Spain"},{value:"IT",label:"Italy"},{value:"NL",label:"Netherlands"},{value:"BR",label:"Brazil"},{value:"MX",label:"Mexico"},{value:"IN",label:"India"},{value:"SG",label:"Singapore"},{value:"JP",label:"Japan"}],N3=[{value:"en",label:"English"},{value:"es",label:"Spanish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"it",label:"Italian"},{value:"pt",label:"Portuguese"},{value:"nl",label:"Dutch"},{value:"ja",label:"Japanese"}];function mK(e,a){try{const s=new Intl.DisplayNames(["en"],{type:"region"}),r=new Intl.DisplayNames(["en"],{type:"language"}),u=e.length===2?s.of(e.toUpperCase()):void 0,f=a?r.of(a.toLowerCase()):void 0;return`${u??(e||"Country")} · ${f??(a||"Language")}`}catch{return`${e||"Country"} · ${a||"Language"}`}}function pK(e,a){const s=e.trim().toUpperCase(),r=a.trim().toLowerCase();return{countryValid:C3.some(u=>u.value===s),languageValid:N3.some(u=>u.value===r)}}function hK(e){const a=e.replace(/^\[|\]$/g,"");return/^(?:\d{1,3}\.){3}\d{1,3}$/.test(a)||a.includes(":")}function fK(e){const a=e.trim();if(!a)return null;const s=/^[a-z][a-z\d+.-]*:\/\//i.test(a)?a:`https://${a}`;let r;try{r=new URL(s)}catch{return null}if(r.protocol!=="http:"&&r.protocol!=="https:")return null;const u=r.hostname.toLowerCase().replace(/^www\./,"");if(!u||u==="localhost"||hK(u)||!u.includes("."))return null;const f=u.replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return f?{canonicalDomain:u,projectName:f,displayName:u}:null}async function gK(e,a=lK){let s;const r=new Promise(f=>{s=setTimeout(()=>f({state:"timed-out"}),a)}),u=await Promise.race([e.then(f=>({state:"queued",run:f})),r]);return s&&clearTimeout(s),u}function yK(e,a){e.catch(()=>{rn({title:"Site Health scan did not start",detail:"The project is safe. Choose Run scan in Site Health to retry.",tone:"negative",dedupeKey:`site-health-dispatch:${a}`})})}function _3(e){const a=T.useRef(v3()).current,s=T.useRef(new Set),r=T.useCallback((u,f)=>{if(f){if(s.current.has(f))return;s.current.add(f)}TS({...u,surface:e,eventId:x3()})},[e]);return{onboardingSessionId:a,emit:r}}function Nx(e,a){return e instanceof fn&&e.statusCode===409?"A project with this name already exists. Change the project name, or open the existing project.":e instanceof Error&&e.message?e.message:a}function bK(){return c.jsxs("div",{className:"page-container max-w-3xl","aria-busy":"true","aria-live":"polite",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Preparing setup"}),c.jsx("p",{className:"page-subtitle",children:"Checking the projects already on this install."})]})}),c.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-default bg-surface p-4 text-sm text-secondary",role:"status",children:[c.jsx(Zo,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading projects…"]})]})}function vK({onRetry:e}){return c.jsxs("div",{className:"page-container max-w-3xl",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Can’t load projects"}),c.jsx("p",{className:"page-subtitle",children:"Canonry could not confirm whether this install already has a project."})]})}),c.jsxs("div",{className:"rounded-lg border border-negative bg-negative-soft p-4",role:"alert",tabIndex:-1,children:[c.jsx("p",{className:"text-sm font-medium text-heading",children:"Setup is paused to protect existing projects."}),c.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Check the connection or sign in again, then retry."}),c.jsx(fe,{type:"button",className:"mt-4",variant:"secondary",onClick:e,children:"Retry project check"})]})]})}function xK({projectName:e,initialRunId:a}){return c.jsx(_f,{title:"Site Health setup",children:c.jsx(kK,{projectName:e,initialRunId:a})})}function kK({projectName:e,initialRunId:a}){const s=Hs(),r=Et({...Zs({client:se}),enabled:!!e,retry:!1,refetchOnMount:"always"}),{onboardingSessionId:u,emit:f}=_3("site_health");T.useEffect(()=>{e&&f({flowVersion:st,onboardingSessionId:u,event:"onboarding.started",step:"run",resumed:!!a},"onboarding.started")},[f,a,u,e]),T.useEffect(()=>{!e||!a||S3(e)?.runId!==a&&w3(e,a)},[a,e]);const b=Et({...gf({client:se,path:{id:a??""}}),enabled:!!a,refetchInterval:({state:C})=>{const E=C.data?.status;return E==="completed"||E==="partial"||E==="failed"||E==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}).data?.status;if(T.useEffect(()=>{if(!e||!a||!b)return;if(b==="completed"||b==="partial"){f({flowVersion:st,onboardingSessionId:u,event:"onboarding.step_completed",step:"run",method:"automatic"},"onboarding.step_completed:run"),Fu(a);return}if(b!=="failed"&&b!=="cancelled")return;const C=b==="cancelled"?"run_cancelled":"run_failed";f({flowVersion:st,onboardingSessionId:u,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:C},`onboarding.blocked:run:${C}`),Fu(a)},[f,a,u,e,b]),!e)return c.jsxs("div",{className:"page-container max-w-3xl",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Project not found"}),c.jsx("p",{className:"page-subtitle",children:"This setup link does not identify a project."})]})}),c.jsx(fe,{type:"button",variant:"secondary",onClick:()=>{s({to:"/projects"})},children:"View projects"})]});if(r.isPending)return c.jsxs("div",{className:"page-container max-w-3xl","aria-busy":"true","aria-live":"polite",children:[c.jsx(ir,{current:"site"}),c.jsxs("div",{className:"mt-8 flex items-center gap-3 text-sm text-secondary",role:"status",children:[c.jsx(Zo,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading Site Health setup…"]})]});if(r.isError)return c.jsxs("div",{className:"page-container max-w-3xl",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Can’t resume setup"}),c.jsx("p",{className:"page-subtitle",children:"Canonry could not load the project for this Site Health scan."})]})}),c.jsxs("div",{className:"rounded-lg border border-negative bg-negative-soft p-4",role:"alert",children:[c.jsx("p",{className:"text-sm text-secondary",children:"Check the connection or sign in again, then retry."}),c.jsx(fe,{type:"button",className:"mt-4",variant:"secondary",onClick:()=>{r.refetch()},children:"Retry project check"})]})]});const v=r.data.find(C=>C.name===e);if(!v)return c.jsxs("div",{className:"page-container max-w-3xl",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Project not found"}),c.jsxs("p",{className:"page-subtitle",children:["Canonry could not find ",e,". It will not open a different project."]})]})}),c.jsx(fe,{type:"button",variant:"secondary",onClick:()=>{s({to:"/projects"})},children:"View projects"})]});const k=()=>{s({to:"/setup",search:{onboarding:"site-health",setupProject:v.name},replace:!0})},S=()=>{s({to:"/setup",search:{experience:"legacy",onboarding:"site-health",setupProject:v.name},replace:!0})},A=()=>{f({flowVersion:st,onboardingSessionId:u,event:"onboarding.step_completed",step:"run",method:"skipped"},"onboarding.step_completed:run"),s({to:"/projects/$projectName/technical-aeo",params:{projectName:v.name},replace:!0})};return c.jsxs("div",{className:"page-container max-w-7xl py-8 md:py-10",children:[c.jsx("h1",{className:"sr-only",children:"Set up Canonry"}),c.jsx(T.Suspense,{fallback:c.jsxs("div",{className:"space-y-5",children:[c.jsx(ir,{current:"site"}),c.jsxs("div",{className:"flex min-h-72 items-center justify-center gap-3 text-sm text-secondary",role:"status",children:[c.jsx(Zo,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading Site Health…"]})]}),children:c.jsx(rK,{projectName:v.name,projectId:v.id,initialRunId:a,onReleaseInitialRun:k,showOnboardingActions:!0,onContinueOnboarding:S,onSkipOnboarding:A})})]})}function wK(){const e=zx({from:"/setup"}),a=e.onboarding==="site-health"&&!e.setupProject,s=e.onboarding==="site-health"&&e.experience!=="legacy",r=JM(),u=e.experience==="legacy"?"legacy":e.experience==="platform"?"platform":r,[f,g]=T.useState(!1),b=Et({...Zs({client:se}),enabled:u==="auto",retry:!1,refetchOnMount:"always"}),v=u==="auto"&&b.isSuccess&&b.isFetchedAfterMount&&b.data.length===0;T.useEffect(()=>{v&&g(!0)},[v]);const k=u!=="auto"?{state:"idle"}:b.isSuccess&&b.isFetchedAfterMount?{state:"success",projectCount:b.data.length}:b.isError?{state:"error"}:{state:"loading"},S=u==="legacy"?"legacy":f||v?"platform":dK(u,k);return a||s?c.jsx(xK,{projectName:e.setupProject,initialRunId:e.siteHealthRunId}):S==="legacy"?c.jsx(sK,{visibilityProjectName:e.setupProject,siteHealthOnboarding:e.onboarding==="site-health"}):S==="loading"?c.jsx(bK,{}):S==="retry"?c.jsx(vK,{onRetry:()=>{b.refetch()}}):c.jsx(SK,{onActivationStarted:()=>g(!0),skipSiteScan:e.siteScan==="skip"})}function SK({onActivationStarted:e,skipSiteScan:a}){return c.jsx(_f,{title:"Site Health setup",children:c.jsx(jK,{onActivationStarted:e,skipSiteScan:a})})}function jK({onActivationStarted:e,skipSiteScan:a}){const s=Hs(),r=da(),u=J$(),f=Et({...PV({client:se}),retry:!1}),g=ns(MV()),[b,v]=T.useState(""),[k,S]=T.useState(""),[A,C]=T.useState(""),[E,Z]=T.useState("US"),[_,G]=T.useState("en"),[K,te]=T.useState(!1),[Q,re]=T.useState("idle"),[W,oe]=T.useState(null),[H,$]=T.useState(null),[Te,Ke]=T.useState(!1),[Fe,Re]=T.useState(null),[ve,Ue]=T.useState(!1),be=f.data,P=typeof be?.enabled=="boolean"?be.enabled:null,ae=g.isPending?g.variables.body.enabled:P,[he,je]=T.useState(null),X=T.useRef(null),{onboardingSessionId:Ie,emit:Ne}=_3("platform");T.useEffect(()=>{Ne({flowVersion:st,onboardingSessionId:Ie,event:"onboarding.started",step:"project",resumed:!1},"onboarding.started")},[Ne,Ie]);const Ae=fK(b),ne=k||Ae?.projectName||"",V=A||Ae?.displayName||"",q=Q==="creating"||Q==="dispatching",le=H??Fe,De=mK(E,_),{countryValid:ye,languageValid:Je}=pK(E,_),Ge=ye&&Je;T.useEffect(()=>{le&&X.current?.focus()},[le]);const Be=(Ve,ut)=>s({to:"/setup",search:{...ut?{siteHealthRunId:ut}:{},onboarding:"site-health",setupProject:Ve.name},replace:!0}),de=async Ve=>{re("dispatching"),Re(null);try{const ut=u.mutateAsync({projectName:Ve.name,projectId:Ve.id,projectLabel:Ve.displayName||Ve.name,suppressErrorToast:!0,body:{checkDeadLinks:!0}}),Jt=await gK(ut);if(Jt.state==="queued"){Ne({flowVersion:st,onboardingSessionId:Ie,event:"run.requested",origin:"dashboard_setup",result:"queued",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0"}),await Be(Ve,Jt.run.runId);return}ut.then(()=>{Ne({flowVersion:st,onboardingSessionId:Ie,event:"run.requested",origin:"dashboard_setup",result:"queued",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0"})},us=>{Ne({flowVersion:st,onboardingSessionId:Ie,event:"run.requested",origin:"dashboard_setup",result:"rejected",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0",reasonCode:jl(us,"run_rejected")})}),yK(ut,Ve.id),await Be(Ve)}catch(ut){re("recovery"),Re(Nx(ut,"The project was created, but the Site Health scan could not be started."));const Jt=jl(ut,"run_rejected");Ne({flowVersion:st,onboardingSessionId:Ie,event:"run.requested",origin:"dashboard_setup",result:"rejected",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0",reasonCode:Jt}),Ne({flowVersion:st,onboardingSessionId:Ie,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:Jt},`onboarding.blocked:run:${Jt}`)}},Me=async Ve=>{if(Ve.preventDefault(),!(!Ae||!a&&!K||!Ge||q)){re("creating"),$(null),Ke(!1),Re(null);try{const ut=await bI({name:ne,displayName:V,canonicalDomain:Ae.canonicalDomain,country:E,language:_});if(e(),oe(ut),Ne({flowVersion:st,onboardingSessionId:Ie,event:"onboarding.step_completed",step:"project",method:"manual"},"onboarding.step_completed:project"),await r.invalidateQueries({queryKey:ts({client:se})}),a){await s({to:"/setup",search:{experience:"legacy",onboarding:"first-run",setupProject:ut.name},replace:!0});return}await de(ut)}catch(ut){re("idle");const Jt=ut instanceof fn&&ut.statusCode===409;Ke(Jt),$(Nx(ut,"Could not create the project. Try again.")),Ne({flowVersion:st,onboardingSessionId:Ie,event:"onboarding.blocked",step:"project",action:"save",reasonCode:jl(ut,"project_create_failed")},"onboarding.blocked:project"),Jt&&(e(),r.invalidateQueries({queryKey:ts({client:se})}))}}},$t=()=>{W&&!q&&de(W)},Sn=()=>{q||s({to:"/projects"})},ga=async()=>{try{await navigator.clipboard.writeText(uK),Ue(!0)}catch{rn({tone:"negative",title:"Could not copy setup request",detail:"Open the agent quickstart to continue with the CLI instead."})}},ln=async Ve=>{je(null);try{const ut=await g.mutateAsync({client:se,body:{enabled:Ve}});r.setQueryData(IS({client:se}),ut),ut.enabled!==Ve&&je(`The server kept telemetry ${ut.enabled?"on":"off"}. Check its telemetry settings.`)}catch{je("Could not update telemetry. Try again.")}};return W&&Q==="recovery"?c.jsxs("div",{className:"page-container max-w-3xl",children:[c.jsx(ir,{current:"site"}),c.jsx("div",{className:"page-header mt-8",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Project created"}),c.jsxs("p",{className:"page-subtitle",children:[W.displayName||W.name," is ready. The Site Health scan needs another try."]})]})}),c.jsxs("div",{ref:X,className:"rounded-lg border border-negative bg-negative-soft p-4",role:"alert",tabIndex:-1,children:[c.jsx("p",{className:"text-sm font-medium text-heading",children:Fe}),c.jsx("p",{className:"mt-1 text-sm text-secondary",children:"You can retry the scan or continue setup and retry from Site Health."}),c.jsxs("div",{className:"mt-4 flex flex-wrap gap-3",children:[c.jsx(fe,{type:"button",onClick:$t,children:"Retry Site Health scan"}),c.jsx(fe,{type:"button",variant:"secondary",onClick:()=>{Be(W)},children:"Continue setup"})]})]})]}):c.jsxs("div",{className:"page-container max-w-xl py-8 md:py-12",children:[a?null:c.jsx(ir,{current:"site"}),c.jsxs("header",{className:`mb-8 ${a?"":"mt-8"}`,children:[c.jsx("h1",{id:"site-map-setup-title",className:"text-2xl font-semibold tracking-[-0.025em] text-heading",children:a?"Create a project":"Map your site"}),c.jsx("p",{className:"mt-2 max-w-lg text-sm leading-6 text-secondary",children:a?"Add a public domain, then choose the queries you want to track. No site scan will run.":"Enter your public website to see its pages, structure, internal links, and technical SEO scores."})]}),c.jsxs("form",{"aria-labelledby":"site-map-setup-title",className:"space-y-6",onSubmit:Ft(Me),noValidate:!0,children:[c.jsxs("div",{className:"grid gap-2",children:[c.jsx("label",{className:"text-sm font-medium text-heading",htmlFor:"launchpad-domain",children:"Website URL"}),c.jsx("input",{id:"launchpad-domain",className:"h-11 w-full rounded-md border border-strong bg-bg-elevated/50 px-3 text-base text-heading outline-none transition placeholder:text-muted focus:border-mono-500 focus:ring-1 focus:ring-mono-500",type:"text",inputMode:"url",autoComplete:"url",autoCapitalize:"none",spellCheck:!1,required:!0,"aria-invalid":!!(b&&!Ae),"aria-describedby":b&&!Ae?"launchpad-domain-hint launchpad-domain-error":"launchpad-domain-hint",placeholder:"https://example.com",value:b,onChange:Ve=>{v(Ve.target.value),$(null),Ke(!1)}}),c.jsx("p",{id:"launchpad-domain-hint",className:"text-sm text-secondary",children:a?c.jsxs(c.Fragment,{children:["A public domain is still required."," ",c.jsx(tt,{to:"/setup",search:{experience:"platform"},className:"font-medium text-link underline-offset-4 hover:underline",children:"Map with Site Health instead"})]}):c.jsxs(c.Fragment,{children:["Only public pages are scanned."," ",c.jsx(tt,{to:"/setup",search:{experience:"platform",onboarding:"first-run",siteScan:"skip"},className:"font-medium text-link underline-offset-4 hover:underline",children:"Set up without a site scan"})]})}),b&&!Ae?c.jsx("p",{id:"launchpad-domain-error",className:"text-sm text-negative",role:"alert",children:"Enter a public domain, such as example.com."}):null]}),c.jsxs("details",{className:"group border-y border-default",children:[c.jsxs("summary",{className:"flex min-h-11 cursor-pointer list-none items-center justify-between gap-4 py-3 text-sm [&::-webkit-details-marker]:hidden",children:[c.jsx("span",{className:"font-medium text-heading",children:"Advanced settings"}),c.jsxs("span",{className:"flex items-center gap-2 text-secondary",children:[De,c.jsx(Zh,{className:"size-4 transition-transform group-open:rotate-180 motion-reduce:transition-none","aria-hidden":"true"})]})]}),c.jsxs("div",{className:"space-y-5 border-t border-default py-4",children:[Ae?c.jsxs("div",{children:[c.jsx("p",{className:"mb-3 text-sm font-medium text-heading",children:"Project"}),c.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[c.jsxs("div",{className:"grid gap-2",children:[c.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-project-name",children:"Project name"}),c.jsx("input",{id:"launchpad-project-name",className:"setup-input h-10",type:"text",value:ne,onChange:Ve=>S(Ve.target.value)})]}),c.jsxs("div",{className:"grid gap-2",children:[c.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-display-name",children:"Display name"}),c.jsx("input",{id:"launchpad-display-name",className:"setup-input h-10",type:"text",value:V,onChange:Ve=>C(Ve.target.value)})]})]})]}):null,c.jsxs("div",{children:[c.jsx("p",{className:"mb-3 text-sm font-medium text-heading",children:"Locale"}),c.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[c.jsxs("div",{className:"grid gap-2",children:[c.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-country",children:"Country"}),c.jsx("select",{id:"launchpad-country",className:"setup-input h-10",value:E,onChange:Ve=>Z(Ve.target.value),children:C3.map(Ve=>c.jsx("option",{value:Ve.value,children:Ve.label},Ve.value))})]}),c.jsxs("div",{className:"grid gap-2",children:[c.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-language",children:"Language"}),c.jsx("select",{id:"launchpad-language",className:"setup-input h-10",value:_,onChange:Ve=>G(Ve.target.value),children:N3.map(Ve=>c.jsx("option",{value:Ve.value,children:Ve.label},Ve.value))})]})]})]})]})]}),a?null:c.jsxs("label",{className:"flex min-h-11 cursor-pointer items-start gap-3 py-2",children:[c.jsx("input",{className:"mt-0.5 size-4 shrink-0 rounded border-strong bg-bg",type:"checkbox",checked:K,onChange:Ve=>te(Ve.target.checked),"aria-label":"Allow Canonry to scan this public site.","aria-describedby":"local-crawl-note"}),c.jsxs("span",{className:"grid gap-0.5",children:[c.jsx("span",{className:"text-sm leading-5 text-heading",children:"Allow Canonry to scan this public site."}),c.jsx("span",{id:"local-crawl-note",className:"text-sm leading-5 text-secondary",children:"The crawl runs on this Canonry instance, follows internal links, and stores its results locally."})]})]}),le?c.jsxs("div",{ref:X,className:"rounded-md border border-negative bg-negative-soft p-3",role:"alert",tabIndex:-1,children:[c.jsx("p",{className:"text-sm font-medium text-heading",children:le}),Te?c.jsx(fe,{type:"button",variant:"secondary",size:"sm",className:"mt-3",onClick:Sn,children:"View projects"}):null]}):null,c.jsxs("div",{className:"grid gap-2",children:[c.jsx(fe,{className:"h-11 w-full",type:"submit",disabled:!Ae||!a&&!K||!Ge||q,children:Q==="creating"||Q==="dispatching"?c.jsxs(c.Fragment,{children:[c.jsx(Zo,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"})," ",a?"Creating project…":"Mapping site…"]}):a?"Create project":"Map site"}),Q==="dispatching"?c.jsx("span",{className:"text-center text-sm text-secondary",role:"status",children:"Opening Site Health when the scan is ready."}):null]})]}),c.jsxs("section",{className:"mt-8 border-t border-default pt-6","aria-labelledby":"agent-setup-title",children:[c.jsx("p",{id:"agent-setup-title",className:"text-sm font-medium text-heading",children:"Use your agent instead"}),c.jsx("p",{className:"mt-1 text-sm leading-5 text-secondary",children:"Copy a complete CLI setup request into any coding agent."}),c.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-1",children:[c.jsxs(fe,{type:"button",variant:"ghost",size:"sm",className:"-ml-3",onClick:Ft(ga),children:[ve?c.jsx(Yh,{className:"size-3.5","aria-hidden":"true"}):c.jsx(Ix,{className:"size-3.5","aria-hidden":"true"}),c.jsx("span",{"aria-live":"polite",children:ve?"Copied setup request":"Copy setup request"})]}),c.jsx(fe,{asChild:!0,variant:"ghost",size:"sm",children:c.jsxs("a",{href:cK,target:"_blank",rel:"noopener noreferrer",children:["Agent quickstart",c.jsx(uA,{className:"size-3.5","aria-hidden":"true"}),c.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]})})]})]}),P!==null?c.jsxs("section",{className:"mt-6 border-t border-default pt-5","aria-labelledby":"telemetry-title",children:[c.jsxs("label",{className:`flex min-h-11 items-start gap-3 py-2 ${g.isPending?"cursor-wait":"cursor-pointer"}`,children:[c.jsx("input",{className:"mt-0.5 size-4 shrink-0 rounded border-strong bg-bg accent-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-mono-500 disabled:cursor-wait",type:"checkbox",checked:ae??!1,disabled:g.isPending,onChange:Ve=>{ln(Ve.target.checked)},"aria-describedby":"telemetry-detail"}),c.jsxs("span",{className:"grid gap-0.5",children:[c.jsx("span",{id:"telemetry-title",className:"text-sm leading-5 text-heading",children:"Share anonymous product telemetry"}),c.jsx("span",{id:"telemetry-detail",className:"max-w-[70ch] text-sm leading-5 text-secondary",children:"Helps prioritize improvements. Canonry does not send raw domains, URLs, queries, answer content, or credentials."})]})]}),g.isPending?c.jsx("p",{className:"mt-1 text-sm text-secondary",role:"status",children:"Saving preference…"}):null,he?c.jsx("p",{className:"mt-1 text-sm text-negative",role:"alert",children:he}):null]}):null]})}function AK(){return c.jsx("div",{className:"page-container",children:c.jsx("section",{className:"page-section",children:c.jsxs(ua,{className:"surface-card empty-card",children:[c.jsx("h1",{children:"Route not found"}),c.jsx("p",{children:"The current path does not map to a dashboard view."}),c.jsx(fe,{asChild:!0,children:c.jsx(tt,{to:"/",children:"Return to overview"})})]})})})}const Yn=as(()=>yi(()=>import("./ProjectPage-Cxrd8lZM.js"),__vite__mapDeps([5,1,2,6,0,3,4,7,8,9,10,11,12]),import.meta.url),"ProjectPage"),CK=as(()=>yi(()=>import("./RunsPage-B73hjh_l.js"),__vite__mapDeps([13,1,6,11,4,2,9,12]),import.meta.url),"RunsPage"),NK=as(()=>yi(()=>import("./HistoryPage-D-l4jMt5.js"),__vite__mapDeps([14,1,10,11,4,2,9,12]),import.meta.url),"HistoryPage"),_K=as(()=>yi(()=>import("./SettingsPage-Ba30Jfnn.js"),__vite__mapDeps([15,1,11,4,2,9,12]),import.meta.url),"SettingsPage"),zK=as(()=>yi(()=>import("./BacklinksPage-CE_-DKWO.js"),__vite__mapDeps([16,1,2,11,4,9,12]),import.meta.url),"BacklinksPage"),EK=as(()=>yi(()=>import("./TrafficPage-BZ8H_c8u.js"),__vite__mapDeps([17,1,7,2,11,4,9,12]),import.meta.url),"TrafficPage"),TK=as(()=>yi(()=>import("./TrafficSourceDetailPage-sCUyzPpH.js"),__vite__mapDeps([18,1,7,3,4,2,11,9,12]),import.meta.url),"TrafficSourceDetailPage"),RK=as(()=>yi(()=>import("./MeasurementPropertyPage-fCJm3sW6.js"),__vite__mapDeps([19,1,3,4,8,9,2,11,12]),import.meta.url),"MeasurementPropertyPage");function DK(){return c.jsx(E$,{children:c.jsx(z$,{})})}const kn=I4()({component:DK,validateSearch:e=>({manageQueries:e.manageQueries===!0||e.manageQueries==="true"?!0:void 0,runId:typeof e.runId=="string"?e.runId:void 0,siteHealthRunId:typeof e.siteHealthRunId=="string"?e.siteHealthRunId:void 0,evidenceId:typeof e.evidenceId=="string"?e.evidenceId:void 0,runStatus:typeof e.runStatus=="string"?e.runStatus:void 0,runKind:typeof e.runKind=="string"?e.runKind:void 0,runProject:typeof e.runProject=="string"?e.runProject:void 0,runWindow:typeof e.runWindow=="string"?e.runWindow:void 0,runQuery:typeof e.runQuery=="string"?e.runQuery:void 0,onboarding:e.onboarding==="site-health"||e.onboarding==="first-run"?e.onboarding:void 0,experience:e.experience==="legacy"||e.experience==="platform"?e.experience:void 0,siteScan:e.siteScan==="skip"?"skip":void 0,setupProject:typeof e.setupProject=="string"?e.setupProject:void 0,scope:typeof e.scope=="string"?e.scope:void 0,class:typeof e.class=="string"?e.class:void 0,...Object.fromEntries(["queryWorkspace","researchMode","trackingQueryId","measurementScope","measurementScopeKey","measurementMarketKey","queryClass","measurementProvider","measurementModel","measurementLocation","measurementFrom","measurementTo","measurementRevision","measurementRunId","measurementQueryKey","measurementAnswer"].map(a=>[a,typeof e[a]=="string"?e[a]:void 0]))})}),OK=St({getParentRoute:()=>kn,path:"/",component:q$,beforeLoad:async({context:e})=>{let a=e.queryClient.getQueryData(ts({client:se}));if(a===void 0)try{a=await e.queryClient.ensureQueryData(Zs({client:se}))}catch{return}if(a.length===0)throw Tx({to:"/setup"})}}),qK=St({getParentRoute:()=>kn,path:"/projects",component:I$}),BK=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,wn=St({getParentRoute:()=>kn,path:"/projects/$projectName",component:()=>c.jsx(dh,{}),beforeLoad:async({context:e,params:a,location:s})=>{const r=a.projectName;if(!BK.test(r))return;let u=e.queryClient.getQueryData(ts({client:se}));if(!u)try{u=await e.queryClient.ensureQueryData(Zs({client:se}))}catch{return}const f=u.find(g=>g.id===r);if(f)throw Tx({to:s.pathname.replace(`/projects/${r}`,`/projects/${encodeURIComponent(f.name)}`),replace:!0})}}),PK=St({getParentRoute:()=>wn,path:"/",component:()=>c.jsx(Yn,{tab:"overview"})}),MK=St({getParentRoute:()=>wn,path:"/portfolio",component:()=>c.jsx(Yn,{tab:"portfolio"})}),IK=St({getParentRoute:()=>wn,path:"/search-console",component:()=>c.jsx(Yn,{tab:"search-console"})}),VK=St({getParentRoute:()=>wn,path:"/conversions",component:()=>c.jsx(Yn,{tab:"conversions"})}),LK=St({getParentRoute:()=>wn,path:"/local",component:()=>c.jsx(Yn,{tab:"local"})}),UK=St({getParentRoute:()=>wn,path:"/discovery",component:()=>c.jsx(Yn,{tab:"discovery"})}),GK=St({getParentRoute:()=>wn,path:"/queries",component:()=>c.jsx(Yn,{tab:"queries"})}),$K=St({getParentRoute:()=>wn,path:"/properties/$targetKey",component:()=>c.jsx(RK,{})}),KK=St({getParentRoute:()=>wn,path:"/report",component:()=>c.jsx(Yn,{tab:"report"})}),HK=St({getParentRoute:()=>wn,path:"/activity",component:()=>c.jsx(Yn,{tab:"activity"})}),QK=St({getParentRoute:()=>wn,path:"/backlinks",component:()=>c.jsx(Yn,{tab:"backlinks"})}),FK=St({getParentRoute:()=>wn,path:"/technical-aeo",component:()=>c.jsx(Yn,{tab:"technical-aeo"})}),ZK=St({getParentRoute:()=>wn,path:"/history",component:()=>c.jsx(Yn,{tab:"history"})}),YK=St({getParentRoute:()=>wn,path:"/settings",component:()=>c.jsx(Yn,{tab:"settings"})}),XK=St({getParentRoute:()=>kn,path:"/runs",component:CK}),JK=St({getParentRoute:()=>kn,path:"/history",component:NK}),WK=St({getParentRoute:()=>kn,path:"/settings",component:_K,beforeLoad:({context:e})=>{}}),eH=St({getParentRoute:()=>kn,path:"/setup",component:wK}),tH=St({getParentRoute:()=>kn,path:"/backlinks",component:zK}),nH=St({getParentRoute:()=>kn,path:"/traffic",component:EK}),aH=St({getParentRoute:()=>kn,path:"/traffic/$projectName/$sourceId",component:TK}),iH=St({getParentRoute:()=>kn,path:"*",component:AK}),sH=kn.addChildren([OK,qK,wn.addChildren([PK,MK,IK,VK,LK,UK,GK,$K,KK,HK,QK,FK,ZK,YK]),XK,JK,WK,eH,tH,nH,aH,iH]);function oH(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath:"/"}const _x=oH(),rH=_x==="/"?"":_x.replace(/\/$/,"");function lH(e,a){return V4({routeTree:sH,basepath:rH||"/",context:{queryClient:e},...a?.initialEntries})}const cH=6e4;function uH(){const e=T.useRef(fI()).current,[a,s]=T.useState(e?"ready":"checking"),[r,u]=T.useState(null),[f,g]=T.useState(null),[b,v]=T.useState(e),[k,S]=T.useState(!1),[A,C]=T.useState(""),[E,Z]=T.useState(""),[_,G]=T.useState(""),[K,te]=T.useState(!1),[Q,re]=T.useState("password"),[W,oe]=T.useState(null),[H,$]=T.useState(!1),[Te,Ke]=T.useState(!1),Fe=T.useRef(null),Re=T.useRef(null),ve=T.useRef(null),Ue=()=>{const q=r?`${r.name}:${r.role}`:e?"api-key:explicit":f?`api-key:${f.id}`:"no-accounts";if(!Fe.current||ve.current!==q){Re.current?.clear();const le=ZI();Re.current=le,Fe.current=lH(le),ve.current=q}return{queryClient:Re.current,router:Fe.current}},be=q=>q.authRequired?(S(!0),u(q.user),g(null),v(!1),s(q.user?"ready":"account-login"),!0):!1;T.useEffect(()=>{let q=!1;const le=async(De,ye=!1)=>{try{const Je=await sh();if(q)return;g(Je),v(!1),s("ready")}catch(Je){if(q)return;if(ye&&Je instanceof fn&&Je.statusCode===401)return NI().then(()=>{q||(oe(null),g(null),v(!1),Ke(!0),s("login"))}).catch(Ge=>{q||(oe(Ge instanceof Error?Ge.message:"Could not clear the invalid session"),s(De))});oe(Je instanceof Error?Je.message:"Could not verify API key access"),s(De)}};return e?(le("api-key-error"),()=>{q=!0}):(Promise.allSettled([Vv(),Iv()]).then(([De,ye])=>{if(q||De.status==="fulfilled"&&be(De.value))return;if(ye.status==="rejected"){const Ge=ye.reason;oe(Ge instanceof Error?Ge.message:"Failed to reach the Canonry API"),s("login");return}const Je=ye.value;Je.authenticated?(v(!0),le("api-key-error",!0)):(g(null),v(!1),s(Je.setupRequired?"setup":"login"))}),()=>{q=!0})},[]),T.useEffect(()=>{if(a!=="ready"||e)return;const q=setInterval(()=>{if(k){Vv().then(le=>{le.authRequired&&!le.user&&(Ke(!0),u(null),g(null),s("account-login"))}).catch(()=>{});return}Iv().then(le=>{le.authenticated||(Ke(!0),g(null),s(le.setupRequired?"setup":"login"))}).catch(()=>{})},cH);return Mv(()=>{Ke(!0),u(null),g(null),v(!1),s(k?"account-login":"login")}),()=>{clearInterval(q),Mv(null)}},[a,k,e]);const P=async q=>{if(q.preventDefault(),!E.trim()||E.trim().length<8){oe("Password must be at least 8 characters");return}if(E!==_){oe("Passwords do not match");return}$(!0),oe(null);try{if(!(await jI(E.trim())).authenticated){oe("Setup failed");return}Z(""),G(""),te(!1),Ke(!1),g(null),v(!0),s("checking");try{const De=await sh();g(De),v(!1),s("ready")}catch(De){oe(De instanceof Error?De.message:"Could not verify API key access"),s("api-key-error")}}catch(le){oe(le instanceof fn||le instanceof Error?le.message:"Setup failed")}finally{$(!1)}},ae=q=>{Z(q),oe(null)},he=q=>{G(q),oe(null)},je=async q=>{if(q.preventDefault(),!!E.trim()){$(!0),oe(null);try{if(!(Q==="api-key"?await CI(E.trim()):await AI(E.trim())).authenticated){oe(Q==="api-key"?"Invalid API key":"Incorrect password");return}const De=await sh();g(De),v(!1),Z(""),te(!1),Ke(!1),s("ready")}catch(le){oe(le instanceof fn||le instanceof Error?le.message:"Authentication failed")}finally{$(!1)}}},X=q=>{re(q),Z(""),te(!1),oe(null)},Ie=async q=>{if(q.preventDefault(),!(!A.trim()||!E)){$(!0),oe(null);try{const le=await _I(A.trim(),E);if(!le.user){oe("Incorrect name or password.");return}Z(""),Ke(!1),u(le.user),g(null),v(!1),s("ready")}catch(le){oe(le instanceof fn?le.message:"Incorrect name or password.")}finally{$(!1)}}};if(a==="ready"){const{queryClient:q,router:le}=Ue();return c.jsx(II,{account:r,apiKey:f,apiKeyPending:b,children:c.jsx(L4,{client:q,children:c.jsx(U4,{router:le})})})}const Ne=E.trim(),Ae=E.length>0&&Ne.length<8,ne=_.length>0&&E!==_,V=Ne.length>=8&&E===_;return c.jsx("div",{className:"min-h-screen bg-bg px-4 py-8",children:c.jsxs("div",{className:"mx-auto flex min-h-[calc(100vh-4rem)] max-w-md flex-col items-center justify-center gap-5",children:[c.jsxs("div",{"data-testid":"auth-brand",className:"flex items-center gap-2.5",children:[c.jsx("img",{className:"size-7",src:"./favicon.svg",alt:"","aria-hidden":"true"}),c.jsx("span",{className:"text-lg font-semibold tracking-tight text-heading",children:"Canonry"})]}),c.jsx(ua,{className:"surface-card w-full",children:a==="checking"?c.jsx(Ms,{className:"py-8",children:c.jsx("p",{className:"supporting-copy text-center",children:"Connecting to Canonry…"})}):a==="api-key-error"?c.jsxs(c.Fragment,{children:[c.jsxs(Ko,{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),c.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Could not verify API key access"})]}),c.jsxs(Ms,{className:"space-y-4",children:[c.jsx("p",{className:"supporting-copy",children:W??"Canonry could not verify this session’s access, so the dashboard stayed locked."}),c.jsx(fe,{type:"button",className:"w-full",onClick:()=>{window.location.reload()},children:"Try again"})]})]}):a==="account-login"?c.jsxs(c.Fragment,{children:[c.jsxs(Ko,{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),c.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Sign in to Canonry"})]}),c.jsxs(Ms,{children:[Te?c.jsx("p",{className:"mb-4 rounded-md border border-caution bg-caution-soft px-3 py-2 text-sm text-caution",children:"You were signed out — please sign in again."}):null,c.jsxs("form",{className:"space-y-4",onSubmit:Ft(Ie),children:[c.jsxs("label",{className:"block space-y-1.5",htmlFor:"account-name",children:[c.jsx("span",{className:"text-xs font-medium text-secondary",children:"Name"}),c.jsx("input",{autoFocus:!0,id:"account-name",className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:"text",name:"username",autoComplete:"username",value:A,onChange:q=>{C(q.target.value),oe(null)},"aria-invalid":!!W,"aria-describedby":W?"account-login-error":void 0})]}),c.jsxs("label",{className:"block space-y-1.5",htmlFor:"account-password",children:[c.jsx("span",{className:"text-xs font-medium text-secondary",children:"Password"}),c.jsx("input",{id:"account-password",className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:"password",name:"password",autoComplete:"current-password",value:E,onChange:q=>ae(q.target.value),"aria-invalid":!!W,"aria-describedby":W?"account-login-error":void 0})]}),W?c.jsx("p",{id:"account-login-error",role:"alert",className:"text-sm text-negative-400",children:W}):null,c.jsx(fe,{type:"submit",disabled:H||!A.trim()||!E,children:H?"Signing in…":"Sign in"})]})]})]}):a==="setup"?c.jsxs(c.Fragment,{children:[c.jsxs(Ko,{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"First-time setup"}),c.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Create a dashboard password"}),c.jsx(Hu,{children:"Stored on this Canonry install as a salted, one-way hash. Canonry cannot recover it."})]}),c.jsx(Ms,{children:c.jsxs("form",{className:"space-y-4",onSubmit:Ft(P),children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"block text-xs font-medium text-secondary",htmlFor:"dashboard-password-new",children:"Password"}),c.jsx("input",{autoFocus:!0,id:"dashboard-password-new",className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:K?"text":"password",name:"new-password",autoComplete:"new-password",minLength:8,required:!0,value:E,onChange:q=>ae(q.target.value),"aria-invalid":Ae,"aria-describedby":"dashboard-password-new-help"}),c.jsx("span",{id:"dashboard-password-new-help","aria-live":"polite",className:Ae?"block text-sm text-negative-400":"block text-sm text-secondary",children:Ae?"Enter at least 8 characters.":"Use at least 8 characters."})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"block text-xs font-medium text-secondary",htmlFor:"dashboard-password-confirm",children:"Confirm password"}),c.jsx("input",{id:"dashboard-password-confirm",className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:K?"text":"password",name:"confirm-password",autoComplete:"new-password",minLength:8,required:!0,value:_,onChange:q=>he(q.target.value),"aria-invalid":ne,"aria-describedby":"dashboard-password-confirm-help"}),c.jsx("span",{id:"dashboard-password-confirm-help","aria-live":"polite",className:ne?"block text-sm text-negative-400":"block text-sm text-secondary",children:ne?"Passwords do not match.":"Enter the same password again."})]}),c.jsxs("label",{className:"flex min-h-10 cursor-pointer items-center gap-2 text-sm text-secondary",htmlFor:"dashboard-password-show",children:[c.jsx("input",{id:"dashboard-password-show",type:"checkbox",checked:K,onChange:q=>te(q.target.checked)}),"Show passwords"]}),W?c.jsx("p",{id:"dashboard-password-setup-error",role:"alert",className:"text-sm text-negative-400",children:W}):null,c.jsx(fe,{type:"submit",disabled:H||!V,children:H?"Creating password…":"Create password and continue"})]})})]}):c.jsxs(c.Fragment,{children:[c.jsxs(Ko,{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),c.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Sign in to Canonry"}),c.jsx(Hu,{children:Q==="api-key"?"Enter an API key from this Canonry install. This opens the dashboard with that key’s access and does not change the password.":"Enter your dashboard password to continue."})]}),c.jsxs(Ms,{children:[Te?c.jsx("p",{className:"mb-4 rounded-md border border-caution bg-caution-soft px-3 py-2 text-sm text-caution",children:"Your session expired — please sign in again."}):null,c.jsxs("form",{className:"space-y-4",onSubmit:Ft(je),children:[c.jsxs("label",{className:"block space-y-1.5",htmlFor:"dashboard-password-current",children:[c.jsx("span",{className:"text-xs font-medium text-secondary",children:Q==="api-key"?"Canonry API key":"Password"}),c.jsx("input",{autoFocus:!0,id:"dashboard-password-current",className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:K?"text":"password",name:Q==="api-key"?"apiKey":"password",autoComplete:Q==="api-key"?"off":"current-password",spellCheck:!1,required:!0,value:E,onChange:q=>ae(q.target.value),"aria-invalid":!!W,"aria-describedby":W?"dashboard-password-login-error":void 0})]}),c.jsxs("label",{className:"flex min-h-10 cursor-pointer items-center gap-2 text-sm text-secondary",htmlFor:"dashboard-login-password-show",children:[c.jsx("input",{id:"dashboard-login-password-show",type:"checkbox",checked:K,onChange:q=>te(q.target.checked)}),Q==="api-key"?"Show API key":"Show password"]}),W?c.jsx("p",{id:"dashboard-password-login-error",role:"alert",className:"text-sm text-negative-400",children:W}):null,c.jsx(fe,{type:"submit",disabled:H||!E.trim(),children:H?"Signing in…":"Open dashboard"}),c.jsx(fe,{type:"button",variant:"ghost",onClick:()=>X(Q==="api-key"?"password":"api-key"),children:Q==="api-key"?"Use dashboard password instead":"Forgot password? Use API key"})]})]})]})})]})})}const z3=document.getElementById("root");if(!z3)throw new Error("Expected #root element for web app bootstrap.");yA.createRoot(z3).render(c.jsx(T.StrictMode,{children:c.jsx(uH,{})}));export{NZ as $,CF as A,fe as B,Lu as C,zF as D,_Q as E,CZ as F,AF as G,zZ as H,yl as I,_Z as J,PQ as K,BQ as L,SY as M,QQ as N,rn as O,eG as P,RZ as Q,DZ as R,JI as S,pn as T,UQ as U,OZ as V,GQ as W,IQ as X,LQ as Y,EZ as Z,TZ as _,wY as a,hf as a$,MQ as a0,qZ as a1,UZ as a2,MZ as a3,VZ as a4,IZ as a5,LZ as a6,dF as a7,yf as a8,ze as a9,HI as aA,LF as aB,on as aC,uV as aD,DV as aE,QF as aF,JF as aG,FF as aH,HH as aI,FH as aJ,jO as aK,ZH as aL,kV as aM,HF as aN,CO as aO,Rh as aP,QH as aQ,sI as aR,ZF as aS,KF as aT,SV as aU,YF as aV,AY as aW,XF as aX,oY as aY,rY as aZ,$Q as a_,PZ as aa,GS as ab,gi as ac,BZ as ad,TY as ae,zT as af,ET as ag,vH as ah,bH as ai,hF as aj,xF as ak,kF as al,fn as am,wF as an,vQ as ao,WI as ap,iU as aq,Oh as ar,SF as as,Eu as at,tY as au,s_ as av,Gh as aw,Ps as ax,VQ as ay,yH as az,M9 as b,UH as b$,eY as b0,NV as b1,aZ as b2,sZ as b3,pZ as b4,SZ as b5,wZ as b6,dZ as b7,xZ as b8,AZ as b9,eQ as bA,tQ as bB,oQ as bC,sQ as bD,iQ as bE,nQ as bF,aQ as bG,WH as bH,JH as bI,XH as bJ,YH as bK,eB as bL,OH as bM,EH as bN,TH as bO,RH as bP,qH as bQ,DH as bR,MH as bS,WZ as bT,BH as bU,PH as bV,tF as bW,_H as bX,EY as bY,LH as bZ,IH as b_,rZ as ba,fZ as bb,gZ as bc,yZ as bd,oZ as be,hZ as bf,lZ as bg,bZ as bh,cZ as bi,vZ as bj,mZ as bk,kZ as bl,jZ as bm,Q$ as bn,uZ as bo,ge as bp,gQ as bq,fQ as br,hQ as bs,pQ as bt,uQ as bu,cQ as bv,mQ as bw,dQ as bx,lQ as by,rQ as bz,E2 as c,$Z as c$,GH as c0,zH as c1,VH as c2,CQ as c3,AQ as c4,jQ as c5,nF as c6,BV as c7,iZ as c8,RF as c9,X$ as cA,WF as cB,BF as cC,VF as cD,PF as cE,eZ as cF,jY as cG,MF as cH,xn as cI,yI as cJ,iV as cK,i$ as cL,xQ as cM,xI as cN,kQ as cO,wQ as cP,SQ as cQ,ts as cR,cV as cS,pV as cT,NQ as cU,GZ as cV,RI as cW,JQ as cX,KZ as cY,HZ as cZ,QZ as c_,Kv as ca,EQ as cb,TQ as cc,EF as cd,TF as ce,RQ as cf,DQ as cg,qQ as ch,OQ as ci,$l as cj,Zs as ck,AS as cl,qF as cm,OF as cn,KG as co,tG as cp,r3 as cq,oG as cr,l3 as cs,c3 as ct,hV as cu,Is as cv,Zu as cw,VV as cx,eK as cy,zY as cz,jF as d,e$ as d$,NF as d0,FQ as d1,ZQ as d2,YQ as d3,WQ as d4,XQ as d5,nr as d6,ff as d7,CY as d8,Cd as d9,P$ as dA,KH as dB,nf as dC,DF as dD,nY as dE,sY as dF,cF as dG,$H as dH,rF as dI,lF as dJ,oF as dK,aY as dL,I8 as dM,UF as dN,IF as dO,$F as dP,GF as dQ,wH as dR,yi as dS,fa as dT,kH as dU,iI as dV,lY as dW,uY as dX,cY as dY,J$ as dZ,pY as d_,xf as da,tZ as db,nZ as dc,uI as dd,yQ as de,bQ as df,zQ as dg,KQ as dh,HQ as di,_f as dj,Nd as dk,kf as dl,W$ as dm,eF as dn,ar as dp,Qv as dq,mF as dr,fF as ds,yF as dt,bF as du,pF as dv,gF as dw,vF as dx,uF as dy,iY as dz,YZ as e,SH as e0,vY as e1,xY as e2,kY as e3,dY as e4,mY as e5,xH as e6,fY as e7,bY as e8,hY as e9,yY as ea,ir as eb,jH as ec,gY as ed,p9 as ee,CH as ef,AH as eg,ua as f,FZ as g,ix as h,se as i,oI as j,mn as k,Ft as l,ZZ as m,JZ as n,XZ as o,aF as p,sF as q,iF as r,NH as s,tV as t,wf as u,ha as v,NY as w,_Y as x,Lh as y,_F as z};
|
package/assets/assets/{react-sigma_core.esm.min-gjGMldEz.js → react-sigma_core.esm.min-CgN2Dnvk.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Bt,t as S,r as C}from"./vendor-tanstack-ZXXkndVj.js";import{e as Ht,G as Wt}from"./SiteHealthSection-
|
|
1
|
+
import{g as Bt,t as S,r as C}from"./vendor-tanstack-ZXXkndVj.js";import{e as Ht,G as Wt}from"./SiteHealthSection-mjpxy6N9.js";import"./index-CSktlkUv.js";import"./vendor-radix-twS1M3FF.js";import"./vendor-recharts-D-cUuLZo.js";import"./vendor-lucide-CW2qe0uH.js";import"./vendor-markdown-B-Oq2NYq.js";import"./vendor-yaml-GWJz5H2G.js";import"./ChartPrimitives-Bxa_vFmq.js";function Vt(r,n){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var e=i.call(r,n);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function ae(r){var n=Vt(r,"string");return typeof n=="symbol"?n:n+""}function A(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function He(r,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,ae(e.key),e)}}function L(r,n,i){return n&&He(r.prototype,n),i&&He(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function Q(r){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Q(r)}function yt(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yt=function(){return!!r})()}function jt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Zt(r,n){if(n&&(typeof n=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jt(r)}function I(r,n,i){return n=Q(n),Zt(r,yt()?Reflect.construct(n,i||[],Q(r).constructor):n.apply(r,i))}function xe(r,n){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,e){return i.__proto__=e,i},xe(r,n)}function G(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&xe(r,n)}function qt(r){if(Array.isArray(r))return r}function Yt(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var e,t,a,o,s=[],l=!0,h=!1;try{if(a=(i=i.call(r)).next,n===0){if(Object(i)!==i)return;l=!1}else for(;!(l=(e=a.call(i)).done)&&(s.push(e.value),s.length!==n);l=!0);}catch(u){h=!0,t=u}finally{try{if(!l&&i.return!=null&&(o=i.return(),Object(o)!==o))return}finally{if(h)throw t}}return s}}function Se(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,e=Array(n);i<n;i++)e[i]=r[i];return e}function Tt(r,n){if(r){if(typeof r=="string")return Se(r,n);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Se(r,n):void 0}}function Xt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ee(r,n){return qt(r)||Yt(r,n)||Tt(r,n)||Xt()}var pe={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"},Ct=new Int8Array(4),be=new Int32Array(Ct.buffer,0,1),$t=new Float32Array(Ct.buffer,0,1),Kt=/^\s*rgba?\s*\(/,Jt=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function Qt(r){var n=0,i=0,e=0,t=1;if(r[0]==="#")r.length===4?(n=parseInt(r.charAt(1)+r.charAt(1),16),i=parseInt(r.charAt(2)+r.charAt(2),16),e=parseInt(r.charAt(3)+r.charAt(3),16)):(n=parseInt(r.charAt(1)+r.charAt(2),16),i=parseInt(r.charAt(3)+r.charAt(4),16),e=parseInt(r.charAt(5)+r.charAt(6),16)),r.length===9&&(t=parseInt(r.charAt(7)+r.charAt(8),16)/255);else if(Kt.test(r)){var a=r.match(Jt);a&&(n=+a[1],i=+a[2],e=+a[3],a[4]&&(t=+a[4]))}return{r:n,g:i,b:e,a:t}}var J={};for(var le in pe)J[le]=oe(pe[le]),J[pe[le]]=J[le];function Rt(r,n,i,e,t){return be[0]=e<<24|i<<16|n<<8|r,be[0]=be[0]&4278190079,$t[0]}function oe(r){if(r=r.toLowerCase(),typeof J[r]<"u")return J[r];var n=Qt(r),i=n.r,e=n.g,t=n.b,a=n.a;a=a*255|0;var o=Rt(i,e,t,a);return J[r]=o,o}var Ee={};function _t(r){if(typeof Ee[r]<"u")return Ee[r];var n=(r&16711680)>>>16,i=(r&65280)>>>8,e=r&255,t=255,a=Rt(n,i,e,t);return Ee[r]=a,a}function We(r,n,i,e){return i+(n<<8)+(r<<16)}function Ve(r,n,i,e,t,a){var o=Math.floor(i/a*t),s=Math.floor(r.drawingBufferHeight/a-e/a*t),l=new Uint8Array(4);r.bindFramebuffer(r.FRAMEBUFFER,n),r.readPixels(o,s,1,1,r.RGBA,r.UNSIGNED_BYTE,l);var h=ee(l,4),u=h[0],d=h[1],f=h[2],g=h[3];return[u,d,f,g]}function c(r,n,i){return(n=ae(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function je(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,e)}return i}function b(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?je(Object(i),!0).forEach(function(e){c(r,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):je(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function ei(r,n){for(;!{}.hasOwnProperty.call(r,n)&&(r=Q(r))!==null;);return r}function Ae(){return Ae=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(r,n,i){var e=ei(r,n);if(e){var t=Object.getOwnPropertyDescriptor(e,n);return t.get?t.get.call(arguments.length<3?r:i):t.value}},Ae.apply(null,arguments)}function wt(r,n,i,e){var t=Ae(Q(r.prototype),n,i);return typeof t=="function"?function(a){return t.apply(i,a)}:t}function ti(r){return r.normalized?1:r.size}function ye(r){var n=0;return r.forEach(function(i){return n+=ti(i)}),n}function xt(r,n,i){var e=r==="VERTEX"?n.VERTEX_SHADER:n.FRAGMENT_SHADER,t=n.createShader(e);if(t===null)throw new Error("loadShader: error while creating the shader");n.shaderSource(t,i),n.compileShader(t);var a=n.getShaderParameter(t,n.COMPILE_STATUS);if(!a){var o=n.getShaderInfoLog(t);throw n.deleteShader(t),new Error(`loadShader: error while compiling the shader:
|
|
3
3
|
`.concat(o,`
|
|
4
4
|
`).concat(i))}return t}function ii(r,n){return xt("VERTEX",r,n)}function ri(r,n){return xt("FRAGMENT",r,n)}function ni(r,n){var i=r.createProgram();if(i===null)throw new Error("loadProgram: error while creating the program.");var e,t;for(e=0,t=n.length;e<t;e++)r.attachShader(i,n[e]);r.linkProgram(i);var a=r.getProgramParameter(i,r.LINK_STATUS);if(!a){var o=r.getProgramInfoLog(i);throw r.deleteProgram(i),new Error("loadProgram: error while linking the program: ".concat(o))}return i}function Ze(r){var n=r.gl,i=r.buffer,e=r.program,t=r.vertexShader,a=r.fragmentShader;n.deleteShader(t),n.deleteShader(a),n.deleteProgram(e),n.deleteBuffer(i)}var qe=`#define PICKING_MODE
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,r as C}from"./vendor-tanstack-ZXXkndVj.js";import{y as M,B as A}from"./index-
|
|
1
|
+
import{j as o,r as C}from"./vendor-tanstack-ZXXkndVj.js";import{y as M,B as A}from"./index-CSktlkUv.js";import{M as $}from"./vendor-markdown-B-Oq2NYq.js";const H="Sources",y={copy:"Copy answer",copying:"Copying…",copied:"Copied",failed:"Could not copy. Select and copy the answer above."};function N({headingLevel:e}){return n=>{const r=[],s=i=>{i.type==="heading"&&i.depth&&r.push(i),i.children?.forEach(s)};s(n);const l=r.reduce((i,u)=>Math.min(i,u.depth),6);for(const i of r){const u=i.depth-l;i.depth=Math.min(6,e+u),i.data={...i.data,hProperties:{...i.data?.hProperties,"data-answer-heading-level":u+1}}}}}function R({answer:e}){const[n,r]=C.useState("idle"),s=C.useRef(!1),l=async()=>{if(!s.current){s.current=!0,r("copying");try{await navigator.clipboard.writeText(e),r("copied")}catch{r("failed")}finally{s.current=!1}}};return o.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-3",children:[o.jsx(A,{type:"button",variant:"ghost",className:"min-h-11 px-2","aria-disabled":n==="copying","aria-busy":n==="copying",onClick:()=>{l()},children:n==="copying"?y.copying:y.copy}),o.jsx("span",{role:"status",className:"text-sm text-secondary",children:n==="copied"?y.copied:n==="failed"?y.failed:""})]})}function L({children:e,headingLevel:n=4,copyable:r=!1}){return o.jsxs("div",{className:"answer-markdown",children:[o.jsx($,{remarkPlugins:[[N,{headingLevel:n}]],components:{p:({children:s})=>o.jsx("p",{className:"mb-3 whitespace-pre-wrap last:mb-0",children:s}),ul:({children:s})=>o.jsx("ul",{className:"mb-3 ml-5 list-disc space-y-1",children:s}),ol:({children:s,start:l})=>o.jsx("ol",{start:l,className:"mb-3 ml-5 list-decimal space-y-1",children:s}),pre:({children:s})=>o.jsx("pre",{className:"mb-3 overflow-x-auto whitespace-pre-wrap",children:s}),a:({children:s,href:l})=>{const i=M(l);return i?o.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"text-link underline",children:s}):o.jsx("span",{children:s})},img:({alt:s})=>o.jsx("span",{children:s})},children:e}),r&&e.trim()?o.jsx(R,{answer:e},e):null]})}function F(e){const n=e[0];return n?e.every(r=>r.mode===n.mode&&r.scope.kind===n.scope.kind&&r.scope.key===n.scope.key&&r.queryClass===n.queryClass&&r.measurement.displayedRunId===n.measurement.displayedRunId):!0}function p(e){return e.state==="unavailable"?{numerator:null,denominator:null,reason:e.reason}:e.numerator===void 0||e.denominator===void 0||e.denominator<=0?{numerator:null,denominator:null,reason:"not_applicable"}:{numerator:e.numerator,denominator:e.denominator}}function I(e){return e.kind==="exact"?e.url:e.kind==="prefix"?`https://${e.host}${e.pathPrefix}/*`:`https://${e.host}/*`}function T(e){return e==="assigned"?"this-property":e==="sibling"?"another-property":e==="ownedUnmapped"?"owned-unassigned":e==="external"?"external":e==="ambiguous"?"multiple-properties":"invalid-url"}function _(e){return e==="assigned"?"positive":e==="external"?"neutral":e==="invalid"?"negative":"caution"}function k(e){return`target:${e.targetKey}:${e.queryId}:${e.executionNodeKey}`}function j(e,n,r){const s=new Map;if(!n)return s;const l=new Map(e.usageEdges.map(a=>[k(a),a.targetKey])),i=new Map(e.assignments.map(a=>[`${a.targetKey}:${a.queryId}`,a.queryClass])),u=new Map(e.usageEdges.map(a=>[k(a),i.get(`${a.targetKey}:${a.queryId}`)]));for(const a of n.evidence){if(r&&u.get(a.usageEdgeId)!==r)continue;const c=l.get(a.usageEdgeId);if(!c)continue;const m=s.get(c)??[];m.push({id:`${a.observationId}:${a.expectedSlotId}:${a.usageEdgeId}:${a.sourceUrl}`,kind:T(a.classification),query:a.queryText,provider:a.provider,location:a.location,url:a.sourceUrl,tone:_(a.classification),historical:a.historical||a.bridged}),s.set(c,m)}return s}function B(e){if(e.flags>0)return{label:"Review",tone:"caution"};const n=[e.mentionCoverage,e.citationCoverage].filter(r=>r.state==="unavailable").map(r=>r.reason);return n.includes("no_completed_run")?{label:"Not measured",tone:"neutral"}:n.includes("plan_v1")?{label:"Update setup",tone:"caution"}:n.includes("evidence_incomplete")?{label:"Evidence incomplete",tone:"caution"}:n.includes("no_population")?{label:"No queries",tone:"neutral"}:n.includes("not_applicable")?{label:"Not applicable",tone:"neutral"}:{label:"Complete",tone:"positive"}}function O(e){return e==="complete"?{label:"Complete",tone:"positive"}:e==="partial"?{label:"Partial",tone:"caution"}:e==="queued"?{label:"Queued",tone:"neutral"}:e==="running"?{label:"Running",tone:"neutral"}:e==="failed"?{label:"Failed",tone:"negative"}:{label:"Not measured",tone:"neutral"}}function U(e){if(!e)return"";const n=new Date(e);return Number.isFinite(n.getTime())?n.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}):""}function q(e){const n=e.nextAction.count??e.flags.total;if(e.nextAction.kind==="review_flags")return`${n} flagged ${n===1?"result needs":"results need"} review.`;if(e.nextAction.kind==="complete_setup")return"Finish setup.";if(e.nextAction.kind==="republish_setup")return"Setup update required.";if(e.nextAction.kind==="run_measurement")return"Ready to measure."}function W({overview:e,activePlan:n,report:r,reportState:s=r?"ready":"loading",sort:l}){if(n.plan.schemaVersion!==2||e.mode!=="active-v2")throw new Error("The current overview requires an active version-two setup.");if(e.scope.kind!=="all"&&e.scope.kind!=="group")throw new Error("The current overview requires an All Properties or group scope.");const i=n.plan,u=new Map(i.targets.map(t=>[t.stableKey,t])),a=new Map(i.querySnapshots.map(t=>[t.queryId,t.queryText])),c=new Map;for(const t of i.assignments){if(e.queryClass!=="all"&&t.queryClass!==e.queryClass)continue;const d=a.get(t.queryId);if(!d)continue;const g=c.get(t.targetKey)??new Set;g.add(d),c.set(t.targetKey,g)}const m=r?.revision===n.revision&&r.run?.id===e.measurement.displayedRunId?r:null,K=e.measurement.displayedRunId===void 0||m?"ready":s==="error"||r!=null?"error":"loading",S=j(i,m,e.queryClass==="all"?void 0:e.queryClass),h=new Map;for(const t of i.groups)for(const d of t.targetKeys)h.has(d)||h.set(d,t.label);const x=e.properties.items.map(t=>{const d=u.get(t.targetKey),g=S.get(t.targetKey)??[];return{id:t.targetKey,name:t.label,mentionCoverage:p(t.mentionCoverage),citationCoverage:p(t.citationCoverage),status:B(t),providers:t.providers?.map(f=>({provider:f.provider,mentionCoverage:p(f.mentionCoverage),citationCoverage:p(f.citationCoverage)})),market:h.get(t.targetKey),assignedQueries:[...c.get(t.targetKey)??[]],urls:d?.urlMatchers.map(I)??[],evidence:g,evidenceState:K,historical:g.some(f=>f.historical)}}),b=e.namedShareOfVoice?.entries.map(t=>({name:t.label,coverage:{numerator:t.credits,denominator:e.namedShareOfVoice.denominator}})),E=e.properties.items.flatMap(t=>t.flags>0?[{id:`property:${t.targetKey}`,property:t.label,summary:`${t.flags} ${t.flags===1?"result needs":"results need"} review.`,tone:"caution",count:t.flags}]:[]);return{classReporting:"available",latestMeasurement:{status:O(e.measurement.state),completedSlots:e.measurement.completed,totalSlots:e.measurement.expected,date:U(e.measurement.completedAt),includesBridgedHistory:e.measurement.includesHistoricalData===!0},currentView:{scope:e.scope.kind==="group"?{kind:"group",...e.scope.key?{key:e.scope.key}:{}}:{kind:"all"},queryClass:e.queryClass,aggregate:{metrics:{propertiesMentioned:p(e.metrics.propertiesMentioned),mentionCoverage:p(e.metrics.mentionCoverage),citationCoverage:p(e.metrics.citationCoverage)},properties:x,...b?{shareOfVoice:b}:{}},propertyTotal:e.properties.totalEstimate??x.length,outcomes:e.outcomes,nextCursor:e.properties.nextCursor,...l?{sort:l}:{}},availableGroups:i.groups.map(t=>({id:t.stableKey,label:t.label})),...q(e)?{nextActionText:q(e)}:{},flaggedResultsTotal:e.flags.total,flaggedResults:E}}export{L as A,H as a,F as b,W as c,I as m};
|
package/assets/index.html
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<meta name="theme-color" content="#10141C" />
|
|
7
7
|
<meta
|
|
8
8
|
name="description"
|
|
9
|
-
content="
|
|
9
|
+
content="See how your brand and properties appear in AI answers. Track mentions, citations, and competitors over time."
|
|
10
10
|
/>
|
|
11
11
|
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
|
|
12
12
|
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
|
|
13
13
|
<link rel="apple-touch-icon" href="./apple-touch-icon.png" />
|
|
14
14
|
<title>Canonry</title>
|
|
15
|
-
<script type="module" crossorigin src="./assets/index-
|
|
15
|
+
<script type="module" crossorigin src="./assets/index-CSktlkUv.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-ZXXkndVj.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/vendor-radix-twS1M3FF.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="./assets/vendor-recharts-D-cUuLZo.js">
|
|
@@ -6246,7 +6246,7 @@ function nonBlank(value) {
|
|
|
6246
6246
|
return trimmed ? trimmed : void 0;
|
|
6247
6247
|
}
|
|
6248
6248
|
function resolveBuildCommit(env = process.env) {
|
|
6249
|
-
const embedded = true ? "
|
|
6249
|
+
const embedded = true ? "89d578914ed6cd982efa0707ac03ebc985659656" : void 0;
|
|
6250
6250
|
return nonBlank(embedded) ?? nonBlank(env.CANONRY_COMMIT);
|
|
6251
6251
|
}
|
|
6252
6252
|
function resolveInstanceIdentity(env = process.env) {
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainyc/canonry",
|
|
3
|
-
"version": "4.193.
|
|
3
|
+
"version": "4.193.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Self-hosted AI visibility (AEO) platform: track how ChatGPT, Claude, Gemini, and Perplexity cite your domain, join it with Search Console, GA4, server-side traffic, and paid media, and fix what you find through agent tools (CLI, REST, MCP). Local SQLite.",
|
|
6
6
|
"license": "FSL-1.1-ALv2",
|
|
@@ -71,31 +71,31 @@
|
|
|
71
71
|
"tsup": "^8.5.1",
|
|
72
72
|
"tsx": "^4.19.0",
|
|
73
73
|
"@ainyc/canonry-web": "0.0.0",
|
|
74
|
-
"@ainyc/canonry-contracts": "0.0.0",
|
|
75
|
-
"@ainyc/canonry-config": "0.0.0",
|
|
76
|
-
"@ainyc/canonry-db": "0.0.0",
|
|
77
74
|
"@ainyc/canonry-api-client": "0.0.0",
|
|
75
|
+
"@ainyc/canonry-config": "0.0.0",
|
|
78
76
|
"@ainyc/canonry-api-routes": "0.0.0",
|
|
77
|
+
"@ainyc/canonry-contracts": "0.0.0",
|
|
79
78
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
80
|
-
"@ainyc/canonry-
|
|
81
|
-
"@ainyc/canonry-integration-google": "0.0.0",
|
|
79
|
+
"@ainyc/canonry-db": "0.0.0",
|
|
82
80
|
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
81
|
+
"@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
|
|
83
82
|
"@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
|
|
84
|
-
"@ainyc/canonry-integration-google-ads": "0.0.0",
|
|
85
83
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
84
|
+
"@ainyc/canonry-integration-google": "0.0.0",
|
|
85
|
+
"@ainyc/canonry-integration-google-ads": "0.0.0",
|
|
86
86
|
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
87
|
-
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
88
87
|
"@ainyc/canonry-integration-google-tag-manager": "0.0.0",
|
|
89
88
|
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
90
|
-
"@ainyc/canonry-integration-
|
|
89
|
+
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
91
90
|
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
92
|
-
"@ainyc/canonry-
|
|
91
|
+
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
93
92
|
"@ainyc/canonry-intelligence": "0.0.0",
|
|
93
|
+
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
94
94
|
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
95
|
+
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
95
96
|
"@ainyc/canonry-provider-local": "0.0.0",
|
|
96
|
-
"@ainyc/canonry-provider-
|
|
97
|
-
"@ainyc/canonry-provider-
|
|
98
|
-
"@ainyc/canonry-provider-openai": "0.0.0"
|
|
97
|
+
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
98
|
+
"@ainyc/canonry-provider-perplexity": "0.0.0"
|
|
99
99
|
},
|
|
100
100
|
"scripts": {
|
|
101
101
|
"build": "pnpm run build:cli && pnpm run build:web",
|