@canonry/canonry 7.8.0 → 7.9.1
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-AJlkzSmq.js → AuditHistoryPanel-D0nukTwD.js} +1 -1
- package/assets/assets/{BacklinksPage-IhPtSh39.js → BacklinksPage-B525ij0g.js} +1 -1
- package/assets/assets/{HistoryPage-B-vNinvd.js → HistoryPage-DvupqQDM.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-s1kKo2TD.js → MeasurementPropertyPage-CwDbi1XN.js} +1 -1
- package/assets/assets/{ProjectPage-iH_9g_lU.js → ProjectPage-DmZZ2C7q.js} +1 -1
- package/assets/assets/{RunsPage-BSbEUlNZ.js → RunsPage-DHTvHcGm.js} +1 -1
- package/assets/assets/{SettingsPage-zHyljW2M.js → SettingsPage-BwAFzB7A.js} +1 -1
- package/assets/assets/{SiteHealthSection-AYGPjoka.js → SiteHealthSection-hi54eSIt.js} +3 -3
- package/assets/assets/{TrafficPage-CY_qggoW.js → TrafficPage-BOcXASAM.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-aJ2Vk6Pd.js → TrafficSourceDetailPage-DTq0cN6g.js} +1 -1
- package/assets/assets/{extract-error-message-CHEe8sOP.js → extract-error-message-BOTDI6g5.js} +1 -1
- package/assets/assets/index-BLJfGYUw.js +86 -0
- package/assets/assets/{index-HWSQgVum.css → index-Rcbm8bK1.css} +1 -1
- package/assets/assets/{react-sigma_core.esm.min-2sZRqoN4.js → react-sigma_core.esm.min-BEBdJNtD.js} +1 -1
- package/assets/assets/{v2-overview-adapter-ZNgNU_Yp.js → v2-overview-adapter-BPZ-H3VY.js} +1 -1
- package/assets/index.html +2 -2
- package/dist/{chunk-L35TGPAV.js → chunk-4BKRZGLC.js} +63 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +9 -9
- package/assets/assets/index-DfamSNSD.js +0 -86
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SiteHealthSection-hi54eSIt.js","./vendor-tanstack-ZXXkndVj.js","./vendor-lucide-N6vOpZmh.js","./ChartPrimitives-CYlrwLJs.js","./vendor-recharts-D-cUuLZo.js","./ProjectPage-DmZZ2C7q.js","./v2-overview-adapter-BPZ-H3VY.js","./vendor-markdown-B4giJcws.js","./extract-error-message-BOTDI6g5.js","./AuditHistoryPanel-D0nukTwD.js","./vendor-radix-twS1M3FF.js","./vendor-yaml-GWJz5H2G.js","./RunsPage-DHTvHcGm.js","./HistoryPage-DvupqQDM.js","./SettingsPage-BwAFzB7A.js","./BacklinksPage-B525ij0g.js","./TrafficPage-BOcXASAM.js","./TrafficSourceDetailPage-DTq0cN6g.js","./MeasurementPropertyPage-CwDbi1XN.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as k5,d as S5,r as N,j as l,Q as j5,M as A5,q as xe,e as zc,L as et,a as N5,t as kr,u as yt,f as C5,h as ma,k as Rs,l as iS,m as _5,n as sS,O as Gf,o as si,p as T5,s as Mt,v as P0,x as Ds,y as E5,z as R5,A as D5}from"./vendor-tanstack-ZXXkndVj.js";import{S as z5,O as q0,P as oS,C as M0,a as rS,T as B0,D as lS,R as cS}from"./vendor-radix-twS1M3FF.js";import{c as uS}from"./vendor-recharts-D-cUuLZo.js";import{A as jc,X as Lr,S as L0,a as dS,G as mS,C as Ic,L as Cs,R as ld,M as I5,b as O5,P as Kf,H as pS,c as hS,d as P5,e as Oc,f as U0,T as dm,g as Pc,W as fS,h as q5,i as M5,j as B5,k as L5,l as U5,m as V5,n as $5,B as G5,F as K5,o as H5,p as F5,q as Q5,r as Z5,s as gS,t as yS,u as Hf,v as bS,w as Y5,x as vS,E as X5}from"./vendor-lucide-N6vOpZmh.js";import{M as J5,r as W5}from"./vendor-markdown-B4giJcws.js";import{p as e6}from"./vendor-yaml-GWJz5H2G.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const h of u)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function i(u){const h={};return u.integrity&&(h.integrity=u.integrity),u.referrerPolicy&&(h.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?h.credentials="include":u.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(u){if(u.ep)return;u.ep=!0;const h=i(u);fetch(u.href,h)}})();var tf={exports:{}},ic={},nf={exports:{}},af={};var ux;function t6(){return ux||(ux=1,(function(e){function n(P,J){var be=P.length;P.push(J);e:for(;0<be;){var je=be-1>>>1,W=P[je];if(0<u(W,J))P[je]=J,P[be]=W,be=je;else break e}}function i(P){return P.length===0?null:P[0]}function o(P){if(P.length===0)return null;var J=P[0],be=P.pop();if(be!==J){P[0]=be;e:for(var je=0,W=P.length,_e=W>>>1;je<_e;){var qe=2*(je+1)-1,ve=P[qe],de=qe+1,ce=P[de];if(0>u(ve,be))de<W&&0>u(ce,ve)?(P[je]=ce,P[de]=be,je=de):(P[je]=ve,P[qe]=be,je=qe);else if(de<W&&0>u(ce,be))P[je]=ce,P[de]=be,je=de;else break e}}return J}function u(P,J){var be=P.sortIndex-J.sortIndex;return be!==0?be:P.id-J.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;e.unstable_now=function(){return h.now()}}else{var f=Date,b=f.now();e.unstable_now=function(){return f.now()-b}}var v=[],x=[],k=1,S=null,C=3,_=!1,z=!1,q=!1,T=!1,V=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function U(P){for(var J=i(x);J!==null;){if(J.callback===null)o(x);else if(J.startTime<=P)o(x),J.sortIndex=J.expirationTime,n(v,J);else break;J=i(x)}}function Z(P){if(q=!1,U(P),!z)if(i(v)!==null)z=!0,te||(te=!0,$e());else{var J=i(x);J!==null&&Ue(Z,J.startTime-P)}}var te=!1,B=-1,X=5,le=-1;function Je(){return T?!0:!(e.unstable_now()-le<X)}function nt(){if(T=!1,te){var P=e.unstable_now();le=P;var J=!0;try{e:{z=!1,q&&(q=!1,Y(B),B=-1),_=!0;var be=C;try{t:{for(U(P),S=i(v);S!==null&&!(S.expirationTime>P&&Je());){var je=S.callback;if(typeof je=="function"){S.callback=null,C=S.priorityLevel;var W=je(S.expirationTime<=P);if(P=e.unstable_now(),typeof W=="function"){S.callback=W,U(P),J=!0;break t}S===i(v)&&o(v),U(P)}else o(v);S=i(v)}if(S!==null)J=!0;else{var _e=i(x);_e!==null&&Ue(Z,_e.startTime-P),J=!1}}break e}finally{S=null,C=be,_=!1}J=void 0}}finally{J?$e():te=!1}}}var $e;if(typeof M=="function")$e=function(){M(nt)};else if(typeof MessageChannel<"u"){var Pe=new MessageChannel,Se=Pe.port2;Pe.port1.onmessage=nt,$e=function(){Se.postMessage(null)}}else $e=function(){V(nt,0)};function Ue(P,J){B=V(function(){P(e.unstable_now())},J)}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"):X=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 J=3;break;default:J=C}var be=C;C=J;try{return P()}finally{C=be}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(P,J){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var be=C;C=P;try{return J()}finally{C=be}},e.unstable_scheduleCallback=function(P,J,be){var je=e.unstable_now();switch(typeof be=="object"&&be!==null?(be=be.delay,be=typeof be=="number"&&0<be?je+be:je):be=je,P){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=be+W,P={id:k++,callback:J,priorityLevel:P,startTime:be,expirationTime:W,sortIndex:-1},be>je?(P.sortIndex=be,n(x,P),i(v)===null&&P===i(x)&&(q?(Y(B),B=-1):q=!0,Ue(Z,be-je))):(P.sortIndex=W,n(v,P),z||_||(z=!0,te||(te=!0,$e()))),P},e.unstable_shouldYield=Je,e.unstable_wrapCallback=function(P){var J=C;return function(){var be=C;C=J;try{return P.apply(this,arguments)}finally{C=be}}}})(af)),af}var dx;function n6(){return dx||(dx=1,nf.exports=t6()),nf.exports}var mx;function a6(){if(mx)return ic;mx=1;var e=n6(),n=k5(),i=S5();function o(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+t+"; visit "+a+" 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 h(t){var a=t,s=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(s=a.return),t=a.return;while(t)}return a.tag===3?s:null}function f(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function b(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function v(t){if(h(t)!==t)throw Error(o(188))}function x(t){var a=t.alternate;if(!a){if(a=h(t),a===null)throw Error(o(188));return a!==t?null:t}for(var s=t,c=a;;){var p=s.return;if(p===null)break;var g=p.alternate;if(g===null){if(c=p.return,c!==null){s=c;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===s)return v(p),t;if(g===c)return v(p),a;g=g.sibling}throw Error(o(188))}if(s.return!==c.return)s=p,c=g;else{for(var w=!1,A=p.child;A;){if(A===s){w=!0,s=p,c=g;break}if(A===c){w=!0,c=p,s=g;break}A=A.sibling}if(!w){for(A=g.child;A;){if(A===s){w=!0,s=g,c=p;break}if(A===c){w=!0,c=g,s=p;break}A=A.sibling}if(!w)throw Error(o(189))}}if(s.alternate!==c)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?t:a}function k(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=k(t),a!==null)return a;t=t.sibling}return null}var S=Object.assign,C=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),M=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),Je=Symbol.for("react.memo_cache_sentinel"),nt=Symbol.iterator;function $e(t){return t===null||typeof t!="object"?null:(t=nt&&t[nt]||t["@@iterator"],typeof t=="function"?t:null)}var Pe=Symbol.for("react.client.reference");function Se(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Pe?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case q:return"Fragment";case V:return"Profiler";case T:return"StrictMode";case Z:return"Suspense";case te:return"SuspenseList";case le:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case z:return"Portal";case M:return t.displayName||"Context";case Y:return(t._context.displayName||"Context")+".Consumer";case U:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case B:return a=t.displayName||null,a!==null?a:Se(t.type)||"Memo";case X:a=t._payload,t=t._init;try{return Se(t(a))}catch{}}return null}var Ue=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be={pending:!1,data:null,method:null,action:null},je=[],W=-1;function _e(t){return{current:t}}function qe(t){0>W||(t.current=je[W],je[W]=null,W--)}function ve(t,a){W++,je[W]=t.current,t.current=a}var de=_e(null),ce=_e(null),F=_e(null),pe=_e(null);function Oe(t,a){switch(ve(F,a),ve(ce,t),ve(de,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?zv(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=zv(a),t=Iv(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}qe(de),ve(de,t)}function Ae(){qe(de),qe(ce),qe(F)}function st(t){t.memoizedState!==null&&ve(pe,t);var a=de.current,s=Iv(a,t.type);a!==s&&(ve(ce,t),ve(de,s))}function Ve(t){ce.current===t&&(qe(de),qe(ce)),pe.current===t&&(qe(pe),ec._currentValue=be)}var At,Ke;function me(t){if(At===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);At=a&&a[1]||"",Ke=-1<s.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+At+t+Ke}var at=!1;function zt(t,a){if(!t||at)return"";at=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(Q){var H=Q}Reflect.construct(t,[],se)}else{try{se.call()}catch(Q){H=Q}t.call(se.prototype)}}else{try{throw Error()}catch(Q){H=Q}(se=t())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(Q){if(Q&&H&&typeof Q.stack=="string")return[Q.stack,H.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),w=g[0],A=g[1];if(w&&A){var D=w.split(`
|
|
5
|
+
`),G=A.split(`
|
|
6
|
+
`);for(p=c=0;c<D.length&&!D[c].includes("DetermineComponentFrameRoot");)c++;for(;p<G.length&&!G[p].includes("DetermineComponentFrameRoot");)p++;if(c===D.length||p===G.length)for(c=D.length-1,p=G.length-1;1<=c&&0<=p&&D[c]!==G[p];)p--;for(;1<=c&&0<=p;c--,p--)if(D[c]!==G[p]){if(c!==1||p!==1)do if(c--,p--,0>p||D[c]!==G[p]){var ne=`
|
|
7
|
+
`+D[c].replace(" at new "," at ");return t.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",t.displayName)),ne}while(1<=c&&0<=p);break}}}finally{at=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?me(s):""}function Pn(t,a){switch(t.tag){case 26:case 27:case 5:return me(t.type);case 16:return me("Lazy");case 13:return t.child!==a&&a!==null?me("Suspense Fallback"):me("Suspense");case 19:return me("SuspenseList");case 0:case 15:return zt(t.type,!1);case 11:return zt(t.type.render,!1);case 1:return zt(t.type,!0);case 31:return me("Activity");default:return""}}function Kt(t){try{var a="",s=null;do a+=Pn(t,s),s=t,t=t.return;while(t);return a}catch(c){return`
|
|
8
|
+
Error generating stack: `+c.message+`
|
|
9
|
+
`+c.stack}}var Me=Object.prototype.hasOwnProperty,ct=e.unstable_scheduleCallback,Ht=e.unstable_cancelCallback,Ft=e.unstable_shouldYield,En=e.unstable_requestPaint,Ut=e.unstable_now,ci=e.unstable_getCurrentPriorityLevel,Ls=e.unstable_ImmediatePriority,ui=e.unstable_UserBlockingPriority,Rn=e.unstable_NormalPriority,qo=e.unstable_LowPriority,Us=e.unstable_IdlePriority,Vs=e.log,di=e.unstable_setDisableYieldValue,yn=null,_t=null;function $n(t){if(typeof Vs=="function"&&di(t),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(yn,t)}catch{}}var Qt=Math.clz32?Math.clz32:Jn,$s=Math.log,Ia=Math.LN2;function Jn(t){return t>>>=0,t===0?32:31-($s(t)/Ia|0)|0}var oe=256,Ee=262144,Ze=4194304;function It(t){var a=t&42;if(a!==0)return a;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Xe(t,a,s){var c=t.pendingLanes;if(c===0)return 0;var p=0,g=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var A=c&134217727;return A!==0?(c=A&~g,c!==0?p=It(c):(w&=A,w!==0?p=It(w):s||(s=A&~t,s!==0&&(p=It(s))))):(A=c&~g,A!==0?p=It(A):w!==0?p=It(w):s||(s=c&~t,s!==0&&(p=It(s)))),p===0?0:a!==0&&a!==p&&(a&g)===0&&(g=p&-p,s=a&-a,g>=s||g===32&&(s&4194048)!==0)?a:p}function xt(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function sn(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mi(){var t=Ze;return Ze<<=1,(Ze&62914560)===0&&(Ze=4194304),t}function Mo(t){for(var a=[],s=0;31>s;s++)a.push(t);return a}function Gs(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function eu(t,a,s,c,p,g){var w=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var A=t.entanglements,D=t.expirationTimes,G=t.hiddenUpdates;for(s=w&~s;0<s;){var ne=31-Qt(s),se=1<<ne;A[ne]=0,D[ne]=-1;var H=G[ne];if(H!==null)for(G[ne]=null,ne=0;ne<H.length;ne++){var Q=H[ne];Q!==null&&(Q.lane&=-536870913)}s&=~se}c!==0&&tl(t,c,0),g!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=g&~(w&~a))}function tl(t,a,s){t.pendingLanes|=a,t.suspendedLanes&=~a;var c=31-Qt(a);t.entangledLanes|=a,t.entanglements[c]=t.entanglements[c]|1073741824|s&261930}function nl(t,a){var s=t.entangledLanes|=a;for(t=t.entanglements;s;){var c=31-Qt(s),p=1<<c;p&a|t[c]&a&&(t[c]|=a),s&=~p}}function al(t,a){var s=a&-a;return s=(s&42)!==0?1:il(s),(s&(t.suspendedLanes|a))!==0?0:s}function il(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function sl(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Bo(){var t=J.p;return t!==0?t:(t=window.event,t===void 0?32:ax(t.type))}function tu(t,a){var s=J.p;try{return J.p=t,a()}finally{J.p=s}}var ga=Math.random().toString(36).slice(2),on="__reactFiber$"+ga,Dn="__reactProps$"+ga,Fi="__reactContainer$"+ga,Lo="__reactEvents$"+ga,nu="__reactListeners$"+ga,Uo="__reactHandles$"+ga,Wn="__reactResources$"+ga,Qi="__reactMarker$"+ga;function ol(t){delete t[on],delete t[Dn],delete t[Lo],delete t[nu],delete t[Uo]}function pi(t){var a=t[on];if(a)return a;for(var s=t.parentNode;s;){if(a=s[Fi]||s[on]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(t=Uv(t);t!==null;){if(s=t[on])return s;t=Uv(t)}return a}t=s,s=t.parentNode}return null}function Zi(t){if(t=t[on]||t[Fi]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function Yi(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(o(33))}function Xi(t){var a=t[Wn];return a||(a=t[Wn]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function en(t){t[Qi]=!0}var rl=new Set,ll={};function Fa(t,a){Ks(t,a),Ks(t+"Capture",a)}function Ks(t,a){for(ll[t]=a,t=0;t<a.length;t++)rl.add(a[t])}var cl=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ul={},Qa={};function Wm(t){return Me.call(Qa,t)?!0:Me.call(ul,t)?!1:cl.test(t)?Qa[t]=!0:(ul[t]=!0,!1)}function hi(t,a,s){if(Wm(a))if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+s)}}function Hs(t,a,s){if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+s)}}function Sn(t,a,s,c){if(c===null)t.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttributeNS(a,s,""+c)}}function zn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ji(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function ep(t,a,s){var c=Object.getOwnPropertyDescriptor(t.constructor.prototype,a);if(!t.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,g=c.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return p.call(this)},set:function(w){s=""+w,g.call(this,w)}}),Object.defineProperty(t,a,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(w){s=""+w},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function dl(t){if(!t._valueTracker){var a=Ji(t)?"checked":"value";t._valueTracker=ep(t,a,""+t[a])}}function Za(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var s=a.getValue(),c="";return t&&(c=Ji(t)?t.checked?"true":"false":t.value),t=c,t!==s?(a.setValue(t),!0):!1}function Wi(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var au=/[\n"\\]/g;function In(t){return t.replace(au,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Vo(t,a,s,c,p,g,w,A){t.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?t.type=w:t.removeAttribute("type"),a!=null?w==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+zn(a)):t.value!==""+zn(a)&&(t.value=""+zn(a)):w!=="submit"&&w!=="reset"||t.removeAttribute("value"),a!=null?$o(t,w,zn(a)):s!=null?$o(t,w,zn(s)):c!=null&&t.removeAttribute("value"),p==null&&g!=null&&(t.defaultChecked=!!g),p!=null&&(t.checked=p&&typeof p!="function"&&typeof p!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?t.name=""+zn(A):t.removeAttribute("name")}function ml(t,a,s,c,p,g,w,A){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),a!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||a!=null)){dl(t);return}s=s!=null?""+zn(s):"",a=a!=null?""+zn(a):s,A||a===t.value||(t.value=a),t.defaultValue=a}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=A?t.checked:!!c,t.defaultChecked=!!c,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(t.name=w),dl(t)}function $o(t,a,s){a==="number"&&Wi(t.ownerDocument)===t||t.defaultValue===""+s||(t.defaultValue=""+s)}function Gn(t,a,s,c){if(t=t.options,a){a={};for(var p=0;p<s.length;p++)a["$"+s[p]]=!0;for(s=0;s<t.length;s++)p=a.hasOwnProperty("$"+t[s].value),t[s].selected!==p&&(t[s].selected=p),p&&c&&(t[s].defaultSelected=!0)}else{for(s=""+zn(s),a=null,p=0;p<t.length;p++){if(t[p].value===s){t[p].selected=!0,c&&(t[p].defaultSelected=!0);return}a!==null||t[p].disabled||(a=t[p])}a!==null&&(a.selected=!0)}}function ea(t,a,s){if(a!=null&&(a=""+zn(a),a!==t.value&&(t.value=a),s==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=s!=null?""+zn(s):""}function fi(t,a,s,c){if(a==null){if(c!=null){if(s!=null)throw Error(o(92));if(Ue(c)){if(1<c.length)throw Error(o(93));c=c[0]}s=c}s==null&&(s=""),a=s}s=zn(a),t.defaultValue=s,c=t.textContent,c===s&&c!==""&&c!==null&&(t.value=c),dl(t)}function ya(t,a){if(a){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=a;return}}t.textContent=a}var ba=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function tp(t,a,s){var c=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":c?t.setProperty(a,s):typeof s!="number"||s===0||ba.has(a)?a==="float"?t.cssFloat=s:t[a]=(""+s).trim():t[a]=s+"px"}function Ya(t,a,s){if(a!=null&&typeof a!="object")throw Error(o(62));if(t=t.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var p in a)c=a[p],a.hasOwnProperty(p)&&s[p]!==c&&tp(t,p,c)}else for(var g in a)a.hasOwnProperty(g)&&tp(t,g,a[g])}function Oa(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Go=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),np=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ko(t){return np.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Pa(){}var pl=null;function hl(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var gi=null,qn=null;function Ho(t){var a=Zi(t);if(a&&(t=a.stateNode)){var s=t[Dn]||null;e:switch(t=a.stateNode,a.type){case"input":if(Vo(t,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+In(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var c=s[a];if(c!==t&&c.form===t.form){var p=c[Dn]||null;if(!p)throw Error(o(90));Vo(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<s.length;a++)c=s[a],c.form===t.form&&Za(c)}break e;case"textarea":ea(t,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Gn(t,!!s.multiple,a,!1)}}}var fl=!1;function gl(t,a,s){if(fl)return t(a,s);fl=!0;try{var c=t(a);return c}finally{if(fl=!1,(gi!==null||qn!==null)&&(Lu(),gi&&(a=gi,t=qn,qn=gi=null,Ho(a),t)))for(a=0;a<t.length;a++)Ho(t[a])}}function Fs(t,a){var s=t.stateNode;if(s===null)return null;var c=s[Dn]||null;if(c===null)return null;s=c[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(o(231,a,typeof s));return s}var va=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yl=!1;if(va)try{var Qs={};Object.defineProperty(Qs,"passive",{get:function(){yl=!0}}),window.addEventListener("test",Qs,Qs),window.removeEventListener("test",Qs,Qs)}catch{yl=!1}var Xa=null,K=null,Fe=null;function yi(){if(Fe)return Fe;var t,a=K,s=a.length,c,p="value"in Xa?Xa.value:Xa.textContent,g=p.length;for(t=0;t<s&&a[t]===p[t];t++);var w=s-t;for(c=1;c<=w&&a[s-c]===p[g-c];c++);return Fe=p.slice(t,1<c?1-c:void 0)}function es(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function qa(){return!0}function bl(){return!1}function jn(t){function a(s,c,p,g,w){this._reactName=s,this._targetInst=p,this.type=c,this.nativeEvent=g,this.target=w,this.currentTarget=null;for(var A in t)t.hasOwnProperty(A)&&(s=t[A],this[A]=s?s(g):g[A]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?qa:bl,this.isPropagationStopped=bl,this}return S(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=qa)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=qa)},persist:function(){},isPersistent:qa}),a}var bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ja=jn(bi),vl=S({},bi,{view:0,detail:0}),xC=jn(vl),ap,ip,xl,iu=S({},vl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:op,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==xl&&(xl&&t.type==="mousemove"?(ap=t.screenX-xl.screenX,ip=t.screenY-xl.screenY):ip=ap=0,xl=t),ap)},movementY:function(t){return"movementY"in t?t.movementY:ip}}),P1=jn(iu),wC=S({},iu,{dataTransfer:0}),kC=jn(wC),SC=S({},vl,{relatedTarget:0}),sp=jn(SC),jC=S({},bi,{animationName:0,elapsedTime:0,pseudoElement:0}),AC=jn(jC),NC=S({},bi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),CC=jn(NC),_C=S({},bi,{data:0}),q1=jn(_C),TC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EC={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},RC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function DC(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=RC[t])?!!a[t]:!1}function op(){return DC}var zC=S({},vl,{key:function(t){if(t.key){var a=TC[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=es(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?EC[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:op,charCode:function(t){return t.type==="keypress"?es(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?es(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),IC=jn(zC),OC=S({},iu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),M1=jn(OC),PC=S({},vl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:op}),qC=jn(PC),MC=S({},bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),BC=jn(MC),LC=S({},iu,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),UC=jn(LC),VC=S({},bi,{newState:0,oldState:0}),$C=jn(VC),GC=[9,13,27,32],rp=va&&"CompositionEvent"in window,wl=null;va&&"documentMode"in document&&(wl=document.documentMode);var KC=va&&"TextEvent"in window&&!wl,B1=va&&(!rp||wl&&8<wl&&11>=wl),L1=" ",U1=!1;function V1(t,a){switch(t){case"keyup":return GC.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $1(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Fo=!1;function HC(t,a){switch(t){case"compositionend":return $1(a);case"keypress":return a.which!==32?null:(U1=!0,L1);case"textInput":return t=a.data,t===L1&&U1?null:t;default:return null}}function FC(t,a){if(Fo)return t==="compositionend"||!rp&&V1(t,a)?(t=yi(),Fe=K=Xa=null,Fo=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return B1&&a.locale!=="ko"?null:a.data;default:return null}}var QC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function G1(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!QC[t.type]:a==="textarea"}function K1(t,a,s,c){gi?qn?qn.push(c):qn=[c]:gi=c,a=Fu(a,"onChange"),0<a.length&&(s=new Ja("onChange","change",null,s,c),t.push({event:s,listeners:a}))}var kl=null,Sl=null;function ZC(t){Cv(t,0)}function su(t){var a=Yi(t);if(Za(a))return t}function H1(t,a){if(t==="change")return a}var F1=!1;if(va){var lp;if(va){var cp="oninput"in document;if(!cp){var Q1=document.createElement("div");Q1.setAttribute("oninput","return;"),cp=typeof Q1.oninput=="function"}lp=cp}else lp=!1;F1=lp&&(!document.documentMode||9<document.documentMode)}function Z1(){kl&&(kl.detachEvent("onpropertychange",Y1),Sl=kl=null)}function Y1(t){if(t.propertyName==="value"&&su(Sl)){var a=[];K1(a,Sl,t,hl(t)),gl(ZC,a)}}function YC(t,a,s){t==="focusin"?(Z1(),kl=a,Sl=s,kl.attachEvent("onpropertychange",Y1)):t==="focusout"&&Z1()}function XC(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return su(Sl)}function JC(t,a){if(t==="click")return su(a)}function WC(t,a){if(t==="input"||t==="change")return su(a)}function e4(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var ta=typeof Object.is=="function"?Object.is:e4;function jl(t,a){if(ta(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var s=Object.keys(t),c=Object.keys(a);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var p=s[c];if(!Me.call(a,p)||!ta(t[p],a[p]))return!1}return!0}function X1(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function J1(t,a){var s=X1(t);t=0;for(var c;s;){if(s.nodeType===3){if(c=t+s.textContent.length,t<=a&&c>=a)return{node:s,offset:a-t};t=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=X1(s)}}function W1(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?W1(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function ey(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=Wi(t.document);a instanceof t.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)t=a.contentWindow;else break;a=Wi(t.document)}return a}function up(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var t4=va&&"documentMode"in document&&11>=document.documentMode,Qo=null,dp=null,Al=null,mp=!1;function ty(t,a,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;mp||Qo==null||Qo!==Wi(c)||(c=Qo,"selectionStart"in c&&up(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Al&&jl(Al,c)||(Al=c,c=Fu(dp,"onSelect"),0<c.length&&(a=new Ja("onSelect","select",null,a,s),t.push({event:a,listeners:c}),a.target=Qo)))}function Zs(t,a){var s={};return s[t.toLowerCase()]=a.toLowerCase(),s["Webkit"+t]="webkit"+a,s["Moz"+t]="moz"+a,s}var Zo={animationend:Zs("Animation","AnimationEnd"),animationiteration:Zs("Animation","AnimationIteration"),animationstart:Zs("Animation","AnimationStart"),transitionrun:Zs("Transition","TransitionRun"),transitionstart:Zs("Transition","TransitionStart"),transitioncancel:Zs("Transition","TransitionCancel"),transitionend:Zs("Transition","TransitionEnd")},pp={},ny={};va&&(ny=document.createElement("div").style,"AnimationEvent"in window||(delete Zo.animationend.animation,delete Zo.animationiteration.animation,delete Zo.animationstart.animation),"TransitionEvent"in window||delete Zo.transitionend.transition);function Ys(t){if(pp[t])return pp[t];if(!Zo[t])return t;var a=Zo[t],s;for(s in a)if(a.hasOwnProperty(s)&&s in ny)return pp[t]=a[s];return t}var ay=Ys("animationend"),iy=Ys("animationiteration"),sy=Ys("animationstart"),n4=Ys("transitionrun"),a4=Ys("transitionstart"),i4=Ys("transitioncancel"),oy=Ys("transitionend"),ry=new Map,hp="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");hp.push("scrollEnd");function Ma(t,a){ry.set(t,a),Fa(a,[t])}var ou=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},xa=[],Yo=0,fp=0;function ru(){for(var t=Yo,a=fp=Yo=0;a<t;){var s=xa[a];xa[a++]=null;var c=xa[a];xa[a++]=null;var p=xa[a];xa[a++]=null;var g=xa[a];if(xa[a++]=null,c!==null&&p!==null){var w=c.pending;w===null?p.next=p:(p.next=w.next,w.next=p),c.pending=p}g!==0&&ly(s,p,g)}}function lu(t,a,s,c){xa[Yo++]=t,xa[Yo++]=a,xa[Yo++]=s,xa[Yo++]=c,fp|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function gp(t,a,s,c){return lu(t,a,s,c),cu(t)}function Xs(t,a){return lu(t,null,null,a),cu(t)}function ly(t,a,s){t.lanes|=s;var c=t.alternate;c!==null&&(c.lanes|=s);for(var p=!1,g=t.return;g!==null;)g.childLanes|=s,c=g.alternate,c!==null&&(c.childLanes|=s),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(p=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,p&&a!==null&&(p=31-Qt(s),t=g.hiddenUpdates,c=t[p],c===null?t[p]=[a]:c.push(a),a.lane=s|536870912),g):null}function cu(t){if(50<Fl)throw Fl=0,Ah=null,Error(o(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var Xo={};function s4(t,a,s,c){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function na(t,a,s,c){return new s4(t,a,s,c)}function yp(t){return t=t.prototype,!(!t||!t.isReactComponent)}function vi(t,a){var s=t.alternate;return s===null?(s=na(t.tag,a,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=a,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&65011712,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,a=t.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s.refCleanup=t.refCleanup,s}function cy(t,a){t.flags&=65011714;var s=t.alternate;return s===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=s.childLanes,t.lanes=s.lanes,t.child=s.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=s.memoizedProps,t.memoizedState=s.memoizedState,t.updateQueue=s.updateQueue,t.type=s.type,a=s.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function uu(t,a,s,c,p,g){var w=0;if(c=t,typeof t=="function")yp(t)&&(w=1);else if(typeof t=="string")w=u5(t,s,de.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case le:return t=na(31,s,a,p),t.elementType=le,t.lanes=g,t;case q:return Js(s.children,p,g,a);case T:w=8,p|=24;break;case V:return t=na(12,s,a,p|2),t.elementType=V,t.lanes=g,t;case Z:return t=na(13,s,a,p),t.elementType=Z,t.lanes=g,t;case te:return t=na(19,s,a,p),t.elementType=te,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case M:w=10;break e;case Y:w=9;break e;case U:w=11;break e;case B:w=14;break e;case X:w=16,c=null;break e}w=29,s=Error(o(130,t===null?"null":typeof t,"")),c=null}return a=na(w,s,a,p),a.elementType=t,a.type=c,a.lanes=g,a}function Js(t,a,s,c){return t=na(7,t,c,a),t.lanes=s,t}function bp(t,a,s){return t=na(6,t,null,a),t.lanes=s,t}function uy(t){var a=na(18,null,null,0);return a.stateNode=t,a}function vp(t,a,s){return a=na(4,t.children!==null?t.children:[],t.key,a),a.lanes=s,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var dy=new WeakMap;function wa(t,a){if(typeof t=="object"&&t!==null){var s=dy.get(t);return s!==void 0?s:(a={value:t,source:a,stack:Kt(a)},dy.set(t,a),a)}return{value:t,source:a,stack:Kt(a)}}var Jo=[],Wo=0,du=null,Nl=0,ka=[],Sa=0,ts=null,Wa=1,ei="";function xi(t,a){Jo[Wo++]=Nl,Jo[Wo++]=du,du=t,Nl=a}function my(t,a,s){ka[Sa++]=Wa,ka[Sa++]=ei,ka[Sa++]=ts,ts=t;var c=Wa;t=ei;var p=32-Qt(c)-1;c&=~(1<<p),s+=1;var g=32-Qt(a)+p;if(30<g){var w=p-p%5;g=(c&(1<<w)-1).toString(32),c>>=w,p-=w,Wa=1<<32-Qt(a)+p|s<<p|c,ei=g+t}else Wa=1<<g|s<<p|c,ei=t}function xp(t){t.return!==null&&(xi(t,1),my(t,1,0))}function wp(t){for(;t===du;)du=Jo[--Wo],Jo[Wo]=null,Nl=Jo[--Wo],Jo[Wo]=null;for(;t===ts;)ts=ka[--Sa],ka[Sa]=null,ei=ka[--Sa],ka[Sa]=null,Wa=ka[--Sa],ka[Sa]=null}function py(t,a){ka[Sa++]=Wa,ka[Sa++]=ei,ka[Sa++]=ts,Wa=a.id,ei=a.overflow,ts=t}var An=null,Pt=null,ht=!1,ns=null,ja=!1,kp=Error(o(519));function as(t){var a=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Cl(wa(a,t)),kp}function hy(t){var a=t.stateNode,s=t.type,c=t.memoizedProps;switch(a[on]=t,a[Dn]=c,s){case"dialog":lt("cancel",a),lt("close",a);break;case"iframe":case"object":case"embed":lt("load",a);break;case"video":case"audio":for(s=0;s<Zl.length;s++)lt(Zl[s],a);break;case"source":lt("error",a);break;case"img":case"image":case"link":lt("error",a),lt("load",a);break;case"details":lt("toggle",a);break;case"input":lt("invalid",a),ml(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":lt("invalid",a);break;case"textarea":lt("invalid",a),fi(a,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||c.suppressHydrationWarning===!0||Rv(a.textContent,s)?(c.popover!=null&&(lt("beforetoggle",a),lt("toggle",a)),c.onScroll!=null&<("scroll",a),c.onScrollEnd!=null&<("scrollend",a),c.onClick!=null&&(a.onclick=Pa),a=!0):a=!1,a||as(t,!0)}function fy(t){for(An=t.return;An;)switch(An.tag){case 5:case 31:case 13:ja=!1;return;case 27:case 3:ja=!0;return;default:An=An.return}}function er(t){if(t!==An)return!1;if(!ht)return fy(t),ht=!0,!1;var a=t.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=t.type,s=!(s!=="form"&&s!=="button")||Lh(t.type,t.memoizedProps)),s=!s),s&&Pt&&as(t),fy(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));Pt=Lv(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));Pt=Lv(t)}else a===27?(a=Pt,ys(t.type)?(t=Kh,Kh=null,Pt=t):Pt=a):Pt=An?Na(t.stateNode.nextSibling):null;return!0}function Ws(){Pt=An=null,ht=!1}function Sp(){var t=ns;return t!==null&&(Qn===null?Qn=t:Qn.push.apply(Qn,t),ns=null),t}function Cl(t){ns===null?ns=[t]:ns.push(t)}var jp=_e(null),eo=null,wi=null;function is(t,a,s){ve(jp,a._currentValue),a._currentValue=s}function ki(t){t._currentValue=jp.current,qe(jp)}function Ap(t,a,s){for(;t!==null;){var c=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),t===s)break;t=t.return}}function Np(t,a,s,c){var p=t.child;for(p!==null&&(p.return=t);p!==null;){var g=p.dependencies;if(g!==null){var w=p.child;g=g.firstContext;e:for(;g!==null;){var A=g;g=p;for(var D=0;D<a.length;D++)if(A.context===a[D]){g.lanes|=s,A=g.alternate,A!==null&&(A.lanes|=s),Ap(g.return,s,t),c||(w=null);break e}g=A.next}}else if(p.tag===18){if(w=p.return,w===null)throw Error(o(341));w.lanes|=s,g=w.alternate,g!==null&&(g.lanes|=s),Ap(w,s,t),w=null}else w=p.child;if(w!==null)w.return=p;else for(w=p;w!==null;){if(w===t){w=null;break}if(p=w.sibling,p!==null){p.return=w.return,w=p;break}w=w.return}p=w}}function tr(t,a,s,c){t=null;for(var p=a,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var w=p.alternate;if(w===null)throw Error(o(387));if(w=w.memoizedProps,w!==null){var A=p.type;ta(p.pendingProps.value,w.value)||(t!==null?t.push(A):t=[A])}}else if(p===pe.current){if(w=p.alternate,w===null)throw Error(o(387));w.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(t!==null?t.push(ec):t=[ec])}p=p.return}t!==null&&Np(a,t,s,c),a.flags|=262144}function mu(t){for(t=t.firstContext;t!==null;){if(!ta(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function to(t){eo=t,wi=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Nn(t){return gy(eo,t)}function pu(t,a){return eo===null&&to(t),gy(t,a)}function gy(t,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},wi===null){if(t===null)throw Error(o(308));wi=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else wi=wi.next=a;return s}var o4=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(s,c){t.push(c)}};this.abort=function(){a.aborted=!0,t.forEach(function(s){return s()})}},r4=e.unstable_scheduleCallback,l4=e.unstable_NormalPriority,rn={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cp(){return{controller:new o4,data:new Map,refCount:0}}function _l(t){t.refCount--,t.refCount===0&&r4(l4,function(){t.controller.abort()})}var Tl=null,_p=0,nr=0,ar=null;function c4(t,a){if(Tl===null){var s=Tl=[];_p=0,nr=Rh(),ar={status:"pending",value:void 0,then:function(c){s.push(c)}}}return _p++,a.then(yy,yy),a}function yy(){if(--_p===0&&Tl!==null){ar!==null&&(ar.status="fulfilled");var t=Tl;Tl=null,nr=0,ar=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function u4(t,a){var s=[],c={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return t.then(function(){c.status="fulfilled",c.value=a;for(var p=0;p<s.length;p++)(0,s[p])(a)},function(p){for(c.status="rejected",c.reason=p,p=0;p<s.length;p++)(0,s[p])(void 0)}),c}var by=P.S;P.S=function(t,a){tv=Ut(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&c4(t,a),by!==null&&by(t,a)};var no=_e(null);function Tp(){var t=no.current;return t!==null?t:Dt.pooledCache}function hu(t,a){a===null?ve(no,no.current):ve(no,a.pool)}function vy(){var t=Tp();return t===null?null:{parent:rn._currentValue,pool:t}}var ir=Error(o(460)),Ep=Error(o(474)),fu=Error(o(542)),gu={then:function(){}};function xy(t){return t=t.status,t==="fulfilled"||t==="rejected"}function wy(t,a,s){switch(s=t[s],s===void 0?t.push(a):s!==a&&(a.then(Pa,Pa),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Sy(t),t;default:if(typeof a.status=="string")a.then(Pa,Pa);else{if(t=Dt,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=a,t.status="pending",t.then(function(c){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=c}},function(c){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Sy(t),t}throw io=a,ir}}function ao(t){try{var a=t._init;return a(t._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(io=s,ir):s}}var io=null;function ky(){if(io===null)throw Error(o(459));var t=io;return io=null,t}function Sy(t){if(t===ir||t===fu)throw Error(o(483))}var sr=null,El=0;function yu(t){var a=El;return El+=1,sr===null&&(sr=[]),wy(sr,t,a)}function Rl(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function bu(t,a){throw a.$$typeof===C?Error(o(525)):(t=Object.prototype.toString.call(a),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function jy(t){function a(L,O){if(t){var $=L.deletions;$===null?(L.deletions=[O],L.flags|=16):$.push(O)}}function s(L,O){if(!t)return null;for(;O!==null;)a(L,O),O=O.sibling;return null}function c(L){for(var O=new Map;L!==null;)L.key!==null?O.set(L.key,L):O.set(L.index,L),L=L.sibling;return O}function p(L,O){return L=vi(L,O),L.index=0,L.sibling=null,L}function g(L,O,$){return L.index=$,t?($=L.alternate,$!==null?($=$.index,$<O?(L.flags|=67108866,O):$):(L.flags|=67108866,O)):(L.flags|=1048576,O)}function w(L){return t&&L.alternate===null&&(L.flags|=67108866),L}function A(L,O,$,ie){return O===null||O.tag!==6?(O=bp($,L.mode,ie),O.return=L,O):(O=p(O,$),O.return=L,O)}function D(L,O,$,ie){var Le=$.type;return Le===q?ne(L,O,$.props.children,ie,$.key):O!==null&&(O.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===X&&ao(Le)===O.type)?(O=p(O,$.props),Rl(O,$),O.return=L,O):(O=uu($.type,$.key,$.props,null,L.mode,ie),Rl(O,$),O.return=L,O)}function G(L,O,$,ie){return O===null||O.tag!==4||O.stateNode.containerInfo!==$.containerInfo||O.stateNode.implementation!==$.implementation?(O=vp($,L.mode,ie),O.return=L,O):(O=p(O,$.children||[]),O.return=L,O)}function ne(L,O,$,ie,Le){return O===null||O.tag!==7?(O=Js($,L.mode,ie,Le),O.return=L,O):(O=p(O,$),O.return=L,O)}function se(L,O,$){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=bp(""+O,L.mode,$),O.return=L,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case _:return $=uu(O.type,O.key,O.props,null,L.mode,$),Rl($,O),$.return=L,$;case z:return O=vp(O,L.mode,$),O.return=L,O;case X:return O=ao(O),se(L,O,$)}if(Ue(O)||$e(O))return O=Js(O,L.mode,$,null),O.return=L,O;if(typeof O.then=="function")return se(L,yu(O),$);if(O.$$typeof===M)return se(L,pu(L,O),$);bu(L,O)}return null}function H(L,O,$,ie){var Le=O!==null?O.key:null;if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return Le!==null?null:A(L,O,""+$,ie);if(typeof $=="object"&&$!==null){switch($.$$typeof){case _:return $.key===Le?D(L,O,$,ie):null;case z:return $.key===Le?G(L,O,$,ie):null;case X:return $=ao($),H(L,O,$,ie)}if(Ue($)||$e($))return Le!==null?null:ne(L,O,$,ie,null);if(typeof $.then=="function")return H(L,O,yu($),ie);if($.$$typeof===M)return H(L,O,pu(L,$),ie);bu(L,$)}return null}function Q(L,O,$,ie,Le){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return L=L.get($)||null,A(O,L,""+ie,Le);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case _:return L=L.get(ie.key===null?$:ie.key)||null,D(O,L,ie,Le);case z:return L=L.get(ie.key===null?$:ie.key)||null,G(O,L,ie,Le);case X:return ie=ao(ie),Q(L,O,$,ie,Le)}if(Ue(ie)||$e(ie))return L=L.get($)||null,ne(O,L,ie,Le,null);if(typeof ie.then=="function")return Q(L,O,$,yu(ie),Le);if(ie.$$typeof===M)return Q(L,O,$,pu(O,ie),Le);bu(O,ie)}return null}function Ne(L,O,$,ie){for(var Le=null,bt=null,Re=O,tt=O=0,dt=null;Re!==null&&tt<$.length;tt++){Re.index>tt?(dt=Re,Re=null):dt=Re.sibling;var vt=H(L,Re,$[tt],ie);if(vt===null){Re===null&&(Re=dt);break}t&&Re&&vt.alternate===null&&a(L,Re),O=g(vt,O,tt),bt===null?Le=vt:bt.sibling=vt,bt=vt,Re=dt}if(tt===$.length)return s(L,Re),ht&&xi(L,tt),Le;if(Re===null){for(;tt<$.length;tt++)Re=se(L,$[tt],ie),Re!==null&&(O=g(Re,O,tt),bt===null?Le=Re:bt.sibling=Re,bt=Re);return ht&&xi(L,tt),Le}for(Re=c(Re);tt<$.length;tt++)dt=Q(Re,L,tt,$[tt],ie),dt!==null&&(t&&dt.alternate!==null&&Re.delete(dt.key===null?tt:dt.key),O=g(dt,O,tt),bt===null?Le=dt:bt.sibling=dt,bt=dt);return t&&Re.forEach(function(ks){return a(L,ks)}),ht&&xi(L,tt),Le}function Ge(L,O,$,ie){if($==null)throw Error(o(151));for(var Le=null,bt=null,Re=O,tt=O=0,dt=null,vt=$.next();Re!==null&&!vt.done;tt++,vt=$.next()){Re.index>tt?(dt=Re,Re=null):dt=Re.sibling;var ks=H(L,Re,vt.value,ie);if(ks===null){Re===null&&(Re=dt);break}t&&Re&&ks.alternate===null&&a(L,Re),O=g(ks,O,tt),bt===null?Le=ks:bt.sibling=ks,bt=ks,Re=dt}if(vt.done)return s(L,Re),ht&&xi(L,tt),Le;if(Re===null){for(;!vt.done;tt++,vt=$.next())vt=se(L,vt.value,ie),vt!==null&&(O=g(vt,O,tt),bt===null?Le=vt:bt.sibling=vt,bt=vt);return ht&&xi(L,tt),Le}for(Re=c(Re);!vt.done;tt++,vt=$.next())vt=Q(Re,L,tt,vt.value,ie),vt!==null&&(t&&vt.alternate!==null&&Re.delete(vt.key===null?tt:vt.key),O=g(vt,O,tt),bt===null?Le=vt:bt.sibling=vt,bt=vt);return t&&Re.forEach(function(w5){return a(L,w5)}),ht&&xi(L,tt),Le}function Rt(L,O,$,ie){if(typeof $=="object"&&$!==null&&$.type===q&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case _:e:{for(var Le=$.key;O!==null;){if(O.key===Le){if(Le=$.type,Le===q){if(O.tag===7){s(L,O.sibling),ie=p(O,$.props.children),ie.return=L,L=ie;break e}}else if(O.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===X&&ao(Le)===O.type){s(L,O.sibling),ie=p(O,$.props),Rl(ie,$),ie.return=L,L=ie;break e}s(L,O);break}else a(L,O);O=O.sibling}$.type===q?(ie=Js($.props.children,L.mode,ie,$.key),ie.return=L,L=ie):(ie=uu($.type,$.key,$.props,null,L.mode,ie),Rl(ie,$),ie.return=L,L=ie)}return w(L);case z:e:{for(Le=$.key;O!==null;){if(O.key===Le)if(O.tag===4&&O.stateNode.containerInfo===$.containerInfo&&O.stateNode.implementation===$.implementation){s(L,O.sibling),ie=p(O,$.children||[]),ie.return=L,L=ie;break e}else{s(L,O);break}else a(L,O);O=O.sibling}ie=vp($,L.mode,ie),ie.return=L,L=ie}return w(L);case X:return $=ao($),Rt(L,O,$,ie)}if(Ue($))return Ne(L,O,$,ie);if($e($)){if(Le=$e($),typeof Le!="function")throw Error(o(150));return $=Le.call($),Ge(L,O,$,ie)}if(typeof $.then=="function")return Rt(L,O,yu($),ie);if($.$$typeof===M)return Rt(L,O,pu(L,$),ie);bu(L,$)}return typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint"?($=""+$,O!==null&&O.tag===6?(s(L,O.sibling),ie=p(O,$),ie.return=L,L=ie):(s(L,O),ie=bp($,L.mode,ie),ie.return=L,L=ie),w(L)):s(L,O)}return function(L,O,$,ie){try{El=0;var Le=Rt(L,O,$,ie);return sr=null,Le}catch(Re){if(Re===ir||Re===fu)throw Re;var bt=na(29,Re,null,L.mode);return bt.lanes=ie,bt.return=L,bt}}}var so=jy(!0),Ay=jy(!1),ss=!1;function Rp(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Dp(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function os(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function rs(t,a,s){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(wt&2)!==0){var p=c.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),c.pending=a,a=cu(t),ly(t,null,s),a}return lu(t,c,a,s),cu(t)}function Dl(t,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var c=a.lanes;c&=t.pendingLanes,s|=c,a.lanes=s,nl(t,s)}}function zp(t,a){var s=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var p=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var w={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?p=g=w:g=g.next=w,s=s.next}while(s!==null);g===null?p=g=a:g=g.next=a}else p=g=a;s={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=a:t.next=a,s.lastBaseUpdate=a}var Ip=!1;function zl(){if(Ip){var t=ar;if(t!==null)throw t}}function Il(t,a,s,c){Ip=!1;var p=t.updateQueue;ss=!1;var g=p.firstBaseUpdate,w=p.lastBaseUpdate,A=p.shared.pending;if(A!==null){p.shared.pending=null;var D=A,G=D.next;D.next=null,w===null?g=G:w.next=G,w=D;var ne=t.alternate;ne!==null&&(ne=ne.updateQueue,A=ne.lastBaseUpdate,A!==w&&(A===null?ne.firstBaseUpdate=G:A.next=G,ne.lastBaseUpdate=D))}if(g!==null){var se=p.baseState;w=0,ne=G=D=null,A=g;do{var H=A.lane&-536870913,Q=H!==A.lane;if(Q?(ut&H)===H:(c&H)===H){H!==0&&H===nr&&(Ip=!0),ne!==null&&(ne=ne.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var Ne=t,Ge=A;H=a;var Rt=s;switch(Ge.tag){case 1:if(Ne=Ge.payload,typeof Ne=="function"){se=Ne.call(Rt,se,H);break e}se=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Ge.payload,H=typeof Ne=="function"?Ne.call(Rt,se,H):Ne,H==null)break e;se=S({},se,H);break e;case 2:ss=!0}}H=A.callback,H!==null&&(t.flags|=64,Q&&(t.flags|=8192),Q=p.callbacks,Q===null?p.callbacks=[H]:Q.push(H))}else Q={lane:H,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ne===null?(G=ne=Q,D=se):ne=ne.next=Q,w|=H;if(A=A.next,A===null){if(A=p.shared.pending,A===null)break;Q=A,A=Q.next,Q.next=null,p.lastBaseUpdate=Q,p.shared.pending=null}}while(!0);ne===null&&(D=se),p.baseState=D,p.firstBaseUpdate=G,p.lastBaseUpdate=ne,g===null&&(p.shared.lanes=0),ms|=w,t.lanes=w,t.memoizedState=se}}function Ny(t,a){if(typeof t!="function")throw Error(o(191,t));t.call(a)}function Cy(t,a){var s=t.callbacks;if(s!==null)for(t.callbacks=null,t=0;t<s.length;t++)Ny(s[t],a)}var or=_e(null),vu=_e(0);function _y(t,a){t=Ri,ve(vu,t),ve(or,a),Ri=t|a.baseLanes}function Op(){ve(vu,Ri),ve(or,or.current)}function Pp(){Ri=vu.current,qe(or),qe(vu)}var aa=_e(null),Aa=null;function ls(t){var a=t.alternate;ve(tn,tn.current&1),ve(aa,t),Aa===null&&(a===null||or.current!==null||a.memoizedState!==null)&&(Aa=t)}function qp(t){ve(tn,tn.current),ve(aa,t),Aa===null&&(Aa=t)}function Ty(t){t.tag===22?(ve(tn,tn.current),ve(aa,t),Aa===null&&(Aa=t)):cs()}function cs(){ve(tn,tn.current),ve(aa,aa.current)}function ia(t){qe(aa),Aa===t&&(Aa=null),qe(tn)}var tn=_e(0);function xu(t){for(var a=t;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||$h(s)||Gh(s)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Si=0,We=null,Tt=null,ln=null,wu=!1,rr=!1,oo=!1,ku=0,Ol=0,lr=null,d4=0;function Jt(){throw Error(o(321))}function Mp(t,a){if(a===null)return!1;for(var s=0;s<a.length&&s<t.length;s++)if(!ta(t[s],a[s]))return!1;return!0}function Bp(t,a,s,c,p,g){return Si=g,We=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,P.H=t===null||t.memoizedState===null?mb:eh,oo=!1,g=s(c,p),oo=!1,rr&&(g=Ry(a,s,c,p)),Ey(t),g}function Ey(t){P.H=Ml;var a=Tt!==null&&Tt.next!==null;if(Si=0,ln=Tt=We=null,wu=!1,Ol=0,lr=null,a)throw Error(o(300));t===null||cn||(t=t.dependencies,t!==null&&mu(t)&&(cn=!0))}function Ry(t,a,s,c){We=t;var p=0;do{if(rr&&(lr=null),Ol=0,rr=!1,25<=p)throw Error(o(301));if(p+=1,ln=Tt=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}P.H=pb,g=a(s,c)}while(rr);return g}function m4(){var t=P.H,a=t.useState()[0];return a=typeof a.then=="function"?Pl(a):a,t=t.useState()[0],(Tt!==null?Tt.memoizedState:null)!==t&&(We.flags|=1024),a}function Lp(){var t=ku!==0;return ku=0,t}function Up(t,a,s){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~s}function Vp(t){if(wu){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}wu=!1}Si=0,ln=Tt=We=null,rr=!1,Ol=ku=0,lr=null}function Mn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ln===null?We.memoizedState=ln=t:ln=ln.next=t,ln}function nn(){if(Tt===null){var t=We.alternate;t=t!==null?t.memoizedState:null}else t=Tt.next;var a=ln===null?We.memoizedState:ln.next;if(a!==null)ln=a,Tt=t;else{if(t===null)throw We.alternate===null?Error(o(467)):Error(o(310));Tt=t,t={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},ln===null?We.memoizedState=ln=t:ln=ln.next=t}return ln}function Su(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pl(t){var a=Ol;return Ol+=1,lr===null&&(lr=[]),t=wy(lr,t,a),a=We,(ln===null?a.memoizedState:ln.next)===null&&(a=a.alternate,P.H=a===null||a.memoizedState===null?mb:eh),t}function ju(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Pl(t);if(t.$$typeof===M)return Nn(t)}throw Error(o(438,String(t)))}function $p(t){var a=null,s=We.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var c=We.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=Su(),We.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(t),c=0;c<t;c++)s[c]=Je;return a.index++,s}function ji(t,a){return typeof a=="function"?a(t):a}function Au(t){var a=nn();return Gp(a,Tt,t)}function Gp(t,a,s){var c=t.queue;if(c===null)throw Error(o(311));c.lastRenderedReducer=s;var p=t.baseQueue,g=c.pending;if(g!==null){if(p!==null){var w=p.next;p.next=g.next,g.next=w}a.baseQueue=p=g,c.pending=null}if(g=t.baseState,p===null)t.memoizedState=g;else{a=p.next;var A=w=null,D=null,G=a,ne=!1;do{var se=G.lane&-536870913;if(se!==G.lane?(ut&se)===se:(Si&se)===se){var H=G.revertLane;if(H===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),se===nr&&(ne=!0);else if((Si&H)===H){G=G.next,H===nr&&(ne=!0);continue}else se={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},D===null?(A=D=se,w=g):D=D.next=se,We.lanes|=H,ms|=H;se=G.action,oo&&s(g,se),g=G.hasEagerState?G.eagerState:s(g,se)}else H={lane:se,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},D===null?(A=D=H,w=g):D=D.next=H,We.lanes|=se,ms|=se;G=G.next}while(G!==null&&G!==a);if(D===null?w=g:D.next=A,!ta(g,t.memoizedState)&&(cn=!0,ne&&(s=ar,s!==null)))throw s;t.memoizedState=g,t.baseState=w,t.baseQueue=D,c.lastRenderedState=g}return p===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Kp(t){var a=nn(),s=a.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=t;var c=s.dispatch,p=s.pending,g=a.memoizedState;if(p!==null){s.pending=null;var w=p=p.next;do g=t(g,w.action),w=w.next;while(w!==p);ta(g,a.memoizedState)||(cn=!0),a.memoizedState=g,a.baseQueue===null&&(a.baseState=g),s.lastRenderedState=g}return[g,c]}function Dy(t,a,s){var c=We,p=nn(),g=ht;if(g){if(s===void 0)throw Error(o(407));s=s()}else s=a();var w=!ta((Tt||p).memoizedState,s);if(w&&(p.memoizedState=s,cn=!0),p=p.queue,Qp(Oy.bind(null,c,p,t),[t]),p.getSnapshot!==a||w||ln!==null&&ln.memoizedState.tag&1){if(c.flags|=2048,cr(9,{destroy:void 0},Iy.bind(null,c,p,s,a),null),Dt===null)throw Error(o(349));g||(Si&127)!==0||zy(c,a,s)}return s}function zy(t,a,s){t.flags|=16384,t={getSnapshot:a,value:s},a=We.updateQueue,a===null?(a=Su(),We.updateQueue=a,a.stores=[t]):(s=a.stores,s===null?a.stores=[t]:s.push(t))}function Iy(t,a,s,c){a.value=s,a.getSnapshot=c,Py(a)&&qy(t)}function Oy(t,a,s){return s(function(){Py(a)&&qy(t)})}function Py(t){var a=t.getSnapshot;t=t.value;try{var s=a();return!ta(t,s)}catch{return!0}}function qy(t){var a=Xs(t,2);a!==null&&Zn(a,t,2)}function Hp(t){var a=Mn();if(typeof t=="function"){var s=t;if(t=s(),oo){$n(!0);try{s()}finally{$n(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ji,lastRenderedState:t},a}function My(t,a,s,c){return t.baseState=s,Gp(t,Tt,typeof c=="function"?c:ji)}function p4(t,a,s,c,p){if(_u(t))throw Error(o(485));if(t=a.action,t!==null){var g={payload:p,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){g.listeners.push(w)}};P.T!==null?s(!0):g.isTransition=!1,c(g),s=a.pending,s===null?(g.next=a.pending=g,By(a,g)):(g.next=s.next,a.pending=s.next=g)}}function By(t,a){var s=a.action,c=a.payload,p=t.state;if(a.isTransition){var g=P.T,w={};P.T=w;try{var A=s(p,c),D=P.S;D!==null&&D(w,A),Ly(t,a,A)}catch(G){Fp(t,a,G)}finally{g!==null&&w.types!==null&&(g.types=w.types),P.T=g}}else try{g=s(p,c),Ly(t,a,g)}catch(G){Fp(t,a,G)}}function Ly(t,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){Uy(t,a,c)},function(c){return Fp(t,a,c)}):Uy(t,a,s)}function Uy(t,a,s){a.status="fulfilled",a.value=s,Vy(a),t.state=s,a=t.pending,a!==null&&(s=a.next,s===a?t.pending=null:(s=s.next,a.next=s,By(t,s)))}function Fp(t,a,s){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=s,Vy(a),a=a.next;while(a!==c)}t.action=null}function Vy(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function $y(t,a){return a}function Gy(t,a){if(ht){var s=Dt.formState;if(s!==null){e:{var c=We;if(ht){if(Pt){t:{for(var p=Pt,g=ja;p.nodeType!==8;){if(!g){p=null;break t}if(p=Na(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g==="F!"||g==="F"?p:null}if(p){Pt=Na(p.nextSibling),c=p.data==="F!";break e}}as(c)}c=!1}c&&(a=s[0])}}return s=Mn(),s.memoizedState=s.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$y,lastRenderedState:a},s.queue=c,s=cb.bind(null,We,c),c.dispatch=s,c=Hp(!1),g=Wp.bind(null,We,!1,c.queue),c=Mn(),p={state:a,dispatch:null,action:t,pending:null},c.queue=p,s=p4.bind(null,We,p,g,s),p.dispatch=s,c.memoizedState=t,[a,s,!1]}function Ky(t){var a=nn();return Hy(a,Tt,t)}function Hy(t,a,s){if(a=Gp(t,a,$y)[0],t=Au(ji)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=Pl(a)}catch(w){throw w===ir?fu:w}else c=a;a=nn();var p=a.queue,g=p.dispatch;return s!==a.memoizedState&&(We.flags|=2048,cr(9,{destroy:void 0},h4.bind(null,p,s),null)),[c,g,t]}function h4(t,a){t.action=a}function Fy(t){var a=nn(),s=Tt;if(s!==null)return Hy(a,s,t);nn(),a=a.memoizedState,s=nn();var c=s.queue.dispatch;return s.memoizedState=t,[a,c,!1]}function cr(t,a,s,c){return t={tag:t,create:s,deps:c,inst:a,next:null},a=We.updateQueue,a===null&&(a=Su(),We.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=t.next=t:(c=s.next,s.next=t,t.next=c,a.lastEffect=t),t}function Qy(){return nn().memoizedState}function Nu(t,a,s,c){var p=Mn();We.flags|=t,p.memoizedState=cr(1|a,{destroy:void 0},s,c===void 0?null:c)}function Cu(t,a,s,c){var p=nn();c=c===void 0?null:c;var g=p.memoizedState.inst;Tt!==null&&c!==null&&Mp(c,Tt.memoizedState.deps)?p.memoizedState=cr(a,g,s,c):(We.flags|=t,p.memoizedState=cr(1|a,g,s,c))}function Zy(t,a){Nu(8390656,8,t,a)}function Qp(t,a){Cu(2048,8,t,a)}function f4(t){We.flags|=4;var a=We.updateQueue;if(a===null)a=Su(),We.updateQueue=a,a.events=[t];else{var s=a.events;s===null?a.events=[t]:s.push(t)}}function Yy(t){var a=nn().memoizedState;return f4({ref:a,nextImpl:t}),function(){if((wt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}function Xy(t,a){return Cu(4,2,t,a)}function Jy(t,a){return Cu(4,4,t,a)}function Wy(t,a){if(typeof a=="function"){t=t();var s=a(t);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function eb(t,a,s){s=s!=null?s.concat([t]):null,Cu(4,4,Wy.bind(null,a,t),s)}function Zp(){}function tb(t,a){var s=nn();a=a===void 0?null:a;var c=s.memoizedState;return a!==null&&Mp(a,c[1])?c[0]:(s.memoizedState=[t,a],t)}function nb(t,a){var s=nn();a=a===void 0?null:a;var c=s.memoizedState;if(a!==null&&Mp(a,c[1]))return c[0];if(c=t(),oo){$n(!0);try{t()}finally{$n(!1)}}return s.memoizedState=[c,a],c}function Yp(t,a,s){return s===void 0||(Si&1073741824)!==0&&(ut&261930)===0?t.memoizedState=a:(t.memoizedState=s,t=av(),We.lanes|=t,ms|=t,s)}function ab(t,a,s,c){return ta(s,a)?s:or.current!==null?(t=Yp(t,s,c),ta(t,a)||(cn=!0),t):(Si&42)===0||(Si&1073741824)!==0&&(ut&261930)===0?(cn=!0,t.memoizedState=s):(t=av(),We.lanes|=t,ms|=t,a)}function ib(t,a,s,c,p){var g=J.p;J.p=g!==0&&8>g?g:8;var w=P.T,A={};P.T=A,Wp(t,!1,a,s);try{var D=p(),G=P.S;if(G!==null&&G(A,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var ne=u4(D,c);ql(t,a,ne,ra(t))}else ql(t,a,c,ra(t))}catch(se){ql(t,a,{then:function(){},status:"rejected",reason:se},ra())}finally{J.p=g,w!==null&&A.types!==null&&(w.types=A.types),P.T=w}}function g4(){}function Xp(t,a,s,c){if(t.tag!==5)throw Error(o(476));var p=sb(t).queue;ib(t,p,a,be,s===null?g4:function(){return ob(t),s(c)})}function sb(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:be,baseState:be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ji,lastRenderedState:be},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ji,lastRenderedState:s},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function ob(t){var a=sb(t);a.next===null&&(a=t.alternate.memoizedState),ql(t,a.next.queue,{},ra())}function Jp(){return Nn(ec)}function rb(){return nn().memoizedState}function lb(){return nn().memoizedState}function y4(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var s=ra();t=os(s);var c=rs(a,t,s);c!==null&&(Zn(c,a,s),Dl(c,a,s)),a={cache:Cp()},t.payload=a;return}a=a.return}}function b4(t,a,s){var c=ra();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},_u(t)?ub(a,s):(s=gp(t,a,s,c),s!==null&&(Zn(s,t,c),db(s,a,c)))}function cb(t,a,s){var c=ra();ql(t,a,s,c)}function ql(t,a,s,c){var p={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(_u(t))ub(a,p);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=a.lastRenderedReducer,g!==null))try{var w=a.lastRenderedState,A=g(w,s);if(p.hasEagerState=!0,p.eagerState=A,ta(A,w))return lu(t,a,p,0),Dt===null&&ru(),!1}catch{}if(s=gp(t,a,p,c),s!==null)return Zn(s,t,c),db(s,a,c),!0}return!1}function Wp(t,a,s,c){if(c={lane:2,revertLane:Rh(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},_u(t)){if(a)throw Error(o(479))}else a=gp(t,s,c,2),a!==null&&Zn(a,t,2)}function _u(t){var a=t.alternate;return t===We||a!==null&&a===We}function ub(t,a){rr=wu=!0;var s=t.pending;s===null?a.next=a:(a.next=s.next,s.next=a),t.pending=a}function db(t,a,s){if((s&4194048)!==0){var c=a.lanes;c&=t.pendingLanes,s|=c,a.lanes=s,nl(t,s)}}var Ml={readContext:Nn,use:ju,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt,useHostTransitionStatus:Jt,useFormState:Jt,useActionState:Jt,useOptimistic:Jt,useMemoCache:Jt,useCacheRefresh:Jt};Ml.useEffectEvent=Jt;var mb={readContext:Nn,use:ju,useCallback:function(t,a){return Mn().memoizedState=[t,a===void 0?null:a],t},useContext:Nn,useEffect:Zy,useImperativeHandle:function(t,a,s){s=s!=null?s.concat([t]):null,Nu(4194308,4,Wy.bind(null,a,t),s)},useLayoutEffect:function(t,a){return Nu(4194308,4,t,a)},useInsertionEffect:function(t,a){Nu(4,2,t,a)},useMemo:function(t,a){var s=Mn();a=a===void 0?null:a;var c=t();if(oo){$n(!0);try{t()}finally{$n(!1)}}return s.memoizedState=[c,a],c},useReducer:function(t,a,s){var c=Mn();if(s!==void 0){var p=s(a);if(oo){$n(!0);try{s(a)}finally{$n(!1)}}}else p=a;return c.memoizedState=c.baseState=p,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:p},c.queue=t,t=t.dispatch=b4.bind(null,We,t),[c.memoizedState,t]},useRef:function(t){var a=Mn();return t={current:t},a.memoizedState=t},useState:function(t){t=Hp(t);var a=t.queue,s=cb.bind(null,We,a);return a.dispatch=s,[t.memoizedState,s]},useDebugValue:Zp,useDeferredValue:function(t,a){var s=Mn();return Yp(s,t,a)},useTransition:function(){var t=Hp(!1);return t=ib.bind(null,We,t.queue,!0,!1),Mn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,s){var c=We,p=Mn();if(ht){if(s===void 0)throw Error(o(407));s=s()}else{if(s=a(),Dt===null)throw Error(o(349));(ut&127)!==0||zy(c,a,s)}p.memoizedState=s;var g={value:s,getSnapshot:a};return p.queue=g,Zy(Oy.bind(null,c,g,t),[t]),c.flags|=2048,cr(9,{destroy:void 0},Iy.bind(null,c,g,s,a),null),s},useId:function(){var t=Mn(),a=Dt.identifierPrefix;if(ht){var s=ei,c=Wa;s=(c&~(1<<32-Qt(c)-1)).toString(32)+s,a="_"+a+"R_"+s,s=ku++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=d4++,a="_"+a+"r_"+s.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:Jp,useFormState:Gy,useActionState:Gy,useOptimistic:function(t){var a=Mn();a.memoizedState=a.baseState=t;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=Wp.bind(null,We,!0,s),s.dispatch=a,[t,a]},useMemoCache:$p,useCacheRefresh:function(){return Mn().memoizedState=y4.bind(null,We)},useEffectEvent:function(t){var a=Mn(),s={impl:t};return a.memoizedState=s,function(){if((wt&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},eh={readContext:Nn,use:ju,useCallback:tb,useContext:Nn,useEffect:Qp,useImperativeHandle:eb,useInsertionEffect:Xy,useLayoutEffect:Jy,useMemo:nb,useReducer:Au,useRef:Qy,useState:function(){return Au(ji)},useDebugValue:Zp,useDeferredValue:function(t,a){var s=nn();return ab(s,Tt.memoizedState,t,a)},useTransition:function(){var t=Au(ji)[0],a=nn().memoizedState;return[typeof t=="boolean"?t:Pl(t),a]},useSyncExternalStore:Dy,useId:rb,useHostTransitionStatus:Jp,useFormState:Ky,useActionState:Ky,useOptimistic:function(t,a){var s=nn();return My(s,Tt,t,a)},useMemoCache:$p,useCacheRefresh:lb};eh.useEffectEvent=Yy;var pb={readContext:Nn,use:ju,useCallback:tb,useContext:Nn,useEffect:Qp,useImperativeHandle:eb,useInsertionEffect:Xy,useLayoutEffect:Jy,useMemo:nb,useReducer:Kp,useRef:Qy,useState:function(){return Kp(ji)},useDebugValue:Zp,useDeferredValue:function(t,a){var s=nn();return Tt===null?Yp(s,t,a):ab(s,Tt.memoizedState,t,a)},useTransition:function(){var t=Kp(ji)[0],a=nn().memoizedState;return[typeof t=="boolean"?t:Pl(t),a]},useSyncExternalStore:Dy,useId:rb,useHostTransitionStatus:Jp,useFormState:Fy,useActionState:Fy,useOptimistic:function(t,a){var s=nn();return Tt!==null?My(s,Tt,t,a):(s.baseState=t,[t,s.queue.dispatch])},useMemoCache:$p,useCacheRefresh:lb};pb.useEffectEvent=Yy;function th(t,a,s,c){a=t.memoizedState,s=s(c,a),s=s==null?a:S({},a,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var nh={enqueueSetState:function(t,a,s){t=t._reactInternals;var c=ra(),p=os(c);p.payload=a,s!=null&&(p.callback=s),a=rs(t,p,c),a!==null&&(Zn(a,t,c),Dl(a,t,c))},enqueueReplaceState:function(t,a,s){t=t._reactInternals;var c=ra(),p=os(c);p.tag=1,p.payload=a,s!=null&&(p.callback=s),a=rs(t,p,c),a!==null&&(Zn(a,t,c),Dl(a,t,c))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var s=ra(),c=os(s);c.tag=2,a!=null&&(c.callback=a),a=rs(t,c,s),a!==null&&(Zn(a,t,s),Dl(a,t,s))}};function hb(t,a,s,c,p,g,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,w):a.prototype&&a.prototype.isPureReactComponent?!jl(s,c)||!jl(p,g):!0}function fb(t,a,s,c){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,c),a.state!==t&&nh.enqueueReplaceState(a,a.state,null)}function ro(t,a){var s=a;if("ref"in a){s={};for(var c in a)c!=="ref"&&(s[c]=a[c])}if(t=t.defaultProps){s===a&&(s=S({},s));for(var p in t)s[p]===void 0&&(s[p]=t[p])}return s}function gb(t){ou(t)}function yb(t){console.error(t)}function bb(t){ou(t)}function Tu(t,a){try{var s=t.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function vb(t,a,s){try{var c=t.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function ah(t,a,s){return s=os(s),s.tag=3,s.payload={element:null},s.callback=function(){Tu(t,a)},s}function xb(t){return t=os(t),t.tag=3,t}function wb(t,a,s,c){var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var g=c.value;t.payload=function(){return p(g)},t.callback=function(){vb(a,s,c)}}var w=s.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(t.callback=function(){vb(a,s,c),typeof p!="function"&&(ps===null?ps=new Set([this]):ps.add(this));var A=c.stack;this.componentDidCatch(c.value,{componentStack:A!==null?A:""})})}function v4(t,a,s,c,p){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=s.alternate,a!==null&&tr(a,s,p,!0),s=aa.current,s!==null){switch(s.tag){case 31:case 13:return Aa===null?Uu():s.alternate===null&&Wt===0&&(Wt=3),s.flags&=-257,s.flags|=65536,s.lanes=p,c===gu?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([c]):a.add(c),_h(t,c,p)),!1;case 22:return s.flags|=65536,c===gu?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([c]):s.add(c)),_h(t,c,p)),!1}throw Error(o(435,s.tag))}return _h(t,c,p),Uu(),!1}if(ht)return a=aa.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==kp&&(t=Error(o(422),{cause:c}),Cl(wa(t,s)))):(c!==kp&&(a=Error(o(423),{cause:c}),Cl(wa(a,s))),t=t.current.alternate,t.flags|=65536,p&=-p,t.lanes|=p,c=wa(c,s),p=ah(t.stateNode,c,p),zp(t,p),Wt!==4&&(Wt=2)),!1;var g=Error(o(520),{cause:c});if(g=wa(g,s),Hl===null?Hl=[g]:Hl.push(g),Wt!==4&&(Wt=2),a===null)return!0;c=wa(c,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,t=p&-p,s.lanes|=t,t=ah(s.stateNode,c,t),zp(s,t),!1;case 1:if(a=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(ps===null||!ps.has(g))))return s.flags|=65536,p&=-p,s.lanes|=p,p=xb(p),wb(p,t,s,c),zp(s,p),!1}s=s.return}while(s!==null);return!1}var ih=Error(o(461)),cn=!1;function Cn(t,a,s,c){a.child=t===null?Ay(a,null,s,c):so(a,t.child,s,c)}function kb(t,a,s,c,p){s=s.render;var g=a.ref;if("ref"in c){var w={};for(var A in c)A!=="ref"&&(w[A]=c[A])}else w=c;return to(a),c=Bp(t,a,s,w,g,p),A=Lp(),t!==null&&!cn?(Up(t,a,p),Ai(t,a,p)):(ht&&A&&xp(a),a.flags|=1,Cn(t,a,c,p),a.child)}function Sb(t,a,s,c,p){if(t===null){var g=s.type;return typeof g=="function"&&!yp(g)&&g.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=g,jb(t,a,g,c,p)):(t=uu(s.type,null,c,a,a.mode,p),t.ref=a.ref,t.return=a,a.child=t)}if(g=t.child,!mh(t,p)){var w=g.memoizedProps;if(s=s.compare,s=s!==null?s:jl,s(w,c)&&t.ref===a.ref)return Ai(t,a,p)}return a.flags|=1,t=vi(g,c),t.ref=a.ref,t.return=a,a.child=t}function jb(t,a,s,c,p){if(t!==null){var g=t.memoizedProps;if(jl(g,c)&&t.ref===a.ref)if(cn=!1,a.pendingProps=c=g,mh(t,p))(t.flags&131072)!==0&&(cn=!0);else return a.lanes=t.lanes,Ai(t,a,p)}return sh(t,a,s,c,p)}function Ab(t,a,s,c){var p=c.children,g=t!==null?t.memoizedState:null;if(t===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,t!==null){for(c=a.child=t.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~g}else c=0,a.child=null;return Nb(t,a,g,s,c)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&hu(a,g!==null?g.cachePool:null),g!==null?_y(a,g):Op(),Ty(a);else return c=a.lanes=536870912,Nb(t,a,g!==null?g.baseLanes|s:s,s,c)}else g!==null?(hu(a,g.cachePool),_y(a,g),cs(),a.memoizedState=null):(t!==null&&hu(a,null),Op(),cs());return Cn(t,a,p,s),a.child}function Bl(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Nb(t,a,s,c,p){var g=Tp();return g=g===null?null:{parent:rn._currentValue,pool:g},a.memoizedState={baseLanes:s,cachePool:g},t!==null&&hu(a,null),Op(),Ty(a),t!==null&&tr(t,a,c,!0),a.childLanes=p,null}function Eu(t,a){return a=Du({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function Cb(t,a,s){return so(a,t.child,null,s),t=Eu(a,a.pendingProps),t.flags|=2,ia(a),a.memoizedState=null,t}function x4(t,a,s){var c=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(ht){if(c.mode==="hidden")return t=Eu(a,c),a.lanes=536870912,Bl(null,t);if(qp(a),(t=Pt)?(t=Bv(t,ja),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:ts!==null?{id:Wa,overflow:ei}:null,retryLane:536870912,hydrationErrors:null},s=uy(t),s.return=a,a.child=s,An=a,Pt=null)):t=null,t===null)throw as(a);return a.lanes=536870912,null}return Eu(a,c)}var g=t.memoizedState;if(g!==null){var w=g.dehydrated;if(qp(a),p)if(a.flags&256)a.flags&=-257,a=Cb(t,a,s);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(o(558));else if(cn||tr(t,a,s,!1),p=(s&t.childLanes)!==0,cn||p){if(c=Dt,c!==null&&(w=al(c,s),w!==0&&w!==g.retryLane))throw g.retryLane=w,Xs(t,w),Zn(c,t,w),ih;Uu(),a=Cb(t,a,s)}else t=g.treeContext,Pt=Na(w.nextSibling),An=a,ht=!0,ns=null,ja=!1,t!==null&&py(a,t),a=Eu(a,c),a.flags|=4096;return a}return t=vi(t.child,{mode:c.mode,children:c.children}),t.ref=a.ref,a.child=t,t.return=a,t}function Ru(t,a){var s=a.ref;if(s===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(t===null||t.ref!==s)&&(a.flags|=4194816)}}function sh(t,a,s,c,p){return to(a),s=Bp(t,a,s,c,void 0,p),c=Lp(),t!==null&&!cn?(Up(t,a,p),Ai(t,a,p)):(ht&&c&&xp(a),a.flags|=1,Cn(t,a,s,p),a.child)}function _b(t,a,s,c,p,g){return to(a),a.updateQueue=null,s=Ry(a,c,s,p),Ey(t),c=Lp(),t!==null&&!cn?(Up(t,a,g),Ai(t,a,g)):(ht&&c&&xp(a),a.flags|=1,Cn(t,a,s,g),a.child)}function Tb(t,a,s,c,p){if(to(a),a.stateNode===null){var g=Xo,w=s.contextType;typeof w=="object"&&w!==null&&(g=Nn(w)),g=new s(c,g),a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=nh,a.stateNode=g,g._reactInternals=a,g=a.stateNode,g.props=c,g.state=a.memoizedState,g.refs={},Rp(a),w=s.contextType,g.context=typeof w=="object"&&w!==null?Nn(w):Xo,g.state=a.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(th(a,s,w,c),g.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(w=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),w!==g.state&&nh.enqueueReplaceState(g,g.state,null),Il(a,c,g,p),zl(),g.state=a.memoizedState),typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(t===null){g=a.stateNode;var A=a.memoizedProps,D=ro(s,A);g.props=D;var G=g.context,ne=s.contextType;w=Xo,typeof ne=="object"&&ne!==null&&(w=Nn(ne));var se=s.getDerivedStateFromProps;ne=typeof se=="function"||typeof g.getSnapshotBeforeUpdate=="function",A=a.pendingProps!==A,ne||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(A||G!==w)&&fb(a,g,c,w),ss=!1;var H=a.memoizedState;g.state=H,Il(a,c,g,p),zl(),G=a.memoizedState,A||H!==G||ss?(typeof se=="function"&&(th(a,s,se,c),G=a.memoizedState),(D=ss||hb(a,s,D,c,H,G,w))?(ne||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(a.flags|=4194308)):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=G),g.props=c,g.state=G,g.context=w,c=D):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{g=a.stateNode,Dp(t,a),w=a.memoizedProps,ne=ro(s,w),g.props=ne,se=a.pendingProps,H=g.context,G=s.contextType,D=Xo,typeof G=="object"&&G!==null&&(D=Nn(G)),A=s.getDerivedStateFromProps,(G=typeof A=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(w!==se||H!==D)&&fb(a,g,c,D),ss=!1,H=a.memoizedState,g.state=H,Il(a,c,g,p),zl();var Q=a.memoizedState;w!==se||H!==Q||ss||t!==null&&t.dependencies!==null&&mu(t.dependencies)?(typeof A=="function"&&(th(a,s,A,c),Q=a.memoizedState),(ne=ss||hb(a,s,ne,c,H,Q,D)||t!==null&&t.dependencies!==null&&mu(t.dependencies))?(G||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,Q,D),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,Q,D)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&H===t.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&H===t.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=Q),g.props=c,g.state=Q,g.context=D,c=ne):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&H===t.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&H===t.memoizedState||(a.flags|=1024),c=!1)}return g=c,Ru(t,a),c=(a.flags&128)!==0,g||c?(g=a.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:g.render(),a.flags|=1,t!==null&&c?(a.child=so(a,t.child,null,p),a.child=so(a,null,s,p)):Cn(t,a,s,p),a.memoizedState=g.state,t=a.child):t=Ai(t,a,p),t}function Eb(t,a,s,c){return Ws(),a.flags|=256,Cn(t,a,s,c),a.child}var oh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rh(t){return{baseLanes:t,cachePool:vy()}}function lh(t,a,s){return t=t!==null?t.childLanes&~s:0,a&&(t|=oa),t}function Rb(t,a,s){var c=a.pendingProps,p=!1,g=(a.flags&128)!==0,w;if((w=g)||(w=t!==null&&t.memoizedState===null?!1:(tn.current&2)!==0),w&&(p=!0,a.flags&=-129),w=(a.flags&32)!==0,a.flags&=-33,t===null){if(ht){if(p?ls(a):cs(),(t=Pt)?(t=Bv(t,ja),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:ts!==null?{id:Wa,overflow:ei}:null,retryLane:536870912,hydrationErrors:null},s=uy(t),s.return=a,a.child=s,An=a,Pt=null)):t=null,t===null)throw as(a);return Gh(t)?a.lanes=32:a.lanes=536870912,null}var A=c.children;return c=c.fallback,p?(cs(),p=a.mode,A=Du({mode:"hidden",children:A},p),c=Js(c,p,s,null),A.return=a,c.return=a,A.sibling=c,a.child=A,c=a.child,c.memoizedState=rh(s),c.childLanes=lh(t,w,s),a.memoizedState=oh,Bl(null,c)):(ls(a),ch(a,A))}var D=t.memoizedState;if(D!==null&&(A=D.dehydrated,A!==null)){if(g)a.flags&256?(ls(a),a.flags&=-257,a=uh(t,a,s)):a.memoizedState!==null?(cs(),a.child=t.child,a.flags|=128,a=null):(cs(),A=c.fallback,p=a.mode,c=Du({mode:"visible",children:c.children},p),A=Js(A,p,s,null),A.flags|=2,c.return=a,A.return=a,c.sibling=A,a.child=c,so(a,t.child,null,s),c=a.child,c.memoizedState=rh(s),c.childLanes=lh(t,w,s),a.memoizedState=oh,a=Bl(null,c));else if(ls(a),Gh(A)){if(w=A.nextSibling&&A.nextSibling.dataset,w)var G=w.dgst;w=G,c=Error(o(419)),c.stack="",c.digest=w,Cl({value:c,source:null,stack:null}),a=uh(t,a,s)}else if(cn||tr(t,a,s,!1),w=(s&t.childLanes)!==0,cn||w){if(w=Dt,w!==null&&(c=al(w,s),c!==0&&c!==D.retryLane))throw D.retryLane=c,Xs(t,c),Zn(w,t,c),ih;$h(A)||Uu(),a=uh(t,a,s)}else $h(A)?(a.flags|=192,a.child=t.child,a=null):(t=D.treeContext,Pt=Na(A.nextSibling),An=a,ht=!0,ns=null,ja=!1,t!==null&&py(a,t),a=ch(a,c.children),a.flags|=4096);return a}return p?(cs(),A=c.fallback,p=a.mode,D=t.child,G=D.sibling,c=vi(D,{mode:"hidden",children:c.children}),c.subtreeFlags=D.subtreeFlags&65011712,G!==null?A=vi(G,A):(A=Js(A,p,s,null),A.flags|=2),A.return=a,c.return=a,c.sibling=A,a.child=c,Bl(null,c),c=a.child,A=t.child.memoizedState,A===null?A=rh(s):(p=A.cachePool,p!==null?(D=rn._currentValue,p=p.parent!==D?{parent:D,pool:D}:p):p=vy(),A={baseLanes:A.baseLanes|s,cachePool:p}),c.memoizedState=A,c.childLanes=lh(t,w,s),a.memoizedState=oh,Bl(t.child,c)):(ls(a),s=t.child,t=s.sibling,s=vi(s,{mode:"visible",children:c.children}),s.return=a,s.sibling=null,t!==null&&(w=a.deletions,w===null?(a.deletions=[t],a.flags|=16):w.push(t)),a.child=s,a.memoizedState=null,s)}function ch(t,a){return a=Du({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function Du(t,a){return t=na(22,t,null,a),t.lanes=0,t}function uh(t,a,s){return so(a,t.child,null,s),t=ch(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function Db(t,a,s){t.lanes|=a;var c=t.alternate;c!==null&&(c.lanes|=a),Ap(t.return,a,s)}function dh(t,a,s,c,p,g){var w=t.memoizedState;w===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:p,treeForkCount:g}:(w.isBackwards=a,w.rendering=null,w.renderingStartTime=0,w.last=c,w.tail=s,w.tailMode=p,w.treeForkCount=g)}function zb(t,a,s){var c=a.pendingProps,p=c.revealOrder,g=c.tail;c=c.children;var w=tn.current,A=(w&2)!==0;if(A?(w=w&1|2,a.flags|=128):w&=1,ve(tn,w),Cn(t,a,c,s),c=ht?Nl:0,!A&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Db(t,s,a);else if(t.tag===19)Db(t,s,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(p){case"forwards":for(s=a.child,p=null;s!==null;)t=s.alternate,t!==null&&xu(t)===null&&(p=s),s=s.sibling;s=p,s===null?(p=a.child,a.child=null):(p=s.sibling,s.sibling=null),dh(a,!1,p,s,g,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,p=a.child,a.child=null;p!==null;){if(t=p.alternate,t!==null&&xu(t)===null){a.child=p;break}t=p.sibling,p.sibling=s,s=p,p=t}dh(a,!0,s,null,g,c);break;case"together":dh(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function Ai(t,a,s){if(t!==null&&(a.dependencies=t.dependencies),ms|=a.lanes,(s&a.childLanes)===0)if(t!==null){if(tr(t,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(o(153));if(a.child!==null){for(t=a.child,s=vi(t,t.pendingProps),a.child=s,s.return=a;t.sibling!==null;)t=t.sibling,s=s.sibling=vi(t,t.pendingProps),s.return=a;s.sibling=null}return a.child}function mh(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&mu(t)))}function w4(t,a,s){switch(a.tag){case 3:Oe(a,a.stateNode.containerInfo),is(a,rn,t.memoizedState.cache),Ws();break;case 27:case 5:st(a);break;case 4:Oe(a,a.stateNode.containerInfo);break;case 10:is(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,qp(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(ls(a),a.flags|=128,null):(s&a.child.childLanes)!==0?Rb(t,a,s):(ls(a),t=Ai(t,a,s),t!==null?t.sibling:null);ls(a);break;case 19:var p=(t.flags&128)!==0;if(c=(s&a.childLanes)!==0,c||(tr(t,a,s,!1),c=(s&a.childLanes)!==0),p){if(c)return zb(t,a,s);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),ve(tn,tn.current),c)break;return null;case 22:return a.lanes=0,Ab(t,a,s,a.pendingProps);case 24:is(a,rn,t.memoizedState.cache)}return Ai(t,a,s)}function Ib(t,a,s){if(t!==null)if(t.memoizedProps!==a.pendingProps)cn=!0;else{if(!mh(t,s)&&(a.flags&128)===0)return cn=!1,w4(t,a,s);cn=(t.flags&131072)!==0}else cn=!1,ht&&(a.flags&1048576)!==0&&my(a,Nl,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(t=ao(a.elementType),a.type=t,typeof t=="function")yp(t)?(c=ro(t,c),a.tag=1,a=Tb(null,a,t,c,s)):(a.tag=0,a=sh(null,a,t,c,s));else{if(t!=null){var p=t.$$typeof;if(p===U){a.tag=11,a=kb(null,a,t,c,s);break e}else if(p===B){a.tag=14,a=Sb(null,a,t,c,s);break e}}throw a=Se(t)||t,Error(o(306,a,""))}}return a;case 0:return sh(t,a,a.type,a.pendingProps,s);case 1:return c=a.type,p=ro(c,a.pendingProps),Tb(t,a,c,p,s);case 3:e:{if(Oe(a,a.stateNode.containerInfo),t===null)throw Error(o(387));c=a.pendingProps;var g=a.memoizedState;p=g.element,Dp(t,a),Il(a,c,null,s);var w=a.memoizedState;if(c=w.cache,is(a,rn,c),c!==g.cache&&Np(a,[rn],s,!0),zl(),c=w.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:w.cache},a.updateQueue.baseState=g,a.memoizedState=g,a.flags&256){a=Eb(t,a,c,s);break e}else if(c!==p){p=wa(Error(o(424)),a),Cl(p),a=Eb(t,a,c,s);break e}else for(t=a.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,Pt=Na(t.firstChild),An=a,ht=!0,ns=null,ja=!0,s=Ay(a,null,c,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Ws(),c===p){a=Ai(t,a,s);break e}Cn(t,a,c,s)}a=a.child}return a;case 26:return Ru(t,a),t===null?(s=Kv(a.type,null,a.pendingProps,null))?a.memoizedState=s:ht||(s=a.type,t=a.pendingProps,c=Qu(F.current).createElement(s),c[on]=a,c[Dn]=t,_n(c,s,t),en(c),a.stateNode=c):a.memoizedState=Kv(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return st(a),t===null&&ht&&(c=a.stateNode=Vv(a.type,a.pendingProps,F.current),An=a,ja=!0,p=Pt,ys(a.type)?(Kh=p,Pt=Na(c.firstChild)):Pt=p),Cn(t,a,a.pendingProps.children,s),Ru(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&ht&&((p=c=Pt)&&(c=X4(c,a.type,a.pendingProps,ja),c!==null?(a.stateNode=c,An=a,Pt=Na(c.firstChild),ja=!1,p=!0):p=!1),p||as(a)),st(a),p=a.type,g=a.pendingProps,w=t!==null?t.memoizedProps:null,c=g.children,Lh(p,g)?c=null:w!==null&&Lh(p,w)&&(a.flags|=32),a.memoizedState!==null&&(p=Bp(t,a,m4,null,null,s),ec._currentValue=p),Ru(t,a),Cn(t,a,c,s),a.child;case 6:return t===null&&ht&&((t=s=Pt)&&(s=J4(s,a.pendingProps,ja),s!==null?(a.stateNode=s,An=a,Pt=null,t=!0):t=!1),t||as(a)),null;case 13:return Rb(t,a,s);case 4:return Oe(a,a.stateNode.containerInfo),c=a.pendingProps,t===null?a.child=so(a,null,c,s):Cn(t,a,c,s),a.child;case 11:return kb(t,a,a.type,a.pendingProps,s);case 7:return Cn(t,a,a.pendingProps,s),a.child;case 8:return Cn(t,a,a.pendingProps.children,s),a.child;case 12:return Cn(t,a,a.pendingProps.children,s),a.child;case 10:return c=a.pendingProps,is(a,a.type,c.value),Cn(t,a,c.children,s),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,to(a),p=Nn(p),c=c(p),a.flags|=1,Cn(t,a,c,s),a.child;case 14:return Sb(t,a,a.type,a.pendingProps,s);case 15:return jb(t,a,a.type,a.pendingProps,s);case 19:return zb(t,a,s);case 31:return x4(t,a,s);case 22:return Ab(t,a,s,a.pendingProps);case 24:return to(a),c=Nn(rn),t===null?(p=Tp(),p===null&&(p=Dt,g=Cp(),p.pooledCache=g,g.refCount++,g!==null&&(p.pooledCacheLanes|=s),p=g),a.memoizedState={parent:c,cache:p},Rp(a),is(a,rn,p)):((t.lanes&s)!==0&&(Dp(t,a),Il(a,null,null,s),zl()),p=t.memoizedState,g=a.memoizedState,p.parent!==c?(p={parent:c,cache:c},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),is(a,rn,c)):(c=g.cache,is(a,rn,c),c!==p.cache&&Np(a,[rn],s,!0))),Cn(t,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(o(156,a.tag))}function Ni(t){t.flags|=4}function ph(t,a,s,c,p){if((a=(t.mode&32)!==0)&&(a=!1),a){if(t.flags|=16777216,(p&335544128)===p)if(t.stateNode.complete)t.flags|=8192;else if(rv())t.flags|=8192;else throw io=gu,Ep}else t.flags&=-16777217}function Ob(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Yv(a))if(rv())t.flags|=8192;else throw io=gu,Ep}function zu(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?mi():536870912,t.lanes|=a,pr|=a)}function Ll(t,a){if(!ht)switch(t.tailMode){case"hidden":a=t.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t.tail=null:s.sibling=null;break;case"collapsed":s=t.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function qt(t){var a=t.alternate!==null&&t.alternate.child===t.child,s=0,c=0;if(a)for(var p=t.child;p!==null;)s|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)s|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=c,t.childLanes=s,a}function k4(t,a,s){var c=a.pendingProps;switch(wp(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qt(a),null;case 1:return qt(a),null;case 3:return s=a.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),ki(rn),Ae(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(t===null||t.child===null)&&(er(a)?Ni(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Sp())),qt(a),null;case 26:var p=a.type,g=a.memoizedState;return t===null?(Ni(a),g!==null?(qt(a),Ob(a,g)):(qt(a),ph(a,p,null,c,s))):g?g!==t.memoizedState?(Ni(a),qt(a),Ob(a,g)):(qt(a),a.flags&=-16777217):(t=t.memoizedProps,t!==c&&Ni(a),qt(a),ph(a,p,t,c,s)),null;case 27:if(Ve(a),s=F.current,p=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==c&&Ni(a);else{if(!c){if(a.stateNode===null)throw Error(o(166));return qt(a),null}t=de.current,er(a)?hy(a):(t=Vv(p,c,s),a.stateNode=t,Ni(a))}return qt(a),null;case 5:if(Ve(a),p=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==c&&Ni(a);else{if(!c){if(a.stateNode===null)throw Error(o(166));return qt(a),null}if(g=de.current,er(a))hy(a);else{var w=Qu(F.current);switch(g){case 1:g=w.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:g=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":g=w.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":g=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":g=w.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?w.createElement("select",{is:c.is}):w.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?w.createElement(p,{is:c.is}):w.createElement(p)}}g[on]=a,g[Dn]=c;e:for(w=a.child;w!==null;){if(w.tag===5||w.tag===6)g.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===a)break e;for(;w.sibling===null;){if(w.return===null||w.return===a)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}a.stateNode=g;e:switch(_n(g,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Ni(a)}}return qt(a),ph(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,s),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==c&&Ni(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(o(166));if(t=F.current,er(a)){if(t=a.stateNode,s=a.memoizedProps,c=null,p=An,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}t[on]=a,t=!!(t.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||Rv(t.nodeValue,s)),t||as(a,!0)}else t=Qu(t).createTextNode(c),t[on]=a,a.stateNode=t}return qt(a),null;case 31:if(s=a.memoizedState,t===null||t.memoizedState!==null){if(c=er(a),s!==null){if(t===null){if(!c)throw Error(o(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[on]=a}else Ws(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;qt(a),t=!1}else s=Sp(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),t=!0;if(!t)return a.flags&256?(ia(a),a):(ia(a),null);if((a.flags&128)!==0)throw Error(o(558))}return qt(a),null;case 13:if(c=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(p=er(a),c!==null&&c.dehydrated!==null){if(t===null){if(!p)throw Error(o(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(o(317));p[on]=a}else Ws(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;qt(a),p=!1}else p=Sp(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(ia(a),a):(ia(a),null)}return ia(a),(a.flags&128)!==0?(a.lanes=s,a):(s=c!==null,t=t!==null&&t.memoizedState!==null,s&&(c=a.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==p&&(c.flags|=2048)),s!==t&&s&&(a.child.flags|=8192),zu(a,a.updateQueue),qt(a),null);case 4:return Ae(),t===null&&Oh(a.stateNode.containerInfo),qt(a),null;case 10:return ki(a.type),qt(a),null;case 19:if(qe(tn),c=a.memoizedState,c===null)return qt(a),null;if(p=(a.flags&128)!==0,g=c.rendering,g===null)if(p)Ll(c,!1);else{if(Wt!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(g=xu(t),g!==null){for(a.flags|=128,Ll(c,!1),t=g.updateQueue,a.updateQueue=t,zu(a,t),a.subtreeFlags=0,t=s,s=a.child;s!==null;)cy(s,t),s=s.sibling;return ve(tn,tn.current&1|2),ht&&xi(a,c.treeForkCount),a.child}t=t.sibling}c.tail!==null&&Ut()>Mu&&(a.flags|=128,p=!0,Ll(c,!1),a.lanes=4194304)}else{if(!p)if(t=xu(g),t!==null){if(a.flags|=128,p=!0,t=t.updateQueue,a.updateQueue=t,zu(a,t),Ll(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!ht)return qt(a),null}else 2*Ut()-c.renderingStartTime>Mu&&s!==536870912&&(a.flags|=128,p=!0,Ll(c,!1),a.lanes=4194304);c.isBackwards?(g.sibling=a.child,a.child=g):(t=c.last,t!==null?t.sibling=g:a.child=g,c.last=g)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Ut(),t.sibling=null,s=tn.current,ve(tn,p?s&1|2:s&1),ht&&xi(a,c.treeForkCount),t):(qt(a),null);case 22:case 23:return ia(a),Pp(),c=a.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(s&536870912)!==0&&(a.flags&128)===0&&(qt(a),a.subtreeFlags&6&&(a.flags|=8192)):qt(a),s=a.updateQueue,s!==null&&zu(a,s.retryQueue),s=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==s&&(a.flags|=2048),t!==null&&qe(no),null;case 24:return s=null,t!==null&&(s=t.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),ki(rn),qt(a),null;case 25:return null;case 30:return null}throw Error(o(156,a.tag))}function S4(t,a){switch(wp(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return ki(rn),Ae(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Ve(a),null;case 31:if(a.memoizedState!==null){if(ia(a),a.alternate===null)throw Error(o(340));Ws()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(ia(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(o(340));Ws()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return qe(tn),null;case 4:return Ae(),null;case 10:return ki(a.type),null;case 22:case 23:return ia(a),Pp(),t!==null&&qe(no),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return ki(rn),null;case 25:return null;default:return null}}function Pb(t,a){switch(wp(a),a.tag){case 3:ki(rn),Ae();break;case 26:case 27:case 5:Ve(a);break;case 4:Ae();break;case 31:a.memoizedState!==null&&ia(a);break;case 13:ia(a);break;case 19:qe(tn);break;case 10:ki(a.type);break;case 22:case 23:ia(a),Pp(),t!==null&&qe(no);break;case 24:ki(rn)}}function Ul(t,a){try{var s=a.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var p=c.next;s=p;do{if((s.tag&t)===t){c=void 0;var g=s.create,w=s.inst;c=g(),w.destroy=c}s=s.next}while(s!==p)}}catch(A){Ct(a,a.return,A)}}function us(t,a,s){try{var c=a.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var g=p.next;c=g;do{if((c.tag&t)===t){var w=c.inst,A=w.destroy;if(A!==void 0){w.destroy=void 0,p=a;var D=s,G=A;try{G()}catch(ne){Ct(p,D,ne)}}}c=c.next}while(c!==g)}}catch(ne){Ct(a,a.return,ne)}}function qb(t){var a=t.updateQueue;if(a!==null){var s=t.stateNode;try{Cy(a,s)}catch(c){Ct(t,t.return,c)}}}function Mb(t,a,s){s.props=ro(t.type,t.memoizedProps),s.state=t.memoizedState;try{s.componentWillUnmount()}catch(c){Ct(t,a,c)}}function Vl(t,a){try{var s=t.ref;if(s!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof s=="function"?t.refCleanup=s(c):s.current=c}}catch(p){Ct(t,a,p)}}function ti(t,a){var s=t.ref,c=t.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(p){Ct(t,a,p)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){Ct(t,a,p)}else s.current=null}function Bb(t){var a=t.type,s=t.memoizedProps,c=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(p){Ct(t,t.return,p)}}function hh(t,a,s){try{var c=t.stateNode;K4(c,t.type,s,a),c[Dn]=a}catch(p){Ct(t,t.return,p)}}function Lb(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&ys(t.type)||t.tag===4}function fh(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Lb(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&ys(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function gh(t,a,s){var c=t.tag;if(c===5||c===6)t=t.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(t,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(t),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=Pa));else if(c!==4&&(c===27&&ys(t.type)&&(s=t.stateNode,a=null),t=t.child,t!==null))for(gh(t,a,s),t=t.sibling;t!==null;)gh(t,a,s),t=t.sibling}function Iu(t,a,s){var c=t.tag;if(c===5||c===6)t=t.stateNode,a?s.insertBefore(t,a):s.appendChild(t);else if(c!==4&&(c===27&&ys(t.type)&&(s=t.stateNode),t=t.child,t!==null))for(Iu(t,a,s),t=t.sibling;t!==null;)Iu(t,a,s),t=t.sibling}function Ub(t){var a=t.stateNode,s=t.memoizedProps;try{for(var c=t.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);_n(a,c,s),a[on]=t,a[Dn]=s}catch(g){Ct(t,t.return,g)}}var Ci=!1,un=!1,yh=!1,Vb=typeof WeakSet=="function"?WeakSet:Set,bn=null;function j4(t,a){if(t=t.containerInfo,Mh=td,t=ey(t),up(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var p=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var w=0,A=-1,D=-1,G=0,ne=0,se=t,H=null;t:for(;;){for(var Q;se!==s||p!==0&&se.nodeType!==3||(A=w+p),se!==g||c!==0&&se.nodeType!==3||(D=w+c),se.nodeType===3&&(w+=se.nodeValue.length),(Q=se.firstChild)!==null;)H=se,se=Q;for(;;){if(se===t)break t;if(H===s&&++G===p&&(A=w),H===g&&++ne===c&&(D=w),(Q=se.nextSibling)!==null)break;se=H,H=se.parentNode}se=Q}s=A===-1||D===-1?null:{start:A,end:D}}else s=null}s=s||{start:0,end:0}}else s=null;for(Bh={focusedElem:t,selectionRange:s},td=!1,bn=a;bn!==null;)if(a=bn,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,bn=t;else for(;bn!==null;){switch(a=bn,g=a.alternate,t=a.flags,a.tag){case 0:if((t&4)!==0&&(t=a.updateQueue,t=t!==null?t.events:null,t!==null))for(s=0;s<t.length;s++)p=t[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,s=a,p=g.memoizedProps,g=g.memoizedState,c=s.stateNode;try{var Ne=ro(s.type,p);t=c.getSnapshotBeforeUpdate(Ne,g),c.__reactInternalSnapshotBeforeUpdate=t}catch(Ge){Ct(s,s.return,Ge)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,s=t.nodeType,s===9)Vh(t);else if(s===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Vh(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(o(163))}if(t=a.sibling,t!==null){t.return=a.return,bn=t;break}bn=a.return}}function $b(t,a,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:Ti(t,s),c&4&&Ul(5,s);break;case 1:if(Ti(t,s),c&4)if(t=s.stateNode,a===null)try{t.componentDidMount()}catch(w){Ct(s,s.return,w)}else{var p=ro(s.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(p,a,t.__reactInternalSnapshotBeforeUpdate)}catch(w){Ct(s,s.return,w)}}c&64&&qb(s),c&512&&Vl(s,s.return);break;case 3:if(Ti(t,s),c&64&&(t=s.updateQueue,t!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{Cy(t,a)}catch(w){Ct(s,s.return,w)}}break;case 27:a===null&&c&4&&Ub(s);case 26:case 5:Ti(t,s),a===null&&c&4&&Bb(s),c&512&&Vl(s,s.return);break;case 12:Ti(t,s);break;case 31:Ti(t,s),c&4&&Hb(t,s);break;case 13:Ti(t,s),c&4&&Fb(t,s),c&64&&(t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(s=z4.bind(null,s),W4(t,s))));break;case 22:if(c=s.memoizedState!==null||Ci,!c){a=a!==null&&a.memoizedState!==null||un,p=Ci;var g=un;Ci=c,(un=a)&&!g?Ei(t,s,(s.subtreeFlags&8772)!==0):Ti(t,s),Ci=p,un=g}break;case 30:break;default:Ti(t,s)}}function Gb(t){var a=t.alternate;a!==null&&(t.alternate=null,Gb(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&ol(a)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Vt=null,Kn=!1;function _i(t,a,s){for(s=s.child;s!==null;)Kb(t,a,s),s=s.sibling}function Kb(t,a,s){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(yn,s)}catch{}switch(s.tag){case 26:un||ti(s,a),_i(t,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:un||ti(s,a);var c=Vt,p=Kn;ys(s.type)&&(Vt=s.stateNode,Kn=!1),_i(t,a,s),Xl(s.stateNode),Vt=c,Kn=p;break;case 5:un||ti(s,a);case 6:if(c=Vt,p=Kn,Vt=null,_i(t,a,s),Vt=c,Kn=p,Vt!==null)if(Kn)try{(Vt.nodeType===9?Vt.body:Vt.nodeName==="HTML"?Vt.ownerDocument.body:Vt).removeChild(s.stateNode)}catch(g){Ct(s,a,g)}else try{Vt.removeChild(s.stateNode)}catch(g){Ct(s,a,g)}break;case 18:Vt!==null&&(Kn?(t=Vt,qv(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,s.stateNode),wr(t)):qv(Vt,s.stateNode));break;case 4:c=Vt,p=Kn,Vt=s.stateNode.containerInfo,Kn=!0,_i(t,a,s),Vt=c,Kn=p;break;case 0:case 11:case 14:case 15:us(2,s,a),un||us(4,s,a),_i(t,a,s);break;case 1:un||(ti(s,a),c=s.stateNode,typeof c.componentWillUnmount=="function"&&Mb(s,a,c)),_i(t,a,s);break;case 21:_i(t,a,s);break;case 22:un=(c=un)||s.memoizedState!==null,_i(t,a,s),un=c;break;default:_i(t,a,s)}}function Hb(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{wr(t)}catch(s){Ct(a,a.return,s)}}}function Fb(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{wr(t)}catch(s){Ct(a,a.return,s)}}function A4(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new Vb),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new Vb),a;default:throw Error(o(435,t.tag))}}function Ou(t,a){var s=A4(t);a.forEach(function(c){if(!s.has(c)){s.add(c);var p=I4.bind(null,t,c);c.then(p,p)}})}function Hn(t,a){var s=a.deletions;if(s!==null)for(var c=0;c<s.length;c++){var p=s[c],g=t,w=a,A=w;e:for(;A!==null;){switch(A.tag){case 27:if(ys(A.type)){Vt=A.stateNode,Kn=!1;break e}break;case 5:Vt=A.stateNode,Kn=!1;break e;case 3:case 4:Vt=A.stateNode.containerInfo,Kn=!0;break e}A=A.return}if(Vt===null)throw Error(o(160));Kb(g,w,p),Vt=null,Kn=!1,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Qb(a,t),a=a.sibling}var Ba=null;function Qb(t,a){var s=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Hn(a,t),Fn(t),c&4&&(us(3,t,t.return),Ul(3,t),us(5,t,t.return));break;case 1:Hn(a,t),Fn(t),c&512&&(un||s===null||ti(s,s.return)),c&64&&Ci&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(s=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var p=Ba;if(Hn(a,t),Fn(t),c&512&&(un||s===null||ti(s,s.return)),c&4){var g=s!==null?s.memoizedState:null;if(c=t.memoizedState,s===null)if(c===null)if(t.stateNode===null){e:{c=t.type,s=t.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":g=p.getElementsByTagName("title")[0],(!g||g[Qi]||g[on]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=p.createElement(c),p.head.insertBefore(g,p.querySelector("head > title"))),_n(g,c,s),g[on]=t,en(g),c=g;break e;case"link":var w=Qv("link","href",p).get(c+(s.href||""));if(w){for(var A=0;A<w.length;A++)if(g=w[A],g.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&g.getAttribute("rel")===(s.rel==null?null:s.rel)&&g.getAttribute("title")===(s.title==null?null:s.title)&&g.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){w.splice(A,1);break t}}g=p.createElement(c),_n(g,c,s),p.head.appendChild(g);break;case"meta":if(w=Qv("meta","content",p).get(c+(s.content||""))){for(A=0;A<w.length;A++)if(g=w[A],g.getAttribute("content")===(s.content==null?null:""+s.content)&&g.getAttribute("name")===(s.name==null?null:s.name)&&g.getAttribute("property")===(s.property==null?null:s.property)&&g.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&g.getAttribute("charset")===(s.charSet==null?null:s.charSet)){w.splice(A,1);break t}}g=p.createElement(c),_n(g,c,s),p.head.appendChild(g);break;default:throw Error(o(468,c))}g[on]=t,en(g),c=g}t.stateNode=c}else Zv(p,t.type,t.stateNode);else t.stateNode=Fv(p,c,t.memoizedProps);else g!==c?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,c===null?Zv(p,t.type,t.stateNode):Fv(p,c,t.memoizedProps)):c===null&&t.stateNode!==null&&hh(t,t.memoizedProps,s.memoizedProps)}break;case 27:Hn(a,t),Fn(t),c&512&&(un||s===null||ti(s,s.return)),s!==null&&c&4&&hh(t,t.memoizedProps,s.memoizedProps);break;case 5:if(Hn(a,t),Fn(t),c&512&&(un||s===null||ti(s,s.return)),t.flags&32){p=t.stateNode;try{ya(p,"")}catch(Ne){Ct(t,t.return,Ne)}}c&4&&t.stateNode!=null&&(p=t.memoizedProps,hh(t,p,s!==null?s.memoizedProps:p)),c&1024&&(yh=!0);break;case 6:if(Hn(a,t),Fn(t),c&4){if(t.stateNode===null)throw Error(o(162));c=t.memoizedProps,s=t.stateNode;try{s.nodeValue=c}catch(Ne){Ct(t,t.return,Ne)}}break;case 3:if(Xu=null,p=Ba,Ba=Zu(a.containerInfo),Hn(a,t),Ba=p,Fn(t),c&4&&s!==null&&s.memoizedState.isDehydrated)try{wr(a.containerInfo)}catch(Ne){Ct(t,t.return,Ne)}yh&&(yh=!1,Zb(t));break;case 4:c=Ba,Ba=Zu(t.stateNode.containerInfo),Hn(a,t),Fn(t),Ba=c;break;case 12:Hn(a,t),Fn(t);break;case 31:Hn(a,t),Fn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Ou(t,c)));break;case 13:Hn(a,t),Fn(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(qu=Ut()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Ou(t,c)));break;case 22:p=t.memoizedState!==null;var D=s!==null&&s.memoizedState!==null,G=Ci,ne=un;if(Ci=G||p,un=ne||D,Hn(a,t),un=ne,Ci=G,Fn(t),c&8192)e:for(a=t.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(s===null||D||Ci||un||lo(t)),s=null,a=t;;){if(a.tag===5||a.tag===26){if(s===null){D=s=a;try{if(g=D.stateNode,p)w=g.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{A=D.stateNode;var se=D.memoizedProps.style,H=se!=null&&se.hasOwnProperty("display")?se.display:null;A.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(Ne){Ct(D,D.return,Ne)}}}else if(a.tag===6){if(s===null){D=a;try{D.stateNode.nodeValue=p?"":D.memoizedProps}catch(Ne){Ct(D,D.return,Ne)}}}else if(a.tag===18){if(s===null){D=a;try{var Q=D.stateNode;p?Mv(Q,!0):Mv(D.stateNode,!1)}catch(Ne){Ct(D,D.return,Ne)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=t.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,Ou(t,s))));break;case 19:Hn(a,t),Fn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Ou(t,c)));break;case 30:break;case 21:break;default:Hn(a,t),Fn(t)}}function Fn(t){var a=t.flags;if(a&2){try{for(var s,c=t.return;c!==null;){if(Lb(c)){s=c;break}c=c.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var p=s.stateNode,g=fh(t);Iu(t,g,p);break;case 5:var w=s.stateNode;s.flags&32&&(ya(w,""),s.flags&=-33);var A=fh(t);Iu(t,A,w);break;case 3:case 4:var D=s.stateNode.containerInfo,G=fh(t);gh(t,G,D);break;default:throw Error(o(161))}}catch(ne){Ct(t,t.return,ne)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function Zb(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;Zb(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function Ti(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)$b(t,a.alternate,a),a=a.sibling}function lo(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:us(4,a,a.return),lo(a);break;case 1:ti(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&Mb(a,a.return,s),lo(a);break;case 27:Xl(a.stateNode);case 26:case 5:ti(a,a.return),lo(a);break;case 22:a.memoizedState===null&&lo(a);break;case 30:lo(a);break;default:lo(a)}t=t.sibling}}function Ei(t,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,p=t,g=a,w=g.flags;switch(g.tag){case 0:case 11:case 15:Ei(p,g,s),Ul(4,g);break;case 1:if(Ei(p,g,s),c=g,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(G){Ct(c,c.return,G)}if(c=g,p=c.updateQueue,p!==null){var A=c.stateNode;try{var D=p.shared.hiddenCallbacks;if(D!==null)for(p.shared.hiddenCallbacks=null,p=0;p<D.length;p++)Ny(D[p],A)}catch(G){Ct(c,c.return,G)}}s&&w&64&&qb(g),Vl(g,g.return);break;case 27:Ub(g);case 26:case 5:Ei(p,g,s),s&&c===null&&w&4&&Bb(g),Vl(g,g.return);break;case 12:Ei(p,g,s);break;case 31:Ei(p,g,s),s&&w&4&&Hb(p,g);break;case 13:Ei(p,g,s),s&&w&4&&Fb(p,g);break;case 22:g.memoizedState===null&&Ei(p,g,s),Vl(g,g.return);break;case 30:break;default:Ei(p,g,s)}a=a.sibling}}function bh(t,a){var s=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==s&&(t!=null&&t.refCount++,s!=null&&_l(s))}function vh(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&_l(t))}function La(t,a,s,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Yb(t,a,s,c),a=a.sibling}function Yb(t,a,s,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:La(t,a,s,c),p&2048&&Ul(9,a);break;case 1:La(t,a,s,c);break;case 3:La(t,a,s,c),p&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&_l(t)));break;case 12:if(p&2048){La(t,a,s,c),t=a.stateNode;try{var g=a.memoizedProps,w=g.id,A=g.onPostCommit;typeof A=="function"&&A(w,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(D){Ct(a,a.return,D)}}else La(t,a,s,c);break;case 31:La(t,a,s,c);break;case 13:La(t,a,s,c);break;case 23:break;case 22:g=a.stateNode,w=a.alternate,a.memoizedState!==null?g._visibility&2?La(t,a,s,c):$l(t,a):g._visibility&2?La(t,a,s,c):(g._visibility|=2,ur(t,a,s,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&bh(w,a);break;case 24:La(t,a,s,c),p&2048&&vh(a.alternate,a);break;default:La(t,a,s,c)}}function ur(t,a,s,c,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=t,w=a,A=s,D=c,G=w.flags;switch(w.tag){case 0:case 11:case 15:ur(g,w,A,D,p),Ul(8,w);break;case 23:break;case 22:var ne=w.stateNode;w.memoizedState!==null?ne._visibility&2?ur(g,w,A,D,p):$l(g,w):(ne._visibility|=2,ur(g,w,A,D,p)),p&&G&2048&&bh(w.alternate,w);break;case 24:ur(g,w,A,D,p),p&&G&2048&&vh(w.alternate,w);break;default:ur(g,w,A,D,p)}a=a.sibling}}function $l(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=t,c=a,p=c.flags;switch(c.tag){case 22:$l(s,c),p&2048&&bh(c.alternate,c);break;case 24:$l(s,c),p&2048&&vh(c.alternate,c);break;default:$l(s,c)}a=a.sibling}}var Gl=8192;function dr(t,a,s){if(t.subtreeFlags&Gl)for(t=t.child;t!==null;)Xb(t,a,s),t=t.sibling}function Xb(t,a,s){switch(t.tag){case 26:dr(t,a,s),t.flags&Gl&&t.memoizedState!==null&&d5(s,Ba,t.memoizedState,t.memoizedProps);break;case 5:dr(t,a,s);break;case 3:case 4:var c=Ba;Ba=Zu(t.stateNode.containerInfo),dr(t,a,s),Ba=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=Gl,Gl=16777216,dr(t,a,s),Gl=c):dr(t,a,s));break;default:dr(t,a,s)}}function Jb(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function Kl(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var c=a[s];bn=c,ev(c,t)}Jb(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Wb(t),t=t.sibling}function Wb(t){switch(t.tag){case 0:case 11:case 15:Kl(t),t.flags&2048&&us(9,t,t.return);break;case 3:Kl(t);break;case 12:Kl(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,Pu(t)):Kl(t);break;default:Kl(t)}}function Pu(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var c=a[s];bn=c,ev(c,t)}Jb(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:us(8,a,a.return),Pu(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,Pu(a));break;default:Pu(a)}t=t.sibling}}function ev(t,a){for(;bn!==null;){var s=bn;switch(s.tag){case 0:case 11:case 15:us(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:_l(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,bn=c;else e:for(s=t;bn!==null;){c=bn;var p=c.sibling,g=c.return;if(Gb(c),c===s){bn=null;break e}if(p!==null){p.return=g,bn=p;break e}bn=g}}}var N4={getCacheForType:function(t){var a=Nn(rn),s=a.data.get(t);return s===void 0&&(s=t(),a.data.set(t,s)),s},cacheSignal:function(){return Nn(rn).controller.signal}},C4=typeof WeakMap=="function"?WeakMap:Map,wt=0,Dt=null,rt=null,ut=0,Nt=0,sa=null,ds=!1,mr=!1,xh=!1,Ri=0,Wt=0,ms=0,co=0,wh=0,oa=0,pr=0,Hl=null,Qn=null,kh=!1,qu=0,tv=0,Mu=1/0,Bu=null,ps=null,pn=0,hs=null,hr=null,Di=0,Sh=0,jh=null,nv=null,Fl=0,Ah=null;function ra(){return(wt&2)!==0&&ut!==0?ut&-ut:P.T!==null?Rh():Bo()}function av(){if(oa===0)if((ut&536870912)===0||ht){var t=Ee;Ee<<=1,(Ee&3932160)===0&&(Ee=262144),oa=t}else oa=536870912;return t=aa.current,t!==null&&(t.flags|=32),oa}function Zn(t,a,s){(t===Dt&&(Nt===2||Nt===9)||t.cancelPendingCommit!==null)&&(fr(t,0),fs(t,ut,oa,!1)),Gs(t,s),((wt&2)===0||t!==Dt)&&(t===Dt&&((wt&2)===0&&(co|=s),Wt===4&&fs(t,ut,oa,!1)),ni(t))}function iv(t,a,s){if((wt&6)!==0)throw Error(o(327));var c=!s&&(a&127)===0&&(a&t.expiredLanes)===0||xt(t,a),p=c?E4(t,a):Ch(t,a,!0),g=c;do{if(p===0){mr&&!c&&fs(t,a,0,!1);break}else{if(s=t.current.alternate,g&&!_4(s)){p=Ch(t,a,!1),g=!1;continue}if(p===2){if(g=a,t.errorRecoveryDisabledLanes&g)var w=0;else w=t.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){a=w;e:{var A=t;p=Hl;var D=A.current.memoizedState.isDehydrated;if(D&&(fr(A,w).flags|=256),w=Ch(A,w,!1),w!==2){if(xh&&!D){A.errorRecoveryDisabledLanes|=g,co|=g,p=4;break e}g=Qn,Qn=p,g!==null&&(Qn===null?Qn=g:Qn.push.apply(Qn,g))}p=w}if(g=!1,p!==2)continue}}if(p===1){fr(t,0),fs(t,a,0,!0);break}e:{switch(c=t,g=p,g){case 0:case 1:throw Error(o(345));case 4:if((a&4194048)!==a)break;case 6:fs(c,a,oa,!ds);break e;case 2:Qn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((a&62914560)===a&&(p=qu+300-Ut(),10<p)){if(fs(c,a,oa,!ds),Xe(c,0,!0)!==0)break e;Di=a,c.timeoutHandle=Ov(sv.bind(null,c,s,Qn,Bu,kh,a,oa,co,pr,ds,g,"Throttled",-0,0),p);break e}sv(c,s,Qn,Bu,kh,a,oa,co,pr,ds,g,null,-0,0)}}break}while(!0);ni(t)}function sv(t,a,s,c,p,g,w,A,D,G,ne,se,H,Q){if(t.timeoutHandle=-1,se=a.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pa},Xb(a,g,se);var Ne=(g&62914560)===g?qu-Ut():(g&4194048)===g?tv-Ut():0;if(Ne=m5(se,Ne),Ne!==null){Di=g,t.cancelPendingCommit=Ne(pv.bind(null,t,a,g,s,c,p,w,A,D,ne,se,null,H,Q)),fs(t,g,w,!G);return}}pv(t,a,g,s,c,p,w,A,D)}function _4(t){for(var a=t;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var p=s[c],g=p.getSnapshot;p=p.value;try{if(!ta(g(),p))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function fs(t,a,s,c){a&=~wh,a&=~co,t.suspendedLanes|=a,t.pingedLanes&=~a,c&&(t.warmLanes|=a),c=t.expirationTimes;for(var p=a;0<p;){var g=31-Qt(p),w=1<<g;c[g]=-1,p&=~w}s!==0&&tl(t,s,a)}function Lu(){return(wt&6)===0?(Ql(0),!1):!0}function Nh(){if(rt!==null){if(Nt===0)var t=rt.return;else t=rt,wi=eo=null,Vp(t),sr=null,El=0,t=rt;for(;t!==null;)Pb(t.alternate,t),t=t.return;rt=null}}function fr(t,a){var s=t.timeoutHandle;s!==-1&&(t.timeoutHandle=-1,Q4(s)),s=t.cancelPendingCommit,s!==null&&(t.cancelPendingCommit=null,s()),Di=0,Nh(),Dt=t,rt=s=vi(t.current,null),ut=a,Nt=0,sa=null,ds=!1,mr=xt(t,a),xh=!1,pr=oa=wh=co=ms=Wt=0,Qn=Hl=null,kh=!1,(a&8)!==0&&(a|=a&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=a;0<c;){var p=31-Qt(c),g=1<<p;a|=t[p],c&=~g}return Ri=a,ru(),s}function ov(t,a){We=null,P.H=Ml,a===ir||a===fu?(a=ky(),Nt=3):a===Ep?(a=ky(),Nt=4):Nt=a===ih?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,sa=a,rt===null&&(Wt=1,Tu(t,wa(a,t.current)))}function rv(){var t=aa.current;return t===null?!0:(ut&4194048)===ut?Aa===null:(ut&62914560)===ut||(ut&536870912)!==0?t===Aa:!1}function lv(){var t=P.H;return P.H=Ml,t===null?Ml:t}function cv(){var t=P.A;return P.A=N4,t}function Uu(){Wt=4,ds||(ut&4194048)!==ut&&aa.current!==null||(mr=!0),(ms&134217727)===0&&(co&134217727)===0||Dt===null||fs(Dt,ut,oa,!1)}function Ch(t,a,s){var c=wt;wt|=2;var p=lv(),g=cv();(Dt!==t||ut!==a)&&(Bu=null,fr(t,a)),a=!1;var w=Wt;e:do try{if(Nt!==0&&rt!==null){var A=rt,D=sa;switch(Nt){case 8:Nh(),w=6;break e;case 3:case 2:case 9:case 6:aa.current===null&&(a=!0);var G=Nt;if(Nt=0,sa=null,gr(t,A,D,G),s&&mr){w=0;break e}break;default:G=Nt,Nt=0,sa=null,gr(t,A,D,G)}}T4(),w=Wt;break}catch(ne){ov(t,ne)}while(!0);return a&&t.shellSuspendCounter++,wi=eo=null,wt=c,P.H=p,P.A=g,rt===null&&(Dt=null,ut=0,ru()),w}function T4(){for(;rt!==null;)uv(rt)}function E4(t,a){var s=wt;wt|=2;var c=lv(),p=cv();Dt!==t||ut!==a?(Bu=null,Mu=Ut()+500,fr(t,a)):mr=xt(t,a);e:do try{if(Nt!==0&&rt!==null){a=rt;var g=sa;t:switch(Nt){case 1:Nt=0,sa=null,gr(t,a,g,1);break;case 2:case 9:if(xy(g)){Nt=0,sa=null,dv(a);break}a=function(){Nt!==2&&Nt!==9||Dt!==t||(Nt=7),ni(t)},g.then(a,a);break e;case 3:Nt=7;break e;case 4:Nt=5;break e;case 7:xy(g)?(Nt=0,sa=null,dv(a)):(Nt=0,sa=null,gr(t,a,g,7));break;case 5:var w=null;switch(rt.tag){case 26:w=rt.memoizedState;case 5:case 27:var A=rt;if(w?Yv(w):A.stateNode.complete){Nt=0,sa=null;var D=A.sibling;if(D!==null)rt=D;else{var G=A.return;G!==null?(rt=G,Vu(G)):rt=null}break t}}Nt=0,sa=null,gr(t,a,g,5);break;case 6:Nt=0,sa=null,gr(t,a,g,6);break;case 8:Nh(),Wt=6;break e;default:throw Error(o(462))}}R4();break}catch(ne){ov(t,ne)}while(!0);return wi=eo=null,P.H=c,P.A=p,wt=s,rt!==null?0:(Dt=null,ut=0,ru(),Wt)}function R4(){for(;rt!==null&&!Ft();)uv(rt)}function uv(t){var a=Ib(t.alternate,t,Ri);t.memoizedProps=t.pendingProps,a===null?Vu(t):rt=a}function dv(t){var a=t,s=a.alternate;switch(a.tag){case 15:case 0:a=_b(s,a,a.pendingProps,a.type,void 0,ut);break;case 11:a=_b(s,a,a.pendingProps,a.type.render,a.ref,ut);break;case 5:Vp(a);default:Pb(s,a),a=rt=cy(a,Ri),a=Ib(s,a,Ri)}t.memoizedProps=t.pendingProps,a===null?Vu(t):rt=a}function gr(t,a,s,c){wi=eo=null,Vp(a),sr=null,El=0;var p=a.return;try{if(v4(t,p,a,s,ut)){Wt=1,Tu(t,wa(s,t.current)),rt=null;return}}catch(g){if(p!==null)throw rt=p,g;Wt=1,Tu(t,wa(s,t.current)),rt=null;return}a.flags&32768?(ht||c===1?t=!0:mr||(ut&536870912)!==0?t=!1:(ds=t=!0,(c===2||c===9||c===3||c===6)&&(c=aa.current,c!==null&&c.tag===13&&(c.flags|=16384))),mv(a,t)):Vu(a)}function Vu(t){var a=t;do{if((a.flags&32768)!==0){mv(a,ds);return}t=a.return;var s=k4(a.alternate,a,Ri);if(s!==null){rt=s;return}if(a=a.sibling,a!==null){rt=a;return}rt=a=t}while(a!==null);Wt===0&&(Wt=5)}function mv(t,a){do{var s=S4(t.alternate,t);if(s!==null){s.flags&=32767,rt=s;return}if(s=t.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(t=t.sibling,t!==null)){rt=t;return}rt=t=s}while(t!==null);Wt=6,rt=null}function pv(t,a,s,c,p,g,w,A,D){t.cancelPendingCommit=null;do $u();while(pn!==0);if((wt&6)!==0)throw Error(o(327));if(a!==null){if(a===t.current)throw Error(o(177));if(g=a.lanes|a.childLanes,g|=fp,eu(t,s,g,w,A,D),t===Dt&&(rt=Dt=null,ut=0),hr=a,hs=t,Di=s,Sh=g,jh=p,nv=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,O4(Rn,function(){return bv(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=P.T,P.T=null,p=J.p,J.p=2,w=wt,wt|=4;try{j4(t,a,s)}finally{wt=w,J.p=p,P.T=c}}pn=1,hv(),fv(),gv()}}function hv(){if(pn===1){pn=0;var t=hs,a=hr,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=P.T,P.T=null;var c=J.p;J.p=2;var p=wt;wt|=4;try{Qb(a,t);var g=Bh,w=ey(t.containerInfo),A=g.focusedElem,D=g.selectionRange;if(w!==A&&A&&A.ownerDocument&&W1(A.ownerDocument.documentElement,A)){if(D!==null&&up(A)){var G=D.start,ne=D.end;if(ne===void 0&&(ne=G),"selectionStart"in A)A.selectionStart=G,A.selectionEnd=Math.min(ne,A.value.length);else{var se=A.ownerDocument||document,H=se&&se.defaultView||window;if(H.getSelection){var Q=H.getSelection(),Ne=A.textContent.length,Ge=Math.min(D.start,Ne),Rt=D.end===void 0?Ge:Math.min(D.end,Ne);!Q.extend&&Ge>Rt&&(w=Rt,Rt=Ge,Ge=w);var L=J1(A,Ge),O=J1(A,Rt);if(L&&O&&(Q.rangeCount!==1||Q.anchorNode!==L.node||Q.anchorOffset!==L.offset||Q.focusNode!==O.node||Q.focusOffset!==O.offset)){var $=se.createRange();$.setStart(L.node,L.offset),Q.removeAllRanges(),Ge>Rt?(Q.addRange($),Q.extend(O.node,O.offset)):($.setEnd(O.node,O.offset),Q.addRange($))}}}}for(se=[],Q=A;Q=Q.parentNode;)Q.nodeType===1&&se.push({element:Q,left:Q.scrollLeft,top:Q.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<se.length;A++){var ie=se[A];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}td=!!Mh,Bh=Mh=null}finally{wt=p,J.p=c,P.T=s}}t.current=a,pn=2}}function fv(){if(pn===2){pn=0;var t=hs,a=hr,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=P.T,P.T=null;var c=J.p;J.p=2;var p=wt;wt|=4;try{$b(t,a.alternate,a)}finally{wt=p,J.p=c,P.T=s}}pn=3}}function gv(){if(pn===4||pn===3){pn=0,En();var t=hs,a=hr,s=Di,c=nv;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?pn=5:(pn=0,hr=hs=null,yv(t,t.pendingLanes));var p=t.pendingLanes;if(p===0&&(ps=null),sl(s),a=a.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(yn,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=P.T,p=J.p,J.p=2,P.T=null;try{for(var g=t.onRecoverableError,w=0;w<c.length;w++){var A=c[w];g(A.value,{componentStack:A.stack})}}finally{P.T=a,J.p=p}}(Di&3)!==0&&$u(),ni(t),p=t.pendingLanes,(s&261930)!==0&&(p&42)!==0?t===Ah?Fl++:(Fl=0,Ah=t):Fl=0,Ql(0)}}function yv(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,_l(a)))}function $u(){return hv(),fv(),gv(),bv()}function bv(){if(pn!==5)return!1;var t=hs,a=Sh;Sh=0;var s=sl(Di),c=P.T,p=J.p;try{J.p=32>s?32:s,P.T=null,s=jh,jh=null;var g=hs,w=Di;if(pn=0,hr=hs=null,Di=0,(wt&6)!==0)throw Error(o(331));var A=wt;if(wt|=4,Wb(g.current),Yb(g,g.current,w,s),wt=A,Ql(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(yn,g)}catch{}return!0}finally{J.p=p,P.T=c,yv(t,a)}}function vv(t,a,s){a=wa(s,a),a=ah(t.stateNode,a,2),t=rs(t,a,2),t!==null&&(Gs(t,2),ni(t))}function Ct(t,a,s){if(t.tag===3)vv(t,t,s);else for(;a!==null;){if(a.tag===3){vv(a,t,s);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ps===null||!ps.has(c))){t=wa(s,t),s=xb(2),c=rs(a,s,2),c!==null&&(wb(s,c,a,t),Gs(c,2),ni(c));break}}a=a.return}}function _h(t,a,s){var c=t.pingCache;if(c===null){c=t.pingCache=new C4;var p=new Set;c.set(a,p)}else p=c.get(a),p===void 0&&(p=new Set,c.set(a,p));p.has(s)||(xh=!0,p.add(s),t=D4.bind(null,t,a,s),a.then(t,t))}function D4(t,a,s){var c=t.pingCache;c!==null&&c.delete(a),t.pingedLanes|=t.suspendedLanes&s,t.warmLanes&=~s,Dt===t&&(ut&s)===s&&(Wt===4||Wt===3&&(ut&62914560)===ut&&300>Ut()-qu?(wt&2)===0&&fr(t,0):wh|=s,pr===ut&&(pr=0)),ni(t)}function xv(t,a){a===0&&(a=mi()),t=Xs(t,a),t!==null&&(Gs(t,a),ni(t))}function z4(t){var a=t.memoizedState,s=0;a!==null&&(s=a.retryLane),xv(t,s)}function I4(t,a){var s=0;switch(t.tag){case 31:case 13:var c=t.stateNode,p=t.memoizedState;p!==null&&(s=p.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(o(314))}c!==null&&c.delete(a),xv(t,s)}function O4(t,a){return ct(t,a)}var Gu=null,yr=null,Th=!1,Ku=!1,Eh=!1,gs=0;function ni(t){t!==yr&&t.next===null&&(yr===null?Gu=yr=t:yr=yr.next=t),Ku=!0,Th||(Th=!0,q4())}function Ql(t,a){if(!Eh&&Ku){Eh=!0;do for(var s=!1,c=Gu;c!==null;){if(t!==0){var p=c.pendingLanes;if(p===0)var g=0;else{var w=c.suspendedLanes,A=c.pingedLanes;g=(1<<31-Qt(42|t)+1)-1,g&=p&~(w&~A),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,jv(c,g))}else g=ut,g=Xe(c,c===Dt?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||xt(c,g)||(s=!0,jv(c,g));c=c.next}while(s);Eh=!1}}function P4(){wv()}function wv(){Ku=Th=!1;var t=0;gs!==0&&F4()&&(t=gs);for(var a=Ut(),s=null,c=Gu;c!==null;){var p=c.next,g=kv(c,a);g===0?(c.next=null,s===null?Gu=p:s.next=p,p===null&&(yr=s)):(s=c,(t!==0||(g&3)!==0)&&(Ku=!0)),c=p}pn!==0&&pn!==5||Ql(t),gs!==0&&(gs=0)}function kv(t,a){for(var s=t.suspendedLanes,c=t.pingedLanes,p=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var w=31-Qt(g),A=1<<w,D=p[w];D===-1?((A&s)===0||(A&c)!==0)&&(p[w]=sn(A,a)):D<=a&&(t.expiredLanes|=A),g&=~A}if(a=Dt,s=ut,s=Xe(t,t===a?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,s===0||t===a&&(Nt===2||Nt===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&Ht(c),t.callbackNode=null,t.callbackPriority=0;if((s&3)===0||xt(t,s)){if(a=s&-s,a===t.callbackPriority)return a;switch(c!==null&&Ht(c),sl(s)){case 2:case 8:s=ui;break;case 32:s=Rn;break;case 268435456:s=Us;break;default:s=Rn}return c=Sv.bind(null,t),s=ct(s,c),t.callbackPriority=a,t.callbackNode=s,a}return c!==null&&c!==null&&Ht(c),t.callbackPriority=2,t.callbackNode=null,2}function Sv(t,a){if(pn!==0&&pn!==5)return t.callbackNode=null,t.callbackPriority=0,null;var s=t.callbackNode;if($u()&&t.callbackNode!==s)return null;var c=ut;return c=Xe(t,t===Dt?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(iv(t,c,a),kv(t,Ut()),t.callbackNode!=null&&t.callbackNode===s?Sv.bind(null,t):null)}function jv(t,a){if($u())return null;iv(t,a,!0)}function q4(){Z4(function(){(wt&6)!==0?ct(Ls,P4):wv()})}function Rh(){if(gs===0){var t=nr;t===0&&(t=oe,oe<<=1,(oe&261888)===0&&(oe=256)),gs=t}return gs}function Av(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ko(""+t)}function Nv(t,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,t.id&&s.setAttribute("form",t.id),a.parentNode.insertBefore(s,a),t=new FormData(t),s.parentNode.removeChild(s),t}function M4(t,a,s,c,p){if(a==="submit"&&s&&s.stateNode===p){var g=Av((p[Dn]||null).action),w=c.submitter;w&&(a=(a=w[Dn]||null)?Av(a.formAction):w.getAttribute("formAction"),a!==null&&(g=a,w=null));var A=new Ja("action","action",null,c,p);t.push({event:A,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(gs!==0){var D=w?Nv(p,w):new FormData(p);Xp(s,{pending:!0,data:D,method:p.method,action:g},null,D)}}else typeof g=="function"&&(A.preventDefault(),D=w?Nv(p,w):new FormData(p),Xp(s,{pending:!0,data:D,method:p.method,action:g},g,D))},currentTarget:p}]})}}for(var Dh=0;Dh<hp.length;Dh++){var zh=hp[Dh],B4=zh.toLowerCase(),L4=zh[0].toUpperCase()+zh.slice(1);Ma(B4,"on"+L4)}Ma(ay,"onAnimationEnd"),Ma(iy,"onAnimationIteration"),Ma(sy,"onAnimationStart"),Ma("dblclick","onDoubleClick"),Ma("focusin","onFocus"),Ma("focusout","onBlur"),Ma(n4,"onTransitionRun"),Ma(a4,"onTransitionStart"),Ma(i4,"onTransitionCancel"),Ma(oy,"onTransitionEnd"),Ks("onMouseEnter",["mouseout","mouseover"]),Ks("onMouseLeave",["mouseout","mouseover"]),Ks("onPointerEnter",["pointerout","pointerover"]),Ks("onPointerLeave",["pointerout","pointerover"]),Fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),U4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zl));function Cv(t,a){a=(a&4)!==0;for(var s=0;s<t.length;s++){var c=t[s],p=c.event;c=c.listeners;e:{var g=void 0;if(a)for(var w=c.length-1;0<=w;w--){var A=c[w],D=A.instance,G=A.currentTarget;if(A=A.listener,D!==g&&p.isPropagationStopped())break e;g=A,p.currentTarget=G;try{g(p)}catch(ne){ou(ne)}p.currentTarget=null,g=D}else for(w=0;w<c.length;w++){if(A=c[w],D=A.instance,G=A.currentTarget,A=A.listener,D!==g&&p.isPropagationStopped())break e;g=A,p.currentTarget=G;try{g(p)}catch(ne){ou(ne)}p.currentTarget=null,g=D}}}}function lt(t,a){var s=a[Lo];s===void 0&&(s=a[Lo]=new Set);var c=t+"__bubble";s.has(c)||(_v(a,t,2,!1),s.add(c))}function Ih(t,a,s){var c=0;a&&(c|=4),_v(s,t,c,a)}var Hu="_reactListening"+Math.random().toString(36).slice(2);function Oh(t){if(!t[Hu]){t[Hu]=!0,rl.forEach(function(s){s!=="selectionchange"&&(U4.has(s)||Ih(s,!1,t),Ih(s,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[Hu]||(a[Hu]=!0,Ih("selectionchange",!1,a))}}function _v(t,a,s,c){switch(ax(a)){case 2:var p=f5;break;case 8:p=g5;break;default:p=Yh}s=p.bind(null,a,s,t),p=void 0,!yl||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),c?p!==void 0?t.addEventListener(a,s,{capture:!0,passive:p}):t.addEventListener(a,s,!0):p!==void 0?t.addEventListener(a,s,{passive:p}):t.addEventListener(a,s,!1)}function Ph(t,a,s,c,p){var g=c;if((a&1)===0&&(a&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var A=c.stateNode.containerInfo;if(A===p)break;if(w===4)for(w=c.return;w!==null;){var D=w.tag;if((D===3||D===4)&&w.stateNode.containerInfo===p)return;w=w.return}for(;A!==null;){if(w=pi(A),w===null)return;if(D=w.tag,D===5||D===6||D===26||D===27){c=g=w;continue e}A=A.parentNode}}c=c.return}gl(function(){var G=g,ne=hl(s),se=[];e:{var H=ry.get(t);if(H!==void 0){var Q=Ja,Ne=t;switch(t){case"keypress":if(es(s)===0)break e;case"keydown":case"keyup":Q=IC;break;case"focusin":Ne="focus",Q=sp;break;case"focusout":Ne="blur",Q=sp;break;case"beforeblur":case"afterblur":Q=sp;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=P1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=kC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=qC;break;case ay:case iy:case sy:Q=AC;break;case oy:Q=BC;break;case"scroll":case"scrollend":Q=xC;break;case"wheel":Q=UC;break;case"copy":case"cut":case"paste":Q=CC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=M1;break;case"toggle":case"beforetoggle":Q=$C}var Ge=(a&4)!==0,Rt=!Ge&&(t==="scroll"||t==="scrollend"),L=Ge?H!==null?H+"Capture":null:H;Ge=[];for(var O=G,$;O!==null;){var ie=O;if($=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||$===null||L===null||(ie=Fs(O,L),ie!=null&&Ge.push(Yl(O,ie,$))),Rt)break;O=O.return}0<Ge.length&&(H=new Q(H,Ne,null,s,ne),se.push({event:H,listeners:Ge}))}}if((a&7)===0){e:{if(H=t==="mouseover"||t==="pointerover",Q=t==="mouseout"||t==="pointerout",H&&s!==pl&&(Ne=s.relatedTarget||s.fromElement)&&(pi(Ne)||Ne[Fi]))break e;if((Q||H)&&(H=ne.window===ne?ne:(H=ne.ownerDocument)?H.defaultView||H.parentWindow:window,Q?(Ne=s.relatedTarget||s.toElement,Q=G,Ne=Ne?pi(Ne):null,Ne!==null&&(Rt=h(Ne),Ge=Ne.tag,Ne!==Rt||Ge!==5&&Ge!==27&&Ge!==6)&&(Ne=null)):(Q=null,Ne=G),Q!==Ne)){if(Ge=P1,ie="onMouseLeave",L="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(Ge=M1,ie="onPointerLeave",L="onPointerEnter",O="pointer"),Rt=Q==null?H:Yi(Q),$=Ne==null?H:Yi(Ne),H=new Ge(ie,O+"leave",Q,s,ne),H.target=Rt,H.relatedTarget=$,ie=null,pi(ne)===G&&(Ge=new Ge(L,O+"enter",Ne,s,ne),Ge.target=$,Ge.relatedTarget=Rt,ie=Ge),Rt=ie,Q&&Ne)t:{for(Ge=V4,L=Q,O=Ne,$=0,ie=L;ie;ie=Ge(ie))$++;ie=0;for(var Le=O;Le;Le=Ge(Le))ie++;for(;0<$-ie;)L=Ge(L),$--;for(;0<ie-$;)O=Ge(O),ie--;for(;$--;){if(L===O||O!==null&&L===O.alternate){Ge=L;break t}L=Ge(L),O=Ge(O)}Ge=null}else Ge=null;Q!==null&&Tv(se,H,Q,Ge,!1),Ne!==null&&Rt!==null&&Tv(se,Rt,Ne,Ge,!0)}}e:{if(H=G?Yi(G):window,Q=H.nodeName&&H.nodeName.toLowerCase(),Q==="select"||Q==="input"&&H.type==="file")var bt=H1;else if(G1(H))if(F1)bt=WC;else{bt=XC;var Re=YC}else Q=H.nodeName,!Q||Q.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?G&&Oa(G.elementType)&&(bt=H1):bt=JC;if(bt&&(bt=bt(t,G))){K1(se,bt,s,ne);break e}Re&&Re(t,H,G),t==="focusout"&&G&&H.type==="number"&&G.memoizedProps.value!=null&&$o(H,"number",H.value)}switch(Re=G?Yi(G):window,t){case"focusin":(G1(Re)||Re.contentEditable==="true")&&(Qo=Re,dp=G,Al=null);break;case"focusout":Al=dp=Qo=null;break;case"mousedown":mp=!0;break;case"contextmenu":case"mouseup":case"dragend":mp=!1,ty(se,s,ne);break;case"selectionchange":if(t4)break;case"keydown":case"keyup":ty(se,s,ne)}var tt;if(rp)e:{switch(t){case"compositionstart":var dt="onCompositionStart";break e;case"compositionend":dt="onCompositionEnd";break e;case"compositionupdate":dt="onCompositionUpdate";break e}dt=void 0}else Fo?V1(t,s)&&(dt="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(dt="onCompositionStart");dt&&(B1&&s.locale!=="ko"&&(Fo||dt!=="onCompositionStart"?dt==="onCompositionEnd"&&Fo&&(tt=yi()):(Xa=ne,K="value"in Xa?Xa.value:Xa.textContent,Fo=!0)),Re=Fu(G,dt),0<Re.length&&(dt=new q1(dt,t,null,s,ne),se.push({event:dt,listeners:Re}),tt?dt.data=tt:(tt=$1(s),tt!==null&&(dt.data=tt)))),(tt=KC?HC(t,s):FC(t,s))&&(dt=Fu(G,"onBeforeInput"),0<dt.length&&(Re=new q1("onBeforeInput","beforeinput",null,s,ne),se.push({event:Re,listeners:dt}),Re.data=tt)),M4(se,t,G,s,ne)}Cv(se,a)})}function Yl(t,a,s){return{instance:t,listener:a,currentTarget:s}}function Fu(t,a){for(var s=a+"Capture",c=[];t!==null;){var p=t,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=Fs(t,s),p!=null&&c.unshift(Yl(t,p,g)),p=Fs(t,a),p!=null&&c.push(Yl(t,p,g))),t.tag===3)return c;t=t.return}return[]}function V4(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Tv(t,a,s,c,p){for(var g=a._reactName,w=[];s!==null&&s!==c;){var A=s,D=A.alternate,G=A.stateNode;if(A=A.tag,D!==null&&D===c)break;A!==5&&A!==26&&A!==27||G===null||(D=G,p?(G=Fs(s,g),G!=null&&w.unshift(Yl(s,G,D))):p||(G=Fs(s,g),G!=null&&w.push(Yl(s,G,D)))),s=s.return}w.length!==0&&t.push({event:a,listeners:w})}var $4=/\r\n?/g,G4=/\u0000|\uFFFD/g;function Ev(t){return(typeof t=="string"?t:""+t).replace($4,`
|
|
10
|
+
`).replace(G4,"")}function Rv(t,a){return a=Ev(a),Ev(t)===a}function Et(t,a,s,c,p,g){switch(s){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||ya(t,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&ya(t,""+c);break;case"className":Hs(t,"class",c);break;case"tabIndex":Hs(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Hs(t,s,c);break;case"style":Ya(t,c,g);break;case"data":if(a!=="object"){Hs(t,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||s!=="href")){t.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(s);break}c=Ko(""+c),t.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(s==="formAction"?(a!=="input"&&Et(t,a,"name",p.name,p,null),Et(t,a,"formEncType",p.formEncType,p,null),Et(t,a,"formMethod",p.formMethod,p,null),Et(t,a,"formTarget",p.formTarget,p,null)):(Et(t,a,"encType",p.encType,p,null),Et(t,a,"method",p.method,p,null),Et(t,a,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(s);break}c=Ko(""+c),t.setAttribute(s,c);break;case"onClick":c!=null&&(t.onclick=Pa);break;case"onScroll":c!=null&<("scroll",t);break;case"onScrollEnd":c!=null&<("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(o(61));if(s=c.__html,s!=null){if(p.children!=null)throw Error(o(60));t.innerHTML=s}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}s=Ko(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,""+c):t.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":c===!0?t.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,c):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(s,c):t.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(s):t.setAttribute(s,c);break;case"popover":lt("beforetoggle",t),lt("toggle",t),hi(t,"popover",c);break;case"xlinkActuate":Sn(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Sn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Sn(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Sn(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Sn(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Sn(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Sn(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Sn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Sn(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":hi(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=Go.get(s)||s,hi(t,s,c))}}function qh(t,a,s,c,p,g){switch(s){case"style":Ya(t,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(o(61));if(s=c.__html,s!=null){if(p.children!=null)throw Error(o(60));t.innerHTML=s}}break;case"children":typeof c=="string"?ya(t,c):(typeof c=="number"||typeof c=="bigint")&&ya(t,""+c);break;case"onScroll":c!=null&<("scroll",t);break;case"onScrollEnd":c!=null&<("scrollend",t);break;case"onClick":c!=null&&(t.onclick=Pa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ll.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),a=s.slice(2,p?s.length-7:void 0),g=t[Dn]||null,g=g!=null?g[s]:null,typeof g=="function"&&t.removeEventListener(a,g,p),typeof c=="function")){typeof g!="function"&&g!==null&&(s in t?t[s]=null:t.hasAttribute(s)&&t.removeAttribute(s)),t.addEventListener(a,c,p);break e}s in t?t[s]=c:c===!0?t.setAttribute(s,""):hi(t,s,c)}}}function _n(t,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":lt("error",t),lt("load",t);var c=!1,p=!1,g;for(g in s)if(s.hasOwnProperty(g)){var w=s[g];if(w!=null)switch(g){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Et(t,a,g,w,s,null)}}p&&Et(t,a,"srcSet",s.srcSet,s,null),c&&Et(t,a,"src",s.src,s,null);return;case"input":lt("invalid",t);var A=g=w=p=null,D=null,G=null;for(c in s)if(s.hasOwnProperty(c)){var ne=s[c];if(ne!=null)switch(c){case"name":p=ne;break;case"type":w=ne;break;case"checked":D=ne;break;case"defaultChecked":G=ne;break;case"value":g=ne;break;case"defaultValue":A=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(o(137,a));break;default:Et(t,a,c,ne,s,null)}}ml(t,g,A,D,G,w,p,!1);return;case"select":lt("invalid",t),c=w=g=null;for(p in s)if(s.hasOwnProperty(p)&&(A=s[p],A!=null))switch(p){case"value":g=A;break;case"defaultValue":w=A;break;case"multiple":c=A;default:Et(t,a,p,A,s,null)}a=g,s=w,t.multiple=!!c,a!=null?Gn(t,!!c,a,!1):s!=null&&Gn(t,!!c,s,!0);return;case"textarea":lt("invalid",t),g=p=c=null;for(w in s)if(s.hasOwnProperty(w)&&(A=s[w],A!=null))switch(w){case"value":c=A;break;case"defaultValue":p=A;break;case"children":g=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(o(91));break;default:Et(t,a,w,A,s,null)}fi(t,c,p,g);return;case"option":for(D in s)s.hasOwnProperty(D)&&(c=s[D],c!=null)&&(D==="selected"?t.selected=c&&typeof c!="function"&&typeof c!="symbol":Et(t,a,D,c,s,null));return;case"dialog":lt("beforetoggle",t),lt("toggle",t),lt("cancel",t),lt("close",t);break;case"iframe":case"object":lt("load",t);break;case"video":case"audio":for(c=0;c<Zl.length;c++)lt(Zl[c],t);break;case"image":lt("error",t),lt("load",t);break;case"details":lt("toggle",t);break;case"embed":case"source":case"link":lt("error",t),lt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in s)if(s.hasOwnProperty(G)&&(c=s[G],c!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Et(t,a,G,c,s,null)}return;default:if(Oa(a)){for(ne in s)s.hasOwnProperty(ne)&&(c=s[ne],c!==void 0&&qh(t,a,ne,c,s,void 0));return}}for(A in s)s.hasOwnProperty(A)&&(c=s[A],c!=null&&Et(t,a,A,c,s,null))}function K4(t,a,s,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,g=null,w=null,A=null,D=null,G=null,ne=null;for(Q in s){var se=s[Q];if(s.hasOwnProperty(Q)&&se!=null)switch(Q){case"checked":break;case"value":break;case"defaultValue":D=se;default:c.hasOwnProperty(Q)||Et(t,a,Q,null,c,se)}}for(var H in c){var Q=c[H];if(se=s[H],c.hasOwnProperty(H)&&(Q!=null||se!=null))switch(H){case"type":g=Q;break;case"name":p=Q;break;case"checked":G=Q;break;case"defaultChecked":ne=Q;break;case"value":w=Q;break;case"defaultValue":A=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(o(137,a));break;default:Q!==se&&Et(t,a,H,Q,c,se)}}Vo(t,w,A,D,G,ne,g,p);return;case"select":Q=w=A=H=null;for(g in s)if(D=s[g],s.hasOwnProperty(g)&&D!=null)switch(g){case"value":break;case"multiple":Q=D;default:c.hasOwnProperty(g)||Et(t,a,g,null,c,D)}for(p in c)if(g=c[p],D=s[p],c.hasOwnProperty(p)&&(g!=null||D!=null))switch(p){case"value":H=g;break;case"defaultValue":A=g;break;case"multiple":w=g;default:g!==D&&Et(t,a,p,g,c,D)}a=A,s=w,c=Q,H!=null?Gn(t,!!s,H,!1):!!c!=!!s&&(a!=null?Gn(t,!!s,a,!0):Gn(t,!!s,s?[]:"",!1));return;case"textarea":Q=H=null;for(A in s)if(p=s[A],s.hasOwnProperty(A)&&p!=null&&!c.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:Et(t,a,A,null,c,p)}for(w in c)if(p=c[w],g=s[w],c.hasOwnProperty(w)&&(p!=null||g!=null))switch(w){case"value":H=p;break;case"defaultValue":Q=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(o(91));break;default:p!==g&&Et(t,a,w,p,c,g)}ea(t,H,Q);return;case"option":for(var Ne in s)H=s[Ne],s.hasOwnProperty(Ne)&&H!=null&&!c.hasOwnProperty(Ne)&&(Ne==="selected"?t.selected=!1:Et(t,a,Ne,null,c,H));for(D in c)H=c[D],Q=s[D],c.hasOwnProperty(D)&&H!==Q&&(H!=null||Q!=null)&&(D==="selected"?t.selected=H&&typeof H!="function"&&typeof H!="symbol":Et(t,a,D,H,c,Q));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ge in s)H=s[Ge],s.hasOwnProperty(Ge)&&H!=null&&!c.hasOwnProperty(Ge)&&Et(t,a,Ge,null,c,H);for(G in c)if(H=c[G],Q=s[G],c.hasOwnProperty(G)&&H!==Q&&(H!=null||Q!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(o(137,a));break;default:Et(t,a,G,H,c,Q)}return;default:if(Oa(a)){for(var Rt in s)H=s[Rt],s.hasOwnProperty(Rt)&&H!==void 0&&!c.hasOwnProperty(Rt)&&qh(t,a,Rt,void 0,c,H);for(ne in c)H=c[ne],Q=s[ne],!c.hasOwnProperty(ne)||H===Q||H===void 0&&Q===void 0||qh(t,a,ne,H,c,Q);return}}for(var L in s)H=s[L],s.hasOwnProperty(L)&&H!=null&&!c.hasOwnProperty(L)&&Et(t,a,L,null,c,H);for(se in c)H=c[se],Q=s[se],!c.hasOwnProperty(se)||H===Q||H==null&&Q==null||Et(t,a,se,H,c,Q)}function Dv(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function H4(){if(typeof performance.getEntriesByType=="function"){for(var t=0,a=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var p=s[c],g=p.transferSize,w=p.initiatorType,A=p.duration;if(g&&A&&Dv(w)){for(w=0,A=p.responseEnd,c+=1;c<s.length;c++){var D=s[c],G=D.startTime;if(G>A)break;var ne=D.transferSize,se=D.initiatorType;ne&&Dv(se)&&(D=D.responseEnd,w+=ne*(D<A?1:(A-G)/(D-G)))}if(--c,a+=8*(g+w)/(p.duration/1e3),t++,10<t)break}}if(0<t)return a/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Mh=null,Bh=null;function Qu(t){return t.nodeType===9?t:t.ownerDocument}function zv(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Iv(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function Lh(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Uh=null;function F4(){var t=window.event;return t&&t.type==="popstate"?t===Uh?!1:(Uh=t,!0):(Uh=null,!1)}var Ov=typeof setTimeout=="function"?setTimeout:void 0,Q4=typeof clearTimeout=="function"?clearTimeout:void 0,Pv=typeof Promise=="function"?Promise:void 0,Z4=typeof queueMicrotask=="function"?queueMicrotask:typeof Pv<"u"?function(t){return Pv.resolve(null).then(t).catch(Y4)}:Ov;function Y4(t){setTimeout(function(){throw t})}function ys(t){return t==="head"}function qv(t,a){var s=a,c=0;do{var p=s.nextSibling;if(t.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"||s==="/&"){if(c===0){t.removeChild(p),wr(a);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Xl(t.ownerDocument.documentElement);else if(s==="head"){s=t.ownerDocument.head,Xl(s);for(var g=s.firstChild;g;){var w=g.nextSibling,A=g.nodeName;g[Qi]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=w}}else s==="body"&&Xl(t.ownerDocument.body);s=p}while(s);wr(a)}function Mv(t,a){var s=t;t=0;do{var c=s.nextSibling;if(s.nodeType===1?a?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(a?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(t===0)break;t--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||t++;s=c}while(s)}function Vh(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Vh(s),ol(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function X4(t,a,s,c){for(;t.nodeType===1;){var p=s;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[Qi])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==p.rel||t.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||t.getAttribute("title")!==(p.title==null?null:p.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(p.src==null?null:p.src)||t.getAttribute("type")!==(p.type==null?null:p.type)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=Na(t.nextSibling),t===null)break}return null}function J4(t,a,s){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=Na(t.nextSibling),t===null))return null;return t}function Bv(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Na(t.nextSibling),t===null))return null;return t}function $h(t){return t.data==="$?"||t.data==="$~"}function Gh(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function W4(t,a){var s=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||s.readyState!=="loading")a();else{var c=function(){a(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function Na(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return t}var Kh=null;function Lv(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(a===0)return Na(t.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}t=t.nextSibling}return null}function Uv(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(a===0)return t;a--}else s!=="/$"&&s!=="/&"||a++}t=t.previousSibling}return null}function Vv(t,a,s){switch(a=Qu(s),t){case"html":if(t=a.documentElement,!t)throw Error(o(452));return t;case"head":if(t=a.head,!t)throw Error(o(453));return t;case"body":if(t=a.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function Xl(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);ol(t)}var Ca=new Map,$v=new Set;function Zu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var zi=J.d;J.d={f:e5,r:t5,D:n5,C:a5,L:i5,m:s5,X:r5,S:o5,M:l5};function e5(){var t=zi.f(),a=Lu();return t||a}function t5(t){var a=Zi(t);a!==null&&a.tag===5&&a.type==="form"?ob(a):zi.r(t)}var br=typeof document>"u"?null:document;function Gv(t,a,s){var c=br;if(c&&typeof a=="string"&&a){var p=In(a);p='link[rel="'+t+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),$v.has(p)||($v.add(p),t={rel:t,crossOrigin:s,href:a},c.querySelector(p)===null&&(a=c.createElement("link"),_n(a,"link",t),en(a),c.head.appendChild(a)))}}function n5(t){zi.D(t),Gv("dns-prefetch",t,null)}function a5(t,a){zi.C(t,a),Gv("preconnect",t,a)}function i5(t,a,s){zi.L(t,a,s);var c=br;if(c&&t&&a){var p='link[rel="preload"][as="'+In(a)+'"]';a==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+In(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+In(s.imageSizes)+'"]')):p+='[href="'+In(t)+'"]';var g=p;switch(a){case"style":g=vr(t);break;case"script":g=xr(t)}Ca.has(g)||(t=S({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:t,as:a},s),Ca.set(g,t),c.querySelector(p)!==null||a==="style"&&c.querySelector(Jl(g))||a==="script"&&c.querySelector(Wl(g))||(a=c.createElement("link"),_n(a,"link",t),en(a),c.head.appendChild(a)))}}function s5(t,a){zi.m(t,a);var s=br;if(s&&t){var c=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+In(c)+'"][href="'+In(t)+'"]',g=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=xr(t)}if(!Ca.has(g)&&(t=S({rel:"modulepreload",href:t},a),Ca.set(g,t),s.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Wl(g)))return}c=s.createElement("link"),_n(c,"link",t),en(c),s.head.appendChild(c)}}}function o5(t,a,s){zi.S(t,a,s);var c=br;if(c&&t){var p=Xi(c).hoistableStyles,g=vr(t);a=a||"default";var w=p.get(g);if(!w){var A={loading:0,preload:null};if(w=c.querySelector(Jl(g)))A.loading=5;else{t=S({rel:"stylesheet",href:t,"data-precedence":a},s),(s=Ca.get(g))&&Hh(t,s);var D=w=c.createElement("link");en(D),_n(D,"link",t),D._p=new Promise(function(G,ne){D.onload=G,D.onerror=ne}),D.addEventListener("load",function(){A.loading|=1}),D.addEventListener("error",function(){A.loading|=2}),A.loading|=4,Yu(w,a,c)}w={type:"stylesheet",instance:w,count:1,state:A},p.set(g,w)}}}function r5(t,a){zi.X(t,a);var s=br;if(s&&t){var c=Xi(s).hoistableScripts,p=xr(t),g=c.get(p);g||(g=s.querySelector(Wl(p)),g||(t=S({src:t,async:!0},a),(a=Ca.get(p))&&Fh(t,a),g=s.createElement("script"),en(g),_n(g,"link",t),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function l5(t,a){zi.M(t,a);var s=br;if(s&&t){var c=Xi(s).hoistableScripts,p=xr(t),g=c.get(p);g||(g=s.querySelector(Wl(p)),g||(t=S({src:t,async:!0,type:"module"},a),(a=Ca.get(p))&&Fh(t,a),g=s.createElement("script"),en(g),_n(g,"link",t),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function Kv(t,a,s,c){var p=(p=F.current)?Zu(p):null;if(!p)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=vr(s.href),s=Xi(p).hoistableStyles,c=s.get(a),c||(c={type:"style",instance:null,count:0,state:null},s.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){t=vr(s.href);var g=Xi(p).hoistableStyles,w=g.get(t);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,w),(g=p.querySelector(Jl(t)))&&!g._p&&(w.instance=g,w.state.loading=5),Ca.has(t)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Ca.set(t,s),g||c5(p,t,s,w.state))),a&&c===null)throw Error(o(528,""));return w}if(a&&c!==null)throw Error(o(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=xr(s),s=Xi(p).hoistableScripts,c=s.get(a),c||(c={type:"script",instance:null,count:0,state:null},s.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function vr(t){return'href="'+In(t)+'"'}function Jl(t){return'link[rel="stylesheet"]['+t+"]"}function Hv(t){return S({},t,{"data-precedence":t.precedence,precedence:null})}function c5(t,a,s,c){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=t.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),_n(a,"link",s),en(a),t.head.appendChild(a))}function xr(t){return'[src="'+In(t)+'"]'}function Wl(t){return"script[async]"+t}function Fv(t,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var c=t.querySelector('style[data-href~="'+In(s.href)+'"]');if(c)return a.instance=c,en(c),c;var p=S({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),en(c),_n(c,"style",p),Yu(c,s.precedence,t),a.instance=c;case"stylesheet":p=vr(s.href);var g=t.querySelector(Jl(p));if(g)return a.state.loading|=4,a.instance=g,en(g),g;c=Hv(s),(p=Ca.get(p))&&Hh(c,p),g=(t.ownerDocument||t).createElement("link"),en(g);var w=g;return w._p=new Promise(function(A,D){w.onload=A,w.onerror=D}),_n(g,"link",c),a.state.loading|=4,Yu(g,s.precedence,t),a.instance=g;case"script":return g=xr(s.src),(p=t.querySelector(Wl(g)))?(a.instance=p,en(p),p):(c=s,(p=Ca.get(g))&&(c=S({},s),Fh(c,p)),t=t.ownerDocument||t,p=t.createElement("script"),en(p),_n(p,"link",c),t.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(o(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,Yu(c,s.precedence,t));return a.instance}function Yu(t,a,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,g=p,w=0;w<c.length;w++){var A=c[w];if(A.dataset.precedence===a)g=A;else if(g!==p)break}g?g.parentNode.insertBefore(t,g.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(t,a.firstChild))}function Hh(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function Fh(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var Xu=null;function Qv(t,a,s){if(Xu===null){var c=new Map,p=Xu=new Map;p.set(s,c)}else p=Xu,c=p.get(s),c||(c=new Map,p.set(s,c));if(c.has(t))return c;for(c.set(t,null),s=s.getElementsByTagName(t),p=0;p<s.length;p++){var g=s[p];if(!(g[Qi]||g[on]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var w=g.getAttribute(a)||"";w=t+w;var A=c.get(w);A?A.push(g):c.set(w,[g])}}return c}function Zv(t,a,s){t=t.ownerDocument||t,t.head.insertBefore(s,a==="title"?t.querySelector("head > title"):null)}function u5(t,a,s){if(s===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(t=a.disabled,typeof a.precedence=="string"&&t==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Yv(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function d5(t,a,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=vr(c.href),g=a.querySelector(Jl(p));if(g){a=g._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=Ju.bind(t),a.then(t,t)),s.state.loading|=4,s.instance=g,en(g);return}g=a.ownerDocument||a,c=Hv(c),(p=Ca.get(p))&&Hh(c,p),g=g.createElement("link"),en(g);var w=g;w._p=new Promise(function(A,D){w.onload=A,w.onerror=D}),_n(g,"link",c),s.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=Ju.bind(t),a.addEventListener("load",s),a.addEventListener("error",s))}}var Qh=0;function m5(t,a){return t.stylesheets&&t.count===0&&ed(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var c=setTimeout(function(){if(t.stylesheets&&ed(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+a);0<t.imgBytes&&Qh===0&&(Qh=62500*H4());var p=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&ed(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>Qh?50:800)+a);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function Ju(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ed(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Wu=null;function ed(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Wu=new Map,a.forEach(p5,t),Wu=null,Ju.call(t))}function p5(t,a){if(!(a.state.loading&4)){var s=Wu.get(t);if(s)var c=s.get(null);else{s=new Map,Wu.set(t,s);for(var p=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var w=p[g];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(s.set(w.dataset.precedence,w),c=w)}c&&s.set(null,c)}p=a.instance,w=p.getAttribute("data-precedence"),g=s.get(w)||c,g===c&&s.set(null,p),s.set(w,p),this.count++,c=Ju.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),g?g.parentNode.insertBefore(p,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(p,t.firstChild)),a.state.loading|=4}}var ec={$$typeof:M,Provider:null,Consumer:null,_currentValue:be,_currentValue2:be,_threadCount:0};function h5(t,a,s,c,p,g,w,A,D){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Mo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mo(0),this.hiddenUpdates=Mo(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function Xv(t,a,s,c,p,g,w,A,D,G,ne,se){return t=new h5(t,a,s,w,D,G,ne,se,A),a=1,g===!0&&(a|=24),g=na(3,null,null,a),t.current=g,g.stateNode=t,a=Cp(),a.refCount++,t.pooledCache=a,a.refCount++,g.memoizedState={element:c,isDehydrated:s,cache:a},Rp(g),t}function Jv(t){return t?(t=Xo,t):Xo}function Wv(t,a,s,c,p,g){p=Jv(p),c.context===null?c.context=p:c.pendingContext=p,c=os(a),c.payload={element:s},g=g===void 0?null:g,g!==null&&(c.callback=g),s=rs(t,c,a),s!==null&&(Zn(s,t,a),Dl(s,t,a))}function ex(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<a?s:a}}function Zh(t,a){ex(t,a),(t=t.alternate)&&ex(t,a)}function tx(t){if(t.tag===13||t.tag===31){var a=Xs(t,67108864);a!==null&&Zn(a,t,67108864),Zh(t,67108864)}}function nx(t){if(t.tag===13||t.tag===31){var a=ra();a=il(a);var s=Xs(t,a);s!==null&&Zn(s,t,a),Zh(t,a)}}var td=!0;function f5(t,a,s,c){var p=P.T;P.T=null;var g=J.p;try{J.p=2,Yh(t,a,s,c)}finally{J.p=g,P.T=p}}function g5(t,a,s,c){var p=P.T;P.T=null;var g=J.p;try{J.p=8,Yh(t,a,s,c)}finally{J.p=g,P.T=p}}function Yh(t,a,s,c){if(td){var p=Xh(c);if(p===null)Ph(t,a,c,nd,s),ix(t,c);else if(b5(p,t,a,s,c))c.stopPropagation();else if(ix(t,c),a&4&&-1<y5.indexOf(t)){for(;p!==null;){var g=Zi(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var w=It(g.pendingLanes);if(w!==0){var A=g;for(A.pendingLanes|=2,A.entangledLanes|=2;w;){var D=1<<31-Qt(w);A.entanglements[1]|=D,w&=~D}ni(g),(wt&6)===0&&(Mu=Ut()+500,Ql(0))}}break;case 31:case 13:A=Xs(g,2),A!==null&&Zn(A,g,2),Lu(),Zh(g,2)}if(g=Xh(c),g===null&&Ph(t,a,c,nd,s),g===p)break;p=g}p!==null&&c.stopPropagation()}else Ph(t,a,c,null,s)}}function Xh(t){return t=hl(t),Jh(t)}var nd=null;function Jh(t){if(nd=null,t=pi(t),t!==null){var a=h(t);if(a===null)t=null;else{var s=a.tag;if(s===13){if(t=f(a),t!==null)return t;t=null}else if(s===31){if(t=b(a),t!==null)return t;t=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return nd=t,null}function ax(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ci()){case Ls:return 2;case ui:return 8;case Rn:case qo:return 32;case Us:return 268435456;default:return 32}default:return 32}}var Wh=!1,bs=null,vs=null,xs=null,tc=new Map,nc=new Map,ws=[],y5="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ix(t,a){switch(t){case"focusin":case"focusout":bs=null;break;case"dragenter":case"dragleave":vs=null;break;case"mouseover":case"mouseout":xs=null;break;case"pointerover":case"pointerout":tc.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":nc.delete(a.pointerId)}}function ac(t,a,s,c,p,g){return t===null||t.nativeEvent!==g?(t={blockedOn:a,domEventName:s,eventSystemFlags:c,nativeEvent:g,targetContainers:[p]},a!==null&&(a=Zi(a),a!==null&&tx(a)),t):(t.eventSystemFlags|=c,a=t.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),t)}function b5(t,a,s,c,p){switch(a){case"focusin":return bs=ac(bs,t,a,s,c,p),!0;case"dragenter":return vs=ac(vs,t,a,s,c,p),!0;case"mouseover":return xs=ac(xs,t,a,s,c,p),!0;case"pointerover":var g=p.pointerId;return tc.set(g,ac(tc.get(g)||null,t,a,s,c,p)),!0;case"gotpointercapture":return g=p.pointerId,nc.set(g,ac(nc.get(g)||null,t,a,s,c,p)),!0}return!1}function sx(t){var a=pi(t.target);if(a!==null){var s=h(a);if(s!==null){if(a=s.tag,a===13){if(a=f(s),a!==null){t.blockedOn=a,tu(t.priority,function(){nx(s)});return}}else if(a===31){if(a=b(s),a!==null){t.blockedOn=a,tu(t.priority,function(){nx(s)});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ad(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var s=Xh(t.nativeEvent);if(s===null){s=t.nativeEvent;var c=new s.constructor(s.type,s);pl=c,s.target.dispatchEvent(c),pl=null}else return a=Zi(s),a!==null&&tx(a),t.blockedOn=s,!1;a.shift()}return!0}function ox(t,a,s){ad(t)&&s.delete(a)}function v5(){Wh=!1,bs!==null&&ad(bs)&&(bs=null),vs!==null&&ad(vs)&&(vs=null),xs!==null&&ad(xs)&&(xs=null),tc.forEach(ox),nc.forEach(ox)}function id(t,a){t.blockedOn===a&&(t.blockedOn=null,Wh||(Wh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,v5)))}var sd=null;function rx(t){sd!==t&&(sd=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){sd===t&&(sd=null);for(var a=0;a<t.length;a+=3){var s=t[a],c=t[a+1],p=t[a+2];if(typeof c!="function"){if(Jh(c||s)===null)continue;break}var g=Zi(s);g!==null&&(t.splice(a,3),a-=3,Xp(g,{pending:!0,data:p,method:s.method,action:c},c,p))}}))}function wr(t){function a(D){return id(D,t)}bs!==null&&id(bs,t),vs!==null&&id(vs,t),xs!==null&&id(xs,t),tc.forEach(a),nc.forEach(a);for(var s=0;s<ws.length;s++){var c=ws[s];c.blockedOn===t&&(c.blockedOn=null)}for(;0<ws.length&&(s=ws[0],s.blockedOn===null);)sx(s),s.blockedOn===null&&ws.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var p=s[c],g=s[c+1],w=p[Dn]||null;if(typeof g=="function")w||rx(s);else if(w){var A=null;if(g&&g.hasAttribute("formAction")){if(p=g,w=g[Dn]||null)A=w.formAction;else if(Jh(p)!==null)continue}else A=w.action;typeof A=="function"?s[c+1]=A:(s.splice(c,3),c-=3),rx(s)}}}function lx(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(w){return p=w})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function ef(t){this._internalRoot=t}od.prototype.render=ef.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(o(409));var s=a.current,c=ra();Wv(s,c,t,a,null,null)},od.prototype.unmount=ef.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;Wv(t.current,2,null,t,null,null),Lu(),a[Fi]=null}};function od(t){this._internalRoot=t}od.prototype.unstable_scheduleHydration=function(t){if(t){var a=Bo();t={blockedOn:null,target:t,priority:a};for(var s=0;s<ws.length&&a!==0&&a<ws[s].priority;s++);ws.splice(s,0,t),s===0&&sx(t)}};var cx=n.version;if(cx!=="19.2.4")throw Error(o(527,cx,"19.2.4"));J.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=x(a),t=t!==null?k(t):null,t=t===null?null:t.stateNode,t};var x5={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rd.isDisabled&&rd.supportsFiber)try{yn=rd.inject(x5),_t=rd}catch{}}return ic.createRoot=function(t,a){if(!u(t))throw Error(o(299));var s=!1,c="",p=gb,g=yb,w=bb;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError)),a=Xv(t,1,!1,null,null,s,c,null,p,g,w,lx),t[Fi]=a.current,Oh(t),new ef(a)},ic.hydrateRoot=function(t,a,s){if(!u(t))throw Error(o(299));var c=!1,p="",g=gb,w=yb,A=bb,D=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(w=s.onCaughtError),s.onRecoverableError!==void 0&&(A=s.onRecoverableError),s.formState!==void 0&&(D=s.formState)),a=Xv(t,1,!0,a,s??null,c,p,D,g,w,A,lx),a.context=Jv(null),s=a.current,c=ra(),c=il(c),p=os(c),p.callback=null,rs(s,p,c),s=c,a.current.lanes=s,Gs(a,s),ni(a),t[Fi]=a.current,Oh(t),new od(a)},ic.version="19.2.4",ic}var px;function i6(){if(px)return tf.exports;px=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),tf.exports=a6(),tf.exports}var s6=i6();const o6={bodySerializer:e=>JSON.stringify(e,(n,i)=>typeof i=="bigint"?i.toString():i)},r6=({onRequest:e,onSseError:n,onSseEvent:i,responseTransformer:o,responseValidator:u,sseDefaultRetryDelay:h,sseMaxRetryAttempts:f,sseMaxRetryDelay:b,sseSleepFn:v,url:x,...k})=>{let S;const C=v??(q=>new Promise(T=>setTimeout(T,q)));return{stream:async function*(){let q=h??3e3,T=0;const V=k.signal??new AbortController().signal;for(;!V.aborted;){T++;const Y=k.headers instanceof Headers?k.headers:new Headers(k.headers);S!==void 0&&Y.set("Last-Event-ID",S);try{const M={redirect:"follow",...k,body:k.serializedBody,headers:Y,signal:V};let U=new Request(x,M);e&&(U=await e(x,M));const te=await(k.fetch??globalThis.fetch)(U);if(!te.ok)throw new Error(`SSE failed: ${te.status} ${te.statusText}`);if(!te.body)throw new Error("No body in SSE response");const B=te.body.pipeThrough(new TextDecoderStream).getReader();let X="";const le=()=>{try{B.cancel()}catch{}};V.addEventListener("abort",le);try{for(;;){const{done:Je,value:nt}=await B.read();if(Je)break;X+=nt;const $e=X.split(`
|
|
11
|
+
|
|
12
|
+
`);X=$e.pop()??"";for(const Pe of $e){const Se=Pe.split(`
|
|
13
|
+
`),Ue=[];let P;for(const je of Se)if(je.startsWith("data:"))Ue.push(je.replace(/^data:\s*/,""));else if(je.startsWith("event:"))P=je.replace(/^event:\s*/,"");else if(je.startsWith("id:"))S=je.replace(/^id:\s*/,"");else if(je.startsWith("retry:")){const W=Number.parseInt(je.replace(/^retry:\s*/,""),10);Number.isNaN(W)||(q=W)}let J,be=!1;if(Ue.length){const je=Ue.join(`
|
|
14
|
+
`);try{J=JSON.parse(je),be=!0}catch{J=je}}be&&(u&&await u(J),o&&(J=await o(J))),i?.({data:J,event:P,id:S,retry:q}),Ue.length&&(yield J)}}}finally{V.removeEventListener("abort",le),B.releaseLock()}break}catch(M){if(n?.(M),f!==void 0&&T>=f)break;const U=Math.min(q*2**(T-1),b??3e4);await C(U)}}}()}},l6=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},c6=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},u6=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},xS=({allowReserved:e,explode:n,name:i,style:o,value:u})=>{if(!n){const b=(e?u:u.map(v=>encodeURIComponent(v))).join(c6(o));switch(o){case"label":return`.${b}`;case"matrix":return`;${i}=${b}`;case"simple":return b;default:return`${i}=${b}`}}const h=l6(o),f=u.map(b=>o==="label"||o==="simple"?e?b:encodeURIComponent(b):mm({allowReserved:e,name:i,value:b})).join(h);return o==="label"||o==="matrix"?h+f:f},mm=({allowReserved:e,name:n,value:i})=>{if(i==null)return"";if(typeof i=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${n}=${e?i:encodeURIComponent(i)}`},wS=({allowReserved:e,explode:n,name:i,style:o,value:u,valueOnly:h})=>{if(u instanceof Date)return h?u.toISOString():`${i}=${u.toISOString()}`;if(o!=="deepObject"&&!n){let v=[];Object.entries(u).forEach(([k,S])=>{v=[...v,k,e?S:encodeURIComponent(S)]});const x=v.join(",");switch(o){case"form":return`${i}=${x}`;case"label":return`.${x}`;case"matrix":return`;${i}=${x}`;default:return x}}const f=u6(o),b=Object.entries(u).map(([v,x])=>mm({allowReserved:e,name:o==="deepObject"?`${i}[${v}]`:v,value:x})).join(f);return o==="label"||o==="matrix"?f+b:b},d6=/\{[^{}]+\}/g,m6=({path:e,url:n})=>{let i=n;const o=n.match(d6);if(o)for(const u of o){let h=!1,f=u.substring(1,u.length-1),b="simple";f.endsWith("*")&&(h=!0,f=f.substring(0,f.length-1)),f.startsWith(".")?(f=f.substring(1),b="label"):f.startsWith(";")&&(f=f.substring(1),b="matrix");const v=e[f];if(v==null)continue;if(Array.isArray(v)){i=i.replace(u,xS({explode:h,name:f,style:b,value:v}));continue}if(typeof v=="object"){i=i.replace(u,wS({explode:h,name:f,style:b,value:v,valueOnly:!0}));continue}if(b==="matrix"){i=i.replace(u,`;${mm({name:f,value:v})}`);continue}const x=encodeURIComponent(b==="label"?`.${v}`:v);i=i.replace(u,x)}return i},p6=({baseUrl:e,path:n,query:i,querySerializer:o,url:u})=>{const h=u.startsWith("/")?u:`/${u}`;let f=(e??"")+h;n&&(f=m6({path:n,url:f}));let b=i?o(i):"";return b.startsWith("?")&&(b=b.substring(1)),b&&(f+=`?${b}`),f};function h6(e){const n=e.body!==void 0;if(n&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(n)return e.body}const f6=async(e,n)=>{const i=typeof n=="function"?await n(e):n;if(i)return e.scheme==="bearer"?`Bearer ${i}`:e.scheme==="basic"?`Basic ${btoa(i)}`:i},kS=({allowReserved:e,array:n,object:i}={})=>u=>{const h=[];if(u&&typeof u=="object")for(const f in u){const b=u[f];if(b!=null)if(Array.isArray(b)){const v=xS({allowReserved:e,explode:!0,name:f,style:"form",value:b,...n});v&&h.push(v)}else if(typeof b=="object"){const v=wS({allowReserved:e,explode:!0,name:f,style:"deepObject",value:b,...i});v&&h.push(v)}else{const v=mm({allowReserved:e,name:f,value:b});v&&h.push(v)}}return h.join("&")},g6=e=>{if(!e)return"stream";const n=e.split(";")[0]?.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(i=>n.startsWith(i)))return"blob";if(n.startsWith("text/"))return"text"}},y6=(e,n)=>n?!!(e.headers.has(n)||e.query?.[n]||e.headers.get("Cookie")?.includes(`${n}=`)):!1,b6=async({security:e,...n})=>{for(const i of e){if(y6(n,i.name))continue;const o=await f6(i,n.auth);if(!o)continue;const u=i.name??"Authorization";switch(i.in){case"query":n.query||(n.query={}),n.query[u]=o;break;case"cookie":n.headers.append("Cookie",`${u}=${o}`);break;default:n.headers.set(u,o);break}}},hx=e=>p6({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:kS(e.querySerializer),url:e.url}),fx=(e,n)=>{const i={...e,...n};return i.baseUrl?.endsWith("/")&&(i.baseUrl=i.baseUrl.substring(0,i.baseUrl.length-1)),i.headers=SS(e.headers,n.headers),i},v6=e=>{const n=[];return e.forEach((i,o)=>{n.push([o,i])}),n},SS=(...e)=>{const n=new Headers;for(const i of e){if(!i)continue;const o=i instanceof Headers?v6(i):Object.entries(i);for(const[u,h]of o)if(h===null)n.delete(u);else if(Array.isArray(h))for(const f of h)n.append(u,f);else h!==void 0&&n.set(u,typeof h=="object"?JSON.stringify(h):h)}return n};class sf{fns=[];clear(){this.fns=[]}eject(n){const i=this.getInterceptorIndex(n);this.fns[i]&&(this.fns[i]=null)}exists(n){const i=this.getInterceptorIndex(n);return!!this.fns[i]}getInterceptorIndex(n){return typeof n=="number"?this.fns[n]?n:-1:this.fns.indexOf(n)}update(n,i){const o=this.getInterceptorIndex(n);return this.fns[o]?(this.fns[o]=i,n):!1}use(n){return this.fns.push(n),this.fns.length-1}}const x6=()=>({error:new sf,request:new sf,response:new sf}),w6=kS({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),k6={"Content-Type":"application/json"},jS=(e={})=>({...o6,headers:k6,parseAs:"auto",querySerializer:w6,...e}),AS=(e={})=>{let n=fx(jS(),e);const i=()=>({...n}),o=x=>(n=fx(n,x),i()),u=x6(),h=async x=>{const k={...n,...x,fetch:x.fetch??n.fetch??globalThis.fetch,headers:SS(n.headers,x.headers),serializedBody:void 0};k.security&&await b6({...k,security:k.security}),k.requestValidator&&await k.requestValidator(k),k.body!==void 0&&k.bodySerializer&&(k.serializedBody=k.bodySerializer(k.body)),(k.body===void 0||k.serializedBody==="")&&k.headers.delete("Content-Type");const S=hx(k);return{opts:k,url:S}},f=async x=>{const{opts:k,url:S}=await h(x),C={redirect:"follow",...k,body:h6(k)};let _=new Request(S,C);for(const Z of u.request.fns)Z&&(_=await Z(_,k));const z=k.fetch;let q=await z(_);for(const Z of u.response.fns)Z&&(q=await Z(q,_,k));const T={request:_,response:q};if(q.ok){const Z=(k.parseAs==="auto"?g6(q.headers.get("Content-Type")):k.parseAs)??"json";if(q.status===204||q.headers.get("Content-Length")==="0"){let B;switch(Z){case"arrayBuffer":case"blob":case"text":B=await q[Z]();break;case"formData":B=new FormData;break;case"stream":B=q.body;break;default:B={};break}return k.responseStyle==="data"?B:{data:B,...T}}let te;switch(Z){case"arrayBuffer":case"blob":case"formData":case"json":case"text":te=await q[Z]();break;case"stream":return k.responseStyle==="data"?q.body:{data:q.body,...T}}return Z==="json"&&(k.responseValidator&&await k.responseValidator(te),k.responseTransformer&&(te=await k.responseTransformer(te))),k.responseStyle==="data"?te:{data:te,...T}}const V=await q.text();let Y;try{Y=JSON.parse(V)}catch{}const M=Y??V;let U=M;for(const Z of u.error.fns)Z&&(U=await Z(M,q,_,k));if(U=U||{},k.throwOnError)throw U;return k.responseStyle==="data"?void 0:{error:U,...T}},b=x=>k=>f({...k,method:x}),v=x=>async k=>{const{opts:S,url:C}=await h(k);return r6({...S,body:S.body,headers:S.headers,method:x,onRequest:async(_,z)=>{let q=new Request(_,z);for(const T of u.request.fns)T&&(q=await T(q,S));return q},url:C})};return{buildUrl:hx,connect:b("CONNECT"),delete:b("DELETE"),get:b("GET"),getConfig:i,head:b("HEAD"),interceptors:u,options:b("OPTIONS"),patch:b("PATCH"),post:b("POST"),put:b("PUT"),request:f,setConfig:o,sse:{connect:v("CONNECT"),delete:v("DELETE"),get:v("GET"),head:v("HEAD"),options:v("OPTIONS"),patch:v("PATCH"),post:v("POST"),put:v("PUT"),trace:v("TRACE")},trace:b("TRACE")}},I=AS(jS()),S6=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sitemaps/submit",...e,headers:{"Content-Type":"application/json",...e.headers}}),j6=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects",...e}),A6=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects",...e,headers:{"Content-Type":"application/json",...e.headers}}),N6=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),NS=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),C6=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),_6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan",...e}),T6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-report",...e}),E6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-setup",...e}),yee=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft",...e}),bee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/create",...e,headers:{"Content-Type":"application/json",...e.headers}}),vee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/import-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),xee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/apply-sitemap-selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),wee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/upsert-target",...e,headers:{"Content-Type":"application/json",...e.headers}}),kee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/exclude-target",...e,headers:{"Content-Type":"application/json",...e.headers}}),See=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/apply-assignments",...e,headers:{"Content-Type":"application/json",...e.headers}}),jee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/preview-assignments",...e,headers:{"Content-Type":"application/json",...e.headers}}),Aee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/replace-assignments",...e,headers:{"Content-Type":"application/json",...e.headers}}),Nee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/apply-paired-assignments",...e,headers:{"Content-Type":"application/json",...e.headers}}),Cee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/remove-assignment",...e,headers:{"Content-Type":"application/json",...e.headers}}),_ee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/upsert-group",...e,headers:{"Content-Type":"application/json",...e.headers}}),Tee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/remove-group",...e,headers:{"Content-Type":"application/json",...e.headers}}),Eee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/preview-group-membership",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ree=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/apply-group-membership",...e,headers:{"Content-Type":"application/json",...e.headers}}),Dee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/upsert-competitor",...e,headers:{"Content-Type":"application/json",...e.headers}}),R6=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/pin-competitor",...e,headers:{"Content-Type":"application/json",...e.headers}}),zee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/remove-competitor",...e,headers:{"Content-Type":"application/json",...e.headers}}),Iee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/compile-preview",...e}),Oee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/diff-preview",...e}),Pee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/publish",...e,headers:{"Content-Type":"application/json",...e.headers}}),qee=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/discard",...e}),CS=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-overview",...e}),D6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/settings",...e}),z6=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/settings",...e,headers:{"Content-Type":"application/json",...e.headers}}),I6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment",...e}),O6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/evidence",...e}),P6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/backfill-preview",...e}),q6=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/backfills",...e,headers:{"Content-Type":"application/json",...e.headers}}),M6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/jobs",...e}),B6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/jobs/{jobId}",...e}),L6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/visibility-report",...e}),U6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-property-evidence",...e}),V6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-question-result",...e}),$6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-property-competitors",...e}),G6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-query-templates",...e}),K6=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-query-templates/{templateId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),H6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/runs",...e}),F6=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/batches",...e,headers:{"Content-Type":"application/json",...e.headers}}),Q6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/query-tracking",...e}),Z6=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/query-tracking/preview",...e,headers:{"Content-Type":"application/json",...e.headers}}),Y6=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/query-tracking/commit",...e,headers:{"Content-Type":"application/json",...e.headers}}),X6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/runs/{runId}",...e}),J6=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations",...e,headers:{"Content-Type":"application/json",...e.headers}}),W6=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/{label}",...e}),e_=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/default",...e,headers:{"Content-Type":"application/json",...e.headers}}),t_=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),_S=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e}),n_=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),a_=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),i_=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries/generate",...e,headers:{"Content-Type":"application/json",...e.headers}}),s_=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),o_=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),r_=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors/{id}",...e}),l_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/analytics/competitors",...e}),TS=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e}),c_=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),u_=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e}),d_=e=>(e?.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ES=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs/{id}",...e}),m_=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/apply",...e,headers:{"Content-Type":"application/json",...e.headers}}),p_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/history",...e}),h_=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/history",...e}),f_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/timeline",...e}),g_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/analytics/metrics",...e}),y_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/snapshots/diff",...e}),RS=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings",...e}),b_=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/providers/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),v_=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/google",...e,headers:{"Content-Type":"application/json",...e.headers}}),x_=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/keys/self",...e}),w_=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/bing",...e,headers:{"Content-Type":"application/json",...e.headers}}),k_=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/cdp",...e,headers:{"Content-Type":"application/json",...e.headers}}),S_=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),j_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),A_=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e,headers:{"Content-Type":"application/json",...e.headers}}),N_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedules",...e}),C_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e}),__=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e,headers:{"Content-Type":"application/json",...e.headers}}),T_=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}",...e}),E_=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}/test",...e}),R_=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry",...e}),D_=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry",...e,headers:{"Content-Type":"application/json",...e.headers}}),z_=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry/onboarding",...e,headers:{"Content-Type":"application/json",...e.headers}}),I_=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry/ui",...e,headers:{"Content-Type":"application/json",...e.headers}}),DS=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/cdp/status",...e}),O_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/status",...e}),P_=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/oauth/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),q_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/customers",...e}),M_=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),B_=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/sync",...e}),L_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/performance",...e}),U_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/snapshots",...e}),V_=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/connection",...e}),$_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/status",...e}),G_=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/oauth/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),K_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/accounts",...e}),H_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/accounts/{accountId}/containers",...e}),F_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/accounts/{accountId}/containers/{containerId}/workspaces",...e}),Q_=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),Z_=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/sync",...e}),Y_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/snapshots",...e}),X_=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/connection",...e}),J_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/options",...e}),W_=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/contracts",...e}),eT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/contracts",...e,headers:{"Content-Type":"application/json",...e.headers}}),tT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/contracts/{contractId}/integrity",...e}),nT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections",...e}),aT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),iT=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}",...e}),sT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/properties",...e}),oT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/property",...e,headers:{"Content-Type":"application/json",...e.headers}}),rT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),lT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),cT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance",...e}),uT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance/daily",...e}),dT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect",...e,headers:{"Content-Type":"application/json",...e.headers}}),mT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspections",...e}),pT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/deindexed",...e}),hT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage",...e}),fT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage/history",...e}),gT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sitemaps",...e}),yT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),bT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/indexing/request",...e,headers:{"Content-Type":"application/json",...e.headers}}),vT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/locations",...e}),xT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/locations/{locationName}/selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),wT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),kT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/keywords",...e}),ST=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/place-actions",...e}),jT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/lodging",...e}),AT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/places",...e}),NT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/summary",...e}),CT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),_T=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/disconnect",...e}),TT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/status",...e}),ET=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/sites",...e}),RT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/set-site",...e,headers:{"Content-Type":"application/json",...e.headers}}),DT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/coverage",...e}),zT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspections",...e}),IT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-url",...e,headers:{"Content-Type":"application/json",...e.headers}}),OT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),PT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/request-indexing",...e,headers:{"Content-Type":"application/json",...e.headers}}),qT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/performance",...e}),MT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),BT=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/disconnect",...e}),LT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/status",...e}),UT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),VT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/traffic",...e}),$T=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/ai-referral-daily",...e}),GT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/social-referral-history",...e}),KT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/session-history",...e}),HT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/insights",...e}),FT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/health/history",...e}),QT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/citations/visibility",...e}),ZT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/overview",...e}),YT=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/status",...e}),XT=e=>(e?.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/install",...e}),JT=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e}),WT=e=>(e?.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),e8=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs/latest",...e}),t8=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/releases",...e}),n8=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/latest-release",...e}),a8=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/cache/{release}",...e}),i8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/extract",...e,headers:{"Content-Type":"application/json",...e.headers}}),s8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/summary",...e}),o8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/domains",...e}),r8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/history",...e}),l8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/cloud-run",...e,headers:{"Content-Type":"application/json",...e.headers}}),c8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/wordpress",...e,headers:{"Content-Type":"application/json",...e.headers}}),u8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/vercel",...e,headers:{"Content-Type":"application/json",...e.headers}}),d8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),m8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/backfill",...e,headers:{"Content-Type":"application/json",...e.headers}}),p8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources",...e}),h8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/status",...e}),f8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}",...e}),g8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/events",...e}),y8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/run",...e,headers:{"Content-Type":"application/json",...e.headers}}),b8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions",...e}),v8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}",...e}),x8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo",...e}),w8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/pages",...e}),k8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/trend",...e}),S8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/crawl",...e}),j8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/graph",...e}),A8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/crawl/pages/audit",...e}),zS=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/crawl/pages",...e}),N8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/structure",...e}),C8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/internal-links/neighbors",...e}),_8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/dead-links",...e}),T8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs",...e}),E8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),R8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs/{runId}/progress",...e}),D8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs/{runId}/page-health-preview",...e}),z8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations",...e}),I8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations",...e,headers:{"Content-Type":"application/json",...e.headers}}),O8=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations/{id}",...e}),P8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations/{id}/resume",...e}),q8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/providers",...e});function M8(e){const n={baseUrl:e.baseUrl,fetch:e.fetch,headers:{...e.headers??{}}};return AS(n)}function ae(e,n,i){function o(b,v){if(b._zod||Object.defineProperty(b,"_zod",{value:{def:v,constr:f,traits:new Set},enumerable:!1}),b._zod.traits.has(e))return;b._zod.traits.add(e),n(b,v);const x=f.prototype,k=Object.keys(x);for(let S=0;S<k.length;S++){const C=k[S];C in b||(b[C]=x[C].bind(b))}}const u=i?.Parent??Object;class h extends u{}Object.defineProperty(h,"name",{value:e});function f(b){var v;const x=i?.Parent?new h:this;o(x,b),(v=x._zod).deferred??(v.deferred=[]);for(const k of x._zod.deferred)k();return x}return Object.defineProperty(f,"init",{value:o}),Object.defineProperty(f,Symbol.hasInstance,{value:b=>i?.Parent&&b instanceof i.Parent?!0:b?._zod?.traits?.has(e)}),Object.defineProperty(f,"name",{value:e}),f}class _r extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class IS extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const OS={};function _s(e){return OS}function PS(e){const n=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,u])=>n.indexOf(+o)===-1).map(([o,u])=>u)}function Ff(e,n){return typeof n=="bigint"?n.toString():n}function pm(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function V0(e){return e==null}function $0(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function B8(e,n){const i=(e.toString().split(".")[1]||"").length,o=n.toString();let u=(o.split(".")[1]||"").length;if(u===0&&/\d?e-\d?/.test(o)){const v=o.match(/\d?e-(\d?)/);v?.[1]&&(u=Number.parseInt(v[1]))}const h=i>u?i:u,f=Number.parseInt(e.toFixed(h).replace(".","")),b=Number.parseInt(n.toFixed(h).replace(".",""));return f%b/10**h}const gx=Symbol("evaluating");function gt(e,n,i){let o;Object.defineProperty(e,n,{get(){if(o!==gx)return o===void 0&&(o=gx,o=i()),o},set(u){Object.defineProperty(e,n,{value:u})},configurable:!0})}function To(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function zs(...e){const n={};for(const i of e){const o=Object.getOwnPropertyDescriptors(i);Object.assign(n,o)}return Object.defineProperties({},n)}function yx(e){return JSON.stringify(e)}function L8(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const qS="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ac(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const U8=pm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Rr(e){if(Ac(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const i=n.prototype;return!(Ac(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function MS(e){return Rr(e)?{...e}:Array.isArray(e)?[...e]:e}const V8=new Set(["string","number","symbol"]);function Dr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Is(e,n,i){const o=new e._zod.constr(n??e._zod.def);return(!n||i?.parent)&&(o._zod.parent=e),o}function Ie(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function $8(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const G8={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function K8(e,n){const i=e._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const h=zs(e._zod.def,{get shape(){const f={};for(const b in n){if(!(b in i.shape))throw new Error(`Unrecognized key: "${b}"`);n[b]&&(f[b]=i.shape[b])}return To(this,"shape",f),f},checks:[]});return Is(e,h)}function H8(e,n){const i=e._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const h=zs(e._zod.def,{get shape(){const f={...e._zod.def.shape};for(const b in n){if(!(b in i.shape))throw new Error(`Unrecognized key: "${b}"`);n[b]&&delete f[b]}return To(this,"shape",f),f},checks:[]});return Is(e,h)}function F8(e,n){if(!Rr(n))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const h=e._zod.def.shape;for(const f in n)if(Object.getOwnPropertyDescriptor(h,f)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const u=zs(e._zod.def,{get shape(){const h={...e._zod.def.shape,...n};return To(this,"shape",h),h}});return Is(e,u)}function Q8(e,n){if(!Rr(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=zs(e._zod.def,{get shape(){const o={...e._zod.def.shape,...n};return To(this,"shape",o),o}});return Is(e,i)}function Z8(e,n){const i=zs(e._zod.def,{get shape(){const o={...e._zod.def.shape,...n._zod.def.shape};return To(this,"shape",o),o},get catchall(){return n._zod.def.catchall},checks:[]});return Is(e,i)}function Y8(e,n,i){const u=n._zod.def.checks;if(u&&u.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const f=zs(n._zod.def,{get shape(){const b=n._zod.def.shape,v={...b};if(i)for(const x in i){if(!(x in b))throw new Error(`Unrecognized key: "${x}"`);i[x]&&(v[x]=e?new e({type:"optional",innerType:b[x]}):b[x])}else for(const x in b)v[x]=e?new e({type:"optional",innerType:b[x]}):b[x];return To(this,"shape",v),v},checks:[]});return Is(n,f)}function X8(e,n,i){const o=zs(n._zod.def,{get shape(){const u=n._zod.def.shape,h={...u};if(i)for(const f in i){if(!(f in h))throw new Error(`Unrecognized key: "${f}"`);i[f]&&(h[f]=new e({type:"nonoptional",innerType:u[f]}))}else for(const f in u)h[f]=new e({type:"nonoptional",innerType:u[f]});return To(this,"shape",h),h}});return Is(n,o)}function Ar(e,n=0){if(e.aborted===!0)return!0;for(let i=n;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function Nr(e,n){return n.map(i=>{var o;return(o=i).path??(o.path=[]),i.path.unshift(e),i})}function cd(e){return typeof e=="string"?e:e?.message}function Ts(e,n,i){const o={...e,path:e.path??[]};if(!e.message){const u=cd(e.inst?._zod.def?.error?.(e))??cd(n?.error?.(e))??cd(i.customError?.(e))??cd(i.localeError?.(e))??"Invalid input";o.message=u}return delete o.inst,delete o.continue,n?.reportInput||delete o.input,o}function G0(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Nc(...e){const[n,i,o]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:o}:{...n}}const BS=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,Ff,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},LS=ae("$ZodError",BS),US=ae("$ZodError",BS,{Parent:Error});function J8(e,n=i=>i.message){const i={},o=[];for(const u of e.issues)u.path.length>0?(i[u.path[0]]=i[u.path[0]]||[],i[u.path[0]].push(n(u))):o.push(n(u));return{formErrors:o,fieldErrors:i}}function W8(e,n=i=>i.message){const i={_errors:[]},o=u=>{for(const h of u.issues)if(h.code==="invalid_union"&&h.errors.length)h.errors.map(f=>o({issues:f}));else if(h.code==="invalid_key")o({issues:h.issues});else if(h.code==="invalid_element")o({issues:h.issues});else if(h.path.length===0)i._errors.push(n(h));else{let f=i,b=0;for(;b<h.path.length;){const v=h.path[b];b===h.path.length-1?(f[v]=f[v]||{_errors:[]},f[v]._errors.push(n(h))):f[v]=f[v]||{_errors:[]},f=f[v],b++}}};return o(e),i}const K0=e=>(n,i,o,u)=>{const h=o?Object.assign(o,{async:!1}):{async:!1},f=n._zod.run({value:i,issues:[]},h);if(f instanceof Promise)throw new _r;if(f.issues.length){const b=new(u?.Err??e)(f.issues.map(v=>Ts(v,h,_s())));throw qS(b,u?.callee),b}return f.value},H0=e=>async(n,i,o,u)=>{const h=o?Object.assign(o,{async:!0}):{async:!0};let f=n._zod.run({value:i,issues:[]},h);if(f instanceof Promise&&(f=await f),f.issues.length){const b=new(u?.Err??e)(f.issues.map(v=>Ts(v,h,_s())));throw qS(b,u?.callee),b}return f.value},hm=e=>(n,i,o)=>{const u=o?{...o,async:!1}:{async:!1},h=n._zod.run({value:i,issues:[]},u);if(h instanceof Promise)throw new _r;return h.issues.length?{success:!1,error:new(e??LS)(h.issues.map(f=>Ts(f,u,_s())))}:{success:!0,data:h.value}},eE=hm(US),fm=e=>async(n,i,o)=>{const u=o?Object.assign(o,{async:!0}):{async:!0};let h=n._zod.run({value:i,issues:[]},u);return h instanceof Promise&&(h=await h),h.issues.length?{success:!1,error:new e(h.issues.map(f=>Ts(f,u,_s())))}:{success:!0,data:h.value}},tE=fm(US),nE=e=>(n,i,o)=>{const u=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return K0(e)(n,i,u)},aE=e=>(n,i,o)=>K0(e)(n,i,o),iE=e=>async(n,i,o)=>{const u=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return H0(e)(n,i,u)},sE=e=>async(n,i,o)=>H0(e)(n,i,o),oE=e=>(n,i,o)=>{const u=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return hm(e)(n,i,u)},rE=e=>(n,i,o)=>hm(e)(n,i,o),lE=e=>async(n,i,o)=>{const u=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return fm(e)(n,i,u)},cE=e=>async(n,i,o)=>fm(e)(n,i,o),uE=/^[cC][^\s-]{8,}$/,dE=/^[0-9a-z]+$/,mE=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,pE=/^[0-9a-vA-V]{20}$/,hE=/^[A-Za-z0-9]{27}$/,fE=/^[a-zA-Z0-9_-]{21}$/,gE=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,yE=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,bx=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,bE=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,vE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function xE(){return new RegExp(vE,"u")}const wE=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kE=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,SE=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,jE=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,AE=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,VS=/^[A-Za-z0-9_-]*$/,NE=/^\+[1-9]\d{6,14}$/,$S="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",CE=new RegExp(`^${$S}$`);function GS(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function _E(e){return new RegExp(`^${GS(e)}$`)}function TE(e){const n=GS({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${n}(?:${i.join("|")})`;return new RegExp(`^${$S}T(?:${o})$`)}const EE=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},RE=/^-?\d+$/,KS=/^-?\d+(?:\.\d+)?$/,DE=/^(?:true|false)$/i,zE=/^null$/i,IE=/^[^A-Z]*$/,OE=/^[^a-z]*$/,Xn=ae("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),HS={number:"number",bigint:"bigint",object:"date"},FS=ae("$ZodCheckLessThan",(e,n)=>{Xn.init(e,n);const i=HS[typeof n.value];e._zod.onattach.push(o=>{const u=o._zod.bag,h=(n.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<h&&(n.inclusive?u.maximum=n.value:u.exclusiveMaximum=n.value)}),e._zod.check=o=>{(n.inclusive?o.value<=n.value:o.value<n.value)||o.issues.push({origin:i,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:o.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),QS=ae("$ZodCheckGreaterThan",(e,n)=>{Xn.init(e,n);const i=HS[typeof n.value];e._zod.onattach.push(o=>{const u=o._zod.bag,h=(n.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>h&&(n.inclusive?u.minimum=n.value:u.exclusiveMinimum=n.value)}),e._zod.check=o=>{(n.inclusive?o.value>=n.value:o.value>n.value)||o.issues.push({origin:i,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:o.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),PE=ae("$ZodCheckMultipleOf",(e,n)=>{Xn.init(e,n),e._zod.onattach.push(i=>{var o;(o=i._zod.bag).multipleOf??(o.multipleOf=n.value)}),e._zod.check=i=>{if(typeof i.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?i.value%n.value===BigInt(0):B8(i.value,n.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:n.value,input:i.value,inst:e,continue:!n.abort})}}),qE=ae("$ZodCheckNumberFormat",(e,n)=>{Xn.init(e,n),n.format=n.format||"float64";const i=n.format?.includes("int"),o=i?"int":"number",[u,h]=G8[n.format];e._zod.onattach.push(f=>{const b=f._zod.bag;b.format=n.format,b.minimum=u,b.maximum=h,i&&(b.pattern=RE)}),e._zod.check=f=>{const b=f.value;if(i){if(!Number.isInteger(b)){f.issues.push({expected:o,format:n.format,code:"invalid_type",continue:!1,input:b,inst:e});return}if(!Number.isSafeInteger(b)){b>0?f.issues.push({input:b,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!n.abort}):f.issues.push({input:b,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!n.abort});return}}b<u&&f.issues.push({origin:"number",input:b,code:"too_small",minimum:u,inclusive:!0,inst:e,continue:!n.abort}),b>h&&f.issues.push({origin:"number",input:b,code:"too_big",maximum:h,inclusive:!0,inst:e,continue:!n.abort})}}),ME=ae("$ZodCheckMaxLength",(e,n)=>{var i;Xn.init(e,n),(i=e._zod.def).when??(i.when=o=>{const u=o.value;return!V0(u)&&u.length!==void 0}),e._zod.onattach.push(o=>{const u=o._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<u&&(o._zod.bag.maximum=n.maximum)}),e._zod.check=o=>{const u=o.value;if(u.length<=n.maximum)return;const f=G0(u);o.issues.push({origin:f,code:"too_big",maximum:n.maximum,inclusive:!0,input:u,inst:e,continue:!n.abort})}}),BE=ae("$ZodCheckMinLength",(e,n)=>{var i;Xn.init(e,n),(i=e._zod.def).when??(i.when=o=>{const u=o.value;return!V0(u)&&u.length!==void 0}),e._zod.onattach.push(o=>{const u=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>u&&(o._zod.bag.minimum=n.minimum)}),e._zod.check=o=>{const u=o.value;if(u.length>=n.minimum)return;const f=G0(u);o.issues.push({origin:f,code:"too_small",minimum:n.minimum,inclusive:!0,input:u,inst:e,continue:!n.abort})}}),LE=ae("$ZodCheckLengthEquals",(e,n)=>{var i;Xn.init(e,n),(i=e._zod.def).when??(i.when=o=>{const u=o.value;return!V0(u)&&u.length!==void 0}),e._zod.onattach.push(o=>{const u=o._zod.bag;u.minimum=n.length,u.maximum=n.length,u.length=n.length}),e._zod.check=o=>{const u=o.value,h=u.length;if(h===n.length)return;const f=G0(u),b=h>n.length;o.issues.push({origin:f,...b?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!n.abort})}}),gm=ae("$ZodCheckStringFormat",(e,n)=>{var i,o;Xn.init(e,n),e._zod.onattach.push(u=>{const h=u._zod.bag;h.format=n.format,n.pattern&&(h.patterns??(h.patterns=new Set),h.patterns.add(n.pattern))}),n.pattern?(i=e._zod).check??(i.check=u=>{n.pattern.lastIndex=0,!n.pattern.test(u.value)&&u.issues.push({origin:"string",code:"invalid_format",format:n.format,input:u.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(o=e._zod).check??(o.check=()=>{})}),UE=ae("$ZodCheckRegex",(e,n)=>{gm.init(e,n),e._zod.check=i=>{n.pattern.lastIndex=0,!n.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),VE=ae("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=IE),gm.init(e,n)}),$E=ae("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=OE),gm.init(e,n)}),GE=ae("$ZodCheckIncludes",(e,n)=>{Xn.init(e,n);const i=Dr(n.includes),o=new RegExp(typeof n.position=="number"?`^.{${n.position}}${i}`:i);n.pattern=o,e._zod.onattach.push(u=>{const h=u._zod.bag;h.patterns??(h.patterns=new Set),h.patterns.add(o)}),e._zod.check=u=>{u.value.includes(n.includes,n.position)||u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:u.value,inst:e,continue:!n.abort})}}),KE=ae("$ZodCheckStartsWith",(e,n)=>{Xn.init(e,n);const i=new RegExp(`^${Dr(n.prefix)}.*`);n.pattern??(n.pattern=i),e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(i)}),e._zod.check=o=>{o.value.startsWith(n.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:o.value,inst:e,continue:!n.abort})}}),HE=ae("$ZodCheckEndsWith",(e,n)=>{Xn.init(e,n);const i=new RegExp(`.*${Dr(n.suffix)}$`);n.pattern??(n.pattern=i),e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(i)}),e._zod.check=o=>{o.value.endsWith(n.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:o.value,inst:e,continue:!n.abort})}}),FE=ae("$ZodCheckOverwrite",(e,n)=>{Xn.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class QE{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const o=n.split(`
|
|
15
|
+
`).filter(f=>f),u=Math.min(...o.map(f=>f.length-f.trimStart().length)),h=o.map(f=>f.slice(u)).map(f=>" ".repeat(this.indent*2)+f);for(const f of h)this.content.push(f)}compile(){const n=Function,i=this?.args,u=[...(this?.content??[""]).map(h=>` ${h}`)];return new n(...i,u.join(`
|
|
16
|
+
`))}}const ZE={major:4,minor:3,patch:6},Bt=ae("$ZodType",(e,n)=>{var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=ZE;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const u of o)for(const h of u._zod.onattach)h(e);if(o.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const u=(f,b,v)=>{let x=Ar(f),k;for(const S of b){if(S._zod.def.when){if(!S._zod.def.when(f))continue}else if(x)continue;const C=f.issues.length,_=S._zod.check(f);if(_ instanceof Promise&&v?.async===!1)throw new _r;if(k||_ instanceof Promise)k=(k??Promise.resolve()).then(async()=>{await _,f.issues.length!==C&&(x||(x=Ar(f,C)))});else{if(f.issues.length===C)continue;x||(x=Ar(f,C))}}return k?k.then(()=>f):f},h=(f,b,v)=>{if(Ar(f))return f.aborted=!0,f;const x=u(b,o,v);if(x instanceof Promise){if(v.async===!1)throw new _r;return x.then(k=>e._zod.parse(k,v))}return e._zod.parse(x,v)};e._zod.run=(f,b)=>{if(b.skipChecks)return e._zod.parse(f,b);if(b.direction==="backward"){const x=e._zod.parse({value:f.value,issues:[]},{...b,skipChecks:!0});return x instanceof Promise?x.then(k=>h(k,f,b)):h(x,f,b)}const v=e._zod.parse(f,b);if(v instanceof Promise){if(b.async===!1)throw new _r;return v.then(x=>u(x,o,b))}return u(v,o,b)}}gt(e,"~standard",()=>({validate:u=>{try{const h=eE(e,u);return h.success?{value:h.data}:{issues:h.error?.issues}}catch{return tE(e,u).then(f=>f.success?{value:f.data}:{issues:f.error?.issues})}},vendor:"zod",version:1}))}),F0=ae("$ZodString",(e,n)=>{Bt.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??EE(e._zod.bag),e._zod.parse=(i,o)=>{if(n.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),Gt=ae("$ZodStringFormat",(e,n)=>{gm.init(e,n),F0.init(e,n)}),YE=ae("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=yE),Gt.init(e,n)}),XE=ae("$ZodUUID",(e,n)=>{if(n.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(o===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=bx(o))}else n.pattern??(n.pattern=bx());Gt.init(e,n)}),JE=ae("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=bE),Gt.init(e,n)}),WE=ae("$ZodURL",(e,n)=>{Gt.init(e,n),e._zod.check=i=>{try{const o=i.value.trim(),u=new URL(o);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(u.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:i.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:i.value,inst:e,continue:!n.abort})),n.normalize?i.value=u.href:i.value=o;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!n.abort})}}}),e7=ae("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=xE()),Gt.init(e,n)}),t7=ae("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=fE),Gt.init(e,n)}),n7=ae("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=uE),Gt.init(e,n)}),a7=ae("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=dE),Gt.init(e,n)}),i7=ae("$ZodULID",(e,n)=>{n.pattern??(n.pattern=mE),Gt.init(e,n)}),s7=ae("$ZodXID",(e,n)=>{n.pattern??(n.pattern=pE),Gt.init(e,n)}),o7=ae("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=hE),Gt.init(e,n)}),r7=ae("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=TE(n)),Gt.init(e,n)}),l7=ae("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=CE),Gt.init(e,n)}),c7=ae("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=_E(n)),Gt.init(e,n)}),u7=ae("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=gE),Gt.init(e,n)}),d7=ae("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=wE),Gt.init(e,n),e._zod.bag.format="ipv4"}),m7=ae("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=kE),Gt.init(e,n),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!n.abort})}}}),p7=ae("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=SE),Gt.init(e,n)}),h7=ae("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=jE),Gt.init(e,n),e._zod.check=i=>{const o=i.value.split("/");try{if(o.length!==2)throw new Error;const[u,h]=o;if(!h)throw new Error;const f=Number(h);if(`${f}`!==h)throw new Error;if(f<0||f>128)throw new Error;new URL(`http://[${u}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!n.abort})}}});function ZS(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const f7=ae("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=AE),Gt.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{ZS(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function g7(e){if(!VS.test(e))return!1;const n=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return ZS(i)}const y7=ae("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=VS),Gt.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{g7(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),b7=ae("$ZodE164",(e,n)=>{n.pattern??(n.pattern=NE),Gt.init(e,n)});function v7(e,n=null){try{const i=e.split(".");if(i.length!==3)return!1;const[o]=i;if(!o)return!1;const u=JSON.parse(atob(o));return!("typ"in u&&u?.typ!=="JWT"||!u.alg||n&&(!("alg"in u)||u.alg!==n))}catch{return!1}}const x7=ae("$ZodJWT",(e,n)=>{Gt.init(e,n),e._zod.check=i=>{v7(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),YS=ae("$ZodNumber",(e,n)=>{Bt.init(e,n),e._zod.pattern=e._zod.bag.pattern??KS,e._zod.parse=(i,o)=>{if(n.coerce)try{i.value=Number(i.value)}catch{}const u=i.value;if(typeof u=="number"&&!Number.isNaN(u)&&Number.isFinite(u))return i;const h=typeof u=="number"?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:u,inst:e,...h?{received:h}:{}}),i}}),w7=ae("$ZodNumberFormat",(e,n)=>{qE.init(e,n),YS.init(e,n)}),k7=ae("$ZodBoolean",(e,n)=>{Bt.init(e,n),e._zod.pattern=DE,e._zod.parse=(i,o)=>{if(n.coerce)try{i.value=!!i.value}catch{}const u=i.value;return typeof u=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),i}}),S7=ae("$ZodNull",(e,n)=>{Bt.init(e,n),e._zod.pattern=zE,e._zod.values=new Set([null]),e._zod.parse=(i,o)=>{const u=i.value;return u===null||i.issues.push({expected:"null",code:"invalid_type",input:u,inst:e}),i}}),j7=ae("$ZodUnknown",(e,n)=>{Bt.init(e,n),e._zod.parse=i=>i}),A7=ae("$ZodNever",(e,n)=>{Bt.init(e,n),e._zod.parse=(i,o)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function vx(e,n,i){e.issues.length&&n.issues.push(...Nr(i,e.issues)),n.value[i]=e.value}const N7=ae("$ZodArray",(e,n)=>{Bt.init(e,n),e._zod.parse=(i,o)=>{const u=i.value;if(!Array.isArray(u))return i.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),i;i.value=Array(u.length);const h=[];for(let f=0;f<u.length;f++){const b=u[f],v=n.element._zod.run({value:b,issues:[]},o);v instanceof Promise?h.push(v.then(x=>vx(x,i,f))):vx(v,i,f)}return h.length?Promise.all(h).then(()=>i):i}});function Pd(e,n,i,o,u){if(e.issues.length){if(u&&!(i in o))return;n.issues.push(...Nr(i,e.issues))}e.value===void 0?i in o&&(n.value[i]=void 0):n.value[i]=e.value}function XS(e){const n=Object.keys(e.shape);for(const o of n)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const i=$8(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function JS(e,n,i,o,u,h){const f=[],b=u.keySet,v=u.catchall._zod,x=v.def.type,k=v.optout==="optional";for(const S in n){if(b.has(S))continue;if(x==="never"){f.push(S);continue}const C=v.run({value:n[S],issues:[]},o);C instanceof Promise?e.push(C.then(_=>Pd(_,i,S,n,k))):Pd(C,i,S,n,k)}return f.length&&i.issues.push({code:"unrecognized_keys",keys:f,input:n,inst:h}),e.length?Promise.all(e).then(()=>i):i}const C7=ae("$ZodObject",(e,n)=>{if(Bt.init(e,n),!Object.getOwnPropertyDescriptor(n,"shape")?.get){const b=n.shape;Object.defineProperty(n,"shape",{get:()=>{const v={...b};return Object.defineProperty(n,"shape",{value:v}),v}})}const o=pm(()=>XS(n));gt(e._zod,"propValues",()=>{const b=n.shape,v={};for(const x in b){const k=b[x]._zod;if(k.values){v[x]??(v[x]=new Set);for(const S of k.values)v[x].add(S)}}return v});const u=Ac,h=n.catchall;let f;e._zod.parse=(b,v)=>{f??(f=o.value);const x=b.value;if(!u(x))return b.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),b;b.value={};const k=[],S=f.shape;for(const C of f.keys){const _=S[C],z=_._zod.optout==="optional",q=_._zod.run({value:x[C],issues:[]},v);q instanceof Promise?k.push(q.then(T=>Pd(T,b,C,x,z))):Pd(q,b,C,x,z)}return h?JS(k,x,b,v,o.value,e):k.length?Promise.all(k).then(()=>b):b}}),_7=ae("$ZodObjectJIT",(e,n)=>{C7.init(e,n);const i=e._zod.parse,o=pm(()=>XS(n)),u=C=>{const _=new QE(["shape","payload","ctx"]),z=o.value,q=M=>{const U=yx(M);return`shape[${U}]._zod.run({ value: input[${U}], issues: [] }, ctx)`};_.write("const input = payload.value;");const T=Object.create(null);let V=0;for(const M of z.keys)T[M]=`key_${V++}`;_.write("const newResult = {};");for(const M of z.keys){const U=T[M],Z=yx(M),B=C[M]?._zod?.optout==="optional";_.write(`const ${U} = ${q(M)};`),B?_.write(`
|
|
17
|
+
if (${U}.issues.length) {
|
|
18
|
+
if (${Z} in input) {
|
|
19
|
+
payload.issues = payload.issues.concat(${U}.issues.map(iss => ({
|
|
20
|
+
...iss,
|
|
21
|
+
path: iss.path ? [${Z}, ...iss.path] : [${Z}]
|
|
22
|
+
})));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (${U}.value === undefined) {
|
|
27
|
+
if (${Z} in input) {
|
|
28
|
+
newResult[${Z}] = undefined;
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
newResult[${Z}] = ${U}.value;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
`):_.write(`
|
|
35
|
+
if (${U}.issues.length) {
|
|
36
|
+
payload.issues = payload.issues.concat(${U}.issues.map(iss => ({
|
|
37
|
+
...iss,
|
|
38
|
+
path: iss.path ? [${Z}, ...iss.path] : [${Z}]
|
|
39
|
+
})));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (${U}.value === undefined) {
|
|
43
|
+
if (${Z} in input) {
|
|
44
|
+
newResult[${Z}] = undefined;
|
|
45
|
+
}
|
|
46
|
+
} else {
|
|
47
|
+
newResult[${Z}] = ${U}.value;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
`)}_.write("payload.value = newResult;"),_.write("return payload;");const Y=_.compile();return(M,U)=>Y(C,M,U)};let h;const f=Ac,b=!OS.jitless,x=b&&U8.value,k=n.catchall;let S;e._zod.parse=(C,_)=>{S??(S=o.value);const z=C.value;return f(z)?b&&x&&_?.async===!1&&_.jitless!==!0?(h||(h=u(n.shape)),C=h(C,_),k?JS([],z,C,_,S,e):C):i(C,_):(C.issues.push({expected:"object",code:"invalid_type",input:z,inst:e}),C)}});function xx(e,n,i,o){for(const h of e)if(h.issues.length===0)return n.value=h.value,n;const u=e.filter(h=>!Ar(h));return u.length===1?(n.value=u[0].value,u[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:i,errors:e.map(h=>h.issues.map(f=>Ts(f,o,_s())))}),n)}const WS=ae("$ZodUnion",(e,n)=>{Bt.init(e,n),gt(e._zod,"optin",()=>n.options.some(u=>u._zod.optin==="optional")?"optional":void 0),gt(e._zod,"optout",()=>n.options.some(u=>u._zod.optout==="optional")?"optional":void 0),gt(e._zod,"values",()=>{if(n.options.every(u=>u._zod.values))return new Set(n.options.flatMap(u=>Array.from(u._zod.values)))}),gt(e._zod,"pattern",()=>{if(n.options.every(u=>u._zod.pattern)){const u=n.options.map(h=>h._zod.pattern);return new RegExp(`^(${u.map(h=>$0(h.source)).join("|")})$`)}});const i=n.options.length===1,o=n.options[0]._zod.run;e._zod.parse=(u,h)=>{if(i)return o(u,h);let f=!1;const b=[];for(const v of n.options){const x=v._zod.run({value:u.value,issues:[]},h);if(x instanceof Promise)b.push(x),f=!0;else{if(x.issues.length===0)return x;b.push(x)}}return f?Promise.all(b).then(v=>xx(v,u,e,h)):xx(b,u,e,h)}}),T7=ae("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,WS.init(e,n);const i=e._zod.parse;gt(e._zod,"propValues",()=>{const u={};for(const h of n.options){const f=h._zod.propValues;if(!f||Object.keys(f).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(h)}"`);for(const[b,v]of Object.entries(f)){u[b]||(u[b]=new Set);for(const x of v)u[b].add(x)}}return u});const o=pm(()=>{const u=n.options,h=new Map;for(const f of u){const b=f._zod.propValues?.[n.discriminator];if(!b||b.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(f)}"`);for(const v of b){if(h.has(v))throw new Error(`Duplicate discriminator value "${String(v)}"`);h.set(v,f)}}return h});e._zod.parse=(u,h)=>{const f=u.value;if(!Ac(f))return u.issues.push({code:"invalid_type",expected:"object",input:f,inst:e}),u;const b=o.value.get(f?.[n.discriminator]);return b?b._zod.run(u,h):n.unionFallback?i(u,h):(u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,input:f,path:[n.discriminator],inst:e}),u)}}),E7=ae("$ZodIntersection",(e,n)=>{Bt.init(e,n),e._zod.parse=(i,o)=>{const u=i.value,h=n.left._zod.run({value:u,issues:[]},o),f=n.right._zod.run({value:u,issues:[]},o);return h instanceof Promise||f instanceof Promise?Promise.all([h,f]).then(([v,x])=>wx(i,v,x)):wx(i,h,f)}});function Qf(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(Rr(e)&&Rr(n)){const i=Object.keys(n),o=Object.keys(e).filter(h=>i.indexOf(h)!==-1),u={...e,...n};for(const h of o){const f=Qf(e[h],n[h]);if(!f.valid)return{valid:!1,mergeErrorPath:[h,...f.mergeErrorPath]};u[h]=f.data}return{valid:!0,data:u}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let o=0;o<e.length;o++){const u=e[o],h=n[o],f=Qf(u,h);if(!f.valid)return{valid:!1,mergeErrorPath:[o,...f.mergeErrorPath]};i.push(f.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function wx(e,n,i){const o=new Map;let u;for(const b of n.issues)if(b.code==="unrecognized_keys"){u??(u=b);for(const v of b.keys)o.has(v)||o.set(v,{}),o.get(v).l=!0}else e.issues.push(b);for(const b of i.issues)if(b.code==="unrecognized_keys")for(const v of b.keys)o.has(v)||o.set(v,{}),o.get(v).r=!0;else e.issues.push(b);const h=[...o].filter(([,b])=>b.l&&b.r).map(([b])=>b);if(h.length&&u&&e.issues.push({...u,keys:h}),Ar(e))return e;const f=Qf(n.value,i.value);if(!f.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(f.mergeErrorPath)}`);return e.value=f.data,e}const R7=ae("$ZodRecord",(e,n)=>{Bt.init(e,n),e._zod.parse=(i,o)=>{const u=i.value;if(!Rr(u))return i.issues.push({expected:"record",code:"invalid_type",input:u,inst:e}),i;const h=[],f=n.keyType._zod.values;if(f){i.value={};const b=new Set;for(const x of f)if(typeof x=="string"||typeof x=="number"||typeof x=="symbol"){b.add(typeof x=="number"?x.toString():x);const k=n.valueType._zod.run({value:u[x],issues:[]},o);k instanceof Promise?h.push(k.then(S=>{S.issues.length&&i.issues.push(...Nr(x,S.issues)),i.value[x]=S.value})):(k.issues.length&&i.issues.push(...Nr(x,k.issues)),i.value[x]=k.value)}let v;for(const x in u)b.has(x)||(v=v??[],v.push(x));v&&v.length>0&&i.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:v})}else{i.value={};for(const b of Reflect.ownKeys(u)){if(b==="__proto__")continue;let v=n.keyType._zod.run({value:b,issues:[]},o);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof b=="string"&&KS.test(b)&&v.issues.length){const S=n.keyType._zod.run({value:Number(b),issues:[]},o);if(S instanceof Promise)throw new Error("Async schemas not supported in object keys currently");S.issues.length===0&&(v=S)}if(v.issues.length){n.mode==="loose"?i.value[b]=u[b]:i.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(S=>Ts(S,o,_s())),input:b,path:[b],inst:e});continue}const k=n.valueType._zod.run({value:u[b],issues:[]},o);k instanceof Promise?h.push(k.then(S=>{S.issues.length&&i.issues.push(...Nr(b,S.issues)),i.value[v.value]=S.value})):(k.issues.length&&i.issues.push(...Nr(b,k.issues)),i.value[v.value]=k.value)}}return h.length?Promise.all(h).then(()=>i):i}}),D7=ae("$ZodEnum",(e,n)=>{Bt.init(e,n);const i=PS(n.entries),o=new Set(i);e._zod.values=o,e._zod.pattern=new RegExp(`^(${i.filter(u=>V8.has(typeof u)).map(u=>typeof u=="string"?Dr(u):u.toString()).join("|")})$`),e._zod.parse=(u,h)=>{const f=u.value;return o.has(f)||u.issues.push({code:"invalid_value",values:i,input:f,inst:e}),u}}),z7=ae("$ZodLiteral",(e,n)=>{if(Bt.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");const i=new Set(n.values);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.values.map(o=>typeof o=="string"?Dr(o):o?Dr(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,u)=>{const h=o.value;return i.has(h)||o.issues.push({code:"invalid_value",values:n.values,input:h,inst:e}),o}}),I7=ae("$ZodTransform",(e,n)=>{Bt.init(e,n),e._zod.parse=(i,o)=>{if(o.direction==="backward")throw new IS(e.constructor.name);const u=n.transform(i.value,i);if(o.async)return(u instanceof Promise?u:Promise.resolve(u)).then(f=>(i.value=f,i));if(u instanceof Promise)throw new _r;return i.value=u,i}});function kx(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const e2=ae("$ZodOptional",(e,n)=>{Bt.init(e,n),e._zod.optin="optional",e._zod.optout="optional",gt(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),gt(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${$0(i.source)})?$`):void 0}),e._zod.parse=(i,o)=>{if(n.innerType._zod.optin==="optional"){const u=n.innerType._zod.run(i,o);return u instanceof Promise?u.then(h=>kx(h,i.value)):kx(u,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,o)}}),O7=ae("$ZodExactOptional",(e,n)=>{e2.init(e,n),gt(e._zod,"values",()=>n.innerType._zod.values),gt(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(i,o)=>n.innerType._zod.run(i,o)}),P7=ae("$ZodNullable",(e,n)=>{Bt.init(e,n),gt(e._zod,"optin",()=>n.innerType._zod.optin),gt(e._zod,"optout",()=>n.innerType._zod.optout),gt(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${$0(i.source)}|null)$`):void 0}),gt(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(i,o)=>i.value===null?i:n.innerType._zod.run(i,o)}),q7=ae("$ZodDefault",(e,n)=>{Bt.init(e,n),e._zod.optin="optional",gt(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,o)=>{if(o.direction==="backward")return n.innerType._zod.run(i,o);if(i.value===void 0)return i.value=n.defaultValue,i;const u=n.innerType._zod.run(i,o);return u instanceof Promise?u.then(h=>Sx(h,n)):Sx(u,n)}});function Sx(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const M7=ae("$ZodPrefault",(e,n)=>{Bt.init(e,n),e._zod.optin="optional",gt(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,o)=>(o.direction==="backward"||i.value===void 0&&(i.value=n.defaultValue),n.innerType._zod.run(i,o))}),B7=ae("$ZodNonOptional",(e,n)=>{Bt.init(e,n),gt(e._zod,"values",()=>{const i=n.innerType._zod.values;return i?new Set([...i].filter(o=>o!==void 0)):void 0}),e._zod.parse=(i,o)=>{const u=n.innerType._zod.run(i,o);return u instanceof Promise?u.then(h=>jx(h,e)):jx(u,e)}});function jx(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const L7=ae("$ZodCatch",(e,n)=>{Bt.init(e,n),gt(e._zod,"optin",()=>n.innerType._zod.optin),gt(e._zod,"optout",()=>n.innerType._zod.optout),gt(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,o)=>{if(o.direction==="backward")return n.innerType._zod.run(i,o);const u=n.innerType._zod.run(i,o);return u instanceof Promise?u.then(h=>(i.value=h.value,h.issues.length&&(i.value=n.catchValue({...i,error:{issues:h.issues.map(f=>Ts(f,o,_s()))},input:i.value}),i.issues=[]),i)):(i.value=u.value,u.issues.length&&(i.value=n.catchValue({...i,error:{issues:u.issues.map(h=>Ts(h,o,_s()))},input:i.value}),i.issues=[]),i)}}),U7=ae("$ZodPipe",(e,n)=>{Bt.init(e,n),gt(e._zod,"values",()=>n.in._zod.values),gt(e._zod,"optin",()=>n.in._zod.optin),gt(e._zod,"optout",()=>n.out._zod.optout),gt(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(i,o)=>{if(o.direction==="backward"){const h=n.out._zod.run(i,o);return h instanceof Promise?h.then(f=>ud(f,n.in,o)):ud(h,n.in,o)}const u=n.in._zod.run(i,o);return u instanceof Promise?u.then(h=>ud(h,n.out,o)):ud(u,n.out,o)}});function ud(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const V7=ae("$ZodReadonly",(e,n)=>{Bt.init(e,n),gt(e._zod,"propValues",()=>n.innerType._zod.propValues),gt(e._zod,"values",()=>n.innerType._zod.values),gt(e._zod,"optin",()=>n.innerType?._zod?.optin),gt(e._zod,"optout",()=>n.innerType?._zod?.optout),e._zod.parse=(i,o)=>{if(o.direction==="backward")return n.innerType._zod.run(i,o);const u=n.innerType._zod.run(i,o);return u instanceof Promise?u.then(Ax):Ax(u)}});function Ax(e){return e.value=Object.freeze(e.value),e}const $7=ae("$ZodLazy",(e,n)=>{Bt.init(e,n),gt(e._zod,"innerType",()=>n.getter()),gt(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),gt(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),gt(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),gt(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(i,o)=>e._zod.innerType._zod.run(i,o)}),G7=ae("$ZodCustom",(e,n)=>{Xn.init(e,n),Bt.init(e,n),e._zod.parse=(i,o)=>i,e._zod.check=i=>{const o=i.value,u=n.fn(o);if(u instanceof Promise)return u.then(h=>Nx(h,i,o,e));Nx(u,i,o,e)}});function Nx(e,n,i,o){if(!e){const u={code:"custom",input:i,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(u.params=o._zod.def.params),n.issues.push(Nc(u))}}var Cx;class K7{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...i){const o=i[0];return this._map.set(n,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const i=this._map.get(n);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(n),this}get(n){const i=n._zod.parent;if(i){const o={...this.get(i)??{}};delete o.id;const u={...o,...this._map.get(n)};return Object.keys(u).length?u:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function H7(){return new K7}(Cx=globalThis).__zod_globalRegistry??(Cx.__zod_globalRegistry=H7());const pc=globalThis.__zod_globalRegistry;function F7(e,n){return new e({type:"string",...Ie(n)})}function Q7(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ie(n)})}function _x(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ie(n)})}function t2(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ie(n)})}function Z7(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ie(n)})}function Y7(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ie(n)})}function X7(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ie(n)})}function J7(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ie(n)})}function W7(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ie(n)})}function eR(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ie(n)})}function tR(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ie(n)})}function nR(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ie(n)})}function aR(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ie(n)})}function iR(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ie(n)})}function sR(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ie(n)})}function oR(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ie(n)})}function rR(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ie(n)})}function lR(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ie(n)})}function cR(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ie(n)})}function uR(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ie(n)})}function dR(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ie(n)})}function mR(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ie(n)})}function pR(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ie(n)})}function hR(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ie(n)})}function fR(e,n){return new e({type:"string",format:"date",check:"string_format",...Ie(n)})}function gR(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ie(n)})}function yR(e,n){return new e({type:"string",format:"duration",check:"string_format",...Ie(n)})}function bR(e,n){return new e({type:"number",checks:[],...Ie(n)})}function vR(e,n){return new e({type:"number",coerce:!0,checks:[],...Ie(n)})}function xR(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ie(n)})}function wR(e,n){return new e({type:"boolean",...Ie(n)})}function kR(e,n){return new e({type:"null",...Ie(n)})}function SR(e){return new e({type:"unknown"})}function jR(e,n){return new e({type:"never",...Ie(n)})}function Tx(e,n){return new FS({check:"less_than",...Ie(n),value:e,inclusive:!1})}function of(e,n){return new FS({check:"less_than",...Ie(n),value:e,inclusive:!0})}function Ex(e,n){return new QS({check:"greater_than",...Ie(n),value:e,inclusive:!1})}function rf(e,n){return new QS({check:"greater_than",...Ie(n),value:e,inclusive:!0})}function Rx(e,n){return new PE({check:"multiple_of",...Ie(n),value:e})}function n2(e,n){return new ME({check:"max_length",...Ie(n),maximum:e})}function qd(e,n){return new BE({check:"min_length",...Ie(n),minimum:e})}function a2(e,n){return new LE({check:"length_equals",...Ie(n),length:e})}function AR(e,n){return new UE({check:"string_format",format:"regex",...Ie(n),pattern:e})}function NR(e){return new VE({check:"string_format",format:"lowercase",...Ie(e)})}function CR(e){return new $E({check:"string_format",format:"uppercase",...Ie(e)})}function _R(e,n){return new GE({check:"string_format",format:"includes",...Ie(n),includes:e})}function TR(e,n){return new KE({check:"string_format",format:"starts_with",...Ie(n),prefix:e})}function ER(e,n){return new HE({check:"string_format",format:"ends_with",...Ie(n),suffix:e})}function Ur(e){return new FE({check:"overwrite",tx:e})}function RR(e){return Ur(n=>n.normalize(e))}function DR(){return Ur(e=>e.trim())}function zR(){return Ur(e=>e.toLowerCase())}function IR(){return Ur(e=>e.toUpperCase())}function OR(){return Ur(e=>L8(e))}function PR(e,n,i){return new e({type:"array",element:n,...Ie(i)})}function qR(e,n,i){return new e({type:"custom",check:"custom",fn:n,...Ie(i)})}function MR(e){const n=BR(i=>(i.addIssue=o=>{if(typeof o=="string")i.issues.push(Nc(o,i.value,n._zod.def));else{const u=o;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=i.value),u.inst??(u.inst=n),u.continue??(u.continue=!n._zod.def.abort),i.issues.push(Nc(u))}},e(i.value,i)));return n}function BR(e,n){const i=new Xn({check:"custom",...Ie(n)});return i._zod.check=e,i}function i2(e){let n=e?.target??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??pc,target:n,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function an(e,n,i={path:[],schemaPath:[]}){var o;const u=e._zod.def,h=n.seen.get(e);if(h)return h.count++,i.schemaPath.includes(e)&&(h.cycle=i.path),h.schema;const f={schema:{},count:1,cycle:void 0,path:i.path};n.seen.set(e,f);const b=e._zod.toJSONSchema?.();if(b)f.schema=b;else{const k={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,f.schema,k);else{const C=f.schema,_=n.processors[u.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);_(e,n,C,k)}const S=e._zod.parent;S&&(f.ref||(f.ref=S),an(S,n,k),n.seen.get(S).isParent=!0)}const v=n.metadataRegistry.get(e);return v&&Object.assign(f.schema,v),n.io==="input"&&Ln(e)&&(delete f.schema.examples,delete f.schema.default),n.io==="input"&&f.schema._prefault&&((o=f.schema).default??(o.default=f.schema._prefault)),delete f.schema._prefault,n.seen.get(e).schema}function s2(e,n){const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const f of e.seen.entries()){const b=e.metadataRegistry.get(f[0])?.id;if(b){const v=o.get(b);if(v&&v!==f[0])throw new Error(`Duplicate schema id "${b}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(b,f[0])}}const u=f=>{const b=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const S=e.external.registry.get(f[0])?.id,C=e.external.uri??(z=>z);if(S)return{ref:C(S)};const _=f[1].defId??f[1].schema.id??`schema${e.counter++}`;return f[1].defId=_,{defId:_,ref:`${C("__shared")}#/${b}/${_}`}}if(f[1]===i)return{ref:"#"};const x=`#/${b}/`,k=f[1].schema.id??`__schema${e.counter++}`;return{defId:k,ref:x+k}},h=f=>{if(f[1].schema.$ref)return;const b=f[1],{ref:v,defId:x}=u(f);b.def={...b.schema},x&&(b.defId=x);const k=b.schema;for(const S in k)delete k[S];k.$ref=v};if(e.cycles==="throw")for(const f of e.seen.entries()){const b=f[1];if(b.cycle)throw new Error(`Cycle detected: #/${b.cycle?.join("/")}/<root>
|
|
51
|
+
|
|
52
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const f of e.seen.entries()){const b=f[1];if(n===f[0]){h(f);continue}if(e.external){const x=e.external.registry.get(f[0])?.id;if(n!==f[0]&&x){h(f);continue}}if(e.metadataRegistry.get(f[0])?.id){h(f);continue}if(b.cycle){h(f);continue}if(b.count>1&&e.reused==="ref"){h(f);continue}}}function o2(e,n){const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=f=>{const b=e.seen.get(f);if(b.ref===null)return;const v=b.def??b.schema,x={...v},k=b.ref;if(b.ref=null,k){o(k);const C=e.seen.get(k),_=C.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(v.allOf=v.allOf??[],v.allOf.push(_)):Object.assign(v,_),Object.assign(v,x),f._zod.parent===k)for(const q in v)q==="$ref"||q==="allOf"||q in x||delete v[q];if(_.$ref&&C.def)for(const q in v)q==="$ref"||q==="allOf"||q in C.def&&JSON.stringify(v[q])===JSON.stringify(C.def[q])&&delete v[q]}const S=f._zod.parent;if(S&&S!==k){o(S);const C=e.seen.get(S);if(C?.schema.$ref&&(v.$ref=C.schema.$ref,C.def))for(const _ in v)_==="$ref"||_==="allOf"||_ in C.def&&JSON.stringify(v[_])===JSON.stringify(C.def[_])&&delete v[_]}e.override({zodSchema:f,jsonSchema:v,path:b.path??[]})};for(const f of[...e.seen.entries()].reverse())o(f[0]);const u={};if(e.target==="draft-2020-12"?u.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?u.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?u.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const f=e.external.registry.get(n)?.id;if(!f)throw new Error("Schema is missing an `id` property");u.$id=e.external.uri(f)}Object.assign(u,i.def??i.schema);const h=e.external?.defs??{};for(const f of e.seen.entries()){const b=f[1];b.def&&b.defId&&(h[b.defId]=b.def)}e.external||Object.keys(h).length>0&&(e.target==="draft-2020-12"?u.$defs=h:u.definitions=h);try{const f=JSON.parse(JSON.stringify(u));return Object.defineProperty(f,"~standard",{value:{...n["~standard"],jsonSchema:{input:Md(n,"input",e.processors),output:Md(n,"output",e.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function Ln(e,n){const i=n??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Ln(o.element,i);if(o.type==="set")return Ln(o.valueType,i);if(o.type==="lazy")return Ln(o.getter(),i);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Ln(o.innerType,i);if(o.type==="intersection")return Ln(o.left,i)||Ln(o.right,i);if(o.type==="record"||o.type==="map")return Ln(o.keyType,i)||Ln(o.valueType,i);if(o.type==="pipe")return Ln(o.in,i)||Ln(o.out,i);if(o.type==="object"){for(const u in o.shape)if(Ln(o.shape[u],i))return!0;return!1}if(o.type==="union"){for(const u of o.options)if(Ln(u,i))return!0;return!1}if(o.type==="tuple"){for(const u of o.items)if(Ln(u,i))return!0;return!!(o.rest&&Ln(o.rest,i))}return!1}const LR=(e,n={})=>i=>{const o=i2({...i,processors:n});return an(e,o),s2(o,e),o2(o,e)},Md=(e,n,i={})=>o=>{const{libraryOptions:u,target:h}=o??{},f=i2({...u??{},target:h,io:n,processors:i});return an(e,f),s2(f,e),o2(f,e)},UR={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},VR=(e,n,i,o)=>{const u=i;u.type="string";const{minimum:h,maximum:f,format:b,patterns:v,contentEncoding:x}=e._zod.bag;if(typeof h=="number"&&(u.minLength=h),typeof f=="number"&&(u.maxLength=f),b&&(u.format=UR[b]??b,u.format===""&&delete u.format,b==="time"&&delete u.format),x&&(u.contentEncoding=x),v&&v.size>0){const k=[...v];k.length===1?u.pattern=k[0].source:k.length>1&&(u.allOf=[...k.map(S=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:S.source}))])}},$R=(e,n,i,o)=>{const u=i,{minimum:h,maximum:f,format:b,multipleOf:v,exclusiveMaximum:x,exclusiveMinimum:k}=e._zod.bag;typeof b=="string"&&b.includes("int")?u.type="integer":u.type="number",typeof k=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(u.minimum=k,u.exclusiveMinimum=!0):u.exclusiveMinimum=k),typeof h=="number"&&(u.minimum=h,typeof k=="number"&&n.target!=="draft-04"&&(k>=h?delete u.minimum:delete u.exclusiveMinimum)),typeof x=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(u.maximum=x,u.exclusiveMaximum=!0):u.exclusiveMaximum=x),typeof f=="number"&&(u.maximum=f,typeof x=="number"&&n.target!=="draft-04"&&(x<=f?delete u.maximum:delete u.exclusiveMaximum)),typeof v=="number"&&(u.multipleOf=v)},GR=(e,n,i,o)=>{i.type="boolean"},KR=(e,n,i,o)=>{n.target==="openapi-3.0"?(i.type="string",i.nullable=!0,i.enum=[null]):i.type="null"},HR=(e,n,i,o)=>{i.not={}},FR=(e,n,i,o)=>{},QR=(e,n,i,o)=>{const u=e._zod.def,h=PS(u.entries);h.every(f=>typeof f=="number")&&(i.type="number"),h.every(f=>typeof f=="string")&&(i.type="string"),i.enum=h},ZR=(e,n,i,o)=>{const u=e._zod.def,h=[];for(const f of u.values)if(f===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof f=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");h.push(Number(f))}else h.push(f);if(h.length!==0)if(h.length===1){const f=h[0];i.type=f===null?"null":typeof f,n.target==="draft-04"||n.target==="openapi-3.0"?i.enum=[f]:i.const=f}else h.every(f=>typeof f=="number")&&(i.type="number"),h.every(f=>typeof f=="string")&&(i.type="string"),h.every(f=>typeof f=="boolean")&&(i.type="boolean"),h.every(f=>f===null)&&(i.type="null"),i.enum=h},YR=(e,n,i,o)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},XR=(e,n,i,o)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},JR=(e,n,i,o)=>{const u=i,h=e._zod.def,{minimum:f,maximum:b}=e._zod.bag;typeof f=="number"&&(u.minItems=f),typeof b=="number"&&(u.maxItems=b),u.type="array",u.items=an(h.element,n,{...o,path:[...o.path,"items"]})},WR=(e,n,i,o)=>{const u=i,h=e._zod.def;u.type="object",u.properties={};const f=h.shape;for(const x in f)u.properties[x]=an(f[x],n,{...o,path:[...o.path,"properties",x]});const b=new Set(Object.keys(f)),v=new Set([...b].filter(x=>{const k=h.shape[x]._zod;return n.io==="input"?k.optin===void 0:k.optout===void 0}));v.size>0&&(u.required=Array.from(v)),h.catchall?._zod.def.type==="never"?u.additionalProperties=!1:h.catchall?h.catchall&&(u.additionalProperties=an(h.catchall,n,{...o,path:[...o.path,"additionalProperties"]})):n.io==="output"&&(u.additionalProperties=!1)},eD=(e,n,i,o)=>{const u=e._zod.def,h=u.inclusive===!1,f=u.options.map((b,v)=>an(b,n,{...o,path:[...o.path,h?"oneOf":"anyOf",v]}));h?i.oneOf=f:i.anyOf=f},tD=(e,n,i,o)=>{const u=e._zod.def,h=an(u.left,n,{...o,path:[...o.path,"allOf",0]}),f=an(u.right,n,{...o,path:[...o.path,"allOf",1]}),b=x=>"allOf"in x&&Object.keys(x).length===1,v=[...b(h)?h.allOf:[h],...b(f)?f.allOf:[f]];i.allOf=v},nD=(e,n,i,o)=>{const u=i,h=e._zod.def;u.type="object";const f=h.keyType,v=f._zod.bag?.patterns;if(h.mode==="loose"&&v&&v.size>0){const k=an(h.valueType,n,{...o,path:[...o.path,"patternProperties","*"]});u.patternProperties={};for(const S of v)u.patternProperties[S.source]=k}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(u.propertyNames=an(h.keyType,n,{...o,path:[...o.path,"propertyNames"]})),u.additionalProperties=an(h.valueType,n,{...o,path:[...o.path,"additionalProperties"]});const x=f._zod.values;if(x){const k=[...x].filter(S=>typeof S=="string"||typeof S=="number");k.length>0&&(u.required=k)}},aD=(e,n,i,o)=>{const u=e._zod.def,h=an(u.innerType,n,o),f=n.seen.get(e);n.target==="openapi-3.0"?(f.ref=u.innerType,i.nullable=!0):i.anyOf=[h,{type:"null"}]},iD=(e,n,i,o)=>{const u=e._zod.def;an(u.innerType,n,o);const h=n.seen.get(e);h.ref=u.innerType},sD=(e,n,i,o)=>{const u=e._zod.def;an(u.innerType,n,o);const h=n.seen.get(e);h.ref=u.innerType,i.default=JSON.parse(JSON.stringify(u.defaultValue))},oD=(e,n,i,o)=>{const u=e._zod.def;an(u.innerType,n,o);const h=n.seen.get(e);h.ref=u.innerType,n.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(u.defaultValue)))},rD=(e,n,i,o)=>{const u=e._zod.def;an(u.innerType,n,o);const h=n.seen.get(e);h.ref=u.innerType;let f;try{f=u.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=f},lD=(e,n,i,o)=>{const u=e._zod.def,h=n.io==="input"?u.in._zod.def.type==="transform"?u.out:u.in:u.out;an(h,n,o);const f=n.seen.get(e);f.ref=h},cD=(e,n,i,o)=>{const u=e._zod.def;an(u.innerType,n,o);const h=n.seen.get(e);h.ref=u.innerType,i.readOnly=!0},r2=(e,n,i,o)=>{const u=e._zod.def;an(u.innerType,n,o);const h=n.seen.get(e);h.ref=u.innerType},uD=(e,n,i,o)=>{const u=e._zod.innerType;an(u,n,o);const h=n.seen.get(e);h.ref=u},dD=ae("ZodISODateTime",(e,n)=>{r7.init(e,n),Xt.init(e,n)});function l2(e){return hR(dD,e)}const mD=ae("ZodISODate",(e,n)=>{l7.init(e,n),Xt.init(e,n)});function c2(e){return fR(mD,e)}const pD=ae("ZodISOTime",(e,n)=>{c7.init(e,n),Xt.init(e,n)});function hD(e){return gR(pD,e)}const fD=ae("ZodISODuration",(e,n)=>{u7.init(e,n),Xt.init(e,n)});function gD(e){return yR(fD,e)}const yD=(e,n)=>{LS.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>W8(e,i)},flatten:{value:i=>J8(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,Ff,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,Ff,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ra=ae("ZodError",yD,{Parent:Error}),bD=K0(Ra),vD=H0(Ra),xD=hm(Ra),wD=fm(Ra),kD=nE(Ra),SD=aE(Ra),jD=iE(Ra),AD=sE(Ra),ND=oE(Ra),CD=rE(Ra),_D=lE(Ra),TD=cE(Ra),Lt=ae("ZodType",(e,n)=>(Bt.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Md(e,"input"),output:Md(e,"output")}}),e.toJSONSchema=LR(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(zs(n,{checks:[...n.checks??[],...i.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(i,o)=>Is(e,i,o),e.brand=()=>e,e.register=((i,o)=>(i.add(e,o),e)),e.parse=(i,o)=>bD(e,i,o,{callee:e.parse}),e.safeParse=(i,o)=>xD(e,i,o),e.parseAsync=async(i,o)=>vD(e,i,o,{callee:e.parseAsync}),e.safeParseAsync=async(i,o)=>wD(e,i,o),e.spa=e.safeParseAsync,e.encode=(i,o)=>kD(e,i,o),e.decode=(i,o)=>SD(e,i,o),e.encodeAsync=async(i,o)=>jD(e,i,o),e.decodeAsync=async(i,o)=>AD(e,i,o),e.safeEncode=(i,o)=>ND(e,i,o),e.safeDecode=(i,o)=>CD(e,i,o),e.safeEncodeAsync=async(i,o)=>_D(e,i,o),e.safeDecodeAsync=async(i,o)=>TD(e,i,o),e.refine=(i,o)=>e.check(Az(i,o)),e.superRefine=i=>e.check(Nz(i)),e.overwrite=i=>e.check(Ur(i)),e.optional=()=>Ix(e),e.exactOptional=()=>uz(e),e.nullable=()=>Ox(e),e.nullish=()=>Ix(Ox(e)),e.nonoptional=i=>gz(e,i),e.array=()=>y(e),e.or=i=>Qe([e,i]),e.and=i=>sz(e,i),e.transform=i=>Yf(e,p2(i)),e.default=i=>pz(e,i),e.prefault=i=>fz(e,i),e.catch=i=>bz(e,i),e.pipe=i=>Yf(e,i),e.readonly=()=>wz(e),e.describe=i=>{const o=e.clone();return pc.add(o,{description:i}),o},Object.defineProperty(e,"description",{get(){return pc.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return pc.get(e);const o=e.clone();return pc.add(o,i[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),u2=ae("_ZodString",(e,n)=>{F0.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(o,u,h)=>VR(e,o,u);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...o)=>e.check(AR(...o)),e.includes=(...o)=>e.check(_R(...o)),e.startsWith=(...o)=>e.check(TR(...o)),e.endsWith=(...o)=>e.check(ER(...o)),e.min=(...o)=>e.check(qd(...o)),e.max=(...o)=>e.check(n2(...o)),e.length=(...o)=>e.check(a2(...o)),e.nonempty=(...o)=>e.check(qd(1,...o)),e.lowercase=o=>e.check(NR(o)),e.uppercase=o=>e.check(CR(o)),e.trim=()=>e.check(DR()),e.normalize=(...o)=>e.check(RR(...o)),e.toLowerCase=()=>e.check(zR()),e.toUpperCase=()=>e.check(IR()),e.slugify=()=>e.check(OR())}),ED=ae("ZodString",(e,n)=>{F0.init(e,n),u2.init(e,n),e.email=i=>e.check(Q7(RD,i)),e.url=i=>e.check(J7(zD,i)),e.jwt=i=>e.check(pR(QD,i)),e.emoji=i=>e.check(W7(ID,i)),e.guid=i=>e.check(_x(Dx,i)),e.uuid=i=>e.check(t2(hc,i)),e.uuidv4=i=>e.check(Z7(hc,i)),e.uuidv6=i=>e.check(Y7(hc,i)),e.uuidv7=i=>e.check(X7(hc,i)),e.nanoid=i=>e.check(eR(OD,i)),e.guid=i=>e.check(_x(Dx,i)),e.cuid=i=>e.check(tR(PD,i)),e.cuid2=i=>e.check(nR(qD,i)),e.ulid=i=>e.check(aR(MD,i)),e.base64=i=>e.check(uR(KD,i)),e.base64url=i=>e.check(dR(HD,i)),e.xid=i=>e.check(iR(BD,i)),e.ksuid=i=>e.check(sR(LD,i)),e.ipv4=i=>e.check(oR(UD,i)),e.ipv6=i=>e.check(rR(VD,i)),e.cidrv4=i=>e.check(lR($D,i)),e.cidrv6=i=>e.check(cR(GD,i)),e.e164=i=>e.check(mR(FD,i)),e.datetime=i=>e.check(l2(i)),e.date=i=>e.check(c2(i)),e.time=i=>e.check(hD(i)),e.duration=i=>e.check(gD(i))});function r(e){return F7(ED,e)}const Xt=ae("ZodStringFormat",(e,n)=>{Gt.init(e,n),u2.init(e,n)}),RD=ae("ZodEmail",(e,n)=>{JE.init(e,n),Xt.init(e,n)}),Dx=ae("ZodGUID",(e,n)=>{YE.init(e,n),Xt.init(e,n)}),hc=ae("ZodUUID",(e,n)=>{XE.init(e,n),Xt.init(e,n)});function DD(e){return t2(hc,e)}const zD=ae("ZodURL",(e,n)=>{WE.init(e,n),Xt.init(e,n)}),ID=ae("ZodEmoji",(e,n)=>{e7.init(e,n),Xt.init(e,n)}),OD=ae("ZodNanoID",(e,n)=>{t7.init(e,n),Xt.init(e,n)}),PD=ae("ZodCUID",(e,n)=>{n7.init(e,n),Xt.init(e,n)}),qD=ae("ZodCUID2",(e,n)=>{a7.init(e,n),Xt.init(e,n)}),MD=ae("ZodULID",(e,n)=>{i7.init(e,n),Xt.init(e,n)}),BD=ae("ZodXID",(e,n)=>{s7.init(e,n),Xt.init(e,n)}),LD=ae("ZodKSUID",(e,n)=>{o7.init(e,n),Xt.init(e,n)}),UD=ae("ZodIPv4",(e,n)=>{d7.init(e,n),Xt.init(e,n)}),VD=ae("ZodIPv6",(e,n)=>{m7.init(e,n),Xt.init(e,n)}),$D=ae("ZodCIDRv4",(e,n)=>{p7.init(e,n),Xt.init(e,n)}),GD=ae("ZodCIDRv6",(e,n)=>{h7.init(e,n),Xt.init(e,n)}),KD=ae("ZodBase64",(e,n)=>{f7.init(e,n),Xt.init(e,n)}),HD=ae("ZodBase64URL",(e,n)=>{y7.init(e,n),Xt.init(e,n)}),FD=ae("ZodE164",(e,n)=>{b7.init(e,n),Xt.init(e,n)}),QD=ae("ZodJWT",(e,n)=>{x7.init(e,n),Xt.init(e,n)}),Q0=ae("ZodNumber",(e,n)=>{YS.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(o,u,h)=>$R(e,o,u),e.gt=(o,u)=>e.check(Ex(o,u)),e.gte=(o,u)=>e.check(rf(o,u)),e.min=(o,u)=>e.check(rf(o,u)),e.lt=(o,u)=>e.check(Tx(o,u)),e.lte=(o,u)=>e.check(of(o,u)),e.max=(o,u)=>e.check(of(o,u)),e.int=o=>e.check(zx(o)),e.safe=o=>e.check(zx(o)),e.positive=o=>e.check(Ex(0,o)),e.nonnegative=o=>e.check(rf(0,o)),e.negative=o=>e.check(Tx(0,o)),e.nonpositive=o=>e.check(of(0,o)),e.multipleOf=(o,u)=>e.check(Rx(o,u)),e.step=(o,u)=>e.check(Rx(o,u)),e.finite=()=>e;const i=e._zod.bag;e.minValue=Math.max(i.minimum??Number.NEGATIVE_INFINITY,i.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(i.maximum??Number.POSITIVE_INFINITY,i.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(i.format??"").includes("int")||Number.isSafeInteger(i.multipleOf??.5),e.isFinite=!0,e.format=i.format??null});function m(e){return bR(Q0,e)}const ZD=ae("ZodNumberFormat",(e,n)=>{w7.init(e,n),Q0.init(e,n)});function zx(e){return xR(ZD,e)}const YD=ae("ZodBoolean",(e,n)=>{k7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>GR(e,i,o)});function E(e){return wR(YD,e)}const XD=ae("ZodNull",(e,n)=>{S7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>KR(e,i,o)});function ue(e){return kR(XD,e)}const JD=ae("ZodUnknown",(e,n)=>{j7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>FR()});function wn(){return SR(JD)}const WD=ae("ZodNever",(e,n)=>{A7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>HR(e,i,o)});function ez(e){return jR(WD,e)}const tz=ae("ZodArray",(e,n)=>{N7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>JR(e,i,o,u),e.element=n.element,e.min=(i,o)=>e.check(qd(i,o)),e.nonempty=i=>e.check(qd(1,i)),e.max=(i,o)=>e.check(n2(i,o)),e.length=(i,o)=>e.check(a2(i,o)),e.unwrap=()=>e.element});function y(e,n){return PR(tz,e,n)}const d2=ae("ZodObject",(e,n)=>{_7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>WR(e,i,o,u),gt(e,"shape",()=>n.shape),e.keyof=()=>j(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:wn()}),e.loose=()=>e.clone({...e._zod.def,catchall:wn()}),e.strict=()=>e.clone({...e._zod.def,catchall:ez()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>F8(e,i),e.safeExtend=i=>Q8(e,i),e.merge=i=>Z8(e,i),e.pick=i=>K8(e,i),e.omit=i=>H8(e,i),e.partial=(...i)=>Y8(h2,e,i[0]),e.required=(...i)=>X8(f2,e,i[0])});function d(e,n){const i={type:"object",shape:e??{},...Ie(n)};return new d2(i)}function nz(e,n){return new d2({type:"object",shape:e,catchall:wn(),...Ie(n)})}const m2=ae("ZodUnion",(e,n)=>{WS.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>eD(e,i,o,u),e.options=n.options});function Qe(e,n){return new m2({type:"union",options:e,...Ie(n)})}const az=ae("ZodDiscriminatedUnion",(e,n)=>{m2.init(e,n),T7.init(e,n)});function Be(e,n,i){return new az({type:"union",options:n,discriminator:e,...Ie(i)})}const iz=ae("ZodIntersection",(e,n)=>{E7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>tD(e,i,o,u)});function sz(e,n){return new iz({type:"intersection",left:e,right:n})}const oz=ae("ZodRecord",(e,n)=>{R7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>nD(e,i,o,u),e.keyType=n.keyType,e.valueType=n.valueType});function He(e,n,i){return new oz({type:"record",keyType:e,valueType:n,...Ie(i)})}const Zf=ae("ZodEnum",(e,n)=>{D7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(o,u,h)=>QR(e,o,u),e.enum=n.entries,e.options=Object.values(n.entries);const i=new Set(Object.keys(n.entries));e.extract=(o,u)=>{const h={};for(const f of o)if(i.has(f))h[f]=n.entries[f];else throw new Error(`Key ${f} not found in enum`);return new Zf({...n,checks:[],...Ie(u),entries:h})},e.exclude=(o,u)=>{const h={...n.entries};for(const f of o)if(i.has(f))delete h[f];else throw new Error(`Key ${f} not found in enum`);return new Zf({...n,checks:[],...Ie(u),entries:h})}});function j(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Zf({type:"enum",entries:i,...Ie(n)})}const rz=ae("ZodLiteral",(e,n)=>{z7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>ZR(e,i,o),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function R(e,n){return new rz({type:"literal",values:Array.isArray(e)?e:[e],...Ie(n)})}const lz=ae("ZodTransform",(e,n)=>{I7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>XR(e,i),e._zod.parse=(i,o)=>{if(o.direction==="backward")throw new IS(e.constructor.name);i.addIssue=h=>{if(typeof h=="string")i.issues.push(Nc(h,i.value,n));else{const f=h;f.fatal&&(f.continue=!1),f.code??(f.code="custom"),f.input??(f.input=i.value),f.inst??(f.inst=e),i.issues.push(Nc(f))}};const u=n.transform(i.value,i);return u instanceof Promise?u.then(h=>(i.value=h,i)):(i.value=u,i)}});function p2(e){return new lz({type:"transform",transform:e})}const h2=ae("ZodOptional",(e,n)=>{e2.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>r2(e,i,o,u),e.unwrap=()=>e._zod.def.innerType});function Ix(e){return new h2({type:"optional",innerType:e})}const cz=ae("ZodExactOptional",(e,n)=>{O7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>r2(e,i,o,u),e.unwrap=()=>e._zod.def.innerType});function uz(e){return new cz({type:"optional",innerType:e})}const dz=ae("ZodNullable",(e,n)=>{P7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>aD(e,i,o,u),e.unwrap=()=>e._zod.def.innerType});function Ox(e){return new dz({type:"nullable",innerType:e})}const mz=ae("ZodDefault",(e,n)=>{q7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>sD(e,i,o,u),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function pz(e,n){return new mz({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():MS(n)}})}const hz=ae("ZodPrefault",(e,n)=>{M7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>oD(e,i,o,u),e.unwrap=()=>e._zod.def.innerType});function fz(e,n){return new hz({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():MS(n)}})}const f2=ae("ZodNonOptional",(e,n)=>{B7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>iD(e,i,o,u),e.unwrap=()=>e._zod.def.innerType});function gz(e,n){return new f2({type:"nonoptional",innerType:e,...Ie(n)})}const yz=ae("ZodCatch",(e,n)=>{L7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>rD(e,i,o,u),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function bz(e,n){return new yz({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const vz=ae("ZodPipe",(e,n)=>{U7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>lD(e,i,o,u),e.in=n.in,e.out=n.out});function Yf(e,n){return new vz({type:"pipe",in:e,out:n})}const xz=ae("ZodReadonly",(e,n)=>{V7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>cD(e,i,o,u),e.unwrap=()=>e._zod.def.innerType});function wz(e){return new xz({type:"readonly",innerType:e})}const kz=ae("ZodLazy",(e,n)=>{$7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>uD(e,i,o,u),e.unwrap=()=>e._zod.def.getter()});function Sz(e){return new kz({type:"lazy",getter:e})}const jz=ae("ZodCustom",(e,n)=>{G7.init(e,n),Lt.init(e,n),e._zod.processJSONSchema=(i,o,u)=>YR(e,i)});function Az(e,n={}){return qR(jz,e,n)}function Nz(e){return MR(e)}function Ki(e,n){return Yf(p2(e),n)}const ye={custom:"custom"};function Bi(e){return vR(Q0,e)}const g2=d({id:r(),name:r(),keyPrefix:r(),scopes:y(r()),projectId:r().nullable(),projectName:r().nullable(),readOnly:E(),operator:E().optional(),createdAt:r(),lastUsedAt:r().nullable(),revokedAt:r().nullable()});d({keys:y(g2)});d({name:r().min(1).max(100),scopes:y(r()).min(1).optional(),projectId:r().optional()});g2.extend({key:r()});const Z0=j(["used","not-used","unknown","not-applicable"]);Z0.enum;const Y0=j(["native-auto-v1","search-required-v1"]);Y0.enum;const Cz=d({maxConcurrency:m().int().positive(),maxRequestsPerMinute:m().int().positive(),maxRequestsPerDay:m().int().positive()}),jt=r().min(1),X0=He(r(),r().trim().min(1));r().min(1);const mn=d({label:r().min(1),city:r().min(1),region:r().min(1),country:r().length(2),timezone:r().optional()}),J0=j(["answer-visibility","traffic-sync","gbp-sync","data-refresh","backlinks-sync","site-audit","ads-sync","doctor"]);J0.enum;const W0=d({everyDays:m().int().min(1).max(3650),startDate:r().date(),time:r().regex(/^([01]\d|2[0-3]):[0-5]\d$/,"Time must be HH:mm")}).strict();d({id:r(),projectId:r(),kind:J0,cronExpr:r(),recurrence:W0.nullable().optional(),preset:r().nullable().optional(),timezone:r().default("UTC"),enabled:E().default(!0),providers:y(jt).default([]),sourceId:r().nullable().optional(),lastRunAt:r().nullable().optional(),nextRunAt:r().nullable().optional(),createdAt:r(),updatedAt:r()});const _z=r().datetime();d({kind:J0.optional(),preset:r().min(1).optional(),cron:r().min(1).optional(),recurrence:W0.optional(),timezone:r().optional().default("UTC"),enabled:E().optional().default(!0),providers:y(jt).optional().default([]),sourceId:r().optional(),expectedUpdatedAt:_z.nullable().optional()}).refine(e=>[e.preset,e.cron,e.recurrence].filter(n=>n!==void 0).length===1,{message:'Exactly one of "preset", "cron", or "recurrence" must be provided'});const eg=j(["citation.lost","citation.gained","run.completed","run.failed","insight.critical","insight.high","health.degraded","health.recovered","review.negative","review.rating-dropped"]);d({id:r(),projectId:r(),channel:R("webhook"),url:r().url(),urlDisplay:r(),urlHost:r(),events:y(eg),enabled:E().default(!0),source:r().optional(),webhookSecret:r().optional(),createdAt:r(),updatedAt:r()});d({channel:R("webhook"),url:r().url(),events:y(eg).min(1),source:r().optional()});class Tz extends Error{code;statusCode;details;constructor(n,i,o,u){super(i),this.name="AppError",this.code=n,this.statusCode=o,this.details=u}toJSON(){return{error:{code:this.code,message:this.message,...this.details?{details:this.details}:{}}}}}function Px(e,n){return new Tz("VALIDATION_ERROR",e,400,n)}function Oi(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;if(e==null)return"unknown error";try{const n=JSON.stringify(e);if(n!==void 0)return n}catch{}try{return String(e)}catch{return"unknown error"}}const Ez=j(["fraction","percent"]),$a=Ez.enum,Rz="x-unit";function y2(e,n){return e.meta({[Rz]:n})}function we(e=m()){return y2(e,$a.fraction)}function ot(e=m()){return y2(e,$a.percent)}$a.fraction+"",$a.percent+"";function lf(e,n=!1){const i=new Set,o=[];for(const u of e){const h=n?u.toLowerCase():u;i.has(h)||(i.add(h),o.push(u))}return o}function qx(e){try{const n=e.includes("://"),i=new URL(n?e:`https://${e}`);if(!n&&(i.pathname!=="/"||i.search||i.hash)||i.username||i.password||i.port)return null;const o=i.hostname.trim().toLowerCase().replace(/^www\./,"");return!o||o.includes("/")||o.includes("?")||o.includes("#")?null:o}catch{return null}}const Dz=r().trim().min(1).refine(e=>qx(e)!==null,{message:"Marketing hosts must be valid hostnames without credentials or ports"}).overwrite(e=>qx(e)??e),zz=r().trim().min(1),Iz=r().trim().regex(/^[a-z]\w{0,39}$/i,{message:"GA4 event names must start with a letter and contain only letters, numbers, or underscores"}),tg=d({marketingHosts:y(Dz).overwrite(e=>lf(e,!0)),brandTerms:y(zz).overwrite(e=>lf(e,!0)),leadEventNames:y(Iz).overwrite(e=>lf(e))});function Oz(){return{marketingHosts:[],brandTerms:[],leadEventNames:["generate_lead"]}}const cf=Object.freeze({marketingHosts:Object.freeze([]),brandTerms:Object.freeze([]),leadEventNames:Object.freeze(["generate_lead"])}),b2=()=>Oz(),Mx=j(["never-synced","ready","error"]),Pz=j(["landing-page","channel"]),qz=j(["30d","60d","90d"]),Mz=j(["marketing","all"]),fc=c2(),qc=d({label:j(["earliest","middle","previous","latest"]),startDate:fc,endDate:fc}),uf=qc.extend({sessions:m().int().nonnegative()}),Bx=qc.extend({eventCount:m().int().nonnegative()}),Lx=qc.extend({clicks:m().int().nonnegative(),impressions:m().int().nonnegative()}),Bz=qc.extend({propertyClicks:m().int().nonnegative(),propertyImpressions:m().int().nonnegative(),reportedQueryClicks:m().int().nonnegative(),reportedQueryImpressions:m().int().nonnegative(),brandedClicks:m().int().nonnegative(),brandedImpressions:m().int().nonnegative(),nonBrandedClicks:m().int().nonnegative(),nonBrandedImpressions:m().int().nonnegative(),unreportedClicks:m().int().nonnegative(),unreportedImpressions:m().int().nonnegative()}),Lz=qc.extend({sessions:m().int().nonnegative(),engagementRate:we(m().min(0).max(1)).nullable(),dailyTotalUsers:m().int().nonnegative().nullable(),dailyNewUsers:m().int().nonnegative().nullable(),metricsAvailable:E(),daysInPeriod:m().int().nonnegative(),daysWithEngagementRate:m().int().nonnegative(),daysWithUserSplit:m().int().nonnegative()}),Uz=d({window:qz,bucketDays:R(30),filters:d({hostScope:Mz,marketingHosts:y(r()),pathPrefix:r().nullable(),brandTerms:y(r()),queryMixScope:R("property")}),acquisition:d({status:Mx,error:r().nullable(),syncedAt:r().datetime().nullable(),periods:y(uf),channels:y(d({channelGroup:r(),periods:y(uf)})),pages:y(d({hostName:r(),landingPage:r(),periods:y(uf)}))}),leads:d({status:Mx,error:r().nullable(),syncedAt:r().datetime().nullable(),attributionScope:Pz.nullable(),hostAndPathFiltersApplied:E(),periods:y(Bx),channels:y(d({channelGroup:r(),periods:y(Bx)}))}),engagement:d({status:j(["ready","unavailable"]),availableFromDate:fc.nullable(),latestDate:fc.nullable(),periods:y(Lz)}),searchDemand:d({status:j(["ready","unavailable"]),periods:y(Bz),queries:y(d({query:r(),classification:j(["branded","non-branded"]),periods:y(Lx)})),pages:y(d({hostName:r(),landingPage:r(),periods:y(Lx)})),latestDate:fc.nullable()})}),Mc=j(["sync","batch"]);Mc.enum;const ng=He(r(),Mc),v2=j(["submitting","submitted","ended","ingested","cancelled","failed","unknown"]),Ux=v2.enum;Ux.submitted,Ux.ended;const ag=j(["standard","batch"]),Vx=ag.enum,Vz=d({inputTokens:m().int().nonnegative(),cachedInputTokens:m().int().nonnegative(),cacheWriteTokens:m().int().nonnegative(),outputTokens:m().int().nonnegative(),searchCount:m().int().nonnegative()}),$z=Vz.extend({pricingTier:ag,estimatedCostMicros:m().int().nonnegative().nullable(),priceSource:Qe([j(["default","override"]),ue()])}),x2=d({inputPerMTok:m().nonnegative(),cachedInputPerMTok:m().nonnegative().optional(),cacheWritePerMTok:m().nonnegative().optional(),outputPerMTok:m().nonnegative(),searchPer1k:m().nonnegative().optional(),searchUnit:j(["query","prompt"]).optional(),batchTokenDiscount:m().min(0).max(1).optional()}).strict();d({models:He(r().min(1),x2).default({})}).strict();d({enabled:E().default(!1),maxRequestsPerBatch:m().int().positive().optional(),deadlineHours:m().positive().optional()}).strict();const Gz=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Kz=/[\0-\x1F\x7F-\x9F]/,Hz=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,Fz=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var Qz=class{src_Any=Gz.source;src_Cc=Kz.source;src_Z=Fz.source;src_P=Hz.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,n,i=4){const o=this.escapeRE(e),u=this.escapeRE(n),h=`(?:(?!${this.src_ZCc}|${o}|${u}).)`;let f=`${o}${h}{0,1000}${u}`;for(let b=2;b<=i;b++)f=`${o}(?:${h}|${f}){0,1000}${u}`;return f}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){const e="[0-9A-Fa-f]{1,4}",n=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:${e}:){6}${n}|::(?:${e}:){5}${n}|(?:${e})?::(?:${e}:){4}${n}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${n}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${n}|(?:(?:${e}:){0,3}${e})?::${e}:${n}|(?:(?:${e}:){0,4}${e})?::${n}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map(e=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},df={validate:(e,n,i)=>{const o=i.re.get_http_validator();o.lastIndex=n;const u=o.exec(e);return u?u[0].length:0},normalize:(e,n)=>n.normalize(e)},Zz={"http:":df,"https:":df,"ftp:":df,"//":{validate:function(e,n,i){const o=i.re.get_relative_proto_validator();o.lastIndex=n;const u=o.exec(e);return u?n>=3&&e[n-3]===":"||n>=3&&e[n-3]==="/"?0:u[0].length:0},normalize:(e,n)=>n.normalize(e)},"mailto:":{validate:function(e,n,i){const o=i.re.get_mailto_validator();o.lastIndex=n;const u=o.exec(e);return u?u[0].length:0},normalize:(e,n)=>n.normalize(e)}},Yz="a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",Xz="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function Jz(){const e=Xz.split("|");return Yz.split("|").forEach(n=>{const i=n.indexOf(":"),o=n.slice(0,i);for(const u of n.slice(i+1))e.push(o+u)}),e}var Wz={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:Jz(),urlAuth:!1,maxLength:1e4},$x=class{schema;index;lastIndex;raw;text;url;constructor(e,n,i,o){const u=e.slice(i,o);this.schema=n.toLowerCase(),this.index=i,this.lastIndex=o,this.raw=u,this.text=u,this.url=u}},e9=class{__opts__;__schemas__;re;constructor(e={}){const{rebuilder:n,...i}=e;this.__opts__={...Wz,...i},this.__schemas__={...Zz},this.re=n||new Qz,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,n=null){if(!n)delete this.__schemas__[e];else{const i={normalize:(o,u)=>u.normalize(o),...n};this.__schemas__[e]=i}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let n,i;for(i=this.re.get_schema_search(),i.lastIndex=0;(n=i.exec(e))!==null;)if(this.testSchemaAt(e,n[2],i.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(i=this.re.get_fuzzy_link_search(),i.lastIndex=0,i.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const o=this.re.get_fuzzy_mail_host_search(),u=this.re.get_mail_name_validator();for(o.lastIndex=0;(n=o.exec(e))!==null;){const h=e.slice(Math.max(0,n.index-65),n.index);if(u.test(h))return!0}}return!1}testSchemaAt(e,n,i){return this.__schemas__[n.toLowerCase()]?this.__schemas__[n.toLowerCase()].validate(e.slice(0,i+this.__opts__.maxLength),i,this):0}match(e){const n=[],i=this.re.get_schema_search();let o,u,h,f,b,v,x=!1,k=!1,S=!1,C=0;if(!e.length)return null;for(i.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(o=this.re.get_fuzzy_link_search(),o.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(u=this.re.get_fuzzy_mail_host_search(),u.lastIndex=0,h=this.re.get_mail_name_validator());;){const _=Math.max(C-1,0);if(u&&h&&!S&&(!b||b.index<C))for(u.lastIndex<_&&(u.lastIndex=_);;){const Y=u.exec(e);if(!Y){S=!0,b=void 0;break}const M=h.exec(e.slice(Math.max(0,Y.index-65),Y.index));if(M){if(b={schema:"mailto:",index:Y.index-M[1].length,lastIndex:Y.index+Y[0].length},b.index>=C)break;u.lastIndex<_&&(u.lastIndex=_)}}if(o&&!k&&(!f||f.index<C))for(o.lastIndex<_&&(o.lastIndex=_);;){const Y=o.exec(e);if(!Y){k=!0,f=void 0;break}if(f={schema:"",index:Y.index+Y[1].length,lastIndex:Y.index+Y[0].length},f.index>=C)break;o.lastIndex<_&&(o.lastIndex=_)}let z=b;(!z||f&&(f.index<z.index||f.index===z.index&&f.lastIndex>z.lastIndex))&&(z=f);let q;if(!x)for(;;){if(!v){i.lastIndex<_&&(i.lastIndex=_);const U=i.exec(e);if(!U){x=!0;break}v={schema:U[2],index:U.index+U[1].length,lastIndex:U.index+U[0].length}}if(v.index<C){v=void 0;continue}if(z&&v.index>z.index)break;const Y=v;v=void 0;const M=this.testSchemaAt(e,Y.schema,Y.lastIndex);if(M){q={schema:Y.schema,index:Y.index,lastIndex:Y.lastIndex+M};break}}let T=q;if((!T||b&&(b.index<T.index||b.index===T.index&&b.lastIndex>T.lastIndex))&&(T=b),(!T||f&&(f.index<T.index||f.index===T.index&&f.lastIndex>T.lastIndex))&&(T=f),!T)break;T===b?b=void 0:T===f&&(f=void 0);const V=new $x(e,T.schema,T.index,T.lastIndex);V.schema?this.__schemas__[V.schema].normalize(V,this):this.normalize(V),n.push(V),C=T.lastIndex}return n.length?n:null}matchAtStart(e){if(!e.length)return null;const n=this.re.get_schema_at_start().exec(e);if(!n)return null;const i=this.testSchemaAt(e,n[2],n[0].length);if(!i)return null;const o=new $x(e,n[2],n.index+n[1].length,n.index+n[0].length+i);return this.__schemas__[o.schema].normalize(o,this),o}tlds(e,n=!1){return e=Array.isArray(e)?e:[e],n?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}};const w2=JSON.parse('["aaa","aarp","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","actor","ad","ads","adult","ae","aeg","aero","aetna","af","afl","africa","ag","agakhan","agency","ai","aig","airbus","airforce","airtel","akdn","al","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","cash","casino","cat","catering","catholic","cba","cbn","cbre","cc","cd","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cool","coop","corsica","country","coupon","coupons","courses","cpa","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","er","ericsson","erni","es","esq","estate","et","eu","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontier","ftr","fujitsu","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","inc","industries","infiniti","info","ing","ink","institute","insurance","insure","int","international","intuit","investments","io","ipiranga","iq","ir","irish","is","ismaili","ist","istanbul","it","itau","itv","jaguar","java","jcb","je","jeep","jetzt","jewelry","jio","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerryproperties","kfh","kg","kh","ki","kia","kids","kim","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","lamborghini","lamer","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","link","live","living","lk","llc","llp","loan","loans","locker","locus","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","luxe","luxury","lv","ly","ma","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","music","mv","mw","mx","my","mz","na","nab","nagoya","name","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","office","okinawa","olayan","olayangroup","ollo","om","omega","one","ong","onl","online","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","paris","pars","partners","parts","party","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","racing","radio","re","read","realestate","realtor","realty","recipes","red","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","ril","rio","rip","ro","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sb","sbi","sbs","sc","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scot","sd","se","search","seat","secure","security","seek","select","sener","services","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shell","shia","shiksha","shoes","shop","shopping","shouji","show","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","sr","srl","ss","st","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiss","sx","sy","sydney","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","vermögensberater","vermögensberatung","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vn","vodka","volvo","vote","voting","voto","voyage","vu","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xihuan","xin","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zm","zone","zuerich","zw","ελ","ευ","бг","бел","дети","ею","католик","ком","мкд","мон","москва","онлайн","орг","рус","рф","сайт","срб","укр","қаз","հայ","ישראל","קום","ابوظبي","ارامكو","الاردن","البحرين","الجزائر","السعودية","العليان","المغرب","امارات","ایران","بارت","بازار","بيتك","بھارت","تونس","سودان","سورية","شبكة","عراق","عرب","عمان","فلسطين","قطر","كاثوليك","كوم","مصر","مليسيا","موريتانيا","موقع","همراه","پاکستان","ڀارت","कॉम","नेट","भारत","भारतम्","भारोत","संगठन","বাংলা","ভারত","ভাৰত","ਭਾਰਤ","ભારત","ଭାରତ","இந்தியா","இலங்கை","சிங்கப்பூர்","భారత్","ಭಾರತ","ഭാരതം","ලංකා","คอม","ไทย","ລາວ","გე","みんな","アマゾン","クラウド","グーグル","コム","ストア","セール","ファッション","ポイント","世界","中信","中国","中國","中文网","亚马逊","企业","佛山","信息","健康","八卦","公司","公益","台湾","台灣","商城","商店","商标","嘉里","嘉里大酒店","在线","大拿","天主教","娱乐","家電","广东","微博","慈善","我爱你","手机","招聘","政务","政府","新加坡","新闻","时尚","書籍","机构","淡马锡","游戏","澳門","点看","移动","组织机构","网址","网店","网站","网络","联通","谷歌","购物","通販","集团","電訊盈科","飞利浦","食品","餐厅","香格里拉","香港","닷넷","닷컴","삼성","한국"]');function t9(e,n){return e.endsWith(n)?e.length===n.length||e[e.length-n.length-1]===".":!1}function n9(e,n){const i=e.length-n.length-2,o=e.lastIndexOf(".",i);return o===-1?e:e.slice(o+1)}function a9(e,n,i){if(i.validHosts!==null){const u=i.validHosts;for(const h of u)if(t9(n,h))return h}let o=0;if(n.startsWith("."))for(;o<n.length&&n[o]===".";)o+=1;return e.length===n.length-o?null:n9(n,e)}function i9(e,n){return e.slice(0,-n.length-1)}const mf=/[\t\n\r]/g;let Xf=!1;function Gx(e){return e>=97&&e<=122||e>=48&&e<=57||e>127||e>=65&&e<=90||e===45||e===95}function Kx(e,n,i){const o=i-n,u=e.charCodeAt(n)|32;if(o===2)return u===119&&(e.charCodeAt(n+1)|32)===115?1:0;if(o===3){const h=e.charCodeAt(n+1)|32,f=e.charCodeAt(n+2)|32;return u===119&&h===115&&f===115||u===102&&h===116&&f===112?1:0}else if(o===4){const h=e.charCodeAt(n+1)|32,f=e.charCodeAt(n+2)|32,b=e.charCodeAt(n+3)|32;return u===104&&h===116&&f===116&&b===112?1:u===102&&h===105&&f===108&&b===101?2:0}else if(o===5)return u===104&&(e.charCodeAt(n+1)|32)===116&&(e.charCodeAt(n+2)|32)===116&&(e.charCodeAt(n+3)|32)===112&&(e.charCodeAt(n+4)|32)===115?1:0;return 0}function gc(e,n,i=!1){let o=0,u=e.length,h=!1,f=!1;if(Xf=!1,!n){if(e.startsWith("data:"))return null;for(;o<e.length&&e.charCodeAt(o)<=32;)o+=1;for(;u>o+1&&e.charCodeAt(u-1)<=32;)u-=1;if(e.charCodeAt(o)===47&&e.charCodeAt(o+1)===47)o+=2;else{const T=e.indexOf(":/",o);if(T!==-1){const V=Kx(e,o,T);if(V===1)for(f=!0,o=T+2;e.charCodeAt(o)===47||e.charCodeAt(o)===92;)o+=1;else if(V===2){f=!0,o=T+1;let Y=0;for(;(e.charCodeAt(o)===47||e.charCodeAt(o)===92)&&Y<2;)o+=1,Y+=1;if(Y<2)return null}else{for(let Y=o;Y<T;Y+=1){const M=e.charCodeAt(Y)|32;if(!(M>=97&&M<=122||M>=48&&M<=57||M===46||M===45||M===43)){const U=e.charCodeAt(Y);return U===9||U===10||U===13?gc(e.replace(mf,""),n,i):null}}if(e.charCodeAt(T+2)===47)o=T+3;else return null}}else if(e.charCodeAt(o)!==91){let V=-1;for(let Y=o;Y<u;Y+=1){const M=e.charCodeAt(Y);if(M===9||M===10||M===13)return gc(e.replace(mf,""),n,i);if(M===58){V=Y;break}if(M===47||M===92||M===63||M===35)break}if(V!==-1){let Y=!1;for(let M=V+1;M<u;M+=1){const U=e.charCodeAt(M);if(U===47||U===92||U===63||U===35)break;if(U===64){Y=!0;break}}if(!Y){let M=!0,U=V+1;for(;U<u;U+=1){const Z=e.charCodeAt(U);if(Z===47||Z===92||Z===63||Z===35)break;if(Z<48||Z>57){M=!1;break}}if(U===V+1&&(M=!1),!M){const Z=Kx(e,o,V);if(Z===0){let te=!1;for(let B=V+1;B<u;B+=1){const X=e.charCodeAt(B);if(X===47||X===92||X===63||X===35)break;if(X===58){te=!0;break}}if(!te)return null}else if(f=!0,o=V+1,Z===2){let te=0;for(;(e.charCodeAt(o)===47||e.charCodeAt(o)===92)&&te<2;)o+=1,te+=1;if(te<2)return null}else for(;e.charCodeAt(o)===47||e.charCodeAt(o)===92;)o+=1}}}}}let v=-1,x=-1,k=-1,S=-1,C=!1,_=i,z=o-1,q=-1;if(i&&o<u){const T=e.charCodeAt(o);(!(Gx(T)||T===46||T===95)||T===45)&&(_=!1)}for(let T=o;T<u;T+=1){const V=e.charCodeAt(T);if(V<64)if(V===47||V===35||V===63){u=T;break}else V===58?(S===-1&&(S=T),k=T):V===9||V===10||V===13?C=!0:i&&(V===46?((T-z>64||q===46||q===45)&&(_=!1),z=T):(V<48||V>57)&&(V!==45||q===46)&&(_=!1));else if(f&&V===92){u=T;break}else V===64?(v=T,S=-1):V===93?x=T:V>=65&&V<=90?h=!0:i&&!Gx(V)&&(_=!1);i&&(q=V)}if(C)return gc(e.replace(mf,""),n,i);if(v!==-1&&v>=o&&v<u&&(o=v+1),e.charCodeAt(o)===91)return x!==-1?e.slice(o+1,x).toLowerCase():null;if(k!==-1&&k>o&&k<u&&S===k&&(u=k),o>=u)return null;i&&_&&v===-1&&k===-1&&x===-1&&e.charCodeAt(u-1)!==46&&u-o<=255&&u-z-1<=63&&q!==45&&(Xf=!0)}for(;u>o+1&&e.charCodeAt(u-1)===46;)u-=1;const b=o!==0||u!==e.length?e.slice(o,u):e;return h?b.toLowerCase():b}function s9(e){if(e.length<7||e.length>15)return!1;let n=0;for(let i=0;i<e.length;i+=1){const o=e.charCodeAt(i);if(o===46)n+=1;else if(o<48||o>57)return!1}return n===3&&e.charCodeAt(0)!==46&&e.charCodeAt(e.length-1)!==46}function o9(e){if(e.length<3)return!1;let n=e.startsWith("[")?1:0,i=e.length;if(e[i-1]==="]"&&(i-=1),i-n>39)return!1;let o=!1;for(;n<i;n+=1){const u=e.charCodeAt(n);if(u===58)o=!0;else if(!(u>=48&&u<=57||u>=97&&u<=102||u>=65&&u<=70))return!1}return o}function r9(e){return o9(e)||s9(e)}const l9=["test","localhost","invalid","example","example.com","example.net","example.org","local","onion","alt","home.arpa","ipv4only.arpa","resolver.arpa","service.arpa","6tisch.arpa","eap.arpa"];function c9(e){for(const n of l9)if(e.endsWith(n)&&(e.length===n.length||e.charCodeAt(e.length-n.length-1)===46))return!0;return!1}function Hx(e){return e>=97&&e<=122||e>=48&&e<=57||e>127}function Fx(e){if(e.length>255||e.length===0||!Hx(e.charCodeAt(0))&&e.charCodeAt(0)!==46&&e.charCodeAt(0)!==95)return!1;let n=-1,i=-1;const o=e.length;for(let u=0;u<o;u+=1){const h=e.charCodeAt(u);if(h===46){if(u-n>64||i===46||i===45)return!1;n=u}else if(!(Hx(h)||h===45||h===95)||h===45&&i===46)return!1;i=h}return o-n-1<=63&&i!==45}function k2({allowIcannDomains:e=!0,allowPrivateDomains:n=!1,detectIp:i=!0,detectSpecialUse:o=!1,extractHostname:u=!0,mixedInputs:h=!0,validHosts:f=null,validateHostname:b=!0}){return{allowIcannDomains:e,allowPrivateDomains:n,detectIp:i,detectSpecialUse:o,extractHostname:u,mixedInputs:h,validHosts:f,validateHostname:b}}const u9=k2({});function d9(e){return e===void 0?u9:k2(e)}function m9(e,n){return n.length===e.length?"":e.slice(0,-n.length-1)}function p9(){return{domain:null,domainWithoutSuffix:null,hostname:null,isIcann:null,isIp:null,isPrivate:null,isSpecialUse:null,publicSuffix:null,subdomain:null}}function S2(e){e.domain=null,e.domainWithoutSuffix=null,e.hostname=null,e.isIcann=null,e.isIp=null,e.isPrivate=null,e.isSpecialUse=null,e.publicSuffix=null,e.subdomain=null}function j2(e,n,i,o,u){const h=d9(o);if(typeof e!="string")return u;let f=!1;return h.extractHostname?h.mixedInputs?(f=Fx(e),u.hostname=gc(e,f,h.validateHostname)):u.hostname=gc(e,!1,h.validateHostname):u.hostname=e,h.detectIp&&u.hostname!==null&&(u.isIp=r9(u.hostname),u.isIp)?u:h.validateHostname&&h.extractHostname&&u.hostname!==null&&!(f&&u.hostname===e)&&!Xf&&!Fx(u.hostname)?(u.hostname=null,u):(n===0||u.hostname===null||(n===5&&h.detectSpecialUse&&(u.isSpecialUse=c9(u.hostname)),i(u.hostname,h,u),n===2||u.publicSuffix===null)||(u.domain=a9(u.publicSuffix,u.hostname,h),n===3||u.domain===null)||(u.subdomain=m9(u.hostname,u.domain),n===4)||(u.domainWithoutSuffix=i9(u.domain,u.publicSuffix)),u)}function h9(e,n,i){if(!n.allowPrivateDomains&&e.length>3){const o=e.length-1,u=e.charCodeAt(o),h=e.charCodeAt(o-1),f=e.charCodeAt(o-2),b=e.charCodeAt(o-3);if(u===109&&h===111&&f===99&&b===46)return i.isIcann=!0,i.isPrivate=!1,i.publicSuffix="com",!0;if(u===103&&h===114&&f===111&&b===46)return i.isIcann=!0,i.isPrivate=!1,i.publicSuffix="org",!0;if(u===117&&h===100&&f===101&&b===46)return i.isIcann=!0,i.isPrivate=!1,i.publicSuffix="edu",!0;if(u===118&&h===111&&f===103&&b===46)return i.isIcann=!0,i.isPrivate=!1,i.publicSuffix="gov",!0;if(u===116&&h===101&&f===110&&b===46)return i.isIcann=!0,i.isPrivate=!1,i.publicSuffix="net",!0;if(u===101&&h===100&&f===46)return i.isIcann=!0,i.isPrivate=!1,i.publicSuffix="de",!0}return!1}const vo=new Uint8Array([1,2,1,1,1,1,1,1,1,1,1,1,0,2,2,2,0,2,2,0,2,0,0,1,0,0,2,1,1,1,1,1,1,0,0,0,1,0,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,1,0,0,0,0,0,0,1,1,1,0,2,0,0,0,0,0,0,0,2,0,2,2,0,0,2,2,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,2,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,2,2,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,1,0,2,2,0,0,0,2,0,1,1,0,2,0,2,2,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,0,0,0,0,1,0,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,2,2,0,2,2,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,2,0,2,2,2,2,0,0,0,0,2,0,0,0,0,0,0,2,2,0,0,0,2,2,1,1,1,1,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,2,2,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,2,2,1,2,1,1,1,2,1,1,1,1,1,0,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,2,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,0,0,0,0]),Bd=new Uint16Array([0,0,0,10,11,18,106,111,117,124,130,136,145,146,147,148,149,150,151,153,154,155,157,159,226,239,241,242,243,258,265,266,269,270,271,274,276,295,296,298,307,312,313,331,332,335,337,338,340,374,375,377,380,381,385,387,391,394,426,429,442,443,451,452,454,464,478,479,480,489,490,527,532,548,568,574,615,616,643,670,671,819,825,828,829,830,835,840,849,871,872,873,874,875,876,877,895,897,898,901,903,904,906,908,923,938,943,944,946,947,948,949,950,952,955,960,961,962,964,965,968,971,972,973,986,988,1e3,1011,1019,1021,1061,1064,1068,1069,1071,1074,1085,1087,1097,1099,1105,1107,1108,1110,1113,1114,1115,1167,1169,1171,1191,1192,1193,1194,1196,1207,1238,1249,1261,1270,1277,1282,1295,1306,1319,1320,1331,1365,1366,1367,1382,1397,1469,1470,1472,1473,1507,1508,1509,1512,1516,1518,1547,1548,1556,1557,1558,1560,1562,1563,1565,1566,1567,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1594,1595,1596,1598,2053,2056,2057,2059,2066,2073,2083,2087,2098,2099,2100,2112,2113,2115,2117,2118,2125,2126,2128,2129,2131,2132,2133,2134,2135,2209,2211,2232,2233,2234,2236,2262,2263,2314,2315,2317,2324,2330,2340,2350,2403,2404,2405,2415,2429,2430,2433,2440,2441,2449,2450,2451,2452,2453,2464,2465,2466,2468,2469,2470,2471,2473,2483,2495,2501,2533,2537,2539,2540,2542,2543,2554,2555,2557,2565,2572,2578,2583,2584,2590,2593,2599,2606,2607,2614,2622,2623,2624,2662,2668,2683,2684,2689,2707,2738,2756,2758,2761,2769,2771,2778,2830,2854,2855,2856,2857,2858,2859,2860,2861,2868,2869,2870,2871,2872,2873,2875,2876,2880,2964,2977,2978,3414,3418,3432,3484,3512,3534,3592,3614,3629,3692,3743,3781,3817,3842,3984,4030,4081,4100,4134,4149,4169,4199,4230,4253,4284,4314,4346,4373,4448,4470,4508,4518,4552,4571,4597,4639,4689,4715,4784,4785,4787,4810,4833,4869,4900,4917,4974,4987,5011,5040,5042,5076,5092,5120,5425,5434,5443,5450,5467,5471,5477,5516,5518,5525,5532,5541,5548,5549,5560,5563,5578,5579,5588,5589,5598,5607,5613,5615,5616,5617,5653,5654,5656,5664,5671,5684,5688,5690,5691,5697,5704,5718,5728,5733,5741,5749,5755,5756,5760,5762,5763,5775,5776,5777,5778,5780,5781,5784,5786,5789,5793,5794,5800,5801,5802,5804,5806,5808,5809,5810,5813,5815,5818,5819,5821,6019,6026,6027,6037,6042,6059,6073,6082,6083,6084,6088,6089,6091,6093,6099,6100,6103,6104,6106,6107,6108,7008,7009,7013,7031,7040,7043,7050,7051,7053,7054,7055,7057,7109,7110,7113,7114,7231,7232,7243,7254,7261,7264,7273,7274,7275,7290,7345,7536,7538,7539,7541,7546,7559,7574,7581,7590,7593,7596,7603,7611,7615,7616,7617,7631,7635,7644,7645,7646,7650,7685,7686,7703,7710,7718,7719,7724,7732,7776,7777,7783,7786,7797,7802,7803,7806,7839,7840,7846,7853,7854,7863,7872,7887,7891,7943,7944,7949,7951,7954,7956,7957,7958,7967,7981,7989,8003,8015,8016,8018,8020,8042,8053,8059,8060,8072,8084,8171,8183,8185,8194,8197,8203,8228,8231,8232,8233,8235,8238,8241,8252,8254,8256,8284,8358,8365,8369,8370,8379,8401,8402,8407,8408,8487,8489,8491,8500,8504,8510,8516,8522,8532,8537,8538,8556,8567,8572,8577,8587,8593,8597,8603,8609,10217,10218,10219,10226,10228]),Ld=new Uint8Array([3,3,3,3,3,3,3,3,5,8,8,2,2,3,3,3,3,3,8,5,5,5,5,5,3,3,5,5,9,12,19,8,19,8,11,9,9,8,7,7,6,8,9,16,10,7,7,11,8,6,6,9,7,11,7,14,4,4,4,4,4,4,10,7,6,6,6,6,10,10,6,10,10,22,11,9,10,10,10,9,10,8,7,7,7,8,21,13,11,11,9,10,9,13,10,8,8,9,12,9,7,10,7,7,13,7,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,8,6,3,3,3,3,3,3,2,5,3,3,3,7,2,2,2,2,2,2,3,3,3,1,1,7,8,5,2,2,7,2,2,1,4,1,11,9,9,5,5,8,5,5,5,5,5,5,5,3,3,3,3,3,5,11,9,9,13,7,14,7,6,6,6,7,6,6,6,6,6,10,7,11,9,4,4,4,4,4,4,6,6,6,6,6,8,7,10,9,9,9,8,9,8,10,6,9,9,8,10,10,7,8,1,9,10,12,12,12,10,9,9,10,10,9,9,1,1,5,3,3,3,3,3,3,3,3,3,3,3,3,6,6,6,4,3,3,3,7,4,4,4,3,3,6,7,3,4,1,2,2,2,6,1,2,2,2,2,2,12,5,3,8,9,13,4,4,13,9,9,11,7,3,12,9,2,2,2,3,3,3,3,3,8,2,2,3,3,3,3,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,4,4,3,7,10,15,7,15,15,20,15,9,10,10,12,14,14,14,12,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,13,13,9,9,9,9,9,9,7,8,6,8,8,6,8,13,8,8,6,13,8,11,13,8,6,13,8,6,9,10,10,12,14,14,14,12,12,12,12,14,14,10,10,10,10,9,9,9,10,14,14,11,13,13,9,9,9,9,9,9,2,6,9,2,2,3,3,3,3,3,3,3,3,3,4,4,4,2,3,3,3,3,3,3,7,7,2,3,2,2,5,3,3,3,3,3,3,4,2,2,2,2,2,2,3,3,3,3,3,3,3,4,5,7,2,2,12,8,10,8,10,7,18,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,2,2,3,3,3,5,5,3,8,8,6,8,6,6,4,6,7,7,7,10,11,2,5,5,3,3,3,3,3,3,5,5,6,11,10,7,7,7,4,4,4,2,3,3,3,3,3,2,7,5,5,3,3,3,3,3,3,3,3,7,7,7,11,7,6,9,6,6,8,10,8,6,8,13,4,4,4,4,4,10,8,11,8,8,8,10,10,7,10,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,7,10,13,7,8,7,11,8,8,6,9,8,8,6,6,6,8,8,6,6,6,6,6,9,7,6,4,4,4,4,4,4,4,6,6,6,9,7,8,10,8,8,2,3,3,3,3,3,2,8,9,9,2,2,2,3,3,3,2,3,3,3,9,2,2,3,3,3,3,3,3,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,12,5,5,3,5,4,2,3,2,4,3,9,2,2,2,2,2,5,5,3,8,8,13,6,10,9,4,7,9,11,2,3,7,3,3,4,1,3,4,2,9,3,3,12,5,3,7,10,10,7,4,4,6,14,7,9,7,13,2,2,2,2,2,2,3,3,3,3,3,8,15,4,4,2,3,3,3,7,4,9,9,2,3,3,3,5,3,2,2,7,2,7,6,6,7,2,4,2,2,2,2,2,2,8,8,8,9,5,2,3,3,3,3,3,3,10,7,4,4,4,4,3,4,2,3,3,3,3,3,10,7,4,4,4,4,2,3,3,3,3,10,7,4,4,4,4,3,9,6,6,6,9,13,9,2,2,2,8,7,9,5,3,3,3,5,5,12,9,10,7,8,7,6,8,6,11,12,7,9,10,4,4,7,8,11,6,7,9,8,7,10,8,9,15,7,8,5,4,7,2,3,3,3,2,14,10,2,14,10,2,14,3,9,13,13,10,14,16,17,11,2,14,2,14,3,9,13,10,14,16,17,11,14,10,14,2,7,3,10,7,14,10,2,14,10,9,9,17,6,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,10,10,10,12,9,4,10,11,8,8,8,7,9,5,3,3,3,3,3,3,3,3,5,8,4,4,4,4,4,4,6,16,3,3,14,3,14,2,14,9,13,10,10,14,16,17,11,6,9,10,10,12,14,14,14,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,9,9,9,9,9,9,2,14,9,13,10,10,14,16,17,11,6,2,14,9,17,13,10,10,14,16,17,11,6,2,14,9,13,10,14,16,17,11,2,14,9,13,10,16,11,2,14,10,19,7,2,14,9,13,10,19,10,7,14,16,17,11,6,2,14,9,13,10,19,7,14,16,17,11,2,14,9,13,17,13,10,10,14,16,17,11,6,3,2,14,9,13,10,10,14,16,17,11,6,9,10,12,14,14,14,12,12,12,12,12,14,14,14,10,10,10,14,9,9,9,9,14,14,14,13,13,14,9,9,9,9,9,9,4,11,2,14,9,13,17,13,10,19,10,7,14,16,17,11,6,2,14,9,13,17,13,10,19,10,7,14,16,17,11,6,2,9,10,10,7,17,3,3,12,12,16,15,15,12,14,14,14,20,20,13,12,12,12,12,12,12,20,25,14,14,12,12,10,10,10,10,9,9,9,25,4,9,17,10,7,14,16,21,13,13,14,20,14,13,17,24,9,12,13,25,13,21,20,17,9,9,9,9,9,9,12,17,4,4,9,9,9,10,10,12,14,14,14,12,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,13,13,9,9,9,9,9,9,1,8,7,11,11,1,3,3,3,4,8,9,10,14,14,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,13,13,9,9,9,9,9,7,4,4,4,4,4,4,4,4,4,4,9,12,6,14,4,12,7,2,2,1,2,7,6,4,4,4,6,8,8,7,4,5,6,3,3,3,3,4,16,8,3,5,4,3,3,3,5,2,2,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,11,12,7,7,13,9,10,12,8,9,7,8,5,12,10,13,14,5,5,5,13,5,5,5,3,3,3,5,16,5,5,5,5,5,7,12,14,8,12,8,10,12,9,11,7,9,7,10,7,13,9,7,12,8,17,7,7,16,10,13,13,8,10,10,14,17,7,16,16,15,8,10,10,12,17,7,17,14,7,10,17,8,7,7,7,8,15,15,7,14,10,10,10,11,11,7,7,13,8,10,7,16,7,8,7,14,17,12,10,11,21,8,9,7,13,9,8,13,6,12,7,6,13,10,10,10,8,18,9,17,13,10,12,6,13,6,11,8,13,10,13,18,13,11,13,8,16,7,10,8,16,12,10,8,8,6,14,11,8,15,8,8,7,7,12,7,8,9,14,15,8,9,10,9,15,7,8,8,12,13,9,10,15,15,13,7,10,10,20,7,6,9,6,6,14,11,14,11,12,9,10,16,16,12,7,11,28,8,11,10,7,21,8,7,9,4,4,4,17,7,8,6,9,6,6,13,6,6,6,6,18,20,14,8,11,12,9,10,13,15,19,8,9,12,7,10,16,12,9,9,9,14,12,11,9,12,11,18,9,9,9,10,7,7,16,8,9,7,13,12,10,18,7,8,11,7,7,8,8,13,7,7,7,11,15,13,11,7,8,15,11,7,8,18,14,13,18,15,10,12,12,9,7,11,11,8,7,10,8,14,12,10,18,7,10,9,7,8,13,10,14,9,10,8,8,23,7,7,11,12,12,17,7,7,11,11,17,16,16,7,8,11,14,14,8,10,7,7,16,16,13,9,11,9,15,15,11,11,7,7,14,7,9,7,7,16,10,13,10,11,14,7,11,10,11,7,11,10,11,15,11,15,10,12,17,10,14,13,11,11,12,13,10,7,13,10,16,12,21,9,10,10,7,11,14,17,7,7,8,11,12,8,15,14,14,8,17,12,10,10,7,9,11,7,10,7,11,18,7,11,7,12,11,8,8,14,12,7,8,15,3,7,7,5,2,9,2,2,2,2,2,2,2,3,3,3,3,3,3,3,2,5,3,3,3,3,3,3,4,4,3,3,3,3,3,3,5,11,6,4,7,10,7,7,11,1,10,2,2,3,3,3,3,3,3,3,3,5,7,3,5,6,3,3,5,2,2,5,3,4,13,11,3,3,6,3,5,14,2,2,3,8,2,2,12,5,18,5,3,3,3,16,5,5,5,10,7,13,12,13,9,12,14,19,9,9,21,9,9,10,6,9,6,15,10,6,12,8,6,10,15,4,4,6,6,9,9,12,16,14,23,7,7,7,14,9,7,7,11,14,10,7,10,10,10,12,6,11,10,13,11,15,11,7,12,10,3,7,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,4,3,7,2,5,5,3,3,5,5,5,5,7,6,6,6,4,4,4,4,4,4,6,6,6,6,6,7,10,2,2,2,5,5,5,5,3,3,3,3,3,5,5,10,9,11,8,7,12,8,9,7,6,13,11,6,13,7,9,9,4,4,4,4,4,4,6,10,7,8,13,8,8,9,14,8,10,7,7,7,9,6,9,7,2,12,5,3,3,13,4,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,4,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,4,4,4,4,4,4,4,4,4,4,4,4,9,3,3,3,3,3,3,3,3,3,3,4,2,2,2,5,3,3,3,3,3,3,3,3,4,4,1,7,6,4,12,3,3,3,3,3,8,7,3,3,3,3,3,3,4,4,11,14,2,8,3,5,5,8,10,8,6,4,7,17,7,4,5,2,6,3,5,2,4,4,2,12,5,5,3,15,13,10,8,11,2,2,3,3,3,3,3,3,3,3,4,4,5,3,3,3,3,4,18,2,12,5,3,3,3,3,3,5,16,8,8,9,6,6,4,4,4,4,31,6,6,10,11,21,10,9,7,10,7,7,2,4,4,4,4,6,5,3,3,4,3,3,3,3,3,3,3,3,3,6,6,6,2,2,2,5,3,3,3,7,7,4,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,8,2,3,3,3,3,3,5,9,11,3,3,3,3,4,4,3,3,3,3,3,5,10,9,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,11,10,10,10,10,10,11,10,11,10,11,10,9,9,11,3,3,3,3,3,3,5,3,7,8,8,7,6,6,11,4,4,4,7,8,9,9,2,3,7,4,4,2,5,5,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,2,2,5,5,5,5,5,3,3,5,5,5,7,7,6,6,6,4,4,4,4,4,4,4,4,4,4,6,6,8,8,1,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,6,9,12,3,7,10,7,2,2,3,3,3,3,3,4,3,3,2,2,2,2,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,8,8,6,6,8,6,7,4,4,4,4,4,4,6,7,5,5,20,19,8,10,9,7,10,6,8,11,6,6,6,6,13,12,8,6,7,14,11,9,2,5,3,3,6,2,3,2,2,2,2,2,2,2,5,4,3,7,6,4,7,4,3,6,4,7,2,7,7,7,5,5,5,5,3,3,3,3,3,3,3,3,3,3,5,9,10,10,8,11,7,8,20,7,8,9,8,12,6,6,6,8,9,8,12,6,6,8,13,10,12,6,6,7,7,8,9,6,4,4,4,4,4,4,4,10,6,6,6,7,14,11,10,7,8,10,8,11,14,11,11,9,7,9,8,11,9,17,10,9,2,2,2,9,3,3,3,3,15,14,9,5,5,2,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,15,12,22,19,17,18,18,19,21,7,16,16,5,5,5,5,5,5,5,5,5,5,5,7,5,5,5,5,5,5,5,5,5,5,5,9,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,7,16,11,11,7,7,7,7,17,7,8,12,15,9,19,7,19,8,16,21,11,12,19,14,22,7,7,7,7,7,7,7,7,7,7,7,16,16,19,24,12,7,14,7,12,7,8,10,10,13,7,12,12,7,7,10,18,15,12,16,7,14,12,17,10,16,17,12,17,25,7,7,7,13,6,9,6,9,18,6,6,11,20,10,6,6,6,6,6,6,6,17,6,6,6,15,6,6,6,6,6,8,14,11,12,15,13,19,17,21,7,18,8,13,13,8,12,8,6,6,13,6,15,15,16,6,6,16,6,6,6,14,6,18,6,6,6,17,18,9,13,15,8,19,8,15,15,18,14,16,4,4,4,4,4,4,4,4,4,4,4,4,6,11,10,11,6,21,23,12,17,12,11,14,13,22,15,15,11,12,14,12,7,12,8,14,12,18,10,8,16,19,17,12,14,15,8,9,19,17,12,13,13,15,18,13,23,24,23,21,17,24,8,21,8,14,14,16,14,8,8,15,20,8,19,21,9,8,13,12,13,15,11,8,11,9,9,8,11,8,21,14,21,15,15,13,7,19,7,7,7,7,7,7,16,12,17,18,7,7,11,11,7,9,9,2,2,3,3,2,2,2,3,3,3,3,3,3,3,3,3,3,4,5,5,5,5,5,5,5,5,3,3,10,10,7,9,7,7,7,6,8,6,6,6,6,6,6,6,7,6,8,6,6,9,7,7,7,4,4,4,4,4,4,4,4,8,9,8,7,8,7,8,10,7,5,5,5,5,5,5,3,9,7,7,8,6,6,6,6,6,6,6,6,9,6,6,9,11,13,7,8,9,9,5,5,5,7,8,6,6,6,6,6,6,6,7,8,9,7,10,9,10,7,8,5,5,5,5,5,5,7,7,9,8,7,7,6,6,6,6,6,6,10,6,6,6,6,6,6,6,6,6,6,6,9,10,4,4,4,4,8,7,7,10,10,9,8,8,15,9,8,8,8,8,8,9,10,9,10,7,8,13,5,5,5,5,5,3,3,7,7,8,6,6,6,4,4,11,9,7,8,9,10,7,5,5,5,5,5,3,3,7,6,6,13,7,9,8,7,5,5,5,5,5,5,5,5,3,3,3,3,7,8,7,8,13,6,6,6,6,6,6,6,6,6,6,6,6,6,6,8,8,6,6,6,6,7,6,7,6,6,9,7,4,4,4,4,4,4,4,7,8,7,8,9,8,8,8,7,10,7,8,5,5,5,5,5,5,5,5,3,7,7,7,7,9,7,10,9,6,6,6,6,6,8,8,6,6,6,7,6,6,6,9,9,4,4,13,7,10,9,9,12,7,8,8,10,8,8,8,8,8,8,5,5,5,5,3,7,7,11,7,9,8,8,6,6,10,6,8,8,8,6,7,6,6,12,4,4,4,4,4,4,4,4,4,9,8,8,16,8,9,8,7,5,5,5,5,5,3,3,7,7,7,10,15,8,9,8,9,9,6,6,6,6,6,6,7,4,8,7,8,8,7,8,11,8,5,5,5,5,5,3,7,7,6,11,16,7,6,4,4,4,4,9,9,8,8,8,13,12,8,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,11,7,8,8,9,13,7,7,7,9,8,8,9,12,7,12,7,12,8,7,10,12,9,9,6,6,8,8,6,6,6,6,6,6,6,9,8,9,11,8,6,6,6,6,6,12,7,6,6,6,9,7,7,6,6,6,6,6,11,9,6,6,6,6,6,7,9,4,4,4,4,4,4,4,4,9,9,9,9,7,7,7,7,7,11,7,7,8,8,8,8,8,8,9,8,9,9,7,7,11,11,7,12,8,8,8,8,8,7,8,8,8,8,8,13,12,8,8,8,8,7,7,7,9,5,5,5,5,5,5,5,3,3,7,7,11,7,8,8,8,6,6,6,6,6,6,6,6,6,6,6,10,11,6,7,9,4,4,4,4,4,4,9,9,8,9,8,8,8,7,7,5,5,5,5,5,5,5,5,5,5,3,3,11,7,7,7,9,6,6,11,8,10,6,6,6,12,8,8,7,6,6,8,7,4,4,4,4,4,4,4,4,9,10,9,9,8,10,9,11,8,5,5,5,7,6,6,8,7,4,4,4,4,8,7,7,8,7,8,8,5,5,5,5,7,7,8,8,8,6,6,6,6,6,10,8,9,13,6,7,6,6,8,7,8,4,4,4,4,11,8,8,8,10,5,5,8,7,8,13,8,7,6,8,6,9,7,8,7,5,5,5,5,5,5,3,3,7,8,9,6,4,8,10,10,8,12,9,13,2,7,5,5,5,5,5,7,7,10,6,6,6,6,6,6,6,8,4,4,9,8,8,8,14,8,8,8,9,8,5,5,5,5,5,3,3,9,6,6,6,6,10,12,6,6,6,6,6,6,6,4,4,4,4,11,8,7,8,8,8,5,5,3,3,3,3,7,7,6,8,6,8,11,7,6,6,6,7,4,8,11,9,10,5,5,5,3,3,3,7,7,8,9,8,15,9,6,6,6,6,6,6,11,11,4,4,4,4,4,7,9,9,10,8,7,5,5,5,5,5,5,3,3,8,6,6,6,6,6,6,6,6,6,9,7,4,4,4,4,4,9,9,8,8,10,13,5,5,5,3,17,7,7,7,7,7,8,6,8,13,6,6,6,6,6,6,6,6,4,4,4,9,10,8,8,8,5,5,5,5,3,7,7,7,8,8,6,6,6,8,8,8,9,10,8,4,8,10,9,8,8,8,9,13,10,5,5,5,5,5,5,5,5,5,5,3,3,7,8,9,9,7,7,7,10,9,9,8,9,8,8,8,6,6,6,6,6,6,6,6,6,6,6,6,6,8,12,6,6,6,6,6,6,6,6,6,12,4,4,4,4,4,4,4,4,4,4,4,11,8,8,9,9,10,8,9,7,7,5,5,5,5,5,5,3,7,8,7,6,6,8,6,6,10,4,7,8,9,12,8,7,7,5,5,5,5,5,5,3,3,7,14,7,9,8,8,6,6,8,12,12,6,6,7,7,10,4,4,4,4,4,9,9,14,9,13,8,7,5,5,5,6,6,6,7,4,8,7,5,5,5,5,5,5,5,5,3,3,7,7,7,8,6,6,6,6,6,6,12,6,6,6,6,4,4,9,9,8,8,11,7,7,7,5,5,5,3,9,8,6,6,7,4,4,4,4,4,4,8,8,11,5,5,5,7,7,7,9,6,6,6,6,6,6,9,8,4,4,4,4,7,12,9,8,8,8,7,10,10,5,5,5,5,5,5,5,3,11,14,8,7,8,8,6,6,6,6,6,8,7,6,6,6,7,6,8,9,4,4,4,7,8,9,7,9,7,7,9,8,5,5,5,5,5,5,5,5,5,11,3,9,7,7,12,14,8,6,6,12,11,8,6,6,6,6,6,6,6,6,6,15,7,4,4,4,16,9,9,9,8,9,9,9,9,9,8,8,8,13,11,8,5,5,5,5,3,7,6,6,8,8,8,6,6,7,10,7,4,4,4,4,9,7,8,7,7,7,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,7,7,7,9,6,6,6,6,6,8,8,7,7,9,6,6,6,7,6,6,6,6,6,15,4,4,4,4,4,8,8,7,8,12,9,8,8,8,8,8,9,8,8,10,8,8,8,8,16,9,10,2,5,5,5,5,5,5,5,9,7,6,8,9,4,4,4,4,4,7,8,8,8,9,8,11,10,5,5,5,5,3,7,8,6,6,6,6,6,8,6,6,6,6,4,12,10,12,7,7,7,7,7,7,7,5,5,5,5,3,3,7,7,10,8,9,7,6,10,7,6,6,4,4,8,9,7,9,9,9,9,8,8,8,8,10,5,5,5,5,5,5,8,7,6,6,6,10,6,7,10,7,4,4,4,4,4,4,4,12,9,10,7,7,10,8,10,5,12,9,6,6,6,6,6,7,6,4,4,4,10,9,9,8,7,7,5,5,5,5,5,5,3,3,13,7,7,9,7,7,7,8,9,9,7,8,6,6,6,6,6,6,6,6,6,6,6,6,6,7,13,9,15,15,4,4,4,4,4,10,10,9,8,9,8,8,9,7,8,7,8,5,5,7,6,6,6,4,4,4,7,8,11,8,5,5,5,5,5,5,5,7,6,6,6,6,6,6,9,11,10,7,4,4,4,9,8,8,5,5,5,5,5,9,9,6,6,6,6,6,6,6,9,9,4,4,4,4,8,8,8,9,9,8,8,8,13,2,4,2,7,5,5,5,5,5,5,9,9,6,6,6,6,10,8,8,8,6,6,6,4,4,9,8,10,8,9,8,8,8,9,8,8,5,3,3,3,11,6,6,6,7,6,6,6,4,4,9,8,5,5,5,5,5,3,11,8,6,6,6,6,6,9,7,4,4,14,10,9,8,12,8,8,8,11,15,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,11,11,11,10,10,7,7,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,3,3,3,7,11,7,7,11,11,7,8,9,10,7,7,9,9,9,9,7,7,10,8,13,8,8,8,8,11,10,6,6,8,10,11,14,14,6,6,6,6,6,6,9,11,7,7,6,8,12,11,11,6,6,10,6,6,6,6,6,10,7,7,6,6,11,6,6,6,11,8,9,7,6,10,11,9,10,11,7,11,8,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,6,6,8,9,10,9,6,6,6,10,6,6,6,6,11,10,11,10,9,8,7,7,7,7,11,14,8,10,9,9,8,8,7,11,8,8,8,11,11,10,10,9,10,8,11,10,8,11,9,12,8,10,8,11,8,9,9,11,11,10,11,13,8,7,8,8,9,7,8,8,8,8,7,8,2,2,2,2,2,2,2,4,4,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,2,3,3,3,3,3,3,3,3,8,6,4,4,4,11,7,11,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,5,5,5,3,3,3,3,8,7,7,8,8,4,8,7,7,7,9,7,8,9,8,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,6,3,3,3,3,3,3,3,3,4,2,2,3,3,3,3,3,4,5,5,3,8,8,6,9,4,4,10,7,3,3,3,2,5,3,3,3,3,3,3,3,3,3,3,3,3,4,3,2,2,2,3,3,3,3,3,4,10,2,3,3,3,3,3,3,3,4,2,3,3,3,3,3,3,3,3,2,2,3,3,3,5,2,4,2,6,2,2,9,5,5,3,3,3,3,3,3,3,5,5,5,9,8,7,6,6,11,4,4,4,4,4,4,4,4,6,6,7,7,11,8,8,6,5,11,2,3,3,3,3,3,3,3,3,3,3,3,3,3,4,2,2,3,3,3,3,3,3,6,4,4,4,4,3,3,3,3,5,7,2,3,3,3,3,3,8,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,6,4,4,4,4,2,2,3,3,3,3,3,3,3,4,3,3,3,3,3,3,3,3,3,3,3,3,4,2,2,3,3,3,3,3,3,2,3,3,3,3,3,6,3,3,8,10,3,4,4,1,1,1,1,1,1,1,8,9,10,7,7,1,1,3,8,7,7,8,8,8,1,6,1,1,6,3,3,4,7,3,5,5,4,4,4,4,4,2,7,7,8,12,3,4,5,1,3,4,4,10,4,3,3,3,8,7,7,2,2,2,2,2,2,2,2,2,12,9,20,7,5,5,5,9,13,5,5,5,5,5,3,3,3,16,5,5,5,13,7,8,8,11,8,7,9,7,11,12,9,9,8,8,11,10,14,7,12,10,11,13,7,9,11,17,17,14,13,7,8,7,10,10,7,16,13,7,8,17,12,9,8,6,7,10,6,6,12,6,8,10,8,8,8,6,8,6,14,6,6,6,13,6,10,6,6,7,14,8,6,6,10,11,10,9,9,7,7,6,6,6,9,9,7,9,10,9,13,12,4,4,4,4,4,4,4,4,4,6,6,6,8,8,6,8,9,10,9,7,10,10,8,7,8,7,10,12,9,8,15,8,7,8,8,7,7,15,13,7,10,9,14,18,16,7,24,7,8,10,11,16,8,14,7,9,9,9,11,13,19,14,15,14,11,7,13,9,10,7,13,9,10,11,12,8,9,2,3,5,8,7,4,4,10,5,3,3,3,3,3,5,4,4,4,2,2,2,2,2,1,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,2,2,2,3,3,3,3,3,3,3,3,3,3,4,2,12,5,3,8,10,15,6,7,2,3,2,5,5,12,2,5,5,5,5,2,2,5,5,12,9,5,2,2,9,5,5,12,12,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,9,12,5,8,8,9,5,5,5,8,19,7,16,15,14,9,9,9,9,7,11,11,11,7,14,10,10,5,5,5,5,5,5,5,5,5,15,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,9,9,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,14,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,15,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,12,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,9,9,12,9,9,12,12,12,15,7,11,7,14,11,18,13,8,18,15,18,12,14,12,8,8,8,8,9,9,9,12,7,10,10,8,8,12,12,12,7,12,12,9,7,7,7,7,7,8,15,12,9,10,10,7,10,10,13,11,10,9,22,11,9,8,8,8,8,8,13,18,13,9,15,19,9,7,7,10,7,7,7,11,8,13,17,7,7,10,10,10,7,20,16,7,7,7,7,7,7,11,21,12,12,13,11,14,16,8,8,13,11,7,7,13,7,7,14,15,15,6,6,6,6,6,6,6,6,6,6,13,10,18,6,6,6,6,6,6,6,6,6,11,8,8,12,12,11,11,8,12,9,9,9,13,13,9,9,9,9,9,9,6,10,12,6,6,6,6,17,11,7,7,7,7,14,14,12,6,7,7,6,6,15,10,13,10,6,8,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,13,9,9,15,13,6,12,12,6,19,11,10,7,7,16,8,19,17,9,9,9,9,9,6,6,6,10,8,16,8,6,6,9,6,6,6,6,6,6,6,6,8,8,8,6,7,6,6,6,6,6,6,6,6,6,6,6,14,6,6,6,6,20,6,9,6,14,9,9,9,6,9,8,8,12,9,8,8,8,8,7,8,12,7,8,8,8,6,8,6,6,6,6,6,6,6,9,8,8,6,6,13,9,12,13,12,14,13,12,11,11,6,8,8,8,6,13,12,11,11,12,6,11,12,11,13,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,6,6,6,6,6,6,6,13,6,6,6,6,6,6,6,6,6,6,6,6,6,8,8,8,8,6,18,6,12,13,13,13,9,10,15,9,12,6,6,6,6,6,6,6,6,9,15,10,9,10,13,9,19,8,18,17,10,10,8,8,6,6,6,6,6,6,10,14,8,16,16,9,8,15,8,8,10,12,14,7,7,8,8,7,7,7,7,8,13,13,11,9,9,9,12,10,17,8,11,9,7,7,14,8,14,14,7,7,7,7,7,7,14,7,7,7,7,7,10,10,8,14,7,7,7,7,8,8,8,8,8,17,9,7,15,7,8,12,7,9,14,7,7,7,9,13,8,14,7,16,18,13,15,14,12,13,10,15,9,7,7,7,10,13,15,15,9,9,9,9,19,11,7,11,11,13,8,8,8,8,7,12,19,17,9,9,13,7,7,7,9,7,7,7,12,13,15,10,8,8,14,15,12,13,13,8,12,14,7,11,7,14,15,13,12,8,8,8,8,11,13,15,15,8,13,12,8,8,8,13,10,16,14,11,8,8,12,12,9,15,15,12,12,13,8,8,9,12,13,9,8,8,8,8,8,8,8,8,8,8,8,11,12,11,7,14,7,13,13,13,12,18,16,7,12,11,10,10,15,9,9,9,21,7,7,7,11,16,8,8,11,11,7,7,7,7,7,19,7,7,7,7,7,7,7,7,7,12,8,9,12,14,11,9,9,9,22,12,3,8,8,15,4,2,2,5,5,3,3,3,3,3,3,6,6,4,4,4,12,7,10,2,3,3,3,3,3,3,3,6,7,3,7,5,14,4,4,7,8,10,4,1,3,3,6,2,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,4,2,2,5,3,4,2,2,2,2,2,2,11,5,5,5,11,5,5,3,5,5,5,5,11,14,13,9,11,9,12,8,11,11,8,11,16,9,9,7,10,9,12,8,15,6,7,6,6,13,10,8,11,8,6,6,6,12,16,6,11,7,8,9,18,6,6,9,4,4,6,13,6,6,6,6,8,8,9,16,7,7,14,7,8,8,8,7,7,7,7,7,7,15,13,7,10,7,7,10,12,16,15,7,9,9,14,11,11,10,9,10,8,12,7,8,7,7,10,12,7,12,8,7,2,3,3,3,3,3,3,3,3,3,3,5,3,3,5,5,5,10,4,8,7,10,3,3,3,3,3,3,3,3,3,3,1,3,3,3,3,3,3,3,7,4,5,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,6,6,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,8,2,2,2,8,12,7,7,5,5,5,5,5,5,5,5,5,5,5,5,8,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,7,11,9,8,8,8,7,8,9,7,7,9,7,7,7,10,7,7,10,9,10,6,6,6,6,6,6,15,7,8,9,9,8,6,6,10,9,6,8,13,9,7,6,6,6,6,6,6,12,6,6,7,6,7,6,6,6,10,10,7,6,6,6,4,4,4,4,4,4,4,4,4,4,4,4,4,4,6,14,6,6,7,7,9,6,6,6,6,9,9,8,9,10,9,8,9,12,7,7,7,8,7,10,12,11,9,10,7,7,7,9,10,10,8,12,9,7,7,9,8,8,8,10,7,7,8,9,9,7,7,7,8,2,4,6,3,4,2,3,3,3,3,2,3,3,3,3,3,3,3,3,4,4,4,4,5,5,3,3,3,3,3,3,3,3,5,8,6,4,7,3,3,3,3,3,3,3,12,3,3,3,3,3,3,4,4,2,3,5,3,4,7,3,3,3,3,3,3,4,3,3,3,3,3,3,3,4,3,3,6,4,3,4,2,2,2,5,3,3,3,3,3,5,4,4,4,4,7,6,8,9,2,2,2,2,3,3,3,5,7,2,3,3,8,7,7,2,2,8,5,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,8,8,7,7,6,10,6,9,7,11,4,6,8,8,7,8,4,5,5,5,3,3,11,8,9,6,6,8,7,4,4,7,8,7,2,2,3,3,3,3,4,3,3,3,3,3,3,3,3,7,2,2,5,3,3,2,3,3,3,3,3,3,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,12,5,5,3,3,3,5,10,12,6,15,4,6,6,7,14,9,3,3,3,3,3,8,2,2,3,5,3,3,3,3,3,3,8,8,8,7,5,8,4,6,11,2,2,6,7,2,9,8,5,5,3,3,5,5,7,7,6,6,10,6,6,8,9,7,4,4,4,4,7,6,6,7,7,10,9,8,11,8,3,3,3,3,3,4,4,2,3,3,3,3,3,7,6,2,5,6,7,6,4,8,9,11,2,2,3,3,3,3,3,3,3,2,2,5,3,3,3,3,3,9,9,6,4,8,7,7,5,9,8,6,8,7,8,5,5,5,5,5,3,3,3,16,8,7,7,7,8,7,7,7,7,9,6,9,6,10,7,7,7,6,10,8,9,11,11,8,4,4,10,8,8,6,9,6,11,8,8,8,15,7,8,9,5,3,3,3,3,3,5,11,2,2,3,8,9,10,3,2,2,2,2,2,2,3,6,4,2,2,3,3,3,3,3,3,3,3,3,3,4,4,2,3,3,3,3,3,3,3,11,5,3,3,3,3,3,3,3,3,6,7,4,4,2,3,3,3,3,3,3,3,3,12,7,4,12,4,6,5,4,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,2,3,3,3,3,3,3,3,3,4,4,11,10,6,4,6,10,8,3,3,3,3,3,3,3,3,5,4,4,4,2,2,2,2,2,2,2,2,5,3,4,4,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,5,5,5,5,5,5,3,3,3,3,3,3,3,3,7,8,8,7,13,12,10,10,8,8,7,7,9,12,11,6,6,8,8,9,7,7,7,10,15,10,4,4,4,4,4,11,8,8,9,7,9,14,14,12,2,2,2,2,2,2,2,3,3,3,3,3,2,2,12,5,5,5,8,11,10,7,9,3,8,7,3,15,13,11,4,4,2,2,2,19,7,5,5,3,3,3,3,3,3,3,5,22,18,6,14,17,4,4,19,16,18,2,3,3,2,3,2,3,3,6,4,2,3,3,2,5,3,3,3,3,3,3,3,9,9,2,3,2,2,2,3,3,3,5,7,14,7,7,12,9,13,6,11,6,10,9,7,7,8,12,12,8,8,8,10,7,7,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,5,8,10,7,8,11,8,12,9,4,7,7,9,13,2,3,3,3,3,3,3,2,3,3,3,1,2,2,3,3,3,3,3,3,5,2,2,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,4,4,4,3,2,3,3,3,3,5,2,2,2,2,5,5,5,5,3,3,3,3,3,3,3,3,3,7,7,7,7,7,8,8,8,8,8,12,9,8,8,9,8,6,17,6,6,6,8,8,6,6,6,6,6,6,6,6,6,6,6,7,4,4,8,8,9,9,9,7,7,7,7,7,7,7,9,9,9,7,8,8,8,10,7,13,10,8,9,3,3,5,13,3,3,3,3,3,7,7,6,6,10,13,11,11,8,8,9,8,9,9,10,10,10,11,10,10,13,13,16,15,11,12,9,9,10,9,11,10,9,9,14,7,8,3,10,7,7,3,2,2,2,5,3,3,3,3,3,3,3,3,3,3,3,3,6,7,2,2,3,3,3,3,3,3,3,3,4,11,6,7,4,6,2,2,3,3,3,1,3,3,3,3,3,3,6,4,4,2,2,2,3,3,3,3,4,4,6,6,6,6,5,4,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,9,11,6,10,9,12,7,7,11,14,9,7,12,3,3,7,12,11,12,7,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,9,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,11,5,5,5,5,5,5,5,5,11,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,3,3,3,5,5,5,5,5,5,5,5,5,5,5,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,5,5,5,5,5,5,5,5,5,5,5,5,5,3,10,3,3,3,11,3,5,9,11,8,12,14,9,7,8,7,7,11,11,7,7,10,9,8,10,9,7,7,7,7,7,7,8,8,7,11,8,8,8,7,7,10,8,7,13,12,7,17,10,8,8,11,7,11,11,14,7,11,7,8,6,9,20,8,7,9,16,7,10,6,11,10,8,9,7,16,11,11,9,8,9,8,8,8,11,8,15,8,8,9,7,8,8,11,10,7,5,7,10,10,15,7,7,7,8,7,8,8,10,11,10,10,10,11,11,7,8,6,8,8,8,10,6,8,6,6,7,8,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,16,6,15,6,7,11,11,7,9,10,11,13,10,6,16,8,10,12,11,6,6,6,6,6,6,6,10,6,10,7,7,7,7,11,7,11,6,6,6,6,6,6,17,7,7,6,6,12,22,6,6,6,6,6,8,6,6,6,6,7,6,6,5,6,6,8,11,6,9,14,11,9,11,7,7,8,6,6,6,8,10,9,6,6,6,6,9,7,6,6,6,6,6,15,6,4,4,4,6,4,17,8,11,6,6,9,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,6,6,6,6,10,6,10,6,6,6,6,12,8,6,6,6,6,6,6,6,6,6,9,6,6,6,6,18,6,6,6,8,9,10,7,8,9,10,11,7,13,6,8,8,6,6,14,7,7,7,7,10,7,14,9,6,6,9,15,9,7,14,6,11,14,13,7,12,8,7,7,7,7,7,12,7,10,9,16,6,8,6,5,17,6,8,10,4,6,4,10,15,17,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,4,4,11,7,4,4,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,19,17,6,10,11,6,6,6,6,18,6,6,11,4,4,4,5,6,6,6,9,5,6,4,6,6,4,6,6,6,6,10,6,6,4,6,6,10,6,10,6,6,6,6,11,6,6,10,6,6,8,6,6,6,8,6,11,4,11,9,10,9,11,4,8,4,11,12,7,9,8,6,7,7,8,12,12,11,13,10,11,7,7,7,9,7,11,10,7,7,7,16,11,10,11,17,9,9,8,8,7,7,7,9,7,7,7,14,7,13,9,11,10,14,10,10,12,11,10,7,10,5,14,8,8,8,9,7,8,7,7,9,8,7,8,7,7,7,7,7,7,7,11,8,10,8,7,8,14,11,8,9,9,9,8,24,10,10,12,7,7,15,11,8,8,12,11,8,9,9,7,8,9,10,11,10,11,7,12,7,7,11,9,8,14,13,12,8,11,10,8,8,7,7,14,9,10,8,9,11,7,14,8,8,13,8,8,12,7,10,14,14,11,9,10,9,9,7,7,11,11,13,9,13,5,5,5,7,9,5,11,12,14,8,7,7,11,10,9,7,8,8,7,10,11,11,5,5,7,5,5,5,7,7,15,7,7,8,7,15,12,12,10,7,8,7,11,7,7,7,23,11,8,8,11,10,7,8,11,7,19,7,7,6,9,9,9,11,3,4,7,8,6,6,4,10,8,2,2]),Qx=new Uint16Array([0,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,12,1,1,1,1,1,17,1,1,1,12,1,12,1,12,13,1,1,1,1,12,1,12,1,1,1,1,1,14,21,1,1,1,1,1,1,1,19,12,1,1,1,1,1,1,1,20,1,1,1,16,1,18,1,1,15,1,1,1,1,12,1,1,1,1,1,1,22,1,1,1,12,1,1,1,1,1,1,1,1,1,12,12,12,12,12,12,12,12,12,12,12,12,1,24,25,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,12,12,12,12,1,32,0,0,0,1,1,1,1,35,34,1,1,1,1,1,33,1,1,1,1,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,38,0,0,0,0,39,40,0,0,0,41,0,12,1,1,12,1,1,1,1,44,45,45,45,44,45,44,44,46,45,44,45,44,44,44,44,44,44,46,44,44,44,44,44,44,45,47,47,45,44,44,44,44,44,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,50,52,50,50,50,52,50,51,50,53,50,51,51,50,50,50,51,53,51,53,50,51,51,12,55,55,54,56,51,53,50,50,48,49,57,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,60,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,67,1,12,1,1,66,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,76,79,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,12,1,1,1,1,89,1,91,1,1,1,1,1,1,1,1,94,1,1,1,1,1,1,1,1,1,1,1,1,0,1,97,97,1,1,12,1,100,1,1,1,1,1,1,1,98,1,99,1,101,1,1,1,1,1,102,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,110,111,1,1,1,1,1,1,113,113,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,121,122,1,1,1,1,1,1,1,1,1,1,1,1,1,122,1,1,1,1,1,1,1,1,1,1,122,1,1,1,1,1,1,1,1,1,126,123,125,120,1,124,1,1,114,1,1,1,1,117,1,127,1,1,1,1,1,119,1,108,1,109,1,12,128,106,1,112,1,1,1,1,1,107,115,1,12,12,12,118,116,1,1,1,1,1,1,0,0,0,0,1,12,12,1,1,1,1,1,12,134,1,1,1,1,1,1,1,1,1,1,1,12,136,1,1,1,1,1,1,1,1,137,138,12,12,135,133,45,45,140,50,50,139,142,141,1,1,0,0,0,0,0,0,0,0,0,0,0,0,145,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0,0,0,1,0,144,132,1,0,1,12,12,1,1,1,1,1,0,0,0,0,0,0,0,1,148,147,20,1,1,12,12,1,20,12,12,1,1,1,1,1,134,1,1,152,1,1,1,1,153,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,1,136,1,1,152,1,1,1,1,153,1,1,134,1,1,1,152,1,1,1,1,153,1,1,134,1,1,1,1,1,1,1,1,134,1,1,1,1,1,1,1,1,1,1,1,160,1,1,1,152,1,1,1,1,1,153,1,1,160,1,1,1,1,1,1,1,1,1,1,134,1,1,1,1,152,1,1,1,1,153,1,1,1,134,1,1,152,1,1,1,1,164,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,167,1,1,160,1,1,1,1,1,152,1,1,1,1,1,153,1,1,160,1,1,1,1,1,152,1,1,1,1,1,153,1,154,158,158,12,1,12,166,1,1,1,1,1,158,158,158,154,1,1,1,157,158,161,165,1,1,1,1,157,157,1,1,156,154,154,157,170,156,170,1,1,168,1,156,155,157,1,1,1,1,157,1,159,1,1,1,12,1,162,1,162,1,1,1,162,161,163,169,156,154,1,1,1,1,1,1,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,173,172,173,172,172,172,172,174,174,172,173,172,173,172,172,12,12,12,12,12,1,12,12,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,193,1,1,1,1,12,199,200,201,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,151,1,1,1,1,1,1,1,1,1,1,1,196,1,1,1,184,1,210,1,1,1,208,1,1,205,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,12,1,1,1,1,1,1,1,1,190,1,1,1,186,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,182,1,1,1,1,1,1,1,191,1,1,1,1,195,1,1,1,1,171,1,1,189,1,1,1,192,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,180,1,12,1,1,12,1,1,1,1,183,1,1,1,188,1,203,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,209,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,194,1,1,1,1,1,12,1,1,1,1,1,1,1,1,176,12,1,1,1,178,12,1,1,1,1,1,1,1,198,1,1,1,1,1,1,1,1,1,1,177,1,1,1,1,1,1,204,1,1,1,181,1,1,1,187,1,12,1,1,12,1,1,1,1,1,1,1,1,1,1,191,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,175,1,1,1,1,1,1,1,1,1,1,185,1,1,1,1,1,1,1,1,1,1,1,206,1,1,1,1,1,1,1,1,1,1,1,1,1,207,1,1,12,1,1,1,1,179,1,1,1,185,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,197,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,12,1,1,1,1,1,1,1,1,1,202,1,1,12,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,220,0,0,0,0,0,221,0,0,0,0,0,0,1,12,1,1,1,225,1,1,1,0,226,223,224,1,1,1,1,1,1,231,1,233,1,1,1,1,1,1,1,1,1,1,1,229,1,1,1,1,1,235,1,1,12,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,234,1,1,1,12,1,1,1,1,230,1,1,1,228,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,232,1,1,1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,241,13,1,1,1,12,12,238,239,1,1,1,1,240,1,1,12,1,1,1,1,1,1,1,242,1,1,12,16,1,1,1,1,1,1,1,243,1,1,1,12,12,1,1,1,1,1,243,12,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,252,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,256,256,1,0,0,0,0,0,1,12,0,0,0,0,0,0,0,0,172,261,262,1,12,1,1,1,1,12,264,1,1,263,1,1,266,1,1,1,1,1,1,1,1,1,0,1,1,1,271,272,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,12,1,0,1,0,0,0,0,1,0,1,0,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,12,0,283,0,0,284,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,12,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,60,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0,308,0,0,0,0,0,0,0,0,0,310,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,327,327,328,327,0,185,1,1,13,323,1,321,0,0,0,0,1,0,0,0,324,1,1,329,1,205,1,1,1,1,1,322,1,319,1,325,1,317,1,326,1,318,1,1,1,1,1,1,1,12,1,1,1,12,1,12,320,320,1,1,1,316,184,1,1,12,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,12,1,1,1,1,315,1,0,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,332,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,266,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,372,372,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,1,340,351,1,1,339,374,1,345,1,1,337,369,1,1,355,336,341,1,1,1,348,379,357,1,1,1,1,1,1,358,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0,367,371,0,0,79,1,1,0,365,342,378,343,346,353,1,368,0,1,0,79,362,360,1,0,0,1,1,1,0,0,0,0,381,1,1,352,1,79,1,0,1,1,1,384,1,0,0,79,359,0,1,338,1,1,1,0,1,1,361,1,0,1,1,1,0,1,386,349,1,1,0,1,0,0,377,0,1,1,1,79,370,1,1,366,363,1,1,1,1,1,1,1,1,1,1,1,344,1,1,1,1,1,1,1,1,1,1,1,376,0,79,1,1,1,1,0,1,1,1,1,1,1,0,0,1,1,380,1,1,1,0,0,383,0,0,0,1,356,1,0,79,382,1,0,0,0,0,385,1,1,0,0,1,0,1,0,354,0,350,0,1,1,1,0,1,1,0,373,347,375,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,1,400,400,1,1,12,12,1,400,1,1,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,412,1,1,0,1,1,1,1,205,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,430,430,1,1,0,0,317,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,442,1,441,1,1,1,1,1,1,1,1,445,1,12,12,1,1,1,1,1,12,1,1,1,1,453,1,1,1,455,1,1,1,1,1,1,1,1,1,1,452,1,447,1,1,1,1,435,1,1,1,1,1,1,1,1,448,12,1,1,1,1,454,1,1,1,449,444,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,317,1,433,1,1,12,451,1,1,317,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,437,1,1,1,1,1,1,1,1,1,1,1,454,1,1,1,1,317,1,450,1,1,1,439,1,1,1,1,1,440,1,456,443,1,1,1,1,1,438,1,1,1,1,1,1,1,1,1,434,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,446,1,1,1,1,1,1,1,12,1,1,1,1,1,436,1,1,1,1,1,1,1,220,457,1,1,1,1,1,12,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,0,0,462,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,12,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,466,0,466,466,466,466,466,466,466,0,466,466,466,466,466,1,466,466,466,0,466,466,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,471,470,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,475,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,468,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,469,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,477,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,466,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,474,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,467,0,0,478,473,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,472,0,0,0,0,0,0,0,0,0,0,0,0,0,466,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,467,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,466,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,476,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,12,1,1,1,1,1,1,1,1,1,1,1,1,488,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,198,198,1,492,1,1,1,491,1,1,1,1,487,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,489,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,493,1,1,490,1,1,1,1,1,1,1,1,372,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,494,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,505,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,1,0,1,0,0,12,1,507,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,12,12,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,1,0,0,0,0,0,0,0,1,0,0,1,0,1,1,1,1,0,0,0,1,0,0,0,1,60,1,1,12,12,12,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,526,1,1,1,1,1,1,1,527,1,1,1,1,1,1,1,525,1,1,12,1,529,239,1,1,12,12,1,1,12,1,12,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,533,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,539,1,1,1,1,1,1,1,1,1,1,1,1,1,1,132,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,107,1,1,12,1,1,1,12,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,548,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,144,1,1,1,228,1,1,12,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,1,572,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,577,1,220,1,328,1,1,1,1,1,1,1,1,1,0,0,578,1,1,1,1,0,580,0,79,0,579,0,1,1,1,0,1,1,1,1,1,1,12,0,0,0,0,1,0,0,0,0,0,0,586,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,582,582,0,585,583,582,582,582,582,582,587,582,582,591,582,582,582,582,582,582,582,582,582,582,588,585,582,582,585,582,582,582,582,582,582,582,582,582,582,582,582,582,583,582,582,582,582,582,589,582,582,582,582,582,582,0,0,0,1,590,1,1,1,1,584,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,12,595,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,12,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,12,1,1,12,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,65,280,306,411,535,0,4,68,236,254,282,307,334,388,413,0,499,519,536,597,9,0,61,88,398,409,429,575,0,497,518,532,612,0,30,6,0,461,500,602,560,70,0,7,285,255,389,463,416,538,79,598,0,576,309,418,465,9,105,288,506,6,30,0,311,79,391,79,483,10,6,131,248,275,0,613,509,0,563,0,64,6,6,251,95,2,432,399,410,596,0,6,0,6,286,103,6,561,501,540,0,464,390,273,287,8,71,104,599,543,392,312,300,419,146,74,290,546,510,601,564,335,330,479,6,75,149,11,0,249,522,547,565,514,551,570,611,36,6,260,295,333,304,218,30,528,553,218,42,216,265,296,305,406,423,481,274,0,73,562,0,403,417,299,79,247,79,0,581,545,504,292,421,79,393,387,0,0,0,9,555,571,217,0,424,407,531,516,573,615,85,218,43,297,396,425,569,0,511,293,276,79,215,80,28,390,30,6,394,331,303,604,592,524,550,513,0,258,81,30,405,422,0,30,426,0,219,593,517,9,408,427,218,248,86,222,594,574,557,482,428,397,250,227,87,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,414,0,0,0,0,0,0,0,0,82,0,129,0,0,84,549,0,0,0,0,0,0,0,27,0,552,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,414,0,0,0,0,503,0,257,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,294,0,0,0,0,0,0,0,617,0,0,0,0,0,616,0,0,0,0,0,0,0,0,0,0,0,0,0,0,395,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,69,0,0,0,0,0,0,495,0,0,0,0,0,0,404,0,0,0,0,0,0,0,0,0,0,0,0,0,211,0,0,0,0,0,0,0,0,0,0,515,0,0,0,0,0,0,0,0,0,0,0,0,496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,269,281,0,0,0,0,0,530,277,0,0,0,0,0,0,0,0,0,0,0,0,0,512,0,0,0,0,0,0,0,0,0,0,0,458,0,0,0,314,0,0,0,0,0,0,253,0,0,0,0,0,0,23,0,0,0,0,568,0,0,0,0,600,521,0,0,0,0,244,0,0,0,0,0,0,0,0,0,480,0,0,0,0,0,62,0,0,0,267,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,0,0,0,0,0,279,610,0,72,0,0,0,0,0,0,0,0,0,619,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,150,0,278,0,0,0,0,0,0,567,0,0,0,0,0,0,523,0,0,0,0,0,0,0,0,0,566,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,0,502,0,0,0,0,0,554,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,83,0,0,0,0,0,0,0,0,0,0,0,0,486,0,485,0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,459,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,289,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,537,0,0,0,0,0,0,0,0,298,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,69,237,0,0,0,0,0,0,0,0,0,0,84,0,606,0,0,0,0,0,0,0,0,0,0,0,0,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,520,0,0,0,84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,498,0,614,0,0,431,0,0,0,0,0,0,0,0,0,0,0,0,402,0,0,0,544,0,93,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,29,92,0,0,0,0,0,0,0,0,0,0,0,0,291,0,0,0,214,0,0,0,0,0,0,558,0,270,0,0,130,0,0,0,0,0,559,0,0,0,0,0,0,0,414,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,313,0,0,0,0,0,5,0,0,0,0,0,0,0,301,0,0,0,0,0,0,0,0,0,0,0,0,0,534,0,0,0,415,0,0,401,0,0,0,0,0,0,603,0,0,0,541,0,0,90,0,542,0,0,0,0,0,0,0,0,0,0,508,460,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,268,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,607,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,0,0,0,0,0,556,0,0,0,0,0,0,0,0,0,0,302,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,605,0,0,212,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,623,623,623,623,623,623,623,622,624]),Jf="orgmilcomschnetedugovdrrformsfeedbackofficialaccoorgmilschnetgovmagazinemediaunioncargopilotgroupcaarespressworksaerodromeworkinggroupair-traffic-controlaircraftaccident-preventioneducatormarketplaceambulanceinsurancecateringairportrepbodyenginesoftwaremodellingair-surveillanceconsultingchartertrainermaintenanceservicesdesignflightskydivingfreightassociationstudentgroundhandlingdgcafuelclubtaxicrewshowballooningexpresstraderbrokerauthoragentsairtrafficjournalistsafetyconsultantmicrolightaccident-investigationparachutingequipmentproductionfederationrecreationscientistnavigationengineertradingglidingleasingresearchpassenger-associationentertainmentparaglidinghangglidingaerobaticrotorcraftemergencycertificationgovernmentaeroclubexchangelogisticschampionshiphomebuiltcouncilconferencecontrolairlinecivilaviationjournalorgcomnetedugovcoorgcomnomnetobjofforgcomnetuwukiloappsframerorgmilcomnetedugovcoradioorgcomnetcommuneedogpbcoitgvorgedugov*spreviewfrontendrelayononstagingupid*mtls*privatelinktypedreamdeveloperbravemochawindsurfaivenmirenupsunwnextbegetngrokclerkwale2bwebcsbrunputerflutterflowspawnbaseshiptodaymagicpatternsnetlifyondigitaloceanrailwayhostedclaudehasurabotdashvercelgithubluyanigadgetreplitcloudflaretelebitedgecomputeevervaultdetaexponyatnoopencrpplxzeaburwasmerframerzeropsconvexmedusajsspritesonherculeseasypanelstreamlitsnowflakemesserliloginlinehackclubnorthflankbase44corespeedadaptableleapcellngrok-freeclerkstagelovableon-fleek*us-west-3ap-south-2us-central-2us-central-1eu-central-1ap-south-1us-west-2us-east-2eu-north-1ap-north-1us-west-1us-east-1*rcloudintsegorgmilcomgobbetnetintedugovturmusicasenasamutualcoopip6uriurnin-addre164homeirisgovdixdaemoncloudnssthwien*inexexkunden4accogvormymyspreadshop4lima2ixortsinfofuturecmsfuturehosting12hpprivfuturemailinglima-cityfunkfeuer123webseitednshomemelmyspreadshopcloudletswasantqldvicactnswtascatholicwasaqldvictasvpsidwasantozqldorgcomvicasnactnetedugovnswtasconfhrsncomairflowlambda-urltransfer-webappairflowtransfer-webapptransfer-webapptransfer-webapp-fipstransfer-webappeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1privatenotebookstudiolabelingnotebookstudionotebooknotebook-fipslabelingnotebookstudionotebook-fipsnotebookstudio-fipsnotebook-fipsnotebookstudionotebook-fipsnotebookstudioeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2experimentsus-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1onrepostsagemakercopporgmilcompronetintedugovbiznameinfoshoprsorgmilcomnetedugovbrendlyresolvenzauscotvstoreorgcomnetedugovbizinfoidacaicoittvorgmilcomschnetedugovinfocloudezproxyacmymyspreadshopkuleuvenwebhostingtransurl123websitecloudnsinterhostsolutionsddns5476103298edgfacbmlonihkjutwvqpsryxzbarsycoororgcomedumyftpno-iporxcloud-ipfor-somemmafanfor-morewebhopselfipjozidyndnscloudnsdscloudfor-thefor-betteractivetrailcoeconorestooteorgcomeconeteduassurmoneyafricaarchitectesrestaurantloisirstourismavocatsinfoagrounivcoorgcomnetedugovtvdeportesaludtksatorgmilcomwebgobnetinteducienciaboliviarevistacooperativaempresanombreindustriamusicapatriamedicinademocraciapoliticapuebloindigenaplurinacionalarteblogwikiinfoagrotransportenoticiasprofesionalacademiaeconomiaecologiamovimientotecnologianaturalsimplesitecepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesmscepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesms*biaamfmtcmptvfeirasampajampanatalbelemananiradiog12medindfndbmdtrdthepoaggfjdfdefinfenflegsegongengcngorgzlgslglogppgmillelqslcimcomnomadmjabimbbibbsbabcrectecsjcetcpscpvhudieticriapipsiecnbiorioecogeoteoodoproatoartfstmatvetdetbetnetcntnotfotgrueduajuespappreptmpemparqsrvadvdevgovntrturagrjorfarjusmusdesvixxyzcozfozslzbhzmaringasantamariacampinagrandegoianiasorocabafloripasaobernardocuritibaboavistarecifeaparecidasaogoncasalvadorcuiabamorenamacapalondrinacontagemsocialfortalmaceioleilaoosascoriobranconiteroi9guacutcheblogflogvlogwikitaxicoopmanauspalmascaxiasjoinvillebaruericampinassantoandreribeiraoriopretoweorgcomnetedugovv0windsurfshiptodaycloudsitecoaccoorgnetgovofmilcomgovmediatechzacoorgcomnetedugsjgovmydnspenfnlabnbmbgcbcqconcontnuyksknsmyspreadshopno-ipawdevboxbarsyonidatemfuinabusavinstanceseceuguukussryzespawncsxcloud-ipmyphotosfantasyleaguetwmailcleverappsscrappingccwucloudnsftpaccessgame-serverccgovobjectsrmalpgcust*svcalp1aeappenginermalpgmyspreadshop4lima2ixsquare7cloudscale123websitefirenet12hpflowgotdnslinkyard-cloudcloudnslima-citydnskingobjectstorageedaccogoorusorgcomnetinteduaéroportxn--aroport-byaassogouvcomilgobgovcloudnses-1eu-west-1us-east-1euvipit1eurarubait1s3lbwebsites3websiteru-spbru-mskelasticcsrunstnukukcaukusnl-ams-1fr-par-1fr-par-2functionsnodess3ddlwhmrdbfnck8sifrs3-websitecockpitscblmgdbdtwhkafkpubprivs3ddlwhmrdbk8sifrs3-websitecockpitscblmgdbdtwhkafks3ddlrdbk8sifrs3-websitecockpitscblmgdbdtwhkafkk8sscalebookpl-wawfr-parnl-amsbaremetalsmartlabelinginstancesdechk2kuleuvenlaravelvoorloperurownoxazapscwhstgrvaporobservablehqelementorantagonistreclaimjoteluluencowaydiademjelasticmatlabmagentositetrendhostingaxarnetperspectajenv-arubajelejoteravendbemergenttrafficplexconvexkeliwebserveboltbegetcdnstaticson-rancherprimetelonstackitunison-servicesdnshomelinkyardbarsyjelecloudnscocomnetgovmycn-northwest-1cn-north-1s3s3-accesspoints3-websites3s3-accesspointrdsdualstacks3-deprecatedemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspoints3s3-accesspointrdsdualstackemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicn-northwest-1cn-north-1cn-northwest-1ebcomputeelbcn-north-1airflowcn-northwest-1cn-north-1oncn-northwest-1cn-north-1amazonawssagemakeramazonwebservicesdirectasgdsdhehahljlnmhbacscahqhshhihnlnynsnmofjbjzjxjtjhkcqtwgsjssxnxjxgxxzgz網絡网络公司orgmilcomnetedugovxn--55qx5dcanva-appsxn--io0a7iquickconnectcanvasitekhsjxn--od0algmyqnapcloudsrvrlessclustersrealtimestorageleadpagescarrdcrdorgmilcomnomnetedugovhidnssupabaserdpareplmypiumsoxmitotaplpagesfirewalledreplitowodevwebview-assetsvfswebview-assetss3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9eu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1s3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackanalytics-gatewayemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstacks3-deprecateds3-websites3-object-lambdaexecute-apis3s3-accesspoints3-websites3-accesspoint-fipss3-fipss3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipss3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9vfss3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9eu-west-3ap-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1us-northeast-1ap-southeast-1me-south-1af-south-1ap-south-1ap-southeast-7us-west-2eu-west-2ap-east-2us-east-2ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1mrapaccesspoints3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3eu-west-3ap-south-2eu-south-2computes3-ap-northeast-2elbrdss3-ap-east-1s3-sa-east-1s3-us-gov-west-1s3-eu-central-1s3-ca-central-1eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3s3-website-us-west-2s3-website-eu-west-1s3-external-1eu-central-1me-central-1ca-central-1il-central-1s3-us-west-1s3-eu-west-1s3-website-sa-east-1s3-website-ap-southeast-2ap-northeast-1ap-southeast-1s3-us-west-2s3-eu-west-2me-south-1af-south-1eu-south-1ap-south-1us-west-2eu-west-2us-east-2s3-website-ap-southeast-1s3-1s3-globals3-ap-northeast-3eu-north-1airflowap-southeast-2s3-us-gov-east-1s3-fips-us-gov-east-1s3-me-south-1s3-ap-south-1ap-northeast-2s3-website-us-west-1ap-southeast-5s3-eu-north-1s3-ap-southeast-1s3-website-us-gov-west-1compute-1s3-eu-west-3us-gov-west-1s3-website-ap-northeast-1us-gov-east-1s3-fips-us-gov-west-1s3-website-us-east-1s3-ap-southeast-2ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1s3-us-east-2s3-ap-northeast-1authauthauth-fipsauth-fipseu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1rservicesbuilderstg-builderdev-builder*ociocpocsdemoinstanceeu-west-3eu-south-2ap-southeast-3ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1previeweu-4us-4us-1eu-1us-2eu-2us-3eu-3appspaasrag-cloudrag-cloud-chjcloudjcloud-ver-jpcdemonodebalancermembersipeuxvsoncillaocelotonzayalilynxsphinxfentigercustomercaracalo365cloudstaticxendevapp001testcode-builder-stgplatformapimediasiteprojedrydpagesjsu2u2-localx0desazacncoitrueu4uhkukgrbrushatenadiarymyspreadshopfrom-flfrom-wvwebspace-hosttheworkpchatenablogservesarcasmapplinzisakuratanwixsiteappchizigiizeis-into-carsdnsiskinkyadobeaemcloudis-a-therapistpgfogmyvncdojinis-an-actress1kappfldrvkozowqa2jpnmexprgmrfirewall-gatewaydynnscafjsfbsbxooguyxnbayfrom-gawoltlab-demois-a-anarchistwiardwebteaches-yogadattowebtb-hostinglive-websiteservegamegotpantheonfrom-nhsubsc-payfrom-ohvipsinaappfrom-cadyndns-officehomelinuxfrom-mahercules-appservebbsstreakusercontentfrom-okfrom-wyfastly-terrariumis-a-llamaqualyhqportalserveexchangeon-vaporvivenushopciscofreakgrayjayleaguesmetaaiusercontentfrom-iais-a-libertariansaves-the-whalestaveusercontentyolasiteoperaunitepoint2thisis-a-catererlinodeusercontentfrom-vagithubusercontentsells-for-lesshosteurcanva-appsplaystation-cloudddnsfreefrom-pafrom-prfrom-waddnskingoutsystemscloudhotelwithflightmydattois-a-nascarfanmydbserverminiserverdamnserverservehumouris-a-playerfrom-nvfrom-nmemergentagentgentappsamplifyappfrom-kyis-an-accountantnfshostserveircfrom-akpythonanywherestackhero-networkpostman-echolikescandydyndns-mailobservableusercontentserveftpfreeboxosfrom-utcdn77-storageamazonawsneat-urldyndns-serverlinodeis-a-teacherfrom-vtgleezemythic-beastsus1-pleniteu1-plenitla1-plenitpaywhirlservecounterstrikejdevcloudhealth-carereformis-into-animegoogleapisis-a-painterafricaisa-hockeynutatmetais-an-actora2hostedis-a-democratdatadetectest-le-patrondigitaloceanspacesis-a-designeris-a-hunterlinodeobjectstemp-dnsissmarterthanyoufrom-arsimplesiteevennodetownnews-stagingis-a-liberalgooglecodejelasticservemp3stdlibqualyhqpartnerdyndns-free1cooldnsest-a-la-masiondrayddnsdynuddnsfrom-orfrom-miis-a-bloggerfrom-himydobisscanvacodeis-an-engineerest-a-la-maisonupsunappdevinappswafflecellmyasustorwpenginepoweredfrom-ctservep2psame-appmyshopblocksthingdustdatalikes-piediscordsezis-with-thebanddev-myqnapcloudlpusercontentis-leetshopitsite3utilitiesis-a-personaltrainersinaappladeskis-a-cheflogoipselfipbase44-sandboxnospamproxyalibabacloudcsmesswithdnsauthgearappsiamallamawithgooglelutrausercontentmochausercontentframercanvasmytabitdyndns-homew-credentialless-staticblitzcpserverdiscordsaysis-a-nurseappspotatlassian-isolated-3premotewdfrom-mtwixstudiocode0emm180rmyactivedirectoryawsappsmytuleapdnsabrpolyspaceqbuserrenderbuiltwithdarkboutirgotdnsabrdnsdopaascanva-hosted-embedawsglobalacceleratorhomesecuritypcmyiphostditchyouripclever-clouddyndns-ipon-aptibleis-a-musiciansecuritytacticsappspaceusercontenthomeunixstrapiappsame-previewcf-ipfsmycloudnaselasticbeanstalkis-certifieddontexistkasserverik-serverdrive-platformatlassian-3pfirebaseappherokuappawsapprunnerbarsycenteris-a-cubicle-slaveservehttpmyshopifyis-a-guruquicksytessiiitesorsitesmagicpatternsappis-a-cpameteorappfrom-wiis-a-rockstarbumbleshrimpdattolocalreadthedocs-hostedfrom-rifamilydsdyndns-picsplesknsbplaceddnsaliasdynaliasdyndns-remotedoomdnsip-ddnsblogdnsis-a-doctorroutingthecloudamazoncognitobarsyonlinedsmynasddnsgurucloudflare-ipfsdeus-canvasfrom-idsmushcdnpagespeedmobilizerdyndns-at-homeunusualpersonhosted-by-previderis-a-republicandyn-o-saurstreamlitappworkisboringonthewificprapidqualifioappis-uberleetis-slickgetmyipwpdevcloudtypeformdyndns-at-workgentlentapismynascloudw-corp-staticblitzfrom-ingeekgalaxyservebeerfrom-mdonrenderspace-to-rentaivencloudappspacehostedonfabricawafaicloudcodespotblogspotatlassian-3p-us-gov-modfrom-ndfrom-msis-a-techieis-a-studentcustomer-ociis-a-photographerdurumisfrom-ksmassivegriddyndns-wikiis-an-entertaineris-a-hard-workermysecuritycamerafrom-mnrackmazedyndns-blogis-a-bulls-fanwritesthisblogfreemyipsimple-urlfrom-sdreservdauthgear-stagingest-mon-blogueuris-into-gamesrice-labsxtooldevicesakurawebis-an-anarchistoraclecloudappsdyndns-worksells-for-urhcloudfrom-dcfastvps-serverwpmucdnis-a-geekscrysecfrom-txis-into-cartoonsmodelscapetrycloudflarelocaltonetstreak-linkbalena-devicesfrom-njforgeblocksfreebox-oswebadorsitefrom-ncdoesntexisthobby-sitestreaklinkshomesecuritymacownprovidertuleap-partnersdattorelaywphostedmailalpha-myqnapcloudservequakeis-a-socialistservehalflifepivohostingdynuhostingquipelementsw-staticblitzdyndns-webfrom-deproject-studyaliases121is-not-certifiedhercules-devis-a-financialadvisorservepicsis-a-greenloseyouripfrom-ilwithyoutubemwcloudnonprodwiredbladehostingdnsdojofrom-tnpixolinomyqnapcloudis-an-artisthostedpiis-a-landscaperauiusercontentoaiusercontenton-forgeis-a-conservativedreamhostersnet-freaksapps-1and1is-goneencoreapifastly-edgefrom-nesalesforcefrom-scdeployagentoraclegovcloudappsfrom-alis-a-lawyercechirevultrobjectsstufftoreadisa-geekddnsgeeklovableprojecttry-snowplowfrom-moblogsyteis-a-bookkeepernogmyforumravendbmyboxdeelementoredsaacficogoorinforgcomgobnatneteduidstoreorgcomnetintedudevnomepublorgcomneteduathgovtestscalculatorspaynowinfoquizzesresearchedcloudnsfunnelsassessmentsjscaleforcetmacltdorgmilcompronetgovbizpresseklogesrsccloudcustomfltusrcloude4corealmgovmunicontentproxy9metacentrumdyndyndyndnsdynpagespages-researchitionoccustomercomymyspreadshopipv64diskussionsbereich4limacomrub2ixfirewall-gatewayddnssspdnsbarsykeymachinesquare7myhome-serverspeedpartnercommunity-proschuldockxenonconnectgünstigliefernbwcloud-os-instancedyndnssecmy-routerxn--gnstigliefern-wobin-butterl-o-g-i-nisteingeekin-dslin-berlinin-brbfuettertdasnetzleitungsenin-vpnlcube-serverdyn-ip24logoipdyn-berlinruhr-uni-bochum12hpgoipsrvdnsfruskygit-repossvn-reposinternet-dnsgünstigbestellenhome-webserverxn--gnstigbestellen-zvbbplacedheimdnscosidnswebspaceconfiglima-citydyndns1istmeinvirtualuserschulplattformmy-gatewayddnsseclebtimnetztest-iservmein-iservvirtual-userhome64iservschuletaifun-dnstraeumtgeradeschulserverdynamisches-dns123webseitednshomehs-heilbronndnsupdaterbssgraphicdwadpdwdaepeweaawapaafpfwfabwbpbacwcpcciwebuserapiobjectsidsiskospockkimodorikerbonesteamsparisjanewaypicardglobaltarpitreedpikekiraworfsulukirkarchertuckerhackercanarywesleystagingprereleaset3r2lpbravepanelngrokiservstglclcrmerpflypagesbarsyvivenushoplocalcertlocalplayerbearbloggatewaydeno-stagingis-not-ais-a-goodbotdashvercelmocha-sandboxplatter-appreplitgithubpreviewworkersinbrowserevervaultdetais-ahrsndenoxmitmodxmyaddrstorageapipayloadgrebedocruncontainersstgstagelclstageloginlineis-a-fullstackleapcellngrok-freeis-coolstoragewebharemediatechlibp2pdiscourseimaginecomyspreadshopstoreregbiz123hjemmesidefirmcoorgcomnetedugovsldorgmilcomwebgobartnetedugovtmorgpolcomsocartnetedugovassoagrondiscoodontk12medcuegyecpaabgengorgmilgalsaltulcomadmesmgobpubdocmonfindgnriouioproartlatvetnetfotedulojgovntrturibrbarxxxofficialbasechefprofmktgpsictechinfoarqtcontdentrrpppsiqgit-pagesritmedfieorgcomlibprieduaipgovriikmeactvsportorgmilcomscieunnetedugovnameinfopintouchtawktotawkmyspreadshoporgcomnomgobedu123miwebcomputeorgcomnetedugovbiznameinfocognito-idpeusc-de-east-1onjelasticnxaspdnsbarsydirectwpdeuxfleurstransurldogadoprvwcloudnsamazonwebservicesdnshomeuserpartycokoobinmkmstorjfidemopaasdymyspreadshopalandkapsiikixn--hkkinen-5wacloudplatformdatacenterhäkkinen123kotisivuidacorgmilcompronetedugovbiznameinforadioorgcomneteduuserexperts-comptablestmmyspreadshopgretaprdcomnomynhccifbxoshuissier-justicenotairesaeroportfreeboxoson-webavocatassoportgouvkdnschirurgiens-dentistes-en-franceavouesfbx-os123sitewebveterinairechirurgiens-dentistespharmacienchambagrimedecinfreebox-osdediboxgoupilemszicpyicpvicppleysheezypagesedugovcnpyorgcomcybllcpvtnetedugovtnxonlineschooldaemond6atcopanelorgnetplybotdashstackitkaasorgmilcomnetedugovbizmodltdorgcomedugovcoorgcomneteduappwriteacorgcomnetedugovcloudtranslateusercontentorgcomnetedumobiassoorgcomnetedugovbarsysimplesitediscourseindorgmilcomgobneteduorgcomwebnetedugovguaminfonxhra教育敎育網絡网絡组織組織网络網络组织組织公司政府個人个人箇人ltdorgcomincneteduidvgovxn--uc0ay4axn--55qx5dxn--mk0axixn--io0a7ixn--uc0atvxn--zf0avxxn--lcvr32dxn--od0algxn--wcvs22dxn--gmqw5axn--od0aq3bxn--mxtq1mxn--ciqpnxn--tn0agxn--gmq050iorgmilcomgobneteduiservwp2tempurlmircloudfreesitewpmudevmyfastgadgetcloudaccessjelehalfboltfastvpsemergenteasypanelopencraftizcombrendlynamefromrtpersoadultmedorgpolrelcomproartnetedufirminfoassoshopcoopgouvtmcomediahotelforumvideosportorgsexagrargameslakaseroticaerotikatozsdereklamcasino2000filmsuliinfoboltshopprivnewsszexcityutazasjogaszkonyveloingatlaneacaicogoormyᬩᬮᬶmilwebschnetkopbizzonedesaponpesxn--9tfkymyspreadshopgovmytabittabitorderravpageaccok12idforgnetgovmuniltdplcaccotttvorgcomnetmeca6g5gpgamubacaicniocoukuptverdruscsdelhiindorgmilcomwebnicfingenpronetintedugovresbizbiharbarsyinternetbusinessschooltravelsupabasealumnigujaratfirminfoaeropostbankcoopindevscloudnsno-ipbarsybarrell-of-knowledgebarrel-of-knowledgensupdategroks-thisdnsupdatefor-ourknowsitalldvrcammittwalddynamic-dnsv-infowebhopselfipdyndnshere-for-moreilovecollegemayfirstforumzcloudnsmittwaldservertypo3servergroks-theeusekd1uk0cdndyndnsidrawsainaueuapjpusstagemocksysdevicesclientcustreservdcustdevdisrecprodtestingcobeebyteutwenteboxfusebravepstmndedynngrokorgmilcomnomhzcnetedugovqcxqzzbarsythingdustmo-siemensrb-hostingprotonetfh-muenstergitbookbluebitecloudbeesusercontentnodeartkiloappsforgerockdarklangresinstagingapigeebubbleb-datascryptedhypernodedappnodepantheonsitegitlabgithubkeeneticvirtualservercleverappshostyhostingon-rioedugitticketstelebiton-acornwixstudioon-k3sicp0icp12038jeleqotobigvlairbubbleappsmyaddrstolosmyrdbxwebflowdrive-platformbeagleboardhasura-applolipopdefinimavaporcloudmusicianwebflowtestazurecontainerresindevicereadthedocsloginlineeditorxmoonscalesandcatsbasicserverwebthingsbrowsersafetymarkbeebyteappbitbucketidaccovistablogorgschnetgovxn--mgba3a4f16axn--mgba3a4fraarvanedgeايرانایرانjclaspeziapdudcefegelemeperetevebacanatavaparasabgagfgogrgpgalclblimfmrmcbmbvbfclcmcvcrcpcchlimifibicivipirisimncnbnanenrnpntnnolomobocoaogorosopotoptvtatctbtmtltotpulunutpspapaqsvpvvvtvavvrtrsrprgrfrcrbrarorkrvstsssbscsmsispzczbzbozen-suedtirolmyspreadshopxn--bulsan-sdtirol-nsbxn--valledaoste-ebbtrentinoaltoadigetrentin-sued-tirolxn--forlcesena-c8axn--forl-cesena-fcbxn--bozen-sdtirol-2obtriestetrentinsuedtiroltrentino-s-tirollecceudineaostesienaparmaluccapaviagenoapaduaaostamonzaabruzzoternirietiturinmilanbozenlaziofermoleccocuneonuoropratola-speziavdataaligfvgpugmolcalcamlomumbsicpmnvenvaoedugovabrsarmaremrbastoslazibxosfirenzetrentinosüdtirolval-d-aostavalle-aostamessinacremonaravennatoscanatrentin-suedtirolbolognacalabriaurbinopesarofriuli-v-giuliaogliastraxn--valle-aoste-ebblaquilaandriatranibarlettasyncloudtrentinosudtirolxn--valle-d-aoste-ehbaostavalleyvalled-aostatrentino-alto-adigevallee-d-aostexn--balsan-sdtirol-nsbpistoiasicilialucaniacataniaiserniaperugiabresciaveneziagorizialiguriaimperiabulsan-suedtirolbalsan-suedtirolbarlettatraniandriaxn--trentino-sdtirol-szbforlì-cesenatuscanyvallée-d-aostemantovavallée-aostecasertapiemontevalleaostaval-daostafriulivgiuliatrevisoforli-cesenavalléedaosteferrarapescaravald-aostatrentino-altoadigefriuli-vegiuliavallee-aostecarboniaiglesiastarantomediocampidanovalleedaostetrentinosud-tirolcampobassotrentinsüd-tiroltrentinosüd-tirolmonzabrianzatrentino-südtirolxn--trentino-sd-tirol-c3bpotenzacosenzavicenzaemiliaromagnavenicefrosinonemarchepordenonetrentinosued-tirolvaresemolisevalléeaostefriuli-veneziagiuliabasilicatalatinaanconasavonaveronamodenaaquilabiellabolzano-altoadigepugliafoggiaumbriatrentino-stirolgenovapadovamateranovararagusapiacenzatrentinostirolvalleeaostetempio-olbiatrentinsudtirolmassa-carrarafriuliveneziagiuliatrentinosuedtirolandria-barletta-tranitrapanixn--cesenaforl-i8amaceratacaltanissettaascoli-picenobrindisicarraramassacagliaririmininapolivibo-valentiachietibulsan-sudtirolbalsan-sudtiroltrentino-a-adigebulsanbalsaniglesiascarboniamilanotorinoteramodell-ogliastraarezzotrentinoalto-adigerovigotrentovenetoiglesias-carboniatrentino-sud-tirolaltoadigereggio-emiliareggio-calabriasardegnatranibarlettaandriapiedmontxn--sdtirol-n2amedio-campidanotrentino-süd-tirolfriuli-vgiuliafriuli-ve-giuliaromeennaromapisa32-b16-b64-blodiastibarineencomonaplesforlicesenailiadboxosalessandriasicilytrani-barletta-andriaxn--trentin-sdtirol-7vbpesarourbinotrentinsued-tirolcesena-forliforlìcesenaemilia-romagnamonzaebrianzaxn--trentinsdtirol-nsbtrentinos-tiroltrentinsüdtirolvalledaostaolbia-tempiocampidanomediovibovalentiasassarivalle-daostalombardyfriulivegiuliareggioemiliamonzaedellabrianzaalto-adigevercellitrentin-sudtiroltraniandriabarlettatrentino-sudtirolascolipicenobozen-südtirolfriulive-giuliaflorencevaldaostaxn--cesena-forl-mcbcarbonia-iglesiasaosta-valleycarrara-massadellogliastratrentinoa-adigexn--valleaoste-e7apesaro-urbinoxn--trentinosdtirol-7vbxn--trentin-sd-tirol-rzbxn--trentinsd-tirol-6vbtrani-andria-barlettatrentin-süd-tirolxn--trentinosd-tirol-rzbgrossetomonza-e-della-brianzasüdtirolreggiocalabriatrentinoaadigetrentin-südtirolfriuliv-giuliaverbaniacampaniatrentino-aadigefriulivenezia-giuliasardiniaandriabarlettatranibarletta-trani-andriacatanzarooristanourbino-pesarocesena-forlìvalle-d-aostacampidano-medio123homepagesiracusatempioolbiasuedtirollombardiaavellinocesenaforlìtrentinofriuli-venezia-giuliabozen-sudtirolandria-trani-barlettabulsan-südtirolbalsan-südtirolmonza-brianzabolzanotrentino-sued-tirolbellunosalernolivornocrotonesondriodnshometrentinsud-tirolmassacarraratrentin-sud-tiroltrentino-suedtirolviterbobergamocesenaforliolbiatempiopalermobeneventoagrigentoofcoorgnetfmaitvphdengorgmilcomschnetedugovperagrikanieasukehandachitatokaiaisaikonanoharuamaobuhigashiuraowariasahiinuyamatobishimaiwakurashitarainazawatoyonegamagorimihamatoyotataharakariyayatomioguchikomakimiyoshinishiotokonamekiyosuchiryutoyohashiokazakiisshikikasugaikotakiratoeianjotogofusosetohazutsushimashinshirotakahamanisshinshikatsuhekinantoyokawaichinomiyatoyoakeodateogataakitaikawakyowahonjoogayurihonjonoshirokamiokakatagamimitanegojomeyokotekosakadaisenkazunonikahohonjyomoriyoshimisatohappoukamikoanihachirogatahigashinarusesembokufujisatokitaakitaitayanagiowanitakkomutsutsurutahirosakigonoheoirasetowadamisawanohejiaomorishingohiranairokunohehashikamitsugarushichinohehachinohenakadomarisannohekuroishisakaeisumiasahiotakiinzaiabikomatsudoyachiyomutsuzawakujukuriomigawakashiwatoganemihamanaritasakuranagaramobarahanamigawachoshishiroichoseikozakishisuikatorimidorichonankyonanfuttsuonjukufunabashinagareyamanodasosatakochuotohnoshourayasukimitsuyokaichibayotsukaidosodegauratateyamakamagayayokoshibahikariyachimatakatsuuratomisatokisarazukamogawaichikawanarashinoichinomiyashimofusaminamibososhirakoichiharaoamishirasatoikatahonaiainansaijoseiyoiyoozuuwajimaniihamanamikatamasakiuchikokihokutobetoonshikokuchuomatsuyamaimabarikamijimakumakogenyawatahamamatsunosabaeikedaobamasakaifukuiohionotsurugamihamawakasaminamiechizeneiheijikatsuyamatakahamaechizensoedaukihaomutaokawanishiogoribuzenonojosueumiokiotochikugosasagurisaigawamizumakishinyoshitomikurumekurateyamadakasuganakamamiyamanogatatakatahakataiizukakawaratagawakasuyaashiyainatsukimunakataminamitsuikishonaikurogifukuchikeisenhigashimiyakoshinguyukuhashiokagakiyamekogaongausuikahotohochuotoyotsumiyawakadazaifuhisayamatachiaraiyanagawanakagawahirokawachikujochikushinochikuhochikuzennamieotamaokumashowateneiiwakikoorinangoononishigoshimogoomotegomishimafukushimaasakawakagamiishishirakawaiitatefutabahiratayugawahanawakitakatakawamatakunimiyabukibandaihigashihironoyamatomiharuyamatsuriaizubangedatesomaaizuwakamatsuyanaizuaizumisatonishiaizuizumizakikitashiobarataishinkaneyamakoriyamainawashirotanagurafurudonosamegawasukagawaishikawatamakawaikedaogakitaruiginanenahashimahichisonakatsugawaibigawashirakawamizunamiminokamomitakekawauesekigaharatomikasakahogikitagatayamagatatajimianpachimotosuyaotsukakamigaharahidakanisekitokigujominogodoyorogifukasamatsutakayamawanouchihigashishirakawakasaharashimonitatsumagoichiyodakannakanrashowameiwakiryuotaoratomiokafujiokaitakuranaganoharahigashiagatsumatakasakishibukawaminakamikatashinatsukiyonokawabanumataannakaoizumimidorishintoisesakiuenoyoshiokakusatsutakayamanakanojonanmokutamamuratatebayashimaebashiotakekaitadaiwahongofuchukuietajimashobaramiharahatsukaichihigashihiroshimamiyoshikumanokurenakasakaseraseranishiasaminamifukuyamashinichionomichiosakikamijimajinsekikogentakeharaotobenanaeikedatohmaozoraobiraabirakyowaeniwataikibibaisharirebunerimohiroooketootarupippunishiokoppechitosefurubirahakodateshiranukakitahiroshimakushiroobihironanporoiwamizawaniikappukunneppufukushimanakasatsunaitoyourakuromatsunaiakabirakamisunagawashibechaurakawakamifuranonakatombetsuasahikawashimokawakayabeokoppebiratoriabashirisaromaatsumanumatahidakabifukamukawamikasahorokanaitoyotomisarufutsuhigashikawaishikarikitamiyoichiesashiiwanaitomariminamifuranoakkeshifuranotoyakoyakumootoineppushikaoishiraoinemuronayorohaboroashorobihororishirifujiutashinaihokutotakasuebetsuurausuassabukikonaishimamakinaiedatetoyabieinikiesanuryuoumuteshikagarikubetsuashibetsukimobetsuaibetsutobetsusobetsuembetsushimizuchippubetsurishirihokuryuhoronobeshintokutsubetsushibetsuhonbetsumombetsutsukigatakuriyamakoshimizushiriuchikutchanmurorannoboribetsukamishihorowassamushinshinotsukembuchiwakkanaikamoenaikiyosatotakinoueshikabesunagawafukagawanakagawatakikawakamikawahigashikagurahamatonbetsumatsumaemoseushirankoshishakotanimakanemashikeotofuketomakomaisandatambaitamiawajikasaiasagoshisoonoakoyashirotoyookaminamiawajiinagawafukusakitakasagokamigorikasugaharimayokawaashiyahimejiakashitaishiaogakisannantakinosumototakarazukanishinomiyashingugoshikinishiwakiyokatakaaioimikisayoyabukawanishiamagasakisasayamashinonsenkakogawaichikawakamikawatatsunotsukubaiwamaogawaasahisakaitokaioaraiitakobandodaigosuifuinaamikasumigaurakashimaomitamayachiyoshimodatetomobetoridehitachinakainashikisakuragawakasamayawaramoriyahitachiomiyanamegatayamagatahitachikamisuushikutakahagiibarakitonekoganakasowayukimihojosomitoryugasakishimotsumafujishirotsuchiurachikuseihitachiotashirosatotamatsukuriuchiharashikahakuinanaotsubatawajimakahokukawakitatsurugikaganominotosuzuuchinadakomatsuanamizunakanotohakusannonoichikanazawaiwateshiwafudaikawaimoriokaofunatohanamakikuzumakikitakamininohekunoheyamadayahabasumitaichinosekitanohatahiraizumirikuzentakatajobojiotsuchihironomiyakoiwaizumikarumaiichinohenodakujitonooshushizukuishifujisawamizusawakamaishikanegasakimannoutazukotohiraayagawazentsujihigashikagawauchinomikanonjisanukimarugamemitoyotakamatsutadotsunaoshimatonoshoakuneamamiizumihiokiyusuikinkoisasookouyamanakatanekagoshimakanoyaisenkawanabeminamitanemakurazakitarumizunishinoomotematsumotosatsumasendaioimatsudaayaseebinamiurazushinakaiodawaraiseharasagamiharahakoneaikawakaiseiatsugitsukuihadanoyamatoyamakitazamaoisochigasakininomiyayokosukakamakuraminamiashigarafujisawasamukawakiyokawahiratsukayugawaraokawaumajikochitsunootoyoakiinonishitosayasudahidakamiharasakawaniyodogawahigashitsunokagamigeiseisusakiotsukinaharisukumomurototosakamiochitoyotosashimizumotoyamanankokunakamurakitagawayusuharaogunichoyoukiasoutoozugyokutoamakusamifunetakamoriyamagaminamataminamiogunikikuchisumotoyamatonagasumashikiaraokumamotokamiamakusanishiharayatsushiroayabeseikasakyoideineujinakagyokameokakyotangokyotanabekyotambaminamiyamashiroyamashinatanabeyawatawazukaminaminantanmiyazuhigashiyamafukuchiyamakitamukokamojoyokizumaizuruujitawaraoyamazakinagaokakyokumiyamakawagoeinabeshimameiwaasahitaikiudonoisetsukisosakikuwanamihamamiyamasuzukatamakimisuginabarikumanokomonominamiisewataraitobakiwatakikihotadomatsusakayokkaichikameyamaureshinoishinomakishichikashukuohirataiwaosakizaohigashimatsushimashikamaiwanumashibataogawaraonagawakawasakiseminemarumoriminamisanrikukakudamuratawakuyatomiyanatoriwataritagajomisatotomekamirifushiroishimatsushimayamamotoshiogamafurukawahyugaebinotsunosaitoayakushimanobeokakitauramiyazakitakazakigokaseshiibamimatashintomikunitomikitakatakobayashikawaminamitakaharukijotakanabemiyakonojonishimeranichinankitagawakadogawamorotsukakisofukushimaminamimakisakaeobuseikedaogawamiasaokayaasahiotakiotarichinoinaomichikumakomaganechikuhokukaruizawayasuokaooshikaikusakaminamiaikitogakushimatsukawakawakamitateshinatakamorikitaaikishiojirimiyadahakubaiizunaiijimaiiyamamiyotasuzakayasakatoguraookuwanagawaminowahirayayamagataminamiminowafujimiomachisakakitakaginaganonakanosakuhokomoronagisoshinanomachiwadauedaiidaharasuwatomiachiaokianankisosakunozawaonsenagematsutakayamashimosuwamatsumotoyamanouchinakagawamochizukiazuminotatsunoobamaomuraseihiunzenosetofutsuikichijiwanagasakiisahayahasamisaikaikawatanasasebohiradokuchinotsugototogitsutsushimashimabarashinkamigotomatsuurayamazoekashibaikomakawaitenrioyodosangokoryoudaojiikarugayamatokoriyamatenkawakatsuragikurotakikawakamimiyakemitsuetakatorikamikitayamayamatotakadahegurishinjokanmakisakuraitawaramotogoseoudanarasoniandokawanishishimoichihigashiyoshinokashiharashimokitayamanosegawayoshinomintsivorytopazsakuragehirnsumomoaseinetopalmail-boxmokurenyoitamuikaojiyagosensanjoaganomyokoseiroagaomishibataniigatanagaokamurakamiuonumayuzawakariwatagamitainaitsunanminamiuonumatochioyahikojoetsuseiroukamosadoizumozakitokamachiitoigawasekikawakashiwazakitsubamemitsukekokonoesaikiusukibeppuusahimeshimakunisakihasamataketatsukumihitaoitahijikusuyufukujukamitsuebungoonobungotakadaibaraniimibizentsuyamaokayamakasaokahayashimayakagemaniwaakaiwamisakishinjotamanotakahashikibichuowakesojanagishookumenannishiawakurakurashikiasakuchisetouchikagaminosatoshotomigusukunakagusukuyaeseizenaurumaiheyaaguniogiminanjokinminamidaitokitanakagusukuyonaguniokinawaishigakikunigamiurasoekadenataramahiraraginozataketomishimojizamamitonakiitomanhigashimotobuyonabarugushikamionnanahanagohaebarukumejimakitadaitonakijinnishiharayomitanginowantokashikiishikawaikedasuitaminohizuminishisakaikananabenodaitoosakasayamayaokishiwadatadaokakaizukatondabayashichihayaakasakakumatorikadomasayamahigashiosakashijonawatehirakatataishimisakitajirihannansennankatanotoyonominatosettsuhigashiyodogawaibarakinosekitachuohigashisumiyoshifujiiderakashiwaraizumiotsutoyonakamatsubaramoriguchiizumisanoshimamototakatsukineyagawahabikinotakaishikawachinaganoyoshinogarikamiminearitaouchiimarihizenogikashimaariakekiyamafukudomikitagatakitahataomachigenkaikanzakinishiaritakyuragisagataratosutakushiroishikaratsuhamatamakouhokukawagoeyoshidasatteogoseirumaasakaurawaogawaniizaomiyayoriiotakishikihonjooganohannohanyuinasaitamaokegawaarakawayoshikawayokozehasudasayamahidakafukayachichibuiwatsukiryokamiyoshimikamiizumifujimiwarabiranzanmiyoshiminanoyashiosakadosugitomisatohigashichichibutodasokakukiyonokazoshiraokakasukabekounosukawajimatsurugashimamiyashirokitamotohatoyamamoroyamahatogayakumagayakawaguchinagatorokamisatomatsubushinamegawatokigawakamikawafujiminohigashimatsuyamakoshigayatokorozawas3isk01isk02ryuohkoseikonanaishorittotakashimamaibarahikonetorahimenishiazaikokagamokotoyasuotsukusatsunagahamamoriyamatoyosatotakatsukinotogawaomihachimanhigashiomiakagiunnanizumogotsuamayatsukakakinokimatsuehamadamasudahikawahikimiokuizumoyasugiyakumomisatotamayuohdahigashiizumookinoshimanishinoshimatsuwanoshimaneshimadafujiedayoshidashimodagotembaiwataatamikosaiyaizuitoizumishimahaibaramakinoharaomaezakikawanehonkannamisusonohigashiizufukuroinumazukawazufujiaraishizuokahamamatsushimizuizunokunimatsuzakimorimachiminamiizunishiizukikugawakakegawafujikawafujinomiyaujiietsugaoyamayaitaohiranikkoashikagakuroisokanumasakurashioyakarasuyamamotegiichikaikaminokawatochigihagamokanogisanobatonasumibunasushiobaranishikatautsunomiyaiwafunemashikoshimotsukeohtawaratakanezawaitanokomatsushimatokushimaichibaminamiaizumiwajikikainanmiyoshinarutomimamugiananmatsushigesanagochishishikuinakagawamachidachiyodakomaefussainagitaitochofufuchuomeotahigashiyamatotoshimaokutamaaogashimakodairaedogawaarakawahachiojishinagawatachikawashibuyasuginamihinodekiyosesumidaoshimanerimamitakahamuraadachinakanomizuhobunkyomegurominatokoganeihigashikurumekokubunjihigashimurayamamusashimurayamatamakitahinochuokotokatsushikakouzushimaogasawaraakishimakunitachishinjukusetagayamusashinohachijoitabashiakirunohinoharachizunanbukotouramisasawakasayonagokogehinoyazutottorinichinansakaiminatokawaharaoyabetairainamiasahinantoimizufuchutakaokakurobeyamadajohanatoyamatonaminyuzenfunahashinakaniikawanamerikawaunazukitogahimiuozufukumitsutateyamakamiichiiwadearidayuasainamitaijikatsuragiaridagawatanabemihamahidakakainankiminomisatoshingushirahamakamitondayurakozakoyagobokitayamawakayamakudoyamahashimotokushimotokozagawahirogawakinokawanachikatsuurarsuseroeoishidasagaeoguniasahinagaitendonanyoobanazawanishikawasakataohkuratozawamikawamamurogawayamagatafunagatatakahatashonaishinjokahokuiideyuzakawanishitsuruokakaminoyamayamanobeshiratakamurayamanakayamakaneyamahigashineyonezawasakegawamitouubeyuuabushimonosekitabuseoshimatoyotaiwakunihikarishunannagatohagihofukudamatsutokuyamashowadoshitsurunanbukoshukaiminami-alpsnirasakikosugeotsukioshinohokutominobuyamanashifuefukichuokofuichikawamisatoyamanakakonakamichitabayamanishikatsuranarusawafujikawahayakawafujiyoshidafujikawaguchikouenohara長野京都岐阜大阪三重群馬千葉滋賀佐賀奈良adednelgaccogogror秋田愛知高知埼玉沖縄栃木熊本岩手青森山梨新潟島根鳥取長崎香川宮城石川大分宮崎茨城山口兵庫山形徳島広島福島福岡岡山富山静岡愛媛福井東京xn--4it168dhatenadiaryxn--vgu402ckawaiishophatenablogcocottenamaste北海道penneehimeiwateversestabachibashigagonnagunmapermahaccaakitaosakauh-ohblushkochiaichifukuikuroncapooitigohyogotokyokyotopunyuthickcheap0t00g00j0mie2-ddaapyawjg0amfemsubxiiboomoobutchueekpgwrgrherskrboyrdyupperunderflierchipsmydnsheavyangryhippygirlyrulez神奈川鹿児島和歌山bambinaxn--nit225kokayamasaitamaxn--k7yn95exn--1lqs03nsapporoparasitelolipopmcxn--efvn9sniigatafukuokatokushimafukushimahiroshimakagoshimafakefurokinawaxn--8pvr4ucoolblogxn--0trq7p7nnkawasakinagasakimiyazakichilloutxn--8ltr62kxn--klty5xpeeweezombiecutegirlxn--rny31hxn--uuwu58axn--ntso0iqx3axn--djrs72d6uytoyamanikitanyantakagawamimozanagoyaboyfriendxn--2m4a15egreaterchowderegoismyamagatafashionstorexn--elqq16hxn--pssu33lsendaimiyagixn--rht27zpecoriaomorisaloonwatsonvivianxn--djty4knobushipigboatnaganopinokoxn--f6qx53asadistvelvetsecretxn--5js045dchicappayamanashiibarakidigickgirlfriendxn--1lqs71dmongolianxn--c3s14mxn--qqqt11mtochigixn--5rtq34kparallelo0o0mondkobesagabonadecaoitanarafoolkilldecimainhiholomosblokilociaoundopupugifutankcrapflopnooroopsmodsholyjeezstripperpepperbittershizuokaxn--rht3dkitakyushureadymadeicurusversusmatrixxn--rht61ehungryfloppygloomycrankyhandcraftedlittlestarxn--klt787dxn--kltx9awhitesnowsunnydaytottorilovepoptheshopbuyshopxn--5rtp49cxn--d5qv7z876cwebaccelxn--kbrq7oxn--4pvxsxn--1ctwolovesickkumamotocatfoodxn--tor131oyokohamawakayamatonkotsuxn--ehqz56nxn--uist22hxn--6btw5axn--kltp7dyamaguchifrenchkisspussycatxn--4it797kxn--uisz3gbabybluexn--zbx025dnetgamersxn--7t0a264ckanagawaxn--6orx2rishikawaxn--ntsq17ghalfmoonschoolbusjellybeanxn--mkru45iusercontentlolitapunkxn--32vp30hsakurastoragehokkaidoshimanecandypopbabymilksupersaleweblikeraindropbackdropwebsozaikikirarahateblodaynightmeneacsccogoormobiinfoaeusxxorgmilcomnetedugovorgcomnetedugovbizinfotmprdorgmilcomnomedugovassnotairespresseassocoopgouvveterinairemedecinpharmaciensorgnetedugovtraorgcomedurepgovmeneperekgacscaiiocogoitoresmshsseoulbusanulsandaeguc01milvkimmvchungnamjeonnamjeonbukeliv-dnsgyeonggijejueliv-cdnincheondaejeongangwongyeongbukgwangjuchungbukgyeongnameliv-apicoeduindorgcomembnetedugovorgmilcomnetedugovjcloudorgcomnetintedugovperbnrinfocooyorgcomnetedugovipfscanvamypepw3sstorachakeeneticjoinmcinbrowserdwebcyonnftstoragemyfritzaemewphlxachotelltdorgcomwebsocschngonetintedugrpgovassnomgacsccoorgnetedugovbizinfo123websiteidorgmilcomasnnetedugovconfidmedorgcomplcschnetedugovaccoorgnetgovpresstmassoirseproxaccosoundcasthoptocraftvp4c66orgnetedugovitsmcdirmyboxbarsyedgestacksynologylogintonohostwebhopdiskstationi234tcp4hoocgroknoipprivmydsddnsdnsforlohmustransipdscloudfilegear-sgbrasiliafilegearframerbarsybarsyonlinecoprdorgmilcomnomedugovinforgcomnetedugovnameacprorgcomartnetedugovpresseinfoassoinstgouvorgnycedugovbarsydscloudjuorgcomnetedugovminisiteaccoororgcomnetgovorgmilcompronetintedugovbizmuseumnameinfoaerocoopaccoorgcomnetintedugovbizcooporgcomgobneteduorgmilcomnetedugovbiznameaccoorgmilneteduadvgovcoorgcomnetaltgovforgotherhiskeeneticispmanagernomassoprod5476132eastasiacentraluswesteuropewestus2eastus2rucdnwest1-usfra1-desandboxjls-sto1jls-sto3jls-sto2aglobalabglobalsslmapprodfreetlsmaplon-1lon-2ny-1fr-1sg-1ny-2paassnwebpaashostingjelasticnordeste-idcsocuserpagescwebfileblobservicebuscoreatlricnjsjelasticwebsitestoragesezagbinruhuukjptsmyspreadshopmynetnameakamaiorigin-stagingfrom-coipv64dynv6cdn77serveblogadobeaemcloudhicamsprytdnsupno-ipownipde5ovhicpfirewall-gatewaysytesmypsxbarsyusgovcloudapimyamazemyradwebakamaihdsaveincloudfastlylbfrom-lasubsc-paysquare7in-the-bandblackbaudcdnhomelinuxoninfernoctfcloudservebbsdns-dynamiccloudfrontakamai-stagingipifonyham-radio-opsenseeringclickrisingcommunity-profrom-nylocalcertgrafana-devedgesuite-stagingcloudflareanycasteating-organicatlassian-devmydattofeste-iplocaltotorprojectknx-serveredgekeycloudflareglobalcloudyclustercasacamserveftpakamaized-stagingakamaiorigindns-cloudmyeffectboomlabotdashbuyshousestwmailhetemlazure-mobilein-dslthruhereredirectmedynuddnsbouncemesupabaseluyanicloudappakamaicloudfunctionsdebiannhlfanpgafanstatic-accessin-vpnmysynologymafeloappudohomeftptrafficmanagersiteleafseidatmemsetcloudflarecloudaccesskeyword-onazure-apiis-a-chefdoes-itgets-itwebhopselfiphomeipkicks-assedgesuitewindowsserver-ontunnelmolemydissentscrapper-sitecloudflarecnuni5srcfggffiobbzabcdenodynuopikddnsvpndnsakadnselastxkinghostvps-hostfastlyhomeunixazureedgeshopselectdontexistmyfritzcloudjiffyalwaysdatasells-itsquaresbroke-itazurefddattolocalat-band-campmeinforumfamilydsazurestaticappsdefinimabplaceddnsaliasdynaliasnow-dnsblogdnsroutingthecloudendofinternetdsmynasakamaiedgemymediapcadobeio-staticakamaiedge-stagingakamaihd-stagingddns-ipprivatizehealthinsurancelive-onkrellianschokokeksmassivegridmysecuritycamerarackmazeserveminecraftfrom-azis-a-geekakamaizedmoonscalecryptonomicoffice-on-theusgovtrafficmanageradobeioruntimeedgekey-stagingreserve-onlinechannelsdvrdnsdojousgovcloudappcdn77-sslapps-1and1podzoneazurewebsitesdynathomescaleforceyandexcloudvusercontentisa-geekcdn-edgescoaemalcesappwriteazimuthtlonarvonoticeablestorecomwebrecnetperotherfirminfoartslgdloncogoiltdorgmilcolcomplcschgenngonetedugovbiznamefirmmobiacincoorgmilcomnomwebgobnetintedubizinfocomyspreadshopdemongovtransurl123websitehosting-clusterkhplaycistrongsnesosvalervålerxn--vler-qoaossandeheroysandeherøybøboheroyherøyxn--hery-iraxn--b-5gavalerbøboxn--b-5gasandesandexn--hery-iraxn--vler-qoavålerhåreålaahavaofsfvfhlolnlalrlhmfmtmahcostntbuåstrmreigersundmyspreadshopgálsáeidsvolltingvollgildeskalflorøvadsøvardøvanylvenxn--bhccavuotna-k7astrandaxn--kvnangen-k0axn--sknland-fxaxn--mosjen-eyarakkestadhyllestadnannestadvevelstadvaapstenordre-landsondre-landsøndre-landtjieltexn--vrggt-xqadsør-aurdalsor-aurdalheradstordmoldefordeførdeseljefedjeryggehemnexn--krehamn-dxasognegranesøgnebrynetjomevallebykletokkegiskedovretjømehobølvoldasaudatolgasømnaviknadønnasomnadonnatranafrananesnaraumasmolatrænafrænalesjasmølaørstaorstahitrafloraaukraloppafrøyarissasnasahalsagalsaromsaraisaráisafroyasnåsagronghobolfjelltydalårdalardalaskimharamkraanghkekråanghkesorumbarumhurumbærumsørummodumsálátbálátfrognbjugnvåganvagangulenskienløtenlotenstrynvefsnxn--merker-kuaskaunsveiobømlobomloskjåkvardoflorovadsosalatbalatsálatklæbuklabuselbubarduulvikskjakklepprisørxn--nttery-byaeflåeidflahofmilgolholsellomskifetvikdepvgsfhsaskerrisorhamarasnesåsnesrørosrorosxn--slat-5namasoynaroyvaroyluroydyroyaskoyradoyandoyrodoymeloyradøyandøyrødøymeløyaskøylurøydyrøymåsøyværøynærøyhoylandethøylandetdivtasvuodnalørenskoglorenskognesoddtangenxn--tjme-hraxn--smla-hraxn--stjrdal-s1aunjargalillehammerunjárgaxn--hamary-fyadavvenjargaxn--bearalvhki-y4a123hjemmesidegjerdrumxn--brnnysund-m8acxn--tnsberg-q1axn--mlatvuopmi-s4axn--snsa-roaxn--skierv-utaxn--brum-voatysfjordkvafjordeidfjordkvæfjordsongdalenmjondalenmjøndalenxn--gls-elackragerogáŋgaviikagangaviikasørreisasorreisasør-varangersor-varangerxn--risr-iraskiervaxn--frna-woaxn--trna-woakvinesdalleksvikleirvikrøyrvikroyrviksvelvikvenneslaevje-og-hornnessandnessjøenmarnardalvindafjordsandefjordenebakksnillfjordullensvangxn--trany-yuabrønnøysundnamsskoganaustevollxn--stjrdalshalsen-sqbnord-aurdalnord-frontrøgstadtrogstadgrimstadflakstadgjerstadxn--sandy-yuaxn--leagaviika-52bnore-og-uvdalvegarsheixn--rlingen-mxaxn--ggaviika-8ya47hvegårsheikarlsoykvitsoymasfjordenhamaroyinderoyosteroydavvenjárgasauheradguovdageaidnuxn--vre-eiker-k8abronnoysiellakkrødsheradkrodsheradkvinnheradbrønnøyxn--mtta-vrjjat-k7afxn--lrenskog-54akvitsøyvárggátkarlsøyosterøyinderøyhamarøybronnoysundxn--aurskog-hland-jnbbahccavuotnabáhccavuotnagiehtavuoatnastor-elvdalmidtre-gauldalxn--gildeskl-g0akarasjokevenassixn--bievt-0qaxn--yer-znalebesbynessebyxn--hbmer-xqamalselvmålselvxn--unjrga-rtamøre-og-romsdalmore-og-romsdalhareidmelandørlandorlandstrandålgårdsolundalgardafjordåfjorddielddanuorrikautokeinoxn--stre-toten-zcbskodjeaejriestangeliernebamblestokkefauskesnåasesnaasekongsvingerlangevagberlevagxn--flor-jrahattfjelldalostre-totenøstre-totenvestfoldxn--mely-iraálaheadjualaheadjunordreisaxn--troms-zuaxn--lgrd-poacporsangerflatangerstavangerleikangerbremangersamnangergieldakarasjohkaxn--rdy-0nabfrostautsirasnoasatromsaxn--sr-aurdal-l8aflekkefjordjølsterjolsteraremarkhedmarknååmesjevuemienaamesjevuemiexn--vard-jrarollagmeråkermerakerorskogørskogxn--bdddj-mrabdákŋoluoktaxn--osyro-wuaaknoluoktatrysilskjervøymandaljondalbindalrindalmeldalsuldalorkdalsigdalalvdallærdalhurdalsirdalverdallerdallardaloppdalåseralaseralhadselkragerødivttasvuotnaoverhallasteinkjerxn--hnefoss-q1askedsmokorsettromsøxn--dyry-iravestre-totenmuseumxn--sandnessjen-ogbrahkkeravjufylkesbiblbájddarbajddarxn--laheadju-7yarennesøyxn--koluokta-7ya57hxn--hgebostad-g3aleirfjordstorfjordbalsfjordbåtsfjordbatsfjordmuosátbievátloabátkárášjohkanøtterøyxn--mjndalen-64anordkappláhppilahppialstahaugsiljanverranrøykenroykenhaldenlyngenbergenhortenhønefosshonefosstroandinbeiarnvarggatosoyroosøyrotromsoidrettmuosatbievatruovatloabatvoagattynsetnessetxn--indery-fyaskánitskanitraholtråholtxn--ystre-slidre-ujbandebusarpsborgbearduxn--karlsy-fyahordalandjorpelandjørpelanddeatnuringsakersør-odalsor-odalxn--slt-elabringerikeaudnedalnittedalnissedalhemsedalslattumsurnadalxn--blt-elabelverumstjørdalnaustdalhjartdalgjøvikfyresdalhasviknarviklarvikgjovikmalvikgamviklenvikporsgrunnstjordalengerdaldrobakdrøbakxn--msy-ula0hvestvagoyxn--vgan-qoaxn--ryken-vuaxn--lten-graxn--stfold-9xaxn--hpmir-xqaxn--lury-iramálatvuopmimalatvuopmitysværkirkenesbirkenesmoskenesbáidárxn--fjord-lraxn--rdal-poabahcavuotnabáhcavuotnaxn--frde-gralindåsbearalvahkixn--hobl-iraráhkkerávjuxn--loabt-0qavågåáltábodøsundlundraderådeetnetimeholeauregrueoddavagavegaranatanaarnasolasulaaltalekafusavangbergkvamåmliamlibokntinnroangranosenoslobodorøstroststatåmotamotivguprivøyeroyerliermossvossxn--nvuotna-hwalusterlunnermarkerhábmerhabmerhvalerfjalerxn--rholt-mratysvarbaidarfitjargaularhápmirhapmirmelhusfosnesøksnesoksnestysneshemnesevenesflesbergeidsbergtonsbergtønsberglindasxn--sndre-land-0cbnamsosxn--srum-graøystre-slidreoystre-slidrevestre-slidretrondheimbalestrandxn--langevg-jxaaustrheimxn--skjk-soavagsoyaveroysandoykarmoyfinnoytranoyvestbytranbysykkylvenxn--hyanger-q1aspjelkavikandasuoloxn--fl-ziaxn--drbak-wuastathellexn--sr-varanger-ggbtelemarkxn--bhcavuotna-s4axn--porsgu-sta26fčáhcesuolocahcesuoloakrehamnåkrehamnsandøykarmøyfinnøytranøyvågsøyaverøynamdalseidxn--lesund-huabadaddjaxn--vegrshei-c0axn--btsfjord-9zagildeskålporsanguxn--trgstad-r1anávuotnanavuotnahammerfestxn--sgne-graxn--brnny-wuacibestadharstadnarviikaevenáššivestnesgjemnessandnesagdenesrennesoyxn--avery-yuaxn--tysvr-vrabearalváhkikongsbergspydebergrandabergxn--andy-iradavvesiidaxn--krdsherad-m8aporsáŋgufredrikstadbjerkreimringeburennebuaurskog-holandnotteroyxn--vgsy-qoa0jxn--rmskog-byaskierváivelandbyglandfrolandaurlandforsandxn--bjddar-ptamidsundålesundalesundfetsundfarsundovre-eikerøvre-eikerakershusxn--moreke-juasørfoldøstfoldostfoldsorfoldhøyangerhoyangerlevangerorkangertanangerxn--vestvgy-ixa6olillesandulsteinxn--rennesy-v1agranvinskjervoyxn--klbu-woalavagisxn--h-2faxn--ryrvik-byakafjordkåfjordseljordfolkebiblxn--gjvik-wuajevnakerxn--kfjord-iuabudejjuxn--kranghke-b0axn--davvenjrga-y4axn--rland-uuaxn--ldingen-q1axn--mlselv-iuaxn--rady-iraxn--linds-prabrumunddalxn--ygarden-p1amo-i-ranaeidskogrømskogromskoghjelmelandxn--finny-yuaxn--sr-odal-q1axn--skjervy-v1aballangenkvanangenkvænangengratangenxn--hmmrfeasta-s4acvossevangensuohkanxn--rde-ulaxn--mli-tlaxn--ksnes-uuanordlandskanlandskånlandsortlandfuoiskuxn--rros-graxn--hcesuolo-7ya35bxn--eveni-0qa01gagaivuotnagáivuotnaxn--seral-lradrammenmodalenmosjoenjan-mayentorskensteigengloppenxn--snes-poamatta-varjjatxn--sr-fron-q1aomasvuotnajessheimbådåddjåxn--krager-gyaxn--kvfjord-nxaxn--asky-iraxn--snase-nraxn--bidr-5nacholtålenxn--vads-jraxn--jlster-byamosjøenxn--rst-0nastavernxn--ostery-fyaxn--oppegrd-ixaxn--sknit-yqaxn--risa-5naoppegårdskiptvetrendalenholtalenxn--mot-tlaxn--lhppi-xqaxn--holtlen-hxaxn--srreisa-q1akopervikxn--muost-0qaxn--bmlo-grahokksundkvalsundegersundxn--karmy-yuaullensakerxn--hylandet-54axn--kvitsy-fyaxn--bod-2nalangevågberlevågkristiansandxn--rsta-frahornindalstjørdalshalsenstjordalshalsensandnessjoenhámmárfeastaxn--lrdal-srasør-fronsor-fronnord-odalkristiansundmátta-várjjatvestvågøynesoddennotoddenbuskerudøygardenoygardensalangenlavangenralingenrælingenlodingenlødingenleaŋgaviikalaakesvuemieleangaviikauenorgexn--srfold-byaaskvollxn--rskog-uuaxn--nry-yla5gxn--vry-yla5ghammarfeastaxn--rhkkervju-01afxn--givuotna-8yakommunekrokstadelvanedre-eikerhagebostadhægebostadxn--berlevg-jxakviteseidxn--s-1faxn--l-1faxn--nmesjevuemie-tcbafuosskomoårekemoarekexn--lt-liacxn--jrpeland-54asvalbardoppegardholmestrandtvedestrandsogndalsokndalarendalsunndalfolldalxn--krjohka-hwab49jlyngdaletnedalnorddalsaltdalgausdalskedsmovaksdalgjesdalstordalxn--frya-hraaarbortedrangedalxn--smna-graaurskog-hølandxn--vg-yiabtjeldsundhaugesundlindesnesxn--mre-og-romsdal-qqbxn--dnna-gradynmerseineshacknetenterprisecloudmineaccomaorimāoriorgmilcriiwigennetschoolhealthkiwigovtgeekxn--mori-qsacloudnsparliamentcomedorgcompronetedugovmuseumwebsitekinservicebarsywebsitebuildereerobookheimdnsleapcelleero-stagetechcrscsslorigingohomecdbedeeeiemesecabgngilnlalplchfisiincnnoroptatitmtltruauhulumkdkukskjplvtrgrfrkrhrusesismycynzcznetinteduassoososcloudstgbetaaezaeuhkusjshatenadiarycdn77hoptozaptois-a-knightmyftpno-ipjpnddnssdpdnsspdnsbarsysweetpepperis-a-bruinsfanis-very-sweetservegameis-a-soxfanhomelinuxcdn77-secureservebbsmisconfusedwebredirectblogsitefreedesktopcouchpotatofriestoolforgeaccesscamis-lostreadmyblogsmall-webfedorapeopleserveftpis-a-celticsfanmywirepotagertwmailin-dslsellsyourhomeread-booksfreeddnscable-modemis-savednflfanufcfanmlbfanstuff-4-saleendoftheinternetin-vpnmy-firewallhomeftpis-localis-a-chefboldlygoingnowherewebhopselfipkicks-assroxatunkcamdvrfedoraprojectgotdnsdvrdnsdyndnspubtlspimientahomeunixdontexistfedorainfracloudwmflabsfspagesbmoattachmentsteckidsfamilydsdnsaliasdynaliasnow-dnscloudnsdoomdnsduckdnsblogdnshomednsroutingthecloudendofinternetdsmynasip-dynamicpoivronhttpbinmyfirewallis-very-evilmysecuritycamerais-a-linux-userwmcloudis-a-geektuxfamilyis-a-candidatedoesntexistis-very-badhobby-sitegame-hostaltervistais-foundis-a-patsfandnsdojohepforgepodzonedynservcollegefanis-very-goodfrom-meis-very-niceisa-geeknerdpolacmedsldingorgcomnomgobabonetedupleskaemhlxmyboxrockyprvcydeuxfleurspdnscodebergheyflowstatichostorgmilcomnomgobneteduorgcomeduiorgmilcomngonetedugovcloudns1337ngrokacorggogfamcomwebgobnetedugokgopgkpgovgosbizpasaugumicsopozpapuwmwsrprusiskwpspkppspkmpspokeoiawsawifoumsdnskokwpmuppuppsppiwwiwoowuzswkzoschrzpisdnwzmiuwwitdpssewsseumigugimoirmpinbwinbwiihupporzgwgriwupowwskrwioswuozstarostwokonsulattmpccopruszkowmyspreadshopostrodakartuzyopolegminamediaustkazgorajgoraolawailawalomzawloclradombytomjaworznotargilubinkoninzagantorunkutnokepnonakloczestsopotsanokturekplockslasksklepzarowlukowmedaidgdaorgmilrelcomnomatmgsmartneteduelkgovwawsossexbiztgorysejnytychypomorzeboleslawiechomesklepsdscloudunicloudzakopanelegnicarawa-mazbydgoszczswidnikkrasnikwloclawekbielawamragowograjeworealestatebeskidykaszubymalopolskaprzeworskswiebodzinlecznadfirmaszkolawarmiagdyniamiastakazimierz-dolnymalborkswidnicadlugolekaostrolekapodlasieelblagtravelsimplesitezachpomormielecszczecinnieruchomosciwalbrzychlezajsklublinbedzinpoznanwielunmielnooleckostarachowicedkontopowiatwroclawrybniksuwalkileborkslupskgdanskostrowwlkptarnobrzegtourismwegrowkrakowglogowyou2pilanysamailwrocinfoagroautobeepshopprivlapypiszlodzcfolksecommerce-shopmazurypulawyskoczowrzeszowpomorskiezgierzkaliszolkuszlowiczostrowiecsosnowiecmazowszewodzislawbialowiezazgorzeleckatowicepabianicejelenia-gorawolominkarpaczsieradznowarudaczeladzkonskowolaskierniewiceswinoujscieturystykabieszczadycieszynketrzynolsztynbialystokbabia-goraprochowicewarszawastalowa-wolapolkowicegorlicegliwiceponiatowalimanowalubartowaugustowkobierzyceopocznognieznoszczytnokolobrzegshoparenapodhalebielskoklodzkostargardatwithplayitownnamecoorgnetedugovacorgcomproestnetedugovbiznameislaprofinforechtngrokmedaaaacacpaenglawjurbarbarsykeeneticavocatacctcloudnsorgcomsecplonetedugov123paginaweborgcomnetintedugovnomepublidkinbarsygovx443cloudnsorgmilcomnetedugovcooporgmilcomschnetedugovnamecomcannetlibassoaemclantmcontstoreorgcomnomrecwwwbarsyfirminfoshopartsstackitmyddnswebspacelima-cityacincooxorgedugovbarsybrendlyhbvpsvpsspectrumlandinghostingacppmordoviamcprecbgorgmilcomspbnetintedumsknovgovbirrasmcdirmytismircloudvladimirnalchikadygeyamarinepyatigorskmyjinobashkiriaeurodirvladikavkazna4ugroznykustanaikalmykiacldmaildagestaniranbuildcanvaliaravalwixdevelopmentappwritemigrationneedleverceldatabasestackitcodereplravendbonporterlovableaccoorgmilnetgovcoopmedorgcompubschnetedugovservicemecomygovorggovtvmedorgcomnetedugovinfoedgfacbmlonihkutwpsryxzbdtmacfhppmyspreadshopbrandpartiorgcomfhvpress123minsidaitcouldbeworlanbibkommunalforbundfhskiopsyskomvuxkomforbnaturbruksgymnloginlineorgcomnetedugovenscaledeuusentbotdaorgmilcomnetgovnowteleporthashbangplatformlovablebarsyshopwarebasehoplixbarsyonlinemsf5gitappgitpagecofigma-govcaffeinefigmacanvasoltstputerbarsysupportchatgptsquareomniweopensocialcpanelnotionnovecorewpsquaredpreviewjelecyonbyensrhtfastvpspieboxconvexjouwwebheyflowplatformshloginlinemadethissourcecraftclouderaorgorgcomartedugouvunivmeorgcomnetedugovsurveysstatichfheiyuxs4allprojectmyfastubervibehostapp-ionosdeployagentmecoorgcomschnetedugovbizcncostoreorgmilcomneteduembaixadaconsuladokiraranohoprincipesaotomeheliohobarsystorebaseshopwaresellfyabkhaziavologdamordoviapenzalenugsochinavoiexnetspbmsknovnorth-kazakhstanashgabadkareliaarmeniageorgiavladimirnalchikivanovobukharaadygeyakhakassiakalugakrasnodarjambylaktyubinsktroitskbryanskobninskkurganazerbaijanpokrovskbashkiriatselinogradvladikavkazmurmansktulatuvamangyshlaktashkentchimkentgroznykaragandatermezarkhangelskkustanaikalmykiabalashoveast-kazakhstankaracoldagestantogliattibarsyredorgcomgobedumirenknightpointaccoorgjelasticdiscoursecleverappsschacmiincogoornetonlineshopcogoorgmilcomwebnicnetintedugovbiznametestcoorgmilcomnomnetedugovorangecloudpersoindorgcomfinnatnetgovensmincomtourismintlinfox0611oyaorgmilcomnetedugovquickconnectvpnplusnettprequalifymeaddrmyaddrntdllwadlnctvavdrk12orgmilpolbeltelcomwebgennetedutskkepgovbbsbiznameinfocoorgmilcompronetedugovbiznameinfobetter-thanworse-thansakurafromdyndnson-the-webmymailerorgmilurlcomneteduidvgovmydnsgameclubebizmeneacsccogotvorhotelmilmobiinfovodteiflgplkmsmsbcckhincndnvncoztltmkckppzpdprvcvkvlvcrkrkscxuzchernovtsyrivneyaltaodesavolynrovnolutskltdinforgcomnetedugovbizvinnicazhitomirternopilpoltavakropyvnytskyizaporizhzhiasevastopolsebastopoluzhgoroduzhhorodkharkovkharkivvinnytsiakhmelnytskyizaporizhzhecrimeaodessazhytomyrnikolaevcherkassydonetskluganskluhanskkirovogradivano-frankivskchernivtsikrymkievkyivlvivsumyzakarpattiamykolaivcherkasychernigovkhersonchernihivdnipropetrovskdnepropetrovskkhmelnitskiyneacsccogoorusorgmilcomedugovvmdhmyspreadshopadimono-ipbarsybytemarkbarsyonlinelayershiftnh-servretrosnubapicampaignservicelugaffinitylotteryweeklylotteryraffleentrygluglugsmeaccoindependent-inquestnimsitecopropymntltdorgplcschnetgovnhsbarsyindependent-commissionindependent-reviewpolicepublic-inquiryindependent-panelconnhospindependent-inquiryroyal-commissionoraclegovcloudappscck12libccphxcclibpvtparochchtrcck12libcceatonk12coglibtecgendstmusann-arborwashtenawcck12glghcck12sealibforksolympiabainbridge-islkeyporthoquiamyarrow-pointcentraliaport-townsendsequimport-ludlowrentonsilverdalebremertonredmondsheltonbellevueport-orchardport-angeleskingstonchehalisaberdeengig-harborseattlepoulsboidmdndsddemenegacalamaiavawapailalflnmdcncscohnhmihiviwiriinmntnmocoutvtctmtgunjokakwvnvprarorasmskstxwynykyazisadninsnngosrvis-bymircloudservernamepointtoenscaledland-4-salefreeddnsstuff-4-saleazure-apinoipcloudnsgolffanheliohostazurewebsitesgvorgmilcomgubneteducoorgcomnetd0egvorgmilcomnetedugovmydnsiacostoree12orgmilcomnomwebgobbibrectecnetintedugovraremprendefirminfoartseducok12orgcomnethidnsidacaiiosonlahanamhanoicamauhueorgcompronetintedugovbizbacninhtayninhhoabinhnamdinhtravinhhaiphongvinhlonghaiduongquangnamquangtrithuathienhuequangninhbacgianghaugiangquangbinhsoctrangbentrethanhphohochiminhdanangkontumhatinhkhanhhoathanhhoahealthgialailaocaiyenbaibackanngheanlonganphuyenphuthocanthodaklakdongnainameinfovinhphucdongthapkiengiangtiengiangquangngailaichaulangsonlamdongdaknonghagiangangiangcaobangbinhduongninhthuanbinhthuanbaclieuthaibinhninhbinhbinhdinhtuyenquanghungyenbaria-vungtauthainguyendienbienbinhphuocschbizputerimagine-proxyorgcomnetedugovcloud66advisormypetsdyndnsxn--8dbq2axn--4dbgdty6cxn--5dbhl8dxn--hebda8bxn--80auxn--d1atxn--c1avgxn--o1acxn--o1achxn--90azhxn--55qx5dxn--uc0atvxn--od0algxn--wcvs22dxn--gmqw5axn--mxtq1mxn--12c1fe0brxn--h3cuzk1dixn--12co0c3b4evaxn--12cfi8ixb8lxn--o3cyx2axn--m3ch0j3axn--j1adpxn--90amcxn--90a1afxn--h1ahnxn--j1ael8bxn--h1alizxn--c1avgxn--j1aefxn--80aaa0cvacxn--41acaffeineexeopentunnelbotdashtelebitorgtmaccoagricorgmilnomwebnicngonetaltedugovlawnisschoolgrondaraccoorgmilcomschnetedugovbizinfoprg1-zeropstritonstackitlimazeropsaccoorgmilgovяспборгкоммскбизмирсамаракрымсочиакодпроргобрупрצהלממשלישובאקדמיהองค์กรธุรกิจรัฐบาลศึกษาทหารเน็ต教育網絡組織公司政府個人닷넷한국澳门新闻澳門联通家電嘉里招聘通販닷컴삼성コムგეбгрфеюadcdbdgdidmdsdtdaebedeeegeiejekemenepereseveyegabacalamanauavapaqasazacfbfafgfnfpfwftfbgcgagggegkgngmgsgpgvgtgugilmlnlalclglplsltlhmimjmkmmmomambmcmdmfmgmzmpmsmtmgbbblbsbecccacnclcmcvctcscmhkhghchbhthphshlinikifigiaibicivisikninhnmncnbngnsnpnvntnjoionomobocoaofodorosotoptstttytatbtetgtithtmtltrusuvuaucueuguhulumunufjdjbjtjsjlkmkhkfkdkcktkukskpkgpmpnpkpjpgqaqmqiqsvtvcvbvmvlvrwpwtwzwbwcwawgwkwmwtrsrprgrfrercrbrarnrmrlrkrirhrwsusrssspsgsesbsaslsmsissxmxaxcxuypysylymykygybycyuztzsznzmzkzdzczbzazελευ世界台灣购物公益点看臺灣网络書籍在线网站手机机构大拿游戏信息台湾谷歌慈善商标香港中国餐厅网址中國商城食品微博政务移动集团公司八卦商店健康网店政府时尚佛山中信娱乐广东企业homedepotengineeringاماراتrepublicankuokgroupversicherungchannelcitadelxn--pgbs0dhxn--b4w605ferdstatebankwebsitexn--mgb9awbf亚马逊淡马锡alibabaxn--ngbc5azdxn--mgbbh1axn--45br5cyltoshibabuildworldcloudtradeguideplacespacedancemoviephoneprimesmilebiblestyleappleazurestoreskypegripexn--l1accdrivelottehorsehouseleasechasereisestadahondaomegaaetnaamicaninjanokiamediadeltavodkaedekaosakapizzaslingemailgmailtirolshelltmallfinallegaltotalhotelamfamforumrehabmusicciticricohcoachwatchboschearthfaithirishmiamiarchidubaiguccipraxiみんなストアセールcanonsalononionnikonepsonkoelngreensevencrownikanoradioaudioweiboglobopromogalloyahoociscorodeovideomangobingotokyovolvolottokyotophotosmartsportquesttrusthyattjetztadultcymrubaidutushuxn--kprw13dubankclickblackmerckgroupsharpcheapnowtvxn--h2brj9cקוםհայоргсрбмонкомбелмкдқазрусукрمصرقطرعربكومdadcfdmedwedredphdthdbidpidkrdmsdltdiceonewmeglemoerwecfageacbanbambaaaammakianraspacpaaxawtfbcgaegongingaigvigorgdogdhlmilrilonlaolloluoljllcalgalnflafltelsrlfrllplkimibmcamcombommomifmabbjcbscbcabnabtabmlbpubabcbbcnecincpncllcstcwtcpwcnyckfhbzhovhmoiskiobisbitcifyituipinvinwinxincbnbcnmanfangdnmenrenkpnmtnyunrunfununobiojioriohbogmofooboooooacoecoceongoproartistottnttbbtcateatlatvetpetbetnethktmitfitintjothotgotdotbotprueduicujnjyouinknhktdkappsapgapmapdnptopgopllpjmpzipvipripesqtrvdtvitvdevmovgovhivnrwlawsewnewbmwwownowhowdvrftrmtrsfrbarcartvscrseusawsupsubssbsadsddsldssasbmsmlsxxxboxfoxgmxtjxsextaxbuyflydiysoyjoyskypaydaygayxyzanzbizwebersenerpokerlameractortatarsolarລາວคอมไทยtourslocusnexuslexusgiftsbeatsboatspartspressglassswissकॉमनेटtiresgivescodeshomesgamestunesshoescardswalesloansvegastoolsdealsautosparisファッションworkssucksrocksxeroxforexfedexpartylillymoneystudyrugbytoraytoday中文网xn--unup4y天主教飞利浦新加坡enterprises我爱你嘉里大酒店christmasxn--fct429kholdingsxn--8y0a063axn--mgbx4cd0ablifestyleabogadoallstatenetbankكاثوليكxn--s9brj9cxn--gk3at1ebestbuycharityxn--55qx5dmicrosoftpropertybasketballhomegoodscorsicajewelrygallerygrocerysurgerycountrybrusselsverisignferreroxn--czr694bhdfcbankcommbanksoftbankپاكستانپاکستانnextdirectالسعوديهالعليانxn--h2brj9c8cxn--80adxhksshikshaxn--mgbai9azgqp6jcuisinellabarclayscatholicxn--kpry57dcompanyxn--xhq521bblackfridayxn--mgba3a3ejtsandvikxn--d1acj3bacademydownloadمليسياxn--j1amhxn--w4r85el8fhu5dnraipirangaathletaxn--fhbeixn--mgbqly7cvafrzuerichxn--c2br7gஇலங்கைcontractorsxn--io0a7igraphicsinsurancetemasekxn--xkc2al3hye2amotorcyclesphotographydirectoryplumbingxn--vhquvclothingtrainingcleaningwilliamhilllightingxn--mgba3a4f16ashoppingcateringeducationokinawapicturesventuresproductionsxn--9et52uwalmartഭാരതംsupportrealestatecapitalonexn--nqv7fs00emaauspostfloristdentistxn--qxamgodaddybradescobargainsmitsubishikerryhotelsxn--9dbq2axn--3pxu8kimmobilienxn--fjq720axn--mgbtx2bholidaymckinseymadridbusinessbuildershelsinkixn--4gbrimмоскваالسعودیةcoffeedegreelacaixapartnersalsaceofficeabbvievoyageorangegeorgeonlinechromemobilekindlegoogleoraclecircleschulesecureinsurexn--mgba7c0bbn0aestatexn--mgbc0a9azcgcruisehangoutxn--vuq861bxn--42c2d9arexrothfirestoneuniversityxn--nnx388alifeinsuranceextraspaceонлайнvermögensberatersoftwarexn--fiqs8sxn--mgbab2bdxn--w4rs40ltiendaभारतम्africatoyotaotsukasakuracameracreditcardnagoyaconsultingnetworkjunipertheatermonsterprogressivepioneerxn--55qw42gracingdatingvotingvikinglivinggivingxn--bck1b9a5dre4cbrotherweatherjoburgفلسطينlplfinancialxn--clchc0ea0b2g2a9gcdfutbolschoolsocialglobaldentalwoodsidechanelairtelmatteltravelrealtorwebcamstreamభారత్unicomalstomxn--nodexn--6frz82gmuseumfurniturexn--rvc1e0am3exn--mix891faccenturexn--11b4c3dismailineustardiscountquebeccomsecclinicservicesxn--y9a3aqxn--c1avgswatchchurchsearchالاردنmarketingcontacthealthmonashshoujisanofitaipeiamericanexpresssuzukiアマゾンクラウドポイントbhartiグーグルxn--mgberp4a5d4armemorialxn--1qqw23alondonmormoninstitutevisionbostonnortoncouponmaisonamazonvirginberlindesigndurbanolayannissananquanxihuanhitachikaufengardenreisenbayerntechnologydatsunxn--90a3aclatinocasinostudiophysioxn--ngbe9e0apharmacytattootaobaoaramcoexpertreportabbottdirectselectimamatfairwindspictettargetmarketintuittravelersinsurancecreditdupontryukyusuppliesxn--tckwebnpparibasschmidtmerckmsdyodobashirestaurantbridgestonecricketxn--fpcrj9c3dbostikbroadwayattorneylefrakemerckxn--fiq228c5hscareersfarmerswinnersflowersxn--wgbh1cguitarsxn--54b7fta0ccxn--p1acfmakeupgalluplandroverxn--kcrx77d1x4agoldpointbauhausxn--mgbayh7gpahiphopplaystationxn--mgba3a4fraxn--eckvdtc9dhyundaixn--gckr3f0fistanbulticketsmarketsflightschintaireviewsxn--3e0b707ewindowsxn--fiqz9sfinancialxn--fzys8d69uvgmابوظبيdiscoverreviewবাংলাxn--5su34j936bgsgmoscowobserverapartmentsдетиارامكوсайтeurovisionxn--i1b6b1a6a2exn--xkc2dl3a5ee0hتونسموقعبارتڀارتشبكةعمانبيتكعراقreadkredbondlandbandfundfoodprodgoldfordtubecafesafelifeggeeieeefreefagepagegugezonewinememenamegamesaleablebikenikelikecarecbreherefiresaveloveliveblueartedatesitevotecaseluxebofamodaltdaasdatiaayogasinavanashiaasiajavabbvatevavivadatazaraarpacasavisasncfprofmaifsurfgolfdvagsongbingpingwangkpmggoogblogpohlfailcooldellcalldeallidlsarlfilmteamroomfarmimdbarabclubhdfcicbchsbcgmbhrichtechfishdishcashminiernikddiaudiwikimobitaxicitikiwidesiqponskinloanakdnwienopenporncerntownimmolimoolloinfonicofidolegosaxozeroaerovivoautovotomotofastbestresthostpostnextlgbtchatseatgiftmeetdietreitmintrentgentspotscotguruitausohumenucyoubanklinkpinkdclktalksilkbookseekworkrsvpaarpjeepshopcoophelpcamppccwshowbeerstarruhrflirweirhaircarsparsjprshausplusnewstipstoysjobskidsfanspicsdocsxboxamexsexynavycitysonyarmyallybabyplaydeliverybuzzgbizlamborghiniphilipsලංකාಭಾರತfitnessexpresslanxesspfizercenterwalterlawyersoccercareerkosherbrokerlockerdealerdoctorauthorxn--mgbqly7c0a67fbcvermögensberatungjaguarxn--pssy2uxn--hxt814eflickrrepairrogersairbusxn--mgbai9a5eva00beventsyachtsxn--t60b56aভাৰতভারতभारतभारोतviajeshermeshughesxn--j1aefसंगठनvillasଭାରତclaimshotelsભારતzapposphotosjuegoscondostatamotorsgratistennisਭਾਰਤtkmaxxtjmaxxschaeffleryandexxn--80aswgrealtysafetybeautyluxuryxn--3ds443gsupplyfamilyxn--o3cw4hhockeysydneyxn--90aenissayalipayenergycomputeragencyxn--rovu88b電訊盈科xn--gecrj9cstatefarmaccountantaquarelleolayangroup香格里拉xn--p1ai组织机构xn--1ck2e1bxn--mgbt3dhdschwarzموريتانياabudhabinowruzkomatsufujitsuhospitalxn--80asehdbxn--mgbtf8flxn--j6w193gxn--yfro4i67oprudentialxn--flw351ecruisescoursesrecipesxn--e1a4cferrarixn--ses554gxn--wgbl6awatchesstaplessinglesxn--mgbcpq6gpa1axn--otu796dpropertiescreditunionxn--mgbah1a3hjkrdstockholmhisamitsuالسعوديةstcgroupdomainsoriginscouponsbloombergclubmedfroganslimitedxn--80aqecdr1aexposedinternationalequipmentbarclaycardxn--q7ce6axn--mgbi4ecexpprotectionassociatesconstructionxn--cck2b3bxn--45q11candroidfoundationישראלxn--mgbca7dzdocliniqueboutiqueengineerxn--qxa6asystemsfirmdalefashionauctionxn--nqv7finfinitirentalsreliancetradingweddingfishinghostinggentingbookingcookingxn--3hcrj9cgraingerxn--czrs0tdemocratsamsungyokohamaxn--h2breg3evexn--nyqy26alundbeckmelbournevacationssolutionsfrontierxn--vermgensberatung-pwbmanagementxn--cg4bkixn--mgb2ddeslincolnhamburgsandvikcoromantblockbusterairforcebarefootxn--4dbrk0ceinvestmentsfeedbackcommunityxn--ngbrxالبحرينdiamondsamsterdamhealthcareredumbrellaxn--mxtq1mxn--2scrj9cagakhanxn--mgbpl2fhкатоликcaravanசிங்கப்பூர்richardlimortgageamericanfamilyxn--fzc2c9e2cscholarshipssaarlandxn--imr513nvlaanderensamsclubgoodyearkitchenஇந்தியாweatherchannelallfinanzxn--kput3iالسعودیۃxn--90aisxn--efvy88hالجزائرxn--mgbaam7a8hexchangejpmorganxn--tiq49xqyjfidelitysecurityxn--mk1bu44cwanggouxn--fiq64bxn--6qq986b3xlxn--mgbbh1a71exn--80ao21amarshallsxn--5tzm5gtravelerspanasoniclatrobeyoutubeaccountantsxn--rhqv96gxn--cckwcxetdanalyticsxn--ygbi2ammxبازاربھارتسوريةorganicfreseniusسورياxn--9krt00axn--qcka1pmcxn--jlq480n2rgdeloittesciencefinancexn--jvr189mxn--30rr7yhomesensehotmailbaseballfootballleclercboehringerxn--q9jyb4cxn--mix082fاليمنهمراهpolitieسودانايرانایرانnetflixyamaxunxn--lgbbat1ad8jcollegestoragecapetowncolognekerrypropertiesxn--mgbgu82axn--ogbpf8flxn--czru2dwhoswhociprianilasallexn--g2xx48cforsalebanamexaudiblexn--vermgensberater-ctbxn--zfr164bericssonvanguardxn--45brj9cindustriestheatremarriottxn--3bst00mcomparexn--mgberp4a5d4a87gcapitaldigitalالمغربbarcelonashangrilaxn--d1alfcalvinkleinwwwcitysapporokawasakinagoyasendaikobekitakyushuyokohamackjp",f9=621,g9=625,A2=vo.length,N2=Ld.length,C2=new Uint32Array(N2),Cd=new Uint32Array(N2),Wf=new Int32Array(A2).fill(-1);for(let e=0,n=0;e<A2;e+=1)for(let i=Bd[e];i<Bd[e+1];i+=1){C2[i]=n;const o=n+Ld[i];let u=5381;for(let h=o-1;h>=n;h-=1)u=u*33^Jf.charCodeAt(h);Cd[i]=u>>>0,Ld[i]===1&&Jf.charCodeAt(n)===42&&(Wf[e]=i),n=o}let Pi=-1,e0=0,t0=0;function Zx(e,n,i,o){if(Ld[e]!==o)return!1;const u=C2[e];for(let h=0;h<o;h+=1)if(Jf.charCodeAt(u+h)!==n.charCodeAt(i+h))return!1;return!0}function Yx(e,n,i,o,u){let h=Bd[e],f=Bd[e+1];for(;h<f;){const b=h+f>>>1,v=Cd[b];if(v<n)h=b+1;else if(v>n)f=b;else{for(let x=b;x>=h&&Cd[x]===n;x-=1)if(Zx(x,i,o,u))return x;for(let x=b+1;x<f&&Cd[x]===n;x+=1)if(Zx(x,i,o,u))return x;return-1}}return-1}function Xx(e,n,i){let o=n,u=e.length,h=5381;Pi=-1;for(let b=e.length-1;b>=0;b-=1){const v=e.charCodeAt(b);if(v===46){const x=b+1;let k=Yx(o,h>>>0,e,x,u-x);if(k===-1&&(k=Wf[o]),k===-1)return Pi!==-1;o=Qx[k],(vo[o]&i)!==0&&(Pi=o,e0=x,t0=u),u=b,h=5381}else h=h*33^v}let f=Yx(o,h>>>0,e,0,u);return f===-1&&(f=Wf[o]),f!==-1&&(o=Qx[f],(vo[o]&i)!==0&&(Pi=o,e0=0,t0=u)),Pi!==-1}function _2(e,n,i){if(h9(e,n,i))return;const o=(n.allowPrivateDomains?2:0)|(n.allowIcannDomains?1:0);if(Xx(e,g9,o)){i.isIcann=(vo[Pi]&1)!==0,i.isPrivate=(vo[Pi]&2)!==0,i.publicSuffix=e.slice(t0+1);return}if(Xx(e,f9,o)){i.isIcann=(vo[Pi]&1)!==0,i.isPrivate=(vo[Pi]&2)!==0,i.publicSuffix=e.slice(e0);return}i.isIcann=!1,i.isPrivate=!1;const u=e.lastIndexOf(".");i.publicSuffix=u===-1?e:e.slice(u+1)}const Ud=p9();function y9(e,n){return S2(Ud),j2(e,0,_2,n,Ud).hostname}function b9(e,n){return S2(Ud),j2(e,5,_2,n,Ud).domainWithoutSuffix}const v9={allowPrivateDomains:!0};new e9({fuzzyLink:!0,fuzzyEmail:!1}).tlds(w2);function Bc(e){if(e==null)return null;const n=e.trim();if(!n)return null;const i=y9(n);return i?i.replace(/^www\./i,"").toLowerCase():null}function Vd(e){return Bc(e)??e.trim().toLowerCase().replace(/^www\./,"")}function ig(e){return e==null||e.trim()===""?"":b9(e,v9)?.toLowerCase()??""}function Mee(e){return ig(e)||e}const x9=new Intl.Segmenter("en",{granularity:"word"}),w9=/[^\p{L}\p{N}]+/gu,k9=/[\p{L}\p{N}]+/gu,S9=/[\p{Script=Latin}\p{Script=Greek}\p{Script=Cyrillic}]/u,j9=new RegExp("\\P{ASCII}","u");function A9(e){if(!j9.test(e))return e;let n="";for(const i of e){if(i.charCodeAt(0)<128){n+=i;continue}const o=i.normalize("NFD"),u=o[0];n+=o.length>1&&S9.test(u)?u:i}return n}function T2(e){return A9(e.normalize("NFKC")).toLocaleLowerCase("en")}function E2(e){const n=[];for(const i of x9.segment(e))if(i.isWordLike)for(const o of i.segment.match(k9)??[])n.push(o);return n}function N9(e){return E2(T2(e))}function Ga(e){return N9(e).join("")}const Jx=new WeakMap;function C9(e){if(!e)return null;const n=T2(e);return{normalized:n,stripped:n.replace(w9,"")}}function _9(e){const n=Jx.get(e);if(n)return n;const i=E2(e.normalized);return Jx.set(e,i),i}function T9(e){const n=new Set;let i=0;for(const o of e){if(!o)continue;const u=Ga(o);u&&(n.add(u),u.length>i&&(i=u.length))}return{keys:n,longest:i}}function E9(e,n){if(!n||e.keys.size===0)return!1;const i=typeof n=="string"?C9(n):n;if(!i)return!1;let o=!1;for(const h of e.keys)if(i.stripped.includes(h)){o=!0;break}if(!o)return!1;const u=_9(i);for(let h=0;h<u.length;h++){let f="";for(let b=h;b<u.length;b++){if(f+=u[b],e.keys.has(f))return!0;if(f.length>=e.longest)break}}return!1}const R9=d({name:r(),accountName:r().nullable(),type:r().nullable(),role:r().nullable()});d({accounts:y(R9),total:m().int().nonnegative()});const D9=d({id:r(),projectId:r(),accountName:r(),locationName:r(),displayName:r(),primaryCategoryDisplayName:r().nullable(),storefrontAddress:r().nullable(),websiteUri:r().nullable(),placeId:r().nullable(),mapsUri:r().nullable(),additionalCategories:y(r()),description:r().nullable(),serviceArea:He(r(),wn()).nullable(),regularHours:He(r(),wn()).nullable(),primaryPhone:r().nullable(),openStatus:r().nullable(),openingDate:r().nullable(),selected:E(),syncedAt:r().nullable(),createdAt:r(),updatedAt:r()});d({locations:y(D9),totalDiscovered:m().int().nonnegative(),totalSelected:m().int().nonnegative()});d({selectAllNew:E().default(!0),accountName:r().optional(),switchAccount:E().default(!1)});d({selected:E()});d({locationNames:y(r()).optional(),daysOfMetrics:m().int().positive().max(540).optional(),monthsOfKeywords:m().int().positive().max(18).optional()});d({runId:r(),status:r()});const z9=d({locationName:r(),date:r(),metric:r(),value:m().int()});d({metrics:y(z9),total:m().int().nonnegative()});const I9=d({locationName:r(),periodStart:r(),periodEnd:r(),keyword:r(),valueCount:m().int().nullable(),valueThreshold:m().int().nullable()});d({keywords:y(I9),total:m().int().nonnegative(),thresholdedPct:ot(m().min(0).max(100))});const O9=d({locationName:r(),placeActionLinkName:r(),placeActionType:r(),uri:r().nullable(),isPreferred:E(),providerType:r().nullable()});d({placeActions:y(O9),total:m().int().nonnegative()});const P9=d({locationName:r(),populatedGroupCount:m().int().nonnegative(),syncedAt:r(),attributes:He(r(),wn())});d({lodging:y(P9),total:m().int().nonnegative()});const q9=d({name:r(),valueType:r(),values:y(Qe([E(),r()])),unsetValues:y(r()),uris:y(r())}),M9=d({locationName:r(),attributeCount:m().int().nonnegative(),syncedAt:r(),attributes:y(q9)});d({attributes:y(M9),total:m().int().nonnegative()});const B9=d({locationName:r(),placeId:r(),tier:r(),amenities:y(r()),syncedAt:r(),place:He(r(),wn())});d({places:y(B9),total:m().int().nonnegative()});const R2=j(["gbp","places"]),sg=m().int().min(1).max(4),L9=j(["ok","unavailable","error"]),D2=j(["none","baseline","stale","pending","sent","skipped","suppressed"]);D2.enum;const U9=d({locationName:r(),origin:R2,reviewName:r(),starRating:m().int().min(1).max(5).nullable(),negative:E(),comment:r().nullable(),reviewerName:r().nullable(),createTime:r().nullable(),updateTime:r(),replied:E().nullable(),replyComment:r().nullable(),replyUpdateTime:r().nullable(),reviewUri:r().nullable(),firstSeenAt:r(),lastSeenAt:r(),alertState:D2,alertStateAt:r().nullable()}),V9=d({locationName:r(),displayName:r(),reviewsAccess:L9.nullable(),reviewsAccessReason:r().nullable(),reviewsCheckedAt:r().nullable(),rating:m().nullable(),reviewCount:m().int().nonnegative().nullable(),ratingOrigin:R2.nullable(),ratingObservedAt:r().nullable()});d({negativeMaxStars:m().int().min(1).max(4),locations:y(V9),reviews:y(U9),total:m().int().nonnegative()});d({scope:d({locationName:r().nullable(),locationCount:m().int().nonnegative()}),performance:d({totals:He(r(),m()),recent7d:He(r(),m()),prior7d:He(r(),m()),deltaPct:He(r(),ot().nullable())}),freshness:d({dataThroughDate:r().nullable(),latestStoredDate:r().nullable(),pendingDays:m().int().nonnegative()}),timeseries:y(d({date:r(),pending:E(),metrics:He(r(),m())})),keywords:d({total:m().int().nonnegative(),thresholdedCount:m().int().nonnegative(),thresholdedPct:ot(m().min(0).max(100))}),placeActions:d({total:m().int().nonnegative(),hasReservationCta:E(),hasBookingCta:E(),hasDirectMerchantCta:E()}),lodging:d({lodgingLocationCount:m().int().nonnegative(),populatedLodgingCount:m().int().nonnegative(),emptyLodgingCount:m().int().nonnegative()}),profileCompleteness:d({locationCount:m().int().nonnegative(),withSecondaryCategories:m().int().nonnegative(),secondaryCategoryTotal:m().int().nonnegative(),withDescription:m().int().nonnegative(),withServiceArea:m().int().nonnegative(),withHours:m().int().nonnegative(),withPrimaryPhone:m().int().nonnegative(),permanentlyClosed:m().int().nonnegative(),temporarilyClosed:m().int().nonnegative()})});const $9={BUSINESS_DIRECTION_REQUESTS:"Direction requests",WEBSITE_CLICKS:"Website clicks",CALL_CLICKS:"Call clicks",BUSINESS_BOOKINGS:"Bookings",BUSINESS_CONVERSATIONS:"Conversations",BUSINESS_FOOD_ORDERS:"Food orders",BUSINESS_FOOD_MENU_CLICKS:"Food menu clicks",BUSINESS_IMPRESSIONS_DESKTOP_SEARCH:"Search impressions (desktop)",BUSINESS_IMPRESSIONS_MOBILE_SEARCH:"Search impressions (mobile)",BUSINESS_IMPRESSIONS_DESKTOP_MAPS:"Maps impressions (desktop)",BUSINESS_IMPRESSIONS_MOBILE_MAPS:"Maps impressions (mobile)"};function G9(e){const n=e.replace(/^BUSINESS_/,"").split("_").filter(Boolean).map(o=>o.toLowerCase());if(n.length===0)return e;const i=n.join(" ");return i.charAt(0).toUpperCase()+i.slice(1)}function Bee(e){return $9[e]??G9(e)}const K9=["BUSINESS_DIRECTION_REQUESTS","WEBSITE_CLICKS","CALL_CLICKS"],H9=["BUSINESS_IMPRESSIONS_DESKTOP_SEARCH","BUSINESS_IMPRESSIONS_MOBILE_SEARCH","BUSINESS_IMPRESSIONS_DESKTOP_MAPS","BUSINESS_IMPRESSIONS_MOBILE_MAPS"];function Lee(e){return K9.includes(e)?"conversion":H9.includes(e)?"reach":"other"}const pt=r().trim().min(1),Wx=r().regex(/^[a-f0-9]{64}$/i);function F9(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;const n=new Date(`${e}T00:00:00.000Z`);return!Number.isNaN(n.getTime())&&n.toISOString().slice(0,10)===e}const kn=r().refine(F9,{message:"Expected a calendar date as YYYY-MM-DD."});function Q9(e,n){const i=Date.parse(`${e}T00:00:00.000Z`),o=Date.parse(`${n}T00:00:00.000Z`);return Math.floor((o-i)/864e5)+1}const Z9=j(["not-connected","selection-required","connected","stale"]),dd=Z9.enum,z2=j(["enabled","suspended","closed","canceled","unspecified","unknown"]);z2.enum;const og=j(["enabled","paused","removed","unknown"]);og.enum;const I2=j(["enabled","hidden","removed","unknown"]);I2.enum;const rg=j(["customer","campaign"]);rg.enum;const O2=j(["customer-goal","campaign-goal","custom-goal"]);O2.enum;const P2=d({loginCustomerId:pt.nullable(),customerId:pt.nullable(),selectedAt:r().nullable()}).strict(),pf=d({id:pt,projectId:pt,scopes:y(r()).default([]),selection:P2,lastValidatedAt:r().nullable(),lastInventorySnapshotAt:r().nullable(),lastMetricsSnapshotAt:r().nullable(),createdAt:r(),updatedAt:r()}).strict(),n0=d({resourceName:pt,customerId:pt,parentCustomerId:pt.nullable(),descriptiveName:r().nullable(),currencyCode:r().nullable(),timeZone:r().nullable(),manager:E(),hidden:E(),testAccount:E(),level:m().int().nonnegative(),status:z2}).strict(),Y9=d({customers:y(n0),totalAccessible:m().int().nonnegative(),truncated:E(),selection:P2,fetchedAt:r()}).strict();Be("status",[d({connected:R(!1),status:R(dd["not-connected"]),connection:ue(),selectedCustomer:ue()}).strict(),d({connected:R(!0),status:R(dd["selection-required"]),connection:pf,selectedCustomer:ue()}).strict(),d({connected:R(!0),status:R(dd.connected),connection:pf,selectedCustomer:n0}).strict(),d({connected:R(!0),status:R(dd.stale),connection:pf,selectedCustomer:n0}).strict()]);const X9=d({id:pt,resourceName:pt,name:r(),status:og,advertisingChannelType:r().nullable(),biddingStrategyType:r().nullable()}).strict(),J9=d({id:pt,resourceName:pt,name:r(),status:I2,category:r(),origin:r(),primaryForGoal:E(),includeInConversionsMetric:E()}).strict(),W9=d({category:r(),origin:r(),biddable:E()}).strict(),eI=d({campaignId:pt,category:r(),origin:r(),biddable:E()}).strict(),tI=d({id:pt,name:r(),conversionActionIds:y(pt)}).strict(),nI=d({campaignId:pt,goalConfigLevel:rg,customGoalId:pt.nullable()}).strict(),aI=d({customerId:pt,fetchedAt:r(),campaigns:y(X9),conversionActions:y(J9),customerConversionGoals:y(W9),campaignConversionGoals:y(eI),campaignConversionGoalsComplete:E().optional(),customConversionGoals:y(tI),campaignGoalConfigurations:y(nI)}).strict(),iI=d({source:O2,category:r().nullable(),origin:r().nullable(),customGoalId:pt.nullable(),biddable:E().nullable(),conversionActionIds:y(pt),primaryConversionActionIds:y(pt),secondaryConversionActionIds:y(pt),missingConversionActionIds:y(pt)}).strict(),sI=d({campaignId:pt,goalConfigLevel:rg,customGoalId:pt.nullable(),missingCustomGoalId:pt.nullable(),goals:y(iI)}).strict();d({customerId:pt,derivedAt:r(),campaigns:y(sI)}).strict();const q2=50,a0=31,oI=q2*a0,rI=d({campaignIds:y(pt).min(1).max(q2),startDate:kn,endDate:kn}).strict().superRefine((e,n)=>{if(new Set(e.campaignIds).size!==e.campaignIds.length&&n.addIssue({code:ye.custom,path:["campaignIds"],message:"Campaign IDs must be unique."}),e.endDate<e.startDate){n.addIssue({code:ye.custom,path:["endDate"],message:"endDate must not precede startDate."});return}Q9(e.startDate,e.endDate)>a0&&n.addIssue({code:ye.custom,path:["endDate"],message:`Campaign metrics may cover at most ${a0} calendar days.`})}),lI=d({campaignId:pt,date:kn,impressions:m().int().nonnegative(),clicks:m().int().nonnegative(),costMicros:m().int().nonnegative(),conversions:m().nonnegative(),conversionValueMicros:m().int().nonnegative().nullable()}).strict(),cI=d({query:rI,rows:y(lI).max(oI),truncated:E(),fetchedAt:r()}).strict(),M2=j(["accessible-customers","inventory","campaign-metrics"]),hf=M2.enum,lg=d({id:pt,projectId:pt,connectionId:pt,runId:pt,kind:M2,customerId:pt.nullable(),payloadChecksum:Wx,rawPayloadSha256:Wx.nullable(),rawPayloadBytes:m().int().nonnegative().nullable(),redactedFieldCount:m().int().nonnegative(),capturedAt:r(),createdAt:r()}).strict(),uI=Be("kind",[d({kind:R(hf["accessible-customers"]),data:Y9}).strict(),d({kind:R(hf.inventory),data:aI}).strict(),d({kind:R(hf["campaign-metrics"]),data:cI}).strict()]),dI=d({metadata:lg,payload:uI}).strict().superRefine((e,n)=>{e.metadata.kind!==e.payload.kind&&n.addIssue({code:ye.custom,path:["payload","kind"],message:"Snapshot metadata and payload kinds must match."})}),mI=j(["7d","14d","30d"]),cg=d({impressions:m().int().nonnegative(),clicks:m().int().nonnegative(),costMicros:m().int().nonnegative(),conversions:m().nonnegative(),conversionValueMicros:m().int().nonnegative().nullable(),ctr:we().nullable(),cpcMicros:m().int().nonnegative().nullable(),conversionRate:we().nullable(),costPerConversionMicros:m().int().nonnegative().nullable()}),pI=d({date:kn,origin:j(["provider","filled"]),impressions:m().int().nonnegative(),clicks:m().int().nonnegative(),costMicros:m().int().nonnegative(),conversions:m().nonnegative(),ctr:we().nullable()}),hI=d({campaignId:pt,name:r().nullable(),status:og,totals:cg}),fI=d({snapshotId:pt,capturedAt:r(),customerId:pt,currencyCode:r().nullable(),timeZone:r().nullable(),asOfDate:kn,openDate:kn.nullable(),truncated:E(),campaignsQueried:m().int().nonnegative(),campaignsInInventory:m().int().nonnegative()}),gI=d({startDate:kn,endDate:kn,days:m().int().positive(),totals:cg}),yI=d({days:m().int().positive(),prior:gI,change:d({impressions:we().nullable(),clicks:we().nullable(),costMicros:we().nullable(),conversions:we().nullable(),ctr:we().nullable(),conversionRate:we().nullable()})});d({window:mI,startDate:kn,endDate:kn,days:m().int().positive(),totals:cg,daily:y(pI),campaigns:y(hI),comparison:yI.nullable(),comparisonUnavailableReason:j(["insufficient-history","no-snapshot"]).nullable(),source:fI.nullable()});const ym=j(["complete","partial","failed","unsupported"]);ym.enum;const bI=["branded","non-brand"],Vr=j(bI),ug=j(["all","branded","non-brand"]);function vI(e){const n=e.filter(o=>Ga(o).length>0);if(n.length===0)return null;const i=T9(n);return i.keys.size===0?null:{matcher:i,classify(o){return E9(i,o)?"branded":"non-brand"}}}const xI=2,wI=r().regex(/^[a-f0-9]{64}$/),bm=r().trim().min(1).max(256),ew=j(["sensitive","insensitive"]),he=r().trim().min(1).max(128).regex(/^[a-z0-9][\w.~-]*$/i,"Must be a URL-safe stable key"),kI=r().trim().min(1).refine(e=>Bc(e)!==null,"A competitor domain must be a valid hostname"),SI=Be("kind",[d({kind:R("exact"),url:r().min(1),pathCase:ew}).strict(),d({kind:R("prefix"),host:r().min(1),pathPrefix:r().min(1),pathCase:ew}).strict(),d({kind:R("host"),host:r().min(1)}).strict()]),jI=d({canonicalHost:r().min(1),ownedHosts:y(r().min(1)),names:y(r().min(1))}).strict(),AI=d({projectBrand:jI}).strict(),NI=d({stableKey:he,label:r().trim().min(1),aliases:y(r().min(1)),identityAliases:y(r().trim().min(1)).optional(),urlMatchers:y(SI),mentionNotApplicable:E(),discoveryIdentity:r().min(1).nullable()}).strict(),B2=d({stableKey:he,label:r().trim().min(1),domain:kI,aliases:y(r().min(1))}).strict(),CI=d({stableKey:he,label:r().trim().min(1),parentGroupKey:he.optional(),targetKeys:y(he),competitors:y(B2)}).strict(),_I=j(["manual","query-set","template","discovery","research"]),TI=d({templateId:r().trim().min(1).max(256),templateVersion:r().trim().min(1).max(256),template:r().trim().min(1).max(4e3),bindings:He(r().trim().min(1).max(128),r().trim().min(1).max(128)),output:r().trim().min(1).max(4e3)}).strict(),L2=d({source:_I,sourceId:r().min(1).nullable(),capturedAt:r().datetime(),template:TI.optional()}).strict(),EI=d({queryId:bm,queryText:r().min(1),provenance:L2}).strict(),vm=d({providers:y(jt).min(1),models:He(jt,r().min(1)),location:mn.nullable()}).strict(),RI=d({stableKey:r().min(1),queryId:bm,queryText:r().min(1),context:vm,expectedSnapshots:m().int().nonnegative()}).strict(),dg=Vr,DI=d({targetKey:he,queryId:bm,queryClass:dg,classificationSource:j(["server","operator"]).optional(),executionNodeKey:r().min(1)}).strict(),mg=d({executionNodeKey:r().min(1),targetKey:he,queryId:bm}).strict(),U2=d({stableKey:he,label:r().trim().min(1),kind:R("market"),groupKey:he.optional(),usageEdges:y(mg)}).strict();function tw(e){return[e.executionNodeKey,e.targetKey,e.queryId].join("\0")}const xm=d({schemaVersion:R(xI),identities:AI,targets:y(NI),groups:y(CI),querySnapshots:y(EI),assignments:y(DI),executionNodes:y(RI),usageEdges:y(mg),reportingScopes:y(U2).optional(),compiledChecksum:wI}).strict().superRefine((e,n)=>{const i=new Set;for(const b of e.executionNodes)i.has(b.stableKey)&&n.addIssue({code:ye.custom,path:["executionNodes"],message:`Duplicate execution node key "${b.stableKey}"`}),i.add(b.stableKey);const o=new Set(e.targets.map(b=>b.stableKey));e.usageEdges.forEach((b,v)=>{i.has(b.executionNodeKey)||n.addIssue({code:ye.custom,path:["usageEdges",v,"executionNodeKey"],message:`Usage edge references unknown execution node "${b.executionNodeKey}"`}),o.has(b.targetKey)||n.addIssue({code:ye.custom,path:["usageEdges",v,"targetKey"],message:`Usage edge references unknown Target "${b.targetKey}"`})});const u=new Set(e.usageEdges.map(tw)),h=new Set;e.reportingScopes?.forEach((b,v)=>{if(h.has(b.stableKey)&&n.addIssue({code:ye.custom,path:["reportingScopes",v,"stableKey"],message:`Duplicate reporting scope key "${b.stableKey}"`}),h.add(b.stableKey),b.groupKey!==void 0){const k=e.groups.find(S=>S.stableKey===b.groupKey);(!k||b.usageEdges.some(S=>!k.targetKeys.includes(S.targetKey)))&&n.addIssue({code:ye.custom,path:["reportingScopes",v,"groupKey"],message:"A market must link to an existing group containing all its assigned properties."})}const x=new Set;b.usageEdges.forEach((k,S)=>{const C=tw(k);u.has(C)||n.addIssue({code:ye.custom,path:["reportingScopes",v,"usageEdges",S],message:`Reporting scope "${b.stableKey}" references a usage edge that this revision does not contain.`}),x.has(C)&&n.addIssue({code:ye.custom,path:["reportingScopes",v,"usageEdges",S],message:`Reporting scope "${b.stableKey}" repeats a usage edge.`}),x.add(C)})}),e.assignments.forEach((b,v)=>{o.has(b.targetKey)||n.addIssue({code:ye.custom,path:["assignments",v,"targetKey"],message:`Assignment references unknown Target "${b.targetKey}"`})});const f=new Map;e.groups.forEach((b,v)=>{f.has(b.stableKey)&&n.addIssue({code:ye.custom,path:["groups",v,"stableKey"],message:"Duplicate group stable key "+b.stableKey}),f.set(b.stableKey,b)}),e.groups.forEach((b,v)=>{const x=b.parentGroupKey;if(x===void 0)return;if(x===b.stableKey){n.addIssue({code:ye.custom,path:["groups",v,"parentGroupKey"],message:"A group cannot be its own parent."});return}const k=f.get(x);if(!k){n.addIssue({code:ye.custom,path:["groups",v,"parentGroupKey"],message:"Group parent does not exist: "+x});return}const S=new Set(k.targetKeys);b.targetKeys.forEach((z,q)=>{S.has(z)||n.addIssue({code:ye.custom,path:["groups",v,"targetKeys",q],message:"Group target membership must be a subset of its parent."})});const C=new Set([b.stableKey]);let _=k;for(;_.parentGroupKey!==void 0;){if(C.has(_.stableKey)){n.addIssue({code:ye.custom,path:["groups",v,"parentGroupKey"],message:"Group parent relationships cannot contain a cycle."});break}C.add(_.stableKey);const z=f.get(_.parentGroupKey);if(!z)break;_=z}});for(const b of e.groups)for(const v of b.targetKeys)o.has(v)||n.addIssue({code:ye.custom,path:["groups"],message:`Group "${b.stableKey}" references unknown Target "${v}"`})}),pg=100;function zr(e){return d({items:y(e),nextCursor:r().min(1).nullable(),totalEstimate:m().int().nonnegative().optional()}).strict()}const Lc=j(["no_completed_run","plan_v1","no_population","evidence_incomplete","identity_ambiguous","not_applicable"]),dn=Be("state",[d({state:R("available"),value:we(),numerator:m().int().nonnegative().optional(),denominator:m().int().positive().optional(),unattributed:m().int().positive().optional(),unchecked:m().int().positive().optional()}).strict().superRefine((e,n)=>{e.unattributed!==void 0&&e.unchecked!==void 0&&n.addIssue({code:"custom",path:["unchecked"],message:"A metric reads one signal: unattributed (mention) and unchecked (citation) cannot share it"})}),d({state:R("unavailable"),reason:Lc}).strict()]),ko=Be("state",[d({state:R("available"),value:m().int().nonnegative(),numerator:m().int().nonnegative().optional(),denominator:m().int().positive().optional()}).strict(),d({state:R("unavailable"),reason:Lc}).strict()]),hg=j(["all","group","property"]),pa=ug,zI=j(["label-asc","label-desc","citationCoverage-asc","citationCoverage-desc","mentionCoverage-asc","mentionCoverage-desc"]),fg=j(["not_measured","queued","running","complete","partial","failed"]),II=j(["run_measurement","review_flags","complete_setup","republish_setup","none"]);d({scope:hg,groupKey:he.optional(),targetKey:he.optional(),queryClass:pa.optional(),provider:jt.optional(),location:r().trim().min(1).optional(),from:r().trim().min(1).optional(),to:r().trim().min(1).optional(),runId:r().trim().min(1).optional(),search:r().optional(),sort:zI.optional(),cursor:r().trim().min(1).optional(),limit:m().int().positive().max(pg).optional(),compact:E().optional()}).strict();const OI=d({provider:jt,mentionCoverage:dn,citationCoverage:dn}).strict(),PI=d({bothSignals:m().int().nonnegative(),mentionedOnly:m().int().nonnegative(),citedOnly:m().int().nonnegative(),neither:m().int().nonnegative(),notMeasured:m().int().nonnegative(),total:m().int().nonnegative()}).strict(),i0=d({groupKey:he,label:r().trim().min(1)}).strict(),qI=d({targetKey:he,label:r().min(1),metro:i0.nullable().optional(),otherMetros:y(i0).min(1).optional(),mentionCoverage:dn,citationCoverage:dn,providers:y(OI),flags:m().int().nonnegative()}).strict(),MI=d({kind:j(["project","competitor"]),stableKey:r().min(1),label:r().min(1),domain:r().min(1),credits:m().int().nonnegative(),share:we(m().min(0).max(1))}).strict(),BI=d({groupKey:he,queryClass:R("non-brand"),denominator:m().int().positive(),entries:y(MI)}).strict();d({mode:j(["active-v1","active-v2"]),scope:d({kind:hg,key:r().min(1).optional(),label:r().min(1)}).strict(),queryClass:pa,measurement:d({state:fg,currentRunId:r().min(1).optional(),displayedRunId:r().min(1).optional(),completed:m().int().nonnegative(),expected:m().int().nonnegative(),completedAt:r().datetime().optional(),includesHistoricalData:E().optional()}).strict(),nextAction:d({kind:II,count:m().int().nonnegative().optional()}).strict(),metrics:d({propertiesMentioned:ko,mentionCoverage:dn,citationCoverage:dn,brandPresence:dn,sov:dn.describe("Deprecated alias of brandPresence carrying the identical value. Remove once the browser migrates.")}).strict(),properties:zr(qI),outcomes:PI,flags:d({total:m().int().nonnegative()}).strict(),namedShareOfVoice:BI.optional(),detailsOmitted:y(r()).optional()}).strict();const V2=j(["sources","answers"]),LI=V2.enum;LI.sources;d({targetKey:he,queryClass:pa.optional(),provider:jt.optional(),location:r().trim().min(1).optional(),runId:r().trim().min(1).optional(),shape:V2.optional(),cursor:r().trim().min(1).optional(),limit:m().int().positive().max(pg).optional()}).strict();const $2=1,Uc=m().int().positive(),gn=r().trim().min(1).max(128).regex(/^[a-z0-9][\w.~-]*$/i,"Must be a URL-safe stable key"),Vc=r().trim().min(1).max(256),nw=j(["sensitive","insensitive"]);function $d(e){const n=Bc(e);if(!n)throw new Error(`Invalid measurement host: ${e}`);return n}function UI(e){const n=[];let i=!1;for(let o=0;o<e.length;o++){const u=e[o];u==="/"?(i||n.push(u),i=!0):(n.push(u),i=!1)}for(;n.length>1&&n.at(-1)==="/";)n.pop();return n.length?n.join(""):"/"}function aw(e){try{return decodeURI(e).normalize("NFC").toLowerCase()}catch{return e.normalize("NFC").toLowerCase()}}function G2(e){const n=new URL(`https://measurement.invalid${e}`).pathname;return UI(n.replace(/%[0-9a-f]{2}/gi,i=>i.toUpperCase()))}function s0(e){const n=e.trim();if(!n||n.includes("?")||n.includes("#")||n.includes("://")||n.includes("\\"))throw new Error(`Invalid measurement path prefix: ${e}`);const i=n.startsWith("/")?n:`/${n}`;for(const o of i.split("/")){let u;try{u=decodeURIComponent(o)}catch{throw new Error(`Invalid measurement path prefix: ${e}`)}if(u==="."||u==="..")throw new Error(`Invalid measurement path prefix: ${e}`)}try{return G2(i)}catch{throw new Error(`Invalid measurement path prefix: ${e}`)}}function VI(e){const n=/^[a-z][a-z0-9+.-]*:\/\/[^/?#]*/i.exec(e);if(!n)throw new Error(`Invalid exact measurement URL: ${e}`);return e.slice(n[0].length).split(/[?#]/,1)[0]||"/"}function iw(e){const n=e.trim();if(!n||n.includes("\\"))throw new Error(`Invalid exact measurement URL: ${e}`);let i;try{i=new URL(n)}catch{throw new Error(`Invalid exact measurement URL: ${e}`)}if(i.protocol!=="http:"&&i.protocol!=="https:"||i.username||i.password||i.port||i.search||i.hash)throw new Error(`Invalid exact measurement URL: ${e}`);const o=$d(i.hostname),u=s0(VI(n));return`https://${o}${u}`}const Cc=r().trim().min(1).refine(e=>{try{return $d(e),!0}catch{return!1}},"A target URL matcher host must be a valid hostname").overwrite(e=>$d(e)),$I=r().trim().min(1).refine(e=>{try{return s0(e),!0}catch{return!1}},"A target URL matcher pathPrefix must be an absolute path without query or fragment").overwrite(e=>s0(e)),GI=r().trim().min(1).refine(e=>{try{return iw(e),!0}catch{return!1}},"A target exact matcher must be an HTTP(S) URL without credentials, port, query, or fragment").overwrite(e=>iw(e)),KI=Be("kind",[d({kind:R("exact"),url:GI,pathCase:nw}).strict(),d({kind:R("prefix"),host:Cc,pathPrefix:$I,pathCase:nw}).strict(),d({kind:R("host"),host:Cc}).strict()]),K2=r().trim().min(1).max(256).refine(e=>Ga(e).length>0,"A target alias must contain mention text"),HI=He(r().trim().min(1),r()),FI=Cc,H2=d({stableKey:gn,label:r().trim().min(1),urls:y(KI).min(1),aliases:y(K2),metadata:HI.optional()}).strict(),gg=d({stableKey:gn,label:r().trim().min(1),targetKeys:y(gn).min(1),competitors:y(FI).optional()}).strict(),F2=d({targetKey:gn,queryIds:y(Vc).min(1),context:mn.nullable().optional()}).strict();function QI(e,n){return e<n?-1:e>n?1:0}function ZI(e,n=i=>i){const i=new Set,o=new Set;for(const u of e){const h=n(u);i.has(h)&&o.add(h),i.add(h)}return o}function ff(e,n,i,o,u){for(const h of ZI(n,u))e.addIssue({code:"custom",path:[...i],message:`Duplicate ${o}: ${h}`})}function sw(e){if(e.kind==="host")return{host:e.host,pathname:null};if(e.kind==="prefix")return{host:e.host,pathname:e.pathPrefix};const n=new URL(e.url);return{host:$d(n.hostname),pathname:G2(n.pathname||"/")}}function YI(e,n,i,o){return e===i||(n==="insensitive"||o==="insensitive")&&aw(e)===aw(i)}function XI(e,n){if(e.kind!==n.kind)return!1;const i=sw(e),o=sw(n);return i.host!==o.host?!1:e.kind==="host"||n.kind==="host"?!0:YI(i.pathname,e.pathCase,o.pathname,n.pathCase)}function JI(e){const n=new Set;return[...e].sort(QI).filter(i=>{const o=Ga(i);return n.has(o)?!1:(n.add(o),!0)})}const Q2=d({schemaVersion:R($2),targets:y(H2).min(1),groups:y(gg).optional(),targetQuerySelections:y(F2).optional()}).strict().superRefine((e,n)=>{const i=e.groups??[],o=e.targetQuerySelections??[];ff(n,e.targets.map(v=>v.stableKey),["targets"],"target stable key"),ff(n,i.map(v=>v.stableKey),["groups"],"group stable key");const u=new Set(e.targets.map(v=>v.stableKey)),h=new Set(i.map(v=>v.stableKey));for(const v of u)h.has(v)&&n.addIssue({code:"custom",path:["groups"],message:`Target and group stable keys must be globally unique: ${v}`});const f=new Map,b=[];e.targets.forEach((v,x)=>{for(const k of JI(v.aliases)){const S=Ga(k),C=f.get(S);C&&C!==v.stableKey&&n.addIssue({code:"custom",path:["targets",x,"aliases"],message:`Target alias is already assigned to target ${C}: ${k}`}),f.set(S,v.stableKey)}v.urls.forEach((k,S)=>{b.find(_=>_.targetKey!==v.stableKey&&XI(_.matcher,k))&&n.addIssue({code:"custom",path:["targets",x,"urls",S],message:"Target URL matcher has an equal-specificity cross-target tie"}),b.push({targetKey:v.stableKey,matcher:k})})}),i.forEach((v,x)=>{ff(n,v.targetKeys,["groups",x,"targetKeys"],"group target key");for(let k=0;k<v.targetKeys.length;k++){const S=v.targetKeys[k];u.has(S)||n.addIssue({code:"custom",path:["groups",x,"targetKeys",k],message:`Unknown target: ${S}`})}}),o.forEach((v,x)=>{u.has(v.targetKey)||n.addIssue({code:"custom",path:["targetQuerySelections",x,"targetKey"],message:`Unknown target: ${v.targetKey}`})})});Q2.transform(e=>({...e,groups:e.groups??[],targetQuerySelections:e.targetQuerySelections??[]}));d({expectedActiveRevision:Uc.nullable(),plan:Q2}).strict();const WI=d({queryId:Vc,queryText:r().min(1)}).strict(),yg=d({stableKey:r().min(1),queryText:r().min(1),context:mn.nullable(),expectedSnapshots:m().int().nonnegative()}).strict(),eO=d({kind:R("baseline"),executionNodeKey:r().min(1),queryId:Vc}).strict(),tO=d({kind:R("target"),executionNodeKey:r().min(1),queryId:Vc,targetKey:gn}).strict(),o0=Be("kind",[eO,tO]),Z2=d({code:R("target-alias-prefix-overlap"),message:r().min(1),targetKeys:y(gn).min(1),aliases:y(r().min(1)).min(1)}).strict(),Y2=H2.extend({mentionNotApplicable:E()}),X2=d({schemaVersion:R($2),defaultContext:mn.nullable(),effectiveOwnedHosts:y(Cc),projectCanonicalHost:Cc,projectBrandNames:y(K2),targets:y(Y2),groups:y(gg),targetQuerySelections:y(F2),querySnapshots:y(WI),executionNodes:y(yg),usageEdges:y(o0),warnings:y(Z2)}).strict(),nO=X2,J2=Be("schemaVersion",[X2,xm]),bg=r().regex(/^[a-f0-9]{64}$/),vg=r().datetime(),W2=d({schemaVersion:R(1),language:r().min(1).optional(),providers:y(r().min(1)).min(1),models:He(r().min(1),r().min(1)),checksum:r().regex(/^[a-f0-9]{64}$/)}).strict(),aO=d({groups:y(gn).optional(),targets:y(gn).optional()}).strict(),iO=d({groups:y(gn),targets:y(gn),queries:y(r().min(1)),resolvedTargets:y(gn)}).strict().superRefine((e,n)=>{e.resolvedTargets.length===0&&e.queries.length===0&&n.addIssue({code:"custom",path:["resolvedTargets"],message:"A recorded scope must name something it measured"})});d({stableKey:gn,retiredAt:r().datetime()});d({active:d({revision:Uc,checksum:bg,createdAt:vg,plan:J2}).nullable()});d({versions:y(d({revision:Uc,checksum:bg,createdAt:vg,active:E()}))});d({version:d({revision:Uc,checksum:bg,createdAt:vg,active:E(),plan:J2})});const _d=d({targets:m().int(),groups:m().int(),queries:m().int(),executionNodes:m().int(),usageEdges:m().int(),baselineEdges:m().int(),targetEdges:m().int(),dedupSavings:m().int()}).strict(),sO=j(["invalid-authoring","duplicate-identity","unknown-target","unknown-query","invalid-project-context","unowned-target-url","owned-competitor","target-query-context-conflict","target-url-ownership-tie","target-alias-cross-target-collision","target-alias-project-brand-collision","target-alias-prefix-overlap"]),ej=d({id:sO,severity:j(["fail","warn"]),message:r().min(1),path:y(Qe([r(),m().int()]))}).strict(),oO=d({baseline:m().int().nonnegative(),target:m().int().nonnegative()}).strict(),tj=d({ok:R(!0),checks:y(ej),executionNodes:y(yg),dedupSaved:m().int().nonnegative(),usageEdges:oO,estCostUsd:ue(),plan:nO,warnings:y(Z2),counts:_d}).strict(),nj=d({ok:R(!1),checks:y(ej).min(1),executionNodes:y(yg).length(0),dedupSaved:R(0),usageEdges:d({baseline:R(0),target:R(0)}).strict(),estCostUsd:ue()}).strict();Be("ok",[tj,nj]);const md=d({targetKey:gn,context:mn.nullable(),queryIds:y(Vc)}).strict();function ow(e){return d({added:y(e),removed:y(e),changed:y(d({stableKey:gn,before:e,after:e}).strict()),unchanged:y(gn)}).strict()}const rO=tj.extend({diff:d({activeRevision:Uc.nullable(),targets:ow(Y2),groups:ow(gg),querySelections:d({added:y(md),removed:y(md),changed:y(d({targetKey:gn,before:md,after:md}).strict()),unchanged:y(d({targetKey:gn,context:mn.nullable()}).strict())}).strict(),execution:d({addedNodeKeys:y(r().min(1)),removedNodeKeys:y(r().min(1)),addedUsageEdges:y(o0),removedUsageEdges:y(o0),counts:d({before:_d.nullable(),after:_d,delta:_d.nullable()}).strict()}).strict()}).strict()}).strict(),lO=nj.extend({diff:ue()}).strict();Be("ok",[rO,lO]);const aj=j(["PROVIDER_AUTH","PROVIDER_BILLING","RATE_LIMITED","PROVIDER_UNAVAILABLE","NETWORK","TIMEOUT","PARSE_ERROR","UNKNOWN"]);aj.enum;const ha=j(["queued","running","completed","partial","failed","cancelled"]),Zt=ha.enum,xg=j(["answer-visibility","site-audit","gsc-sync","inspect-sitemap","ga-sync","bing-inspect","bing-inspect-sitemap","backlink-extract","traffic-sync","aeo-discover-seed","aeo-discover-probe","gbp-sync","ads-sync","google-ads-sync","gtm-sync"]),ze=xg.enum;d({kind:xg.optional(),status:ha.optional()});const wg=j(["manual","scheduled","config-apply","backfill","probe"]),ii=wg.enum,Li=j(["cited","not-cited"]),yc=Li.enum,Gd=j(["visible","not-visible"]);Gd.enum;const _c=j(["mentioned","not-mentioned"]);_c.enum;const ij=j(["new","cited","lost","emerging","not-cited"]);ij.enum;const cO=j(["new","mentioned","lost","emerging","not-mentioned"]);cO.enum;const uO=j([ii.manual,ii.probe]);d({kind:R(ze["answer-visibility"]).optional(),trigger:uO.optional(),providers:y(jt).optional(),queries:y(r().min(1)).min(1).optional(),measurementScope:aO.optional(),location:r().min(1).optional(),allLocations:E().optional(),noLocation:E().optional(),dispatchMode:Mc.optional(),force:E().optional()}).refine(e=>+!!e.location+ +!!e.allLocations+ +!!e.noLocation<=1,{message:'Only one of "location", "allLocations", or "noLocation" may be provided'});const dO=d({message:r(),raw:wn().optional(),code:aj.optional()}),mO=d({message:r().optional(),providers:He(r(),dO).optional()}),pO=He(r(),R(Mc.enum.batch)),hO=d({id:r(),provider:r(),model:r(),status:v2,requestCount:m().int().nonnegative(),ingestedCount:m().int().nonnegative(),recordedCount:m().int().nonnegative(),submittedAt:r().nullable(),endedAt:r().nullable(),deadlineAt:r(),error:r().nullable()}),fO=d({provider:r(),pricingTier:ag,answers:m().int().nonnegative(),inputTokens:m().int().nonnegative(),cachedInputTokens:m().int().nonnegative(),cacheWriteTokens:m().int().nonnegative(),outputTokens:m().int().nonnegative(),searchCount:m().int().nonnegative(),estimatedCostMicros:m().int().nonnegative().nullable(),unpricedAnswers:m().int().nonnegative()}),gO=d({id:r(),projectId:r(),kind:xg,status:ha,trigger:wg.default("manual"),measurementPlanVersionId:r().nullable().optional(),measurementManifest:He(r(),wn()).nullable().optional(),measurementScope:iO.nullable().optional(),measurementExecutionIdentity:W2.nullable().optional(),location:r().nullable().optional(),queries:y(r()).nullable().optional(),startedAt:r().nullable().optional(),finishedAt:r().nullable().optional(),error:mO.nullable().optional(),queryBasketRevision:m().int().nullable().optional(),dispatchModes:pO.optional(),createdAt:r()});function kg(e){if(e.providers){const n=Object.entries(e.providers);if(n.length===1){const[i,o]=n[0];return`${i}: ${o.message}`}if(n.length>1)return n.map(([i,o])=>`${i}: ${o.message}`).join(" • ")}return e.message??"Run failed."}const wm=d({uri:r(),title:r()}),yO=d({status:j(["applied","ignored","browser-implicit","unknown"]),resolved:mn.nullable().optional()}),sj=d({id:r(),runId:r(),queryId:r(),query:r().optional(),provider:jt,citationState:Li,answerMentioned:E().optional(),visibilityState:Gd.optional(),mentionState:_c.optional(),transition:ij.optional(),answerText:r().nullable().optional(),citedDomains:y(r()).default([]),citedUrls:y(r()).nullable().default(null),captureStatus:Qe([ym,ue()]).default(null),sourceCount:m().int().nonnegative().nullable().default(null),resolvedCount:m().int().nonnegative().nullable().default(null),captureVersion:m().int().positive().nullable().default(null),retrievalStatus:Qe([Z0,ue()]).default(null),retrievalContract:Qe([Y0,ue()]).default(null),competitorOverlap:y(r()).default([]),citedCompetitorDomains:y(r()).default([]),mentionedCompetitorDomains:y(r()).default([]),mentionedCompetitorTerms:y(r()).default([]),recommendedCompetitors:y(r()).default([]),matchedTerms:y(r()).default([]),groundingSources:y(wm).default([]),searchQueries:y(r()).default([]),model:r().nullable().optional(),servedModel:r().nullable().optional(),location:r().nullable().optional(),requestedContext:mn.nullable().optional(),supportedContext:yO.nullable().optional(),dispatchMode:Qe([Mc,ue()]).optional(),stopReason:r().nullable().optional(),usage:$z.nullable().optional(),createdAt:r()});d({snapshots:y(sj),total:m().int().nonnegative()});const bO=d({queryId:r().nullable(),query:r().nullable(),run1State:Li.nullable(),run2State:Li.nullable(),run1AnswerMentioned:E().nullable(),run2AnswerMentioned:E().nullable(),run1VisibilityState:Gd.nullable(),run2VisibilityState:Gd.nullable(),run1MentionState:_c.nullable().optional(),run2MentionState:_c.nullable().optional(),changed:E(),visibilityChanged:E()});d({run1:r(),run2:r(),diff:y(bO)});const vO=d({totalQueries:m().int().nonnegative(),citedQueries:m().int().nonnegative(),mentionedQueries:m().int().nonnegative()}),xO=gO.extend({snapshots:y(sj).optional(),queryCounts:vO.nullable().optional(),providerBatches:y(hO).optional(),usage:y(fO).optional()}),wO=d({totalRuns:m().int().nonnegative(),run:xO.nullable()});d({id:r(),projectId:r().nullable().optional(),actor:r(),action:r(),entityType:r(),entityId:r().nullable().optional(),diff:wn().optional(),userAgent:r().nullable().optional(),actorSession:r().nullable().optional(),requestId:r().nullable().optional(),credentialId:r().nullable().optional(),createdAt:r()});const oj=Qe([ha,ue()]),Sg=j(["pass","partial","fail"]),Uee=Sg.enum,rj=j(["up","down","flat"]);rj.enum;const kO=d({id:r(),name:r(),weight:m(),sharePct:ot(m().min(0).max(100)).nullable().default(null),avgScore:m(),status:Sg,pagesPassing:m().int().nonnegative(),pagesPartial:m().int().nonnegative(),pagesFailing:m().int().nonnegative()}),SO=d({factorId:r(),factorName:r(),avgScore:m(),affectedPages:m().int().nonnegative(),totalPages:m().int().nonnegative(),affectedPct:ot(m().nonnegative()),topRecommendations:y(r()).default([])}),Va=d({reason:j(["explicit-run","latest-date-complete","latest-date-most-pages","requested-date-complete","requested-date-most-pages"]),date:r(),sameDateRunCount:m().int().nonnegative(),ambiguousDate:E(),candidates:y(d({runId:r(),createdAt:r(),complete:E(),pages:m().int().nonnegative()})).max(10),candidatesTruncated:E()});d({project:r(),hasData:E(),runId:r().nullable(),runStatus:oj,sitemapUrl:r().nullable(),auditedAt:r().nullable(),aggregateScore:m(),pagesDiscovered:m().int().nonnegative(),pagesAudited:m().int().nonnegative(),pagesSkipped:m().int().nonnegative(),pagesErrored:m().int().nonnegative(),deltaScore:m().nullable(),trend:Qe([rj,ue()]),previousScore:m().nullable(),previousAuditedAt:r().nullable(),runSelection:Va.optional(),factors:y(kO).default([]),affectedPageRanking:d({basis:R("pages-below-pass"),scope:R("audited-pages"),pagesAudited:m().int().nonnegative(),items:y(d({factorId:r(),pagesBelowPass:m().int().nonnegative(),pagesFailing:m().int().nonnegative(),pagesPartial:m().int().nonnegative()})),unavailableFactorIds:y(r())}).optional(),crossCuttingIssues:y(SO).default([]),prioritizedFixes:y(r()).default([])});const lj=d({id:r(),name:r(),weight:m(),score:m(),sharePct:ot(m().min(0).max(100)).nullable().default(null)}),jO=d({url:r(),overallScore:m(),status:j(["success","error"]),error:r().nullable().optional(),factors:y(lj).default([])});d({project:r(),runId:r().nullable(),auditedAt:r().nullable(),runSelection:Va.optional(),total:m().int().nonnegative(),pages:y(jO).default([])});const AO=d({runId:r(),auditedAt:r(),aggregateScore:m(),pagesAudited:m().int().nonnegative()});d({project:r(),points:y(AO).default([])});const NO=j(["disabled","complete","partial","unavailable"]);NO.enum;const $r=j(["indexable","redirect-terminal","canonical-to-other","robots-disallow","noindex","non-html","fetch-error","not-fetched","unknown"]);$r.enum;const cj=d({healthReason:$r,pages:m().int().nonnegative(),exampleUrl:r()}),uj=d({scope:R("selected-snapshot"),total:m().int().nonnegative(),eligible:m().int().nonnegative(),excluded:m().int().nonnegative(),excludedReasons:y(cj).max($r.options.length)}),dj=d({recentDates:y(kn).max(10),totalDates:m().int().nonnegative(),matchingMonthDayDates:y(kn).max(10),matchingMonthDayTotal:m().int().nonnegative()}),CO=d({pagesDiscovered:m().int().nonnegative(),pagesFetched:m().int().nonnegative(),pagesEligible:m().int().nonnegative(),edges:m().int().nonnegative(),findings:m().int().nonnegative()}),_O=Be("state",[d({state:R("unavailable")}),d({state:R("disabled")}),d({state:R("complete"),checked:m().int().nonnegative(),found:m().int().nonnegative(),unverified:m().int().nonnegative()}),d({state:R("partial"),checked:m().int().nonnegative(),found:m().int().nonnegative(),unverified:m().int().nonnegative()})]);d({project:r(),hasCrawlData:E(),legacyAuditAvailable:E(),runId:r().nullable(),runSelection:Va.optional(),requestedDate:kn.optional(),availableScanDates:dj.optional(),inventorySummary:uj.nullable().optional(),runStatus:oj,requestedRootUrl:r().nullable(),rootUrl:r().nullable(),crawlSchemaVersion:r().nullable().optional(),engineVersion:r().nullable().optional(),normalizationVersion:r().nullable().optional(),indexabilityVersion:r().nullable().optional(),linkScoreVersion:r().nullable().optional(),effectiveOptions:He(r(),wn()).default({}),complete:E(),termination:r().nullable(),detailsAvailable:E(),counts:CO,deadLinks:_O});j(["complete","unknown","max-pages","max-edges","max-fetches","max-duration","max-bytes","max-page-bytes","max-depth","max-links-per-page","max-query-variants","max-sitemap-fanout","max-sitemap-urls","root-host-redirect"]);const km=j(["eligible","hidden","resource","redirect","failed","unchecked"]),Vee=km.enum,$ee=km.options,Sr={discovered:"discovered",robotsBlocked:"robots-blocked",html:"html",redirect:"redirect",nonHtml:"non-html",fetchError:"fetch-error"},pd={indexable:"indexable",noindex:"noindex",blocked:"blocked",unknown:"unknown"},TO={robotsDisallow:"robots-disallow",redirectTerminal:"redirect-terminal",metaRobotsNoindex:"meta-robots-noindex",xRobotsNoindex:"x-robots-noindex",canonicalToOther:"canonical-to-other",notHtmlOrUnavailable:"not-html-or-unavailable"};function EO(e){return e.indexabilityReasons?.some(n=>n===TO.canonicalToOther)===!0||e.nodeKey!==void 0&&e.canonicalNodeKey!==null&&e.canonicalNodeKey!==void 0&&e.canonicalNodeKey!==e.nodeKey}function Gee(e){switch(e.fetchState){case Sr.fetchError:return"failed";case Sr.discovered:return"unchecked";case Sr.nonHtml:return"resource";case Sr.redirect:return"redirect";case Sr.robotsBlocked:return"hidden";case Sr.html:break;default:return"unchecked"}if(EO(e))return"hidden";switch(e.indexabilityState){case pd.indexable:return"eligible";case pd.noindex:case pd.blocked:return"hidden";case pd.unknown:default:return"unchecked"}}const Kee=15,RO=j(["navigation","content","unknown"]);RO.enum;const DO=d({navigation:m().int().nonnegative(),content:m().int().nonnegative(),unknown:m().int().nonnegative()}),mj=j(["placement","ubiquity","unmeasured"]);mj.enum;const Sm=j(["applied","applied-placement","applied-placement-with-ubiquity","applied-placement-partial","unavailable-too-few-pages","unavailable-legacy-scan"]);Sm.enum;function Hee(e){switch(e){case"applied":case"applied-placement":case"applied-placement-with-ubiquity":case"applied-placement-partial":return!0;case"unavailable-too-few-pages":case"unavailable-legacy-scan":return!1}}const jm=j(["all","content","template"]);jm.enum;const zO=j(["anchor","redirect","canonical","link"]);zO.enum;const Tc=d({nodeKey:r(),url:r(),finalUrl:r().nullable(),path:r(),parentPath:r(),discoverySource:r(),fetchState:r(),httpStatus:m().int().nullable(),canonicalUrl:r().nullable(),indexabilityState:r(),indexabilityReasons:y(r()).default([]),auditState:r(),auditScore:m().nullable(),inventoryEligible:E(),depth:m().int().nullable(),inboundUniqueEdges:m().int().nonnegative(),outboundUniqueEdges:m().int().nonnegative(),inboundOccurrences:m().int().nonnegative(),outboundOccurrences:m().int().nonnegative(),linkScoreRaw:m().nullable(),linkScoreNormalized:ot().nullable(),healthState:km,healthReason:$r.optional()}),IO=d({type:j(["found","missing","info","timeout","unreachable"]),code:r().min(1),message:r().min(1)}),rw=lj.extend({status:Sg,applicable:E().nullable(),findings:y(IO).default([]),recommendations:y(r()).default([])}),lw=d({id:r().min(1),severity:j(["critical","warning"]),detail:r().min(1),recommendation:r().min(1)}),hd=d({project:r(),runId:r(),complete:E(),termination:r().nullable(),runSelection:Va.optional()}),cw=d({nodeKey:r(),url:r(),auditState:r()});Be("state",[d({state:R("no-crawl"),project:r(),runId:ue()}),hd.extend({state:R("details-unavailable")}),hd.extend({state:R("not-found")}),hd.merge(cw).extend({state:R("not-audited"),auditScore:ue(),factors:y(rw).length(0).default([]),criticalDefects:y(lw).length(0).default([])}),hd.merge(cw).extend({state:R("ready"),auditScore:m(),evidenceState:j(["complete","scores-only"]),factors:y(rw).default([]),criticalDefects:y(lw).default([])})]);const OO=j(["applied","unavailable-legacy-scan"]),$c={complete:E(),termination:r().nullable(),runSelection:Va.optional()};d({project:r(),hasCrawlData:E(),runId:r().nullable(),...$c,requestedDate:kn.optional(),availableScanDates:dj.optional(),inventorySummary:uj.nullable().optional(),healthReasonCounts:y(cj).max($r.options.length).nullable().optional(),total:m().int().nonnegative(),nextCursor:r().nullable(),healthStateFilter:Qe([OO,ue()]).default(null),pages:y(Tc).default([])});const PO=d({path:r(),url:r().nullable(),hasPage:E(),pageCount:m().int().positive(),inventoryEligibleCount:m().int().nonnegative(),fetchedCount:m().int().nonnegative()});d({project:r(),hasCrawlData:E(),runId:r().nullable(),...$c,parentPath:r(),nextCursor:r().nullable(),children:y(PO).default([])});const So=d({edgeKey:r(),sourceNodeKey:r(),sourceUrl:r(),targetNodeKey:r().nullable(),targetUrl:r(),relation:r(),internal:E(),followable:E(),occurrences:m().int().positive(),followableOccurrences:m().int().nonnegative(),nofollowOccurrences:m().int().nonnegative(),anchors:y(r()).default([]),isTemplate:Qe([E(),ue()]),templateRatio:Qe([we(),ue()]),templateSource:mj,placementOccurrences:Qe([DO,ue()])}),qO=d({nodeKey:r(),url:r(),path:r(),depth:m().int().nonnegative().nullable(),indexabilityState:r(),fetchState:r(),auditState:r(),auditScore:m().nullable(),inventoryEligible:E(),inboundUniqueEdges:m().int().nonnegative(),outboundUniqueEdges:m().int().nonnegative(),linkScoreNormalized:ot().nullable(),healthState:km,healthReason:$r.optional(),x:m(),y:m()}),MO=d({edgeKey:r(),sourceNodeKey:r(),targetNodeKey:r(),followable:E(),occurrences:m().int().positive(),isTemplate:E()}),BO=j(["no-crawl","legacy-snapshot","details-unavailable","layout-failed","empty-crawl"]),LO=Be("state",[d({state:R("ready"),version:r().min(1),computedAt:r().min(1),templateLinksExcluded:E()}),d({state:R("unavailable"),version:ue(),reason:BO})]);d({project:r(),hasCrawlData:E(),runId:r().nullable(),rootNodeKey:r().nullable(),...$c,layout:LO,templateDetection:Sm,linkKind:jm,totalNodes:m().int().nonnegative(),totalEdges:m().int().nonnegative(),totalTemplateEdges:m().int().nonnegative(),totalContentEdges:m().int().nonnegative(),nodes:y(qO).default([]),edges:y(MO).default([]),omittedNodes:m().int().nonnegative(),omittedEdges:m().int().nonnegative(),sampled:E()});const Fee=2e4,Qee=5e4,UO=j(["focus","inbound","outbound","both","transitive"]),VO=Tc.extend({distance:m().int().nonnegative(),relationToFocus:UO});d({project:r(),hasCrawlData:E(),runId:r().nullable(),complete:E(),termination:r().nullable(),runSelection:Va.optional(),state:j(["no-crawl","details-unavailable","ready"]),focusNodeKey:r().nullable(),focusUrl:r().nullable(),hops:m().int().min(0).max(3),totalNodes:m().int().nonnegative(),totalEdges:m().int().nonnegative(),nodes:y(VO).default([]),edges:y(So).default([]),omittedNodes:m().int().nonnegative(),omittedEdges:m().int().nonnegative(),countAccuracy:j(["exact","lower-bound"]),truncated:E()});const uw=d({nodeKey:r(),url:r(),path:r()});d({project:r(),runId:r().nullable(),complete:E(),termination:r().nullable(),runSelection:Va.optional(),state:j(["no-crawl","details-unavailable","found","unreachable","truncated"]),from:uw.nullable(),to:uw.nullable(),maxDepth:m().int().positive(),visitedNodes:m().int().nonnegative(),nodes:y(Tc).default([]),edges:y(So).default([])});const pj=j(["added","removed","changed"]),$O=d({entity:R("page"),change:pj,key:r(),changedFields:y(r()).default([]),before:Tc.nullable(),after:Tc.nullable()}),GO=d({entity:R("link"),change:pj,key:r(),changedFields:y(r()).default([]),before:So.nullable(),after:So.nullable()}),KO=Be("entity",[$O,GO]),dw=d({added:m().int().nonnegative(),removed:m().int().nonnegative(),changed:m().int().nonnegative()}),HO=d({scope:j(["all","pages","links"]),change:j(["all","added","removed","changed"])});Be("state",[d({project:r(),state:R("unavailable"),reason:j(["no-crawl","insufficient-history","details-unavailable","partial-not-comparable"]),fromRunId:r().nullable(),toRunId:r().nullable()}),d({project:r(),state:R("incompatible"),reason:R("incompatible-versions"),fromRunId:r(),toRunId:r(),mismatchedVersions:y(r()).min(1)}),d({project:r(),state:R("ready"),fromRunId:r(),toRunId:r(),versions:d({crawlSchema:r(),normalization:r(),indexability:r(),linkScore:r()}),filters:HO,summaryState:j(["exact","omitted-on-continuation"]),summary:d({pages:dw,links:dw}).nullable(),total:m().int().nonnegative().nullable(),nextCursor:r().nullable(),changes:y(KO).default([])})]);d({project:r(),hasCrawlData:E(),runId:r().nullable(),...$c,total:m().int().nonnegative(),nextCursor:r().nullable(),templateDetection:Sm,linkKind:jm,edges:y(So).default([])});d({project:r(),hasCrawlData:E(),runId:r().nullable(),...$c,nodeKey:r().nullable(),url:r().nullable(),templateDetection:Sm,linkKind:jm,inbound:y(So).default([]),outbound:y(So).default([]),inboundTruncated:E(),outboundTruncated:E()});const mw=d({findingKey:r(),severity:r(),sourceNodeKey:r().nullable(),sourceUrl:r().nullable(),targetNodeKey:r().nullable(),targetUrl:r().nullable(),evidence:He(r(),wn()).default({})});Be("state",[d({project:r(),runId:r().nullable(),state:R("unavailable"),legacyAuditAvailable:E(),runSelection:Va.optional()}),d({project:r(),runId:r(),state:R("disabled"),checkDeadLinks:R(!1),runSelection:Va.optional()}),d({project:r(),runId:r(),state:R("complete"),checkDeadLinks:R(!0),runSelection:Va.optional(),checked:m().int().nonnegative(),found:m().int().nonnegative(),unverified:m().int().nonnegative(),total:m().int().nonnegative(),nextCursor:r().nullable(),deadLinks:y(mw).default([])}),d({project:r(),runId:r(),state:R("partial"),checkDeadLinks:R(!0),runSelection:Va.optional(),checked:m().int().nonnegative(),found:m().int().nonnegative(),unverified:m().int().nonnegative(),total:m().int().nonnegative(),nextCursor:r().nullable(),deadLinks:y(mw).default([])})]);const hj=5e4,Am=m().int().min(1).max(hj);function pw(e){return`${e.toLocaleString("en-US")} ${e===1?"page":"pages"}`}function Zee(e){return e===null?`full site (up to ${pw(hj)})`:pw(e)}const Yee=10,fj=100;d({sitemapUrl:r().url().optional(),limit:m().int().positive().max(2e3).optional(),maxPages:Am.optional(),maxEdges:m().int().positive().max(1e6).optional(),maxDepth:m().int().min(0).max(100).optional(),checkDeadLinks:E().default(!1)});d({runId:r(),status:ha});const FO=d({runId:r(),status:ha,createdAt:r(),startedAt:r().nullable(),finishedAt:r().nullable(),hasCrawlData:E()});d({project:r(),preferredRunId:r().nullable().optional(),scans:y(FO).default([])});const QO=j(["queued","discovering","checking","arranging-map","completed","partial","failed","cancelled"]),ZO=d({state:j(["pending","ready","unavailable"]),layoutVersion:r().nullable(),failureCode:r().nullable(),updatedAt:r().nullable()}),YO=d({id:r(),state:r(),pagesDiscovered:m().int().nonnegative(),pagesFetched:m().int().nonnegative(),pagesEligible:m().int().nonnegative(),pagesErrored:m().int().nonnegative(),edgesDiscovered:m().int().nonnegative(),lastUpdatedAt:r(),startedAt:r().nullable(),finishedAt:r().nullable(),error:r().nullable()});d({project:r(),runId:r(),status:ha,phase:QO,attempt:YO.nullable(),layout:ZO,error:r().nullable()});const XO=j(["waiting","collecting","terminal"]),JO=d({nodeKey:r(),url:r(),auditScore:m(),checksNeedingAttention:m().int().nonnegative()});d({project:r(),runId:r(),status:ha,state:XO,attemptId:r().nullable(),pagesAudited:m().int().nonnegative(),updatedAt:r().nullable(),examples:y(JO).max(12).default([])});new Set(w2.map(e=>e.toLowerCase()));const WO=4,eP=3,tP=10,nP=80,gj=y(r()).describe(`Operator-curated names this competitor goes by in answer text (at most ${tP}, each ${nP} characters or fewer, at least ${eP} letters or digits).`);d({aliases:gj});const aP=d({domain:r().trim().min(1),aliases:gj.optional()}),yj=Qe([r().trim().min(1),aP]),bj=j(["cli","api","config-file"]);function iP(e){const n=new Set,i=new Set;for(const o of e){if(n.has(o.label)){i.add(o.label);continue}n.add(o.label)}return[...i]}function sP(e,n){return n?e.some(i=>i.label===n):!0}const vj=20,xj=200,oP=d({displayName:r().min(1),canonicalDomain:r().min(1),ownedDomains:y(r().min(1)).optional(),aliases:y(r()).optional(),country:r().length(2),language:r().min(2),tags:y(r()).optional(),labels:He(r(),r()).optional(),providers:y(jt).optional(),providerModels:X0.optional(),providerDispatchModes:ng.optional(),locations:y(mn).optional(),defaultLocation:r().nullable().optional(),measurement:tg.optional(),autoExtractBacklinks:E().optional(),qualifiedAliases:y(r().trim().min(1).max(xj)).max(vj).optional(),negativeReviewMaxStars:sg.nullable().optional(),siteAuditMaxPages:Am.nullable().optional(),configSource:bj.optional()});oP.extend({name:r().trim().min(1).max(120)});const rP=d({id:r(),name:r(),displayName:r().optional(),canonicalDomain:r(),ownedDomains:y(r()).default([]),aliases:y(r()).default([]),qualifiedAliases:y(r()).default([]),country:r().length(2),language:r().min(2),tags:y(r()).default([]),labels:He(r(),r()).default({}),providers:y(r()).default([]),providerModels:X0.default({}),providerDispatchModes:ng.default({}),locations:y(mn).default([]),defaultLocation:r().nullable().optional(),measurement:tg.default(b2),autoExtractBacklinks:E().default(!1),negativeReviewMaxStars:sg.nullable().optional(),siteAuditMaxPages:Am.nullable().optional(),configSource:bj.default("cli"),configRevision:m().int().positive().default(1),createdAt:r().optional(),updatedAt:r().optional()});d({id:r(),query:r(),createdAt:r()});d({id:r(),keyword:r(),createdAt:r()});d({queries:y(r().trim().min(1)).min(1)});d({keywords:y(r().trim().min(1)).min(1)});d({provider:jt,count:m().int().min(1).max(20).optional()});d({id:r(),domain:r(),aliases:y(r()),createdAt:r()});d({competitors:y(r().trim().min(1)).min(1)});d({competitors:y(yj).min(1)});function wj(e){const n=[e.canonicalDomain,...e.ownedDomains??[]],i=new Set,o=[];for(const u of n){const h=u.trim();if(!h)continue;const f=Vd(h);i.has(f)||(i.add(f),o.push(h))}return o}function lP(e,n){if(!n||n.length===0)return[];const i=e?.trim().toLowerCase()??"",o=new Set,u=[];for(const h of n){const f=h.trim();if(!f)continue;const b=f.toLowerCase();b!==i&&(o.has(b)||(o.add(b),u.push(f)))}return u}function cP(e){const n=[],i=new Set,o=h=>{const f=Ga(h);!f||i.has(f)||(i.add(f),n.push(h))},u=e.displayName?.trim()??"";u&&o(u);for(const h of lP(e.displayName,e.aliases))o(h);for(const h of wj({canonicalDomain:e.canonicalDomain??"",ownedDomains:e.ownedDomains??[]})){const f=ig(h);if(Ga(f).length>=WO)o(f);else{const b=Vd(h);b.includes(".")&&o(b)}}return n}const uP=d({name:r().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,{message:"Name must be a lowercase slug (letters, numbers, hyphens)"}),labels:He(r(),r()).optional().default({})}),dP=d({preset:r().min(1).optional(),cron:r().min(1).optional(),recurrence:W0.optional(),timezone:r().optional().default("UTC"),providers:y(jt).optional().default([]),enabled:E().optional()}).refine(e=>[e.preset,e.cron,e.recurrence].filter(n=>n!==void 0).length===1,{message:'Exactly one of "preset", "cron", or "recurrence" must be provided'}).optional(),mP=d({channel:R("webhook"),url:r().url(),events:y(eg).min(1)}),pP=d({gsc:d({propertyUrl:r()}).optional(),syncSchedule:d({preset:r().optional(),cron:r().optional()}).optional()}).optional(),hw=y(r().min(1)),hP=d({displayName:r().min(1),canonicalDomain:r().min(1),ownedDomains:y(r().min(1)).optional().default([]),aliases:y(r().min(1)).optional().default([]),qualifiedAliases:y(r().min(1).max(xj)).max(vj).optional(),country:r().length(2),language:r().min(2),queries:hw.optional(),keywords:hw.optional(),competitors:y(yj).optional().default([]),providers:y(jt).optional().default([]),providerModels:X0.optional().default({}),providerDispatchModes:ng.optional(),locations:y(mn).optional().default([]),defaultLocation:r().optional(),measurement:tg.optional().default(b2),schedule:dP,notifications:y(mP).optional().default([]),google:pP,autoExtractBacklinks:E().optional().default(!1),negativeReviewMaxStars:sg.optional(),siteAuditMaxPages:Am.nullable().optional()}).superRefine((e,n)=>{e.queries!==void 0&&e.keywords!==void 0&&n.addIssue({code:"custom",message:"Use spec.queries; spec.keywords is accepted only as a legacy alias when spec.queries is omitted",path:["keywords"]});const i=iP(e.locations);i.length>0&&n.addIssue({code:"custom",message:`Duplicate location labels are not allowed: ${i.join(", ")}`,path:["locations"]}),sP(e.locations,e.defaultLocation)||n.addIssue({code:"custom",message:`defaultLocation "${e.defaultLocation}" must match a configured location label`,path:["defaultLocation"]})});d({apiVersion:R("canonry/v1"),kind:R("Project"),metadata:uP,spec:hP});const fP=1,gP=r().refine(e=>e.trim().length>0,{message:"Must not be blank"}),kj=d({displayName:r(),aliases:y(r()),canonicalDomain:r(),ownedDomains:y(r()),qualifiedAliases:y(r()).optional()}).strict(),Sj=d({provider:jt.refine(e=>e.trim().length>0,{message:"Provider must not be blank"}),requestedModel:r().nullable()}).strict(),jj=d({domain:r(),label:r(),aliases:y(r())}).strict(),Aj=d({queryId:gP,queryText:r(),provenance:r().nullable()}).strict(),yP=Aj.extend({queryClass:Vr.nullable()}).strict();function Nj(e,n){const i=new Set;e.engines.forEach((h,f)=>{const b=h.provider.trim().toLocaleLowerCase("en");i.has(b)&&n.addIssue({code:ye.custom,path:["engines",f,"provider"],message:`Duplicate engine provider "${h.provider}"`}),i.add(b)});const o=new Set;e.queries.forEach((h,f)=>{o.has(h.queryId)&&n.addIssue({code:ye.custom,path:["queries",f,"queryId"],message:`Duplicate query id "${h.queryId}"`}),o.add(h.queryId)});const u=new Set;e.competitors?.forEach((h,f)=>{const b=h.domain;u.has(b)&&n.addIssue({code:ye.custom,path:["competitors",f,"domain"],message:`Duplicate competitor domain "${h.domain}"`}),u.add(b)})}d({capturedAt:r().datetime(),identity:kj,country:r(),language:r(),location:mn.nullable(),engines:y(Sj).min(1),competitors:y(jj).optional(),queries:y(Aj)}).strict().superRefine(Nj);d({schemaVersion:R(fP),capturedAt:r().datetime(),identity:kj,country:r(),language:r(),location:mn.nullable(),engines:y(Sj).min(1),competitors:y(jj).optional(),queries:y(yP)}).strict().superRefine(Nj);const bP=j(["auto","simple","advanced"]),vP=j(["simple","advanced"]),Cj=j(["branded","non-brand","unknown","all"]),xP=j(["branded","non-brand","unknown"]),jg=j(["project","group","market","property"]),_j=Be("kind",[d({kind:R("all")}).strict(),d({kind:R("none")}).strict(),d({kind:R("exact"),value:r().trim().min(1)}).strict()]);function wP(e){if(e===void 0||e==="")return{kind:"all"};const n=e.normalize("NFKC").trim();return n===""?{kind:"all"}:n.toLocaleLowerCase("en")==="none"?{kind:"none"}:{kind:"exact",value:n}}const St=r().trim().min(1),Ui=r().datetime(),kP={mode:bP.default("auto"),queryClass:Cj.default("non-brand"),scope:jg.default("project"),scopeKey:St.optional(),marketKey:St.optional(),provider:St.optional(),model:St.optional(),location:r().trim().min(1).optional(),from:Ui.optional(),to:Ui.optional(),revision:m().int().positive().optional(),runId:St.optional(),queryKey:St.optional(),queryId:St.optional(),search:r().trim().min(1).optional(),cursor:St.optional(),limit:m().int().min(1).max(100).default(50)},Kd=d(kP).strict().superRefine((e,n)=>{e.scope!=="project"&&e.scopeKey===void 0&&n.addIssue({code:ye.custom,path:["scopeKey"],message:`scopeKey is required for ${e.scope} scope`}),e.scope==="project"&&e.scopeKey!==void 0&&n.addIssue({code:ye.custom,path:["scopeKey"],message:"scopeKey is not valid for project scope"}),e.scope==="market"&&e.marketKey!==void 0&&n.addIssue({code:ye.custom,path:["marketKey"],message:"marketKey is not valid for market scope"}),e.from!==void 0&&e.to!==void 0&&e.from>e.to&&n.addIssue({code:ye.custom,path:["to"],message:"to must be on or after from"}),e.queryKey!==void 0&&e.queryId!==void 0&&n.addIssue({code:ye.custom,path:["queryId"],message:"queryKey and queryId cannot both be supplied"})});Kd.transform(e=>({...e,location:wP(e.location)}));const Ea=d({numerator:m().int().nonnegative().nullable(),denominator:m().int().nonnegative().nullable(),rate:we(m().min(0).max(1)).nullable(),reason:j(["no-population","incomplete","evidence-incomplete","identity-ambiguous","not-applicable"]).optional(),unattributed:m().int().positive().optional(),unchecked:m().int().positive().optional()}).strict().superRefine((e,n)=>{if(e.numerator===null||e.denominator===null||e.rate===null){(e.numerator!==null||e.denominator!==null||e.rate!==null||e.reason===void 0)&&n.addIssue({code:ye.custom,message:"Unavailable rates require null values and a reason"}),e.unattributed!==void 0&&n.addIssue({code:ye.custom,path:["unattributed"],message:"Only an available rate can leave answers out"}),e.unchecked!==void 0&&n.addIssue({code:ye.custom,path:["unchecked"],message:"Only an available rate can leave answers out"});return}e.reason!==void 0&&n.addIssue({code:ye.custom,message:"Available rates cannot carry a reason"}),e.unattributed!==void 0&&e.unchecked!==void 0&&n.addIssue({code:ye.custom,path:["unchecked"],message:"A rate reads one signal: unattributed (mention) and unchecked (citation) cannot share it"});const{numerator:o,denominator:u}=e;u===null||o===null||(u===0&&n.addIssue({code:ye.custom,path:["denominator"],message:"Available rates require a positive denominator"}),o>u&&n.addIssue({code:ye.custom,path:["numerator"],message:"Numerator cannot exceed denominator"}))}),Tj=Be("kind",[d({kind:R("frozen-simple"),definitionRevision:ue()}).strict(),d({kind:R("legacy-simple"),definitionRevision:ue()}).strict(),d({kind:R("frozen-advanced"),definitionRevision:m().int().positive()}).strict(),d({kind:R("unsupported-advanced-v1"),definitionRevision:m().int().positive()}).strict()]),Hd=d({id:St,label:r().trim().min(1),kind:jg,targetCount:m().int().nonnegative(),parentGroupIds:y(St).optional(),marketKeys:y(St).optional()}).strict(),SP=d({provider:St,model:St}).strict(),jP=d({providers:y(St),models:y(SP),locations:y(_j)}).strict(),AP=d({queryCount:m().int().nonnegative(),answerCount:m().int().nonnegative(),mentionCoverage:Ea,citationCoverage:Ea,propertyReach:Ea,outcomes:d({bothSignals:m().int().nonnegative(),mentionedOnly:m().int().nonnegative(),citedOnly:m().int().nonnegative(),neither:m().int().nonnegative(),notMeasured:m().int().nonnegative(),total:m().int().nonnegative()}).strict().superRefine((e,n)=>{e.bothSignals+e.mentionedOnly+e.citedOnly+e.neither+e.notMeasured!==e.total&&n.addIssue({code:ye.custom,message:"Outcome partition must sum to total"})})}).strict(),NP=d({runId:St,createdAt:Ui,revision:m().int().positive().nullable(),provenance:Tj,queryCount:m().int().nonnegative(),answerCount:m().int().nonnegative(),mentionCoverage:Ea,citationCoverage:Ea,continuity:d({state:j(["first","comparable","definition-changed","model-changed","legacy-unknown"]),comparedRunId:r().nullable()}).strict()}).strict(),CP=d({sourceSnapshotIds:y(St).default([]),queryKey:St,queryId:r().nullable(),query:r(),provider:St,model:r().nullable(),location:r().nullable(),targetKeys:y(St),marketKeys:y(St).optional(),answerCount:m().int().nonnegative(),mentionCoverage:Ea,citationCoverage:Ea}).strict(),_P=d({answerId:St,runId:St,queryKey:St,query:r(),provider:St,model:r().nullable(),location:r().nullable(),targetKeys:y(St),mentioned:E().nullable(),mentionUnavailableReason:R("identity-ambiguous").optional(),cited:E().nullable(),answerText:r().nullable(),createdAt:Ui,sources:y(r()),observedCompetitors:y(St)}).strict(),TP=d({domain:St,answerCount:m().int().nonnegative(),mentionCoverage:Ea,citationCoverage:Ea}).strict(),EP=d({name:St,answerCount:m().int().nonnegative()}).strict(),RP=Be("state",[d({state:R("available")}).strict(),d({state:R("unavailable"),reason:R("frozen-competitor-identity-missing")}).strict()]),fw=d({id:St,label:r().trim().min(1),queryCount:m().int().nonnegative(),mentionCoverage:Ea,citationCoverage:Ea}).strict();function gw(e){return d({items:y(e),nextCursor:r().nullable(),total:m().int().nonnegative()}).strict()}const Ej=j(["current-unavailable","previous-unavailable","not-applicable"]),Xee=Ej.enum,gf=Be("state",[d({state:R("available"),previous:Ea,delta:we(m().min(-1).max(1))}).strict(),d({state:R("unavailable"),reason:Ej}).strict()]),yw=d({id:St,createdAt:Ui,completedAt:Ui.nullable()}).strict(),Rj=j(["no-selected-run","no-previous-run","scoped-run","partial-run","definition-changed","model-changed","legacy-unknown"]),Jee=Rj.enum,DP=Be("state",[d({state:R("available"),previousRun:yw,mentionCoverage:gf,citationCoverage:gf,propertyReach:gf}).strict(),d({state:R("unavailable"),reason:Rj,previousRun:yw.nullable()}).strict()]),zP=d({queryClass:xP,summary:AP,trend:y(NP),comparison:DP.optional(),queries:gw(CP),evidence:gw(_P),competitorAvailability:RP,competitors:y(TP),observedCompetitors:y(EP),breakdown:d({properties:y(fw),groups:y(fw)}).strict()}).strict(),IP=j(["measured","not-measured","partial"]),OP=d({state:IP,activeRevision:m().int().positive().nullable(),measuredRevision:m().int().positive().nullable(),awaitingSweep:E(),pendingAssignmentCount:m().int().nonnegative(),completedAt:Ui.nullable()}).strict(),PP=d({mode:vP,queryClass:Cj,scope:Hd,market:Hd.optional(),provider:r().nullable(),model:r().nullable(),location:_j,time:d({from:Ui.nullable(),to:Ui.nullable()}).strict(),revision:m().int().positive().nullable(),run:d({id:r().nullable(),explicit:E()}).strict(),provenance:Tj,measurement:OP,availability:Be("state",[d({state:R("available")}).strict(),d({state:R("unsupported"),reason:R("advanced-v1")}).strict()])}).strict();d({selection:PP,scopeOptions:y(Hd),filterOptions:jP,populations:y(zP).min(1)}).strict().superRefine((e,n)=>{const i=e.selection.queryClass==="all"?["branded","non-brand","unknown"]:[e.selection.queryClass],o=e.populations.map(u=>u.queryClass);(o.length!==i.length||o.some((u,h)=>u!==i[h]))&&n.addIssue({code:ye.custom,path:["populations"],message:"Populations must exactly match the selected query class order"});for(const[u,h]of e.populations.entries()){const f=h.comparison;if(f?.state==="available")for(const b of["mentionCoverage","citationCoverage","propertyReach"]){const v=f[b];if(v.state!=="available")continue;const x=["populations",u,"comparison",b],k=h.summary[b].rate,S=v.previous.rate;k===null&&n.addIssue({code:ye.custom,path:x,message:"Available changes require a current rate"}),S===null&&n.addIssue({code:ye.custom,path:[...x,"previous","rate"],message:"Available changes require a previous rate"}),k!==null&&S!==null&&Math.abs(v.delta-(k-S))>Number.EPSILON&&n.addIssue({code:ye.custom,path:[...x,"delta"],message:"Delta must equal current minus previous"}),e.selection.run.id===null&&n.addIssue({code:ye.custom,path:x,message:"Available changes require a selected run"})}}});const Dj=j(["retired-scope","retired-market"]),qP=Dj.enum,MP=d({reason:Dj,kind:jg.exclude(["project"]),key:St}).strict().superRefine((e,n)=>{e.reason===qP["retired-market"]&&e.kind!=="market"&&n.addIssue({code:ye.custom,path:["kind"],message:"retired-market details must name a market"})});function Wee(e){const n=MP.safeParse(e);return n.success?n.data:void 0}function BP(e,n){let i=e;for(const[o,u]of Object.entries(n))i=i.split(`{${o}}`).join(u);return i.trim()}const Ag=r().regex(/^[a-f0-9]{64}$/),ca=r().trim().min(1).max(256),Ka=r().trim().min(1).max(4e3),Ng=r().datetime(),Nm=r().regex(/^qtw_[a-f0-9]{64}$/),zj=r().regex(/^qtp_[a-f0-9]{64}$/),Cg=j(["simple","advanced"]),Ij=d({templateId:ca,templateVersion:r().trim().min(1).max(256),template:Ka,bindings:He(r().trim().min(1).max(128),r().trim().min(1).max(128)),output:Ka}).strict(),LP=d({source:j(["manual","query-set","template","research","discovery"]),sourceId:ca.nullable(),capturedAt:r().datetime(),template:Ij.optional()}).strict().superRefine((e,n)=>{e.source==="template"&&e.template===void 0&&n.addIssue({code:ye.custom,path:["template"],message:"Template provenance is required for a template query."}),e.source!=="template"&&e.template!==void 0&&n.addIssue({code:ye.custom,path:["template"],message:"Only a template query may carry template provenance."})}),UP=Be("source",[d({source:R("manual"),text:Ka}).strict(),d({source:R("template"),templateId:ca,templateVersion:r().trim().min(1).max(256),template:Ka}).strict(),d({source:R("research"),researchRunQueryId:ca}).strict(),d({source:R("discovery"),discoveryProbeId:ca}).strict()]),_g=d({targetKeys:y(he).optional(),groupKeys:y(he).optional(),marketKeys:y(he).optional()}).strict(),VP=d({providers:y(jt).min(1),models:He(jt,r().trim().min(1)),location:r().trim().min(1).nullable()}).strict(),$P=d({input:UP,audience:_g.optional(),contexts:y(VP).min(1).optional(),queryClass:Vr.optional()}).strict(),GP=d({queryId:ca.optional(),queryText:Ka.optional(),audience:_g.optional()}).strict().superRefine((e,n)=>{e.queryId===void 0==(e.queryText===void 0)&&n.addIssue({code:ye.custom,message:"Provide exactly one of queryId or queryText."})}),KP=d({queryId:ca,audience:_g.optional(),text:Ka.optional(),queryClass:Qe([Vr,ue()]).optional()}).strict().superRefine((e,n)=>{e.text===void 0&&e.queryClass===void 0&&n.addIssue({code:ye.custom,message:"Provide query text or a classification change."})}),HP=d({additions:y($P),removals:y(GP),edits:y(KP).optional()}).strict(),FP=HP.extend({expectedWorkspaceVersion:Nm}).strict();FP.extend({previewToken:zj,reviewedAt:Ng}).strict();const QP=d({stableKey:he,label:r().trim().min(1)}).strict(),ZP=d({stableKey:he,parentGroupKey:he.optional(),label:r().trim().min(1),targetKeys:y(he)}).strict(),YP=d({stableKey:he,groupKey:he.optional(),label:r().trim().min(1),usageEdges:y(mg)}).strict(),XP=d({targetKey:he,groupKeys:y(he),marketKeys:y(he),queryClass:Vr.nullable(),classificationSource:j(["frozen","server","operator"]),contexts:y(vm).min(1)}).strict(),Oj=d({queryId:ca,queryText:Ka,normalizedText:Ka,provenance:LP.nullable(),state:j(["tracked","awaiting-sweep"]),lastMeasuredAt:r().datetime().nullable(),assignments:y(XP)}).strict(),JP=d({researchRunId:ca,researchRunQueryId:ca,queryText:Ka,createdAt:r().datetime()}).strict(),WP=d({discoverySessionId:ca,discoveryProbeId:ca,queryText:Ka,createdAt:r().datetime()}).strict();d({mode:Cg,workspaceVersion:Nm,active:d({revision:m().int().positive(),compiledChecksum:Ag}).strict().nullable(),defaultContexts:y(vm),targets:y(QP),groups:y(ZP),markets:y(YP),scopeOptions:y(Hd).optional(),tracked:y(Oj),savedSources:d({research:y(JP),discovery:y(WP)}).strict()}).strict();const fd=d({queryId:ca,queryText:Ka,assignmentCount:m().int().nonnegative()}).strict(),Pj=d({added:y(fd),removed:y(fd),reused:y(fd),unchanged:y(fd),noOp:E()}).strict(),qj=d({existingNodes:m().int().nonnegative(),existingProviderCalls:m().int().nonnegative(),nextSweepNodes:m().int().nonnegative(),nextSweepProviderCalls:m().int().nonnegative(),addedNodes:m().int().nonnegative(),addedProviderCalls:m().int().nonnegative(),removedNodes:m().int().nonnegative(),removedProviderCalls:m().int().nonnegative()}).strict();d({mode:Cg,workspaceVersion:Nm,previewToken:zj,reviewedAt:Ng,active:d({revision:m().int().positive(),compiledChecksum:Ag}).strict().nullable(),tracked:y(Oj),diff:Pj,workload:qj}).strict();d({committed:E(),mode:Cg,workspaceVersion:Nm,reviewedAt:Ng,active:d({revision:m().int().positive(),compiledChecksum:Ag}).strict().nullable(),diff:Pj,workload:qj}).strict();j(["proposed","alias","shared","unmatched","excluded"]);j(["primary-match","exact-slug-match","excluded-slug","shared-path","unmatched-path","alias-without-primary","unsupported-slug"]);const eq=j(["invalid-url","unowned-host","duplicate-url","url-cap-reached"]),tq=d({kind:j(["exact","prefix","suffix","contains"]),value:r().trim().min(1)}).strict(),bw=d({host:r().trim().min(1),pathTemplate:r().trim().min(1)}).strict(),Tg=d({primary:bw,aliases:y(bw).optional(),excludedSlugSuffixes:y(r().trim().min(1)).optional(),excludedSlugPatterns:y(tq).optional()}).strict();d({sitemapUrl:r().url().refine(e=>{try{const n=new URL(e).protocol;return n==="http:"||n==="https:"}catch{return!1}},"Sitemap URL must use http or https"),rule:Tg,maxUrls:m().int().positive().max(1e4).optional()}).strict();const yf=d({url:r(),canonicalUrl:r().nullable(),classification:j(["shared","unmatched","excluded"]),reason:j(["excluded-slug","shared-path","unmatched-path","alias-without-primary","unsupported-slug"])}).strict().superRefine((e,n)=>{({shared:["shared-path"],unmatched:["unmatched-path","alias-without-primary","unsupported-slug"],excluded:["excluded-slug"]})[e.classification].includes(e.reason)||n.addIssue({code:"custom",message:"Discovery classification and reason do not match"})}),nq=d({classification:R("proposed"),reason:R("primary-match"),stableKey:gn,slug:r().trim().min(1),label:r().trim().min(1),primaryUrl:r().url(),aliasCoverageUrls:y(r().url())}).strict(),aq=d({classification:R("alias"),reason:R("exact-slug-match"),slug:r().trim().min(1),url:r().url(),targetStableKey:gn}).strict(),iq=d({kind:eq,url:r(),canonicalUrl:r().nullable(),duplicateOf:r().optional()}).strict();d({proposed:y(nq),aliases:y(aq),shared:y(yf),unmatched:y(yf),excluded:y(yf),diagnostics:y(iq)}).strict().superRefine((e,n)=>{const i=[["shared",["shared"]],["unmatched",["unmatched"]],["excluded",["excluded"]]];for(const[o,u]of i)for(const h of e[o])u.includes(h.classification)||n.addIssue({code:"custom",path:[o],message:"Discovery item is in the wrong result bucket"})});const Eg=j(["assigned","sibling","ownedUnmapped","external","ambiguous","invalid"]),Mj=j(["baseline","target"]),Bj=j(["incomplete","evidence-incomplete","identity-ambiguous","no-population","aliasless","no-competitors","no-project-aliases"]),jo=Qe([d({numerator:m().int().nonnegative(),denominator:m().int().positive(),rate:we(m().min(0).max(1)),unattributed:m().int().positive().optional(),unchecked:m().int().positive().optional()}).strict(),d({numerator:ue(),denominator:ue(),rate:ue(),reason:Bj}).strict()]).superRefine((e,n)=>{e.numerator!==null&&e.numerator>e.denominator&&n.addIssue({code:"custom",path:["numerator"],message:"Rate numerator cannot exceed denominator"}),e.numerator!==null&&e.unattributed!==void 0&&e.unchecked!==void 0&&n.addIssue({code:"custom",path:["unchecked"],message:"A rate reads one signal: unattributed (mention) and unchecked (citation) cannot share it"})}),sq=r().trim().min(1).overwrite(e=>e.toLocaleLowerCase("en")),oq=d({executionId:r().trim().min(1),queryText:r().trim().min(1),provider:sq,context:mn.nullable(),requestedModel:r().trim().min(1).optional()}).strict();d({schemaVersion:R(1),expectedSlots:y(oq)}).strict().superRefine((e,n)=>{const i=new Set;for(const[o,u]of e.expectedSlots.entries()){const h=[u.executionId,u.provider].join("\0");i.has(h)&&n.addIssue({code:"custom",path:["expectedSlots",o],message:"Duplicate expected provider slot"}),i.add(h)}});const Cm=d({executed:m().int().nonnegative(),expected:m().int().nonnegative(),complete:E(),sourceComplete:E(),sourceCompleteObservations:m().int().nonnegative(),answerComplete:E()}).strict(),vw=Qe([d({domain:r().trim().min(1),own:E(),presentIn:m().int().nonnegative(),of:m().int().positive()}).strict(),d({domain:r().trim().min(1),own:E(),presentIn:ue(),of:ue(),reason:Bj}).strict()]),rq=d({domains:y(vw),providers:y(d({provider:jt,domains:y(vw)}).strict())}).strict(),lq=d({provider:jt,completeness:Cm,answerCoverage:jo}).strict(),cq=d({id:r().trim().min(1),label:r().trim().min(1),targetIds:y(r().trim().min(1)),completeness:Cm,answerCoverage:jo,targetCoverage:jo,sov:rq,providers:y(lq)}).strict(),uq=d({provider:jt,completeness:Cm,citationCoverage:jo,mentionCoverage:jo}).strict(),dq=d({id:r().trim().min(1),label:r().trim().min(1),completeness:Cm,citationCoverage:jo,mentionCoverage:jo,providers:y(uq)}).strict(),Lj=d({observationId:r().trim().min(1),expectedSlotId:r().trim().min(1),executionId:r().trim().min(1),usageEdgeId:r().trim().min(1),usageEdgeType:Mj,provider:jt,queryText:r().trim().min(1),location:r().nullable(),sourceUrl:r(),bridged:E(),historical:E(),evidenceComplete:E(),classification:Eg,normalizedUrl:r().nullable(),matchedTargetIds:y(r().trim().min(1)),matchedUrlIds:y(r().trim().min(1))}).strict(),mq=d({sourceUrl:r(),normalizedUrl:r().nullable(),classification:Eg,matchedTargetIds:y(r().trim().min(1)),matchedUrlIds:y(r().trim().min(1))}).strict(),pq=d({observationId:r().trim().min(1),expectedSlotId:r().trim().min(1),executionId:r().trim().min(1),usageEdgeId:r().trim().min(1),usageEdgeType:Mj,provider:jt,queryText:r().trim().min(1),location:r().nullable(),queryClass:Qe([j(["branded","non-brand"]),ue()]),mentioned:E().nullable(),cited:E().nullable(),sources:y(mq),sourceCount:m().int().nonnegative(),sourcesTruncated:E(),bridged:E(),historical:E(),evidenceComplete:E()}).strict(),hq=d({bridgedObservationIds:y(r()),historicalObservationIds:y(r()),evidenceIncompleteObservationIds:y(r()),ambiguousObservationIds:y(r()),unmatchedObservationIds:y(r())}).strict(),fq=d({id:r().trim().min(1),status:j(["completed","partial"]),createdAt:r().datetime(),startedAt:r().datetime().nullable(),finishedAt:r().datetime().nullable()}).strict();d({revision:m().int().positive(),run:fq.nullable(),groups:y(cq),targets:y(dq),evidence:y(Lj),diagnostics:hq}).strict();d({property:d({targetKey:he,label:r().min(1)}).strict(),queryClass:pa,measurement:d({state:fg,displayedRunId:r().min(1).optional(),completedAt:r().datetime().optional()}).strict(),evidence:zr(Lj).optional(),answers:zr(pq).optional()}).strict().refine(e=>e.evidence===void 0!=(e.answers===void 0),{message:"Exactly one of evidence or answers is present, naming the shape that was served."});const Rg=j(["queued","running","completed","partial","failed"]);Rg.enum;const Uj=j(["not_answer_visibility","not_plan_run","scoped_or_probe","status_not_partial","plan_revision_changed","manifest_unreadable","model_not_frozen","model_retired","provider_not_in_plan","provider_nothing_missing","provider_not_configured","too_old","superseded","quota_insufficient"]);Uj.enum;d({providers:y(jt).min(1).optional(),dryRun:E().optional()}).strict();const Vj=d({id:r(),runId:r(),projectId:r(),status:Rg,providers:y(r()),expected:m().int().nonnegative(),filled:m().int().nonnegative(),error:r().nullable(),createdAt:r(),startedAt:r().nullable(),finishedAt:r().nullable()}),gq=d({runId:r(),status:ha,planned:E(),readable:E(),expected:m().int().nonnegative(),executed:m().int().nonnegative(),missing:m().int().nonnegative(),missingByProvider:He(r(),m().int().nonnegative()),fillable:E(),refusal:d({code:Uj,message:r()}).nullable(),latestFill:Vj.nullable()}),yq=j(["queued","already-complete","dry-run"]);d({outcome:yq,completeness:gq,fill:Vj.nullable()});const da=r().trim().min(1),Os=r().trim().min(1),bq=r().trim().min(1),ke=m().int().nonnegative(),Gc=d({state:fg,displayedRunId:da.nullable(),planRevision:m().int().positive(),completedAt:r().datetime().nullable()}).strict(),Eo=d({targetKey:he,label:Os}).strict(),ua={runId:da.optional(),provider:jt.optional(),location:bq.optional()},Ao=r().trim().min(1),bf=5,vq=10,xq=5,wq=10,kq="tied Properties have both zero mentions and zero citations; ordered by name, not ranked",Dg=j(["weakest-properties","strongest-mentions","weakest-mentions","excluded-mentions","markets","observed-names","cited-domains"]);Dg.enum;d({runId:ua.runId,groupKey:he.optional(),queryClass:pa.default("non-brand"),provider:ua.provider,location:ua.location,limit:m().int().positive().max(50).optional(),includeNestedMarkets:E().optional(),compact:E().optional(),list:Dg.optional(),cursor:da.optional(),answers:j(["all","not-mentioned"]).optional()}).strict();const xw=i0,$j={metro:xw.nullable(),otherMetros:y(xw).min(1).optional(),submarkets:y(Os),queries:ke},Gj=d({name:Ao,answers:ke}).strict(),Sq=d({name:Ao,occurrences:ke}).strict(),_m=d({domain:r().trim().min(1),answers:ke}).strict(),jq=Eo.extend({...$j,mentionCoverage:dn,citationCoverage:dn,flags:ke,namedInsteadInAnswerText:y(Gj).max(bf).optional(),namedInsteadInAnswerTextTotal:ke.optional(),citedDomains:y(_m).max(bf).optional(),citedDomainsTotal:ke.optional(),recommendedInstead:y(Sq).max(bf).optional().meta({deprecated:!0,description:"Deprecated: read namedInsteadInAnswerText, which carries the same names in the same order. occurrences counts answers, exactly as answers does there."}),recommendedInsteadTotal:ke.optional().meta({deprecated:!0,description:"Deprecated: read namedInsteadInAnswerTextTotal, which it always equals."}),recommendedInsteadTruncated:E().optional().meta({deprecated:!0,description:"Deprecated: true when namedInsteadInAnswerTextTotal exceeds the names returned in namedInsteadInAnswerText."})}).strict().superRefine((e,n)=>{e.namedInsteadInAnswerText!==void 0&&(e.namedInsteadInAnswerTextTotal===void 0||e.namedInsteadInAnswerText.length>e.namedInsteadInAnswerTextTotal)&&n.addIssue({code:ye.custom,path:["namedInsteadInAnswerTextTotal"],message:"Total cannot be smaller than the returned names"}),e.citedDomains!==void 0&&(e.citedDomainsTotal===void 0||e.citedDomains.length>e.citedDomainsTotal)&&n.addIssue({code:ye.custom,path:["citedDomainsTotal"],message:"Total cannot be smaller than the returned domains"}),e.recommendedInsteadTotal!==e.namedInsteadInAnswerTextTotal&&n.addIssue({code:ye.custom,path:["recommendedInsteadTotal"],message:"The deprecated total must equal namedInsteadInAnswerTextTotal"}),e.recommendedInstead!==void 0&&(e.recommendedInsteadTotal===void 0||e.recommendedInstead.length>e.recommendedInsteadTotal)&&n.addIssue({code:ye.custom,path:["recommendedInsteadTotal"],message:"Total cannot be smaller than the returned replacements"}),e.recommendedInstead!==void 0&&e.recommendedInsteadTotal!==void 0&&e.recommendedInsteadTruncated!==e.recommendedInstead.length<e.recommendedInsteadTotal&&n.addIssue({code:ye.custom,path:["recommendedInsteadTruncated"],message:"Truncation must agree with the replacement total"})}),Aq=d({metro:Os.nullable(),count:m().int().positive()}).strict(),Nq=d({count:m().int().min(2),mentionRate:we(),citationRate:we(),note:j([kq,"tied Properties are ordered by name, not ranked"]),byMetro:y(Aq).optional(),namedInstead:y(Gj).max(wq).optional(),namedInsteadTotal:ke.optional()}).strict().superRefine((e,n)=>{e.namedInstead!==void 0&&(e.namedInsteadTotal===void 0||e.namedInstead.length>e.namedInsteadTotal)&&n.addIssue({code:ye.custom,path:["namedInsteadTotal"],message:"Total cannot be smaller than the returned names"})}),Cq=d({basis:R("initial-weakest-selection-and-zero-signal-tie").optional(),properties:ke,answers:ke,domains:y(_m).max(vq),domainTotal:ke,ownDomainAnswers:ke.optional()}).strict().superRefine((e,n)=>{e.ownDomainAnswers!==void 0&&e.ownDomainAnswers>e.answers&&n.addIssue({code:ye.custom,path:["ownDomainAnswers"],message:"Own-domain answers cannot exceed the basis"}),e.domains.length>e.domainTotal&&n.addIssue({code:ye.custom,path:["domainTotal"],message:"Total cannot be smaller than the returned domains"}),e.domains.some(i=>i.answers>e.answers)&&n.addIssue({code:ye.custom,path:["domains"],message:"A domain cannot be cited by more answers than the basis holds"})}),_q=d({groupKey:he,label:Os,parentGroupKey:he.nullable(),childMarketCount:ke,propertyCount:ke,propertiesMentioned:ko,propertiesNeverMentioned:ko.optional(),mentionCoverage:dn,citationCoverage:dn}).strict(),Tq=d({population:R("top-level-markets"),queryClass:pa,totalMarkets:ke,eligibleMarketCount:ke,excludedMarketCount:ke,items:y(d({groupKey:he,label:Os,propertyCount:ke,mentionCoverage:dn.options[0],citationCoverage:dn.options[0]}).strict()).max(xq)}).strict(),ww=Eo.extend({...$j,mentionCoverage:dn.options[0],citationCoverage:dn}).strict(),Eq=d({eligiblePropertyCount:ke,strongest:y(ww).max(50),weakest:y(ww).max(50),excluded:y(Eo.extend({reason:Lc}).strict()),truncated:E(),excludedTotal:ke.optional()}).strict();d({portfolio:d({groupKey:he.nullable(),label:Os.nullable(),measurementScope:Qe([j(["full","spot_check"]),ue()])}).strict(),measurement:Gc,queryClass:pa,engines:y(jt),metrics:d({propertiesMentioned:ko,propertiesNeverMentioned:ko.optional(),mentionCoverage:dn,citationCoverage:dn}).strict(),weakestMarkets:Tq.optional().describe("Compact unscoped ranking from actual full top-level metro aggregates before pagination. Each rate uses the complete selected run/filter/class market population; tiedAtWeakest.byMetro counts only zero-signal Properties and never supplies these rates."),weakestProperties:y(jq),tiedAtWeakest:Nq.nullable(),weakestAnswerSources:Cq.nullable().optional(),mentionRanking:Eq,markets:y(_q),totalMarkets:ke,marketsTruncated:E(),totalProperties:ke,truncated:E(),pageList:Dg.optional(),nextCursor:da.nullable().optional(),detailsOmitted:y(r()).optional(),answerEvidence:d({answers:R("not-mentioned"),populationSize:ke,answerCount:ke,unknownMentionAnswers:ke,observedNames:y(d({name:Ao,answerCount:ke}).strict()),observedNamesTotal:ke,citedDomains:y(_m),citedDomainsTotal:ke}).strict().optional()}).strict().superRefine((e,n)=>{const i=e.detailsOmitted?.includes("weakestProperties.answerEvidence")??!1,o=["namedInsteadInAnswerText","namedInsteadInAnswerTextTotal","citedDomains","citedDomainsTotal","recommendedInstead","recommendedInsteadTotal","recommendedInsteadTruncated"];i||e.weakestProperties.forEach((u,h)=>{for(const f of o)u[f]===void 0&&n.addIssue({code:ye.custom,path:["weakestProperties",h,f],message:"Detailed evidence is required unless explicitly omitted by the compact projection"})}),e.weakestAnswerSources===void 0&&!e.detailsOmitted?.includes("weakestAnswerSources")&&n.addIssue({code:ye.custom,path:["weakestAnswerSources"],message:"Source evidence is required unless explicitly omitted by the compact projection"}),e.marketsTruncated!==e.markets.length<e.totalMarkets&&n.addIssue({code:ye.custom,path:["marketsTruncated"],message:"Market truncation must agree with the market total"})});d({targetKey:he,runId:ua.runId,provider:ua.provider,location:ua.location,queryClass:pa.optional(),offset:m().int().nonnegative().optional(),limit:m().int().positive().max(100).optional()}).strict();j(["answered","missing"]);const r0={queryId:da,text:Os,class:dg,provider:jt,requestedModel:r().nullable(),servedModel:r().nullable(),location:r().nullable()},Rq=Be("status",[d({resultId:da,...r0,status:R("answered"),mentioned:E().nullable(),cited:E().nullable(),recommendedInstead:y(Ao),answerExcerpt:r().nullable()}).strict(),d({resultId:ue(),...r0,status:R("missing"),mentioned:ue(),cited:ue(),recommendedInstead:y(Ao).length(0),answerExcerpt:ue()}).strict()]);d({property:Eo,measurement:Gc,queryClass:pa,questions:y(Rq),total:ke,truncated:E()}).strict();d({targetKey:he,resultId:da}).strict();const Dq=d({url:da,classification:Eg,matchedTargetKeys:y(he),assigned:E(),historical:E(),evidenceComplete:E()}).strict().superRefine((e,n)=>{e.assigned!==(e.classification==="assigned")&&n.addIssue({code:ye.custom,path:["assigned"],message:"Assigned must agree with the source attribution classification"})});d({property:Eo,measurement:Gc,question:d({resultId:da,...r0,status:R("answered")}).strict(),mentioned:E().nullable(),cited:E().nullable(),recommendedInstead:y(Ao),answer:r().nullable(),sources:y(Dq),captureStatus:Qe([ym,ue()]),retrievalStatus:Qe([Z0,ue()]),retrievalContract:Qe([Y0,ue()])}).strict();d({targetKey:he,runId:ua.runId,provider:ua.provider,location:ua.location,queryClass:pa.optional(),limit:m().int().positive().max(50).optional()}).strict();const zq=Be("state",[d({state:R("available"),answeredResults:ke,targetMissResults:ke,recommendationOccurrences:ke}).strict(),d({state:R("unavailable"),reason:Lc}).strict()]),Iq=d({name:Ao,occurrences:ke,providers:y(jt).max(5),providerTotal:ke,providersTruncated:E(),questions:y(Os).max(5),questionTotal:ke,questionsTruncated:E()}).strict().superRefine((e,n)=>{(e.providers.length>e.providerTotal||e.questions.length>e.questionTotal)&&n.addIssue({code:ye.custom,message:"Evidence totals cannot be smaller than returned evidence"}),e.providersTruncated!==e.providers.length<e.providerTotal&&n.addIssue({code:ye.custom,path:["providersTruncated"],message:"Provider truncation must agree with its total"}),e.questionsTruncated!==e.questions.length<e.questionTotal&&n.addIssue({code:ye.custom,path:["questionsTruncated"],message:"Question truncation must agree with its total"})}),Oq=10;d({property:Eo,measurement:Gc,queryClass:pa,basis:zq,competitors:y(Iq),total:ke,truncated:E(),citedDomains:y(_m).max(Oq).optional(),citedDomainsTotal:ke.optional(),citedDomainsAnswers:ke.optional()}).strict().superRefine((e,n)=>{const{citedDomains:i,citedDomainsTotal:o,citedDomainsAnswers:u}=e;if(i!==void 0){if(o===void 0||u===void 0){n.addIssue({code:ye.custom,path:["citedDomains"],message:"Cited domains require their total and answer basis"});return}i.length>o&&n.addIssue({code:ye.custom,path:["citedDomainsTotal"],message:"Total cannot be smaller than the returned domains"}),i.some(h=>h.answers>u)&&n.addIssue({code:ye.custom,path:["citedDomains"],message:"A domain cannot be cited by more answers than the basis holds"})}});const Kj=j(["magnitude","label"]),Pq=2;d({runId:ua.runId,scope:hg.default("all"),groupKey:he.optional(),targetKey:he.optional(),queryClass:pa.default("all"),provider:ua.provider,location:ua.location,limit:m().int().positive().max(50).optional(),sort:Kj.optional()}).strict().superRefine((e,n)=>{e.scope==="all"&&(e.groupKey!==void 0||e.targetKey!==void 0)&&n.addIssue({code:ye.custom,path:["scope"],message:"All scope cannot name a group or Property"}),e.scope==="group"&&(e.groupKey===void 0||e.targetKey!==void 0)&&n.addIssue({code:ye.custom,path:["groupKey"],message:"Group scope requires groupKey only"}),e.scope==="property"&&(e.targetKey===void 0||e.groupKey!==void 0)&&n.addIssue({code:ye.custom,path:["targetKey"],message:"Property scope requires targetKey only"})});const Hj=j(["no_previous_run","execution_identity_changed","incomplete","not_comparable"]),Fj=Gc.extend({executionIdentity:da.nullable(),measurementScope:Qe([j(["full","spot_check"]),ue()])}).strict();function Qj(e,n){if(e.previous.state!=="available"||e.current.state!=="available"){n.addIssue({code:ye.custom,message:"Available deltas require two available metrics"});return}Math.abs(e.delta-(e.current.value-e.previous.value))>Number.EPSILON&&n.addIssue({code:ye.custom,path:["delta"],message:"Delta must equal current minus previous"})}const Zj=d({state:R("unavailable"),reason:Lc}).strict(),Fd=Be("state",[d({state:R("available"),previous:dn,current:dn,delta:we()}).strict().superRefine(Qj),Zj]),qq=Be("state",[d({state:R("available"),previous:ko,current:ko,delta:m().int()}).strict().superRefine(Qj),Zj]),vf=d({propertiesMentioned:qq,mentionCoverage:Fd,citationCoverage:Fd}).strict(),Mq=d({improved:ke,declined:ke,mixed:ke,withinNoise:ke,unchanged:ke,notComparable:ke,total:ke,noiseAnswers:R(Pq)}).strict().superRefine((e,n)=>{e.improved+e.declined+e.mixed+e.withinNoise+e.unchanged+e.notComparable!==e.total&&n.addIssue({code:ye.custom,path:["total"],message:"Move buckets must sum to total"})}),Bq=Eo.extend({mentionCoverage:Fd,citationCoverage:Fd,flags:ke,mentionAnswersDelta:m().int().nullable().optional(),citationAnswersDelta:m().int().nullable().optional(),denominatorChanged:E().optional(),withinNoise:E().optional(),mentionWithinNoise:E().nullable().optional(),citationWithinNoise:E().nullable().optional()}).strict();d({current:Fj,queryClass:pa.optional(),comparison:Be("state",[d({state:R("available"),previous:d({displayedRunId:da,planRevision:m().int().positive(),completedAt:r().datetime().nullable(),executionIdentity:da,measurementScope:j(["full","spot_check"])}).strict(),metrics:vf,metricsByClass:d({branded:vf,nonBrand:vf}).strict().optional(),sort:Kj.optional(),distribution:Mq.optional(),changedProperties:y(Bq),totalProperties:ke,truncated:E()}).strict(),d({state:R("unavailable"),reason:Hj}).strict()])}).strict().superRefine((e,n)=>{if(e.comparison.state!=="available")return;const{distribution:i}=e.comparison;if(i!==void 0&&i.total-i.unchanged!==e.comparison.totalProperties&&n.addIssue({code:ye.custom,path:["comparison","distribution"],message:"Changed Properties must equal the distribution total less unchanged"}),e.current.displayedRunId===null||e.current.executionIdentity===null){n.addIssue({code:ye.custom,path:["current"],message:"A comparison requires an identified current run"});return}e.comparison.previous.planRevision!==e.current.planRevision&&n.addIssue({code:ye.custom,path:["comparison","previous","planRevision"],message:"Comparisons cannot cross plan revisions"}),e.comparison.previous.executionIdentity!==e.current.executionIdentity&&n.addIssue({code:ye.custom,path:["comparison","previous","executionIdentity"],message:"Comparisons cannot cross execution identities"})});d({runId:ua.runId}).strict();const Lq=j(["no_completed_run","incomplete","evidence_incomplete","no_population","not_applicable"]),Kc=d({state:R("unavailable"),reason:Lq}).strict(),Uq=d({state:R("available"),expected:ke,executed:ke,answered:ke,missing:ke}).strict(),Vq=Be("state",[Uq,Kc]).superRefine((e,n)=>{e.state==="available"&&(e.executed+e.missing!==e.expected&&n.addIssue({code:ye.custom,message:"Expected must equal executed plus missing"}),e.answered>e.executed&&n.addIssue({code:ye.custom,path:["answered"],message:"Answered cannot exceed executed"}))}),$q=d({state:R("available"),complete:ke,partial:ke,failed:ke,unsupported:ke,notRecorded:ke}).strict(),Gq=Be("state",[$q,Kc]),Kq=d({state:R("available"),used:ke,notUsed:ke,unknown:ke,notApplicable:ke,notRecorded:ke}).strict(),Hq=Be("state",[Kq,Kc]),Fq=d({state:R("available"),expectedQuestions:ke,answeredQuestions:ke,missingQuestions:ke}).strict(),Qq=Be("state",[Fq,Kc]).superRefine((e,n)=>{e.state==="available"&&e.answeredQuestions+e.missingQuestions!==e.expectedQuestions&&n.addIssue({code:ye.custom,message:"Expected questions must equal answered plus missing"})}),kw=Be("state",[d({state:R("available"),answered:ke,unattributed:ke}).strict(),Kc]).superRefine((e,n)=>{e.state==="available"&&e.unattributed>e.answered&&n.addIssue({code:ye.custom,path:["unattributed"],message:"Unattributed answers cannot exceed answered"})}),Zq=d({status:Rg,providers:y(r()),expected:ke,filled:ke,createdAt:r(),finishedAt:r().nullable()}).strict();d({run:Fj,completeness:Vq,capture:Gq,retrieval:Hq,population:Qq,comparison:Be("state",[d({state:R("available"),previousDisplayedRunId:da}).strict(),d({state:R("unavailable"),reason:Hj}).strict()]),unattributedByClass:d({branded:kw,nonBrand:kw}).strict().optional(),latestFill:Zq.nullable().optional()}).strict().superRefine((e,n)=>{if(e.completeness.state!=="available")return;const i=e.completeness.executed;e.capture.state==="available"&&e.capture.complete+e.capture.partial+e.capture.failed+e.capture.unsupported+e.capture.notRecorded!==i&&n.addIssue({code:ye.custom,path:["capture"],message:"Capture counts must total executed snapshots"}),e.retrieval.state==="available"&&e.retrieval.used+e.retrieval.notUsed+e.retrieval.unknown+e.retrieval.notApplicable+e.retrieval.notRecorded!==i&&n.addIssue({code:ye.custom,path:["retrieval"],message:"Retrieval counts must total executed snapshots"})});const Ir=r().regex(/^[a-f0-9]{64}$/),Ha=r().trim().min(1).max(256),oi=m().int().positive(),Sw=d({kind:j(["user","api-key","system"]),id:r().trim().min(1),label:r().trim().min(1)}).strict(),Yq=j(["proposed","included","excluded"]),Xq=j(["manual","sitemap"]),zg=d({stableKey:he,label:r().trim().min(1),status:Yq,aliases:y(r().trim().min(1)),identityAliases:y(r().trim().min(1)).optional(),urlMatchers:y(r().trim().min(1)),source:Xq,discoveredUrl:r().trim().min(1).optional(),discoveryIdentity:r().trim().min(1).optional()}).strict(),Tm=d({providers:y(jt).optional(),models:He(jt,r().trim().min(1)).optional(),locations:y(r().trim().min(1)).optional()}).strict(),Jq=j(["branded","non-brand","unclassified"]),Wq=j(["rule","operator"]),Yj=d({targetKey:he,queryId:Ha,contextOverride:Tm.optional(),executionContexts:y(vm.extend({executionNodeKey:r().min(1).optional()})).min(1).optional(),queryProvenance:L2.optional(),queryClass:Jq,classificationSource:Wq}).strict().superRefine((e,n)=>{e.contextOverride!==void 0&&e.executionContexts!==void 0&&n.addIssue({code:"custom",path:["executionContexts"],message:"Use either frozen execution contexts or a context override, not both."})}),Em=B2,Xj=d({stableKey:he,label:r().trim().min(1),parentGroupKey:he.optional(),targetKeys:y(he),competitors:y(Em)}).strict(),eM=d({sitemapUrl:r().url(),rule:Tg,exclusions:y(r().trim().min(1)),inputChecksum:Ir,reviewedAt:r().datetime().optional()}).strict(),tM=d({providers:y(jt),models:He(jt,r().trim().min(1)).optional(),locations:y(r().trim().min(1))}).strict(),Jj=U2,nM=d({defaultContext:tM,targets:y(zg),assignments:y(Yj),groups:y(Xj),reportingScopes:y(Jj).optional(),discovery:eM.optional()}).strict(),aM=d({id:r().trim().min(1),projectId:r().trim().min(1),schemaVersion:R(2),baseActiveVersionId:r().trim().min(1).nullable(),baseActiveRevision:oi.nullable(),authoring:nM,createdBy:Sw,updatedBy:Sw,createdAt:r().datetime(),updatedAt:r().datetime()}).strict(),Ig=d({targets:m().int().nonnegative(),includedTargets:m().int().nonnegative(),assignments:m().int().nonnegative(),unclassifiedAssignments:m().int().nonnegative(),groups:m().int().nonnegative(),competitors:m().int().nonnegative()}).strict(),iM=d({code:r().trim().min(1),message:r().trim().min(1),path:y(Qe([r(),m().int()]))}).strict(),Wj=d({etag:r().trim().min(1),changed:E(),warnings:y(iM),counts:Ig}).strict();d({draft:aM.nullable(),etag:r().trim().min(1).nullable()}).strict();zr(zg);zr(Yj);zr(Xj);d({search:r().optional(),cursor:r().trim().min(1).optional(),limit:m().int().positive().max(pg).optional()}).strict();d({expectedActiveRevision:oi.nullable()}).strict();d({sitemapUrl:r().url(),rule:Tg,exclusions:y(r().trim().min(1)).optional()}).strict();const sM=d({discoveryIdentity:r().trim().min(1),action:j(["create","rebind","ignore"]),targetKey:he.optional(),label:r().trim().min(1).optional()}).strict();d({selections:y(sM),selectedTargetKeys:y(he).optional()}).strict().superRefine((e,n)=>{e.selections.length===0&&e.selectedTargetKeys===void 0&&n.addIssue({code:"custom",message:"A proposal or reviewed Property selection is required."}),e.selectedTargetKeys&&new Set(e.selectedTargetKeys).size!==e.selectedTargetKeys.length&&n.addIssue({code:"custom",path:["selectedTargetKeys"],message:"Property keys must be unique."})});d({target:zg}).strict();d({targetKey:he,label:r().trim().min(1)}).strict();d({targetKey:he,mergedKeys:y(he).min(1)}).strict();d({targetKey:he,cleanup:R("assignments-and-group-memberships").optional()}).strict();d({targetKey:he,discoveryIdentity:r().trim().min(1),discoveredUrl:r().url()}).strict();const e3={targetKeys:y(he).optional(),groupKeys:y(he).optional()};function t3(e,n){(e.targetKeys?.length??0)===0&&(e.groupKeys?.length??0)===0&&n.addIssue({code:"custom",message:"At least one Target or group selector is required."})}d(e3).strict().superRefine(t3);const oM=d({...e3,queryIds:y(Ha).min(1),contextOverride:Tm.optional()}).strict().superRefine(t3);Qe([d({targetKey:he,queryIds:y(Ha).min(1),contextOverride:Tm.optional()}).strict(),oM]);const rM=d({groupKey:he,label:r().trim().min(1),memberCount:m().int().positive()}).strict();d({draftEtag:r().trim().min(1),groups:y(rM),resolvedTargetKeys:y(he),overlapCount:m().int().nonnegative(),assignments:d({requested:m().int().nonnegative(),added:m().int().nonnegative(),alreadyPresent:m().int().nonnegative()}).strict(),execution:d({addedNodes:m().int().nonnegative(),addedProviderCalls:m().int().nonnegative(),fullRunNodes:m().int().nonnegative(),fullRunProviderCalls:m().int().nonnegative()}).strict()}).strict();d({pairs:y(d({targetKey:he,queryId:Ha}).strict()).min(1),contextOverride:Tm.optional()}).strict();Qe([d({targetKey:he,queryId:Ha}).strict(),d({targetKeys:y(he).min(1),queryId:Ha}).strict()]);d({targetKey:he}).strict();d({queryClass:dg,assignments:y(d({targetKey:he,queryId:Ha}).strict()).min(1)}).strict();d({group:d({stableKey:he,label:r().trim().min(1),parentGroupKey:he.nullable().optional(),targetKeys:y(he),competitors:y(Em).optional()}).strict()}).strict();d({market:Jj}).strict();d({groupKey:he}).strict();d({groupKey:he,competitor:Em}).strict();d({expectedActiveRevision:oi,groupKey:he,domain:r().trim().min(1).refine(e=>Bc(e)!==null,"A competitor domain must be a valid hostname"),label:r().trim().min(1).optional(),aliases:y(r().trim().min(1)).optional()}).strict();Wj.extend({groupKey:he,competitor:Em,draftCreated:E(),published:d({revision:oi,competitorsChanged:R(!1)}).strict()}).strict();d({groupKey:he,competitorKey:he}).strict();const Qd=d({ruleId:r().trim().min(1),severity:j(["fail","warn"]),message:r().trim().min(1),path:y(Qe([r(),m().int()]))}).strict();Be("ok",[d({ok:R(!0),compiledChecksum:Ir,checks:y(Qd),counts:Ig,plan:xm}).strict(),d({ok:R(!1),compiledChecksum:ue(),checks:y(Qd).min(1)}).strict()]);const jw=d({added:y(r().trim().min(1)),removed:y(r().trim().min(1)),changed:y(r().trim().min(1)),unchanged:y(r().trim().min(1))}).strict(),lM=d({activeRevision:oi.nullable(),targets:jw,groups:jw,assignments:d({added:m().int().nonnegative(),removed:m().int().nonnegative(),reclassified:m().int().nonnegative()}).strict(),execution:d({addedNodeKeys:y(r().trim().min(1)),removedNodeKeys:y(r().trim().min(1))}).strict()}).strict();Be("ok",[d({ok:R(!0),compiledChecksum:Ir,checks:y(Qd),counts:Ig,plan:xm,diff:lM}).strict(),d({ok:R(!1),compiledChecksum:ue(),checks:y(Qd).min(1),diff:ue()}).strict()]);d({expectedActiveRevision:oi.nullable(),expectedCompiledChecksum:Ir}).strict();d({published:E(),active:d({revision:oi,checksum:Ir,compiledChecksum:Ir,createdAt:r().datetime(),plan:xm}).strict()}).strict();d({discarded:E()}).strict();d({expectedActiveRevision:oi}).strict();d({deactivated:E(),previousRevision:oi.nullable()}).strict();const cM=j(["republish_required","setup_in_progress","awaiting_first_run","operational","simple"]),uM=j(["republish_setup","continue_setup","run_measurement","view_measurement","start_setup"]),dM=j(["simple","draft-only","active-v1","active-v2"]);d({state:cM,nextAction:uM,mode:dM,answerVisibilityProviderReady:E(),activeRevision:oi.nullable(),activeSchemaVersion:Qe([R(1),R(2)]).nullable(),draft:d({etag:r().trim().min(1),updatedAt:r().datetime()}).strict().nullable()}).strict();const n3=d({id:r().trim().min(1),projectId:r().trim().min(1),name:r().trim().min(1),description:r().nullable(),itemCount:m().int().nonnegative(),createdAt:r().datetime(),updatedAt:r().datetime()}).strict(),mM=d({queryId:Ha,queryText:r().min(1),position:m().int().nonnegative()}).strict();n3.extend({items:y(mM)}).strict();d({querySets:y(n3)}).strict();d({name:r().trim().min(1),description:r().nullable().optional(),queryIds:y(Ha)}).strict();const pM=d({id:r().trim().min(1),projectId:r().trim().min(1),name:r().trim().min(1),description:r().nullable(),pattern:r().trim().min(1),variables:y(r().trim().min(1)),createdAt:r().datetime(),updatedAt:r().datetime()}).strict();d({templates:y(pM)}).strict();d({name:r().trim().min(1),description:r().nullable().optional(),pattern:r().trim().min(1),variables:y(r().trim().min(1))}).strict();d({bindings:y(He(r().trim().min(1),r().trim().min(1))).min(1),querySetId:r().trim().min(1).optional()}).strict();d({created:y(d({queryId:Ha,queryText:r().min(1)}).strict()),existing:y(d({queryId:Ha,queryText:r().min(1)}).strict())}).strict();const Zd=r().regex(/^[a-f0-9]{64}$/),Rm=m().int().positive();d({stableKey:he,kind:j(["target","group"]),retiredAt:r().datetime().nullable()}).strict();d({csv:r()}).strict();j(["matched","ambiguous","unmatched","invalid","duplicate","proposed","excluded"]);const hM=j(["column-count","missing-property","missing-group","invalid-url","property-not-found","property-label-ambiguous","url-not-exact-match","target-proposed","target-excluded","group-label-ambiguous","group-key-conflict"]),l0=d({dataRow:Rm,property:r(),group:r(),url:r().nullable(),normalizedProperty:r(),normalizedGroupLabel:r()}).strict(),sc=l0.extend({reason:hM}),fM=d({source:j(["draft-target","draft-group","persisted-segment","retired-segment","proposed-group"]),stableKey:he,kind:j(["target","group"]).optional(),retiredAt:r().datetime().nullable().optional(),normalizedGroupLabel:r().optional()}).strict(),gM=d({proposedGroupKey:he,evidence:y(fM).min(1)}).strict(),yM=Be("status",[l0.extend({status:R("matched"),targetKey:he,groupKey:he}).strict(),sc.extend({status:R("ambiguous"),candidateTargetKeys:y(he).min(1).optional(),candidateGroupKeys:y(he).min(1).optional()}).strict(),sc.extend({status:R("unmatched")}).strict(),sc.extend({status:R("invalid"),groupKeyConflict:gM.optional()}).strict(),l0.extend({status:R("duplicate"),duplicateOfRow:Rm,targetKey:he,groupKey:he}).strict(),sc.extend({status:R("proposed"),targetKey:he}).strict(),sc.extend({status:R("excluded"),targetKey:he}).strict()]),bM=d({normalizedGroupLabel:r(),groupKey:he,label:r().trim().min(1),action:j(["create","extend"]),matchedRows:y(Rm),targetKeys:y(he),addedTargetKeys:y(he),unchangedTargetKeys:y(he)}).strict(),vM=d({dataRows:m().int().nonnegative(),matchedRows:m().int().nonnegative(),ambiguousRows:m().int().nonnegative(),unmatchedRows:m().int().nonnegative(),invalidRows:m().int().nonnegative(),duplicateRows:m().int().nonnegative(),proposedRows:m().int().nonnegative(),excludedRows:m().int().nonnegative(),needsAttention:m().int().nonnegative(),groupsReady:m().int().nonnegative(),groupsToCreate:m().int().nonnegative(),groupsToExtend:m().int().nonnegative(),membershipsReady:m().int().nonnegative(),addedMemberships:m().int().nonnegative(),unchangedMemberships:m().int().nonnegative()}).strict();d({draftEtag:r().trim().min(1),sourceChecksum:Zd,previewChecksum:Zd,rows:y(yM),groupChanges:y(bM),counts:vM}).strict();d({csv:r(),sourceChecksum:Zd,previewChecksum:Zd,acceptedRows:y(Rm).min(1)}).strict().superRefine((e,n)=>{new Set(e.acceptedRows).size!==e.acceptedRows.length&&n.addIssue({code:"custom",path:["acceptedRows"],message:"Accepted CSV data rows must be unique."})});Wj.extend({appliedRows:m().int().nonnegative(),addedMemberships:m().int().nonnegative(),unchangedMemberships:m().int().nonnegative()}).strict();function a3(e,n){return Number((n===$a.percent?e:e*100).toFixed(6))}function i3(e){return Math.round(Number((e*10).toFixed(4)))/10}function Yd(e,n=$a.fraction){if(e==null||!Number.isFinite(e))return"—";const i=a3(e,n);if(i===0)return"0%";const o=i<0?"-":"",u=Math.abs(i);if(u===100)return`${o}100%`;const h=i3(u);return h===0?`${o}<0.1%`:h===100&&u<100?`${o}>99.9%`:`${o}${h.toFixed(1)}%`}function ete(e){return Number.isFinite(e)?Math.abs(e)>=1e6?`${(e/1e6).toFixed(1)}M`:Math.abs(e)>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString("en-US"):"—"}const xM=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function bc(e,n=new Date){const i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),o=i?xM[Number(i[2])-1]:void 0;if(!i||!o)return e;const u=`${o} ${Number(i[3])}`;return Number(i[1])===n.getFullYear()?u:`${u}, ${i[1]}`}function tte(e,n,i=800){const o=[];if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(n))return o;for(let u=e;u<=n&&(o.push(u),!(o.length>=i));u=wM(u,1));return o}function wM(e,n){if(!Number.isFinite(n))return e;const i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!i?.[1]||!i[2]||!i[3])return e;const o=new Date(Date.UTC(Number(i[1]),Number(i[2])-1,Number(i[3])+Math.trunc(n)));if(Number.isNaN(o.getTime()))return e;const u=o.getUTCFullYear(),h=String(o.getUTCMonth()+1).padStart(2,"0"),f=String(o.getUTCDate()).padStart(2,"0");return`${u}-${h}-${f}`}function nte(e,n=$a.fraction){const i=a3(e,n);if(i===0)return{direction:"none",magnitude:"0"};const o=i3(Math.abs(i));return{direction:i>0?"up":"down",magnitude:o===0?"<0.1":o.toFixed(1)}}function ate(e,n="UTC"){const i=new Date(e);if(!Number.isFinite(i.getTime()))return null;const o={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"};try{return i.toLocaleString("en-US",{...o,timeZone:n})}catch{return i.toLocaleString("en-US",{...o,timeZone:"UTC"})}}const s3=j(["introduced","repointed","retired"]),kM=s3.enum;d({modelId:r().trim().min(1),date:r().regex(/^\d{4}-\d{2}-\d{2}$/,"date must be YYYY-MM-DD"),kind:s3,confirmed:E(),sourceUrl:r().url(),note:r().min(1)});const SM=[{modelId:"chatgpt-4o-latest",date:"2024-08-15",kind:"introduced",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'Verbatim: "Released dynamic model for chatgpt-4o-latest—this model will point to the latest GPT-4o model used by ChatGPT." First moving id in the lineage.'},{modelId:"chatgpt-4o-latest",date:"2026-02-17",kind:"retired",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/deprecations.md",note:'Shutdown 2026-02-17, replacement gpt-5.1-chat-latest. Announced under the heading "2025-11-18: chatgpt-4o-latest snapshot".'},{modelId:"gpt-5.1-chat-latest",date:"2025-11-13",kind:"introduced",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:"Introduced inside the GPT-5.1 launch entry, not as a standalone entry."},{modelId:"gpt-5.2-chat-latest",date:"2025-12-11",kind:"introduced",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:"Introduced inside the GPT-5.2 launch entry."},{modelId:"gpt-5.2-chat-latest",date:"2026-02-10",kind:"repointed",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'Verbatim: "Updated the gpt-5.2-chat-latest slug to point to the latest model currently used in ChatGPT." Target model NOT named.'},{modelId:"gpt-5.3-chat-latest",date:"2026-03-03",kind:"introduced",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'Verbatim: "Released gpt-5.3-chat-latest to the Chat Completions and Responses API. This model points to the GPT-5.3 Instant snapshot currently used in ChatGPT."'},{modelId:"gpt-5.3-chat-latest",date:"2026-03-16",kind:"repointed",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'Verbatim: "Updated the gpt-5.3-chat-latest slug to point to the latest model currently used in ChatGPT." Target model NOT named.'},{modelId:"chat-latest",date:"2026-05-05",kind:"introduced",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'Verbatim: "Released chat-latest snapshot which points to the latest Instant model currently used in ChatGPT... The underlying model snapshot will be regularly updated."'},{modelId:"chat-latest",date:"2026-05-28",kind:"repointed",confirmed:!1,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'UNCONFIRMED. The entry reads "Released chat-latest snapshot..." — the verb is "Released", the same boilerplate as the 2026-05-05 entry, not "Updated" as used on 2026-06-24. Only "the latest improvements" vs "our latest improvements" differs. Either a real change logged with copy-pasted text, or a duplicated entry; the record does not disambiguate.'},{modelId:"chat-latest",date:"2026-06-24",kind:"repointed",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'Verbatim (re-read at source 2026-07-20): "Updated the chat-latest snapshot, which points to the latest Instant model currently used in ChatGPT." The verb is "Updated", unlike the "Released" boilerplate of 2026-05-05 and 2026-05-28, which is the wording the changelog reserves for a real change. Target model NOT named. The only unambiguous chat-latest change on record.'}];kM.repointed;new Set(SM.map(e=>e.modelId.toLowerCase()));const jM=j(["not-exposed","no-known-change","known-change"]);jM.enum;const AM=d({modelId:r().trim().min(1),date:r().regex(/^\d{4}-\d{2}-\d{2}$/),confirmed:E(),sourceUrl:r().url()}),NM=d({status:j(["no-known-change","known-change"]),modelIds:y(r().trim().min(1)).min(1),changes:y(AM),changeCount:m().int().nonnegative(),unverifiedChangeCount:m().int().nonnegative(),firstChangeDate:r().optional(),lastChangeDate:r().optional(),knownGoodAsOf:r(),checkedThroughPeriodEnd:E()}),CM={openai:"ChatGPT",chatgpt:"ChatGPT",anthropic:"Claude",claude:"Claude",google:"Gemini",gemini:"Gemini",perplexity:"Perplexity"};function _M(e){const n=e.trim().toLowerCase();return CM[n]??e.charAt(0).toUpperCase()+e.slice(1)}function xf(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):0}function oc(e){return typeof e=="string"&&e.trim().length>=10?e.trim().slice(0,10):null}function wf(e){return[...new Set(e.filter(n=>n!==null))].sort()}function TM(e,n,i){const o=i(e),u=Array.isArray(n.changes)?n.changes:[],h=xf(n.changeCount)||u.length,f=Math.min(h,xf(n.unverifiedChangeCount)||xf(n.unconfirmedChangeCount)||u.filter(S=>S.confirmed===!1).length),b=oc(n.knownGoodAsOf),v=n.checkedThroughPeriodEnd!==!1,x={engine:o,confirmedCount:h-f,unconfirmedCount:f,knownGoodAsOf:b,checkedThroughPeriodEnd:v};if(u.length>0)return{...x,confirmedDates:wf(u.filter(S=>S.confirmed!==!1).map(S=>oc(S.date))),unconfirmedDates:wf(u.filter(S=>S.confirmed===!1).map(S=>oc(S.date)))};const k=wf([oc(n.firstChangeDate),oc(n.lastChangeDate)]);return h===0?{...x,confirmedDates:[],unconfirmedDates:[]}:f===0?{...x,confirmedDates:k,unconfirmedDates:[]}:x.confirmedCount===0?{...x,confirmedDates:[],unconfirmedDates:k}:{...x,confirmedDates:[],unconfirmedDates:[]}}function EM(e){return e.length===1?e[0]:e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}`}function Aw(e,n){return e.length===0?null:e.length===1&&n<=1?`on ${bc(e[0])}`:`more than once between ${bc(e[0])} and ${bc(e[e.length-1])}`}function RM(e){const n=Aw(e.confirmedDates,e.confirmedCount),i=Aw(e.unconfirmedDates,e.unconfirmedCount),o=`The model behind ${e.engine}`;if(e.confirmedCount>0&&e.unconfirmedCount===0)return n?`${o} was updated ${n}, inside this period.`:`${o} was updated inside this period.`;if(e.confirmedCount===0)return i?`${o} may have been updated ${i}, inside this period, though that is not confirmed.`:`${o} may have been updated inside this period, though that is not confirmed.`;if(n&&i)return`${o} was updated ${n}, inside this period, and may also have been updated ${i}.`;const u=e.unconfirmedCount>1?"more times":"once more";return`${o} was updated inside this period, and may have been updated ${u}, though that is not confirmed.`}function Nw(e){const n=e.filter(o=>!o.checkedThroughPeriodEnd&&o.knownGoodAsOf!==null);if(n.length===0)return null;const i=n.map(o=>o.knownGoodAsOf).sort()[0];return`We last checked for model updates on ${bc(i)}, and this period runs past that date, so there may be later updates we do not know about.`}function ite(e,n={}){const i=n.engineName??_M,o=Object.entries(e??{}).map(([k,S])=>TM(k,S??{},i)).sort((k,S)=>k.engine.localeCompare(S.engine));if(o.length===0)return null;const u=o.filter(k=>k.confirmedCount+k.unconfirmedCount>0);if(u.length===0){const k=[...new Set(o.map(q=>q.engine))],S=k.length>1,C=Nw(o),_=[...new Set(o.map(q=>q.knownGoodAsOf).filter(q=>q!==null))].sort(),z=C??(_.length>0?`We last checked for model updates on ${bc(_[0])}.`:null);return{kind:"no-known-change",text:`No model updates are on record for ${EM(k)} in this period.`,detail:`${S?"These engines":"This engine"} can be moved onto a different underlying model without the data ever showing a different model name, so we check each period against a record of known updates. Nothing is listed inside this one.${z?` ${z}`:""}`}}const h=u.reduce((k,S)=>k+S.confirmedCount+S.unconfirmedCount,0),f=u.some(k=>k.confirmedCount>0),b=h===1?"this update":"these updates",v=f?`Some of the movement in these numbers may come from ${b} rather than from a real change in how AI answers about you, so compare periods carefully.`:`If so, some of the movement in these numbers may come from ${b} rather than from a real change in how AI answers about you, so compare periods carefully.`,x=Nw(o);return{kind:"change",text:`${u.map(RM).join(" ")} ${v}${x?` ${x}`:""}`}}const xo=d({slope:m(),intercept:m(),r2:m(),start:m(),end:m(),n:m(),startIndex:m(),endIndex:m()}),DM=j(["gsc","ga4","gbp"]);d({id:r(),domain:r(),connectionType:DM,propertyId:r().nullable().optional(),sitemapUrl:r().nullable().optional(),scopes:y(r()).default([]),createdAt:r(),updatedAt:r()});const zM=d({date:r(),query:r(),page:r(),country:r().nullable().optional(),device:r().nullable().optional(),clicks:m(),impressions:m(),ctr:we(),position:m()});j(["clicks","impressions","date"]);d({rows:y(zM),totalMatching:m(),truncated:E(),latestAvailableDate:r().nullable()});const IM=d({date:r(),clicks:m(),impressions:m(),ctr:we(),position:m().nullable()}),o3=d({startDate:r().nullable(),endDate:r().nullable(),latestDataDate:r().nullable(),daysSinceLatestData:m().nullable()}),OM=d({clicks:xo.nullable(),impressions:xo.nullable(),ctr:xo.nullable(),position:xo.nullable()}),Cw=d({startDate:r(),endDate:r(),clicks:m(),impressions:m(),ctr:we().nullable(),position:m().nullable(),source:j(["property-daily","dimensioned","mixed","empty"])}),PM=d({days:m(),basis:j(["prior-window","split-window"]).optional(),prior:Cw,trailing:Cw,comparable:E(),change:d({clicks:we().nullable(),impressions:we().nullable(),ctr:we().nullable(),position:we().nullable()})});d({totals:d({clicks:m(),impressions:m(),ctr:we(),position:m().nullable(),positionDays:m(),days:m()}),daily:y(IM),window:o3.optional(),trends:OM.optional(),periodComparison:PM.nullable().optional()});const qM=d({page:r(),clicks:m(),impressions:m(),ctr:we()});d({rows:y(qM),totals:d({clicks:m(),impressions:m(),ctr:we(),days:m(),coveredFrom:r().nullable(),coveredThrough:r().nullable(),complete:E()}).nullable(),totalsSource:R("property-daily"),rankedFrom:r().nullable(),rankedThrough:r().nullable()});const MM=j(["google","page-summed","mixed"]),BM=d({query:r(),clicks:m(),impressions:m(),ctr:we(),position:m(),days:m(),source:MM});d({rows:y(BM),totalMatching:m(),truncated:E(),window:o3.extend({earliestDataDate:r().nullable().optional()})});const c0=d({id:r(),url:r(),indexingState:r().nullable().optional(),verdict:r().nullable().optional(),coverageState:r().nullable().optional(),pageFetchState:r().nullable().optional(),robotsTxtState:r().nullable().optional(),crawlTime:r().nullable().optional(),lastCrawlResult:r().nullable().optional(),isMobileFriendly:E().nullable().optional(),richResults:y(r()).default([]),referringUrls:y(r()).default([]),inspectedAt:r()});j(["stable","reindexed","deindexed","still-missing","new"]);const LM=d({url:r(),previousState:r().nullable(),currentState:r().nullable(),transitionDate:r()}),UM=d({reason:r(),count:m(),urls:y(c0).default([])});d({summary:d({total:m(),indexed:m(),notIndexed:m(),deindexed:m(),percentage:ot(),indexedShare:we(m().min(0).max(1)).nullable(),notIndexedShare:we(m().min(0).max(1)).nullable()}),lastInspectedAt:r().nullable(),lastSyncedAt:r().nullable(),indexed:y(c0).default([]),notIndexed:y(c0).default([]),deindexed:y(LM).default([]),reasonGroups:y(UM).default([])});d({url:r(),type:j(["URL_UPDATED","URL_DELETED"]),notifiedAt:r()});const VM=d({url:r(),type:j(["URL_UPDATED","URL_DELETED"]),notifiedAt:r(),status:j(["success","error"]),error:r().optional()});d({summary:d({total:m().int().nonnegative(),succeeded:m().int().nonnegative(),failed:m().int().nonnegative()}),results:y(VM).default([])});d({date:r(),indexed:m(),notIndexed:m(),unknownPages:m().default(0),verifiedByInspection:m().default(0),derivedFromImpressions:m().default(0),reasonBreakdown:He(r(),m()).default({})});const $M=d({siteUrl:r(),permissionLevel:r()});d({sites:y($M).default([])});const GM=d({type:r(),submitted:r(),indexed:r().optional().describe("Deprecated compatibility field.")}),r3=d({path:r(),parentSitemapUrl:r().optional(),lastSubmitted:r().optional(),isPending:E().optional(),isSitemapsIndex:E().optional(),type:r().optional(),lastDownloaded:r().optional(),warnings:r().optional(),errors:r().optional(),contents:y(GM).optional()});d({sitemaps:y(r3).default([]),summary:d({total:m().int().nonnegative(),indexes:m().int().nonnegative(),files:m().int().nonnegative()}),preferredSubmissionUrls:y(r()).default([])});d({sitemapUrls:y(r().url().refine(e=>{const n=new URL(e).protocol;return n==="http:"||n==="https:"},{message:"Sitemap URL must use http or https."})).min(1).max(50)});const KM=d({sitemapUrl:r(),status:j(["accepted","error"]),submittedAt:r().optional(),error:r().optional()});d({summary:d({total:m().int().nonnegative(),accepted:m().int().nonnegative(),failed:m().int().nonnegative()}),results:y(KM)});d({sitemaps:y(r3),primarySitemapUrl:r(),run:d({id:r(),projectId:r(),kind:r(),status:r(),trigger:r(),createdAt:r()}).nullable()});const mt=r().trim().min(1),_w=r().regex(/^[a-f0-9]{64}$/i),HM=j(["not-connected","selection-required","connected","stale"]),gd=HM.enum,FM=j(["live","draft"]),l3=FM.enum,Td=d({accountId:mt.nullable(),containerId:mt.nullable(),workspaceId:mt.nullable(),selectedAt:r().nullable()}).strict(),kf=d({id:mt,projectId:mt,scopes:y(r()).default([]),selection:Td,lastValidatedAt:r().nullable(),lastSnapshotAt:r().nullable(),createdAt:r(),updatedAt:r()}).strict(),c3=d({id:mt,path:r(),name:r(),shareData:E().nullable()}).strict(),u3=d({accountId:mt,id:mt,path:r(),name:r(),publicId:r().nullable(),domainName:r().nullable(),usageContexts:y(r())}).strict(),Og=d({accountId:mt,containerId:mt,id:mt,path:r(),name:r(),description:r().nullable(),fingerprint:r().nullable()}).strict(),QM=d({accounts:y(c3),totalAccessible:m().int().nonnegative(),truncated:E(),fetchedAt:r()}).strict();d({accountId:mt,containers:y(u3),totalAccessible:m().int().nonnegative(),truncated:E(),fetchedAt:r()}).strict();d({accountId:mt,containerId:mt,workspaces:y(Og),totalAccessible:m().int().nonnegative(),truncated:E(),fetchedAt:r()}).strict();const ZM=d({id:mt,name:r(),type:r(),paused:E(),firingTriggerIds:y(mt),blockingTriggerIds:y(mt),referencedVariableIds:y(mt),parameterKeys:y(r()),fingerprint:r().nullable()}).strict(),YM=d({id:mt,name:r(),type:r(),customEventNames:y(r()),filterKeys:y(r()),autoEventFilterKeys:y(r()),fingerprint:r().nullable()}).strict(),XM=d({id:mt,name:r(),type:r(),dataLayerVariableName:r().nullable(),parameterKeys:y(r()),fingerprint:r().nullable()}).strict(),d3=j(["recognized","unknown"]),Tw=d3.enum,JM=j(["literal","variable-ref","absent","unknown"]),Dm=JM.enum,WM=r().trim().min(5).max(132).regex(/^\{\{\w[\w ./-]{0,127}\}\}$/),Gr=d({source:R(Dm.absent),literal:ue(),variableRef:ue()}).strict(),Kr=d({source:R(Dm.unknown),literal:ue(),variableRef:ue()}).strict(),Hr=d({source:R(Dm["variable-ref"]),literal:ue(),variableRef:WM}).strict();function Hc(e){return d({source:R(Dm.literal),literal:e,variableRef:ue()}).strict()}const eB=r().trim().max(23).regex(/^(?:AW-)?\d{1,20}$/i),tB=r().trim().min(1).max(128).regex(/^[\w-]+$/),nB=r().trim().min(1).max(20).regex(/^(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$/),aB=r().trim().length(3).regex(/^[a-z]{3}$/i);Be("source",[Hc(r().trim().min(1).max(256)),Hr,Gr,Kr]);const iB=Be("source",[Hc(eB),Hr,Gr,Kr]),sB=Be("source",[Hc(tB),Hr,Gr,Kr]),oB=Be("source",[Hc(nB),Hr,Gr,Kr]),rB=Be("source",[Hr,Gr,Kr]),lB=Be("source",[Hc(aB),Hr,Gr,Kr]),m3=j(["all-pages","custom-event","filtered","unknown"]);m3.enum;const Ew=d({operator:r().trim().min(1).max(64),value:r().max(2048),negated:E(),ignoreCase:E()}).strict(),cB=d({triggerId:mt,triggerType:r(),eventPredicates:y(Ew),hostnamePredicates:y(Ew),unsupportedConditionCount:m().int().nonnegative()}).strict(),p3=j(["not-google-ads-tag","unsupported-tag-type","custom-html-opaque","conversion-id-unresolved","conversion-label-unresolved","value-mapping-missing","transaction-id-mapping-missing","currency-mapping-missing","trigger-unresolved","hostname-filter-unresolved"]);p3.enum;const uB=d({tagId:mt,tagType:r(),recognition:d3,recognitionReason:r().nullable(),conversionId:iB,conversionLabel:sB,value:oB,transactionId:rB,currency:lB,triggerStrategy:m3,triggerIds:y(mt),triggerPredicates:y(cB),reviewReasons:y(p3)}).strict().superRefine((e,n)=>{e.recognition===Tw.recognized&&e.recognitionReason!==null&&n.addIssue({code:ye.custom,path:["recognitionReason"],message:"Recognized assessments cannot carry an unknown-recognition reason."}),e.recognition===Tw.unknown&&!e.recognitionReason&&n.addIssue({code:ye.custom,path:["recognitionReason"],message:"Unknown assessments require a recognition reason."})}),h3=d({accountId:mt,containerId:mt,workspaceId:mt.nullable(),tags:y(ZM),triggers:y(YM),variables:y(XM),googleAdsTagAssessments:y(uB).default([])}).strict(),dB=d({accountId:mt,containerId:mt,id:mt,path:r(),name:r(),description:r().nullable(),fingerprint:r().nullable(),deleted:E()}).strict(),f3=d({source:R(l3.live),version:dB,graph:h3,fetchedAt:r()}).strict(),g3=d({source:R(l3.draft),workspace:Og,graph:h3,conflictCount:m().int().nonnegative(),fetchedAt:r()}).strict(),mB=d({account:c3,container:u3,workspaces:y(Og),live:f3.nullable(),draft:g3.nullable(),fetchedAt:r()}).strict();Be("status",[d({connected:R(!1),status:R(gd["not-connected"]),connection:ue(),selection:ue()}).strict(),d({connected:R(!0),status:R(gd["selection-required"]),connection:kf,selection:Td}).strict(),d({connected:R(!0),status:R(gd.connected),connection:kf,selection:Td}).strict(),d({connected:R(!0),status:R(gd.stale),connection:kf,selection:Td}).strict()]);const y3=j(["accounts","container","live","draft"]),yd=y3.enum,Pg=d({id:mt,projectId:mt,connectionId:mt,runId:mt,kind:y3,accountId:mt.nullable(),containerId:mt.nullable(),workspaceId:mt.nullable(),payloadChecksum:_w,rawPayloadSha256:_w.nullable(),rawPayloadBytes:m().int().nonnegative().nullable(),redactedFieldCount:m().int().nonnegative(),capturedAt:r(),createdAt:r()}).strict(),pB=Be("kind",[d({kind:R(yd.accounts),data:QM}).strict(),d({kind:R(yd.container),data:mB}).strict(),d({kind:R(yd.live),data:f3}).strict(),d({kind:R(yd.draft),data:g3}).strict()]),hB=d({metadata:Pg,payload:pB}).strict().superRefine((e,n)=>{e.metadata.kind!==e.payload.kind&&n.addIssue({code:ye.custom,path:["payload","kind"],message:"Snapshot metadata and payload kinds must match."})}),Yn=r().trim().min(1),fB=r().trim().min(1).refine(e=>Bc(e)!==null,"Expected a hostname or http(s) URL."),qg=j(["configured","statically-consistent","runtime-unverified","observed"]);qg.enum;const b3=j(["pass","fail","unknown"]);b3.enum;const v3=j(["ads-connection-missing","ads-conversion-action-missing","ads-goal-missing","ads-goal-not-biddable","ads-action-not-primary","gtm-connection-missing","gtm-live-graph-missing","gtm-tag-missing","gtm-tag-unrecognized","gtm-tag-paused","gtm-trigger-missing","gtm-variable-missing","gtm-event-mismatch","gtm-hostname-mismatch","gtm-value-mapping-missing","gtm-transaction-id-mapping-missing","gtm-currency-mapping-missing","gtm-conversion-id-mismatch","gtm-conversion-label-mismatch","runtime-event-not-observed","runtime-gtm-not-observed","runtime-ads-not-observed"]);v3.enum;const x3=d({id:Yn,projectId:Yn,name:r().trim().min(1),eventName:r().trim().min(1),googleAds:d({customerId:Yn,conversionActionId:Yn,conversionId:r().trim().min(1).optional(),conversionLabel:r().trim().min(1).optional(),campaignIds:y(Yn).max(50).default([]),requireBiddableGoal:E().default(!0),requirePrimaryAction:E().default(!0)}).strict(),gtm:d({accountId:Yn,containerId:Yn,tagId:Yn,triggerIds:y(Yn).default([]),variableIds:y(Yn).default([])}).strict(),runtime:d({verificationRequired:E().default(!0),requireTransactionId:E().default(!0),requireValue:E().default(!0),requireCurrency:E().default(!0),productionHosts:y(fB).default([])}).strict(),createdAt:r(),updatedAt:r()}).strict();x3.omit({id:!0,projectId:!0,createdAt:!0,updatedAt:!0});const w3=j(["not-run","consistent","inconsistent"]);w3.enum;const k3=j(["not-run","not-observed","observed"]);k3.enum;d({staticCheck:w3,runtimeVerificationRequired:E(),runtimeObservation:k3}).strict();const gB=d({code:v3,subject:r().trim().min(1),outcome:b3,status:qg,evidenceIds:y(Yn).default([])}).strict(),yB=d({contract:x3,status:qg,findings:y(gB),evaluatedAt:r()}).strict(),Rw=d({id:Yn,name:r(),detail:r(),active:E()});d({googleAds:d({customerId:Yn.nullable(),syncedAt:r().nullable(),conversionActions:y(Rw)}),gtm:d({containerId:Yn.nullable(),syncedAt:r().nullable(),tags:y(Rw)})});const vc=r().trim().min(1);function Dw(e){const n=e.trim();return/^\d{10}$/.test(n)?n:/^\d{3}-\d{3}-\d{4}$/.test(n)?n.replaceAll("-",""):null}const bB=/^[\w-]+$/;function Mg(e){const n=e.trim();return bB.test(n)?n:null}function vB(e){const n=e.trim();return/^accounts\/([\w-]+)$/.exec(n)?.[1]??Mg(n)}function xB(e,n){const i=e.trim(),o=/^accounts\/([\w-]+)\/containers\/([\w-]+)$/.exec(i);return o?o[1]===n?o[2]:null:Mg(i)}function wB(e,n,i){const o=e.trim(),u=/^accounts\/([\w-]+)\/containers\/([\w-]+)\/workspaces\/([\w-]+)$/.exec(o);return u?u[1]===n&&u[2]===i?u[3]:null:Mg(o)}function kB(e){const n=Dw(e.customerId);if(!n)return null;if(e.loginCustomerId===null)return{loginCustomerId:null,customerId:n};if(e.loginCustomerId===void 0)return{customerId:n};const i=Dw(e.loginCustomerId);return i?{loginCustomerId:i,customerId:n}:null}function SB(e){const n=vB(e.accountId);if(!n)return null;const i=xB(e.containerId,n);if(!i)return null;if(e.workspaceId===void 0)return{accountId:n,containerId:i};const o=wB(e.workspaceId,n,i);return o?{accountId:n,containerId:i,workspaceId:o}:null}const zm=j(["google-ads","gtm"]);zm.enum;d({provider:zm,publicUrl:r().url().optional(),developerToken:r().trim().min(1).max(512).optional()}).strict();d({provider:zm,authorizationUrl:r().url(),redirectUri:r().url(),expiresAt:r().nullable()}).strict();d({loginCustomerId:vc.nullable().optional(),customerId:vc}).strict().superRefine((e,n)=>{kB(e)||n.addIssue({code:ye.custom,message:"Expected ten-digit Google Ads customer IDs, with optional 3-3-4 display hyphens."})});d({accountId:vc,containerId:vc,workspaceId:vc.optional()}).strict().superRefine((e,n)=>{SB(e)||n.addIssue({code:ye.custom,message:"GTM resource paths must match the selected account and container."})});d({provider:zm,disconnected:E()}).strict();const S3=100;d({snapshots:y(lg).max(S3),nextCursor:r().nullable(),total:m().int().nonnegative()}).strict();d({snapshot:dI}).strict();d({snapshots:y(Pg).max(S3),nextCursor:r().nullable(),total:m().int().nonnegative()}).strict();d({snapshot:hB}).strict();d({assessment:yB,googleAdsSnapshot:lg.nullable(),gtmSnapshot:Pg.nullable()}).strict();d({id:r(),domain:r(),siteUrl:r().nullable().optional(),createdAt:r(),updatedAt:r()});const Sf=d({id:r(),url:r(),httpCode:m().nullable().optional(),inIndex:E().nullable().optional(),lastCrawledDate:r().nullable().optional(),inIndexDate:r().nullable().optional(),inspectedAt:r(),documentSize:m().nullable().optional(),anchorCount:m().nullable().optional(),discoveryDate:r().nullable().optional()});d({summary:d({total:m(),indexed:m(),notIndexed:m(),unknown:m().optional(),percentage:ot()}),lastInspectedAt:r().nullable(),indexed:y(Sf).default([]),notIndexed:y(Sf).default([]),unknown:y(Sf).default([]).optional()});d({query:r(),impressions:m(),clicks:m(),ctr:we(),averagePosition:m()});d({date:r(),indexed:m(),notIndexed:m(),unknown:m()});const jB=d({url:r(),status:j(["success","error"]),submittedAt:r(),error:r().optional()});d({summary:d({total:m().int().nonnegative(),succeeded:m().int().nonnegative(),failed:m().int().nonnegative()}),results:y(jB).default([])});const j3=d({url:r(),verified:E()});d({sites:y(j3).default([])});d({connected:E(),domain:r(),siteUrl:r().nullable(),createdAt:r().nullable(),updatedAt:r().nullable()});d({connected:E(),domain:r(),siteUrl:r().nullable(),availableSites:y(j3).default([])});d({siteUrl:r()});const AB=d({name:r(),alive:E(),lastUsed:r().nullable()});d({connected:E(),endpoint:r(),version:r().optional(),browserVersion:r().optional(),targets:y(AB).default([])});const Fr=j(["live","staging"]);d({projectName:r(),url:r(),stagingUrl:r().optional(),username:r(),defaultEnv:Fr,createdAt:r(),updatedAt:r()});const zw=d({url:r(),reachable:E(),pageCount:m().nullable().optional(),version:r().nullable().optional(),error:r().nullable().optional(),plugins:y(r()).optional(),authenticatedUser:d({id:m(),slug:r()}).nullable().optional()});d({connected:E(),projectName:r(),defaultEnv:Fr,live:zw.nullable(),staging:zw.nullable(),adminUrl:r().nullable().optional()});const NB=d({id:m(),slug:r(),title:r(),status:r(),modifiedAt:r().nullable().optional(),link:r().nullable().optional()}),A3=d({title:r().nullable(),description:r().nullable(),noindex:E().nullable(),writable:E().default(!1),writeTargets:y(r()).default([])}),CB=d({type:r(),json:He(r(),wn())}),_B=NB.extend({env:Fr,content:r(),seo:A3,schemaBlocks:y(CB).default([])}),Iw=_B.extend({contentHash:r(),contentSnippet:r()}),N3=d({manualRequired:R(!0),targetUrl:r(),adminUrl:r().nullable().optional(),content:r(),nextSteps:y(r()).default([])}),TB=d({slug:r(),severity:j(["high","medium","low"]),code:j(["noindex","missing-seo-title","missing-meta-description","missing-schema","thin-content"]),message:r()});d({slug:r(),title:r(),status:r(),wordCount:m(),seo:A3,schemaPresent:E(),issues:y(TB).default([])});const EB=d({slug:r(),status:j(["applied","skipped","manual"]),error:r().optional(),manualAssist:N3.optional()});d({env:Fr,strategy:j(["plugin","manual"]),results:y(EB)});const RB=d({slug:r(),status:j(["deployed","stripped","skipped","failed"]),schemasInjected:y(r()).optional(),manualAssist:N3.optional(),error:r().optional()});d({env:Fr,results:y(RB)});const DB=d({slug:r(),title:r(),canonrySchemas:y(r()),thirdPartySchemas:y(r()),hasCanonrySchema:E()});d({env:Fr,pages:y(DB)});const zB=d({name:r(),status:j(["completed","skipped","failed"]),summary:r().optional(),error:r().optional()});d({projectName:r(),steps:y(zB)});d({slug:r(),live:Iw,staging:Iw,hasDifferences:E(),differences:d({title:E(),slug:E(),content:E(),seoTitle:E(),seoDescription:E(),noindex:E(),schema:E()})});const IB=x2.shape.searchUnit.unwrap().enum;IB.query;const OB=d({name:r(),displayName:r().optional(),keyUrl:r().optional(),modelHint:r().optional(),model:r().optional(),defaultModel:r().optional(),configured:E(),quota:Cz.optional(),vertexConfigured:E().optional()}),PB=d({name:r(),displayName:r(),mode:j(["api","browser"]),modelConfigurable:E(),defaultModel:r(),knownModels:y(d({id:r(),displayName:r(),tier:j(["flagship","standard","fast","economy"])})).default([]),modelValidationPattern:d({source:r(),flags:r()}),modelValidationHint:r()}),Ow=d({configured:E()});d({providers:y(OB).default([]),providerCatalog:y(PB).default([]),google:Ow,bing:Ow});const qB=j(["recorded","errored","expired","canceled","parse_failed","duplicate"]);qB.enum;const MB=j(["not_plan_run","scoped_run","probe_run","batch_unavailable","model_not_frozen"]);MB.enum;Vx.standard,Vx.batch;const C3=j(["all","api","browser"]);C3.enum;const BB=j(["yes","no","unknown","not-mentioned"]),Pw=y(r().min(1)),qw=d({companyName:r().min(1),domain:r().min(1),queries:Pw.optional(),phrases:Pw.optional(),competitors:y(r().min(1)).optional(),providers:y(r().trim().min(1)).min(1).optional().describe("Configured provider names to use for both answers and analysis. Omit to use all providers matching providerMode."),providerMode:C3.optional().describe("Filter providers by transport; defaults to all. Browser-only selection requires manual queries and uses no API provider for analysis.")}).superRefine((e,n)=>{e.queries!==void 0&&e.phrases!==void 0&&n.addIssue({code:"custom",message:"Use queries; phrases is accepted only as a legacy alias when queries is omitted",path:["phrases"]})});qw.safeExtend({competitors:qw.shape.competitors.default([])});const LB=d({name:r(),count:m().int().nonnegative()}),UB=d({id:r(),name:r(),weight:m(),score:m(),findings:y(d({type:r(),message:r()})).default([]),recommendations:y(r()).default([])}),VB=d({url:r(),finalUrl:r(),auditedAt:r(),overallScore:m(),summary:r(),factors:y(UB).default([])}),$B=d({industry:r(),summary:r(),services:y(r()).default([]),categoryTerms:y(r()).default([])}),GB=d({provider:r(),displayName:r(),model:r().nullable().optional(),mentioned:E(),cited:E(),describedAccurately:BB,accuracyNotes:r().nullable().optional(),incorrectClaims:y(r()).default([]),recommendedCompetitors:y(r()).default([]),citedDomains:y(r()).default([]),groundingSources:y(wm).default([]),searchQueries:y(r()).default([]),answerText:r(),error:r().nullable().optional()}),KB=d({query:r(),providerResults:y(GB).default([])}),HB=d({totalQueries:m().int().nonnegative(),totalProviders:m().int().nonnegative(),totalComparisons:m().int().nonnegative(),mentionCount:m().int().nonnegative(),citationCount:m().int().nonnegative(),topCompetitors:y(LB).default([]),visibilityGap:r(),whatThisMeans:y(r()).default([]),recommendedActions:y(r()).default([])});d({companyName:r(),domain:r(),homepageUrl:r(),generatedAt:r(),queries:y(r()).default([]),competitors:y(r()).default([]),profile:$B,audit:VB,queryResults:y(KB).default([]),summary:HB});const FB=d({basis:j(["tracked","observed"]).nullable(),availability:j(["measured","not-measured","unavailable"]),reason:j(["select-query-class","answer-selection","no-competitors","insufficient-observed","no-answers","no-mentions","unavailable"]).nullable()}),Bg=FB.partial().shape,Lg=j(["competitor","directory","social","forum","news","reference","blog","ecommerce","video","academic","other"]);Lg.enum;const Ug=j(["cited","aspirational","wasted-surface"]),Mw=Ug.enum;Mw.cited,Mw.aspirational;const Fc=j(["direct-competitor","ota-aggregator","editorial-media","other","unknown"]),QB=Fc.enum;QB["direct-competitor"];const Im=j(["queued","seeding","probing","completed","failed"]);Im.enum;const _3=d({domain:r().min(1),hits:m().int().positive(),competitorType:Fc.default("unknown")}),ZB=d({id:r(),sessionId:r(),projectId:r(),query:r(),bucket:Ug.nullable().default(null),citationState:Li,citedDomains:y(r()).default([]),answerMentioned:E().nullable().default(null),createdAt:r()}),YB=d({id:r(),projectId:r(),status:Im,icpDescription:r().nullable().optional(),seedProvider:r().nullable().optional(),seedCountRaw:m().int().nullable().optional(),seedCount:m().int().nullable().optional(),seedFromAnswerCount:m().int().nullable().optional(),seedFromGroundingCount:m().int().nullable().optional(),seedBrandFilteredCount:m().int().nullable().optional(),buyerDescription:r().nullable().optional(),locations:y(mn).nullable().optional(),seedRawCandidates:y(r()).nullable().optional(),dedupClusterMinSims:y(m()).nullable().optional(),dedupBandPairFraction:we().nullable().optional(),dedupPairsTotal:m().int().nullable().optional(),seedProviders:y(r()).nullable().optional(),seedProviderCounts:He(r(),m().int()).nullable().optional(),canonicalCount:m().int().nullable().optional(),dedupThreshold:m().nullable().optional(),probeCount:m().int().nullable().optional(),citedCount:m().int().nullable().default(null),aspirationalCount:m().int().nullable().default(null),wastedCount:m().int().nullable().default(null),competitorMap:y(_3).default([]),warning:r().nullable().optional(),error:r().nullable().optional(),startedAt:r().nullable().optional(),finishedAt:r().nullable().optional(),createdAt:r()});YB.extend({probes:y(ZB).default([])});const XB=500,JB=8,WB=["gemini","openai"],eL=j(WB);d({icpDescription:r().min(1).optional(),buyerDescription:r().min(1).optional(),seedProviders:y(eL).min(1).transform(e=>[...new Set(e)].sort()).optional(),dedupThreshold:m().min(0).max(1).optional(),maxProbes:m().int().positive().max(XB).optional(),probeConcurrency:m().int().min(1).max(JB).optional(),locations:y(r().min(1)).optional()});d({buckets:y(Ug).min(1).optional(),includeCompetitors:E().optional(),competitorTypes:y(Fc).min(1).optional()});const Vg=d({domain:r().min(1),hits:m().int().positive(),competitorType:Fc,sources:y(_3)}),T3=j(["already-tracked","project-domain","shared-host","claimed-by-alias"]);T3.enum;const E3=Vg.extend({reason:T3,message:r()});d({sessionId:r(),projectId:r(),status:Im,queriesByBucket:d({cited:y(r()),aspirational:y(r()),"wasted-surface":y(r())}),suggestedCompetitors:y(Vg),skippedCompetitors:y(E3)});d({sessionId:r(),projectId:r(),promoted:d({queries:y(r()),competitors:y(r())}),skipped:d({queries:y(r()),competitors:y(r())}),competitorDetails:d({promoted:y(Vg),skipped:y(E3)})});Qe([R("cli"),r().regex(/^discovery:.+$/)]);const tL=d({query:r().min(1),probeHits:m().int().positive()}),nL=d({rawCandidates:m().int().nonnegative(),admitted:m().int().nonnegative(),rejected:d({belowFloor:m().int().nonnegative(),length:m().int().nonnegative(),navigational:m().int().nonnegative(),duplicate:m().int().nonnegative(),offAnchor:m().int().nonnegative(),semanticDuplicate:m().int().nonnegative()})});d({sessionId:r(),projectId:r(),provider:r(),status:Im,minProbeHits:m().int().positive(),anchorApplied:E(),semanticNoveltyApplied:E(),candidates:y(tL),stats:nL});const $g=j(["own","direct-competitor","ota-aggregator","editorial-media","other"]);$g.enum;const Om=j(["7d","30d","90d","all"]),Bw=j(["improving","declining","stable"]),aL=j(["mentioned","cited"]);aL.enum;const u0=d({citationRate:we(),cited:m().int(),total:m().int(),mentionRate:we(),mentionedCount:m().int()}),Qr=r().trim().min(1),iL=y(Qr).min(1).superRefine((e,n)=>{for(let i=1;i<e.length;i+=1)e[i-1]>=e[i]&&n.addIssue({code:"custom",message:"mixed model IDs must be sorted and unique",path:[i]})}),No=Be("status",[d({status:R("known"),model:Qr}),d({status:R("unknown")}),d({status:R("mixed"),models:iL,includesUnknown:E()})]),sL=d({observedAt:r(),bucketStartDate:r(),from:No,to:No,fromPreWindowAnchor:E().optional(),anchorObservedAt:r().optional()}),R3=d({latestObservation:d({observedAt:r(),state:No}),events:y(sL),eventTotal:m().int().nonnegative().optional(),anchorUnavailable:E().optional()}),oL=He(r(),R3),rL=R3.extend({latestServedModelIds:y(Qr).default([])}),lL=He(r(),rL),cL=d({observedAt:r(),configured:No,served:No}),uL=d({scope:j(["non-brand","pooled"]),rate:we().nullable(),projectMentionSnapshots:m().int().nonnegative(),competitorMentionSnapshots:m().int().nonnegative()}),dL=d({startDate:r(),endDate:r(),dataStartDate:r(),dataEndDate:r(),sweepCount:m().int().nonnegative(),citationRate:we(),cited:m().int(),total:m().int(),queryCount:m().int(),mentionRate:we(),mentionedCount:m().int(),mentionShare:uL,byProvider:He(r(),u0),modelEvidenceByProvider:He(r(),No).default({}),basketRevision:m().int().nullable().default(null)}),jf=d({first:we(m().min(0).max(1)),latest:we(m().min(0).max(1)),delta:we(m().min(-1).max(1))}),mL=d({citationRate:jf.nullable(),mentionRate:jf.nullable(),mentionShare:jf.nullable()}),pL=d({revision:m().int(),at:r(),added:y(r()),removed:y(r())}),hL=d({date:r(),delta:m().int(),label:r()}),fL=d({at:r(),identity:W2});d({window:Om,mentionShareScope:j(["non-brand","pooled"]),buckets:y(dL),overall:u0,byProvider:He(r(),u0),trend:Bw,mentionTrend:Bw,windowChange:mL.default(()=>({citationRate:null,mentionRate:null,mentionShare:null})),queryChanges:y(hL),basketChanges:y(pL).default([]),executionIdentityChanges:y(fL).default([]),referenceBasketRevision:m().int().nullable().default(null),modelAttribution:oL.default({}),servedModelAttribution:lL.default({}),modelServiceMismatch:He(r(),cL).default({}),modelPointerChanges:He(r(),NM).default({})});const Lw=d({category:Lg,label:r(),count:m().int(),percentage:we(),topDomains:y(d({domain:r(),count:m().int()}))}),gL=d({domain:r(),rank:m().int().positive().optional(),count:m().int(),percentage:we(),answerShare:we().optional(),category:Lg,label:r(),surfaceClass:$g}),yL=d({surfaceClass:$g,label:r(),count:m().int(),percentage:we(),domainCount:m().int()}),Uw=d({totalCitedSlots:m().int(),answerTotal:m().int().optional(),answersWithSources:m().int().optional(),domainTotal:m().int(),entries:y(gL),truncatedDomainCount:m().int(),truncatedCitedSlots:m().int(),bySurfaceClass:y(yL)}),bL=d({answers:y(r()),distinctDomains:y(r()),answerDomainPairs:y(r()),runs:y(r())}),vL=j(["measurement-plan","query-text"]);d({runId:r().trim().min(1).optional(),queryClass:ug.optional(),includeByQuery:j(["true","false","1","0"]).optional()});d({ranked:Uw,byProvider:He(r(),Uw),providersWithoutSources:y(r()).optional(),answerTotal:m().int().optional(),runCount:m().int().optional(),pooledAcrossRuns:E().optional(),unclassifiedAnswers:m().int().optional(),filters:d({runId:r().nullable(),queryClass:ug,queryClassBasis:Qe([vL,ue()]),includeByQuery:E()}).optional(),runId:r(),runIds:y(r()).optional(),countUnits:bL.optional(),window:Om,limit:m().int().nullable(),overall:y(Lw),byQuery:He(r(),y(Lw)).optional()});const xL=j(["own","direct-competitor","ota-aggregator","editorial-media","other","unknown"]),wL=Be("kind",[d({kind:R("project")}).strict(),d({kind:R("group"),groupKey:r().trim().min(1)}).strict(),d({kind:R("all-markets")}).strict()]),D3=j(["all","branded","non-brand"]),z3=j(["project","all-markets"]);d({window:Om.optional(),groupKey:r().trim().min(1).optional(),scope:z3.optional(),provider:r().trim().min(1).optional(),model:Qr.optional(),groupBy:R("model").optional(),queryClass:D3.optional(),location:r().trim().min(1).optional(),runId:r().trim().min(1).optional(),answers:j(["all","not-mentioned"]).optional()}).strict().superRefine((e,n)=>{e.scope==="all-markets"&&e.groupKey!==void 0&&n.addIssue({code:"custom",path:["groupKey"],message:"groupKey cannot be combined with scope=all-markets"}),e.model!==void 0&&e.provider===void 0&&n.addIssue({code:"custom",path:["provider"],message:"provider is required when filtering by model"})});const Ns=d({domain:r().trim().min(1),label:r().trim().min(1),surfaceClass:xL,pinned:E(),mentionCount:m().int().nonnegative(),shareOfVoice:ot(m().min(0).max(100)).nullable(),citationCount:m().int().nonnegative(),answeredResults:m().int().nonnegative(),firstSeenAt:r().datetime().nullable(),lastSeenAt:r().datetime().nullable(),sampleUrls:y(r().url()).max(3)}).strict(),I3=d({answeredResults:m().int().nonnegative(),sourceResults:m().int().nonnegative(),missingAnswerTextResults:m().int().nonnegative(),mentionCredits:m().int().nonnegative(),incompleteSourceResults:m().int().nonnegative(),excludedProbeResults:m().int().nonnegative(),excludedNonCompletedResults:m().int().nonnegative()}).strict(),kL=d({answers:y(r()),distinctNames:y(r()),runs:y(r())}).strict(),SL=50,jL=d({...Bg,comparison:y(d({domain:r(),mentions:m().int().nonnegative()})).optional(),observedNames:y(d({name:r(),answerCount:m().int().nonnegative()})).optional(),observedNamesTotal:m().int().nonnegative().optional(),provider:r().trim().min(1),model:Qr.nullable(),servedModels:No,snapshotCount:m().int().positive(),project:Ns,pinned:y(Ns),observed:y(Ns),otherSources:y(Ns),evidence:I3,truncated:E()}).strict(),AL=d({basis:R("requested-model"),groups:y(jL).max(SL),totalGroups:m().int().nonnegative(),truncated:E()}).strict();d({...Bg,comparison:y(d({domain:r(),mentions:m().int().nonnegative()})).optional(),observedNames:y(d({name:r(),answerCount:m().int().nonnegative()})).optional(),observedNamesTotal:m().int().nonnegative().optional(),answerSelection:d({answers:R("not-mentioned"),populationSize:m().int().nonnegative(),answerCount:m().int().nonnegative(),unknownMentionAnswers:m().int().nonnegative()}).strict().optional(),window:Om,scope:wL,project:Ns,pinned:y(Ns),observed:y(Ns),otherSources:y(Ns),evidence:I3,modelComparison:AL.optional(),marketState:d({activeRevision:m().int().positive(),draft:d({etag:r().trim().min(1),pendingCompetitorDomains:y(r().trim().min(1))}).strict().nullable()}).strict().nullable(),filters:d({scope:z3,groupKey:r().nullable(),provider:r().nullable(),model:Qr.optional(),groupBy:R("model").optional(),queryClass:D3,location:r().nullable(),runId:r().nullable(),answers:j(["all","not-mentioned"]).optional()}).strict(),truncated:E(),runCount:m().int().nonnegative().optional(),runIds:y(r()).optional(),countUnits:kL.optional()}).strict();const Gg=d({total:m().int(),checked:m().int(),mentioned:m().int(),cited:m().int(),mentionRate:we().nullable(),citedRate:we().nullable()}),O3=Gg.extend({provider:r(),firstObserved:r(),lastObserved:r()}),NL=Gg.extend({queryId:r().nullable(),query:r(),firstObserved:r(),lastObserved:r(),providers:y(O3).optional()}),CL=d({since:r().nullable(),until:r().nullable(),lastRuns:m().int().nullable(),runCount:m().int()}),_L=j(["provider"]),d0=d({domain:r(),mentions:m().int()}),TL=d({...Bg,measurementScope:j(["project","all-markets"]).optional(),queryClass:j(["branded","non-brand","pooled"]),percent:ot().nullable(),competitorCount:m().int().nonnegative(),projectMentions:m().int(),competitorMentions:m().int(),snapshotsWithAnswerText:m().int(),perCompetitor:y(d0)});d({project:r(),groupBy:_L.optional(),window:CL,totals:Gg,byProvider:y(O3).optional(),queries:y(NL),shareOfVoice:TL.optional()});const EL=j(["within-noise","moved","insufficient-data","model-discontinuous","model-unknown"]),RL=j(["up","down","flat"]),Vw=d({availability:j(["available","no-observations","no-competitive-frame","classification-unavailable"]),point:we().nullable(),ciLow:we().nullable(),ciHigh:we().nullable(),numerator:m().int(),denominator:m().int(),excludedUnknown:m().int().nonnegative().optional()}),DL=j(["mention-share-of-voice","cited-share-of-voice","mention-rate","cited-rate","mention-rate-branded","cited-rate-branded","mention-rate-non-brand","cited-rate-non-brand"]),zL=d({key:DL,label:r(),queryClass:j(["all","branded","non-brand","pooled"]),driftRobust:E(),from:Vw,to:Vw,rateRatio:m().nullable(),direction:Qe([RL,ue()]),verdict:EL}),Xd=d({month:r(),since:r(),until:r(),runCount:m().int(),lowRunCount:E()}),P3=d({queryCount:m().int(),excludedFromOnly:m().int(),excludedToOnly:m().int(),providers:y(r()),excludedProviders:y(r())}),q3=d({provider:r(),fromModels:y(r()),toModels:y(r())}),IL=j(["included","model-discontinuous","model-unknown"]),OL=d({provider:r(),status:IL,fromModels:y(r()),toModels:y(r())}),PL=j(["comparable","model-discontinuous","model-unknown","insufficient-data"]),M3=d({status:PL,comparedProviders:y(r()),providers:y(OL)}),qL=d({provider:r(),from:d({checked:m().int(),mentioned:m().int(),cited:m().int()}),to:d({checked:m().int(),mentioned:m().int(),cited:m().int()})}),ML=d({from:d({count:m().int(),of:m().int()}),to:d({count:m().int(),of:m().int()})}),BL=d({scope:j(["project","group","market","property"]).optional(),scopeKey:r().min(1).optional(),marketKey:r().min(1).optional(),provider:r().min(1).optional(),location:r().min(1).optional()}),LL=d({from:Xd,to:Xd,basket:P3,continuity:M3,modelChanges:y(q3)});d({project:r(),selection:BL.optional(),classComparison:LL.optional(),from:Xd,to:Xd,basket:P3,metrics:y(zL),queriesMentioned:ML,byProvider:y(qL),modelChanges:y(q3),continuity:M3,competitors:d({from:y(d0),to:y(d0)})});j(["json","csv"]);const UL=d({runId:r(),runKind:R("answer-visibility"),runStatus:ha,runTrigger:wg,runCreatedAt:r(),runStartedAt:r().nullable(),runFinishedAt:r().nullable(),snapshotId:r(),snapshotCreatedAt:r(),queryId:r().nullable(),query:r().nullable(),provider:r(),model:r().nullable(),location:r().nullable(),citationState:Li,cited:E(),answerMentioned:E().nullable(),mentionState:Qe([_c,ue()]),citedDomains:y(r()),citedUrls:y(r()).nullable(),captureStatus:Qe([ym,ue()]),sourceCount:m().int().nonnegative().nullable(),resolvedCount:m().int().nonnegative().nullable(),captureVersion:m().int().positive().nullable(),competitorOverlap:y(r()),recommendedCompetitors:y(r()),answerText:r().nullable(),groundingSources:y(wm),searchQueries:y(r())}),VL=d({since:r().nullable(),until:r().nullable(),includeProbes:E()});d({schemaVersion:R("canonry.results-export/v1"),generatedAt:r(),project:d({id:r(),name:r(),displayName:r(),canonicalDomain:r(),country:r(),language:r()}),filters:VL,recordCount:m().int().nonnegative(),records:y(UL)});d({runIds:y(r().trim().min(1)).max(100).default([]),researchRunIds:y(r().trim().min(1)).max(100).default([]),confirm:E().default(!1)}).strict().superRefine((e,n)=>{e.runIds.length+e.researchRunIds.length===0&&n.addIssue({code:"custom",message:"Select at least one saved run."}),(new Set(e.runIds).size!==e.runIds.length||new Set(e.researchRunIds).size!==e.researchRunIds.length)&&n.addIssue({code:"custom",message:"Run IDs must be unique."})});d({dryRun:E(),runIds:y(r()),researchRunIds:y(r()),querySnapshots:m().int().nonnegative(),researchQueries:m().int().nonnegative(),insights:m().int().nonnegative(),healthSnapshots:m().int().nonnegative()});const Pm=j(["organic","paid"]);Pm.enum;d({id:r(),projectId:r(),propertyId:r(),clientEmail:r(),connected:E(),createdAt:r(),updatedAt:r()});d({date:r(),landingPage:r(),sessions:m(),organicSessions:m(),users:m()});const Kg=j(["session","first_user","manual_utm"]),$L=d({source:r(),medium:r(),trafficClass:Pm,sessions:m(),users:m().optional(),sourceDimension:Kg,share:we()}),GL=d({source:r(),medium:r(),trafficClass:Pm,sourceDimension:Kg,landingPage:r(),sessions:m(),users:m().optional()}),KL=d({source:r(),medium:r(),sessions:m(),users:m().optional(),channelGroup:r(),share:we()}),rc=d({sessions:m(),sharePct:ot(),sharePctDisplay:r()}),HL=d({organic:rc,social:rc,direct:rc,ai:rc,other:rc}),FL=d({totalSessions:m(),totalOrganicSessions:m(),totalDirectSessions:m(),totalUsers:m().nullable(),topPages:y(d({landingPage:r(),sessions:m(),organicSessions:m(),directSessions:m(),users:m(),organicShare:we().nullable()})),aiReferrals:y($L),aiReferralLandingPages:y(GL),aiSessionsDeduped:m(),aiUsersDeduped:m().optional(),paidAiSessionsDeduped:m(),paidAiUsersDeduped:m().optional(),organicAiSessionsDeduped:m(),organicAiUsersDeduped:m().optional(),aiSessionsBySession:m(),aiUsersBySession:m().optional(),paidAiSessionsBySession:m(),paidAiUsersBySession:m().optional(),organicAiSessionsBySession:m(),organicAiUsersBySession:m().optional(),socialReferrals:y(KL),socialSessions:m(),socialUsers:m().optional(),channelBreakdown:HL,organicSharePct:ot(),aiSharePct:ot(),aiSharePctBySession:ot(),paidAiSharePct:ot(),paidAiSharePctBySession:ot(),organicAiSharePct:ot(),organicAiSharePctBySession:ot(),directSharePct:ot(),socialSharePct:ot(),organicSharePctDisplay:r(),aiSharePctDisplay:r(),aiSharePctBySessionDisplay:r(),paidAiSharePctDisplay:r(),paidAiSharePctBySessionDisplay:r(),organicAiSharePctDisplay:r(),organicAiSharePctBySessionDisplay:r(),directSharePctDisplay:r(),socialSharePctDisplay:r(),otherSessions:m(),otherSharePct:ot(),otherSharePctDisplay:r(),lastSyncedAt:r().nullable()});d({connected:E(),propertyId:r().nullable(),clientEmail:r().nullable(),authMethod:j(["service-account","oauth"]).nullable(),lastSyncedAt:r().nullable(),createdAt:r().nullable().optional(),updatedAt:r().nullable().optional()});const QL=d({propertyId:r(),displayName:r(),accountName:r()});d({properties:y(QL)});d({synced:E(),rowCount:m().int().nonnegative(),aiReferralCount:m().int().nonnegative(),socialReferralCount:m().int().nonnegative(),days:m().int().nonnegative(),requestedDays:m().int().nonnegative(),clamped:E(),syncedAt:r(),measurement:d({acquisition:d({days:m().int().nonnegative(),status:j(["ready","error"]),rowCount:m().int().nonnegative(),error:r().optional()}),leads:d({days:m().int().nonnegative(),status:j(["ready","error","not-configured"]),rowCount:m().int().nonnegative(),attributionScope:j(["landing-page","channel"]).optional(),error:r().optional()})}),syncedComponents:y(r()).optional()});const B3=j(["new","small-base","percent"]);B3.enum;const m0=d({source:r(),sessions7d:m(),sessionsPrev7d:m(),changeSessions:m(),changePct:ot().nullable(),changeBasis:B3});d({socialSessions7d:m(),socialSessionsPrev7d:m(),trend7dPct:ot().nullable(),socialSessions30d:m(),socialSessionsPrev30d:m(),trend30dPct:ot().nullable(),biggestMover:m0.nullable()});const lc=d({sessions7d:m(),sessionsPrev7d:m(),trend7dPct:ot().nullable(),sessions30d:m(),sessionsPrev30d:m(),trend30dPct:ot().nullable()});d({organic:lc,ai:lc,social:lc,direct:lc,total:lc,aiBiggestMover:m0.nullable(),socialBiggestMover:m0.nullable()});FL.extend({windowStart:r().nullable(),windowEnd:r().nullable(),windowDays:m().nullable(),periodStart:r().nullable(),periodEnd:r().nullable()});d({date:r(),source:r(),medium:r(),trafficClass:Pm,landingPage:r(),sessions:m(),users:m(),sourceDimension:Kg});const ZL=d({source:r(),sessions:m(),paidSessions:m(),organicSessions:m()}),YL=d({date:r(),sessions:m(),paidSessions:m(),organicSessions:m(),bySource:y(ZL)});d({days:y(YL),sources:y(r()),totalSessions:m(),totalPaidSessions:m(),totalOrganicSessions:m()});d({date:r(),source:r(),medium:r(),sessions:m(),users:m(),channelGroup:r()});d({date:r(),sessions:m(),organicSessions:m(),users:m(),usersSource:j(["deduplicated","landing-page-sum"])});d({id:r(),projectId:r(),runId:r().nullable(),overallCitedRate:we(),overallMentionRate:we(),totalPairs:m().int().nonnegative(),citedPairs:m().int().nonnegative(),mentionedPairs:m().int().nonnegative(),providerBreakdown:He(r(),d({citedRate:we(),mentionRate:we(),cited:m().int().nonnegative(),mentioned:m().int().nonnegative(),total:m().int().nonnegative()})),createdAt:r(),status:j(["ready","no-data"]),reason:R("no-runs-yet").optional()});const XL=d({view:j(["project","visibility","property","queries","site-health"]),unavailableReason:r().trim().min(1).max(512).optional(),selection:Kd.optional(),page:d({runId:r().trim().min(1).max(256).optional(),nodeKey:r().trim().min(1).max(2048).optional()}).strict().optional()}).strict().superRefine((e,n)=>{e.page&&e.view!=="site-health"&&n.addIssue({code:"custom",message:"Page context requires Site Health."}),e.selection&&!["visibility","property","queries"].includes(e.view)&&n.addIssue({code:"custom",message:"Measurement selection requires a measurement view."})}),JL=d({maxToolCalls:m().int().min(1).max(100).default(30),timeoutMs:m().int().min(1e3).max(6e5).default(18e4)}).strict(),Hg=j(["claude","openai","gemini","zai"]),WL=d({id:Hg,label:r(),defaultModel:r(),configured:E(),keySource:j(["config","env"]).nullable()});d({providers:y(WL).default([]),defaultProvider:Hg.nullable()});const eU=j(["aero","user","compaction"]);eU.enum;const L3=128;d({key:r().min(1).max(L3),value:r().min(1)});d({key:r().min(1).max(L3)});d({prompt:r().trim().min(1),conversationId:r().min(1).nullable().optional(),provider:Hg.optional(),modelId:r().trim().min(1).optional(),scope:j(["all","read-only"]).optional(),profile:j(["default","ads-operator"]).optional(),context:XL.optional(),limits:JL.optional()});const tU=nz({role:r(),content:wn().optional()}),U3=d({id:r(),title:r(),active:E(),modelProvider:r(),modelId:r(),createdAt:r(),updatedAt:r()});U3.extend({messages:y(tU),isStreaming:E()});d({conversations:y(U3),currentConversationId:r().nullable(),nextOffset:m().int().nullable()});d({id:DD()}).strict();d({id:r(),status:R("deleted")});const nU=["status","changes","gaps","insights"],aU=j(nU),iU=d({text:r().optional(),tool:d({name:r(),label:r(),arguments:He(r(),wn()),result:wn(),durationMs:m().int().nonnegative()})}),sU=d({id:aU,steps:y(iU),answer:r()});d({project:r(),seededAt:r(),starters:y(sU)});d({offset:Bi().int().min(0).default(0),limit:Bi().int().min(1).max(100).default(50)}).strict();const Zr=j(["commoncrawl","bing-webmaster"]);Zr.enum;const Fg=j(["queued","downloading","querying","ready","failed"]);Fg.enum;d({id:r(),release:r(),status:Fg,phaseDetail:r().nullable().optional(),vertexPath:r().nullable().optional(),edgesPath:r().nullable().optional(),vertexSha256:r().nullable().optional(),edgesSha256:r().nullable().optional(),vertexBytes:m().int().nullable().optional(),edgesBytes:m().int().nullable().optional(),projectsProcessed:m().int().nullable().optional(),domainsDiscovered:m().int().nullable().optional(),downloadStartedAt:r().nullable().optional(),downloadFinishedAt:r().nullable().optional(),queryStartedAt:r().nullable().optional(),queryFinishedAt:r().nullable().optional(),error:r().nullable().optional(),createdAt:r(),updatedAt:r()});const oU=d({linkingDomain:r(),numHosts:m().int(),source:Zr}),rU=d({projectId:r(),release:r(),targetDomain:r(),totalLinkingDomains:m().int(),totalHosts:m().int(),top10HostsShare:r(),queriedAt:r(),source:Zr,excludedLinkingDomains:m().int().optional(),excludedHosts:m().int().optional()});d({source:Zr,summary:rU.nullable(),total:m().int(),rows:y(oU)});d({release:r(),totalLinkingDomains:m().int(),totalHosts:m().int(),top10HostsShare:r(),queriedAt:r(),source:Zr});const lU=d({source:Zr,connected:E(),hasData:E(),latestRelease:r().nullable(),totalLinkingDomains:m().int(),lastSyncedAt:r().nullable()});d({projectId:r(),targetDomain:r(),sources:y(lU),anyConnected:E(),anyData:E()});d({duckdbInstalled:E(),duckdbVersion:r().nullable().optional(),duckdbSpec:r(),pluginDir:r()});d({installed:E(),version:r(),path:r(),alreadyPresent:E()});d({release:r(),vertexUrl:r(),edgesUrl:r(),vertexBytes:m().int().nullable(),edgesBytes:m().int().nullable(),lastModified:r().nullable()});d({release:r(),syncStatus:Fg.nullable(),bytes:m().int(),lastUsedAt:r().nullable()});const cU="jev-1.13.0",De=r().trim().min(1).max(256),kt=m().int().nonnegative(),V3=Ki(e=>typeof e=="string"?[e]:e,y(De).min(1).max(100)),Ed=we(m().min(0).max(1)).nullable(),Vi=j(["favorable","mixed","unfavorable","factual","subject-not-mentioned","wrong-subject","ambiguous-subject","ambiguous-judgment","subject-not-applicable","unsupported-language","missing-source-text","input-too-large","invalid-conclusion-evidence","pending","running","waiting-to-retry","failed","canceled"]);Vi.enum;const Qg=j(["disabled","not-measured","processing","partial","complete","failed","canceled","unsupported"]),Zg=d({schemaVersion:Qe([R(1),R(2)]),requestedModel:R(cU),verdictVersion:De,identityVersion:De,evidenceVersion:De,segmentationVersion:De,preprocessingVersion:De,languagePolicy:R("en-only"),comparisonMethodVersion:R("wilson-independent-v1"),confidenceThreshold:m().min(0).max(1).nullable(),questions:d({identity:r(),judgment:r(),stance:r(),conclusion:r(),complaint:r()}).strict()}).strict();function $3(e){if(typeof e!="object"||e===null||!("schemaVersion"in e)||e.schemaVersion!==1)return e;const n=Object.fromEntries(Object.entries(e).filter(([i])=>i!=="themes"));return typeof n.questions=="object"&&n.questions!==null&&(n.questions=Object.fromEntries(Object.entries(n.questions).filter(([i])=>i!=="theme"))),n}Ki($3,Zg);const G3=d({id:De,displayName:r(),aliases:y(r()),qualifiedAliases:y(r()).default([]),urls:y(r()),mentionNotApplicable:E()}).strict(),uU=d({queryId:De,executionNodeKey:De.nullable(),targetId:De,propertyId:De.nullable(),groupId:De.nullable(),marketId:De.nullable(),queryClass:j(["branded","non-brand"]),queryText:r().optional(),location:r().nullable()}).strict(),K3=d({queryId:De,queryText:r(),queryClass:j(["branded","non-brand"]),provider:De,requestedModel:r().nullable(),servedModel:r().nullable(),location:r().nullable(),revision:m().int().nullable(),usageEdges:y(uU),locationContext:mn.nullable().default(null)}).strict(),Ec=d({id:De,text:r().min(1),start:kt,end:kt}).strict(),H3=d({kind:j(["reported","estimated","unknown"]),inputTokens:kt.nullable(),outputTokens:kt.nullable()}).strict(),dU=d({sourceSnapshotId:De,sourceText:r(),sourceTextHash:De,subject:G3,subjectHash:De,context:K3,language:r(),definition:Zg,sentences:y(Ec)}).strict();Ki(e=>typeof e!="object"||e===null||!("definition"in e)?e:{...e,definition:$3(e.definition)},dU);const Af={returnedModel:r().nullable(),usage:H3},mU=Be("kind",[d({kind:R("classified"),...Af,returnedModel:r(),outcome:Vi,conclusion:y(Ec),complaint:y(Ec).nullable(),confidence:m().min(0).max(1).nullable()}).strict(),d({kind:R("abstained"),...Af,outcome:Vi,reason:r()}).strict(),d({kind:R("failed"),...Af,outcome:R("failed"),error:d({code:De,message:r(),retryable:E(),retryAfterMs:m().nonnegative().nullable()}).strict()}).strict()]).superRefine((e,n)=>{e.kind==="classified"&&["favorable","mixed","unfavorable"].includes(e.outcome)&&e.conclusion.length===0&&n.addIssue({code:"custom",path:["conclusion"],message:"Judgments require conclusion evidence"})});Ki(e=>typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e).filter(([n])=>n!=="themes")):e,mU);const Yr=d({runId:De.optional(),runIds:V3.optional(),revision:Bi().int().positive().optional(),mode:j(["auto","simple","advanced"]).default("auto"),queryClass:j(["branded","non-brand"]).default("branded"),scope:j(["project","property","group","market"]).default("project"),queryId:De.optional(),scopeKey:De.optional(),marketKey:De.optional(),provider:De.optional(),model:De.optional(),location:r().min(1).optional(),evaluationDefinitionId:De.optional(),executionNodeKey:De.optional()}).strict();function Qc(e,n){e.runId&&e.runIds&&n.addIssue({code:"custom",path:["runIds"],message:"Choose runId or runIds, not both."}),e.runIds&&new Set(e.runIds).size!==e.runIds.length&&n.addIssue({code:"custom",path:["runIds"],message:"Run IDs must be unique."})}Yr.superRefine(Qc);const pU=j(["assessments","locations"]),hU=25,F3=500;Yr.extend({include:Ki(e=>typeof e=="string"?e.split(",").map(n=>n.trim()).filter(Boolean):e,y(pU).max(2)).optional(),queryLimit:Bi().int().min(1).max(F3).default(hU),queryCursor:r().min(1).max(16384).optional()}).superRefine(Qc);const fU=Ki(e=>{const n=typeof e=="string"?[e]:Array.isArray(e)?e:null;return n?[...new Set(n.flatMap(i=>typeof i=="string"?i.split(",").map(o=>o.trim()).filter(Boolean):[i]))]:e},y(Vi).min(1).max(Vi.options.length));Yr.extend({assessmentId:De.optional(),outcome:fU.optional(),cursor:r().min(1).max(16384).optional(),limit:Bi().int().min(1).max(100).default(50)}).superRefine(Qc);Yr.extend({fromRunId:De.describe("Run ID or previous-rated to select the preceding run with stored ratings in this scope."),toRunId:De}).superRefine((e,n)=>{Qc(e,n),e.runIds&&n.addIssue({code:"custom",path:["runIds"],message:"Comparison requires one explicit run per period."})});const Yg=Yr.extend({runId:De.nullable(),revision:m().int().nullable(),evaluationDefinitionId:De.nullable(),mode:j(["simple","advanced"])}),Xg=d(Object.fromEntries(Vi.options.map(e=>[e,kt]))).strict(),gU=d({selected:kt,eligibleAssessments:kt,unadmittedAssessments:kt,judged:kt,distinctSourceAnswers:kt,eligibleAnswers:kt.optional(),ratedAnswers:kt.optional(),ratedAnswerRate:Ed.optional(),subjectNotMentioned:kt.nullable().optional().describe("Distinct admitted answers where every assessed subject in the selected scope is absent. Expected for non-brand queries; not missing classification. Null while disabled."),counts:Xg,expectedProviderSlots:kt,completedProviderSlots:kt}).strict(),yU=d({favorableRate:Ed,mixedRate:Ed,unfavorableRate:Ed,favorableDisplay:r(),mixedDisplay:r(),unfavorableDisplay:r(),interval:d({low:m(),high:m()}).strict().nullable(),method:R("wilson-independent-v1"),limitation:r()}).strict(),Or={state:Qg,reason:r().nullable(),provisional:E(),coverage:gU,score:yU},$w=d({...Or,selection:Yg,runIds:y(De)}).strict(),Gw=d({...Or,queryClass:R("all"),pooled:R(!0).optional(),runIds:y(De)}).strict(),bU=d({configured:E(),branded:$w,nonBrand:$w,headlineQueryClass:R("branded").optional(),pooledOverall:Gw.optional(),overall:Gw.optional().describe("Deprecated compatibility field. Pooled branded and non-brand assessments; never use as the sentiment headline.")}).strict(),vU=d({assessmentId:De.nullable(),sourceSnapshotId:De,runId:De,subjectId:De,subjectLabel:r(),executionNodeKey:De.nullable(),provider:De,requestedModel:r().nullable(),servedModel:r().nullable(),location:r().nullable(),evaluationDefinitionId:De.nullable(),state:Qg,outcome:Qe([Vi,ue()]),reason:r().nullable()}).strict(),xU=d({...Or,queryId:De,executionNodeKey:De.nullable().optional(),queryText:r(),queryClass:j(["branded","non-brand"]),sourceSnapshotIds:y(De),assessments:y(vU).default([]),locations:y(d({...Or,location:r().nullable(),sourceSnapshotIds:y(De)}).strict())}).strict(),wU=d({...Or,dimension:j(["provider","property","market","query"]),key:r(),label:r(),queryClass:j(["branded","non-brand"])}).strict(),p0=d({...Or,configured:E(),selection:Yg,evaluationDefinition:Zg.nullable(),breakdowns:y(wU),queries:y(xU),criticizedProperties:d({total:kt,keys:y(r())}).strict().optional(),queryPage:d({total:kt,limit:kt,nextCursor:r().nullable()}).strict().optional()}).strict();d({enabled:E().optional()}).strict();const kU=d({installEnabled:E(),enabled:E(),ready:E(),readinessReasons:y(r()),model:r(),enablementEpoch:kt,completionBoundary:kt,evaluationDefinitionId:De.nullable(),actions:d({configure:E(),backfill:E()}).strict(),experimental:R(!0),disclosure:r()}).strict(),Q3=Yr.extend({runIds:V3.optional(),from:r().datetime().optional(),to:r().datetime().optional()}).superRefine(Qc);d({previewToken:r().min(1).max(65536),idempotencyKey:r().trim().min(1).max(128)}).strict();const SU=d({previewToken:r().nullable(),expiresAt:r().nullable(),selection:Q3,evaluationDefinitionId:De.nullable(),eligibleAssessments:kt,alreadyClassified:kt,skipped:y(d({runId:De,reason:r(),count:kt}).strict()),estimatedInputTokens:kt,estimatedCostUsd:m().nonnegative().nullable(),estimateMethod:r()}).strict(),jU=j(["pending","running","waiting-to-retry","complete","partial","failed","canceled"]),AU=d({id:De,workItemId:De,dispatchedAt:r(),completedAt:r().nullable(),returnedModel:r().nullable(),usage:H3,errorCode:r().nullable()}).strict(),Z3=d({id:De,projectId:De,origin:j(["automatic","backfill"]),state:jU,enablementEpoch:kt,evaluationDefinitionId:De,selection:Q3,createdAt:r(),updatedAt:r(),counts:Xg,selected:kt,cancellationReason:r().nullable(),attempts:y(AU),attemptCount:kt.optional(),nextAttemptCursor:r().nullable().optional()}).strict(),NU=Z3.omit({attempts:!0,attemptCount:!0,nextAttemptCursor:!0}).extend({attemptCount:kt}).strict(),CU=d({jobs:y(NU)}).strict(),_U=50;d({attemptLimit:Bi().int().min(1).max(200).default(_U),attemptCursor:r().min(1).max(4096).optional()}).strict();const TU=d({assessmentId:De,runId:De,sourceSnapshotId:De,sourceText:r(),sourceTextHash:De,subject:G3,subjectHash:De,context:K3,evaluationDefinitionId:De,outcome:Vi,conclusion:y(Ec),complaint:y(Ec).nullable(),returnedModel:r().nullable(),reason:r().nullable()}).strict(),EU=d({state:Qg,selection:Yg.extend({assessmentId:De.optional(),outcome:y(Vi).optional()}),items:y(TU),nextCursor:r().nullable()}).strict(),RU=d({from:p0,to:p0,verdict:j(["improved","declined","no-clear-change"]).nullable(),favorableRateDelta:m().nullable(),refusalReasons:y(r()),commonUnits:kt,excludedFrom:kt,excludedTo:kt,changedScope:E(),method:R("wilson-independent-v1"),limitation:r()}).strict(),Jg=j(["positive","caution","negative","neutral"]),As=d({label:r(),value:r(),delta:r(),tone:Jg,description:r(),tooltip:r().optional(),trend:y(ot()),progress:ot().optional(),providerCoverage:r().optional()}),Kw=d({projectMentionSnapshots:m().int().nonnegative(),competitorMentionSnapshots:m().int().nonnegative(),combinedMentionSnapshots:m().int().nonnegative(),perCompetitor:y(d({domain:r(),mentionSnapshots:m().int().nonnegative(),shareOfCompetitiveTotal:ot()})),ranking:y(d({kind:j(["project","competitor"]),domain:r().nullable(),mentionSnapshots:m().int().nonnegative(),share:we(m().min(0).max(1))})),snapshotsWithAnswerText:m().int().nonnegative(),snapshotsTotal:m().int().nonnegative(),score:ot(m().min(0).max(100)).nullable()}),DU=As.extend({breakdown:Kw,scope:j(["non-brand","pooled"]),branded:Kw}),Nf=d({gained:m().int().nonnegative(),lost:m().int().nonnegative(),tone:Jg,hasPreviousRun:E(),gainedQueries:y(r()).optional(),lostQueries:y(r()).optional()}),zU=d({hasPreviousRun:E(),comparable:E(),querySetChanged:E(),previousRunAt:r().nullable(),currentQueryCount:m().int().nonnegative(),previousQueryCount:m().int().nonnegative(),comparableQueryCount:m().int().nonnegative(),addedQueryCount:m().int().nonnegative(),removedQueryCount:m().int().nonnegative(),addedQueries:y(r()),removedQueries:y(r())}),IU=d({id:r(),projectId:r(),runId:r().nullable(),type:j(["regression","gain","opportunity","first-citation","provider-pickup","persistent-gap","competitor-gained","competitor-lost","gbp-lodging-gap","gbp-listing-discrepancy","gbp-cta-gap","gbp-description-missing","gbp-metric-drop","gbp-keyword-drop"]),severity:j(["critical","high","medium","low"]),title:r(),query:r(),provider:r(),recommendation:d({action:r(),target:r().optional(),reason:r()}).optional(),cause:d({cause:r(),competitorDomain:r().optional(),details:r().optional()}).optional(),dismissed:E(),createdAt:r()}),OU=d({id:r(),projectId:r(),runId:r().nullable(),overallCitedRate:we(),overallMentionRate:we(),totalPairs:m().int().nonnegative(),citedPairs:m().int().nonnegative(),mentionedPairs:m().int().nonnegative(),providerBreakdown:He(r(),d({citedRate:we(),mentionRate:we(),cited:m().int().nonnegative(),mentioned:m().int().nonnegative(),total:m().int().nonnegative()})),createdAt:r(),status:j(["ready","no-data"]),reason:R("no-runs-yet").optional()});d({sentiment:bU.optional(),project:rP,latestRun:wO,health:OU.nullable(),topInsights:y(IU),queryClassScope:d({queryClass:R("all"),figures:y(r()),note:r()}).optional(),queryCounts:d({totalQueries:m().int().nonnegative(),citedQueries:m().int().nonnegative(),notCitedQueries:m().int().nonnegative(),citedRate:we(),mentionedQueries:m().int().nonnegative(),notMentionedQueries:m().int().nonnegative(),mentionRate:we()}),providers:y(d({provider:r(),citedRate:we(),cited:m().int().nonnegative(),total:m().int().nonnegative()})),transitions:d({since:r().nullable(),gained:m().int().nonnegative(),lost:m().int().nonnegative(),emerging:m().int().nonnegative()}),scores:d({mention:As,visibility:As,mentionShare:DU,gapQueries:As,mentionGaps:As,indexCoverage:As,competitorPressure:As,runStatus:As}),movementSummary:Nf,citationMovement:Nf,mentionMovement:Nf,movementComparison:zU,competitors:y(d({id:r(),domain:r(),aliases:y(r()).optional(),citationCount:m().int().nonnegative(),totalQueries:m().int().nonnegative(),pressureLabel:j(["None","Low","Moderate","High"]),citedQueries:y(r())})),providerScores:y(d({provider:r(),model:r().nullable(),score:ot(),cited:m().int().nonnegative(),total:m().int().nonnegative(),trend:y(ot()).optional()})),attentionItems:y(d({id:r(),tone:Jg,title:r(),detail:r(),actionLabel:r(),href:r()})),runHistory:y(d({runId:r(),createdAt:r(),citedCount:m().int().nonnegative(),totalCount:m().int().nonnegative(),citationRate:ot(),mentionedCount:m().int().nonnegative(),mentionRate:ot(),status:r()})),suggestedQueries:d({rows:y(d({query:r(),impressions:m(),clicks:m(),avgPosition:m(),reason:r()})),totalCandidates:m().int().nonnegative(),skippedAlreadyTracked:m().int().nonnegative()}),dateRangeLabel:r(),contextLabel:r()});j(["snapshot","insight"]);const PU=d({kind:R("snapshot"),id:r(),runId:r(),query:r(),provider:r(),model:r().nullable(),citationState:Li,matchedField:j(["answerText","citedDomains","citedUrls","searchQueries","query"]),snippet:r(),createdAt:r()}),qU=d({kind:R("insight"),id:r(),runId:r().nullable(),type:j(["regression","gain","opportunity","first-citation","provider-pickup","persistent-gap","competitor-gained","competitor-lost","gbp-lodging-gap","gbp-listing-discrepancy","gbp-cta-gap","gbp-description-missing","gbp-metric-drop","gbp-keyword-drop"]),severity:j(["critical","high","medium","low"]),title:r(),query:r(),provider:r(),matchedField:j(["title","query","recommendation","cause"]),snippet:r(),dismissed:E(),createdAt:r()}),MU=Be("kind",[PU,qU]);d({query:r(),totalHits:m().int().nonnegative(),truncated:E(),hits:y(MU)});const Y3=j(["create","expand","refresh","add-schema"]);Y3.enum;const X3=j(["gsc","competitor-evidence","both"]);X3.enum;const J3=j(["high","medium","low"]);J3.enum;const BU=j(["blog-post","comparison","listicle","how-to","guide","glossary"]);BU.enum;const W3=j(["proposed","briefed","payload-generated","draft-created","published","validated","dismissed"]);W3.enum;const Wg=j(["ownable","ceded"]);Wg.enum;const LU=d({url:r(),gscImpressions:m().nonnegative(),gscClicks:m().nonnegative(),gscAvgPosition:m().nonnegative().nullable(),organicSessions:m().nonnegative()}),UU=d({domain:r(),url:r(),title:r(),citationCount:m().int().nonnegative()}),VU=d({demand:m(),competitor:m(),absence:m(),gapSeverity:m()}),$U=d({actionId:r(),state:W3,lastUpdated:r()}),GU=d({targetRef:r(),query:r(),action:Y3,ourBestPage:LU.nullable(),winningCompetitor:UU.nullable(),score:m(),scoreBreakdown:VU,drivers:y(r()),demandSource:X3,actionConfidence:J3,existingAction:$U.nullable(),winnabilityClass:Wg,winnability:we(m().min(0).max(1)).nullable()});d({targets:y(GU),contextMetrics:d({totalAiReferralSessions:m().int().nonnegative(),latestRunId:r(),runTimestamp:r()})});const KU=d({targetRef:r(),addressedUrl:r().nullable(),note:r().nullable(),dismissedAt:r()});d({dismissals:y(KU)});d({targetRef:r().min(1),addressedUrl:r().url().optional(),note:r().max(500).optional()});d({targetRef:r(),promptVersion:r(),provider:r(),model:r(),responseText:r(),costMillicents:m().int().nonnegative(),generatedAt:r()});d({provider:r().optional(),model:r().optional(),forceRefresh:E().optional()});const HU=d({targetQuery:r().trim().min(1),winnabilityClass:Wg,angle:r().trim().min(1),whyWinnable:r().trim().min(1),schemaHookup:r().trim().min(1),controllableSurfaceRationale:r().trim().min(1)});d({targetRef:r(),promptVersion:r(),provider:r(),model:r(),brief:HU,costMillicents:m().int().nonnegative(),generatedAt:r()});const FU=d({domain:r(),competitorType:Fc,hits:m().int().nonnegative(),updatedAt:r()});d({classifications:y(FU)});const QU=d({uri:r(),title:r(),domain:r(),isOurDomain:E(),isCompetitor:E(),citationCount:m().int().nonnegative(),providers:y(jt)}),ZU=d({query:r(),groundingSources:y(QU)});d({sources:y(ZU),latestRunId:r()});const YU=d({query:r(),competitorDomains:y(r()),competitorCount:m().int().nonnegative(),missRate:we(m().min(0).max(1)),lastSeenInRunId:r()});d({gaps:y(YU),latestRunId:r()});const eA=j(["ok","warn","fail","skipped"]);eA.enum;const e1=j(["global","project"]);e1.enum;const tA=j(["auth","config","providers","integrations","database","schedules","agent"]);tA.enum;const nA=j(["health","silent"]);nA.enum;const XU=r().regex(/^[1-9]\d{3}-(0[1-9]|1[0-2])$/,"Expected YYYY-MM"),JU=d({id:r(),category:tA,scope:e1,title:r(),status:eA,notificationPolicy:nA.optional().describe("Health checks page by default. Silent report advisories remain visible but never affect health alert state."),code:r().describe('Stable machine-readable code (e.g. "google.token.refresh-failed"). Use this for filtering and remediation logic.'),summary:r(),remediation:r().nullable().optional().describe('Operator-facing next step. Null when status is "ok" or no specific remediation applies.'),details:He(r(),wn()).optional().describe("Structured context — principal email, redirect URI, missing scopes, etc. Stable per check id."),durationMs:m().int().nonnegative().describe("How long the check took to execute.")});d({scope:e1,project:r().nullable().describe('Project name when scope is "project", null otherwise.'),reportMonths:y(XU).optional().describe("Calendar months evaluated by project report readiness checks."),generatedAt:r().describe("ISO-8601 timestamp when this doctor run started."),durationMs:m().int().nonnegative(),summary:d({total:m().int().nonnegative(),ok:m().int().nonnegative(),warn:m().int().nonnegative(),fail:m().int().nonnegative(),skipped:m().int().nonnegative()}),checks:y(JU)});function WU(e){return e.trim().toLowerCase()}const eV=d({provider:r(),citationState:Li,cited:E(),mentioned:E(),runId:r(),runCreatedAt:r()}),tV=d({queryId:r(),query:r(),providers:y(eV),citedCount:m().int().nonnegative(),mentionedCount:m().int().nonnegative(),totalProviders:m().int().nonnegative()}),nV=d({queryId:r(),query:r(),provider:r(),citingCompetitors:y(r()),runId:r(),runCreatedAt:r()}),aV=d({providersConfigured:m().int().nonnegative(),providersCiting:m().int().nonnegative(),providersMentioning:m().int().nonnegative(),totalQueries:m().int().nonnegative(),queriesCitedAndMentioned:m().int().nonnegative(),queriesCitedOnly:m().int().nonnegative(),queriesMentionedOnly:m().int().nonnegative(),queriesInvisible:m().int().nonnegative(),latestRunId:r().nullable(),latestRunAt:r().nullable()});d({summary:aV,byQuery:y(tV),competitorGaps:y(nV),status:j(["ready","no-data"]),reason:j(["no-runs-yet","no-queries"]).optional()});const iV=Qe([R(60),R(90)]),sV=j(["earliest","middle","prior","latest"]),jr=d({clicks:m().int().nonnegative(),impressions:m().int().nonnegative()}),aA=d({name:sV,startDate:r(),endDate:r()}),oV=aA.extend({totals:jr}),rV=aA.extend({organicSessions:m().int().nonnegative()}),Cf=d({startDate:r(),endDate:r(),observedDays:m().int().nonnegative()}),bd=d({verified:m().int().nonnegative(),claimedUnverified:m().int().nonnegative(),unknownAiLike:m().int().nonnegative()}),Hw=d({total:m().int().nonnegative(),paid:m().int().nonnegative(),organic:m().int().nonnegative(),unknown:m().int().nonnegative()});d({contractVersion:R("organic-evidence/v1"),periodDays:iV,asOfDate:r().nullable(),coverage:d({gsc:E(),ga4:E(),server:E(),visibility:E()}),sourceCoverage:d({gsc:Cf.nullable(),ga4:Cf.nullable(),server:Cf.nullable(),visibility:d({completedAt:r(),ageDays:m().nonnegative()}).nullable()}),gsc:d({propertyTotals:jr,namedBrand:jr,namedNonBrand:jr,suppressedOrUnreportedResidual:jr,cohorts:y(oV)}).nullable(),ga4:d({organicSessions:m().int().nonnegative(),cohorts:y(rV)}).nullable(),gaAiReferrals:d({paidSessions:m().int().nonnegative(),organicSessions:m().int().nonnegative()}).nullable(),server:d({crawlerHits:bd,userFetchHits:bd,referralSessions:Hw}).nullable(),visibility:d({runId:r(),completedAt:r(),ageDays:m().nonnegative(),answerPairs:m().int().nonnegative(),mentionedPairs:m().int().nonnegative(),citedPairs:m().int().nonnegative()}).nullable(),measurement:Uz,pages:y(d({path:r(),gsc:jr,ga4OrganicSessions:m().int().nonnegative(),server:d({crawlerHits:bd,userFetchHits:bd,referralSessions:Hw})})),findings:y(d({tone:j(["positive","caution","neutral"]),title:r(),detail:r()})),limitations:y(d({code:r(),detail:r()}))});const lV=j(["claude","codex"]);lV.enum;const cV=j(["claude","codex","all"]);cV.enum;const iA=d({content:m().int().nonnegative(),sitemap:m().int().nonnegative(),robots:m().int().nonnegative(),asset:m().int().nonnegative(),other:m().int().nonnegative()}),uV=j(["content","sitemap","robots","asset","other"]),t1=j(["cloud-run","wordpress","cloudflare","vercel","generic-log"]);t1.enum;const dV=j(["raw-request-events","aggregate-request-metrics","request-url","status-code","user-agent","remote-ip","referer","cursor-pull"]);dV.enum;const mV=j(["raw-request","aggregate-bucket"]),pV=mV.enum,hV=j(["observed","provider-aggregated","inferred"]),fV=hV.enum,gV=d({type:r().nullable(),labels:He(r(),r())}),yV=d({sourceType:t1,evidenceKind:R(pV["raw-request"]),confidence:R(fV.observed),eventId:r().min(1),observedAt:r().min(1),method:r().nullable(),requestUrl:r().nullable(),host:r().nullable(),path:r().min(1),queryString:r().nullable(),status:m().int().nullable(),userAgent:r().nullable(),remoteIp:r().nullable(),referer:r().nullable(),latencyMs:m().nullable(),requestSizeBytes:m().int().nullable(),responseSizeBytes:m().int().nullable(),providerResource:gV,providerLabels:He(r(),r())});d({events:y(yV),rawEntryCount:m().int().nonnegative(),skippedEntryCount:m().int().nonnegative(),nextPageToken:r().optional(),filter:r()});const sA=j(["connected","paused","error","archived"]),ste=sA.enum,oA=j(["oauth","service-account"]);oA.enum;const bV=j(["verified","claimed_unverified","unknown_ai_like"]),ote=bV.enum,vV=d({id:r().min(1),source:r().min(1),version:r().min(1)}),rA=d({manifestId:r().min(1),manifest:vV.nullable(),hits:m().int().nonnegative()});d({gcpProjectId:r().min(1),serviceName:r().nullable().optional(),location:r().nullable().optional(),authMode:oA});d({baseUrl:r().url(),username:r().min(1)});const n1=j(["production","preview"]);n1.enum;d({projectId:r().min(1),teamId:r().min(1),environment:n1});const lA=d({id:r(),projectId:r(),sourceType:t1,displayName:r(),status:sA,lastSyncedAt:r().nullable(),lastCursor:r().nullable(),lastError:r().nullable(),skippedThroughAt:r().nullable(),queueBacklogCount:m().int().nonnegative().nullable(),queueBacklogObservedAt:r().nullable(),archivedAt:r().nullable(),config:He(r(),wn()),createdAt:r(),updatedAt:r()});d({gcpProjectId:r().min(1),serviceName:r().min(1).optional(),location:r().min(1).optional(),displayName:r().min(1).optional(),keyJson:r().optional()});d({baseUrl:r().url(),username:r().min(1),applicationPassword:r().min(1),displayName:r().min(1).optional()});d({projectId:r().min(1),teamId:r().min(1),token:r().min(1),environment:n1.optional(),displayName:r().min(1).optional()});const xV=j(["direct-push","queue-pull"]),Xr=xV.enum,a1=r().regex(/^(?=.{1,63}$)[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,"Cloudflare Queue name must be 1-63 characters, use only letters, numbers, or dashes, and start and end with a letter or number"),cA=d({schemaVersion:R(1),workerVersion:r().min(1),expectedBotListVersion:r().min(1),zoneId:r().nullable()}),wV=cA.extend({deliveryMode:R(Xr["direct-push"]),accountId:r().nullable()}),kV=cA.extend({deliveryMode:R(Xr["queue-pull"]),accountId:r().min(1),queueId:r().min(1),queueName:a1,retentionSeconds:m().int().min(60).max(1209600)});function uA(e){if(typeof e!="object"||e===null||Array.isArray(e))return e;const n=e;return"deliveryMode"in n?e:{...n,deliveryMode:"direct-push"}}Ki(uA,Be("deliveryMode",[wV,kV]));const dA=d({displayName:r().min(1).optional(),zoneId:r().min(1).optional()}),SV=dA.extend({deliveryMode:R(Xr["direct-push"]),accountId:r().min(1).optional()}),jV=dA.extend({deliveryMode:R(Xr["queue-pull"]),accountId:r().min(1),queueId:r().min(1),queueName:a1,retentionSeconds:m().int().min(60).max(1209600),apiToken:r().min(1)});Ki(uA,Be("deliveryMode",[SV,jV]));const mA=d({sourceId:r().min(1),workerScript:r().min(1),wranglerToml:r().min(1),workerVersion:r().min(1),instructions:r().min(1)}),AV=mA.extend({deliveryMode:R(Xr["direct-push"]),activationRequired:E().default(!1)}),NV=mA.extend({deliveryMode:R(Xr["queue-pull"]),activationRequired:E().default(!1),accountId:r().min(1),queueId:r().min(1),queueName:a1,retentionSeconds:m().int().min(60).max(1209600)});Be("deliveryMode",[AV,NV]);const CV=d({eventId:r().min(1),observedAt:r().datetime(),method:r().nullable(),host:r().nullable(),path:r().min(1),queryString:r().nullable(),status:m().int().nullable(),userAgent:r().nullable(),remoteIp:r().nullable(),referer:r().nullable(),cf:d({verifiedBot:E().nullable(),botScore:m().int().nullable(),country:r().nullable(),asn:m().int().nullable(),asOrganization:r().nullable()}).nullable()});d({schemaVersion:R(1),workerVersion:r().min(1),events:y(CV).min(1).max(100)});d({acceptedEvents:m().int(),droppedEvents:m().int(),workerVersionAck:r(),crawlerBucketRows:m().int(),aiUserFetchBucketRows:m().int(),aiReferralBucketRows:m().int(),sampleRows:m().int()});d({sourceId:r(),runId:r(),syncedAt:r(),pulledEvents:m().int().nonnegative(),selfTrafficExcluded:m().int().nonnegative(),crawlerHits:m().int().nonnegative(),aiUserFetchHits:m().int().nonnegative(),aiReferralHits:m().int().nonnegative(),unknownHits:m().int().nonnegative(),crawlerBucketRows:m().int().nonnegative(),aiUserFetchBucketRows:m().int().nonnegative(),aiReferralBucketRows:m().int().nonnegative(),sampleRows:m().int().nonnegative(),remainingBacklogCount:m().int().nonnegative().optional(),windowStart:r(),windowEnd:r()});d({days:m().int().positive().optional()});d({advanceToNow:R(!0)});d({sourceId:r(),runId:r(),status:ha,windowStart:r(),windowEnd:r(),daysRequested:m().int().positive(),daysApplied:m().int().positive()});const _V=d({crawlerHits:m().int().nonnegative(),crawlerContentHits:m().int().nonnegative(),crawlerInfraHits:m().int().nonnegative(),crawlerSegments:iA,aiUserFetchHits:m().int().nonnegative(),aiReferralHits:m().int().nonnegative(),aiReferralLandedHits:m().int().nonnegative(),aiReferralRedirectedHits:m().int().nonnegative(),sampleCount:m().int().nonnegative()});d({sources:y(lA)});const TV=lA.extend({totals24h:_V,latestRun:d({runId:r(),status:ha,startedAt:r().nullable(),finishedAt:r().nullable(),error:r().nullable()}).nullable()});d({sources:y(TV)});const EV=j(["crawler","ai-user-fetch","ai-referral"]),i1=EV.enum,pA=j(["hour","day"]);pA.enum;const RV=d({bucket:r(),crawlerHits:m().int().nonnegative(),aiUserFetchHits:m().int().nonnegative(),aiReferralHits:m().int().nonnegative(),aiReferralLandedHits:m().int().nonnegative(),crawlerContentHits:m().int().nonnegative(),measured:E()}),DV=d({kind:R(i1.crawler),sourceId:r(),tsHour:r(),botId:r(),operator:r(),verificationStatus:r(),verificationManifests:y(rA).optional(),verificationUnattributedHits:m().int().nonnegative().optional(),pathNormalized:r(),pathClass:uV,status:m().int(),hits:m().int().nonnegative()}),zV=d({kind:R(i1["ai-user-fetch"]),sourceId:r(),tsHour:r(),botId:r(),operator:r(),verificationStatus:r(),verificationManifests:y(rA).optional(),verificationUnattributedHits:m().int().nonnegative().optional(),pathNormalized:r(),status:m().int(),hits:m().int().nonnegative()}),IV=d({kind:R(i1["ai-referral"]),sourceId:r(),tsHour:r(),product:r(),operator:r(),sourceDomain:r(),evidenceType:r(),landingPathNormalized:r(),status:m().int(),hits:m().int().nonnegative(),paidHits:m().int().nonnegative(),organicHits:m().int().nonnegative(),unknownHits:m().int().nonnegative()}),OV=Be("kind",[DV,zV,IV]);d({windowStart:r(),windowEnd:r(),series:d({granularity:pA,points:y(RV),coverageStart:r().nullable(),trends:d({crawlerContentHits:xo.nullable(),aiUserFetchHits:xo.nullable(),aiReferralLandedHits:xo.nullable()})}),totals:d({crawlerHits:m().int().nonnegative(),crawlerContentHits:m().int().nonnegative(),crawlerInfraHits:m().int().nonnegative(),crawlerSegments:iA,aiUserFetchHits:m().int().nonnegative(),aiReferralHits:m().int().nonnegative(),aiReferralLandedHits:m().int().nonnegative(),aiReferralRedirectedHits:m().int().nonnegative(),aiReferralPaidHits:m().int().nonnegative(),aiReferralOrganicHits:m().int().nonnegative(),aiReferralUnknownHits:m().int().nonnegative()}),eventRows:d({total:m().int().nonnegative(),returned:m().int().nonnegative(),truncated:E()}),events:y(OV)});const s1=j(["admin","viewer"]),PV=/^[a-z\d][\w.-]{0,63}$/i,qV=r().regex(PV,"A name may use letters, digits, dots, dashes and underscores, and must start with a letter or digit."),Fw=12,MV=r().min(Fw,`A password must be at least ${Fw} characters.`),hA=d({id:r(),name:r(),role:s1,createdAt:r(),lastLoginAt:r().nullable()});d({users:y(hA)});d({name:qV,password:MV,role:s1});d({name:r().min(1),password:r().min(1)});d({authRequired:E(),user:hA.pick({name:!0,role:!0}).nullable()});const fA=j(["queued","running","completed","partial","failed"]),rte=fA.enum,gA=j(["queued","running","completed","failed"]),lte=gA.enum,BV=20,LV=20,h0=50,yA=d({kind:j(["market","property"]),key:he,expectedPlanRevision:m().int().positive().optional()}).strict(),UV=d({kind:j(["market","property"]),key:he,label:r().trim().min(1),planRevision:m().int().positive()}).strict(),bA=r().min(1).max(4e3).refine(e=>e.trim().length>0,"Research queries cannot be blank.");function cte(e){const n=new Set;return e.filter(i=>{const o=WU(i);return!o||n.has(o)?!1:(n.add(o),!0)})}function VV(e,n){const i=e?e.kind==="market"?{market:e.label,submarket:e.label}:{property:e.label,propertyBrand:e.label}:{};return n?{...i,location:n.label}:i}function ute(e,n,i){const o=new Set(e.variables),u=[...e.pattern.matchAll(/\{([^{}]+)\}/g)].map(x=>x[1]),h=[...new Set(u.filter(x=>!o.has(x)))];if(h.length)throw Px("The selected research template contains undeclared placeholders: "+h.join(", "));const f=VV(n,i),b=e.variables.filter(x=>f[x]===void 0);if(b.length)throw Px("The selected research template requires unavailable bindings: "+b.join(", "));const v=Object.fromEntries(e.variables.map(x=>[x,f[x]]));return{bindings:v,output:BP(e.pattern,v)}}const vA=d({templateId:r().trim().min(1).max(256),templateVersion:r().trim().min(1).max(256),bindingLocation:mn.nullable().optional()}).strict();d({queries:y(bA).min(1).max(50),provider:r().trim().min(1).optional(),model:r().trim().min(1).max(200).optional(),location:mn.nullable().optional(),scope:yA.optional(),template:vA.optional(),idempotencyKey:r().trim().min(1).max(128).optional()}).superRefine((e,n)=>{e.model&&!e.provider&&n.addIssue({code:ye.custom,path:["provider"],message:"provider is required when model is supplied"})});const $V=yA.extend({expectedPlanRevision:m().int().positive()}).strict(),GV=d({queries:y(bA).min(1).max(h0),provider:r().trim().min(1),model:r().trim().min(1).max(200),location:mn.nullable(),scope:$V.optional(),template:vA.optional()}).strict();d({idempotencyKey:r().trim().min(1).max(128),runs:y(GV).min(1).max(LV)}).strict().superRefine((e,n)=>{e.runs.reduce((o,u)=>o+u.queries.length,0)>h0&&n.addIssue({code:ye.custom,path:["runs"],message:`A research batch may contain at most ${h0} concrete queries across all destinations`})});const KV=d({kind:j(["api-key","user"]),id:r(),name:r(),role:s1.nullable(),limited:E().optional()}),xA=d({id:r(),projectId:r(),status:fA,provider:r(),requestedModel:r().nullable(),resolvedModel:r(),location:mn.nullable(),scope:UV.nullable().optional(),template:Ij.nullable().optional(),totalQueries:m().int(),completedQueries:m().int(),failedQueries:m().int(),error:r().nullable(),initiatedBy:KV.nullable(),startedAt:r().nullable(),finishedAt:r().nullable(),createdAt:r()}),HV=d({id:r(),position:m().int(),query:r(),queryClass:Vr.nullable().optional(),status:gA,requestedModel:r().nullable(),resolvedModel:r(),servedModel:r().nullable(),answerText:r().nullable(),groundingSources:y(wm),citedDomains:y(r()),searchQueries:y(r()),namedCompetitors:y(r()).default([]),citedCompetitorDomains:y(r()).default([]),answerMentioned:E().nullable(),citationState:Li.nullable(),error:r().nullable(),startedAt:r().nullable(),finishedAt:r().nullable(),createdAt:r()}),FV=xA.extend({queries:y(HV)});d({runs:y(FV)});const QV=d({name:r(),displayName:r(),modelConfigurable:E(),defaultModel:r(),knownModels:y(d({id:r(),displayName:r()}))});d({runs:y(xA),nextCursor:r().nullable().optional(),providers:y(QV).optional(),access:d({canRun:E(),dailyRunLimit:m().int().positive().nullable()}).optional()});d({apiKey:r().min(1)});d({id:r(),name:r(),status:r(),currencyCode:r().nullable(),timezone:r().nullable(),url:r().nullable(),reviewStatus:r().nullable(),integrityReviewStatus:r().nullable(),integrityDecision:r().nullable()});d({q:r().trim().min(1).max(200),limit:m().int().min(1).max(100).default(20)});const ZV=d({id:r(),type:r(),canonicalName:r(),countryCode:r(),name:r(),regionCode:r().nullable()});d({count:m().int().nonnegative(),query:r(),results:y(ZV)});const YV=d({id:r(),clientType:r().optional(),name:r().optional(),pixelId:r().optional()});d({pixels:y(YV)});const XV=d({id:r(),name:r().optional()}),JV=d({id:r(),name:r().optional(),eventType:r().optional(),customEventName:r().nullable().optional(),attributionWindowDays:m().int().positive().optional(),adAccountId:r().optional(),sourceIds:y(r()).optional(),sources:y(XV).optional(),archived:E().optional(),version:m().int().nonnegative().optional()});d({eventSettings:y(JV)});d({connected:E(),adAccountId:r().nullable().optional(),displayName:r().nullable().optional(),currencyCode:r().nullable().optional(),timezone:r().nullable().optional(),status:r().nullable().optional(),reviewStatus:r().nullable().optional(),integrityReviewStatus:r().nullable().optional(),integrityDecision:r().nullable().optional(),lastSyncedAt:r().nullable().optional(),conversionTrackingConfigured:E().optional()});d({disconnected:E()});d({runId:r(),status:r()});const WV=["campaign_id","ad_group_id","ad_id","ad_account_id","oppref"],e$=/^[\w.-]+=[^&#\s]*$/,t$=/\{([^}]*)\}/g,Ro=r().min(1).max(1e3).superRefine((e,n)=>{const i=u=>n.addIssue({code:"custom",message:u});if(e.startsWith("?")||e.startsWith("&")){i("Tracking template must not start with ? or &");return}const o=new Set;for(const u of e.split("&")){if(!e$.test(u)){i(`Tracking template pair '${u}' must be key=value without whitespace, # or &`);return}const h=u.slice(0,u.indexOf("="));if(o.has(h)){i(`Tracking template repeats the parameter '${h}'`);return}o.add(h)}for(const u of e.matchAll(t$)){const h=u[1];if(!WV.includes(h)){i(`Tracking template macro '{${h}}' is not supported`);return}}}),n$=d({type:r().nullable().optional(),title:r().nullable().optional(),body:r().nullable().optional(),targetUrl:r().nullable().optional(),fileId:r().nullable().optional()}),Zc=j(["impressions","clicks"]);Zc.enum;const Yc=j(["impression","click"]);Yc.enum;const a$=d({id:r(),adGroupId:r(),name:r(),status:r(),reviewStatus:r().nullable().optional(),creative:n$.nullable().optional(),landingPageQueryStringTemplate:r().nullable().optional(),upstreamUpdatedAt:m().int().nullable().optional(),syncedAt:r().optional()}),i$=d({id:r(),campaignId:r(),name:r(),description:r().nullable().optional(),status:r(),billingEventType:Qe([Yc,ue()]).optional(),maxBidMicros:m().int().nullable().optional(),contextHints:y(r()).default([]),ads:y(a$).default([]),landingPageQueryStringTemplate:r().nullable().optional(),upstreamUpdatedAt:m().int().nullable().optional(),syncedAt:r().optional()}),s$=d({id:r(),name:r(),description:r().nullable().optional(),status:r(),startTime:m().int().nullable().optional(),endTime:m().int().nullable().optional(),biddingType:Qe([Zc,ue()]).optional(),dailySpendLimitMicros:m().int().nullable().optional(),lifetimeSpendLimitMicros:m().int().nullable().optional(),conversionEventSettingIds:y(r()).default([]),locationIds:y(r()).optional(),adGroups:y(i$).default([]),landingPageQueryStringTemplate:r().nullable().optional(),upstreamUpdatedAt:m().int().nullable().optional(),syncedAt:r().optional()});d({campaigns:y(s$)});const wA=j(["campaign","ad_group"]);wA.enum;const o$=d({level:wA,entityId:r(),date:r(),impressions:m().int(),clicks:m().int(),spendMicros:m().int(),conversions:m().int(),ctr:we().nullable(),cpcMicros:m().int().nullable(),inProgress:E()});d({rows:y(o$),currencyCode:r().nullable().optional()});const kA=d({from:r().nullable(),to:r().nullable(),inProgressDate:r().nullable()}),SA=d({impressions:m().int(),clicks:m().int(),spendMicros:m().int(),conversions:m().int(),ctr:we().nullable(),cpcMicros:m().int().nullable()});d({connected:E(),displayName:r().nullable().optional(),currencyCode:r().nullable().optional(),lastSyncedAt:r().nullable().optional(),campaignCount:m().int(),adGroupCount:m().int(),adCount:m().int(),window:kA,totals:SA});const jA=j(["unavailable","partial","complete"]);jA.enum;const AA=j(["no_ads_connection","connection_not_synced","no_ads_sync","entity_rows_missing_sync_run_id","entity_rows_span_multiple_sync_runs","source_sync_missing","source_sync_not_ads_sync","source_sync_not_completed"]);AA.enum;const NA=j(["unavailable","reported"]);NA.enum;const r$={storedSnapshot:"stored_ads_snapshot"},CA=j(["unavailable","partial_snapshot","metrics_unavailable","observed_activity","no_observed_activity"]);CA.enum;const l$=d({id:r(),name:r(),status:r(),reviewStatus:r().nullable()}),c$=d({id:r(),name:r(),status:r(),billingEventType:Qe([Yc,ue()]),maxBidMicros:m().int().nullable(),contextHints:y(r()),ads:y(l$)}),u$=d({id:r(),name:r(),status:r(),biddingType:Qe([Zc,ue()]),dailySpendLimitMicros:m().int().nullable(),lifetimeSpendLimitMicros:m().int().nullable(),conversionEventSettingIds:y(r()),adGroups:y(c$)});d({snapshot:d({status:jA,issue:Qe([AA,ue()]),lastSyncedAt:r().nullable(),campaignCount:m().int().nonnegative(),adGroupCount:m().int().nonnegative(),adCount:m().int().nonnegative(),sourceSync:d({runId:r(),status:ha}).nullable()}),historicalCampaignRollups:d({status:NA,window:kA,totals:SA.nullable()}),storedConfiguration:d({basis:R(r$.storedSnapshot),connection:d({status:r().nullable(),reviewStatus:r().nullable(),integrityReviewStatus:r().nullable(),integrityDecision:r().nullable(),conversionTrackingConfigured:E()}).nullable(),campaigns:y(u$)}),assessment:d({state:CA})});const ri=r().min(8).max(128).regex(/^[\w.:-]+$/,"operationKey may contain letters, numbers, dot, underscore, colon, and hyphen"),$t=r().min(1).max(200),Do=r().min(3).max(1e3).refine(e=>e.trim().length>0),Pr=m().int().min(946684800).max(4102444800),qr=m().int().positive().max(Number.MAX_SAFE_INTEGER),o1=r().regex(/^[a-f0-9]{64}$/),_A=y($t).max(100).refine(e=>new Set(e).size===e.length,"conversionEventSettingIds must be unique"),TA=r().url().refine(e=>new URL(e).protocol==="https:",{message:"URL must use https"}),EA=j(["image_upload","campaign_create","campaign_update","campaign_pause","campaign_archive","campaign_tree_activate","ad_group_create","ad_group_update","ad_group_pause","ad_group_archive","ad_create","ad_update","ad_pause","ad_archive"]);EA.enum;const RA=j(["pending","reconciling","succeeded","failed","unknown"]),Tr=RA.enum,DA=j(["known_entity","create_fingerprint","manual_only"]);DA.enum;const zA=j([Tr.pending,Tr.unknown,Tr.reconciling]);zA.enum;const IA=j(["active","paused","archived"]);IA.enum;const OA=j(["file","campaign","ad_group","ad"]);OA.enum;const PA=j(["campaign","ad_group","ad"]);PA.enum;const r1=d({id:$t,expectedUpdatedAt:m().int().nonnegative()}).strict(),d$=r1,Jd=1e3;function m$(e){return 1+e.campaign.adGroups.reduce((n,i)=>n+1+i.ads.length,0)}const p$=r1.extend({ads:y(d$).min(1).max(Jd-1)}).strict(),h$=r1.extend({adGroups:y(p$).min(1).max(Jd-1)}).strict();function f$(e,n){return e<n?-1:e>n?1:0}function Qw(e,n,i){for(let o=1;o<e.length;o+=1)if(f$(e[o-1].id,e[o].id)>=0){i.addIssue({code:"custom",path:n,message:"Activation manifest entities must be uniquely sorted by id"});return}}const qA=d({campaign:h$}).strict().superRefine((e,n)=>{m$(e)>Jd&&n.addIssue({code:"custom",path:["campaign"],message:`Activation manifests may contain at most ${Jd} entities`}),Qw(e.campaign.adGroups,["campaign","adGroups"],n);const o=new Set;for(let u=0;u<e.campaign.adGroups.length;u+=1){const h=e.campaign.adGroups[u];Qw(h.ads,["campaign","adGroups",u,"ads"],n);for(let f=0;f<h.ads.length;f+=1){const b=h.ads[f];o.has(b.id)&&n.addIssue({code:"custom",path:["campaign","adGroups",u,"ads",f,"id"],message:"An ad may appear only once in an activation manifest"}),o.add(b.id)}}}),MA=o1,g$=j(["approved","executing","consumed","revoked","expired","unknown"]),Mi=g$.enum,y$=j(["pending","executing","active","failed","rollback_executing","rolled_back","rollback_failed","unknown"]),Ps=y$.enum,b$=d({name:Do.optional(),description:r().max(4e3).nullable().optional(),status:IA.optional(),startTime:Pr.nullable().optional(),endTime:Pr.nullable().optional(),lifetimeSpendLimitMicros:qr.min(1e6).optional(),locationIds:y($t).max(100).optional(),biddingType:Zc.optional(),conversionEventSettingIds:_A.optional(),campaignId:$t.optional(),contextHints:y(r().min(1).max(1e3)).max(100).optional(),maxBidMicros:qr.max(1e8).optional(),billingEventType:Yc.optional(),adGroupId:$t.optional(),creativeFingerprint:o1.optional(),landingPageQueryStringTemplate:Ro.nullable().optional()}).strict();d({operationKey:ri,imageUrl:TA});d({operationKey:ri,name:Do,description:r().max(4e3).optional(),startTime:Pr.optional(),endTime:Pr.optional(),lifetimeSpendLimitMicros:qr.min(1e6),locationIds:y($t).min(1).max(100),biddingType:Zc.optional(),conversionEventSettingIds:_A.optional(),landingPageQueryStringTemplate:Ro.optional()}).superRefine((e,n)=>{e.startTime!==void 0&&e.endTime!==void 0&&e.endTime<=e.startTime&&n.addIssue({code:"custom",path:["endTime"],message:"endTime must be after startTime"})});d({operationKey:ri,campaignId:$t,name:Do,description:r().max(4e3).optional(),contextHints:y(r().min(1).max(1e3)).min(1).max(100),maxBidMicros:qr.max(1e8),billingEventType:Yc.optional(),landingPageQueryStringTemplate:Ro.optional()});const BA=d({title:r().min(3).max(50),body:r().min(1).max(100),targetUrl:TA,fileId:$t});d({operationKey:ri,adGroupId:$t,name:Do,creative:BA,landingPageQueryStringTemplate:Ro.optional()});function l1(e){return Object.keys(e).some(n=>n!=="operationKey"&&n!=="expectedUpdatedAt")}d({operationKey:ri,expectedUpdatedAt:m().int().nonnegative(),name:Do.optional(),description:r().max(4e3).nullable().optional(),startTime:Pr.nullable().optional(),endTime:Pr.nullable().optional(),lifetimeSpendLimitMicros:qr.min(1e6).optional(),locationIds:y($t).min(1).max(100).optional(),landingPageQueryStringTemplate:Ro.nullable().optional()}).refine(l1,{message:"At least one campaign field must be updated"});d({operationKey:ri,expectedUpdatedAt:m().int().nonnegative(),name:Do.optional(),description:r().max(4e3).nullable().optional(),contextHints:y(r().min(1).max(1e3)).min(1).max(100).optional(),maxBidMicros:qr.max(1e8).optional(),landingPageQueryStringTemplate:Ro.nullable().optional()}).refine(l1,{message:"At least one ad group field must be updated"});d({operationKey:ri,expectedUpdatedAt:m().int().nonnegative(),name:Do.optional(),creative:BA.optional(),landingPageQueryStringTemplate:Ro.nullable().optional()}).refine(l1,{message:"At least one ad field must be updated"});d({operationKey:ri});d({operationKey:ri,expectedUpdatedAt:m().int().nonnegative()});const qm=d({id:r(),adAccountId:r().nullable(),operationKey:r(),kind:EA,state:RA,entityType:Qe([OA,ue()]),entityId:r().nullable(),upstreamUpdatedAt:m().int().nullable(),errorCode:r().nullable(),errorMessage:r().nullable(),reconcileStrategy:Qe([DA,ue()]),reconcileParentId:$t.nullable(),reconcileFingerprint:o1.nullable(),reconcileFields:b$.nullable(),reconcileAttempts:m().int().nonnegative(),lastReconciledAt:r().nullable(),createdAt:r(),updatedAt:r()});d({operation:qm,replayed:E()});const Ot=l2({offset:!0}),Jr={id:$t,projectId:$t,adAccountId:$t,manifestHash:MA,manifest:qA,executorApiKeyId:$t,approverApiKeyId:$t,expiresAt:Ot,approvedAt:Ot,createdAt:Ot,updatedAt:Ot,revocationRequestedAt:Ot.nullable()},v$=d({...Jr,state:R(Mi.approved),operationId:ue(),executionStartedAt:ue(),consumedAt:ue(),revokedAt:ue(),expiredAt:ue()}).strict(),x$=d({...Jr,state:R(Mi.executing),operationId:$t,executionStartedAt:Ot,consumedAt:ue(),revokedAt:ue(),expiredAt:ue()}).strict(),w$=d({...Jr,state:R(Mi.consumed),operationId:$t,executionStartedAt:Ot,consumedAt:Ot,revokedAt:ue(),expiredAt:ue()}).strict(),k$=d({...Jr,state:R(Mi.revoked),operationId:ue(),executionStartedAt:ue(),consumedAt:ue(),revokedAt:Ot,expiredAt:ue()}).strict(),S$=d({...Jr,state:R(Mi.expired),operationId:ue(),executionStartedAt:ue(),consumedAt:ue(),revokedAt:ue(),expiredAt:Ot}).strict(),j$=d({...Jr,state:R(Mi.unknown),operationId:$t,executionStartedAt:Ot,consumedAt:ue(),revokedAt:ue(),expiredAt:ue()}).strict(),LA=Be("state",[v$,x$,w$,k$,S$,j$]).superRefine((e,n)=>{e.executorApiKeyId===e.approverApiKeyId&&n.addIssue({code:"custom",path:["executorApiKeyId"],message:"The activation executor must use a different API key from the approver"}),e.revocationRequestedAt!==null&&e.state!==Mi.executing&&e.state!==Mi.unknown&&e.state!==Mi.consumed&&n.addIssue({code:"custom",path:["revocationRequestedAt"],message:"Only an executing, cancelled, or unresolved activation can carry a cancellation request"})}),qs={id:$t,operationId:$t,ordinal:m().int().nonnegative(),entityType:PA,entityId:$t,expectedUpdatedAt:m().int().nonnegative(),createdAt:Ot,updatedAt:Ot},Xc={errorCode:ue(),errorMessage:ue()},c1={errorCode:r().min(1).max(100),errorMessage:r().min(1).max(500),remediation:r().min(1).max(500)},A$=d({...qs,...Xc,state:R(Ps.pending),providerUpdatedAt:ue(),remediation:ue(),startedAt:ue(),finishedAt:ue()}).strict(),N$=d({...qs,...Xc,state:R(Ps.executing),providerUpdatedAt:ue(),remediation:ue(),startedAt:Ot,finishedAt:ue()}).strict(),C$=d({...qs,...Xc,state:R(Ps.active),providerUpdatedAt:m().int().nonnegative(),remediation:ue(),startedAt:Ot,finishedAt:Ot}).strict(),_$=d({...qs,...c1,state:R(Ps.failed),providerUpdatedAt:Qe([m().int().nonnegative(),ue()]),startedAt:Ot,finishedAt:Ot}).strict(),T$=d({...qs,...Xc,state:R(Ps.rollback_executing),providerUpdatedAt:m().int().nonnegative(),remediation:r().min(1).max(500),startedAt:Ot,finishedAt:ue()}).strict(),E$=d({...qs,...Xc,state:R(Ps.rolled_back),providerUpdatedAt:m().int().nonnegative(),remediation:r().min(1).max(500),startedAt:Ot,finishedAt:Ot}).strict(),R$=d({...qs,...c1,state:R(Ps.rollback_failed),providerUpdatedAt:m().int().nonnegative(),startedAt:Ot,finishedAt:Ot}).strict(),D$=d({...qs,...c1,state:R(Ps.unknown),providerUpdatedAt:Qe([m().int().nonnegative(),ue()]),startedAt:Ot,finishedAt:Ot}).strict(),z$=Be("state",[A$,N$,C$,_$,T$,E$,R$,D$]),f0={exact:"exact",refreshSemanticallyUnchanged:"refresh_semantically_unchanged"},I$=j([f0.exact,f0.refreshSemanticallyUnchanged]);d({manifest:qA,executorApiKeyId:$t,expiresAt:Ot,versionPolicy:I$.default(f0.exact)}).strict();d({grant:LA}).strict();d({}).strict();d({operationKey:ri,grantId:$t,manifestHash:MA}).strict();d({grant:LA,operation:qm,steps:y(z$)}).strict();const O$=[Tr.pending,Tr.unknown,Tr.reconciling];function P$(e){if(e===void 0||e==="")return O$;if(Array.isArray(e)){const n=[];for(const i of e)typeof i=="string"?n.push(...i.split(",")):n.push(i);return n}return typeof e=="string"?e.split(",").filter(Boolean):e}d({state:Ki(P$,y(zA).min(1).max(3).refine(e=>new Set(e).size===e.length,"state values must be unique")),limit:Bi().int().min(1).max(200).default(100),cursor:r().min(1).max(1e3).optional()});d({operations:y(qm),count:m().int().nonnegative(),nextCursor:r().nullable()});d({}).strict();d({operation:qm,resolved:E()});d({campaignId:r().min(1).max(200).optional(),lookbackDays:Bi().int().min(1).max(30).default(7)});const UA=j(["campaign","ad_group","ad"]);UA.enum;const VA=j(["both","live-only","stored-only"]);VA.enum;const q$=R("live-provider-read"),M$=d({date:r().nullable(),startTime:m().nullable(),endTime:m().nullable(),impressions:m().nullable(),clicks:m().nullable(),spend:m().nullable(),conversions:m().nullable(),ctr:we().nullable(),cpc:m().nullable(),cpm:m().nullable()}),Zw=d({impressions:m().int(),clicks:m().int(),spendMicros:m().int(),conversions:m().int()}),B$=d({date:r(),live:Zw.nullable(),stored:Zw.nullable(),drifted:E()}),L$=d({field:r(),live:r().nullable(),stored:r().nullable()}),U$=d({name:r().nullable(),status:r(),reviewStatus:r().nullable(),mode:r().nullable(),updatedAt:m().nullable()}),V$=d({name:r(),status:r(),reviewStatus:r().nullable(),upstreamUpdatedAt:m().nullable(),syncedAt:r()}),$$=d({entityType:UA,id:r(),parentId:r().nullable(),presence:VA,live:U$.nullable(),stored:V$.nullable(),fieldDeltas:y(L$),liveMetrics:y(M$).nullable(),metricDeltas:y(B$).nullable(),drifted:E()}),G$=d({surface:r(),entityId:r().nullable(),upstreamStatus:m().int().nullable()});d({basis:q$,fetchedAt:r(),adAccountId:r(),storedSnapshotSyncedAt:r().nullable(),metricsWindow:d({lookbackDays:m().int().positive()}),bounds:d({maxCampaigns:m().int().positive(),maxAdGroupsPerCampaign:m().int().positive(),maxAdsPerAdGroup:m().int().positive(),maxReaderCalls:m().int().positive(),readerCalls:m().int().nonnegative(),maxPagesPerReaderCall:m().int().positive(),maxUpstreamHttpRequests:m().int().positive(),truncated:E()}),entities:y($$),drift:d({entitiesCompared:m().int().nonnegative(),driftedEntities:m().int().nonnegative(),statusDrifted:m().int().nonnegative(),metricsDrifted:m().int().nonnegative()}),errors:y(G$)});const K$=d({status:j(["available","unavailable","not-supported"])}),Yw="*";function $A(e){if(e?.some(n=>n.trim().toLowerCase()==="report"))return"The report embed tab has been retired. Remove report from the allowed tabs; explicitly configure overview to display AI Visibility."}const H$=j(["enabled","configured_disabled","CANONRY_TELEMETRY_DISABLED","DO_NOT_TRACK","CI","NO_CONFIG","CONFIG_UNAVAILABLE"]),F$=j(["server","local"]);d({enabled:E(),configuredEnabled:E(),reason:H$,anonymousId:r().regex(/^[0-9a-f]{8}\.\.\.$/i).optional(),target:F$.optional()}).strict();const ft=1,_f=j(["system","project","queries","competitors","run","finish"]),Q$=j(["copy_agent_command","connect_server_traffic","connect_search_console","connect_analytics","connect_business_profile","set_schedule","add_notification","open_project","review_page_health"]),Tf=j(["0","1","2-3","4-5","6-10","11+"]);function ai(e){return!Number.isFinite(e)||e<=0?"0":e<2?"1":e<4?"2-3":e<6?"4-5":e<11?"6-10":"11+"}const Xw=j(["api_unavailable","database_unavailable","worker_unavailable","no_provider","no_queries","provider_save_failed","project_create_failed","query_save_failed","run_rejected","run_failed","run_cancelled","rate_limited","provider_auth","network","unknown"]),Z$=j(["wizard","platform","site_health"]),vd=d({eventId:r().uuid(),flowVersion:R(ft),onboardingSessionId:r().uuid(),surface:Z$.optional()});Be("event",[vd.extend({event:R("onboarding.started"),step:_f,resumed:E()}).strict(),vd.extend({event:R("onboarding.step_completed"),step:_f,method:j(["existing","inline","manual","generated","skipped","automatic"]),countBucket:Tf.optional(),nextAction:Q$.optional()}).strict(),vd.extend({event:R("onboarding.blocked"),step:_f,action:j(["continue","configure_provider","generate_queries","save","launch_run","retry_run"]),reasonCode:Xw}).strict(),vd.extend({event:R("run.requested"),origin:R("dashboard_setup"),result:j(["queued","rejected"]),kind:j(["answer_visibility","site_health"]).optional(),providerCountBucket:Tf,queryCountBucket:Tf,reasonCode:Xw.optional()}).strict()]);d({accepted:E()});j(["cli","mcp-stdio","mcp-http","aero","api","dashboard"]);const GA=["/","/projects","/projects/:projectName","/projects/:projectName/portfolio","/projects/:projectName/search-console","/projects/:projectName/conversions","/projects/:projectName/local","/projects/:projectName/discovery","/projects/:projectName/queries","/projects/:projectName/properties/:targetKey","/projects/:projectName/report","/projects/:projectName/activity","/projects/:projectName/backlinks","/projects/:projectName/technical-aeo","/projects/:projectName/history","/projects/:projectName/settings","/runs","/history","/settings","/setup","/backlinks","/traffic","/traffic/:projectName/:sourceId","not-found","other"],Y$=j(GA),KA=["overview","portfolio","search-console","conversions","local","discovery","queries","properties","report","activity","backlinks","technical-aeo","history","settings","other"],Ef=j(KA),X$=["sweep.launch","sweep.cancel","site_audit.launch","project.create","project.update","project.delete","query.add","query.delete","query.generate","competitor.save","competitor.delete","schedule.save","schedule.delete","provider.save","settings.save","integration.connect_started","integration.connect","integration.disconnect","traffic.sync","notification.save","notification.test","measurement_plan.publish","discovery.run","api_key.create","api_key.revoke","export.download","report.download","aero.open","aero.send","filter.change","search.submit"],J$=j(X$),W$=["google","gsc","ga","bing","gbp","wordpress","openai_ads","google_ads","gtm","traffic_cloudflare","traffic_vercel","traffic_cloud_run","traffic_wordpress"],eG=j(W$),tG=["provider","model","location","window","query_class","other"],nG=j(tG),aG=["csv","json","html"],iG=["render","unhandled","api"],sG=["4xx","5xx","network"],oG=["LCP","INP","CLS","FCP","TTFB"],rG=["good","needs-improvement","poor"],HA=/^[a-z][a-z0-9-]{0,39}$/,FA=/^[a-z_$][\w$]{0,39}$/i,lG=/^\/api\/v1(?:\/(?:[a-z][a-z0-9-]*(?:\.[a-z]+)?|\{[A-Za-z]+\}))*$/,QA=160,cG=new Set(["accounts","activation-grants","ad-groups","ads","cache","campaigns","competitors","confirm","connections","containers","contracts","conversations","dismissals","insights","jobs","keys","locations","measurement-query-sets","measurement-query-templates","notifications","operations","projects","providers","queries","recommendations","runs","screenshots","segments","sessions","snapshots","sources","users","versions"]),uG=new Set(["ads/account","ads/activation-grants","ads/ad-groups","ads/ads","ads/campaigns","ads/connect","ads/connection","ads/conversions","ads/delivery-diagnostics","ads/files","ads/geo","ads/insights","ads/live-delivery","ads/operations","ads/status","ads/summary","ads/sync","keys/self","locations/default","locations/discover","notifications/events","operations/logs","queries/generate","queries/replace-preview","runs/latest","snapshots/diff"]),dG=/^\{[a-z]+\}$/i;function ZA(e){if(e.length>QA||e.includes("://")||!lG.test(e))return!1;const n=e.split("/").slice(3);return n.every((i,o)=>{const u=n[o-1];return u===void 0||!cG.has(u)?!0:dG.test(i)||uG.has(`${u}/${i}`)})}const xd=d({eventId:r().uuid(),uiSessionId:r().uuid(),page:Y$});Be("event",[xd.extend({event:R("ui.page_viewed"),tab:Ef.optional()}).strict(),xd.extend({event:R("ui.action"),action:J$,tab:Ef.optional(),integration:eG.optional(),format:j(aG).optional(),filter:nG.optional()}).strict(),xd.extend({event:R("ui.error"),kind:j(iG),tab:Ef.optional(),component:r().regex(HA).optional(),errorName:r().regex(FA).optional(),route:r().max(QA).refine(ZA,"route must be a route template").optional(),method:j(["GET","POST","PUT","PATCH","DELETE"]).optional(),statusClass:j(sG).optional(),status:m().int().min(400).max(599).optional()}).strict(),xd.extend({event:R("ui.vitals"),metric:j(oG),rating:j(rG)}).strict()]);function mG(e){if(!e)return"other";if(e==="*"||e==="$"||e.endsWith("/*")||e.endsWith("/$"))return"not-found";const n=e.replace(/\$([a-z]\w*)/gi,":$1").replace(/(.)\/+$/,"$1");return GA.includes(n)?n:"other"}function YA(e){if(e==="/projects/:projectName")return"overview";const n=/^\/projects\/:projectName\/([a-z-]+)/.exec(e);if(!n)return;const i=n[1];return KA.includes(i)?i:"other"}const pG=["struggle","bug","improvement","other"],hG=j(pG),cc={summary:500,details:4e3,area:40,command:120,errorCode:40};d({kind:hG,summary:r().trim().min(1).max(cc.summary),details:r().trim().min(1).max(cc.details).optional(),area:r().trim().min(1).max(cc.area).optional(),command:r().trim().min(1).max(cc.command).optional(),errorCode:r().trim().min(1).max(cc.errorCode).optional()}).strict();d({accepted:E(),id:r()});const fG=4;function gG(e){return e.length<fG}const XA=j(["trace","debug","info","warn","error","fatal"]),JA=d({runId:r().min(1).max(256).optional(),projectId:r().min(1).max(256).optional(),requestId:r().min(1).max(256).optional(),actor:r().min(1).max(512).optional(),credentialId:r().min(1).max(512).optional(),userAgent:r().min(1).max(512).optional(),actorSession:r().min(1).max(512).optional(),method:r().min(1).max(16).optional(),route:r().min(1).max(256).optional(),operationId:r().min(1).max(256).optional(),jobId:r().min(1).max(256).optional(),taskId:r().min(1).max(256).optional(),traceId:r().min(1).max(256).optional(),provider:r().min(1).max(256).optional(),errorCode:r().min(1).max(128).optional(),attempt:m().finite().optional(),count:m().finite().optional(),total:m().finite().optional(),progress:m().finite().optional(),httpStatus:m().finite().optional(),statusCode:m().finite().optional(),durationMs:m().finite().optional(),bytes:m().finite().optional(),retryAfterMs:m().finite().optional(),retriable:E().optional(),retrying:E().optional(),cancelled:E().optional(),success:E().optional()}).strict(),WA=d({cursor:r().min(1).max(512),ts:r().datetime(),level:XA,module:r().min(1).max(256),action:r().min(1).max(256),message:r().max(4096).optional(),runId:r().min(1).max(256).optional(),projectId:r().min(1).max(256).optional(),context:JA}).strict();d({level:XA.optional(),module:r().trim().min(1).max(256).optional(),runId:r().trim().min(1).max(256).optional(),projectId:r().trim().min(1).max(256).optional(),actor:r().trim().min(1).max(512).optional(),requestId:r().trim().min(1).max(256).optional(),since:r().datetime().optional(),until:r().datetime().optional(),limit:Bi().int().min(1).max(200).default(100),cursor:r().trim().min(1).max(512).optional()}).strict().superRefine((e,n)=>{e.since&&e.until&&Date.parse(e.since)>Date.parse(e.until)&&n.addIssue({code:ye.custom,path:["until"],message:'"until" must be on or after "since".'})});const eN=d({maxEntries:m().int().positive(),maxAgeSeconds:m().int().positive()}).strict(),yG=d({entries:y(WA),nextCursor:r().min(1).max(512).nullable(),truncated:m().int().nonnegative(),dropped:m().int().nonnegative(),retention:j(["process","durable"]),retentionPolicy:eN.optional(),captureErrors:m().int().nonnegative().optional(),observedAt:r().datetime()}).strict(),bG=d(JA.shape),vG=d({...WA.shape,context:bG});d({...yG.shape,entries:y(vG),retentionPolicy:d(eN.shape).optional()});function Rf(e){return e!==""&&/^[\w./:@%+=,-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`}d({startDate:kn,endDate:kn,sourceId:r().trim().min(1).optional(),burstThreshold:m().int().min(1).max(1e6).optional(),ratioThreshold:m().min(1).max(1e3).optional(),limit:m().int().min(1).max(500).optional()}).strict();const uo=d({total:m().int().nonnegative(),paid:m().int().nonnegative(),organic:m().int().nonnegative(),unknown:m().int().nonnegative()});d({scope:d({project:r(),sourceId:r().nullable(),attribution:R("project-source-only"),unavailableDimensions:y(j(["property","target","market"]))}),window:d({startDate:kn,endDate:kn,timeZone:R("UTC")}),rule:d({version:R("hourly-normalized-path-v1"),burstThreshold:m().int().positive(),ratioThreshold:m().positive(),calibration:j(["uncalibrated-default","request-override"]),grouping:y(r()),confirmsAutomation:R(!1)}),totals:d({raw:uo,redirects:uo,subresources:uo,countable:uo,suspected:uo,adjustedEstimate:uo}),bursts:y(d({sourceId:r(),product:r(),landingPathNormalized:r(),tsHour:r(),counts:uo})),evidence:d({total:m().int().nonnegative(),returned:m().int().nonnegative(),truncated:E()}),comparison:d({status:R("unavailable"),serverCountable:m().int().nonnegative(),serverObservation:j(["missing","observed-zero","observed-positive"]),gaSessions:m().int().nonnegative().nullable(),gaObservation:j(["missing","observed-zero","observed-positive"]),observedRatio:m().nonnegative().nullable(),observedRatioAboveThreshold:E().nullable(),ratio:ue(),reasons:y(r()),gaScope:R("project")}),caveats:y(r())});const xG=new Set(["optional","nullable","default","prefault","readonly","catch","nonoptional"]),Jw=64;function Rd(e){return e._zod.def}function mo(e,n){return e.clone({...Rd(e),...n})}function Ww(e){if(e.length!==0){if(e.every(n=>typeof n=="string"))return r();if(e.every(n=>typeof n=="number"))return m();if(e.every(n=>typeof n=="boolean"))return E()}}function tN(e,n,i,o){if(o>Jw)throw new Error(`tolerantReadSchema: schema nesting exceeds ${Jw} levels`);const u=i.get(e);if(u)return u;const h=v=>tN(v,n,i,o+1),f=Rd(e);let b=e;if(f.type==="object"){const v=Object.fromEntries(Object.entries(e.shape).map(([S,C])=>[S,h(C)])),x=f.catchall,k=n.get(e)??(x&&Rd(x).type!=="never"?h(x):void 0);b=k?d(v).catchall(k):d(v)}else if(xG.has(f.type)){const v=f.innerType,x=h(v);b=x===v?e:mo(e,{innerType:x})}else if(f.type==="array"){const v=f.element,x=h(v);b=x===v?e:mo(e,{element:x})}else if(f.type==="pipe"){const v=f.in,x=f.out,k=h(v),S=h(x);b=k===v&&S===x?e:mo(e,{in:k,out:S})}else if(f.type==="union"){const v=f.options,x=v.map(h);b=x.some((S,C)=>S!==v[C])?f.discriminator?Qe(x):mo(e,{options:x}):e}else if(f.type==="record"){const v=f.keyType,x=f.valueType,k=Rd(v).type==="enum"?r():v,S=h(x);b=k===v&&S===x?e:mo(e,{keyType:k,valueType:S})}else if(f.type==="intersection"){const v=f.left,x=f.right,k=h(v),S=h(x);b=k===v&&S===x?e:mo(e,{left:k,right:S})}else if(f.type==="tuple"){const v=f.items,x=f.rest,k=v.map(h),S=x&&h(x);b=S!==x||k.some((_,z)=>_!==v[z])?mo(e,{items:k,rest:S}):e}else if(f.type==="lazy"){const v=f.getter;b=Sz(()=>h(v()))}else f.type==="enum"?b=Ww(Object.values(f.entries))??e:f.type==="literal"&&(b=Ww(f.values)??e);return i.set(e,b),b}function zo(e,n={}){const i=new Map(n.openKeys??[]);return tN(e,i,new Map,0)}const Io={openKeys:[[Xg,m().int().nonnegative()]]};zo(kU,Io);zo(p0,Io);zo(EU,Io);zo(RU,Io);zo(SU,Io);zo(Z3,Io);zo(CU,Io);Qe([R(7),R(14),R(30),R(90)]).describe("Traffic activity window in days (7, 14, 30, or 90). Defaults to 30 when omitted.");const po=d({current:m(),prior:m(),deltaPct:ot().nullable()}),wG=d({windowStart:r(),windowEnd:r(),coverageStart:r().nullable(),priorWindowComplete:E(),hasData:E().describe("True when the selected or prior window has stored crawler, user-fetch, countable referral or operator evidence, or the selected window has referral redirects. False means no qualifying stored evidence; it can occur with no, paused, errored or never-synced ingestion and out-of-window observations. It does not establish measured zero traffic or source health."),verifiedCrawlerHits:po,unverifiedCrawlerHits:po,aiUserFetchHits:po,referralArrivals:po,referralRedirects:m().int().nonnegative(),referralArrivalsByClass:d({paid:po,organic:po,unclassified:po}),referralArrivalsClassSummary:r(),byOperator:y(d({operator:r(),verifiedHits:m(),unverifiedHits:m(),userFetchHits:m(),referralArrivals:m(),deltaPct:ot().nullable()})),topCrawledPaths:y(d({path:r(),verifiedHits:m(),unverifiedHits:m().default(0),distinctOperators:m()})),referralProducts:y(d({product:r(),arrivals:m(),distinctLandingPaths:m()})),dailyTrend:y(d({date:r(),verifiedCrawlerHits:m(),unverifiedCrawlerHits:m().default(0),userFetchHits:m(),referralArrivals:m()})),topReferralLandingPaths:y(d({path:r(),arrivals:m(),distinctProducts:m()}))});d({activity:wG.nullable()});const dte={ambiguous:"Property identity unverified"},mte="No answer could be tied to one property";function kG(e){return e.denominator===null||e.denominator===void 0||e.unattributed===void 0||e.unattributed<=0?null:`${e.unattributed} of ${e.denominator+e.unattributed} answers could not be tied to one property`}function SG(e){if(e.denominator===null||e.denominator===void 0||e.unchecked===void 0||e.unchecked<=0)return null;const n=e.denominator+e.unchecked;return`${e.unchecked} of ${n} ${n===1?"answer":"answers"} had sources that could not be checked`}const jG="canonry.onboarding-session.v1",Wd="canonry.onboarding-launched-run.v1",u1="canonry.onboarding-handoff.v1",AG=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,NG=["system","project","queries","competitors","run"];function CG(e){return NG[e]??"system"}function _G(e){if(!e.apiReady)return"api_unavailable";if(e.databaseConfigured===!1)return"database_unavailable";if(!e.workerReady)return"worker_unavailable";if(!e.providerReady)return"no_provider"}function TG(e){return e.apiStatus.state!=="checking"&&e.workerStatus.state!=="checking"}const EG={NO_PROVIDER:"no_provider",NO_QUERIES:"no_queries",RATE_LIMITED:"rate_limited",QUOTA_EXCEEDED:"rate_limited",PROVIDER_AUTH:"provider_auth",PROVIDERS_FAILING:"provider_auth",AUTH_INVALID:"provider_auth",FORBIDDEN:"provider_auth",NETWORK:"network",CONNECTION_ERROR:"network",RUN_IN_PROGRESS:"run_rejected",RUN_CANCELLED:"run_cancelled"};function xc(e,n){const i=e&&typeof e=="object"&&"code"in e?String(e.code):"";return EG[i]??n}function d1(){return nN(jG)}function nN(e){try{const n=typeof window<"u"?window.sessionStorage.getItem(e):null;if(n&&AG.test(n))return n;const i=tm();return typeof window<"u"&&window.sessionStorage.setItem(e,i),i}catch{return tm()}}function m1(){return tm()}function aN(e){if(!e||typeof e!="object")return!1;const n=e;return typeof n.projectName=="string"&&n.projectName.length>0&&typeof n.runId=="string"&&n.runId.length>0&&typeof n.handled=="boolean"}function iN(e,n){try{typeof window<"u"&&window.sessionStorage.setItem(Wd,JSON.stringify({projectName:e,runId:n,handled:!1}))}catch{}}function sN(e){if(!e)return null;try{if(typeof window>"u")return null;const n=window.sessionStorage.getItem(Wd);if(!n)return null;const i=JSON.parse(n);return!aN(i)||i.projectName!==e||i.handled?null:i}catch{return null}}function em(e){try{if(typeof window>"u")return;const n=window.sessionStorage.getItem(Wd);if(!n)return;const i=JSON.parse(n);if(!aN(i)||i.runId!==e)return;window.sessionStorage.setItem(Wd,JSON.stringify({...i,handled:!0}))}catch{}}function RG(e){try{typeof window<"u"&&window.sessionStorage.setItem(u1,e)}catch{}}function DG(e){if(!e)return!1;try{return typeof window<"u"&&window.sessionStorage.getItem(u1)===e}catch{return!1}}function zG(){try{typeof window<"u"&&window.sessionStorage.removeItem(u1)}catch{}}function tm(){const e=globalThis.crypto;if(e.randomUUID)return e.randomUUID();const n=new Uint8Array(16);if(e.getRandomValues)e.getRandomValues(n);else for(let o=0;o<n.length;o+=1)n[o]=Math.floor(Math.random()*256);n[6]=n[6]&15|64,n[8]=n[8]&63|128;const i=[...n].map(o=>o.toString(16).padStart(2,"0")).join("");return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20)}`}const IG="canonry.ui-session.v1",OG="canonry.ui-pages.v1",PG="canonry.ui-errors.v1",ek="canonry.ui-sent.v1",qG=30,MG=120,BG=200,Yt={sender:null,disabled:!1,page:"other",landingPage:null,pendingVitals:[],memory:new Map,sentAt:null,now:()=>Date.now()};function LG(e){Yt.sender=e.enabled===!1?null:e.send,Yt.disabled=!1,e.now&&(Yt.now=e.now)}function UG(e){const n=mG(e);if(Yt.page=n,Yt.landingPage===null){Yt.landingPage=n;const o=Yt.pendingVitals;Yt.pendingVitals=[];for(const[u,h]of o)oN(u,h)}const i=YA(n);rN(OG,`${n}|${i??""}`,{event:"ui.page_viewed"})}function Wr(e,n={}){p1({event:"ui.action",action:e,...n})}const VG=800,$G=1e3,Df=new Map;let uc,zf="";function GG(e){if(!Yt.sender)return;const n=Df.get(e);n&&clearTimeout(n),Df.set(e,setTimeout(()=>{Df.delete(e),Wr("filter.change",{filter:e})},VG))}function pte(e,n=!1){if(!Yt.sender)return;uc&&clearTimeout(uc),uc=void 0;const i=e.trim();if(i.length===0){zf="";return}const o=()=>{uc=void 0,i!==zf&&(zf=i,Wr("search.submit"))};n?o():uc=setTimeout(o,$G)}const KG={measurementProvider:"provider",measurementModel:"model",measurementLocation:"location",measurementFrom:"window",measurementTo:"window",runWindow:"window",queryClass:"query_class",class:"query_class",measurementScope:"other",measurementScopeKey:"other",measurementMarketKey:"other",scope:"other",runStatus:"other",runKind:"other",runProject:"other"};function HG(e,n){const i=new Set;for(const[o,u]of Object.entries(KG))FG(e[o],n[o])||i.add(u);for(const o of i)GG(o)}function FG(e,n){const i=o=>o==null||o===""?"":JSON.stringify(o);return i(e)===i(n)}function nm(e){const n=sK(e.error),i=e.route&&ZA(e.route)?e.route:void 0;if(e.kind==="api"&&!i)return;const o=cN(e.method),u=typeof e.status=="number"&&e.status>=400&&e.status<=599?e.status:void 0,h=e.network?"network":u===void 0?void 0:u>=500?"5xx":"4xx",f=e.component&&HA.test(e.component)?e.component:void 0,b=[e.kind,Yt.page,f,n,o,i,u??h].join("|");rN(PG,b,{event:"ui.error",kind:e.kind,...f?{component:f}:{},...n?{errorName:n}:{},...i?{route:i}:{},...o?{method:o}:{},...h?{statusClass:h}:{},...u?{status:u}:{}})}function QG(e,n){if(Yt.landingPage===null){Yt.pendingVitals.push([e,n]);return}oN(e,n)}function oN(e,n){const i=Yt.landingPage??"other";p1({event:"ui.vitals",metric:e,rating:n},i)}const ZG=[["POST","/api/v1/projects/{name}/runs","sweep.launch"],["POST","/api/v1/runs/{id}/cancel","sweep.cancel"],["POST","/api/v1/projects/{name}/technical-aeo/runs","site_audit.launch"],["POST","/api/v1/projects","project.create"],["PUT","/api/v1/projects/{name}","project.create",void 0,201],["PUT","/api/v1/projects/{name}","project.update",void 0,200],["DELETE","/api/v1/projects/{name}","project.delete"],["POST","/api/v1/projects/{name}/queries","query.add"],["PUT","/api/v1/projects/{name}/queries","query.add"],["DELETE","/api/v1/projects/{name}/queries","query.delete"],["DELETE","/api/v1/projects/{name}/queries/{id}","query.delete"],["POST","/api/v1/projects/{name}/queries/generate","query.generate"],["PUT","/api/v1/projects/{name}/competitors","competitor.save"],["POST","/api/v1/projects/{name}/competitors","competitor.save"],["DELETE","/api/v1/projects/{name}/competitors/{id}","competitor.delete"],["PUT","/api/v1/projects/{name}/schedule","schedule.save"],["DELETE","/api/v1/projects/{name}/schedule","schedule.delete"],["PUT","/api/v1/settings/providers/{name}","provider.save"],["PUT","/api/v1/settings/google","settings.save"],["PUT","/api/v1/settings/bing","settings.save"],["PUT","/api/v1/settings/cdp","settings.save"],["PUT","/api/v1/projects/{name}/sentiment/settings","settings.save"],["POST","/api/v1/projects/{name}/google/connect","integration.connect_started","google"],["POST","/api/v1/projects/{name}/ga/connect","integration.connect","ga"],["DELETE","/api/v1/projects/{name}/ga/disconnect","integration.disconnect","ga"],["POST","/api/v1/projects/{name}/bing/connect","integration.connect","bing"],["DELETE","/api/v1/projects/{name}/bing/disconnect","integration.disconnect","bing"],["PUT","/api/v1/projects/{name}/gbp/locations/{locationName}/selection","integration.connect","gbp"],["DELETE","/api/v1/projects/{name}/gbp/connection","integration.disconnect","gbp"],["POST","/api/v1/projects/{name}/wordpress/connect","integration.connect","wordpress"],["DELETE","/api/v1/projects/{name}/wordpress/disconnect","integration.disconnect","wordpress"],["POST","/api/v1/projects/{name}/ads/connect","integration.connect","openai_ads"],["DELETE","/api/v1/projects/{name}/ads/connection","integration.disconnect","openai_ads"],["POST","/api/v1/projects/{name}/google-ads/oauth/connect","integration.connect_started","google_ads"],["PUT","/api/v1/projects/{name}/google-ads/selection","integration.connect","google_ads"],["DELETE","/api/v1/projects/{name}/google-ads/connection","integration.disconnect","google_ads"],["POST","/api/v1/projects/{name}/gtm/oauth/connect","integration.connect_started","gtm"],["PUT","/api/v1/projects/{name}/gtm/selection","integration.connect","gtm"],["DELETE","/api/v1/projects/{name}/gtm/connection","integration.disconnect","gtm"],["POST","/api/v1/projects/{name}/traffic/connect/cloudflare","integration.connect","traffic_cloudflare"],["POST","/api/v1/projects/{name}/traffic/connect/vercel","integration.connect","traffic_vercel"],["POST","/api/v1/projects/{name}/traffic/connect/cloud-run","integration.connect","traffic_cloud_run"],["POST","/api/v1/projects/{name}/traffic/connect/wordpress","integration.connect","traffic_wordpress"],["POST","/api/v1/projects/{name}/traffic/sources/{id}/sync","traffic.sync"],["POST","/api/v1/projects/{name}/notifications","notification.save"],["POST","/api/v1/projects/{name}/notifications/{id}/test","notification.test"],["POST","/api/v1/projects/{name}/measurement-plan/draft/actions/publish","measurement_plan.publish"],["POST","/api/v1/projects/{name}/discover/run","discovery.run"],["POST","/api/v1/keys","api_key.create"],["POST","/api/v1/keys/{id}/revoke","api_key.revoke"]],tk="/api/v1/projects/{name}/google/connections/{type}",YG={gsc:"gsc",ga4:"ga",gbp:"gbp"};function XG(e,n,i){const o=e==="PUT"&&n===`${tk}/property`?"integration.connect":e==="DELETE"&&n===tk?"integration.disconnect":void 0;if(!o)return;const u=i?/\/google\/connections\/([^/?#]+)/.exec(i)?.[1]:void 0,h=u&&YG[decodeURIComponent(u)]||"google";return[e,n,o,h]}const JG=[["GET",/^\/api\/v1\/projects\/\{name\}\/schedule$/,[404]],["*",/^\/api\/v1\/projects\/\{name\}\/measurement-plan(?:\/draft(?:\/.*)?)?$/,[404,409,412]],["GET",/^\/api\/v1\/projects\/\{name\}\/technical-aeo\/runs\/\{runId\}\/progress$/,[404]],["GET",/^\/api\/v1\/projects\/\{name\}\/backlinks\/domains$/,[404]],["POST",/^\/api\/v1\/projects$/,[409]],["PUT",/^\/api\/v1\/projects\/\{name\}$/,[409]]];function WG(e,n,i){return JG.some(([o,u,h])=>(o==="*"||o===e)&&u.test(n)&&h.includes(i))}const eK=/^\/api\/v1\/(?:telemetry|feedback)(?:\/|$)/;function am(e){if(!e.route||eK.test(e.route))return;const n=cN(e.method);if(e.network||typeof e.status=="number"&&e.status>=400){if(e.status===401||typeof e.status=="number"&&e.status<500&&WG(n,e.route,e.status))return;nm({kind:"api",route:e.route,method:n,status:e.status,network:e.network});return}if(!n||n==="GET")return;const i=XG(n,e.route,e.path)??ZG.find(([o,u,,,h])=>o===n&&u===e.route&&(h===void 0||h===e.status));i&&Wr(i[2],i[3]?{integration:i[3]}:{})}function rN(e,n,i){const o=nK(e);if(!o.has(n)&&p1(i)){o.add(n);try{window.sessionStorage.setItem(e,JSON.stringify([...o].slice(-BG)))}catch{}}}function p1(e,n){try{const i=Yt.sender;if(!i||Yt.disabled||!tK())return!1;const o=n??Yt.page,u=YA(o),h={...e,eventId:tm(),uiSessionId:nN(IG),page:o,...u?{tab:u}:{}};return i(h).then(f=>{f&&f.accepted===!1&&(Yt.disabled=!0)},()=>{}),!0}catch{return!1}}function tK(){const e=Yt.now(),n=(Yt.sentAt??=iK(ek)).filter(i=>e-i<36e5&&i<=e);if(Yt.sentAt=n,n.length>=MG||n.filter(i=>e-i<6e4).length>=qG)return!1;n.push(e);try{window.sessionStorage.setItem(ek,JSON.stringify(n))}catch{}return!0}function nK(e){let n=Yt.memory.get(e);return n||(n=new Set(aK(e)),Yt.memory.set(e,n)),n}function lN(e){try{const n=window.sessionStorage.getItem(e),i=n?JSON.parse(n):[];return Array.isArray(i)?i:[]}catch{return[]}}function aK(e){return lN(e).filter(n=>typeof n=="string")}function iK(e){return lN(e).filter(n=>typeof n=="number"&&Number.isFinite(n))}function sK(e){const n=e instanceof Error?e.name:e&&typeof e=="object"&&"name"in e?String(e.name):void 0;return n&&FA.test(n)?n:void 0}function cN(e){const n=e?.toUpperCase();return n==="GET"||n==="POST"||n==="PUT"||n==="PATCH"||n==="DELETE"?n:void 0}class Tn extends Error{code;statusCode;details;constructor(n,i,o,u){super(n),this.name="ApiError",this.code=o??"UNKNOWN",this.statusCode=i,this.details=u}}function hte(e){if(e instanceof Tn)return e.details;if(typeof e!="object"||e===null)return;const n=e.error,i=typeof n=="object"&&n!==null?n.details:e.details;return typeof i=="object"&&i!==null&&!Array.isArray(i)?i:void 0}function wo(){if(typeof window>"u")return!1;const e=window.__CANONRY_CONFIG__?.demo;return e?.enabled===!0&&e.readOnly===!0&&e.sampleData===!0}function oK(){if(typeof window>"u")return"legacy";const e=window.__CANONRY_CONFIG__?.dashboard?.onboardingMode??window.__CANONRY_CONFIG__?.onboardingMode;return e==="platform"||e==="auto"||e==="legacy"?e:"auto"}function rK(){if(typeof window>"u")return;const e=window.__CANONRY_CONFIG__?.embed?.renderToken;return typeof e=="string"&&e.length>0?e:void 0}function uN(e){const n=rK();if(!n)return e;let i;const o=typeof window<"u"&&window.location?window.location.href:"http://localhost/";try{i=new URL(e,o)}catch{return e}const u=new URL(o).origin;if(i.origin!==u)return e;const f=`${Mm().replace(/\/$/,"")}/api/v1`;return i.pathname!==f&&!i.pathname.startsWith(`${f}/`)?e:(i.searchParams.set("token",n),/^[a-z][a-z\d+.-]*:/i.test(e)?i.toString():`${i.pathname}${i.search}${i.hash}`)}function lK(e,n){const i={method:e.method,headers:e.headers,cache:e.cache,credentials:e.credentials,integrity:e.integrity,keepalive:e.keepalive,mode:e.mode,redirect:e.redirect,referrer:e.referrer,referrerPolicy:e.referrerPolicy,signal:e.signal};return e.body&&(i.body=e.body,i.duplex="half"),new Request(n,i)}function dN(){if(typeof window>"u")return null;const e=window.__CANONRY_CONFIG__?.embed;return e?.enabled?e:null}function cK(){return typeof window>"u"?!0:window.__CANONRY_CONFIG__?.dashboard?.showResourceLinks!==!1}function uK(){return typeof window>"u"?!0:window.__CANONRY_CONFIG__?.dashboard?.showAgentBar!==!1}function dK(){return typeof window>"u"?!1:window.__CANONRY_CONFIG__?.agent?.allowViewers===!0}function h1(){return wo()}function mK(){return typeof window>"u"?!0:window.__CANONRY_CONFIG__?.dashboard?.showUpdateNotification!==!1}function go(){return pK(ze["answer-visibility"])}function pK(e){if(typeof window>"u")return!1;const n=window.__CANONRY_CONFIG__?.dashboard;return n?.managedRunKinds!==void 0?n.managedRunKinds.includes(e):e===ze["answer-visibility"]&&n?.managedSweeps===!0}function hK(){if(typeof window>"u")return null;const e=window.__CANONRY_CONFIG__?.research;if(e?.allowViewers!==!0)return null;const n=e.viewerDailyRunLimit;return{allowViewers:!0,viewerDailyRunLimit:Number.isInteger(n)&&(n??0)>0?n:BV}}function nk(){return hK()?"Analyst":"View only"}function f1(){return dN()!==null}function fK(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const mN=fK();function gK(){const e=typeof window<"u"&&window.location?window.location.origin:"";return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?e+window.__CANONRY_CONFIG__.basePath.replace(/\/$/,""):e}function Mm(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,""):""}function yK(e){const n=e.trim().toLowerCase().replace(/^\[|\]$/g,"");return n==="localhost"||n==="::1"?!0:/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(n)}function bK(e,n){if(e.protocol!=="http:"&&e.protocol!=="https:"||!yK(e.hostname))return;const i=e.port?`:${e.port}`:"",o=n?n.replace(/\/$/,""):"";return`${e.protocol}//localhost${i}${o}`}function fte(e){return`${e.replace(/\/$/,"")}/api/v1/google/callback`}function gte(e){return`${e.replace(/\/$/,"")}/api/v1/google-marketing/callback`}function vK(){if(!(typeof window>"u"))return bK(window.location,Mm())}function xK(e){return`${Mm()}${e}`}function wK(e,n){if(n===404)return"Health endpoint returned 404. Check basePath or reverse-proxy configuration and make sure the dashboard reaches /health instead of an API-prefixed route."}function kK(){return""}function SK(){return!!kK()}let pN=null;function ak(e){pN=e}function g1(){pN?.()}const ee=M8({baseUrl:gK()});ee.interceptors.response.use((e,n)=>(e.status===401&&!n.url.includes("/api/v1/session")&&g1(),e));ee.interceptors.request.use(e=>{const n=uN(e.url);return n===e.url?e:lK(e,n)});async function fe(e){const n=await e();if(n.error!==void 0&&n.error!==null){const i=n.response.status;let o=`API ${i}: ${n.response.statusText}`,u,h;if(typeof n.error=="object"&&n.error!==null){const f=n.error.error;if(typeof f=="string")o=f;else if(f&&typeof f=="object"){const b=f;b.message&&(o=b.message),b.code&&(u=b.code),b.details&&(h=b.details)}else{const b=n.error;b.message&&(o=b.message),b.code&&(u=b.code),b.details&&(h=b.details)}}else typeof n.error=="string"&&(o=n.error);throw new Tn(o,i,u,h)}if(n.response.status!==204)return n.data}async function Ms(e,n){const i=n?.body!=null,o=await fetch(uN(`${mN}${e}`),{...n,credentials:n?.credentials??"same-origin",headers:{...i?{"Content-Type":"application/json"}:{},...n?.headers}});if(!o.ok){const u=await o.text();let h=`API ${o.status}: ${o.statusText}`,f,b;if(u)try{const v=JSON.parse(u);typeof v.error=="string"?h=v.error:v.error?.message?(h=v.error.message,f=v.error.code,b=v.error.details):v.message&&(h=v.message)}catch{h=u}throw o.status===401&&!e.startsWith("/session")&&!e.startsWith("/auth/")&&g1(),new Tn(h,o.status,f,b)}if(o.status!==204)return o.json()}function jK(e){return fe(()=>NS({client:ee,path:{name:e}}))}function yte(e){return fe(()=>TS({client:ee,path:{name:e}}))}function g0(e){return fe(()=>ES({client:ee,path:{id:e}}))}function hN(e){return fe(()=>_S({client:ee,path:{name:e}}))}function AK(e,n,i){return fe(()=>f_({client:ee,path:{name:e},query:{location:n,limit:i}}))}function fN(e,n){return fe(()=>ZT({client:ee,path:{name:e},query:{location:n?.location,since:n?.since}}))}function gN(e,n){return fe(()=>C6({client:ee,path:{name:e},body:n}))}function NK(e){return fe(()=>A6({client:ee,body:e}))}function CK(e,n){return fe(()=>a_({client:ee,path:{name:e},body:{queries:n}}))}function _K(e,n){return fe(()=>n_({client:ee,path:{name:e},body:{queries:n}}))}function bte(e,n){return fe(()=>t_({client:ee,path:{name:e},body:{queries:n}}))}function TK(e,n){return fe(()=>o_({client:ee,path:{name:e},body:{competitors:n}}))}function vte(e,n){return fe(()=>s_({client:ee,path:{name:e},body:{competitors:n}}))}function xte(e,n){return fe(()=>r_({client:ee,path:{name:e,id:n}}))}async function wte(e,n){const i=await jK(e);return gN(e,{displayName:n.displayName??i.displayName??i.name,canonicalDomain:n.canonicalDomain??i.canonicalDomain,ownedDomains:n.ownedDomains??i.ownedDomains,aliases:n.aliases??i.aliases,country:n.country??i.country,language:n.language??i.language,tags:i.tags,labels:i.labels,providers:n.providers??i.providers,providerModels:n.providerModels??i.providerModels??{},locations:n.locations??i.locations,defaultLocation:n.defaultLocation!==void 0?n.defaultLocation:i.defaultLocation,autoExtractBacklinks:i.autoExtractBacklinks,...n.siteAuditMaxPages!==void 0?{siteAuditMaxPages:n.siteAuditMaxPages}:{}})}function EK(e,n){const i={};return n?.location&&(i.location=n.location),n?.allLocations&&(i.allLocations=!0),n?.noLocation&&(i.noLocation=!0),fe(()=>c_({client:ee,path:{name:e},body:i}))}function kte(e,n){return fe(()=>J6({client:ee,path:{name:e},body:n}))}async function Ste(e,n){await fe(()=>W6({client:ee,path:{name:e,label:n}}))}function jte(e,n){return fe(()=>e_({client:ee,path:{name:e},body:{label:n}}))}async function Ate(e){await fe(()=>N6({client:ee,path:{name:e}}))}function Nte(){return fe(()=>RS({client:ee}))}function ik(){return Ms("/session")}function RK(e){return Ms("/session/setup",{method:"POST",body:JSON.stringify({password:e})})}function DK(e){return Ms("/session",{method:"POST",body:JSON.stringify({password:e})})}function zK(e){return Ms("/session",{method:"POST",body:JSON.stringify({apiKey:e})})}function IK(){return Ms("/session",{method:"DELETE"})}function If(){return fe(()=>x_({client:ee}))}function sk(){return Ms("/auth/session")}function OK(e,n){return Ms("/auth/login",{method:"POST",body:JSON.stringify({name:e,password:n})})}function ok(){return Ms("/auth/logout",{method:"POST"})}function yN(e,n){return fe(()=>b_({client:ee,path:{name:e},body:n}))}async function y1(e){for(let n=0;n<2;n+=1)try{await fe(()=>z_({client:ee,body:e}));return}catch(i){if(!(!(i instanceof Tn)||i.statusCode>=500)||n===1)return}}function Cte(e){return fe(()=>v_({client:ee,body:e}))}function _te(e,n){return fe(()=>A_({client:ee,path:{name:e},body:n}))}async function Tte(e,n){await fe(()=>S_({client:ee,path:{name:e},query:n===void 0?void 0:{expectedUpdatedAt:n}}))}function Ete(e){return fe(()=>C_({client:ee,path:{name:e}}))}function Rte(e,n){return fe(()=>__({client:ee,path:{name:e},body:n}))}async function Dte(e,n){await fe(()=>T_({client:ee,path:{name:e,id:n}}))}function zte(e,n){return fe(()=>E_({client:ee,path:{name:e,id:n}}))}function PK(e,n,i){return fe(()=>i_({client:ee,path:{name:e},body:{provider:n,count:i}}))}function qK(e){return fe(()=>m_({client:ee,body:e}))}function MK(e){return fe(()=>d_({client:ee,body:e??{}}))}function Ite(e,n){const i=vK();return fe(()=>aT({client:ee,path:{name:e},body:{type:n,...i?{publicUrl:i}:{}}}))}function Ote(e,n){return fe(()=>iT({client:ee,path:{name:e,type:n}}))}function Pte(e,n,i){return fe(()=>oT({client:ee,path:{name:e,type:n},body:{propertyId:i}}))}function qte(e,n,i){return fe(()=>rT({client:ee,path:{name:e,type:n},body:{sitemapUrl:i}}))}function BK(e,n){return fe(()=>lT({client:ee,path:{name:e},body:n??{}}))}function Mte(e,n){const i={};return n&&n!=="all"&&(i.window=n),fe(()=>g_({client:ee,path:{name:e},query:i}))}function Bte(e,n){return fe(()=>dT({client:ee,path:{name:e},body:{url:n}}))}function LK(e,n){return fe(()=>yT({client:ee,path:{name:e},body:n??{}}))}function Lte(e,n){return fe(()=>gT({client:ee,path:{name:e},query:n?{sitemapIndex:n}:void 0}))}function Ute(e,n){return fe(()=>S6({client:ee,path:{name:e},body:{sitemapUrls:n}}))}function UK(e,n){return fe(()=>E8({client:ee,path:{name:e},body:n??{}}))}function Vte(e,n){return fe(()=>y8({client:ee,path:{name:e},body:n??{}}))}function $te(){return fe(()=>DS({client:ee}))}function Gte(e,n){return fe(()=>k_({client:ee,body:{host:e,port:n}}))}function Kte(e,n){return fe(()=>bT({client:ee,path:{name:e},body:n}))}function Hte(e,n){return fe(()=>CT({client:ee,path:{name:e},body:{apiKey:n}}))}function Fte(e){return fe(()=>_T({client:ee,path:{name:e}}))}function Qte(e,n){return fe(()=>RT({client:ee,path:{name:e},body:{siteUrl:n}}))}function Zte(e,n){return fe(()=>IT({client:ee,path:{name:e},body:{url:n}}))}function Yte(e,n){return fe(()=>OT({client:ee,path:{name:e},body:{}}))}function Xte(e,n){return fe(()=>PT({client:ee,path:{name:e},body:n}))}function Jte(e){return fe(()=>w_({client:ee,body:{apiKey:e}}))}function VK(e){return e?/filename\s*=\s*"?([^";]+)"?/i.exec(e)?.[1]??null:null}async function Wte(e,n){const i=await fetch(`${mN}/projects/${encodeURIComponent(e)}/results/export?format=${n}`,{credentials:"same-origin",headers:{}});if(!i.ok)throw am({method:"GET",route:"/api/v1/projects/{name}/results/export",status:i.status}),new Tn(`Failed to download results: ${i.status}`,i.status);Wr("export.download",{format:n});const o=await i.blob(),u=URL.createObjectURL(o),h=VK(i.headers.get("Content-Disposition"))??`canonry-results-${e}.${n}`,f=document.createElement("a");f.href=u,f.download=h,document.body.appendChild(f),f.click(),document.body.removeChild(f),URL.revokeObjectURL(u)}function ene(e,n){return fe(()=>UT({client:ee,path:{name:e},body:{}}))}function tne(e,n){return fe(()=>MT({client:ee,path:{name:e},body:n}))}function nne(e){return fe(()=>BT({client:ee,path:{name:e}}))}function ane(e,n){return fe(()=>l8({client:ee,path:{name:e},body:n}))}function ine(e,n){return fe(()=>c8({client:ee,path:{name:e},body:n}))}function sne(e,n){return fe(()=>u8({client:ee,path:{name:e},body:n}))}function one(e,n,i){return fe(()=>d8({client:ee,path:{name:e,id:n},body:i??{}}))}function rne(e,n,i){return fe(()=>m8({client:ee,path:{name:e,id:n},body:{}}))}function lne(e,n){return fe(()=>HT({client:ee,path:{name:e},query:{runId:n}}))}function $K(e){if(!e||typeof e!="object")return;const n=e;if(!(typeof n.current!="string"||typeof n.latest!="string"||typeof n.url!="string"||typeof n.upgradeCommand!="string"))return{current:n.current,latest:n.latest,url:n.url,upgradeCommand:n.upgradeCommand}}async function GK(e,n){const i=xK(e);try{const o=await fetch(i,{credentials:"same-origin"});if(!o.ok)return{label:n,state:"error",detail:`${n} ${o.status}: ${o.statusText}`,statusCode:o.status,hint:wK(e,o.status)};const u=await o.json(),h=typeof u.version=="string"?u.version:"unknown",f=typeof u.databaseUrlConfigured=="boolean"?u.databaseUrlConfigured:void 0,b=typeof u.lastHeartbeatAt=="string"?u.lastHeartbeatAt:void 0,v=$K(u.updateAvailable),x=K$.safeParse(u.mcp),k=[h,f===!1?"database not configured":"database configured",b?`heartbeat ${b}`:void 0].filter(Boolean).join(" · ");return{label:n,state:"ok",detail:k,version:h,databaseConfigured:f,lastHeartbeatAt:b,...v?{updateAvailable:v}:{},...x.success?{mcp:x.data}:{}}}catch(o){return{label:n,state:"error",detail:o instanceof Error?o.message:"unreachable",hint:e==="/health"?`Request failed while checking ${i}. If this instance is served behind a sub-path, verify the dashboard basePath and reverse-proxy rewrites.`:void 0}}}function cne(){return fe(()=>YT({client:ee}))}function une(){return fe(()=>XT({client:ee}))}function dne(){return fe(()=>e8({client:ee}))}function mne(){return fe(()=>JT({client:ee}))}function pne(e){return fe(()=>WT({client:ee,body:e?{release:e}:{}}))}function hne(){return fe(()=>t8({client:ee}))}function fne(){return fe(()=>n8({client:ee}))}function gne(e){return fe(()=>a8({client:ee,path:{release:e}}))}function yne(e,n={}){return fe(()=>s8({client:ee,path:{name:e},query:{release:n.release,excludeCrawlers:n.excludeCrawlers?"1":void 0,source:n.source}}))}function bne(e,n={}){return fe(()=>o8({client:ee,path:{name:e},query:{limit:n.limit!==void 0?String(n.limit):void 0,offset:n.offset!==void 0?String(n.offset):void 0,release:n.release,excludeCrawlers:n.excludeCrawlers?"1":void 0,source:n.source}}))}function vne(e,n={}){return fe(()=>r8({client:ee,path:{name:e},query:{source:n.source}}))}function xne(e,n){return fe(()=>i8({client:ee,path:{name:e},body:{release:void 0}}))}async function rk(e,n){return fe(()=>z8({client:ee,path:{name:e},query:n}))}async function KK(e,n){return fe(()=>I8({client:ee,path:{name:e},body:{id:n}}))}async function HK(e,n){return fe(()=>P8({client:ee,path:{name:e,id:n}}))}async function FK(e,n){return fe(()=>O8({client:ee,path:{name:e,id:n}}))}async function QK(e,n){const i=f=>fe(()=>I6({client:ee,path:{name:e},query:{...n,include:["assessments","locations"],queryLimit:F3,queryCursor:f}})),o=await i(),u=[...o.queries];let h=o.queryPage?.nextCursor??null;for(;h;){const f=await i(h);u.push(...f.queries),h=f.queryPage?.nextCursor??null}return{...o,queries:u,...o.queryPage?{queryPage:{...o.queryPage,nextCursor:null}}:{}}}function Dd(e){return fe(()=>D6({client:ee,path:{name:e}}))}function ZK(e,n){return fe(()=>z6({client:ee,path:{name:e},body:n}))}function YK(e,n,i){return fe(()=>O6({client:ee,path:{name:e},query:{...n,cursor:i,limit:50}}))}function XK(e,n){return fe(()=>P6({client:ee,path:{name:e},query:n}))}function JK(e,n,i){return fe(()=>q6({client:ee,path:{name:e},body:{previewToken:n,idempotencyKey:i}}))}function WK(e){return fe(()=>M6({client:ee,path:{name:e}}))}function eH(e,n,i){return fe(()=>B6({client:ee,path:{name:e,jobId:n},query:{attemptCursor:i}}))}const bN={account:null,canWrite:!0,isAdmin:!0},tH={account:null,canWrite:!1,isAdmin:!1};function nH(e){const n=e.scopes.includes(Yw);return{account:null,canWrite:!e.readOnly&&n,isAdmin:e.projectId===null&&e.scopes.includes(Yw)}}const vN=N.createContext(bN);function aH({account:e,apiKey:n,apiKeyPending:i=!1,children:o}){const u=i?tH:n?nH(n):e?{account:e,canWrite:e.role==="admin",isAdmin:e.role==="admin"}:bN;return l.jsx(vN.Provider,{value:u,children:o})}function fa(){return N.useContext(vN)}const xN="View only — your account cannot change this.";function fn(e){return(...n)=>{e(...n)}}const iH=6e3,sH=5,oH=180;let On=[],rH=0;const y0=new Set,b0=new Map,v0=new Map;function im(){const e=[...On];for(const n of y0)n(e)}function b1(e){const n=b0.get(e);n&&(clearTimeout(n),b0.delete(e));const i=v0.get(e);i&&(clearTimeout(i),v0.delete(e))}function wN(e){b1(e);const n=On.length;On=On.filter(i=>i.id!==e),On.length!==n&&im()}function lk(e){b1(e.id),b0.set(e.id,setTimeout(()=>{x0(e.id)},e.durationMs))}function lH(e,n,i){return typeof e=="string"?{title:e,tone:n,durationMs:i}:e}function xn(e,n="negative",i=iH){const o=lH(e,n,i),u={id:String(++rH),title:o.title,detail:o.detail,tone:o.tone??n,durationMs:o.durationMs??i,dedupeKey:o.dedupeKey,cta:o.cta,state:"open"};if(o.dedupeKey){const h=On.find(f=>f.dedupeKey===o.dedupeKey);if(h){if((o.dedupeMode??"drop")==="drop")return h.id;const f={...h,title:u.title,detail:u.detail,tone:u.tone,durationMs:u.durationMs,cta:u.cta,state:"open"};return On=On.map(b=>b.id===h.id?f:b),im(),lk(f),h.id}}return On.length>=sH&&wN(On[0].id),On=[...On,u],im(),lk(u),u.id}function x0(e){const n=On.find(i=>i.id===e);!n||n.state==="closing"||(b1(e),On=On.map(i=>i.id===e?{...i,state:"closing"}:i),im(),v0.set(e,setTimeout(()=>{wN(e)},oH)))}function cH(e){return y0.add(e),()=>{y0.delete(e)}}function ck(){return On}const uH=5*6e4,zd=30*6e4,wne=3e4,kne=6e4,Mr=3e4,dH=2e3,mH=3e4;function pH(){return new j5({defaultOptions:{queries:{staleTime:uH,retry:1,refetchOnWindowFocus:!1}},mutationCache:new A5({onError:(n,i,o,u)=>{u.meta?.skipGlobalErrorToast||xn({title:n instanceof Error?n.message:"An unexpected error occurred",tone:"negative"})}})})}const hH="modulepreload",fH=function(e,n){return new URL(e,n).href},uk={},Hi=function(n,i,o){let u=Promise.resolve();if(i&&i.length>0){let x=function(k){return Promise.all(k.map(S=>Promise.resolve(S).then(C=>({status:"fulfilled",value:C}),C=>({status:"rejected",reason:C}))))};const f=document.getElementsByTagName("link"),b=document.querySelector("meta[property=csp-nonce]"),v=b?.nonce||b?.getAttribute("nonce");u=x(i.map(k=>{if(k=fH(k,o),k in uk)return;uk[k]=!0;const S=k.endsWith(".css"),C=S?'[rel="stylesheet"]':"";if(o)for(let z=f.length-1;z>=0;z--){const q=f[z];if(q.href===k&&(!S||q.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${k}"]${C}`))return;const _=document.createElement("link");if(_.rel=S?"stylesheet":hH,S||(_.as="script"),_.crossOrigin="",_.href=k,v&&_.setAttribute("nonce",v),document.head.appendChild(_),S)return new Promise((z,q)=>{_.addEventListener("load",z),_.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${k}`)))})}))}function h(f){const b=new Event("vite:preloadError",{cancelable:!0});if(b.payload=f,window.dispatchEvent(b),!b.defaultPrevented)throw f}return u.then(f=>{for(const b of f||[])b.status==="rejected"&&h(b.reason);return n().catch(h)})},v1=N.createContext({view:null,publish:()=>()=>{}});function gH({children:e}){const[n,i]=N.useState(null),o=N.useCallback(u=>(i(u),()=>i(h=>h===u?null:h)),[]);return l.jsx(v1.Provider,{value:N.useMemo(()=>({view:n,publish:o}),[n,o]),children:e})}function Sne(e,n){const{publish:i}=N.useContext(v1),o=JSON.stringify(n);N.useEffect(()=>i({project:e,context:JSON.parse(o)}),[i,e,o])}function yH(e,n){const{view:i}=N.useContext(v1);return i?.project===e&&i.context.view===n.view?i.context:n}var bH=(e=>(e.Clicks="clicks",e.Impressions="impressions",e.CTR="ctr",e.Position="position",e))(bH||{});const jne={clicks:"Clicks",impressions:"Impressions",ctr:"CTR",position:"Position"},Ane={clicks:"Clicks",impressions:"Impr",ctr:"CTR",position:"Pos"},vH=kg;function Nne(e){return e.endsWith("%")?{figure:e.slice(0,-1),sign:"%"}:{figure:e,sign:""}}function Cne(e,n){return n==="cited"?SG(e):kG(e)}function xH(e){const n=[];if(e.message&&n.push(e.message),e.providers)for(const[i,o]of Object.entries(e.providers)){const u=`[${i}] ${o.message}`;o.raw!==void 0?n.push(`${u}
|
|
53
|
+
|
|
54
|
+
${JSON.stringify(o.raw,null,2)}`):n.push(u)}return n.length>0?n.join(`
|
|
55
|
+
|
|
56
|
+
`):"Run failed."}function wH(e){return e.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function kH(e,n,i=new Date){const o=new Date(e);if(Number.isNaN(o.getTime()))return e;const u=o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"});return n&&new Date(n).toDateString()===o.toDateString()?u:`${SH(e,i)}, ${u}`}function SH(e,n=new Date){const i=new Date(e);return Number.isNaN(i.getTime())?e:i.getFullYear()===n.getFullYear()?jH(e):i.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function jH(e){const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function AH(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}function _ne(e){return e===null?"Unknown":e?"Pass":"Fail"}function dk(e){return e===0?"12:00 AM":e<12?`${e}:00 AM`:e===12?"12:00 PM":`${e-12}:00 PM`}function Tne(e,n){return e==="twice-daily"?"twice-daily":e.startsWith("weekly@")?`${e}@${n}`:`daily@${n}`}function Ene(e,n){if(!e)return{freq:"custom",hour:6,customCron:n};if(e==="twice-daily")return{freq:"twice-daily",hour:6,customCron:""};const i=e.match(/^daily(?:@(\d+))?$/);if(i)return{freq:"daily",hour:i[1]?parseInt(i[1]):6,customCron:""};const o=e.match(/^(weekly@(?:mon|tue|wed|thu|fri|sat|sun))(?:@(\d+))?$/);return o?{freq:o[1],hour:o[2]?parseInt(o[2]):6,customCron:""}:{freq:"custom",hour:6,customCron:n}}function Rne(e,n,i){const o=i==="UTC"?"UTC":i.split("/").pop()?.replace(/_/g," ")??i;if(!e)return`Custom: ${n} · ${o}`;if(e==="twice-daily")return`Twice a day (6am & 6pm) · ${o}`;const u=e.match(/^daily(?:@(\d+))?$/);if(u){const f=u[1]?parseInt(u[1]):6;return`Every day at ${dk(f)} · ${o}`}const h=e.match(/^weekly@(mon|tue|wed|thu|fri|sat|sun)(?:@(\d+))?$/);if(h){const f={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},b=h[2]?parseInt(h[2]):6;return`Every ${f[h[1]]} at ${dk(b)} · ${o}`}return`${e} · ${o}`}function NH(e,n){return n&&n!==e?`${e} · ${n}`:e}function Dne(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Intl.DateTimeFormat("en-US",{timeZoneName:"short"}).formatToParts().find(i=>i.type==="timeZoneName")?.value;return NH(e,n)}function CH(e){const n=e.replace(/\/+$/,"")||"/";return n==="/"?"overview":n==="/projects"?"projects":n.startsWith("/projects/")?"project":n==="/runs"?"runs":n==="/traffic"||n.startsWith("/traffic/")?"traffic":n==="/backlinks"?"backlinks":n==="/settings"?"settings":n==="/setup"?"setup":"other"}function _H(e,n){return!n||n.includes(e)}const kN=["overview","search-console","local","activity","backlinks","technical-aeo","history","settings"],TH=new Set(kN);function EH(e){if($A(e))return[];const n=e??kN,i=[...new Set(n.filter(o=>TH.has(o)))];return i.length>0?i:["overview"]}function zne(e){return e?EH(e.projectTabs):void 0}function Ine(e,n){return _H(e,n)||!n?e:n.includes("overview")?"overview":n[0]??"overview"}const mk={bg:"--canonry-embed-bg",fg:"--canonry-embed-fg",accent:"--color-link"},RH=/^(?:#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})|rgba?\([0-9.,%\s/]+\)|hsla?\([0-9.,%\s/a-z]+\))$/i;function DH(e){const n=e?.mode?.trim();return n==="light"||n==="dark"?n:void 0}function zH(e){if(!e)return{};const n={};for(const[i,o]of Object.entries(e)){const u=Object.hasOwn(mk,i)?mk[i]:void 0;if(!u||typeof o!="string")continue;const h=o.trim();RH.test(h)&&(n[u]=h)}return n}const ge=(e,n,i,o)=>{const u={_id:e,baseUrl:n?.baseUrl||(n?.client??I).getConfig().baseUrl};return i&&(u._infinite=i),n?.body&&(u.body=n.body),n?.headers&&(u.headers=n.headers),n?.path&&(u.path=n.path),n?.query&&(u.query=n.query),[u]},Es=e=>ge("getApiV1Projects",e),Oo=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await j6({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:Es(e)}),IH=e=>ge("getApiV1ProjectsByName",e),OH=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await NS({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:IH(e)}),PH=e=>ge("getApiV1ProjectsByNameMeasurementPlan",e),One=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await _6({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:PH(e)}),qH=e=>ge("getApiV1ProjectsByNameMeasurementReport",e),Pne=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await T6({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:qH(e)}),MH=e=>ge("getApiV1ProjectsByNameMeasurementSetup",e),BH=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await E6({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:MH(e)}),Jc=(e,n)=>{const i={...e[0]};return n.body&&(i.body={...e[0].body,...n.body}),n.headers&&(i.headers={...e[0].headers,...n.headers}),n.path&&(i.path={...e[0].path,...n.path}),n.query&&(i.query={...e[0].query,...n.query}),i},qne=e=>({mutationFn:async i=>{const{data:o}=await R6({...e,...i,throwOnError:!0});return o}}),LH=e=>ge("getApiV1ProjectsByNameMeasurementOverview",e),Mne=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await CS({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:LH(e)}),UH=e=>ge("getApiV1ProjectsByNameMeasurementOverview",e,!0),Bne=e=>zc({queryFn:async({pageParam:n,queryKey:i,signal:o})=>{const h=Jc(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await CS({...e,...h,signal:o,throwOnError:!0});return f},queryKey:UH(e)}),VH=e=>ge("getApiV1ProjectsByNameVisibilityReport",e),Lne=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await L6({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:VH(e)}),$H=e=>ge("getApiV1ProjectsByNameMeasurementPropertyEvidence",e,!0),Une=e=>zc({queryFn:async({pageParam:n,queryKey:i,signal:o})=>{const h=Jc(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await U6({...e,...h,signal:o,throwOnError:!0});return f},queryKey:$H(e)}),GH=e=>ge("getApiV1ProjectsByNameMeasurementQuestionResult",e),Vne=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await V6({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:GH(e)}),KH=e=>ge("getApiV1ProjectsByNameMeasurementPropertyCompetitors",e),$ne=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await $6({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:KH(e)}),HH=e=>ge("getApiV1ProjectsByNameMeasurementQueryTemplates",e),Gne=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await G6({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:HH(e)}),Kne=e=>({mutationFn:async i=>{const{data:o}=await K6({...e,...i,throwOnError:!0});return o}}),FH=e=>ge("getApiV1ProjectsByNameResearchRuns",e,!0),Hne=e=>zc({queryFn:async({pageParam:n,queryKey:i,signal:o})=>{const h=Jc(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await H6({...e,...h,signal:o,throwOnError:!0});return f},queryKey:FH(e)}),Fne=e=>({mutationFn:async i=>{const{data:o}=await F6({...e,...i,throwOnError:!0});return o}}),QH=e=>ge("getApiV1ProjectsByNameQueryTracking",e),Qne=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await Q6({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:QH(e)}),Zne=e=>({mutationFn:async i=>{const{data:o}=await Z6({...e,...i,throwOnError:!0});return o}}),Yne=e=>({mutationFn:async i=>{const{data:o}=await Y6({...e,...i,throwOnError:!0});return o}}),ZH=e=>ge("getApiV1ProjectsByNameResearchRunsByRunId",e),Xne=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await X6({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:ZH(e)}),SN=e=>ge("getApiV1ProjectsByNameQueries",e),Jne=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await _S({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:SN(e)}),YH=e=>ge("getApiV1ProjectsByNameAnalyticsCompetitors",e),Wne=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await l_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:YH(e)}),XH=e=>ge("getApiV1ProjectsByNameRuns",e),jN=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await TS({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:XH(e)}),x1=e=>ge("getApiV1Runs",e),Bm=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await u_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:x1(e)}),JH=e=>ge("getApiV1RunsById",e),w1=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await ES({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:JH(e)}),WH=e=>ge("getApiV1ProjectsByNameHistory",e),eae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await p_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:WH(e)}),eF=e=>ge("getApiV1History",e),tae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await h_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:eF(e)}),tF=e=>ge("getApiV1ProjectsByNameSnapshotsDiff",e),nae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await y_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:tF(e)}),nF=e=>ge("getApiV1Settings",e),aF=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await RS({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:nF(e)}),iF=e=>ge("getApiV1ProjectsByNameSchedule",e),sF=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await j_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:iF(e)}),oF=e=>ge("getApiV1ProjectsByNameSchedules",e),aae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await N_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:oF(e)}),AN=e=>ge("getApiV1Telemetry",e),rF=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await R_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:AN(e)}),lF=e=>({mutationFn:async i=>{const{data:o}=await D_({...e,...i,throwOnError:!0});return o}}),cF=e=>ge("getApiV1CdpStatus",e),uF=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await DS({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:cF(e)}),dF=e=>ge("getApiV1ProjectsByNameGoogleAdsStatus",e),iae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await O_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:dF(e)}),sae=e=>({mutationFn:async i=>{const{data:o}=await P_({...e,...i,throwOnError:!0});return o}}),mF=e=>ge("getApiV1ProjectsByNameGoogleAdsCustomers",e),oae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await q_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:mF(e)}),rae=e=>({mutationFn:async i=>{const{data:o}=await M_({...e,...i,throwOnError:!0});return o}}),lae=e=>({mutationFn:async i=>{const{data:o}=await B_({...e,...i,throwOnError:!0});return o}}),pF=e=>ge("getApiV1ProjectsByNameGoogleAdsPerformance",e),cae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await L_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:pF(e)}),hF=e=>ge("getApiV1ProjectsByNameGoogleAdsSnapshots",e),uae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await U_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:hF(e)}),dae=e=>({mutationFn:async i=>{const{data:o}=await V_({...e,...i,throwOnError:!0});return o}}),fF=e=>ge("getApiV1ProjectsByNameGtmStatus",e),mae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await $_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:fF(e)}),pae=e=>({mutationFn:async i=>{const{data:o}=await G_({...e,...i,throwOnError:!0});return o}}),gF=e=>ge("getApiV1ProjectsByNameGtmAccounts",e),hae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await K_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:gF(e)}),yF=e=>ge("getApiV1ProjectsByNameGtmAccountsByAccountIdContainers",e),fae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await H_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:yF(e)}),bF=e=>ge("getApiV1ProjectsByNameGtmAccountsByAccountIdContainersByContainerIdWorkspaces",e),gae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await F_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:bF(e)}),yae=e=>({mutationFn:async i=>{const{data:o}=await Q_({...e,...i,throwOnError:!0});return o}}),bae=e=>({mutationFn:async i=>{const{data:o}=await Z_({...e,...i,throwOnError:!0});return o}}),vF=e=>ge("getApiV1ProjectsByNameGtmSnapshots",e),vae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await Y_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:vF(e)}),xae=e=>({mutationFn:async i=>{const{data:o}=await X_({...e,...i,throwOnError:!0});return o}}),xF=e=>ge("getApiV1ProjectsByNameConversionTrackingOptions",e),wae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await J_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:xF(e)}),wF=e=>ge("getApiV1ProjectsByNameConversionTrackingContracts",e),kae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await W_({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:wF(e)}),Sae=e=>({mutationFn:async i=>{const{data:o}=await eT({...e,...i,throwOnError:!0});return o}}),kF=e=>ge("getApiV1ProjectsByNameConversionTrackingContractsByContractIdIntegrity",e),jae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await tT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:kF(e)}),SF=e=>ge("getApiV1ProjectsByNameGoogleConnections",e),Aae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await nT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:SF(e)}),jF=e=>ge("getApiV1ProjectsByNameGoogleProperties",e),Nae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await sT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:jF(e)}),AF=e=>ge("getApiV1ProjectsByNameGoogleGscPerformance",e),Cae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await cT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:AF(e)}),NF=e=>ge("getApiV1ProjectsByNameGoogleGscPerformanceDaily",e),_ae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await uT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:NF(e)}),CF=e=>ge("getApiV1ProjectsByNameGoogleGscInspections",e),Tae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await mT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:CF(e)}),_F=e=>ge("getApiV1ProjectsByNameGoogleGscDeindexed",e),Eae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await pT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:_F(e)}),TF=e=>ge("getApiV1ProjectsByNameGoogleGscCoverage",e),Rae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await hT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:TF(e)}),EF=e=>ge("getApiV1ProjectsByNameGoogleGscCoverageHistory",e),Dae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await fT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:EF(e)}),zae=e=>ge("getApiV1ProjectsByNameGoogleGscSitemaps",e),RF=e=>ge("getApiV1ProjectsByNameGbpLocations",e),Iae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await vT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:RF(e)}),Oae=e=>({mutationFn:async i=>{const{data:o}=await xT({...e,...i,throwOnError:!0});return o}}),Pae=e=>({mutationFn:async i=>{const{data:o}=await wT({...e,...i,throwOnError:!0});return o}}),DF=e=>ge("getApiV1ProjectsByNameGbpKeywords",e),qae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await kT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:DF(e)}),zF=e=>ge("getApiV1ProjectsByNameGbpPlaceActions",e),Mae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await ST({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:zF(e)}),IF=e=>ge("getApiV1ProjectsByNameGbpLodging",e),Bae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await jT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:IF(e)}),OF=e=>ge("getApiV1ProjectsByNameGbpPlaces",e),Lae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await AT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:OF(e)}),PF=e=>ge("getApiV1ProjectsByNameGbpSummary",e),Uae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await NT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:PF(e)}),qF=e=>ge("getApiV1ProjectsByNameBingStatus",e),Vae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await TT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:qF(e)}),MF=e=>ge("getApiV1ProjectsByNameBingSites",e),$ae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await ET({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:MF(e)}),BF=e=>ge("getApiV1ProjectsByNameBingCoverage",e),Gae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await DT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:BF(e)}),LF=e=>ge("getApiV1ProjectsByNameBingInspections",e),Kae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await zT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:LF(e)}),UF=e=>ge("getApiV1ProjectsByNameBingPerformance",e),Hae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await qT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:UF(e)}),VF=e=>ge("getApiV1ProjectsByNameGaStatus",e),Fae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await LT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:VF(e)}),$F=e=>ge("getApiV1ProjectsByNameGaTraffic",e),Qae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await VT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:$F(e)}),GF=e=>ge("getApiV1ProjectsByNameGaAiReferralDaily",e),Zae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await $T({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:GF(e)}),KF=e=>ge("getApiV1ProjectsByNameGaSocialReferralHistory",e),Yae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await GT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:KF(e)}),HF=e=>ge("getApiV1ProjectsByNameGaSessionHistory",e),Xae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await KT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:HF(e)}),FF=e=>ge("getApiV1ProjectsByNameHealthHistory",e),Jae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await FT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:FF(e)}),QF=e=>ge("getApiV1ProjectsByNameCitationsVisibility",e),Wae=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await QT({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:QF(e)}),ZF=e=>ge("getApiV1ProjectsByNameTrafficSources",e),eie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await p8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:ZF(e)}),YF=e=>ge("getApiV1ProjectsByNameTrafficStatus",e),tie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await h8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:YF(e)}),XF=e=>ge("getApiV1ProjectsByNameTrafficSourcesById",e),nie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await f8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:XF(e)}),JF=e=>ge("getApiV1ProjectsByNameTrafficEvents",e),aie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await g8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:JF(e)}),WF=e=>ge("getApiV1ProjectsByNameDiscoverSessions",e),iie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await b8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:WF(e)}),eQ=e=>ge("getApiV1ProjectsByNameDiscoverSessionsById",e),sie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await v8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:eQ(e)}),tQ=e=>ge("getApiV1ProjectsByNameTechnicalAeo",e),nQ=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await x8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:tQ(e)}),aQ=e=>ge("getApiV1ProjectsByNameTechnicalAeoPages",e),oie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await w8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:aQ(e)}),iQ=e=>ge("getApiV1ProjectsByNameTechnicalAeoTrend",e),rie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await k8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:iQ(e)}),sQ=e=>ge("getApiV1ProjectsByNameTechnicalAeoCrawl",e),lie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await S8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:sQ(e)}),oQ=e=>ge("getApiV1ProjectsByNameTechnicalAeoGraph",e),cie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await j8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:oQ(e)}),rQ=e=>ge("getApiV1ProjectsByNameTechnicalAeoCrawlPagesAudit",e),uie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await A8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:rQ(e)}),lQ=e=>ge("getApiV1ProjectsByNameTechnicalAeoCrawlPages",e),die=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await zS({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:lQ(e)}),cQ=e=>ge("getApiV1ProjectsByNameTechnicalAeoCrawlPages",e,!0),mie=e=>zc({queryFn:async({pageParam:n,queryKey:i,signal:o})=>{const h=Jc(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await zS({...e,...h,signal:o,throwOnError:!0});return f},queryKey:cQ(e)}),uQ=e=>ge("getApiV1ProjectsByNameTechnicalAeoStructure",e,!0),pie=e=>zc({queryFn:async({pageParam:n,queryKey:i,signal:o})=>{const h=Jc(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await N8({...e,...h,signal:o,throwOnError:!0});return f},queryKey:uQ(e)}),dQ=e=>ge("getApiV1ProjectsByNameTechnicalAeoInternalLinksNeighbors",e),hie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await C8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:dQ(e)}),mQ=e=>ge("getApiV1ProjectsByNameTechnicalAeoDeadLinks",e),fie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await _8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:mQ(e)}),pQ=e=>ge("getApiV1ProjectsByNameTechnicalAeoRuns",e),gie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await T8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:pQ(e)}),hQ=e=>ge("getApiV1ProjectsByNameTechnicalAeoRunsByRunIdProgress",e),yie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await R8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:hQ(e)}),fQ=e=>ge("getApiV1ProjectsByNameTechnicalAeoRunsByRunIdPageHealthPreview",e),bie=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await D8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:fQ(e)}),gQ=e=>ge("getApiV1ProjectsByNameAgentProviders",e),yQ=e=>xe({queryFn:async({queryKey:n,signal:i})=>{const{data:o}=await q8({...e,...n[0],signal:i,throwOnError:!0});return o},queryKey:gQ(e)});function pk(e){return e.state==="ok"?"positive":e.state==="checking"||e.state==="disabled"?"neutral":"negative"}function NN(e){switch(e){case"completed":return"positive";case"partial":return"caution";case"failed":return"negative";case"cancelled":return"caution";case"queued":case"running":return"neutral";default:return"neutral"}}function vie(e){switch(e){case"cited":return"positive";case"emerging":return"caution";case"not-cited":return"caution";case"lost":return"negative";case"pending":return"neutral";default:return"neutral"}}const xie={positive:"text-positive-400",caution:"text-caution-400",negative:"text-negative-400",neutral:"text-secondary"};function wie(e){return e>=50?"positive":e>=25?"caution":"negative"}function bQ(e){return e.displayName??e.name.charAt(0).toUpperCase()+e.name.slice(1)}function Br(e){const n=[e.detail,e.hint].filter(Boolean);return n.length>0?n.join(`
|
|
57
|
+
`):void 0}function vQ(e,n,i){const o=e.filter(f=>f.id!=="mcp").map(f=>{if(f.id==="api")return{...f,tone:pk(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(f.id==="worker")return{...f,tone:pk(n.workerStatus),detail:n.workerStatus.state==="ok"?"Healthy":n.workerStatus.state==="disabled"?"Disabled":"Needs attention",meta:n.workerStatus.detail};const b=i.providerStatuses.filter(S=>S.state==="ready").length,v=i.providerStatuses.length,x=b>0,k=i.providerStatuses.filter(S=>S.state==="ready").map(S=>bQ(S)).join(" · ");return{...f,label:"Providers",tone:x?"positive":"caution",detail:`${b} of ${v} configured`,meta:k||"None configured"}}),u=n.apiStatus.mcp,h={id:"mcp",label:"MCP",tone:"neutral",detail:"Unknown",meta:"MCP status is not available from this server."};return n.apiStatus.state==="checking"?(h.detail="Checking",h.meta="Checking MCP availability."):n.apiStatus.state==="ok"&&u&&(u.status==="available"?(h.tone="positive",h.detail="Available",h.meta="MCP is available for agent connections. This checks the server transport, not an individual client connection."):u.status==="unavailable"?(h.tone="negative",h.detail="Unavailable",h.meta="The MCP transport is not fully available. Contact your Canonry team."):(h.detail="Not enabled",h.meta="This server does not provide an MCP endpoint.")),o.splice(Math.max(0,o.findIndex(f=>f.id==="api")+1),0,h),o}function xQ(e,n){if(e.apiStatus.state!=="ok")return"Launch is blocked until the API responds cleanly.";if(e.apiStatus.databaseConfigured===!1)return"Launch is blocked until the API has a database connection configured.";if(e.workerStatus.state!=="ok")return"Launch is blocked until the worker is healthy and heartbeats are current.";if(!n.providerStatuses.some(i=>i.state==="ready"))return"Launch is blocked until at least one provider is configured."}function wQ(e,n,i){const o=xQ(n,i),u=structuredClone(e);return u.healthChecks=u.healthChecks.map(h=>{if(h.id==="api")return{...h,detail:n.apiStatus.detail,state:n.apiStatus.state==="ok"?"ready":"attention"};if(h.id==="worker")return{...h,detail:n.workerStatus.detail,state:n.workerStatus.state==="ok"?"ready":"attention"};const f=i.providerStatuses.some(b=>b.state==="ready");return{...h,detail:f?"At least one provider configured.":"No providers configured.",state:f?"ready":"attention"}}),u.launchState.enabled=o===void 0,u.launchState.blockedReason=o,u.launchState.summary=o??"Queue a visibility sweep first, then follow with a site audit to explain movement.",u}const CN="canonry.run-tracker",w0=new Set;let hk=!1,kQ=0,Lm={runs:{},batches:{}};function SQ(){const e=$i();for(const n of w0)n(e)}function jQ(e){if(!e)return{runs:{},batches:{}};try{const n=JSON.parse(e);return{runs:n.runs??{},batches:n.batches??{}}}catch{return{runs:{},batches:{}}}}function AQ(){typeof window>"u"||window.sessionStorage.setItem(CN,JSON.stringify(Lm))}function _N(){hk||(hk=!0,!(typeof window>"u")&&(Lm=jQ(window.sessionStorage.getItem(CN))))}function Um(e){Lm=e,AQ(),SQ()}function $i(){return _N(),Lm}function TN(e){return _N(),w0.add(e),()=>{w0.delete(e)}}function k1(e){const n=$i();Um({...n,runs:{...n.runs,[e.id]:{runId:e.id,projectId:e.projectId,projectLabel:e.projectLabel,kind:e.kind,sourceAction:e.sourceAction,lastAnnouncedStatus:e.lastAnnouncedStatus??"queued",trackedAt:e.trackedAt??Date.now()}}})}function Of(e){const n=$i();if(!n.runs[e])return;const{[e]:i,...o}=n.runs;Um({...n,runs:o})}function NQ(e){const n=$i(),i=`batch_${Date.now()}_${++kQ}`;return Um({...n,batches:{...n.batches,[i]:{batchId:i,runIds:e.runIds,queuedCount:e.queuedCount,skippedCount:e.skippedCount}}}),i}function CQ(e){const n=$i();if(!n.batches[e])return;const{[e]:i,...o}=n.batches;Um({...n,batches:o})}function _Q(e){return e==="completed"||e==="partial"||e==="failed"||e==="cancelled"}const TQ=10*6e4;function EQ(e,n,i,o){return e.filter(u=>!n.has(u.runId)&&i-(u.trackedAt??0)>=o)}function RQ(e,n){let i=0,o=0,u=0,h=0,f=0;for(const b of e){const v=n[b]?.status;v==="completed"?i+=1:v==="partial"?o+=1:v==="failed"?u+=1:v==="cancelled"?h+=1:f+=1}return{completed:i,partial:o,failed:u,cancelled:h,pending:f,finished:f===0}}const fk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,gk=uS,EN=(e,n)=>i=>{var o;if(n?.variants==null)return gk(e,i?.class,i?.className);const{variants:u,defaultVariants:h}=n,f=Object.keys(u).map(x=>{const k=i?.[x],S=h?.[x];if(k===null)return null;const C=fk(k)||fk(S);return u[x][C]}),b=i&&Object.entries(i).reduce((x,k)=>{let[S,C]=k;return C===void 0||(x[S]=C),x},{}),v=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((x,k)=>{let{class:S,className:C,..._}=k;return Object.entries(_).every(z=>{let[q,T]=z;return Array.isArray(T)?T.includes({...h,...b}[q]):{...h,...b}[q]===T})?[...x,S,C]:x},[]);return gk(e,f,v,i?.class,i?.className)},DQ=(e,n)=>{const i=new Array(e.length+n.length);for(let o=0;o<e.length;o++)i[o]=e[o];for(let o=0;o<n.length;o++)i[e.length+o]=n[o];return i},zQ=(e,n)=>({classGroupId:e,validator:n}),RN=(e=new Map,n=null,i)=>({nextPart:e,validators:n,classGroupId:i}),sm="-",yk=[],IQ="arbitrary..",OQ=e=>{const n=qQ(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return PQ(f);const b=f.split(sm),v=b[0]===""&&b.length>1?1:0;return DN(b,v,n)},getConflictingClassGroupIds:(f,b)=>{if(b){const v=o[f],x=i[f];return v?x?DQ(x,v):v:x||yk}return i[f]||yk}}},DN=(e,n,i)=>{if(e.length-n===0)return i.classGroupId;const u=e[n],h=i.nextPart.get(u);if(h){const x=DN(e,n+1,h);if(x)return x}const f=i.validators;if(f===null)return;const b=n===0?e.join(sm):e.slice(n).join(sm),v=f.length;for(let x=0;x<v;x++){const k=f[x];if(k.validator(b))return k.classGroupId}},PQ=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),i=n.indexOf(":"),o=n.slice(0,i);return o?IQ+o:void 0})(),qQ=e=>{const{theme:n,classGroups:i}=e;return MQ(i,n)},MQ=(e,n)=>{const i=RN();for(const o in e){const u=e[o];S1(u,i,o,n)}return i},S1=(e,n,i,o)=>{const u=e.length;for(let h=0;h<u;h++){const f=e[h];BQ(f,n,i,o)}},BQ=(e,n,i,o)=>{if(typeof e=="string"){LQ(e,n,i);return}if(typeof e=="function"){UQ(e,n,i,o);return}VQ(e,n,i,o)},LQ=(e,n,i)=>{const o=e===""?n:zN(n,e);o.classGroupId=i},UQ=(e,n,i,o)=>{if($Q(e)){S1(e(o),n,i,o);return}n.validators===null&&(n.validators=[]),n.validators.push(zQ(i,e))},VQ=(e,n,i,o)=>{const u=Object.entries(e),h=u.length;for(let f=0;f<h;f++){const[b,v]=u[f];S1(v,zN(n,b),i,o)}},zN=(e,n)=>{let i=e;const o=n.split(sm),u=o.length;for(let h=0;h<u;h++){const f=o[h];let b=i.nextPart.get(f);b||(b=RN(),i.nextPart.set(f,b)),i=b}return i},$Q=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,GQ=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,i=Object.create(null),o=Object.create(null);const u=(h,f)=>{i[h]=f,n++,n>e&&(n=0,o=i,i=Object.create(null))};return{get(h){let f=i[h];if(f!==void 0)return f;if((f=o[h])!==void 0)return u(h,f),f},set(h,f){h in i?i[h]=f:u(h,f)}}},k0="!",bk=":",KQ=[],vk=(e,n,i,o,u)=>({modifiers:e,hasImportantModifier:n,baseClassName:i,maybePostfixModifierPosition:o,isExternal:u}),HQ=e=>{const{prefix:n,experimentalParseClassName:i}=e;let o=u=>{const h=[];let f=0,b=0,v=0,x;const k=u.length;for(let q=0;q<k;q++){const T=u[q];if(f===0&&b===0){if(T===bk){h.push(u.slice(v,q)),v=q+1;continue}if(T==="/"){x=q;continue}}T==="["?f++:T==="]"?f--:T==="("?b++:T===")"&&b--}const S=h.length===0?u:u.slice(v);let C=S,_=!1;S.endsWith(k0)?(C=S.slice(0,-1),_=!0):S.startsWith(k0)&&(C=S.slice(1),_=!0);const z=x&&x>v?x-v:void 0;return vk(h,_,C,z)};if(n){const u=n+bk,h=o;o=f=>f.startsWith(u)?h(f.slice(u.length)):vk(KQ,!1,f,void 0,!0)}if(i){const u=o;o=h=>i({className:h,parseClassName:u})}return o},FQ=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((i,o)=>{n.set(i,1e6+o)}),i=>{const o=[];let u=[];for(let h=0;h<i.length;h++){const f=i[h],b=f[0]==="[",v=n.has(f);b||v?(u.length>0&&(u.sort(),o.push(...u),u=[]),o.push(f)):u.push(f)}return u.length>0&&(u.sort(),o.push(...u)),o}},QQ=e=>({cache:GQ(e.cacheSize),parseClassName:HQ(e),sortModifiers:FQ(e),...OQ(e)}),ZQ=/\s+/,YQ=(e,n)=>{const{parseClassName:i,getClassGroupId:o,getConflictingClassGroupIds:u,sortModifiers:h}=n,f=[],b=e.trim().split(ZQ);let v="";for(let x=b.length-1;x>=0;x-=1){const k=b[x],{isExternal:S,modifiers:C,hasImportantModifier:_,baseClassName:z,maybePostfixModifierPosition:q}=i(k);if(S){v=k+(v.length>0?" "+v:v);continue}let T=!!q,V=o(T?z.substring(0,q):z);if(!V){if(!T){v=k+(v.length>0?" "+v:v);continue}if(V=o(z),!V){v=k+(v.length>0?" "+v:v);continue}T=!1}const Y=C.length===0?"":C.length===1?C[0]:h(C).join(":"),M=_?Y+k0:Y,U=M+V;if(f.indexOf(U)>-1)continue;f.push(U);const Z=u(V,T);for(let te=0;te<Z.length;++te){const B=Z[te];f.push(M+B)}v=k+(v.length>0?" "+v:v)}return v},XQ=(...e)=>{let n=0,i,o,u="";for(;n<e.length;)(i=e[n++])&&(o=IN(i))&&(u&&(u+=" "),u+=o);return u},IN=e=>{if(typeof e=="string")return e;let n,i="";for(let o=0;o<e.length;o++)e[o]&&(n=IN(e[o]))&&(i&&(i+=" "),i+=n);return i},JQ=(e,...n)=>{let i,o,u,h;const f=v=>{const x=n.reduce((k,S)=>S(k),e());return i=QQ(x),o=i.cache.get,u=i.cache.set,h=b,b(v)},b=v=>{const x=o(v);if(x)return x;const k=YQ(v,i);return u(v,k),k};return h=f,(...v)=>h(XQ(...v))},WQ=[],hn=e=>{const n=i=>i[e]||WQ;return n.isThemeGetter=!0,n},ON=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,PN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eZ=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,tZ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nZ=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,aZ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,iZ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sZ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ss=e=>eZ.test(e),it=e=>!!e&&!Number.isNaN(Number(e)),js=e=>!!e&&Number.isInteger(Number(e)),Pf=e=>e.endsWith("%")&&it(e.slice(0,-1)),Ii=e=>tZ.test(e),qN=()=>!0,oZ=e=>nZ.test(e)&&!aZ.test(e),j1=()=>!1,rZ=e=>iZ.test(e),lZ=e=>sZ.test(e),cZ=e=>!Ce(e)&&!Te(e),uZ=e=>Bs(e,LN,j1),Ce=e=>ON.test(e),ho=e=>Bs(e,UN,oZ),xk=e=>Bs(e,bZ,it),dZ=e=>Bs(e,$N,qN),mZ=e=>Bs(e,VN,j1),wk=e=>Bs(e,MN,j1),pZ=e=>Bs(e,BN,lZ),wd=e=>Bs(e,GN,rZ),Te=e=>PN.test(e),dc=e=>Po(e,UN),hZ=e=>Po(e,VN),kk=e=>Po(e,MN),fZ=e=>Po(e,LN),gZ=e=>Po(e,BN),kd=e=>Po(e,GN,!0),yZ=e=>Po(e,$N,!0),Bs=(e,n,i)=>{const o=ON.exec(e);return o?o[1]?n(o[1]):i(o[2]):!1},Po=(e,n,i=!1)=>{const o=PN.exec(e);return o?o[1]?n(o[1]):i:!1},MN=e=>e==="position"||e==="percentage",BN=e=>e==="image"||e==="url",LN=e=>e==="length"||e==="size"||e==="bg-size",UN=e=>e==="length",bZ=e=>e==="number",VN=e=>e==="family-name",$N=e=>e==="number"||e==="weight",GN=e=>e==="shadow",vZ=()=>{const e=hn("color"),n=hn("font"),i=hn("text"),o=hn("font-weight"),u=hn("tracking"),h=hn("leading"),f=hn("breakpoint"),b=hn("container"),v=hn("spacing"),x=hn("radius"),k=hn("shadow"),S=hn("inset-shadow"),C=hn("text-shadow"),_=hn("drop-shadow"),z=hn("blur"),q=hn("perspective"),T=hn("aspect"),V=hn("ease"),Y=hn("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Z=()=>[...U(),Te,Ce],te=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],X=()=>[Te,Ce,v],le=()=>[Ss,"full","auto",...X()],Je=()=>[js,"none","subgrid",Te,Ce],nt=()=>["auto",{span:["full",js,Te,Ce]},js,Te,Ce],$e=()=>[js,"auto",Te,Ce],Pe=()=>["auto","min","max","fr",Te,Ce],Se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ue=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...X()],J=()=>[Ss,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...X()],be=()=>[Ss,"screen","full","dvw","lvw","svw","min","max","fit",...X()],je=()=>[Ss,"screen","full","lh","dvh","lvh","svh","min","max","fit",...X()],W=()=>[e,Te,Ce],_e=()=>[...U(),kk,wk,{position:[Te,Ce]}],qe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ve=()=>["auto","cover","contain",fZ,uZ,{size:[Te,Ce]}],de=()=>[Pf,dc,ho],ce=()=>["","none","full",x,Te,Ce],F=()=>["",it,dc,ho],pe=()=>["solid","dashed","dotted","double"],Oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ae=()=>[it,Pf,kk,wk],st=()=>["","none",z,Te,Ce],Ve=()=>["none",it,Te,Ce],At=()=>["none",it,Te,Ce],Ke=()=>[it,Te,Ce],me=()=>[Ss,"full",...X()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ii],breakpoint:[Ii],color:[qN],container:[Ii],"drop-shadow":[Ii],ease:["in","out","in-out"],font:[cZ],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ii],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ii],shadow:[Ii],spacing:["px",it],text:[Ii],"text-shadow":[Ii],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ss,Ce,Te,T]}],container:["container"],columns:[{columns:[it,Ce,Te,b]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Z()}],overflow:[{overflow:te()}],"overflow-x":[{"overflow-x":te()}],"overflow-y":[{"overflow-y":te()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:le()}],"inset-x":[{"inset-x":le()}],"inset-y":[{"inset-y":le()}],start:[{"inset-s":le(),start:le()}],end:[{"inset-e":le(),end:le()}],"inset-bs":[{"inset-bs":le()}],"inset-be":[{"inset-be":le()}],top:[{top:le()}],right:[{right:le()}],bottom:[{bottom:le()}],left:[{left:le()}],visibility:["visible","invisible","collapse"],z:[{z:[js,"auto",Te,Ce]}],basis:[{basis:[Ss,"full","auto",b,...X()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[it,Ss,"auto","initial","none",Ce]}],grow:[{grow:["",it,Te,Ce]}],shrink:[{shrink:["",it,Te,Ce]}],order:[{order:[js,"first","last","none",Te,Ce]}],"grid-cols":[{"grid-cols":Je()}],"col-start-end":[{col:nt()}],"col-start":[{"col-start":$e()}],"col-end":[{"col-end":$e()}],"grid-rows":[{"grid-rows":Je()}],"row-start-end":[{row:nt()}],"row-start":[{"row-start":$e()}],"row-end":[{"row-end":$e()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Pe()}],"auto-rows":[{"auto-rows":Pe()}],gap:[{gap:X()}],"gap-x":[{"gap-x":X()}],"gap-y":[{"gap-y":X()}],"justify-content":[{justify:[...Se(),"normal"]}],"justify-items":[{"justify-items":[...Ue(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ue()]}],"align-content":[{content:["normal",...Se()]}],"align-items":[{items:[...Ue(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ue(),{baseline:["","last"]}]}],"place-content":[{"place-content":Se()}],"place-items":[{"place-items":[...Ue(),"baseline"]}],"place-self":[{"place-self":["auto",...Ue()]}],p:[{p:X()}],px:[{px:X()}],py:[{py:X()}],ps:[{ps:X()}],pe:[{pe:X()}],pbs:[{pbs:X()}],pbe:[{pbe:X()}],pt:[{pt:X()}],pr:[{pr:X()}],pb:[{pb:X()}],pl:[{pl:X()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":X()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":X()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...be()]}],"min-inline-size":[{"min-inline":["auto",...be()]}],"max-inline-size":[{"max-inline":["none",...be()]}],"block-size":[{block:["auto",...je()]}],"min-block-size":[{"min-block":["auto",...je()]}],"max-block-size":[{"max-block":["none",...je()]}],w:[{w:[b,"screen",...J()]}],"min-w":[{"min-w":[b,"screen","none",...J()]}],"max-w":[{"max-w":[b,"screen","none","prose",{screen:[f]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",i,dc,ho]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,yZ,dZ]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pf,Ce]}],"font-family":[{font:[hZ,mZ,n]}],"font-features":[{"font-features":[Ce]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,Te,Ce]}],"line-clamp":[{"line-clamp":[it,"none",Te,xk]}],leading:[{leading:[h,...X()]}],"list-image":[{"list-image":["none",Te,Ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,Ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[it,"from-font","auto",Te,ho]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[it,"auto",Te,Ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:X()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,Ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te,Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_e()}],"bg-repeat":[{bg:qe()}],"bg-size":[{bg:ve()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},js,Te,Ce],radial:["",Te,Ce],conic:[js,Te,Ce]},gZ,pZ]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:de()}],"gradient-via-pos":[{via:de()}],"gradient-to-pos":[{to:de()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-bs":[{"border-bs":F()}],"border-w-be":[{"border-be":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-bs":[{"border-bs":W()}],"border-color-be":[{"border-be":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[it,Te,Ce]}],"outline-w":[{outline:["",it,dc,ho]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",k,kd,wd]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",S,kd,wd]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[it,ho]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",C,kd,wd]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[it,Te,Ce]}],"mix-blend":[{"mix-blend":[...Oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Oe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[it]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ae()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":Ae()}],"mask-image-t-to-pos":[{"mask-t-to":Ae()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":Ae()}],"mask-image-r-to-pos":[{"mask-r-to":Ae()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":Ae()}],"mask-image-b-to-pos":[{"mask-b-to":Ae()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":Ae()}],"mask-image-l-to-pos":[{"mask-l-to":Ae()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":Ae()}],"mask-image-x-to-pos":[{"mask-x-to":Ae()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":Ae()}],"mask-image-y-to-pos":[{"mask-y-to":Ae()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[Te,Ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ae()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":U()}],"mask-image-conic-pos":[{"mask-conic":[it]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ae()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_e()}],"mask-repeat":[{mask:qe()}],"mask-size":[{mask:ve()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,Ce]}],filter:[{filter:["","none",Te,Ce]}],blur:[{blur:st()}],brightness:[{brightness:[it,Te,Ce]}],contrast:[{contrast:[it,Te,Ce]}],"drop-shadow":[{"drop-shadow":["","none",_,kd,wd]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",it,Te,Ce]}],"hue-rotate":[{"hue-rotate":[it,Te,Ce]}],invert:[{invert:["",it,Te,Ce]}],saturate:[{saturate:[it,Te,Ce]}],sepia:[{sepia:["",it,Te,Ce]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,Ce]}],"backdrop-blur":[{"backdrop-blur":st()}],"backdrop-brightness":[{"backdrop-brightness":[it,Te,Ce]}],"backdrop-contrast":[{"backdrop-contrast":[it,Te,Ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",it,Te,Ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[it,Te,Ce]}],"backdrop-invert":[{"backdrop-invert":["",it,Te,Ce]}],"backdrop-opacity":[{"backdrop-opacity":[it,Te,Ce]}],"backdrop-saturate":[{"backdrop-saturate":[it,Te,Ce]}],"backdrop-sepia":[{"backdrop-sepia":["",it,Te,Ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":X()}],"border-spacing-x":[{"border-spacing-x":X()}],"border-spacing-y":[{"border-spacing-y":X()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,Ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[it,"initial",Te,Ce]}],ease:[{ease:["linear","initial",V,Te,Ce]}],delay:[{delay:[it,Te,Ce]}],animate:[{animate:["none",Y,Te,Ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[q,Te,Ce]}],"perspective-origin":[{"perspective-origin":Z()}],rotate:[{rotate:Ve()}],"rotate-x":[{"rotate-x":Ve()}],"rotate-y":[{"rotate-y":Ve()}],"rotate-z":[{"rotate-z":Ve()}],scale:[{scale:At()}],"scale-x":[{"scale-x":At()}],"scale-y":[{"scale-y":At()}],"scale-z":[{"scale-z":At()}],"scale-3d":["scale-3d"],skew:[{skew:Ke()}],"skew-x":[{"skew-x":Ke()}],"skew-y":[{"skew-y":Ke()}],transform:[{transform:[Te,Ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:Z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Te,Ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":X()}],"scroll-mx":[{"scroll-mx":X()}],"scroll-my":[{"scroll-my":X()}],"scroll-ms":[{"scroll-ms":X()}],"scroll-me":[{"scroll-me":X()}],"scroll-mbs":[{"scroll-mbs":X()}],"scroll-mbe":[{"scroll-mbe":X()}],"scroll-mt":[{"scroll-mt":X()}],"scroll-mr":[{"scroll-mr":X()}],"scroll-mb":[{"scroll-mb":X()}],"scroll-ml":[{"scroll-ml":X()}],"scroll-p":[{"scroll-p":X()}],"scroll-px":[{"scroll-px":X()}],"scroll-py":[{"scroll-py":X()}],"scroll-ps":[{"scroll-ps":X()}],"scroll-pe":[{"scroll-pe":X()}],"scroll-pbs":[{"scroll-pbs":X()}],"scroll-pbe":[{"scroll-pbe":X()}],"scroll-pt":[{"scroll-pt":X()}],"scroll-pr":[{"scroll-pr":X()}],"scroll-pb":[{"scroll-pb":X()}],"scroll-pl":[{"scroll-pl":X()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,Ce]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[it,dc,ho,xk]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},xZ=JQ(vZ);function Da(...e){return xZ(uS(e))}const wZ=EN("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400 focus-visible:ring-offset-2 focus-visible:ring-offset-overlay-scrim disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-accent text-on-inverse hover:bg-mono-200",secondary:"border border-base bg-bg text-heading hover:bg-bg-elevated",ghost:"text-secondary hover:bg-bg-elevated hover:text-primary",outline:"border border-base bg-transparent text-heading hover:bg-bg-elevated",destructive:"bg-negative-600 text-on-emphasis hover:bg-negative-700"},size:{default:"h-10 px-4 md:h-9",sm:"h-9 px-3 text-xs md:h-8",icon:"size-10 md:size-9"}},defaultVariants:{variant:"default",size:"default"}}),re=N.forwardRef(({className:e,variant:n,size:i,asChild:o=!1,...u},h)=>{const f=o?z5:"button";return l.jsx(f,{ref:h,className:Da(wZ({variant:n,size:i,className:e})),...u})});re.displayName="Button";const kZ=EN("inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium tracking-wide",{variants:{variant:{neutral:"border-base bg-bg text-neutral",success:"border-positive bg-positive-soft text-positive",warning:"border-caution-500/25 bg-caution-soft text-caution",destructive:"border-negative bg-negative-soft text-negative"}},defaultVariants:{variant:"neutral"}});function KN({className:e,variant:n,...i}){return l.jsx("div",{className:Da(kZ({variant:n}),e),...i})}const SZ=220;function Sk({compact:e=!1,version:n,updateAvailable:i,onDismissUpdate:o}){const u=!e&&n&&n!=="unknown",[h,f]=N.useState(!1),b=!e&&i&&o,v=()=>{f(!0),window.setTimeout(()=>{o?.(),f(!1)},SZ)};return e?l.jsxs(et,{to:"/",className:"brand-lockup brand-lockup-compact","aria-label":"Canonry home",children:[l.jsx("img",{className:"brand-icon",src:"./favicon.svg",alt:"","aria-hidden":"true"}),l.jsx("span",{className:"brand-copy",children:l.jsx("span",{className:"brand-mark",children:"Canonry"})})]}):l.jsxs("div",{className:"brand-lockup brand-lockup-wrapper",children:[l.jsx(et,{to:"/",className:"brand-icon-link","aria-label":"Canonry home",tabIndex:-1,children:l.jsx("img",{className:"brand-icon",src:"./favicon.svg",alt:"","aria-hidden":"true"})}),l.jsxs("div",{className:"brand-copy",children:[l.jsx(et,{to:"/",className:"brand-mark",children:"Canonry"}),!b&&u?l.jsxs("span",{className:"brand-version",children:["v",n]}):null]}),b?l.jsxs("span",{className:`brand-update-bubble ${h?"brand-update-bubble-closing":""}`,role:"status","aria-live":"polite",children:[l.jsxs("a",{className:"brand-update-bubble-link",href:i.url,target:"_blank",rel:"noopener noreferrer",title:`Open release: ${i.upgradeCommand}`,"aria-label":`New version v${i.latest} available — open release page`,children:[l.jsxs("span",{className:"brand-update-bubble-from",children:["v",i.current]}),l.jsx(jc,{className:"brand-update-bubble-arrow size-3","aria-hidden":"true"}),l.jsxs("span",{className:"brand-update-bubble-to",children:["v",i.latest]})]}),l.jsx("button",{type:"button",className:"brand-update-bubble-dismiss",onClick:v,"aria-label":`Dismiss update notification for v${i.latest}`,children:l.jsx(Lr,{className:"size-3","aria-hidden":"true"})})]}):null]})}function jZ({provider:e}){const n={gemini:"border-blue-800/50 bg-blue-950/40 text-blue-300",openai:"border-green-800/50 bg-green-950/40 text-green-300",claude:"border-amber-800/50 bg-amber-950/40 text-amber-300",perplexity:"border-teal-800/50 bg-teal-950/40 text-teal-300",muse:"border-indigo-800/50 bg-indigo-950/40 text-indigo-300",local:"border-purple-800/50 bg-purple-950/40 text-purple-300"},o=Object.hasOwn(n,e)?`provider-badge--${e} ${n[e]}`:"border-zinc-700 bg-zinc-800 text-zinc-300";return l.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide ${o}`,children:e})}function vn({tone:e,children:n,...i}){const o=e==="positive"?"success":e==="caution"?"warning":e==="negative"?"destructive":"neutral";return l.jsx(KN,{variant:o,...i,children:n})}function A1({status:e}){return l.jsx(vn,{tone:NN(e),children:wH(e)})}const S0=cS,AZ=oS,HN=N.forwardRef(({className:e,...n},i)=>l.jsx(q0,{ref:i,className:Da("fixed inset-0 z-50 bg-overlay-scrim/70 backdrop-blur-sm",e),...n}));HN.displayName=q0.displayName;const NZ=400,CZ=1200,_Z=720,om=N.forwardRef(({className:e,children:n,...i},o)=>{const[u,h]=N.useState(_Z),f=N.useRef(!1),b=N.useRef(0),v=N.useRef(0),x=N.useCallback(C=>{f.current=!0,b.current=C.clientX,v.current=u,C.target.setPointerCapture(C.pointerId),C.preventDefault()},[u]),k=N.useCallback(C=>{if(!f.current)return;const _=b.current-C.clientX,z=Math.min(CZ,Math.max(NZ,v.current+_));h(z)},[]),S=N.useCallback(()=>{f.current=!1},[]);return l.jsxs(AZ,{children:[l.jsx(HN,{}),l.jsxs(M0,{ref:o,className:Da("fixed z-50 flex flex-col bg-bg px-5 py-4 shadow-2xl overflow-hidden","max-md:inset-x-0 max-md:bottom-0 max-md:top-auto max-md:max-h-[88vh] max-md:rounded-t-2xl max-md:border-t","md:inset-y-0 md:right-0 md:h-full md:border-l","border-base",e),style:{width:`min(${u}px, 100vw)`},...i,children:[l.jsx("div",{className:"absolute inset-y-0 left-0 w-1.5 cursor-col-resize hover:bg-mono-700/50 active:bg-mono-600/50 transition-colors max-md:hidden",onPointerDown:x,onPointerMove:k,onPointerUp:S}),n,l.jsxs(rS,{className:"absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-muted transition hover:bg-bg-elevated hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",children:[l.jsx(Lr,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});om.displayName=M0.displayName;const j0=({className:e,...n})=>l.jsx("div",{className:Da("flex flex-col gap-1.5 pr-10",e),...n}),rm=N.forwardRef(({className:e,...n},i)=>l.jsx(B0,{ref:i,className:Da("text-lg font-medium text-primary",e),...n}));rm.displayName=B0.displayName;const lm=N.forwardRef(({className:e,...n},i)=>l.jsx(lS,{ref:i,className:Da("text-sm text-muted",e),...n}));lm.displayName=lS.displayName;function Sd({title:e,subtitle:n,children:i,open:o,onClose:u}){return l.jsx(S0,{open:o,onOpenChange:h=>h?void 0:u(),children:l.jsxs(om,{children:[l.jsxs(j0,{className:"drawer-head",children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),l.jsx(rm,{id:"drawer-title",children:e}),l.jsx(lm,{className:"sr-only",children:n})]}),l.jsx("div",{className:"drawer-body",children:i})]})})}function la({text:e,placement:n="top"}){const[i,o]=N.useState(null),u=N.useRef(null),h=N.useRef(null),f=N.useRef(!1),b=N.useCallback(()=>{if(!u.current)return;const k=u.current.getBoundingClientRect(),S=k.left+k.width/2,C=Math.min(224,window.innerWidth-16)/2;o({top:n==="bottom"?k.bottom:k.top,left:n==="bottom"?Math.max(C+8,Math.min(S,window.innerWidth-C-8)):S})},[n]);N.useLayoutEffect(()=>{if(n!=="bottom"||!i||!h.current)return;const k=h.current.getBoundingClientRect().bottom-window.innerHeight+8;if(k<=0)return;const S=Math.max(0,i.top-k);S!==i.top&&o({...i,top:S})},[n,i]);const v=N.useCallback(()=>o(null),[]),x=N.useCallback(()=>{i===null?b():v()},[i,b,v]);return l.jsxs("span",{className:"info-tooltip-wrapper",onMouseEnter:b,onMouseLeave:v,children:[l.jsx("button",{ref:u,type:"button",className:"info-tooltip-trigger","aria-label":e,"aria-expanded":i!==null,onFocus:b,onBlur:v,onPointerDown:()=>{f.current=i!==null&&u.current?.ownerDocument.activeElement===u.current},onClick:k=>{k.detail===0?x():f.current?v():b()},onKeyDown:k=>{k.key==="Escape"&&v()},children:l.jsxs("svg",{className:"info-tooltip-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[l.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M8 7v4M8 5.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),i!==null&&N5.createPortal(l.jsx("span",{ref:h,"aria-hidden":"true",style:{position:"fixed",top:i.top,left:i.left,transform:n==="bottom"?"translateX(-50%) translateY(8px)":"translateX(-50%) translateY(calc(-100% - 8px))",zIndex:9999,pointerEvents:"none",width:n==="bottom"?"min(14rem, calc(100vw - 1rem))":"14rem",padding:"0.5rem 0.75rem",fontSize:n==="bottom"?"13px":"11px",fontWeight:400,textTransform:"none",letterSpacing:"normal",lineHeight:n==="bottom"?"18px":"1rem",color:"var(--color-neutral-text)",backgroundColor:"var(--color-bg-elevated)",border:"1px solid color-mix(in oklab, var(--color-border-strong) 60%, transparent)",borderRadius:"0.5rem",boxShadow:"0 10px 15px -3px var(--color-shadow-tooltip), 0 4px 6px -4px var(--color-shadow-tooltip)"},children:e}),document.body)]})}function TZ(e){const n=(e??"").trim();return n&&(n.startsWith("/")||/^https?:\/\//i.test(n)||/^mailto:/i.test(n))?n:null}function A0({url:e,title:n}){const i=TZ(e),o=i&&/^https?:\/\//i.test(i)?i:null;return l.jsxs("span",{className:"block min-w-0 text-sm leading-6 [overflow-wrap:anywhere]",children:[n&&n!==e?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"mb-1 block font-medium text-heading",children:n})," "]}):null,o?l.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-link underline underline-offset-2 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",children:e}):l.jsx("span",{className:"text-secondary",children:e})]})}function EZ(e){return[...e.mentionedCompetitorTerms??(e.mentionedCompetitorDomains??[]).flatMap(i=>{const o=ig(i);return o.length>=4?[o]:[]}),...e.recommendedCompetitors??[]].filter(i=>i.trim().length>2)}const RZ=/[\s\-_]+/;function DZ(e){const n=e.split(RZ).filter(Boolean);return n.length===0?null:n.map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("[\\s\\-_]*")}function jk(e,n){const i=zZ(n),o=e.split(/(\*\*[^*]+\*\*)/).filter(Boolean).map(x=>x.startsWith("**")&&x.endsWith("**")?{type:"bold",value:x.slice(2,-2)}:{type:"text",value:x}),u=i.flatMap(x=>x.terms).filter(x=>x.trim().length>1);if(u.length===0)return o.map((x,k)=>x.type==="bold"?kr.createElement("strong",{key:`b-${k}`,className:"text-strong font-semibold"},x.value):x.value).filter(Boolean);const f=[...u].sort((x,k)=>k.length-x.length).map(DZ).filter(x=>!!x);if(f.length===0)return o.map((x,k)=>x.type==="bold"?kr.createElement("strong",{key:`b-${k}`,className:"text-strong font-semibold"},x.value):x.value).filter(Boolean);const b=new RegExp(`(${f.join("|")})`,"gi"),v=new Map;for(const x of i)for(const k of x.terms){const S=Ga(k);S&&!v.has(S)&&v.set(S,x.className)}return o.flatMap((x,k)=>x.value.split(b).map((C,_)=>{if(!C)return null;if(_%2===1){const q=v.get(Ga(C))??"answer-highlight";return x.type==="bold"?kr.createElement("mark",{key:`hl-${k}-${_}`,className:q},kr.createElement("strong",{className:"text-strong font-semibold"},C)):kr.createElement("mark",{key:`hl-${k}-${_}`,className:q},C)}return x.type==="bold"?kr.createElement("strong",{key:`b-${k}-${_}`,className:"text-strong font-semibold"},C):C})).filter(Boolean)}function zZ(e){return e.length===0?[]:typeof e[0]=="string"?[{terms:e,className:"answer-highlight"}]:e}function qf(e,n){const i=e.mentionedCompetitorDomains!==void 0?e:n,o=i?.mentionedCompetitorTerms;return{citedCompetitorDomains:[...e.citedCompetitorDomains??n?.citedCompetitorDomains??[]],mentionedCompetitorDomains:[...i?.mentionedCompetitorDomains??[]],...o!==void 0?{mentionedCompetitorTerms:[...o]}:{}}}function Mf(e,n){switch(e){case"new":return"First observation";case"emerging":return"First mention";case"lost":return"Lost since last run";default:return n==="mentioned"||n==="visible"?"Mentioned in latest run":n==="pending"?"Awaiting first run":"Not mentioned in latest run"}}function IZ({evidence:e,project:n,onClose:i}){const[o,u]=N.useState(!1),[h,f]=N.useState("mentions"),[b,v]=N.useState(-1),[x,k]=N.useState(null),[S,C]=N.useState(!1),[_,z]=N.useState({}),q=wj(n.project),T=new Set(q.map(Vd)),V=e.runHistory,Y=V.length>1,[M,U]=N.useState(null),Z=N.useRef(!1);N.useEffect(()=>{if(Z.current||e.answerSnippet&&(e.visibilityState!=null||e.answerMentioned!=null))return;const de=V.at(-1);de&&(Z.current=!0,g0(de.runId).then(ce=>{const F=ce.snapshots?.find(pe=>pe.query===e.query&&pe.provider===e.provider);F&&U({citationState:F.citationState,answerMentioned:F.answerMentioned,visibilityState:F.visibilityState,visibilityTransition:de.visibilityTransition,provider:F.provider,model:F.model??e.model,answerSnippet:F.answerText??e.answerSnippet,citedDomains:F.citedDomains??e.citedDomains,...qf(F,e),recommendedCompetitors:F.recommendedCompetitors??e.recommendedCompetitors??[],matchedTerms:F.matchedTerms??e.matchedTerms??[],groundingSources:F.groundingSources??e.groundingSources,searchQueries:F.searchQueries,evidenceUrls:F.citedUrls??[],changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary})}).catch(()=>{}))},[e,V]);const te=b>=0&&x!==null,B=te?x:M||{citationState:e.citationState,answerMentioned:e.answerMentioned,visibilityState:e.visibilityState,visibilityTransition:V.at(-1)?.visibilityTransition,provider:e.provider,model:e.model,answerSnippet:e.answerSnippet,citedDomains:e.citedDomains,...qf(e),recommendedCompetitors:e.recommendedCompetitors??[],matchedTerms:e.matchedTerms??[],groundingSources:e.groundingSources,searchQueries:e.searchQueries??[],evidenceUrls:e.evidenceUrls,changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary},X=B.visibilityState==="pending"||B.citationState==="pending",le=X?!1:B.visibilityState!=null?B.visibilityState==="visible":B.answerMentioned!=null?B.answerMentioned:B.citationState===yc.cited||B.citationState==="emerging",Je=B.answerMentioned!=null||B.visibilityState!=null||B.mentionedCompetitorDomains.length>0||B.recommendedCompetitors.length>0,nt=B.citedDomains.length>0||B.citedCompetitorDomains.length>0||B.groundingSources.length>0||B.evidenceUrls.length>0,$e=n.project.displayName||n.project.name,Pe=[...q.map(Vd),$e,$e.split(" ").slice(0,2).join(" "),...B.matchedTerms].filter(de=>de.trim().length>2),Se=EZ(B),Ue=[{terms:Pe,className:"answer-highlight-brand"},...Se.length>0?[{terms:Se,className:"answer-highlight-competitor"}]:[]],P=X?"pending":B.visibilityTransition==="lost"?"lost":le?"mentioned":"not-mentioned",J=N.useRef(0),be=N.useCallback(async de=>{const ce=++J.current;if(de===-1||de===V.length-1){v(-1),k(null),u(!1);return}v(de),u(!1);const F=V[de],pe=`${F.runId}::${e.query}::${e.provider}`;if(_[pe]){k(_[pe]);return}C(!0);try{const Oe=await g0(F.runId);if(ce!==J.current)return;const Ae=Oe.snapshots?.find(Ve=>Ve.query===e.query&&Ve.provider===e.provider)??Oe.snapshots?.find(Ve=>Ve.query===e.query),st=Ae?{citationState:Ae.citationState,answerMentioned:Ae.answerMentioned,visibilityState:Ae.visibilityState,visibilityTransition:F.visibilityTransition,provider:Ae.provider,model:Ae.model??null,answerSnippet:Ae.answerText??"",citedDomains:Ae.citedDomains,...qf(Ae),recommendedCompetitors:Ae.recommendedCompetitors??[],matchedTerms:Ae.matchedTerms??[],groundingSources:Ae.groundingSources,searchQueries:Ae.searchQueries,evidenceUrls:Ae.citedUrls??[],changeLabel:Mf(F.mentionTransition??F.visibilityTransition,F.mentionState??F.visibilityState),summary:""}:{citationState:F.citationState,answerMentioned:F.answerMentioned,visibilityState:F.visibilityState,visibilityTransition:F.visibilityTransition,provider:e.provider,model:F.model??null,answerSnippet:"",citedDomains:[],citedCompetitorDomains:[],mentionedCompetitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],searchQueries:[],evidenceUrls:[],changeLabel:Mf(F.mentionTransition??F.visibilityTransition,F.mentionState??F.visibilityState),summary:"Snapshot data not available for this run."};z(Ve=>({...Ve,[pe]:st})),k(st)}catch{if(ce!==J.current)return;k({citationState:F.citationState,answerMentioned:F.answerMentioned,visibilityState:F.visibilityState,visibilityTransition:F.visibilityTransition,provider:e.provider,model:F.model??null,answerSnippet:"",citedDomains:[],citedCompetitorDomains:[],mentionedCompetitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],searchQueries:[],evidenceUrls:[],changeLabel:Mf(F.mentionTransition??F.visibilityTransition,F.mentionState??F.visibilityState),summary:"Failed to load historical run data."})}finally{ce===J.current&&C(!1)}},[V,e.query,e.provider,_]),W=(te||e.historyScope!=="provider")&&B.model?`${B.provider} (${B.model}) · ${B.changeLabel.toLowerCase()}`:`${B.provider} · ${B.changeLabel.toLowerCase()}`,_e=!te&&e.historyScope==="provider"?[e.model?`Current model: ${e.model}`:null,e.modelsSeen&&e.modelsSeen.length>1?`History spans ${e.modelsSeen.length} models`:null].filter(Boolean).join(" · "):"",qe=le?{label:"Mentioned in answer",title:"Your brand or domain is mentioned in this answer",meta:W}:B.visibilityTransition==="lost"?{label:"Mention lost",title:"Your brand no longer appears in this answer",meta:W}:X?{label:"Pending",title:"Awaiting first run",meta:"No provider data yet"}:{label:"Not mentioned in answer",title:"Your brand or domain was not mentioned in this answer",meta:W},ve=()=>{if(!B.answerSnippet)return null;const de=B.answerSnippet.split(`
|
|
58
|
+
`),ce=[];let F=[],pe=0;const Oe=()=>{if(F.length===0)return;const Ae=F.join(" ").trim();Ae&&ce.push(l.jsx("p",{className:ce.length>0?"mt-2.5":"",children:jk(Ae,Ue)},pe++)),F=[]};for(const Ae of de){const st=Ae.trim();if(/^[-\u2013\u2014]{3,}$/.test(st)){Oe(),ce.push(l.jsx("hr",{className:"border-default my-3"},pe++));continue}const Ve=st.match(/^(#{1,3})\s+(\S.*)$/);if(Ve){Oe();const At=Ve[1].length,Ke=Ve[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s]+/u,"").trim()||Ve[2],me=At===1?"text-[13px] font-semibold text-heading mt-4 mb-1":At===2?"text-xs font-semibold text-strong mt-3 mb-0.5":"text-xs font-medium text-neutral mt-2";ce.push(l.jsx("p",{className:me,children:jk(Ke,Ue)},pe++));continue}if(st===""){Oe();continue}F.push(st)}return Oe(),ce};return l.jsx(cS,{open:!0,onOpenChange:de=>{de||i()},children:l.jsxs(oS,{children:[l.jsx(q0,{className:"fixed inset-0 z-50 bg-overlay-scrim/80 backdrop-blur-sm"}),l.jsxs(M0,{className:"evidence-modal","aria-describedby":void 0,children:[l.jsxs("div",{className:"evidence-modal-header",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("p",{className:"eyebrow eyebrow-soft",children:[n.project.name," ","·"," ",B.provider||"All providers"]}),l.jsx(B0,{className:"text-lg font-semibold text-primary truncate",children:e.query})]}),l.jsxs(rS,{className:"inline-flex size-8 items-center justify-center rounded-md text-muted transition hover:bg-mono-800 hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400 shrink-0",children:[l.jsx(Lr,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]}),Y&&l.jsxs("div",{className:"evidence-modal-timeline",children:[l.jsx("p",{className:"drawer-section-label mb-1.5",children:"Run history"}),l.jsx("div",{className:"flex items-center gap-1 overflow-x-auto pb-1",children:V.map((de,ce)=>{const F=b===-1&&ce===V.length-1||b===ce,pe=de.visibilityState??(de.answerMentioned?"visible":"not-visible"),Oe=de.visibilityTransition??pe,Ae=pe==="visible"?"bg-positive-400":Oe==="emerging"?"bg-caution-400":Oe==="lost"?"bg-negative-400":"bg-mono-600",Ve=new Date(de.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"}),At=!!(de.model&&ce>0&&V[ce-1]?.model&&V[ce-1].model!==de.model);return l.jsxs("button",{type:"button",className:`evidence-run-dot ${F?"evidence-run-dot--selected":""}`,onClick:()=>{be(ce===V.length-1?-1:ce)},"aria-label":[`Run ${Ve}: ${pe}`,de.model?`model ${de.model}`:null,At?"model changed":null].filter(Boolean).join(" — "),"aria-pressed":F,children:[l.jsx("span",{className:`size-2 rounded-full ${Ae} ${At?"ring-1 ring-caution-300/80 ring-offset-2 ring-offset-bg":""}`,"aria-hidden":"true"}),l.jsx("span",{className:"text-[10px] text-muted",children:Ve})]},ce)})}),b>=0&&b<V.length&&l.jsxs("p",{className:"text-[11px] text-muted mt-1",children:["Viewing run from ",new Date(V[b].createdAt).toLocaleString()," ","—"," ",l.jsx("span",{className:"capitalize",children:V[b].visibilityState??(V[b].answerMentioned?"visible":"not-visible")}),l.jsxs("button",{type:"button",className:"text-secondary hover:text-strong ml-2",onClick:()=>{be(-1)},children:["←"," Back to latest"]})]}),!te&&(e.modelTransitions?.length??0)>0&&l.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:e.modelTransitions.map(de=>l.jsx("span",{className:"inline-flex items-center rounded-full border border-caution-400/30 bg-caution-400/10 px-2 py-1 text-[10px] text-caution-100",children:`${de.fromModel??"unknown"} -> ${de.toModel??"unknown"} on ${new Date(de.createdAt).toLocaleDateString()}`},`${de.runId}:${de.toModel??"unknown"}`))})]}),l.jsxs("div",{className:"evidence-modal-body",children:[S&&l.jsxs("div",{className:"md:col-span-2 flex items-center justify-center py-12 text-muted text-sm",children:["Loading historical run data","…"]}),!S&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"evidence-modal-main",children:[l.jsxs("div",{className:`evidence-position-hero evidence-position-hero--${P}`,children:[l.jsx("p",{className:`evidence-position-label evidence-position-label--${P}`,children:qe.label}),l.jsx("p",{className:`evidence-position-title evidence-position-title--${P}`,children:qe.title}),l.jsx("p",{className:"evidence-position-meta",children:qe.meta}),_e&&l.jsx("p",{className:"mt-1 text-[11px] text-muted",children:_e})]}),B.answerSnippet&&l.jsxs("div",{children:[l.jsx("p",{className:"drawer-section-label",children:"What the AI said"}),l.jsx("div",{className:`answer-snippet-block ${o?"evidence-answer-expanded":"evidence-answer-collapsed"}`,children:ve()}),B.answerSnippet.length>280&&l.jsx("button",{type:"button",className:"mt-1.5 text-xs text-muted hover:text-neutral transition-colors",onClick:()=>u(!o),children:o?"↑ Collapse":"↓ Show full answer"})]}),!B.answerSnippet&&!S&&l.jsx("div",{className:"rounded-lg border border-subtle bg-surface-subtle px-4 py-8 text-center text-faint text-sm",children:"No answer text recorded for this run"}),B.searchQueries.length>0&&l.jsxs("div",{children:[l.jsxs("div",{className:"drawer-section-label flex items-center",children:[l.jsx("span",{children:"Web searches the model ran"}),l.jsx(la,{text:"The search queries this AI model issued while researching your prompt. They reveal how the model reformulated your query — the phrasings worth optimizing your content for. Distinct from grounding sources (what it found) and citations (what it linked)."})]}),l.jsx("ul",{className:"grid gap-1",children:B.searchQueries.map((de,ce)=>l.jsxs("li",{className:"flex items-start gap-2 text-sm text-neutral",children:[l.jsx(L0,{className:"size-3.5 mt-0.5 shrink-0 text-faint","aria-hidden":"true"}),l.jsx("span",{className:"break-words",children:de})]},`${ce}-${de}`))})]}),!te&&e.relatedTechnicalSignals.length>0&&l.jsxs("div",{children:[l.jsx("p",{className:"drawer-section-label",children:le?"Why you're visible":"What to fix"}),l.jsx("div",{className:"action-items-list",children:e.relatedTechnicalSignals.map((de,ce)=>l.jsxs("div",{className:"action-item",children:[l.jsx("svg",{className:`action-item-icon ${le?"text-positive-400":"text-caution-400"}`,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:le?l.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}):l.jsxs(l.Fragment,{children:[l.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M8 5v3.5M8 10.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),l.jsx("span",{className:"action-item-text",children:de})]},ce))})]}),B.summary&&l.jsx("p",{className:"text-xs text-faint border-t border-subtle pt-3 mt-1",children:B.summary})]}),l.jsxs("div",{className:"evidence-modal-sidebar",children:[(Je||nt)&&l.jsxs("div",{className:"sidebar-tabs",children:[l.jsx("button",{className:`sidebar-tab ${h==="mentions"?"sidebar-tab--active":""}`,onClick:()=>f("mentions"),type:"button",title:"Canonry's answer-level visibility assessment and any company names extracted from the answer text.",children:"Mentions"}),l.jsx("button",{className:`sidebar-tab ${h==="sources"?"sidebar-tab--active":""}`,onClick:()=>f("sources"),type:"button",title:"Grounding links the model used to build the answer. These are supporting sources, not the primary visibility signal.",children:"Sources"})]}),h==="mentions"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsxs("div",{className:"drawer-section-label flex items-center",children:[l.jsx("span",{children:"Mention in answer"}),l.jsx(la,{text:"Canonry scans the AI answer for your owned domains and project name. This is independent from grounding or citation sources."})]}),l.jsxs("div",{className:`mention-status mention-status--${le?"mentioned":"not-mentioned"}`,children:[l.jsx("span",{className:"mention-status-icon",children:X?"…":le?"✓":"—"}),l.jsx("span",{className:"mention-status-label",children:X?"Pending":le?"Mentioned":"Not mentioned"})]}),B.matchedTerms.length>0&&l.jsxs("div",{className:"mt-2",children:[l.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted mb-1.5",children:"Matched in answer"}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:B.matchedTerms.map(de=>l.jsx("span",{className:"mention-chip mention-chip--brand",children:de},de))})]}),!X&&!le&&B.matchedTerms.length===0&&l.jsxs("div",{className:"mt-2",children:[l.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted mb-1.5",children:"Searched for"}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:Pe.map(de=>l.jsx("span",{className:"mention-chip mention-chip--muted",children:de},de))}),l.jsx("p",{className:"text-[11px] text-faint mt-1.5",children:"None of these appear in the answer text."})]})]}),(B.recommendedCompetitors.length>0||B.mentionedCompetitorDomains.length>0)&&l.jsxs("div",{children:[l.jsxs("div",{className:"drawer-section-label flex items-center",children:[l.jsx("span",{children:"Competitors in answer"}),l.jsx(la,{text:"Competitors detected in the answer text. Includes tracked competitor brands and names extracted by Canonry; source-link competitors stay in the Sources tab."})]}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:(()=>{const de=B.mentionedCompetitorDomains.map(pe=>pe.replace(/^www\./,"")),ce=new Set(de.map(pe=>Ga(pe.replace(/\.[^.]+$/,""))));return[...B.recommendedCompetitors.filter(pe=>!ce.has(Ga(pe))),...de].map(pe=>l.jsx("span",{className:"mention-chip mention-chip--competitor",children:pe},pe))})()})]})]}),h==="sources"&&l.jsxs(l.Fragment,{children:[B.citedDomains.length>0&&l.jsxs("div",{children:[l.jsxs("div",{className:"drawer-section-label flex items-center",children:[l.jsx("span",{children:"Domains from source links"}),l.jsx(la,{text:"These domains were extracted from grounding or citation URLs. They are supporting-source metadata, not proof that the answer text mentioned them."})]}),l.jsx("div",{className:"citation-leaderboard",children:B.citedDomains.map((de,ce)=>{const F=de.toLowerCase().replace(/^www\./,""),pe=T.has(F),Oe=!pe&&B.citedCompetitorDomains.some(st=>st.toLowerCase().replace(/^www\./,"")===F),Ae=pe?"you":Oe?"competitor":"other";return l.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${Ae}`,children:[l.jsxs("span",{className:"citation-leaderboard-rank",children:["#",ce+1]}),l.jsx("span",{className:"citation-leaderboard-domain",children:de}),pe&&l.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),Oe&&l.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},de)})})]}),B.groundingSources.length>0&&l.jsxs("div",{children:[l.jsxs("div",{className:"drawer-section-label flex items-center",children:[l.jsxs("span",{children:["Grounding source links (",B.groundingSources.length,")"]}),l.jsx(la,{text:"Links the model used as grounding or supporting context while producing the answer. These are not the same thing as answer visibility."})]}),l.jsx("ul",{className:"grid min-w-0 gap-3",children:B.groundingSources.map((de,ce)=>l.jsx("li",{className:"min-w-0",children:l.jsx(A0,{url:de.uri,title:de.title})},ce))})]}),B.evidenceUrls.length>0&&l.jsxs("div",{children:[l.jsx("p",{className:"drawer-section-label",children:"Evidence URLs"}),l.jsx("ul",{className:"grid min-w-0 gap-3",children:B.evidenceUrls.map(de=>l.jsx("li",{className:"min-w-0",children:l.jsx(A0,{url:de})},de))})]}),B.citedDomains.length===0&&B.groundingSources.length===0&&B.evidenceUrls.length===0&&l.jsxs("div",{className:"flex items-center justify-center h-24 text-faint text-sm",children:["No source data ",te?"for this run":"yet"]})]}),!Je&&!nt&&l.jsxs("div",{className:"flex items-center justify-center h-24 text-faint text-sm",children:["No answer visibility data ",te?"for this run":"yet"]})]})]})]})]})]})})}function OZ(e){const n=e.match(/^\/projects\/([^/]+)/);if(!n)return null;try{return decodeURIComponent(n[1])}catch{return n[1]}}function PZ(e,n){return e?n?.projects.find(o=>o.project.name===e||o.project.id===e)?.project.name??e:null}function qZ(e,n){return PZ(OZ(e),n)}function Ua(e){const n=new Date("2026-02-20");return e.map((i,o)=>({runId:`run_mock_${o+1}`,citationState:i,createdAt:new Date(n.getTime()+o*2*24*60*60*1e3).toISOString()}))}const Bf=[{id:"project_citypoint",name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",ownedDomains:[],aliases:[],qualifiedAliases:[],country:"US",language:"en",tags:["local intent","priority"],labels:{},providers:[],providerModels:{},providerDispatchModes:{},measurement:cf,locations:[],defaultLocation:null,autoExtractBacklinks:!1,siteAuditMaxPages:null,configSource:"cli",configRevision:1},{id:"project_harbor",name:"Harbor Legal Group",canonicalDomain:"harborlegal.com",ownedDomains:[],aliases:[],qualifiedAliases:[],country:"US",language:"en",tags:["lead gen"],labels:{},providers:[],providerModels:{},providerDispatchModes:{},measurement:cf,locations:[],defaultLocation:null,autoExtractBacklinks:!1,siteAuditMaxPages:null,configSource:"cli",configRevision:1},{id:"project_northstar",name:"Northstar Orthopedics",canonicalDomain:"northstarortho.com",ownedDomains:[],aliases:[],qualifiedAliases:[],country:"US",language:"en",tags:["multi-location"],labels:{},providers:[],providerModels:{},providerDispatchModes:{},measurement:cf,locations:[],defaultLocation:null,autoExtractBacklinks:!1,siteAuditMaxPages:null,configSource:"cli",configRevision:1}];function Vm(e){return{id:e.id,projectId:e.projectId,projectName:e.projectName,kind:e.kind,kindLabel:e.kindLabel,status:e.status,trigger:e.trigger??"manual",createdAt:e.createdAt,startedAt:e.startedAt,duration:e.duration,statusDetail:e.statusDetail,summary:e.summary,triggerLabel:e.triggerLabel}}const Ak=Vm({id:"run_citypoint_visibility_20260308",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"completed",createdAt:"2026-03-08T12:15:00.000Z",startedAt:"Mar 8, 12:15 PM",duration:"6 minutes 12 seconds",statusDetail:"18 tracked queries checked; 3 citation losses detected on emergency-intent prompts.",summary:"Citation losses on emergency-intent prompts",triggerLabel:"Scheduled"}),MZ=Vm({id:"run_citypoint_queued_20260309",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"queued",createdAt:"2026-03-09T08:05:00.000Z",startedAt:"Mar 9, 8:05 AM",duration:"Waiting",statusDetail:"Ready to enqueue after the next provider rate window clears.",summary:"Queued follow-up after local ranking movement",triggerLabel:"Manual"}),Nk=Vm({id:"run_harbor_visibility_20260308",projectId:"project_harbor",projectName:"Harbor Legal Group",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"completed",createdAt:"2026-03-08T11:05:00.000Z",startedAt:"Mar 8, 11:05 AM",duration:"5 minutes 7 seconds",statusDetail:"12 tracked queries checked; local-intent visibility held steady across branded prompts.",summary:"Branded prompts remain stable",triggerLabel:"Scheduled"}),BZ=Vm({id:"run_northstar_visibility_20260308",projectId:"project_northstar",projectName:"Northstar Orthopedics",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"running",createdAt:"2026-03-08T13:40:00.000Z",startedAt:"Mar 8, 1:40 PM",duration:"Running",statusDetail:"Provider responses still in flight for 9 multi-location prompts.",summary:"Mid-run on treatment-location prompts",triggerLabel:"Manual"}),LZ=[{id:"evidence_citypoint_emergency_gemini",query:"emergency dentist brooklyn",provider:"gemini",model:"gemini-2.5-flash",location:null,citationState:"lost",changeLabel:"Lost since Mar 5",answerSnippet:"For urgent dental care in Brooklyn, Downtown Smiles and Harbor Dental are now cited first for emergency availability and same-day booking.",citedDomains:["downtownsmiles.com","harbordental.com"],evidenceUrls:["https://downtownsmiles.com/emergency-dentist-brooklyn","https://harbordental.com/same-day-emergency-care"],competitorDomains:["downtownsmiles.com","harbordental.com"],groundingSources:[],relatedTechnicalSignals:["FAQ schema missing on the emergency service page","llms.txt not found during latest site audit","Location pages link weakly into the emergency care hub"],summary:"AI answers now cite two competitors while your emergency page is no longer grounded.",runHistory:Ua(["cited","cited","cited","cited","cited","cited","cited","not-cited","not-cited"])},{id:"evidence_citypoint_emergency_openai",query:"emergency dentist brooklyn",provider:"openai",model:"gpt-5.4",location:null,citationState:"cited",changeLabel:"Cited for 6 runs",answerSnippet:"Citypoint Dental is listed as a top emergency dentist in Brooklyn for same-day appointments and walk-in availability.",citedDomains:["citypointdental.com","downtownsmiles.com"],evidenceUrls:["https://citypointdental.com/emergency-dentist-brooklyn"],competitorDomains:["downtownsmiles.com"],groundingSources:[],relatedTechnicalSignals:["Emergency page indexed with structured data"],summary:"OpenAI cites your emergency page consistently alongside one competitor.",runHistory:Ua(["not-cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_emergency_claude",query:"emergency dentist brooklyn",provider:"claude",model:"claude-sonnet-4-6",location:null,citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"Based on the search results, top-rated emergency dental practices in Brooklyn include Downtown Smiles and Harbor Dental.",citedDomains:["downtownsmiles.com","harbordental.com"],evidenceUrls:[],competitorDomains:["downtownsmiles.com","harbordental.com"],groundingSources:[],relatedTechnicalSignals:["FAQ schema missing","llms.txt not found"],summary:"Claude does not cite your domain for this emergency query.",runHistory:Ua(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_invisalign_openai",query:"best invisalign dentist downtown brooklyn",provider:"openai",model:"gpt-5.4",location:null,citationState:"emerging",changeLabel:"First citation in 7 days",answerSnippet:"Citypoint Dental appears as an emerging recommendation for Invisalign in Downtown Brooklyn, supported by recent before-and-after case pages.",citedDomains:["citypointdental.com","clearlineortho.com"],evidenceUrls:["https://citypointdental.com/invisalign-downtown-brooklyn","https://citypointdental.com/case-studies/invisalign-open-bite"],competitorDomains:["clearlineortho.com"],groundingSources:[],relatedTechnicalSignals:["Structured data now present on two case-study pages","Internal links from service pages to case studies improved crawl depth"],summary:"Fresh case-study content is starting to earn citations on Invisalign prompts.",runHistory:Ua(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","cited"])},{id:"evidence_citypoint_invisalign_gemini",query:"best invisalign dentist downtown brooklyn",provider:"gemini",model:"gemini-2.5-flash",location:null,citationState:"cited",changeLabel:"Cited for 8 runs",answerSnippet:"Citypoint Dental in Downtown Brooklyn is highlighted for its Invisalign expertise and patient outcomes.",citedDomains:["citypointdental.com"],evidenceUrls:["https://citypointdental.com/invisalign-downtown-brooklyn"],competitorDomains:[],groundingSources:[],relatedTechnicalSignals:["Case study pages well-indexed"],summary:"Gemini consistently cites your Invisalign page with no competitor overlap.",runHistory:Ua(["cited","cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_invisalign_claude",query:"best invisalign dentist downtown brooklyn",provider:"claude",model:"claude-sonnet-4-6",location:null,citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"For Invisalign in Downtown Brooklyn, Clear Line Ortho and Brooklyn Smiles are frequently recommended for their experienced orthodontists.",citedDomains:["clearlineortho.com","brooklynsmiles.com"],evidenceUrls:[],competitorDomains:["clearlineortho.com"],groundingSources:[],relatedTechnicalSignals:["No before/after schema on case study pages"],summary:"Claude does not surface your Invisalign content despite strong page quality.",runHistory:Ua(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_claude",query:"pediatric dentist brooklyn heights",provider:"claude",model:"claude-sonnet-4-6",location:null,citationState:"not-cited",changeLabel:"No citation across 4 runs",answerSnippet:"Answers cite neighborhood-specific pediatric practices with stronger family-focused FAQ content and clearer insurance details.",citedDomains:["brightkidsdental.com","parkpediatricdental.com"],evidenceUrls:["https://brightkidsdental.com/pediatric-dentist-brooklyn-heights","https://parkpediatricdental.com/insurance"],competitorDomains:["brightkidsdental.com","parkpediatricdental.com"],groundingSources:[],relatedTechnicalSignals:["No dedicated pediatric service page exists for Brooklyn Heights","Insurance content is buried three clicks deep"],summary:"Coverage gap is content-driven, not purely technical.",runHistory:Ua(["not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_gemini",query:"pediatric dentist brooklyn heights",provider:"gemini",model:"gemini-2.5-flash",location:null,citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"For pediatric dentistry in Brooklyn Heights, Bright Kids Dental and Park Pediatric Dental are cited for family-friendly care.",citedDomains:["brightkidsdental.com","parkpediatricdental.com"],evidenceUrls:[],competitorDomains:["brightkidsdental.com","parkpediatricdental.com"],groundingSources:[],relatedTechnicalSignals:["No dedicated pediatric page for Brooklyn Heights"],summary:"Gemini does not surface your domain for pediatric queries in this area.",runHistory:Ua(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_openai",query:"pediatric dentist brooklyn heights",provider:"openai",model:"gpt-5.4",location:null,citationState:"cited",changeLabel:"First citation this month",answerSnippet:"Citypoint Dental is mentioned as offering pediatric services in Brooklyn, though specialized pediatric-only practices are also highlighted.",citedDomains:["citypointdental.com","brightkidsdental.com"],evidenceUrls:["https://citypointdental.com/family-dentistry"],competitorDomains:["brightkidsdental.com"],groundingSources:[],relatedTechnicalSignals:["Family dentistry page recently updated"],summary:"OpenAI recently started citing your family dentistry page for this query.",runHistory:Ua(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}];Bf[0],9/21,8/21,4/21,Bf[1],11/17,6/17,Ua(["cited","cited","cited","cited","cited"]),Bf[2],15/19,4/19,Ua(["not-cited","not-cited","not-cited","cited"]);function UZ(e,n){return e.runs.find(i=>i.id===n)}function VZ(e,n){for(const i of e.projects){const o=i.visibilityEvidence.find(u=>u.id===n);if(o)return{project:i,evidence:o}}}function $Z(e,n,i){if(e){const o=e.visibilityEvidence.find(u=>u.id===i);if(o)return{project:e,evidence:o}}if(n)return VZ(n,i)}const GZ={regression:"negative",gain:"positive",opportunity:"caution","first-citation":"positive","provider-pickup":"positive","persistent-gap":"caution","competitor-gained":"negative","competitor-lost":"neutral","gbp-lodging-gap":"negative","gbp-listing-discrepancy":"negative","gbp-cta-gap":"caution","gbp-description-missing":"caution","gbp-metric-drop":"negative","gbp-keyword-drop":"negative"},KZ={opportunity:"write","persistent-gap":"write","competitor-gained":"write","competitor-lost":"write",regression:"investigate",gain:"monitor","first-citation":"monitor","provider-pickup":"monitor","gbp-lodging-gap":"write","gbp-listing-discrepancy":"write","gbp-cta-gap":"write","gbp-description-missing":"write","gbp-metric-drop":"investigate","gbp-keyword-drop":"investigate"},HZ={regression:"lost",gain:"emerging",opportunity:"not-cited","first-citation":"emerging","provider-pickup":"emerging","persistent-gap":"not-cited","competitor-gained":"cited","competitor-lost":"not-cited","gbp-lodging-gap":"not-cited","gbp-listing-discrepancy":"not-cited","gbp-cta-gap":"not-cited","gbp-description-missing":"not-cited","gbp-metric-drop":"lost","gbp-keyword-drop":"lost"},FZ={regression:"Regression",gain:"Gain",opportunity:"Opportunity","first-citation":"First citation","provider-pickup":"Pickup","persistent-gap":"Gap","competitor-gained":"Competitor","competitor-lost":"Competitor","gbp-lodging-gap":"Lodging gap","gbp-listing-discrepancy":"Listing gap","gbp-cta-gap":"Booking CTA","gbp-description-missing":"Description gap","gbp-metric-drop":"Metric drop","gbp-keyword-drop":"Keyword drop"};function QZ(e){return{id:e.id,tone:GZ[e.type],title:e.title,detail:e.cause?.details??e.cause?.cause??"",actionLabel:e.recommendation?.action??FZ[e.type],actionGroup:KZ[e.type],affectedPhrases:[{query:e.query,evidenceId:"",provider:e.provider,citationState:HZ[e.type]}]}}function ZZ(e){return e.filter(n=>!n.dismissed).map(QZ)}function FN(e){return{id:e.id,name:e.name,displayName:e.displayName,canonicalDomain:e.canonicalDomain,ownedDomains:e.ownedDomains??[],aliases:e.aliases??[],qualifiedAliases:e.qualifiedAliases,country:e.country,language:e.language,tags:e.tags,labels:e.labels,providers:e.providers??[],providerModels:e.providerModels??{},providerDispatchModes:e.providerDispatchModes??{},measurement:e.measurement,locations:e.locations??[],defaultLocation:e.defaultLocation??null,autoExtractBacklinks:e.autoExtractBacklinks??!1,siteAuditMaxPages:e.siteAuditMaxPages??null,configSource:e.configSource,configRevision:e.configRevision,createdAt:e.createdAt,updatedAt:e.updatedAt}}function fo(e,n){return`${e} ${n}${e===1?"":"s"}`}function YZ(e,n){if(!e)return"Waiting";if(!n)return"Running";const i=new Date(n).getTime()-new Date(e).getTime();if(i<1e3)return"under 1 second";const o=Math.floor(i/1e3),u=Math.floor(o/3600),h=Math.floor(o%3600/60),f=o%60;return u>0?h>0?`${fo(u,"hour")} ${fo(h,"minute")}`:fo(u,"hour"):h>0?f>0?`${fo(h,"minute")} ${fo(f,"second")}`:fo(h,"minute"):fo(f,"second")}function QN(e){switch(e){case ze["answer-visibility"]:return"Answer visibility sweep";case ze["gsc-sync"]:return"GSC sync";case ze["inspect-sitemap"]:return"Sitemap inspection";case ze["ga-sync"]:return"GA sync";case ze["traffic-sync"]:return"Traffic sync";case ze["bing-inspect"]:return"Bing URL inspection";case ze["bing-inspect-sitemap"]:return"Bing sitemap inspection";case ze["site-audit"]:return"Site audit";case ze["backlink-extract"]:return"Backlink extract";case ze["aeo-discover-seed"]:return"Discovery (seed phase)";case ze["aeo-discover-probe"]:return"Discovery (probe phase)";case ze["gbp-sync"]:return"Business Profile sync";case ze["ads-sync"]:return"ChatGPT ads sync";case ze["google-ads-sync"]:return"Google Ads sync";case ze["gtm-sync"]:return"Tag Manager sync"}}function XZ(e){switch(e){case ii.manual:return"Manual";case ii.scheduled:return"Scheduled";case ii["config-apply"]:return"Config apply";case ii.probe:return"Spot check";default:return e}}function $m(e,n){return{id:e.id,projectId:e.projectId,projectName:n,kind:e.kind,kindLabel:QN(e.kind),status:e.status,trigger:e.trigger??"manual",location:e.location??null,createdAt:e.createdAt,startedAt:kH(e.startedAt||e.createdAt),duration:YZ(e.startedAt??null,e.finishedAt??null),statusDetail:e.error?ZN(e.error):JZ(e),summary:WZ(e),triggerLabel:XZ(e.trigger)}}function ZN(e){const n=kg(e);return n.length>200?n.slice(0,200)+"…":n}function JZ(e){switch(e.status){case Zt.queued:return"Waiting for execution slot.";case Zt.running:return"Provider queries in progress.";case Zt.completed:return"All queries checked.";case Zt.partial:return"Run completed with some queries skipped.";case Zt.failed:return e.error?ZN(e.error):"Run failed.";case Zt.cancelled:return"Run was cancelled.";default:return""}}function WZ(e){const n=QN(e.kind);switch(e.status){case Zt.queued:return`${n} queued`;case Zt.running:return`${n} in progress`;case Zt.completed:return`${n} completed`;case Zt.partial:return`${n} partially completed`;case Zt.failed:return`${n} failed`;case Zt.cancelled:return`${n} cancelled`;default:return e.status}}function eY(e,n,i,o,u){const h=[];let f=0;const b=new Set;if(i.length>0){const v=i.flatMap(T=>T.snapshots??[]),x=new Map;for(const T of v)if(T.query){const V=`${T.query}::${T.provider}::${T.location??""}`;x.set(V,T)}const k=new Set(v.map(T=>T.location??null));k.size===0&&k.add(null);const S=new Set(v.map(T=>T.provider)),C=new Set(n.flatMap(T=>Object.keys(T.providerRuns??{}))),_=[...new Set([...S,...C])].sort(),z=_.length>0?_:["gemini"],q=new Set(v.flatMap(T=>T.query?[T.query]:[]));for(const T of n){if(T.runs.length===0&&!q.has(T.query))continue;b.add(T.query);const V=T.runs.at(-1),Y=V?.transition??"not-cited";for(const M of z){const U=[...k].filter(B=>x.has(`${T.query}::${M}::${B??""}`)),Z=(T.providerRuns?.[M]?.length??0)>0,te=U.length>0?U:Z?[null]:[];for(const B of te){const X=B??"",le=x.get(`${T.query}::${M}::${X}`),Je=le?.model??null,nt=Je?`${M}:${Je}`:null,$e=T.providerRuns?.[M],Pe=nt?T.modelRuns?.[nt]:void 0,Se=Kt=>Kt?.filter(Me=>(Me.location??null)===B),Ue=U.length>0?Se($e):$e,P=U.length>0?Se(Pe):Pe,J=(Ue?.length?Ue:null)??(P?.length?P:null),be=Ue?.length?"provider":P?.length?"model":"query",je=le&&J?J.findIndex(Kt=>Kt.runId===le.runId):-1,W=le?je>=0?J.slice(0,je+1):null:J,_e=le!==void 0&&W===null,qe=W?W.at(-1).transition:_e?le.citationState===yc.cited?"cited":"not-cited":Y,ve=W?W.at(-1).visibilityTransition??(W.at(-1).visibilityState==="visible"?"visible":"not-visible"):_e?le.visibilityState==="visible"?"visible":"not-visible":V?.visibilityTransition??(V?.visibilityState==="visible"?"visible":"not-visible"),de=J?.at(-1)?.citationState,ce=J?.at(-1)?.visibilityState,F=le?qe==="lost"?"lost":qe==="emerging"?"emerging":le.citationState===yc.cited?"cited":"not-cited":de===yc.cited?"cited":"not-cited",pe=le?.visibilityState??(ce==="visible"?"visible":ce==="pending"?"pending":"not-visible"),Oe=W?Ck(W):_e?1:Ck(T.runs),Ae=W?_k(W):_e?1:_k(T.runs),st=tY(T,M),Ve=(J??T.runs).map(Kt=>({runId:Kt.runId,citationState:Kt.citationState,createdAt:Kt.createdAt,model:st.get(Kt.runId)??null,answerMentioned:Kt.answerMentioned,visibilityState:Kt.visibilityState,visibilityTransition:Kt.visibilityTransition,mentionState:Kt.mentionState,mentionTransition:Kt.mentionTransition})),At=nY(Ve),Ke=be==="provider"&&At.length<=1?"model":be,me=aY(Ve),at=le?.citedCompetitorDomains??[],zt=le?.mentionedCompetitorDomains??[],Pn=[...new Set([...at,...zt,...le?.competitorOverlap??[]])];h.push({id:`evidence_${e}_${f++}`,query:T.query,queryId:le?.queryId??null,sourceSnapshotId:le?.id??null,sourceRunId:le?.runId??null,queryClass:u?.classify(T.query)??null,provider:le?.provider??M,model:le?.model??null,location:le?.location??B,citationState:F,answerMentioned:le?.answerMentioned,visibilityState:pe,visibilityChangeLabel:Tk(ve,Ae,{positive:"visible",negative:"not visible",first:"first visibility"}),changeLabel:Tk(qe,Oe),answerSnippet:le?.answerText??"",citedDomains:le?.citedDomains??[],evidenceUrls:le?.citedUrls??[],citedCompetitorDomains:at,mentionedCompetitorDomains:zt,mentionedCompetitorTerms:le?.mentionedCompetitorTerms??[],competitorDomains:Pn,recommendedCompetitors:le?.recommendedCompetitors??[],matchedTerms:le?.matchedTerms??[],relatedTechnicalSignals:[],groundingSources:le?.groundingSources??[],searchQueries:le?.searchQueries??[],summary:iY(pe,ve,T.query),runHistory:Ve,historyScope:Ke,modelsSeen:At,modelTransitions:me})}}}}for(const v of o)b.has(v.query)||h.push({id:`evidence_${e}_${f++}`,query:v.query,queryId:v.id,sourceSnapshotId:null,sourceRunId:null,queryClass:u?.classify(v.query)??null,provider:"",model:null,location:null,citationState:"pending",visibilityState:"pending",visibilityChangeLabel:"Awaiting first run",changeLabel:"Awaiting first run",answerSnippet:"",citedDomains:[],evidenceUrls:[],citedCompetitorDomains:[],mentionedCompetitorDomains:[],mentionedCompetitorTerms:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],relatedTechnicalSignals:[],groundingSources:[],searchQueries:[],summary:`"${v.query}" has been added but no visibility run has been triggered yet.`,runHistory:[],historyScope:"query",modelsSeen:[],modelTransitions:[]});return h}function tY(e,n){const i=new Map,o=`${n}:`;for(const[u,h]of Object.entries(e.modelRuns??{})){if(!u.startsWith(o))continue;const f=u.slice(o.length),b=f==="unknown"?null:f;for(const v of h)i.set(v.runId,b)}return i}function nY(e){const n=new Set;for(const i of e)i.model&&n.add(i.model);return[...n]}function aY(e){const n=[];let i=null;for(const o of e){const u=o.model??null;u!==i&&i!==null&&n.push({runId:o.runId,createdAt:o.createdAt,fromModel:i,toModel:u}),i=u}return n}function Ck(e){if(e.length===0)return 0;const n=e[e.length-1].citationState;let i=0;for(let o=e.length-1;o>=0&&e[o].citationState===n;o--)i++;return i}function _k(e){if(e.length===0)return 0;const n=e[e.length-1].visibilityState??"not-visible";let i=0;for(let o=e.length-1;o>=0&&(e[o].visibilityState??"not-visible")===n;o--)i++;return i}function Tk(e,n,i){const o={positive:i?.positive??"cited",negative:i?.negative??"not cited",first:i?.first??"first citation"};switch(e){case"new":return"First observation";case"cited":case"visible":return n<=1?`${mc(o.positive)} in latest run`:`${mc(o.positive)} for ${n} runs`;case"lost":return"Lost since last run";case"emerging":return mc(o.first);case"not-cited":case"not-visible":return n<=1?`${mc(o.negative)} in latest run`:`${mc(o.negative)} across ${n} runs`;default:return e}}function mc(e){return e.charAt(0).toUpperCase()+e.slice(1)}function iY(e,n,i){switch(n){case"lost":return`Mention was lost for "${i}". Your brand no longer appeared in the latest answer.`;case"emerging":return`Your brand started appearing in AI answers for "${i}".`}switch(e){case"visible":return`Your brand or domain is mentioned in AI answers for "${i}".`;case"pending":return`"${i}" has been added but no run has been triggered yet.`;default:return`Your brand or domain was not mentioned in AI answers for "${i}".`}}function YN(e){const n=FN(e.project),i=vI(cP(e.project)),o=eY(n.name,e.timeline,e.latestRunDetails,e.queries,i),h=[...e.runs].sort((f,b)=>b.createdAt.localeCompare(f.createdAt)).map(f=>$m(f,e.project.displayName||e.project.name));return e.overview?sY(n,e.overview,o,h):oY(n,o,h)}function XN(e){return e.filter(n=>n.kind===ze["answer-visibility"]&&n.trigger!==ii.probe&&(n.status===Zt.completed||n.status===Zt.partial))}function sY(e,n,i,o){const u=ZZ(n.topInsights);for(const h of n.attentionItems)h.id.startsWith("insight_")||u.push({id:h.id,tone:h.tone,title:h.title,detail:h.detail,actionLabel:h.actionLabel,actionGroup:"investigate",affectedPhrases:[]});return{project:e,contextLabel:n.contextLabel,mentionSummary:n.scores.mention,visibilitySummary:n.scores.visibility,mentionShareSummary:n.scores.mentionShare,queryCounts:{cited:n.queryCounts.citedQueries,total:n.queryCounts.totalQueries},gapQueries:n.scores.gapQueries,mentionGaps:n.scores.mentionGaps,indexCoverage:n.scores.indexCoverage,providerScores:n.providerScores,competitorPressure:n.scores.competitorPressure,runStatus:n.scores.runStatus,movementComparison:n.movementComparison,insights:u,visibilityEvidence:i,competitors:n.competitors.map(h=>({id:h.id,domain:h.domain,aliases:h.aliases??[],citationCount:h.citationCount,totalQueries:h.totalQueries,pressureLabel:h.pressureLabel,citedQueries:h.citedQueries,movement:"",notes:""})),recentRuns:o.slice(0,5),visibilitySweeps:XN(o),suggestedQueries:n.suggestedQueries}}function Ek(){return{projectMentionSnapshots:0,competitorMentionSnapshots:0,combinedMentionSnapshots:0,perCompetitor:[],ranking:[],snapshotsWithAnswerText:0,snapshotsTotal:0,score:null}}function oY(e,n,i){const o={label:"",value:"No data",delta:"Loading…",tone:"neutral",description:"",tooltip:"",trend:[]};return{project:e,contextLabel:`${e.country} / ${e.language.toUpperCase()}`,mentionSummary:{...o,label:"Mention Coverage"},visibilitySummary:{...o,label:"Citation Coverage"},mentionShareSummary:{...o,label:"Mention Share",scope:"non-brand",unavailable:!0,breakdown:Ek(),branded:Ek()},queryCounts:{cited:0,total:0},gapQueries:{...o,label:"Citation Gaps"},mentionGaps:{...o,label:"Mention Gaps"},indexCoverage:{...o,label:"Index Coverage"},providerScores:[],competitorPressure:{...o,label:"Competitor Pressure"},runStatus:{...o,label:"Run Status"},movementComparison:{hasPreviousRun:!1,comparable:!1,querySetChanged:!1,previousRunAt:null,currentQueryCount:0,previousQueryCount:0,comparableQueryCount:0,addedQueryCount:0,removedQueryCount:0,addedQueries:[],removedQueries:[]},insights:[],visibilityEvidence:n,competitors:[],recentRuns:i.slice(0,5),visibilitySweeps:XN(i),suggestedQueries:{rows:[],totalCandidates:0,skippedAlreadyTracked:0}}}function rY(e){const n=FN(e.project),i=[...e.runs].sort((C,_)=>_.createdAt.localeCompare(C.createdAt)),o=i.find(C=>C.kind===ze["answer-visibility"])??i[0]??e.overview?.latestRun?.run??void 0,u=e.project.displayName||e.project.name,h=o?$m(o,u):lY(e.project.id,u),f=e.overview;if(!f)return{project:n,hasMeasurement:!1,mentionScore:0,mentionDelta:"No data",mentionTone:"neutral",lastRun:h,insight:"No runs completed yet.",trend:[],competitorPressureLabel:"None"};const b=f.scores.mention,v=b.progress??0,x=f.queryCounts.mentionedQueries,k=f.queryCounts.totalQueries,S=f.providers.length;return{project:n,hasMeasurement:k>0&&b.progress!=null,mentionScore:v,mentionDelta:k>0?`${x} of ${k} queries`:"No data",mentionTone:b.tone,providerCoverage:b.providerCoverage,lastRun:h,insight:k>0?`${x} of ${k} queries mentioned across ${S} provider${S===1?"":"s"}.`:"No runs completed yet.",trend:b.trend??[],competitorPressureLabel:f.scores.competitorPressure.value,sentiment:f.sentiment}}function lY(e,n){return{id:"none",projectId:e,projectName:n,kind:ze["answer-visibility"],kindLabel:"No runs yet",status:Zt.queued,trigger:ii.manual,createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""}}function cY(e,n){const i=[],o=[],u=[];for(const f of e){o.push(YN(f)),u.push(rY(f));const b=[...f.runs].sort((v,x)=>x.createdAt.localeCompare(v.createdAt));for(const v of b)i.push($m(v,f.project.displayName||f.project.name))}i.sort((f,b)=>b.createdAt.localeCompare(f.createdAt));const h=e.length>0;return{portfolioOverview:{projects:u,attentionItems:h?uY(o):[{id:"attention_setup",tone:"neutral",title:"No projects yet",detail:"Create your first project using the setup wizard, CLI, or API.",actionLabel:"Open setup",href:"/setup"}],recentRuns:i.slice(0,5),systemHealth:[{id:"api",label:"API",tone:"positive",detail:"Connected",meta:"Real-time data"},{id:"provider",label:"Gemini",tone:"positive",detail:"Configured",meta:"Provider active"}],...h?{}:{emptyState:{title:"No projects yet",detail:"Canonry becomes useful after one project, a small query set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}}},projects:o,runs:i,setup:{healthChecks:[{id:"api",label:"API reachable",detail:"API is responding.",state:"ready",guidance:"Required for project creation and run history."},{id:"provider",label:"Provider configured",detail:"Gemini key is configured.",state:"ready",guidance:"Required for answer-visibility sweeps."}],projectDraft:{name:"",canonicalDomain:"",country:"US",language:"en"},queryImportState:{mode:"paste",queryCount:0,preview:[]},competitorDraft:{domains:[],notes:"Use the CLI to add competitors."},launchState:{enabled:h,ctaLabel:h?"Trigger run":"Create a project first",summary:h?"Ready to run.":"Create a project first to launch a run."}},settings:{providerStatuses:(n?.providers??[]).map(f=>({name:f.name,displayName:f.displayName,keyUrl:f.keyUrl,modelHint:f.modelHint,model:f.model,defaultModel:f.defaultModel,state:f.configured?"ready":"needs-config",detail:f.configured?"Provider is configured.":f.name.toLowerCase()==="local"?"Base URL is missing.":"API key is missing.",quota:f.quota})),google:{state:n?.google?.configured?"ready":"needs-config",detail:n?.google?.configured?"Google OAuth app credentials are configured. Project-level GSC connections can be created from the dashboard.":"Google OAuth client ID and client secret are not configured yet."},bing:{state:n?.bing?.configured?"ready":"needs-config",detail:n?.bing?.configured?"Bing Webmaster Tools API key is configured. Project-level Bing connections can be created from the dashboard.":"Bing Webmaster Tools API key is not configured yet."},selfHostNotes:["Configuration is stored in ~/.canonry/config.yaml.","The local config file is the source of truth for authentication credentials.","Google OAuth app credentials and per-domain Google tokens are stored in local config, not the database.","Database is SQLite at ~/.canonry/data.db.","API key was auto-generated during canonry init."],bootstrapNote:"Use the UI, CLI, or ~/.canonry/config.yaml to manage settings. Authentication credentials persist to local config."}}}function uY(e){const n=[];for(const i of e){const o=i.visibilityEvidence.filter(h=>h.citationState==="lost");o.length>0&&n.push({id:`attention_${i.project.id}_lost`,tone:"negative",title:`${i.project.displayName||i.project.name} lost citations`,detail:`${o.length} quer${o.length>1?"ies":"y"} lost citation.`,actionLabel:"Open project",href:`/projects/${encodeURIComponent(i.project.name)}`});const u=i.recentRuns.filter(h=>h.status===Zt.running||h.status===Zt.queued);u.length>0&&n.push({id:`attention_${i.project.id}_active`,tone:"neutral",title:`${i.project.displayName||i.project.name} has active runs`,detail:`${u.length} run${u.length>1?"s":""} in progress.`,actionLabel:"View runs",href:"/runs"})}return n.length===0&&n.push({id:"attention_stable",tone:"positive",title:"All projects stable",detail:"No citation losses or active runs to flag."}),n}const JN=N.createContext(null);JN.Provider;function Wc(){return N.useContext(JN)}function Gm(e,n={}){const o=Wc()?.dashboard??null,u=n.includeSettings??!0,h=n.includeOverviews??!0,f=n.pauseProjectPolling??!1,{isAdmin:b}=fa(),v=yt({...Bm({client:ee,query:{kind:"answer-visibility"}}),enabled:!o,staleTime:Mr,refetchInterval:M=>M.state.data?.some(te=>te.status==="running"||te.status==="queued")?3e3:Mr}),x=yt({...Oo({client:ee}),enabled:!o,refetchInterval:f?!1:M=>{const U=M.state.data,Z=v.data?.some(B=>B.status==="running"||B.status==="queued");return(U?.length??0)===0||!!Z?dH:mH}}),k=yt({...aF({client:ee}),enabled:!o&&u&&b}),S=x.data??[],C=v.data??[],_=C5({queries:S.map(M=>{const U=C.filter(B=>B.projectId===M.id),Z=U.filter(B=>(B.status==="completed"||B.status==="partial")&&B.kind==="answer-visibility"&&B.trigger!=="probe").sort((B,X)=>X.createdAt.localeCompare(B.createdAt)),te=Z.length>0?Z[0].id:"no-run";return{queryKey:["project-overview-slim",M.id,te],queryFn:async()=>{const B=await fN(M.name).catch(()=>null);return{project:M,runs:U,queries:[],competitors:[],timeline:[],latestRunDetails:[],previousRunDetails:[],gscCoverage:null,bingCoverage:null,dbInsights:null,overview:B}},enabled:!o&&h&&x.isSuccess&&v.isSuccess,staleTime:zd}})}),z=!h||_.every(M=>M.isSuccess),q=N.useMemo(()=>{if(o)return o;if(!x.data||!v.data||S.length>0&&!z)return null;const M=h?_.map(U=>U.data?{...U.data,runs:C.filter(Z=>Z.projectId===U.data.project.id)}:null).filter(U=>U!=null):S.map((U,Z)=>{const te=_[Z]?.data;return{project:U,runs:C.filter(B=>B.projectId===U.id),queries:[],competitors:[],timeline:[],latestRunDetails:[],previousRunDetails:[],gscCoverage:null,bingCoverage:null,dbInsights:null,overview:te?.overview??null}});return cY(M,k.data??null)},[o,x.data,v.data,k.data,h,z,_,S,C]),T=!o&&(x.isError||v.isError),V=!o&&!q&&!T,Y=N.useCallback(async()=>{const M=[x.refetch(),v.refetch(),...h?_.map(U=>U.refetch()):[]];u&&M.push(k.refetch()),await Promise.all(M)},[u,h,_,x.refetch,v.refetch,k.refetch]);return{dashboard:q,isLoading:V,isError:T,refetch:Y}}function dY(e){return JSON.stringify(e.filter(n=>n.kind==="answer-visibility"&&n.trigger!=="probe"&&(n.status==="completed"||n.status==="partial")).map(n=>[n.id,n.status]).sort(([n],[i])=>n.localeCompare(i)))}async function N0(e,n,i="active"){const o=u=>{const h=u.queryKey[0];return h?._id==="getApiV1ProjectsByNameAnalyticsCompetitors"&&h.path?.name===n};return i==="active"&&await e.cancelQueries({predicate:o}),e.invalidateQueries({predicate:o,refetchType:i})}function kie(e,n,i){const o=ma(),u=N.useRef({projectName:e,revision:n,enabled:i});N.useEffect(()=>{const h=u.current;u.current={projectName:e,revision:n,enabled:i},!(!i||!h.enabled||h.projectName!==e||h.revision===n)&&N0(o,e)},[i,e,o,n])}const mY=20;function pY(e,n={}){const i=ma(),o=Wc(),u=N.useMemo(()=>!o||!e?null:o.dashboard.projects.find(Z=>Z.project.name===e)??null,[o,e]),h=yt({...OH({client:ee,path:{name:e??""}}),enabled:!!e&&!u,staleTime:zd,refetchOnWindowFocus:"always"}),f=yt({...jN({client:ee,path:{name:e??""},query:{kind:"answer-visibility"}}),enabled:!!e,staleTime:Mr,refetchOnWindowFocus:"always",refetchInterval:Z=>Z.state.data?.some(X=>X.projectId===h.data?.id&&(X.status==="running"||X.status==="queued"))?3e3:Mr}),b=h.data??null,v=N.useMemo(()=>b?(f.data??[]).filter(Z=>Z.projectId===b.id):[],[b,f.data]),{latestRunIds:x,latestRunIdsKey:k,latestVisibilityRevision:S}=N.useMemo(()=>{const Z=v.filter(X=>(X.status==="completed"||X.status==="partial")&&X.kind==="answer-visibility"&&X.trigger!=="probe").sort((X,le)=>le.createdAt.localeCompare(X.createdAt)),te=Z[0]?.createdAt??null,B=te?Z.filter(X=>X.createdAt===te).map(X=>X.id):[];return{latestRunIds:B,latestRunIdsKey:[...B].sort().join(","),latestVisibilityRevision:te?`${te}:${[...B].sort().join(",")}`:"none"}},[v]),C=!!b&&!!e&&f.isSuccess,_=yt({queryKey:["project-dashboard-full",b?.id??null,k||"none","overview"],queryFn:async()=>({project:b,overview:await fN(e)}),enabled:C&&n.overview===!0,staleTime:zd,refetchOnWindowFocus:"always"}),z=yt({queryKey:["project-dashboard-full",b?.id??null,k||"none","evidence"],queryFn:async()=>{const[Z,te,B]=await Promise.all([hN(e),AK(e,void 0,mY),Promise.all(x.map(X=>g0(X)))]);return{project:b,queries:Z,timeline:te,latestRunDetails:B}},enabled:C&&n.evidence===!0,staleTime:zd,refetchOnWindowFocus:"always"}),q=N.useMemo(()=>{if(!b||!f.data)return u;const Z=n.evidence?z.data:void 0,te={project:b,runs:v,queries:Z?.queries??[],timeline:Z?.timeline??[],latestRunDetails:Z?.latestRunDetails??[],overview:n.overview?_.data?.overview??null:null},B=YN(te);return u&&!(n.overview&&_.data)?{...u,project:B.project,recentRuns:B.recentRuns,visibilitySweeps:B.visibilitySweeps,visibilityEvidence:Z?B.visibilityEvidence:u.visibilityEvidence}:B},[b,v,z.data,_.data,u,n.evidence,n.overview,f.data]),T=N.useCallback(async()=>{await Promise.all([h.refetch(),f.refetch(),i.invalidateQueries({queryKey:["project-dashboard-full",b?.id??null]})])},[h.refetch,f.refetch,i,b?.id]),V=h.isError||f.isError,Y=!u&&(h.isLoading||f.isLoading),M=!!e&&n.overview===!0&&!u&&!V&&_.isPending,U=!!e&&n.evidence===!0&&!u&&!V&&z.isPending;return{commandCenter:q,project:b,isLoading:Y,isError:V,overviewLoading:M,overviewError:n.overview===!0&&_.isError&&!_.data,evidenceLoading:U,evidenceError:n.evidence===!0&&z.isError&&!z.data,latestVisibilityRevision:S,competitorHistoryRevision:dY(v),refetch:T}}const hY=["health"];async function fY(){const e=await GK("/health","API"),n=wo()&&e.state==="ok"?{label:"Worker",state:"disabled",detail:"Background execution is disabled in this public demo."}:e.state==="ok"?{label:"Worker",state:"ok",detail:"In-process job runner"}:{label:"Worker",state:e.state,detail:`Depends on API health check · ${e.detail}`,statusCode:e.statusCode,hint:e.hint?`Worker status is inferred from API health in this deployment mode. ${e.hint}`:"Worker status is inferred from API health in this deployment mode."};return{apiStatus:e,workerStatus:n}}function N1(e,n){return yt({queryKey:hY,queryFn:fY,enabled:e,refetchInterval:15e3,initialData:n})}function gY(e){return yt({...w1({client:ee,path:{id:e??""}}),enabled:!!e,refetchInterval:n=>{const i=n.state.data?.status;return i==="running"||i==="queued"?3e3:!1}})}function C1(){const e=Rs(),n=iS({strict:!1}),i=_5({select:v=>v.location.pathname}),o=n.runId??null,u=n.evidenceId??null;return{runId:o,evidenceId:u,openRun:v=>{e({to:i,from:Un.to,search:x=>({...x,runId:v,evidenceId:void 0})})},openEvidence:v=>{e({to:i,from:Un.to,search:x=>({...x,evidenceId:v,runId:void 0})})},closeDrawer:()=>{e({to:i,from:Un.to,search:v=>({...v,runId:void 0,evidenceId:void 0})})}}}const yY={negative:"toast-card-negative",caution:"toast-card-caution",positive:"toast-card-positive",neutral:"toast-card-neutral"};function bY(e){if(e.cta)return`${e.cta.label}: ${e.title}`}function vY(){const e=N.useSyncExternalStore(cH,ck,ck),n=Rs(),{openRun:i}=C1(),o=N.useCallback(h=>{x0(h)},[]),u=N.useCallback(h=>{h.cta&&(h.cta.intent==="open-run-drawer"?i(h.cta.runId):n({to:"/runs"}),x0(h.id))},[n,i]);return e.length===0?null:l.jsx("div",{className:"toast-viewport","aria-label":"Notifications",children:e.map(h=>l.jsxs("section",{role:h.tone==="negative"?"alert":"status","aria-live":h.tone==="negative"?"assertive":"polite","data-state":h.state,className:`toast-card ${yY[h.tone]}`,children:[l.jsxs("div",{className:"toast-copy",children:[l.jsx("p",{className:"toast-title",children:h.title}),h.detail?l.jsx("p",{className:"toast-detail",children:h.detail}):null,h.cta?l.jsx("button",{type:"button",className:"toast-action",onClick:()=>u(h),"aria-label":bY(h),children:h.cta.label}):null]}),l.jsx("button",{type:"button",onClick:()=>o(h.id),className:"toast-dismiss","aria-label":"Dismiss",children:l.jsx(Lr,{className:"size-3.5"})})]},h.id))})}const xY="https://github.com/Canonry/canonry",wY="https://canonry.ai",Rk="Run it from your agent with the MCP server, API, CLI, and plugins for Claude Code and Codex.",kY=[{title:"Visibility",links:[["AI visibility","/projects/summit-roofing"],["Search engines","/projects/summit-roofing/search-console"],["Traffic & conversions","/projects/summit-roofing/conversions"]]},{title:"Portfolio",links:[["Properties & markets","/projects/harbor-resorts"],["Queries & research","/projects/harbor-resorts/queries"],["Activity","/projects/harbor-resorts/activity"]]},{title:"Website",links:[["Site health","/projects/summit-roofing/technical-aeo"],["Local presence","/projects/summit-roofing/local"],["Backlinks","/projects/summit-roofing/backlinks"]]}];function SY(){const e=N.useId();if(!wo())return null;const n=Mm(),i=`${e}-new-tab`,o={target:"_blank",rel:"noopener noreferrer","aria-describedby":i};return l.jsxs("aside",{className:"demo-banner","aria-label":"Public demo",children:[l.jsx("p",{className:"demo-banner-name",children:"Canonry demo"}),l.jsx("p",{className:"demo-banner-facts",children:"View only. Fictional data."}),l.jsx("p",{className:"demo-banner-agent",children:Rk}),l.jsxs("div",{className:"demo-banner-actions",children:[l.jsxs("a",{className:"demo-banner-primary",href:wY,...o,children:["canonry.ai",l.jsx(dS,{"aria-hidden":"true",size:14})]}),l.jsxs("a",{className:"demo-banner-secondary",href:xY,...o,children:[l.jsx(mS,{"aria-hidden":"true",size:15}),"GitHub"]}),l.jsxs("details",{onKeyDown:u=>{u.key==="Escape"&&(u.currentTarget.open=!1,u.currentTarget.querySelector("summary")?.focus())},children:[l.jsxs("summary",{children:["Explore ",l.jsx(Ic,{"aria-hidden":"true",size:14})]}),l.jsxs("div",{className:"demo-banner-panel",children:[l.jsx("p",{className:"demo-banner-panel-agent",children:Rk}),l.jsxs("nav",{className:"demo-banner-examples","aria-label":"Demo examples",children:[l.jsx("a",{href:`${n}/projects/summit-roofing`,children:"Standard business"}),l.jsx("a",{href:`${n}/projects/harbor-resorts`,children:"Property portfolio"})]}),l.jsx("nav",{className:"demo-banner-features","aria-label":"Demo feature directory",children:kY.map(({title:u,links:h})=>l.jsxs("section",{"aria-label":u,children:[l.jsx("h2",{children:u}),l.jsx("ul",{children:h.map(([f,b])=>l.jsx("li",{children:l.jsx("a",{href:`${n}${b}`,children:f})},b))})]},u))})]})]})]}),l.jsx("span",{id:i,hidden:!0,children:"Opens in a new tab"})]})}function wc(e){switch(e){case ze["answer-visibility"]:return"Visibility sweep";case ze["gsc-sync"]:return"GSC sync";case ze["inspect-sitemap"]:return"Sitemap inspection";case ze["ga-sync"]:return"GA sync";case ze["traffic-sync"]:return"Traffic sync";case ze["bing-inspect"]:return"Bing URL inspection";case ze["bing-inspect-sitemap"]:return"Bing sitemap inspection";case ze["site-audit"]:return"Technical audit";case ze["backlink-extract"]:return"Backlink extract";case ze["aeo-discover-seed"]:return"Discovery (seed phase)";case ze["aeo-discover-probe"]:return"Discovery (probe phase)";case ze["gbp-sync"]:return"Business Profile sync";case ze["ads-sync"]:return"ChatGPT ads sync";case ze["google-ads-sync"]:return"Google Ads sync";case ze["gtm-sync"]:return"Tag Manager sync"}}function Dk(e){return e==="running"?"Running":e==="queued"?"Queued":e==="partial"?"Partial":e==="completed"?"Completed":e==="failed"?"Failed":e==="cancelled"?"Cancelled":"Starting"}function jY(){const e=N.useSyncExternalStore(TN,$i,$i),n=N.useMemo(()=>Object.values(e.runs),[e.runs]),i=n.length>0,o=yt({...Bm({client:ee}),enabled:i,staleTime:Mr}),u=N.useMemo(()=>new Map((o.data??[]).map(b=>[b.id,b.status])),[o.data]);if(!i)return null;const h=n.map(b=>({...b,status:u.get(b.runId)??b.lastAnnouncedStatus})),f=h.length===1?wc(h[0].kind):`${h.length} active tasks`;return l.jsxs("div",{className:"task-center",children:[l.jsxs("p",{className:"sr-only",role:"status","aria-live":"polite",children:[h.length," active ",h.length===1?"task":"tasks","."," ",h.map(b=>`${wc(b.kind)} ${Dk(b.status)}`).join(". "),"."]}),l.jsxs("details",{className:"task-center-details",children:[l.jsxs("summary",{className:"task-center-trigger",children:[l.jsx(Cs,{className:"size-3.5 shrink-0 motion-safe:animate-spin","aria-hidden":"true"}),l.jsx("span",{className:"task-center-summary",children:f}),l.jsx("span",{className:"task-center-count","aria-hidden":"true",children:h.length}),l.jsx(Ic,{className:"task-center-chevron size-3.5 shrink-0","aria-hidden":"true"})]}),l.jsxs("div",{className:"task-center-panel",children:[l.jsxs("div",{className:"task-center-heading",children:[l.jsx("span",{children:"Active tasks"}),l.jsx("span",{className:"tabular-nums text-faint",children:h.length})]}),l.jsx("ul",{className:"task-center-list",children:h.map(b=>l.jsxs("li",{className:"task-center-item",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"truncate text-[13px] font-medium text-strong",children:wc(b.kind)}),l.jsx("p",{className:"mt-0.5 truncate text-xs text-muted",children:b.projectLabel??b.projectId})]}),l.jsx(vn,{tone:b.status==="failed"?"negative":b.status==="partial"?"caution":"neutral",children:Dk(b.status)})]},b.runId))}),l.jsx(et,{to:"/runs",className:"task-center-footer-link",children:"View all runs"})]})]})]})}const _1={queryClass:"all"},AY=["all","non-brand","branded"];function WN(e){return typeof e=="string"&&AY.includes(e)}function NY(e){const n=WN(e.class)?e.class:_1.queryClass,i=e.scope;if(typeof i!="string"||i==="all"||i.length===0)return{scope:"all",queryClass:n};const o=i.startsWith("group:")?i.slice(6):"";return o?{scope:"group",groupKey:o,queryClass:n}:{scope:"all",queryClass:n}}function Sie(e,n){return n===null||e===null?!1:e!==n}function jie(e){return{scope:e.scope==="group"&&e.groupKey?`group:${e.groupKey}`:void 0,class:e.queryClass===_1.queryClass?void 0:e.queryClass}}function CY(e,n){if(!(typeof e!="string"||e.length>16384||!n))try{const i=JSON.parse(e);if(typeof i!="object"||i===null||Array.isArray(i))return;const o=i,u=f=>typeof f=="string"&&f.trim().length>0,h=f=>f===null||u(f);return o.queryKey!==n||!u(o.provider)||o.queryClass!=="branded"&&o.queryClass!=="non-brand"&&o.queryClass!=="unknown"||!h(o.model)||!h(o.location)||!h(o.runId)||o.revision!==null&&(typeof o.revision!="number"||!Number.isSafeInteger(o.revision)||o.revision<=0)?void 0:{queryKey:n,queryClass:o.queryClass,provider:o.provider,model:o.model,location:o.location,runId:o.runId,revision:o.revision}}catch{return}}function _Y(e){const n=x=>typeof e[x]=="string"&&e[x]!==""?e[x]:void 0,i=NY({scope:n("scope"),class:n("class")}),o=n("measurementScope")??(i.scope==="group"?"group":"project"),u=n("measurementScopeKey")??(n("measurementScope")?void 0:i.groupKey),h=n("queryClass")??n("class"),f={measurementScope:u&&(o==="group"||o==="market"||o==="property")?o:"project",queryClass:h==="unknown"||WN(h)?h:_1.queryClass};f.measurementScope!=="project"&&(f.measurementScopeKey=u);for(const[x,k]of[["measurementMarketKey","marketKey"],["measurementProvider","provider"],["measurementModel","model"],["measurementLocation","location"],["measurementFrom","from"],["measurementTo","to"],["measurementRunId","measurementRunId"],["measurementQueryKey","queryKey"]]){const S=n(x);S!==void 0&&(f[k]=S)}const b=Number(e.measurementRevision);Number.isSafeInteger(b)&&b>0&&(f.revision=b);const v=CY(e.measurementAnswer,f.queryKey);return v&&(f.answer=v),f}function TY(e){return{scope:e.measurementScope,scopeKey:e.measurementScopeKey,marketKey:e.marketKey,queryClass:e.queryClass,provider:e.provider,model:e.model,location:e.location,from:e.from,to:e.to,revision:e.revision,runId:e.measurementRunId,limit:25}}function Aie(e,n){const i={...e,...n};return["measurementScope","measurementScopeKey","measurementMarketKey","queryClass","measurementProvider","measurementModel","measurementLocation","measurementFrom","measurementTo","measurementRevision","measurementRunId"].some(o=>o in n)?(i.measurementQueryKey=n.measurementQueryKey,i.measurementAnswer=n.measurementAnswer):"measurementQueryKey"in n&&!("measurementAnswer"in n)&&(i.measurementAnswer=void 0),"measurementScope"in n&&(i.scope=void 0,"measurementMarketKey"in n||(i.measurementMarketKey=void 0),i.measurementQueryKey=void 0,n.measurementScope==="project"&&(i.measurementScopeKey=void 0)),"queryClass"in n&&(i.class=void 0),i}function Nie(e){return{...e,onboarding:void 0,manageQueries:void 0,siteHealthRunId:void 0,siteScan:void 0,setupProject:void 0}}function EY(e,n){const i=/\/properties\/([^/]+)/.exec(e),o=_Y(n);if(i)return{view:"property",selection:Kd.parse({scope:"property",scopeKey:decodeURIComponent(i[1]),queryClass:o.queryClass,limit:10})};if(e.endsWith("/technical-aeo"))return{view:"site-health"};if(e.endsWith("/queries")&&n.queryWorkspace==="research")return{view:"project"};const u=/^\/projects\/[^/]+\/?$/.test(e);if(u||e.endsWith("/queries")){const h=Kd.safeParse(TY(e.endsWith("/queries")?{measurementScope:o.measurementScope,measurementScopeKey:o.measurementScopeKey,queryClass:o.queryClass}:o));return{view:u?"visibility":"queries",...h.success?{selection:h.data}:{unavailableReason:"The current measurement filters are invalid. Correct them before asking Aero about this view."}}}return{view:"project"}}function RY(e,n={}){const{threshold:i=80}=n,o=N.useRef(null),u=N.useRef({scrollHeight:0,wasAtEnd:!0});function h(v){return v.scrollHeight-v.scrollTop-v.clientHeight}function f(){const v=o.current;return v?h(v)<=i:!0}function b(){const v=o.current;v&&(v.scrollTop=v.scrollHeight,u.current.wasAtEnd=!0,u.current.scrollHeight=v.scrollHeight)}return N.useEffect(()=>{const v=o.current;if(!v)return;const x=()=>{u.current.wasAtEnd=h(v)<=i};return v.addEventListener("scroll",x,{passive:!0}),()=>v.removeEventListener("scroll",x)},[i]),N.useLayoutEffect(()=>{const v=o.current;if(!v)return;const x=v.scrollHeight;x>u.current.scrollHeight&&u.current.wasAtEnd&&(v.scrollTop=x),u.current.scrollHeight=x},e),N.useEffect(()=>{const v=o.current;if(!v||typeof ResizeObserver>"u")return;const x=new ResizeObserver(()=>{const k=v.scrollHeight;k>u.current.scrollHeight&&u.current.wasAtEnd&&(v.scrollTop=k),u.current.scrollHeight=k});return x.observe(v),v.firstElementChild&&x.observe(v.firstElementChild),()=>x.disconnect()},[]),{ref:o,scrollToEnd:b,isAtEnd:f}}const C0="Sweeps are run by your Canonry team",DY="Scans are run by your Canonry team",zk="Next sweep unavailable",zY="Sweep running…",IY="Next sweep:";function OY(e,n){try{return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",timeZone:n??"UTC"}).format(new Date(e))}catch{return null}}function PY({projectName:e,kind:n=ze["answer-visibility"],running:i=!1,loadSchedule:o=!0}){const u=n===ze["site-audit"],h=yt({...sF({client:ee,path:{name:e},query:{kind:n}}),enabled:o&&!!e,retry:!1,refetchInterval:6e4}),f=h.isError?void 0:h.data,b=f?.enabled&&f.nextRunAt?new Date(f.nextRunAt):null,v=b&&Number.isFinite(b.getTime())?u?b.toLocaleString("en-GB",{weekday:"long",day:"numeric",month:"short",hour:"2-digit",minute:"2-digit",timeZone:"UTC",hourCycle:"h23"}):OY(b.toISOString(),f?.timezone):null,k=(h.error instanceof Tn?h.error.code:h.error?.error?.code)==="NOT_FOUND",S=!v||k||!f?.enabled;return l.jsx("p",{className:"text-sm text-secondary",role:"status",children:u?l.jsxs(l.Fragment,{children:[i&&l.jsx("span",{className:"text-neutral",children:"Scan running… · "}),v&&b?l.jsxs(l.Fragment,{children:["Next scan ",l.jsxs("time",{dateTime:b.toISOString(),children:[v," UTC"]})," · managed by your Canonry team"]}):DY]}):i?zY:S?zk:v&&b?l.jsxs(l.Fragment,{children:[IY," ",l.jsx("time",{dateTime:b.toISOString(),children:v})]}):zk})}const qY=300,MY=400,BY=900,LY=32,Ik=28;let UY=0;function VY(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function _0(){return new DOMException("Preview stopped","AbortError")}function $Y(e,n){return n?.aborted?Promise.reject(_0()):new Promise((i,o)=>{const u=()=>{clearTimeout(h),o(_0())},h=setTimeout(()=>{n?.removeEventListener("abort",u),i()},e);n?.addEventListener("abort",u,{once:!0})})}function GY(e){const n=e.match(/\S+\s*|\s+/g)??[];if(n.length<2)return[];const i=Math.ceil(n.length/LY),o=[];for(let u=i;u<n.length;u+=i)o.push(n.slice(0,u).join(""));return o}function KY(e){return typeof e=="string"?e:JSON.stringify(e??null)}async function HY({starter:e,signal:n,onEvent:i,reducedMotion:o=!1}){const u=async b=>{if(n?.aborted)throw _0();o||await $Y(b,n)},h=Date.now(),f=++UY;await u(qY);for(const[b,v]of e.steps.entries()){const{name:x,label:k,arguments:S,result:C,durationMs:_}=v.tool,z=`preview-${e.id}-${f}-${b}`,q={role:"assistant",timestamp:Date.now(),stopReason:"toolUse",content:[...v.text?[{type:"text",text:v.text}]:[],{type:"toolCall",id:z,name:x,arguments:S}]};i({type:"message_end",message:q}),i({type:"tool_execution_start",toolCallId:z,toolName:x,label:k,args:S}),await u(Math.min(BY,Math.max(MY,_))),i({type:"tool_execution_end",toolCallId:z,toolName:x,result:C,isError:!1});const T={role:"toolResult",toolCallId:z,timestamp:Date.now(),isError:!1,aeroToolLabel:k,aeroDurationMs:_,content:[{type:"text",text:KY(C)}]};i({type:"message_end",message:T})}if(!o){for(const b of GY(e.answer))await u(Ik),i({type:"message_update",message:{role:"assistant",content:[{type:"text",text:b}]},assistantMessageEvent:{}});await u(Ik)}i({type:"message_end",message:{role:"assistant",timestamp:Date.now(),stopReason:"stop",content:[{type:"text",text:e.answer}]}}),i({type:"aero_turn_status",status:{reason:"completed",toolCalls:e.steps.length,modelCalls:e.steps.length+1,durationMs:Date.now()-h}})}async function Km(e){try{return await e.json()}catch{return{}}}function FY(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const Hm=FY();function Fm(e){e===401&&g1()}async function Lf(e){const n=await fetch(`${Hm}/projects/${encodeURIComponent(e)}/agent/transcript`,{credentials:"include"});if(!n.ok){Fm(n.status);const i=await Km(n);throw new Tn(i.error?.message??`transcript fetch failed: ${n.status}`,n.status,i.error?.code)}return await n.json()}async function QY(e){const n=await fetch(`${Hm}/projects/${encodeURIComponent(e)}/agent/preview`,{credentials:"include"});if(!n.ok){Fm(n.status);const i=await Km(n);throw new Tn(i.error?.message??`preview fetch failed: ${n.status}`,n.status,i.error?.code)}return await n.json()}async function ZY(e){const n=await fetch(`${Hm}/projects/${encodeURIComponent(e)}/agent/transcript`,{method:"DELETE",credentials:"include"});if(!n.ok){Fm(n.status);const i=await Km(n);throw new Tn(i.error?.message??`reset failed: ${n.status}`,n.status,i.error?.code)}}async function YY({project:e,prompt:n,conversationId:i,provider:o,modelId:u,scope:h,profile:f,context:b,limits:v,signal:x,onEvent:k}){const S={prompt:n};i!==void 0&&(S.conversationId=i),o&&(S.provider=o),u&&(S.modelId=u),h&&(S.scope=h),f&&(S.profile=f),b&&(S.context=b),v&&(S.limits=v);const C=await fetch(`${Hm}/projects/${encodeURIComponent(e)}/agent/prompt`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(S),signal:x});if(!C.ok||!C.body){Fm(C.status),am({method:"POST",route:"/api/v1/projects/{name}/agent/prompt",status:C.status});const Y=await Km(C);throw new Tn(Y.error?.message??`prompt failed: ${C.status}`,C.status,Y.error?.code)}Wr("aero.send");let _=!1;const z=C.body.getReader(),q=new TextDecoder;let T="";const V=()=>{z.cancel().catch(()=>{})};x?.addEventListener("abort",V,{once:!0}),x?.aborted&&V();try{for(;;){const{value:Y,done:M}=await z.read();if(M)break;T+=q.decode(Y,{stream:!0});let U=T.indexOf(`
|
|
59
|
+
|
|
60
|
+
`);for(;U!==-1;){const Z=T.slice(0,U);T=T.slice(U+2);for(const te of Z.split(`
|
|
61
|
+
`)){if(!te.startsWith("data:"))continue;const B=te.slice(5).trim();if(!B)continue;let X;try{X=JSON.parse(B)}catch{continue}X.type==="stream_close"&&(_=!0),k(X)}U=T.indexOf(`
|
|
62
|
+
|
|
63
|
+
`)}}if(x?.aborted)throw new DOMException("Turn stopped","AbortError");if(!_)throw new Error("Connection ended before Aero finished. Review the partial answer before retrying.")}finally{x?.removeEventListener("abort",V);try{z.releaseLock()}catch{}}}function Id(e){return!e||e.role!=="assistant"?"":e.content.filter(n=>n.type==="text").map(n=>n.text).join("")}const T0=[{id:"status",label:"Status",prompt:"Give me a quick status: the latest sweep, which engines answered, and anything that needs attention."},{id:"changes",label:"What changed",prompt:"Compare the latest complete sweep with the one before it. Lead with mentions, then citations. Keep branded and non-brand queries separate if the project splits them, and say which changes are bigger than normal run-to-run noise."},{id:"gaps",label:"Biggest gaps",prompt:"Which tracked queries does no engine mention us on, and who gets named instead? Group them by topic or market."},{id:"insights",label:"Top insights",prompt:"Walk me through the 3 most severe active insights and what to do about each."}],XY="https://canonry.ai",JY="This demo plays sample answers only. Pick a starting point, or type / to choose one.",WY="Stopped. The sample answer so far is kept.";function Ok(e){return{queryKey:["aero-preview",e],queryFn:()=>QY(e),staleTime:1/0,gcTime:1/0}}const Pk=[{command:"/status",label:"Status",prompt:"Give me a quick status: the latest sweep, which engines answered, and anything that needs attention."},{command:"/changes",label:"What changed",prompt:"Compare the latest complete sweep with the one before it. Lead with mentions, then citations. Keep branded and non-brand queries separate if the project splits them, and say which changes are bigger than normal run-to-run noise."},{command:"/gaps",label:"Biggest gaps",prompt:"Which tracked queries does no engine mention us on, and who gets named instead? Group them by topic or market."},{command:"/insights",label:"Top insights",prompt:"Walk me through the 3 most severe active insights and what to do about each."},{command:"/last-run",label:"Last run",prompt:"Summarize the latest run for this project: which engines answered, what moved in mentions and citations, and anything that failed."},{command:"/run-sweep",label:"Run sweep now",prompt:"Run a new answer-visibility sweep for this project now and tell me when it lands."},{command:"/queries",label:"Queries",prompt:"List the tracked queries for this project and flag any that are obvious duplicates or underperformers."},{command:"/competitors",label:"Competitors",prompt:"Which competitors do engines name most often on queries where we are not named, and on which engines?"},{command:"/new",label:"New conversation (save current)",action:"new"}],jd=e=>`canonry:aero:provider:${e}`,eX=e=>`canonry:aero:scope:${e}`;function qk(e){if(typeof window>"u")return null;try{return window.localStorage.getItem(e)}catch{return null}}function tX(e,n){if(!(typeof window>"u"))try{window.localStorage.setItem(e,n)}catch{}}function Mk(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}function nX({projectName:e,context:n,preview:i=h1()}){const o=go(),{canWrite:u,account:h}=fa(),f=ma(),b=h?.role==="viewer",[v,x]=N.useState(!1),[k,S]=N.useState(!1),[C,_]=N.useState([]),[z,q]=N.useState(void 0),T=N.useRef(!1),[V,Y]=N.useState(!1),[M,U]=N.useState(!1),[Z,te]=N.useState(null),[B,X]=N.useState(!1),[le,Je]=N.useState(!1),[nt,$e]=N.useState(null),Pe=N.useRef(!1),[Se,Ue]=N.useState(""),[P,J]=N.useState(!1),[be,je]=N.useState([]),[W,_e]=N.useState(""),[qe,ve]=N.useState(null),[de,ce]=N.useState(null),[F,pe]=N.useState(null),Oe=N.useRef(!0),[Ae,st]=N.useState(()=>qk(jd(e))??null),Ve=o||b||i?null:Ae,[At]=N.useState(()=>qk(eX(e))==="all"?"all":"read-only"),Ke=o||b||i?"read-only":At,me=N.useRef(null),at=N.useRef(null),zt=N.useRef(null),Pn=N.useRef(null),{ref:Kt}=RY([C,W,be]),Me=N.useRef(null);N.useLayoutEffect(()=>{const oe=Me.current;if(!oe)return;oe.style.height="auto";const Ee=k?sX:iX;oe.scrollHeight>0&&(oe.style.height=`${Math.min(oe.scrollHeight,Ee)}px`)},[Se,k,v]);const[ct,Ht]=N.useState(0),Ft=N.useMemo(()=>{const oe=Se.trimStart();if(!oe.startsWith("/"))return[];if(/\s/.test(oe))return[];const Ee=oe.toLowerCase();return Pk.filter(Ze=>(!(o||b)||Ze.command!=="/run-sweep")&&(!b||Ze.action!=="new")&&(!i||T0.some(It=>It.prompt===Ze.prompt))&&(Ze.command.startsWith(Ee)||Ze.label.toLowerCase().includes(Ee.slice(1))))},[Se,o,b,i]);N.useEffect(()=>{Ht(oe=>Ft.length===0?0:Math.min(oe,Ft.length-1))},[Ft.length]);const En=yt({...yQ({client:ee,path:{name:e}}),enabled:!b&&!i,staleTime:6e4}),Ut=N.useMemo(()=>{const oe=En.data?.providers??[];if(Ve){const Ze=oe.find(It=>It.id===Ve&&It.configured);if(Ze)return Ze}const Ee=En.data?.defaultProvider;return Ee?oe.find(Ze=>Ze.id===Ee)??null:null},[Ve,En.data]),ci=b||i||Ut!==null;yt({...Ok(e),enabled:i&&v}),N.useEffect(()=>{if(!En.data||!Ve)return;En.data.providers.find(Ee=>Ee.id===Ve&&Ee.configured)||(st(null),Mk(jd(e)))},[En.data,Ve,e]);const Ls=N.useCallback(oe=>{st(oe),oe?tX(jd(e),oe):Mk(jd(e))},[e]);N.useEffect(()=>{if(!v)return;const oe=Ee=>{Ee.key==="Escape"&&(M?U(!1):k?S(!1):x(!1))};return window.addEventListener("keydown",oe),()=>window.removeEventListener("keydown",oe)},[v,k,M]);const ui=N.useRef(null);N.useEffect(()=>{v||(ui.current=null)},[v]),N.useEffect(()=>{if(!v||!ci||i)return;let oe=!1;ui.current!==e&&(ui.current=e,ve(null));const Ee=()=>{oe||P||Pe.current||Lf(e).then(Xe=>{oe||Pe.current||(Je(Xe.isStreaming??!1),q(Xe.conversationId??null),!oe&&!Xe.isStreaming&&(at.current===null||Xe.updatedAt&&Xe.updatedAt!==at.current.previous)&&(_(Xe.messages),me.current=Xe.updatedAt,at.current=null))}).catch(Xe=>{oe||ve(Oi(Xe))})};Ee();const It=window.setInterval(Ee,15e3);return()=>{oe=!0,window.clearInterval(It)}},[v,e,P,ci,B,i]),N.useEffect(()=>(Oe.current=!0,()=>{Oe.current=!1,Pn.current?.abort()}),[e]);async function Rn(oe,Ee=n){const Ze=oe.trim();if(!Ze||M||P||B||Pe.current||le||!ci)return;if(i){await qo(Ze);return}if(o&&/^\/run-sweep(?:\s|$)/i.test(Ze)){ve(C0);return}ve(null),ce(null),pe({prompt:Ze,context:Ee}),Ue(""),J(!0),_e(""),zt.current=null,je([]),at.current={previous:me.current};const It={role:"user",content:Ze,timestamp:Date.now(),aeroContext:Ee};_(xt=>[...xt,It]);const Xe=new AbortController;Pn.current=Xe;try{await YY({project:e,prompt:Ze,conversationId:z,provider:Ve??void 0,scope:Ke,context:Ee,signal:Xe.signal,onEvent:Us});const xt=await Lf(e);Oe.current&&!xt.isStreaming&&(q(xt.conversationId??null),_(xt.messages),me.current=xt.updatedAt,at.current=null)}catch(xt){if(!Oe.current)return;b&&(at.current=null);const sn=zt.current;sn&&Id(sn).trim()&&_(mi=>[...mi,sn]),Xe.signal.aborted?ce("Stopped. Partial response preserved. An action already dispatched may still finish."):ve(Oi(xt))}finally{Oe.current&&(J(!1),_e(""),je(xt=>xt.map(sn=>sn.endedAt===void 0?{...sn,interrupted:!0}:sn))),Pn.current=null}}async function qo(oe){const Ee=Pk.find(Xe=>Xe.command===oe.toLowerCase())?.prompt??oe,Ze=T0.find(Xe=>Xe.prompt===Ee)?.id;if(!Ze){ve(null),pe(null),ce(JY);return}ve(null),ce(null),pe({prompt:Ee}),Ue(""),J(!0),_e(""),zt.current=null,je([]),_(Xe=>[...Xe,{role:"user",content:Ee,timestamp:Date.now()}]);const It=new AbortController;Pn.current=It;try{const Xe=await f.ensureQueryData(Ok(e));if(It.signal.aborted)throw new DOMException("Preview stopped","AbortError");const xt=Xe.starters.find(sn=>sn.id===Ze);if(!xt)throw new Error("This demo has no sample answer for that starting point.");await HY({starter:xt,signal:It.signal,onEvent:Us,reducedMotion:VY()})}catch(Xe){if(!Oe.current)return;const xt=zt.current;xt&&Id(xt).trim()&&_(sn=>[...sn,xt]),It.signal.aborted?ce(WY):ve(Oi(Xe))}finally{Oe.current&&(J(!1),_e(""),je(Xe=>Xe.map(xt=>xt.endedAt===void 0?{...xt,interrupted:!0}:xt))),Pn.current=null}}function Us(oe){if(Oe.current)switch(oe.type){case"message_update":oe.message.role==="assistant"&&(zt.current=oe.message),_e(Id(oe.message));break;case"message_end":if(oe.message.role!=="user"){const Ee=oe.message;_(Ze=>[...Ze,Ee])}oe.message.role==="assistant"&&(zt.current=null,_e(""),oe.message.errorMessage&&ve(oe.message.errorMessage));break;case"aero_turn_status":oe.status?.reason==="tool-limit"?ce("Tool-call limit reached. Partial response preserved."):oe.status?.reason==="time-limit"?ce("Time limit reached. Partial response preserved."):oe.status?.reason==="completed"?pe(null):oe.status?.reason==="error"&&ve(Ee=>Ee??"Aero could not finish this answer. Retry to ask again.");break;case"tool_execution_start":je(Ee=>[...Ee,{id:oe.toolCallId,name:oe.toolName,label:oe.label,args:oe.args,startedAt:Date.now()}]);break;case"tool_execution_end":je(Ee=>Ee.map(Ze=>Ze.id===oe.toolCallId?{...Ze,endedAt:Date.now(),isError:oe.isError,result:oe.result}:Ze));break;case"error":ve(oe.message);break}}async function Vs(oe,Ee=!1){if(!(P||le||Pe.current)){Pe.current=!0,X(!0),ve(null);try{await oe();const Ze=await Lf(e);if(!Oe.current)return;at.current=null,me.current=Ze.updatedAt,q(Ze.conversationId??null),_(Ze.messages),je([]),_e(""),ce(null),pe(null),$e(null),U(Ee),te(Ee?await rk(e):null),Me.current?.focus()}catch(Ze){Oe.current&&ve(Oi(Ze))}finally{Pe.current=!1,Oe.current&&X(!1)}}}async function di(){if(i){if(P)return;_([]),je([]),_e(""),ve(null),ce(null),pe(null),Me.current?.focus();return}await Vs(()=>b?ZY(e):KK(e,crypto.randomUUID()))}async function yn(oe=!1){if(!(Pe.current||T.current)){T.current=!0,Y(!0),U(!0),ve(null);try{const Ee=await rk(e,{offset:oe?Z?.nextOffset??0:0});Oe.current&&te(Ze=>oe&&Ze?{...Ee,conversations:[...Ze.conversations,...Ee.conversations]}:Ee)}catch(Ee){Oe.current&&ve(Oi(Ee))}finally{T.current=!1,Oe.current&&Y(!1)}}}const _t=C.length===0,$n=!(b||i);if($n&&En.isPending)return null;if($n&&En.isError)return l.jsx("div",{className:"pointer-events-none fixed inset-x-0 bottom-0 z-40 flex justify-center p-3",children:l.jsxs("div",{role:"status",className:"flex w-full max-w-3xl flex-wrap items-center gap-x-2 gap-y-1 rounded-lg border border-base bg-bg/95 px-4 py-2 text-sm shadow-lg",children:[l.jsx(ld,{className:"h-4 w-4 text-muted","aria-hidden":"true"}),l.jsx("span",{className:"font-medium text-strong",children:"Aero could not check provider availability."}),l.jsx(re,{variant:"outline",size:"sm",className:"pointer-events-auto ml-auto",onClick:()=>{En.refetch()},children:"Try again"})]})});const Qt=Ut&&!Ut.configured?Ut:null;if($n&&(!Ut||Qt))return l.jsx("div",{className:"pointer-events-none fixed inset-x-0 bottom-0 z-40 flex justify-center p-3",children:l.jsxs("div",{role:"status",className:"flex w-full max-w-3xl flex-wrap items-center gap-x-2 gap-y-1 rounded-lg border border-base bg-bg/95 px-4 py-2 text-sm shadow-lg",children:[l.jsx(ld,{className:"h-4 w-4 text-muted","aria-hidden":"true"}),l.jsxs("span",{className:"flex items-center gap-1.5 font-medium text-strong",children:[Qt?`Aero is set to ${Qt.label.replace(/\s+\(.+\)$/,"")}, which has no API key.`:"Aero needs an answer-engine provider.",l.jsx(la,{text:Qt?`Set ${eC(Qt.id)} on the server, or providers.${Qt.id}.apiKey in its config.yaml.`:"Aero is the built-in AEO analyst. It reads your Canonry data with you once a provider is connected."})]}),Qt?null:u?l.jsx(re,{asChild:!0,variant:"outline",size:"sm",className:"pointer-events-auto ml-auto",children:l.jsx(et,{to:"/settings",children:"Open Settings"})}):l.jsx("span",{className:"ml-auto text-secondary",children:"Ask an administrator to configure one."})]})});const $s=v&&k?"pointer-events-auto fixed inset-0 z-40 flex items-stretch justify-center bg-bg/70 p-4 sm:p-8 backdrop-blur-sm":"pointer-events-none fixed inset-x-0 bottom-0 z-40 flex justify-center p-3",Ia=k?"pointer-events-auto flex h-full w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-mono-800/80 bg-bg/95 shadow-2xl":"pointer-events-auto w-full max-w-3xl",Jn=k?"flex-1 overflow-y-auto px-6 py-5 text-sm text-strong":"max-h-[40vh] min-h-[120px] overflow-y-auto px-4 py-3 text-sm text-strong";return l.jsx("div",{className:$s,onClick:oe=>{k&&oe.target===oe.currentTarget&&S(!1)},children:l.jsx("div",{className:Ia,children:v?l.jsxs("div",{"data-aero-panel":!0,className:k?"flex h-full flex-col":"flex flex-col overflow-hidden rounded-2xl border border-mono-800/80 bg-bg/95 shadow-xl backdrop-blur",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-mono-800/70 px-4 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ld,{className:"h-4 w-4 text-positive-400","aria-hidden":"true"}),l.jsx("span",{className:"text-sm font-medium text-heading",children:"Aero"}),l.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted",children:P||le?"working…":e})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[!o&&!b&&!i&&l.jsx(aX,{providers:En.data?.providers??[],active:Ut,override:Ve,onPick:Ls,disabled:P}),l.jsx("button",{type:"button",onClick:()=>S(oe=>!oe),className:"rounded-md p-1.5 text-muted transition hover:bg-surface-inset hover:text-strong","aria-label":k?"Collapse":"Expand",title:k?"Collapse":"Expand",children:k?l.jsx(I5,{className:"h-3.5 w-3.5","aria-hidden":"true"}):l.jsx(O5,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),l.jsx("button",{type:"button",onClick:()=>{S(!1),x(!1)},className:"rounded-md p-1.5 text-muted transition hover:bg-surface-inset hover:text-strong","aria-label":"Close Aero",children:l.jsx(Lr,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-subtle px-4 py-2",children:[l.jsxs(re,{variant:"outline",size:"sm",disabled:P||le||B,onClick:fn(di),title:b||i?"Clear this conversation and start fresh.":"Save this conversation and start fresh. Shared project notes are kept.",children:[l.jsx(Kf,{className:"h-3.5 w-3.5","aria-hidden":"true"})," New conversation"]}),!b&&!i&&l.jsxs(re,{variant:"ghost",size:"sm","aria-expanded":M,"aria-controls":"aero-history",disabled:B,onClick:()=>{M?U(!1):yn()},children:[l.jsx(pS,{className:"h-3.5 w-3.5","aria-hidden":"true"})," History"]})]}),M?l.jsxs("div",{id:"aero-history",className:Jn,"aria-label":"Conversation history",children:[l.jsxs("h3",{className:"mb-2 text-sm font-medium text-heading",children:["Conversations in ",e]}),Z?Z.conversations.length===0?l.jsx("p",{className:"text-sm text-secondary",children:"No saved conversations yet. Your conversations will appear here."}):l.jsx("ul",{className:"divide-y divide-default",children:Z.conversations.map(oe=>l.jsxs("li",{className:"py-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{className:"min-w-0 flex-1 rounded-md px-2 py-1 text-left hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-positive-500",disabled:P||le||B,onClick:()=>{oe.active?U(!1):Vs(()=>HK(e,oe.id))},children:[l.jsx("span",{className:"block truncate text-sm text-heading",children:oe.title}),l.jsxs("span",{className:"text-xs text-secondary",children:[oe.active?"Current · ":"",new Date(oe.updatedAt).toLocaleString()]})]}),l.jsx(re,{variant:"ghost",size:"sm",disabled:P||le||B,"aria-label":`Delete conversation: ${oe.title}`,onClick:()=>$e(oe.id),children:"Delete"})]}),nt===oe.id&&l.jsxs("div",{role:"group","aria-label":"Confirm conversation deletion",className:"mt-2 rounded-md border border-default p-3 text-sm text-secondary",children:[l.jsx("p",{children:"Delete this conversation permanently? Shared project notes will be kept."}),l.jsxs("div",{className:"mt-2 flex gap-2",children:[l.jsx(re,{variant:"destructive",size:"sm",disabled:B,onClick:()=>{Vs(async()=>{await FK(e,oe.id)},!0)},children:"Delete conversation"}),l.jsx(re,{variant:"ghost",size:"sm",disabled:B,onClick:()=>$e(null),children:"Cancel"})]})]})]},oe.id))}):l.jsx("p",{className:"text-sm text-secondary",children:V?"Loading history…":"History could not be loaded. Close and reopen History to retry."}),Z?.nextOffset!=null&&l.jsx(re,{variant:"ghost",size:"sm",disabled:V,onClick:()=>{yn(!0)},children:V?"Loading…":"Load more"})]}):l.jsxs("div",{ref:Kt,className:Jn,children:[_t&&!P&&l.jsxs("div",{className:"flex flex-col gap-3 py-2",children:[l.jsx("p",{className:"text-sm text-secondary",children:i?l.jsxs(l.Fragment,{children:["See how Aero answers about ",l.jsx("span",{className:"text-strong",children:e}),". Choose a starting point."]}):l.jsxs(l.Fragment,{children:["Ask about ",l.jsx("span",{className:"text-strong",children:e})," or choose a starting point."]})}),l.jsx(Bk,{onPick:oe=>{Rn(oe)}})]}),cX(C,e,Ve,Ke,be,P,!!W.trim(),!b&&!i),P&&W&&l.jsxs("div",{className:"mt-3",children:[l.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-positive-400",children:"Aero"}),l.jsx(aC,{content:W})]}),P&&!W&&be.every(oe=>oe.endedAt!==void 0)&&l.jsx(vX,{}),i&&!_t&&!P&&l.jsxs("div",{className:"mt-4 flex flex-col gap-2 border-t border-subtle pt-3",children:[l.jsx("p",{className:"text-xs text-secondary",children:"Try another starting point."}),l.jsx(Bk,{onPick:oe=>{Rn(oe)}})]})]}),(qe||de)&&l.jsxs("div",{role:qe?"alert":"status",className:"mx-3 my-2 flex flex-wrap items-center gap-2 rounded-md border border-base bg-surface px-3 py-2 text-sm text-secondary",children:[l.jsx("span",{className:"flex-1",children:qe??de}),F&&!P&&l.jsx(re,{variant:"outline",size:"sm",onClick:()=>{Ke==="all"?(Ue(F.prompt),Me.current?.focus()):Rn(F.prompt,F.context)},children:Ke==="all"?"Review prompt":"Retry"})]}),i&&l.jsxs("p",{className:"border-t border-subtle px-4 py-2 text-xs text-secondary",children:["Sample answers on demo data."," ",l.jsxs("a",{href:XY,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-0.5 text-positive-400 underline decoration-positive-700 hover:decoration-positive-400",children:["Aero answers from your own Canonry data.",l.jsx(dS,{className:"h-3 w-3","aria-hidden":"true"}),l.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]})]}),l.jsxs("div",{className:"relative",children:[!M&&Ft.length>0&&l.jsx(rX,{title:i?"Starting points":"Commands",matches:Ft,selectedIndex:ct,onHover:Ht,onPick:oe=>{Ue(""),Me.current?.focus(),oe.action==="new"?di():Rn(oe.prompt)}}),l.jsxs("form",{className:"flex items-end gap-2 border-t border-mono-800/70 bg-bg/80 px-3 py-2.5",onSubmit:oe=>{if(oe.preventDefault(),Ft.length>0){const Ee=Ft[ct];Ue(""),Ee.action==="new"?di():Rn(Ee.prompt);return}Rn(Se)},children:[l.jsx("textarea",{ref:Me,value:Se,onChange:oe=>Ue(oe.target.value),onKeyDown:oe=>{if(Ft.length>0){if(oe.key==="ArrowDown"){oe.preventDefault(),Ht(Ee=>(Ee+1)%Ft.length);return}if(oe.key==="ArrowUp"){oe.preventDefault(),Ht(Ee=>(Ee-1+Ft.length)%Ft.length);return}if(oe.key==="Tab"){oe.preventDefault();const Ee=Ft[ct];Ue(`${Ee.command} `);return}if(oe.key==="Escape"){oe.preventDefault(),Ue("");return}}if(oe.key==="Enter"&&!oe.shiftKey)if(oe.preventDefault(),Ft.length>0){const Ee=Ft[ct];Ue(""),Ee.action==="new"?di():Rn(Ee.prompt)}else Rn(Se)},disabled:M||B,placeholder:M?"Open a conversation to continue…":i?"Type / for a starting point":"Ask Aero, or / for commands…","aria-label":"Message Aero",rows:k?3:1,className:"flex-1 resize-none overflow-y-auto bg-transparent text-sm text-heading placeholder:text-mono-600 focus:outline-none disabled:opacity-60"}),P?l.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:()=>Pn.current?.abort(),"aria-label":"Stop Aero",children:[l.jsx(hS,{className:"h-3.5 w-3.5","aria-hidden":"true"})," Stop"]}):l.jsx(re,{type:"submit",size:"sm",disabled:!Se.trim()||M||B||le,"aria-label":"Send",children:l.jsx(P5,{className:"h-4 w-4","aria-hidden":"true"})})]})]})]}):l.jsx("button",{type:"button",onClick:()=>{x(!0),Wr("aero.open")},className:"flex w-full items-center justify-between rounded-lg border border-mono-800/80 bg-bg/95 px-4 py-2 text-left text-sm text-secondary shadow-lg transition hover:border-strong hover:bg-bg-elevated/90 hover:text-strong",children:l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(ld,{className:"h-4 w-4 text-positive-400","aria-hidden":"true"}),"Ask Aero about ",e,"…"]})})})})}function aX({providers:e,active:n,override:i,onPick:o,disabled:u}){const[h,f]=N.useState(!1),b=N.useRef(null);if(N.useEffect(()=>{if(!h)return;const x=S=>{b.current?.contains(S.target)||f(!1)},k=S=>{S.key==="Escape"&&f(!1)};return window.addEventListener("mousedown",x),window.addEventListener("keydown",k),()=>{window.removeEventListener("mousedown",x),window.removeEventListener("keydown",k)}},[h]),e.length===0)return null;const v=n?.label.replace(/\s+\(.+\)$/,"")??"No provider";return l.jsxs("div",{ref:b,className:"relative",children:[l.jsxs("button",{type:"button",onClick:()=>f(x=>!x),disabled:u,className:"flex items-center gap-1 rounded-md px-2 py-1 text-sm text-secondary transition hover:bg-surface-inset hover:text-strong disabled:opacity-50","aria-label":"Switch agent model","aria-haspopup":"listbox","aria-expanded":h,title:n?`${n.label} · ${n.defaultModel}`:"Pick a provider",children:[l.jsx("span",{className:"font-medium text-strong",children:v}),l.jsx(Ic,{className:"h-3 w-3","aria-hidden":"true"})]}),h&&l.jsxs("div",{role:"listbox",className:"absolute right-0 top-full z-50 mt-1 w-64 overflow-hidden rounded-lg border border-base bg-bg shadow-xl",children:[l.jsx("div",{className:"border-b border-default px-3 py-2 text-sm font-medium text-secondary",children:"Answer engine"}),l.jsx("ul",{className:"max-h-72 overflow-y-auto py-1",children:e.map(x=>{const k=n?.id===x.id,S=i===x.id;return l.jsx("li",{children:l.jsxs("button",{type:"button",role:"option","aria-selected":k,disabled:!x.configured,onClick:()=>{x.configured&&(o(S?null:x.id),f(!1))},className:"flex w-full items-center gap-2 px-3 py-2.5 text-left text-sm transition enabled:hover:bg-bg-elevated disabled:cursor-not-allowed disabled:opacity-60",title:x.configured?x.defaultModel:`Add ${eC(x.id)} in Settings or your environment`,children:[l.jsx("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center",children:k?l.jsx(Oc,{className:"h-3 w-3 text-positive-400","aria-hidden":"true"}):null}),l.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-heading",children:x.label.replace(/\s+\(.+\)$/,"")}),S&&l.jsx("span",{className:"rounded-md border border-positive-800/60 bg-positive-950/60 px-2 py-0.5 text-[11px] text-positive",children:"Selected"}),!x.configured&&l.jsx("span",{className:"rounded-md border border-base px-2 py-0.5 text-[11px] text-secondary",children:"Needs setup"})]})},x.id)})}),i&&l.jsx("button",{type:"button",onClick:()=>{o(null),f(!1)},className:"w-full border-t border-default px-3 py-2 text-left text-[11px] text-secondary transition hover:bg-bg-elevated hover:text-heading",children:"Reset to default"})]})]})}const iX=144,sX=288,Uf=288,oX=8;function rX({title:e,matches:n,selectedIndex:i,onHover:o,onPick:u}){const h=N.useRef(null),f=N.useRef(null),b=N.useRef(null),[v,x]=N.useState(Uf);return N.useLayoutEffect(()=>{const k=h.current,S=k?.closest("[data-aero-panel]"),C=k?.parentElement;if(!k||!S||!C)return;const _=C.getBoundingClientRect().top-S.getBoundingClientRect().top-oX*2-(f.current?.getBoundingClientRect().height??0);x(_>0?Math.min(Uf,Math.floor(_)):Uf)},[n.length]),N.useEffect(()=>{b.current?.querySelector('[aria-selected="true"]')?.scrollIntoView?.({block:"nearest"})},[i]),l.jsxs("div",{ref:h,className:"absolute inset-x-3 bottom-full mb-2 overflow-hidden rounded-lg border border-base bg-bg/98 shadow-2xl",children:[l.jsx("div",{ref:f,className:"border-b border-default px-3 py-1.5 text-[10px] uppercase tracking-wider text-muted",children:e}),l.jsx("ul",{ref:b,role:"listbox",className:"overflow-y-auto py-1",style:{maxHeight:v},children:n.map((k,S)=>{const C=S===i;return l.jsx("li",{children:l.jsxs("button",{type:"button",role:"option","aria-selected":C,onMouseEnter:()=>o(S),onClick:()=>u(k),className:`flex w-full items-center gap-3 px-3 py-2 text-left text-sm transition ${C?"bg-bg-elevated text-heading":"text-neutral hover:bg-bg-elevated/60"}`,children:[l.jsx("span",{className:"font-medium",children:k.label}),l.jsx("span",{className:"ml-auto font-mono text-[11px] text-secondary",children:k.command})]})},k.command)})})]})}function Bk({onPick:e}){return l.jsx("div",{className:"flex flex-wrap gap-1.5",children:T0.map(n=>l.jsx("button",{type:"button",onClick:()=>e(n.prompt),className:"rounded-md border border-base bg-bg-elevated/70 px-3 py-1.5 text-sm text-neutral transition hover:border-strong hover:bg-mono-800/70 hover:text-heading",children:n.label},n.label))})}function eC(e){switch(e){case"claude":return"ANTHROPIC_API_KEY";case"openai":return"OPENAI_API_KEY";case"gemini":return"GEMINI_API_KEY";case"zai":return"ZAI_API_KEY"}}function lX(e,n){const i=e.timestamp??0;return`${e.role}:${i}:${n}`}function cX(e,n,i,o,u,h,f,b=!0){const v=[];let x=[],k=0;for(let C=e.length-1;C>=0;C--)if(e[C].role==="user"){k=C+1;break}const S=(C=!1)=>{x.length!==0&&(v.push(l.jsx(yX,{trails:x,betweenSteps:C&&h&&!f},`tools:${x[0].id}`)),x=[])};for(let C=0;C<e.length;C++){const _=e[C],z=lX(_,C);if(_.role==="user"){S();const q=typeof _.content=="string"?_.content:JSON.stringify(_.content);if(q.startsWith("[system]"))continue;v.push(l.jsx(uX,{text:q,projectName:n,providerOverride:i,scope:o,context:_.aeroContext,cliCopy:b},z));continue}if(_.role==="assistant"){const q=new Map;let T=C+1;for(;T<e.length&&e[T].role==="toolResult";){const U=e[T];q.set(U.toolCallId,U),T++}const V=h&&C>=k,Y=mX(_,q).map(U=>{const Z=u.find(B=>B.id===U.id),te={...U,...Z,label:U.label??Z?.label};return{...te,interrupted:te.endedAt===void 0&&(!V||te.interrupted)}}),M=Id(_);M.trim()&&(S(),v.push(l.jsxs("div",{className:"mt-3",children:[l.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-positive-400",children:"Aero"}),l.jsx(aC,{content:M})]},z))),x.push(...Y),C=T-1;continue}}return S(!0),v}function uX({text:e,projectName:n,providerOverride:i,scope:o,context:u,cliCopy:h=!0}){const[f,b]=N.useState(!1),v=N.useMemo(()=>dX(n,e,i,o,u),[n,e,i,o,u]);async function x(){try{await navigator.clipboard.writeText(v),b(!0),window.setTimeout(()=>b(!1),1500)}catch{}}return l.jsxs("div",{className:"group relative mt-3 rounded-md bg-bg-elevated/60 px-3 py-2 text-strong",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted",children:"You"}),h&&l.jsx("button",{type:"button",onClick:fn(x),className:"inline-flex items-center gap-1 rounded border border-mono-800/70 bg-bg/60 px-1.5 py-0.5 text-[10px] text-secondary opacity-0 transition hover:border-strong hover:text-heading group-hover:opacity-100 focus:opacity-100","aria-label":"Copy as CLI command",title:v,children:f?l.jsxs(l.Fragment,{children:[l.jsx(Oc,{className:"h-2.5 w-2.5 text-positive-400","aria-hidden":"true"}),"Copied"]}):l.jsxs(l.Fragment,{children:[l.jsx(U0,{className:"h-2.5 w-2.5","aria-hidden":"true"}),"Copy as CLI"]})})]}),l.jsx("div",{className:"whitespace-pre-wrap",children:e})]})}function dX(e,n,i,o,u){const h=["canonry","agent","ask",Rf(e),Rf(n)];return i&&h.push("--provider",i),o==="read-only"&&h.push("--scope","read-only"),u&&h.push("--context",Rf(JSON.stringify(u))),h.join(" ")}function mX(e,n){const i=[];for(const o of e.content){if(o.type!=="toolCall")continue;const u=o,h=n.get(u.id);i.push({id:u.id,name:u.name,args:u.arguments,label:h?.aeroToolLabel,durationMs:h?.aeroDurationMs,endedAt:h?.timestamp,isError:h?.isError,result:h?.content})}return i}const Lk=new Set(["aero_list_toolkits","aero_load_toolkit"]),pX=new Map([["Read","Reading"],["List","Listing"],["Get","Getting"],["Load","Loading"],["Find","Finding"],["Check","Checking"],["Compare","Comparing"],["Inspect","Inspecting"],["Preview","Previewing"],["Search","Searching"],["Show","Showing"],["Run","Running"]]);function Er(e){return e.endedAt===void 0&&!e.interrupted}function E0(e){return e.label??e.name.replace(/^(?:canonry|aero)_/,"").replace(/_/g," ")}function tC(e){const n=e.durationMs??(e.endedAt!=null&&e.startedAt!=null?e.endedAt-e.startedAt:null);return n==null||n<0?null:n}function nC(e){let n=null;for(const i of e){const o=tC(i);o!=null&&(n=(n??0)+o)}return n}function T1(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function hX(e){const n=Math.floor(Math.max(0,e)/1e3);return n<60?`${n}s`:`${Math.floor(n/60)}m ${n%60}s`}function Vf(e,n,i){return`${e} ${e===1?n:i}`}function Uk(e=""){return pX.get(e.charAt(0).toUpperCase()+e.slice(1))}function fX(e){const[n,...i]=e.trim().split(/\s+/),o=Uk(n);if(!o)return"Working…";if(i[0]==="or"||i[0]==="and"){const u=Uk(i[1]);return u?`${[o,i[0],u.toLowerCase(),...i.slice(2)].join(" ")}…`:"Working…"}return`${[o,...i].join(" ")}…`}function gX(e){const[n,i]=N.useState(()=>Date.now());return N.useEffect(()=>{if(!e)return;const o=()=>i(Date.now()),u=window.setTimeout(o,0),h=window.setInterval(o,1e3);return()=>{window.clearTimeout(u),window.clearInterval(h)}},[e]),n}function yX({trails:e,betweenSteps:n}){const[i,o]=N.useState(!1),u=N.useId(),h=e.filter(U=>!Lk.has(U.name)),f=e.filter(U=>Lk.has(U.name)),b=h.filter(Er),v=b.length>0?b[b.length-1]:void 0,x=f.some(Er),k=v!==void 0||x||n,S=h.length>0?h:f,C=S.filter(U=>!Er(U)&&U.isError===!0).length,_=e.some(U=>U.interrupted),z=e.flatMap(U=>U.startedAt===void 0?[]:[U.startedAt]),q=z.length>0?Math.min(...z):void 0,T=gX(k),V=nC(S),Y=k?v?fX(E0(v)):x?"Loading tools…":"Working…":h.length>0?Vf(h.length,"step","steps"):Vf(f.length,"setup step","setup steps"),M=new Map;for(const U of h){const Z=E0(U),te=M.get(Z);te?te.push(U):M.set(Z,[U])}return l.jsxs("div",{className:"mt-3 rounded-md border border-mono-800/70 bg-surface-hover",children:[l.jsxs("button",{type:"button",onClick:()=>o(U=>!U),className:"flex w-full items-center gap-2 px-2.5 py-1.5 text-left","aria-expanded":i,"aria-controls":u,children:[l.jsx("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:k?l.jsx(Cs,{className:"h-3 w-3 animate-spin text-positive-400 motion-reduce:animate-none","aria-hidden":"true"}):C>0?l.jsx(dm,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):_?l.jsx(hS,{className:"h-3 w-3 text-muted","aria-hidden":"true"}):l.jsx(Oc,{className:"h-3 w-3 text-muted","aria-hidden":"true"})}),l.jsx("span",{className:"min-w-0 truncate text-sm font-medium text-heading",children:Y}),C>0&&l.jsxs("span",{className:"shrink-0 rounded-md border border-negative-800/50 bg-negative-950/20 px-1.5 py-0.5 text-[10px] text-negative-400",children:[C," failed"]}),_&&l.jsx("span",{className:"shrink-0 rounded-md border border-mono-800/70 px-1.5 py-0.5 text-[10px] text-muted",children:"interrupted"}),l.jsxs("span",{className:"ml-auto flex shrink-0 items-center gap-2 text-[10px] text-muted",children:[k?l.jsxs(l.Fragment,{children:[v&&l.jsxs("span",{children:["step ",h.indexOf(v)+1]}),q!==void 0&&l.jsx("span",{className:"tabular-nums","aria-hidden":"true",children:hX(T-q)})]}):V!=null&&l.jsx("span",{className:"tabular-nums",children:T1(V)}),l.jsx(Pc,{className:`h-3 w-3 transition-transform ${i?"rotate-90":""}`,"aria-hidden":"true"})]})]}),i&&l.jsxs("div",{id:u,className:"space-y-1.5 border-t border-default px-2.5 py-2",children:[[...M].map(([U,Z])=>l.jsx(Vk,{trails:Z,title:U},`label:${U}`)),f.length>0&&l.jsx(Vk,{trails:f,title:`+ ${Vf(f.length,"setup step","setup steps")}`,muted:!0},"setup")]})]})}function Vk({trails:e,title:n,muted:i=!1}){const[o,u]=N.useState(!1),h=N.useId(),f=!i&&e.length===1,b=e.some(Er),v=e.filter(C=>!Er(C)&&C.isError===!0).length,x=e.some(C=>C.interrupted),k=nC(e),S=f?()=>u(!0):void 0;return l.jsxs("div",{className:f?void 0:i?"rounded-md":"rounded-md border border-mono-800/70 bg-surface-hover",onFocus:S,onClick:S,children:[!f&&l.jsxs("button",{type:"button",onClick:()=>u(C=>!C),className:"flex w-full items-center gap-2 px-2.5 py-1.5 text-left","aria-expanded":o,"aria-controls":h,children:[!i&&l.jsx("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:b?l.jsx(Cs,{className:"h-3 w-3 animate-spin text-positive-400 motion-reduce:animate-none","aria-hidden":"true"}):v>0?l.jsx(dm,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):l.jsx(fS,{className:"h-3 w-3 text-muted","aria-hidden":"true"})}),l.jsx("span",{className:i?"text-xs text-muted":"text-sm font-medium text-heading",children:n}),!i&&l.jsxs("span",{className:"text-[10px] text-muted",children:["×",e.length]}),l.jsxs("span",{className:"ml-auto flex items-center gap-2 text-[10px] text-muted",children:[b?l.jsx("span",{className:"text-positive-400",children:"running…"}):l.jsxs(l.Fragment,{children:[v>0?l.jsxs("span",{className:"text-negative-400",children:[v," failed"]}):l.jsx("span",{children:x?"interrupted":"done"}),k!=null&&l.jsx("span",{className:"tabular-nums",children:T1(k)})]}),l.jsx(Pc,{className:`h-3 w-3 transition-transform ${o?"rotate-90":""}`,"aria-hidden":"true"})]})]}),(f||o)&&l.jsx("div",{id:h,className:f?void 0:"space-y-1.5 px-2.5 pb-2",children:e.map(C=>l.jsx(bX,{trail:C},C.id))})]})}function bX({trail:e}){const[n,i]=N.useState(!1),o=Er(e),u=!o&&e.isError===!0,h=tC(e),f=h==null?null:T1(h),b=u?"border-negative-800/50":o?"border-positive-800/50":"border-mono-800/70",v=u?"bg-negative-950/20":o?"bg-positive-950/20":"bg-surface-hover";return l.jsxs("div",{className:`rounded-md border ${b} ${v}`,children:[l.jsxs("button",{type:"button",onClick:()=>i(x=>!x),className:"flex w-full items-center gap-2 px-2.5 py-1.5 text-left","aria-expanded":n,children:[l.jsx("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:o?l.jsx(Cs,{className:"h-3 w-3 animate-spin text-positive-400","aria-hidden":"true"}):u?l.jsx(dm,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):l.jsx(fS,{className:"h-3 w-3 text-muted","aria-hidden":"true"})}),l.jsx("span",{className:"text-sm font-medium text-heading",children:E0(e)}),l.jsxs("span",{className:"ml-auto flex items-center gap-2 text-[10px] text-muted",children:[o?l.jsx("span",{className:"text-positive-400",children:"running…"}):l.jsxs(l.Fragment,{children:[l.jsx("span",{children:e.interrupted?"interrupted":u?"failed":"done"}),f&&l.jsx("span",{children:f})]}),l.jsx(Pc,{className:`h-3 w-3 transition-transform ${n?"rotate-90":""}`,"aria-hidden":"true"})]})]}),n&&l.jsxs("div",{className:"border-t border-default px-2.5 py-2 text-[11px] text-secondary",children:[l.jsx("div",{className:"mb-2 text-xs text-secondary",children:e.name}),l.jsx("div",{className:"mb-1 text-xs text-secondary",children:"Inputs"}),l.jsx("pre",{className:"mb-2 overflow-x-auto whitespace-pre-wrap break-all text-xs text-neutral",children:$k(e.args)}),!o&&e.result!==void 0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mb-1 text-[9px] uppercase tracking-wider text-faint",children:u?"Error":"Result"}),l.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-all text-xs text-neutral",children:$k(e.result)})]})]})]})}function $k(e){try{const n=typeof e=="string"?e:JSON.stringify(e,null,2);return n.length>2e3?`${n.slice(0,2e3)}
|
|
64
|
+
… (${n.length-2e3} more chars)`:n}catch{return String(e)}}function aC({content:e}){return l.jsx("div",{className:"text-heading",children:l.jsx(J5,{remarkPlugins:[W5],components:{h1:n=>l.jsx("h1",{...n,className:"mt-3 mb-2 text-base font-semibold text-primary"}),h2:n=>l.jsx("h2",{...n,className:"mt-3 mb-2 text-sm font-semibold text-primary"}),h3:n=>l.jsx("h3",{...n,className:"mt-3 mb-1.5 text-sm font-semibold text-heading"}),h4:n=>l.jsx("h4",{...n,className:"mt-2 mb-1 text-xs font-semibold uppercase tracking-wide text-neutral"}),p:n=>l.jsx("p",{...n,className:"mb-2 leading-relaxed"}),ul:n=>l.jsx("ul",{...n,className:"mb-2 ml-4 list-disc space-y-1"}),ol:n=>l.jsx("ol",{...n,className:"mb-2 ml-4 list-decimal space-y-1"}),li:n=>l.jsx("li",{...n,className:"marker:text-mono-600"}),strong:n=>l.jsx("strong",{...n,className:"font-semibold text-primary"}),em:n=>l.jsx("em",{...n,className:"text-strong"}),code:({children:n,...i})=>l.jsx("code",{...i,className:"rounded bg-mono-800/70 px-1 py-0.5 font-mono text-[12px] text-positive-200",children:n}),pre:n=>l.jsx("pre",{...n,className:"mb-2 overflow-x-auto rounded-md border border-base bg-bg-elevated/70 p-3 font-mono text-xs text-strong"}),a:n=>l.jsx("a",{...n,className:"text-positive-400 underline decoration-positive-700 hover:decoration-positive-400",target:"_blank",rel:"noopener noreferrer"}),table:n=>l.jsx("div",{className:"mb-2 overflow-x-auto",children:l.jsx("table",{...n,className:"w-full border-collapse text-xs"})}),thead:n=>l.jsx("thead",{...n,className:"border-b border-base"}),th:n=>l.jsx("th",{...n,className:"px-2 py-1 text-left font-semibold text-neutral"}),tr:n=>l.jsx("tr",{...n,className:"border-b border-mono-900"}),td:n=>l.jsx("td",{...n,className:"px-2 py-1 text-strong"}),blockquote:n=>l.jsx("blockquote",{...n,className:"mb-2 border-l-2 border-strong pl-3 italic text-secondary"}),hr:()=>l.jsx("hr",{className:"my-3 border-base"})},children:e})})}function vX(){return l.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[l.jsx("div",{className:"text-[10px] uppercase tracking-wider text-positive-400",children:"Aero"}),l.jsxs("div",{className:"flex items-center gap-1","aria-label":"Aero is thinking",children:[l.jsx("span",{className:"aero-dot h-1.5 w-1.5 rounded-full bg-positive-400/80"}),l.jsx("span",{className:"aero-dot aero-dot-2 h-1.5 w-1.5 rounded-full bg-positive-400/60"}),l.jsx("span",{className:"aero-dot aero-dot-3 h-1.5 w-1.5 rounded-full bg-positive-400/40"})]})]})}function iC({isAdmin:e,account:n}){return e||n?.role==="viewer"&&dK()}function xX(){const{isAdmin:e,account:n}=fa(),i=sS(),o=/^\/projects\/([^/]+)/.exec(i.pathname),u=o?decodeURIComponent(o[1]):null,h=yt({...Oo({client:ee}),enabled:u!==null,staleTime:6e4}),f=EY(i.pathname,i.search),b=h.data??[],v=b.find(C=>C.id===u)??b.find(C=>C.name===u),x=yH(v?.name??u??"",f),k=h1(),S=k||iC({isAdmin:e,account:n});return!u||!S||!v?null:l.jsx(nX,{projectName:v.name,context:x,preview:k},v.name)}const R0={project:"getApiV1ProjectsByName",google:"getApiV1ProjectsByNameGoogle",gsc:"getApiV1ProjectsByNameGoogleGsc",bing:"getApiV1ProjectsByNameBing",ga:"getApiV1ProjectsByNameGa",gbp:"getApiV1ProjectsByNameGbp",ads:"getApiV1ProjectsByNameAds",googleAds:"getApiV1ProjectsByNameGoogleAds",gtm:"getApiV1ProjectsByNameGtm",conversionTracking:"getApiV1ProjectsByNameConversionTracking",traffic:"getApiV1ProjectsByNameTraffic",discovery:"getApiV1ProjectsByNameDiscover",researchRuns:"getApiV1ProjectsByNameResearchRuns",visibilityReport:"getApiV1ProjectsByNameVisibilityReport",queryTracking:"getApiV1ProjectsByNameQueryTracking",technicalAeo:"getApiV1ProjectsByNameTechnicalAeo",runs:"getApiV1ProjectsByNameRuns"};function Bn(e,n){const i=R0[n];return e.invalidateQueries({predicate:o=>{const u=o.queryKey[0];return typeof u?._id=="string"&&u._id.startsWith(i)}})}function Cie(e,n){return e.invalidateQueries({predicate:i=>{const o=i.queryKey[0];return o?.path?.name!==n||typeof o._id!="string"?!1:o._id.startsWith("getApiV1ProjectsByNameMeasurement")||o._id===R0.queryTracking||o._id===R0.visibilityReport||o._id==="getApiV1ProjectsByNameQueries"||o._id==="getApiV1ProjectsByName"}})}function Rc(e,n,i){switch(e.invalidateQueries({queryKey:x1({client:ee})}),e.invalidateQueries({queryKey:Es({client:ee})}),Bn(e,"runs"),n){case ze["answer-visibility"]:N0(e,i,"none"),Bn(e,"visibilityReport"),Bn(e,"queryTracking");return;case ze["backlink-extract"]:return;case ze["site-audit"]:Bn(e,"technicalAeo");return;case ze["gsc-sync"]:case ze["inspect-sitemap"]:Bn(e,"gsc");return;case ze["ga-sync"]:Bn(e,"ga");return;case ze["traffic-sync"]:Bn(e,"ga"),Bn(e,"traffic");return;case ze["bing-inspect"]:case ze["bing-inspect-sitemap"]:Bn(e,"bing");return;case ze["aeo-discover-seed"]:case ze["aeo-discover-probe"]:N0(e,i);return;case ze["gbp-sync"]:Bn(e,"gbp");return;case ze["ads-sync"]:Bn(e,"ads");return;case ze["google-ads-sync"]:Bn(e,"googleAds"),Bn(e,"conversionTracking");return;case ze["gtm-sync"]:Bn(e,"gtm"),Bn(e,"conversionTracking");return;default:return n}}const Gk=[{label:"GitHub",href:"https://github.com/Canonry/canonry",Icon:mS},{label:"Docs",href:"https://github.com/Canonry/canonry/tree/main/docs",Icon:G5},{label:"Changelog",href:"https://github.com/Canonry/canonry/releases",Icon:K5}],Kk=e=>({label:e,state:"checking",detail:"Checking service health"}),wX={apiStatus:Kk("API"),workerStatus:Kk("Worker")};function kX(e){return e==="completed"?"positive":e==="partial"?"caution":"negative"}function SX(e){const n=wc(e.kind);return e.status==="completed"?`${n} completed`:e.status==="partial"?`${n} completed with partial results`:e.status==="cancelled"?`${n} cancelled`:`${n} failed`}function jX(e,n){return e.error?`${n}: ${kg(e.error)}`:e.location?`${n} · ${e.location}`:n}function Hk(e,n,i){if(n)return n;const o=i.find(u=>u.id===e);return o?.displayName||o?.name||e}function AX(e,n){return[e.completed>0?`${e.completed} completed`:null,e.partial>0?`${e.partial} partial`:null,e.failed>0?`${e.failed} failed`:null,e.cancelled>0?`${e.cancelled} cancelled`:null,n>0?`${n} skipped at queue time`:null].filter(Boolean).join(", ")}function NX(e){return e.failed>0||e.cancelled>0?"negative":e.partial>0?"caution":"positive"}function CX(){const e=ma(),n=N.useSyncExternalStore(TN,$i,$i),i=Object.keys(n.runs).length>0||Object.keys(n.batches).length>0,o=yt({...Bm({client:ee}),enabled:i,staleTime:Mr,refetchInterval:3e3}),u=yt({...Oo({client:ee}),enabled:i}),h=N.useRef({}),f=N.useCallback(()=>{o.refetch()},[o.refetch]);return N.useEffect(()=>{i&&f()},[i,f]),N.useEffect(()=>{if(!i||typeof window>"u")return;const b=()=>{document.visibilityState==="visible"&&f()};return window.addEventListener("focus",f),document.addEventListener("visibilitychange",b),()=>{window.removeEventListener("focus",f),document.removeEventListener("visibilitychange",b)}},[i,f]),N.useEffect(()=>{const b=o.data??[],v=u.data??[],x=Object.fromEntries(b.map(S=>[S.id,S])),k=Object.fromEntries(b.map(S=>[S.id,S.status]));for(const S of Object.values(n.runs)){const C=x[S.runId];if(!C||!_Q(C.status)||(h.current[C.id]??S.lastAnnouncedStatus)===C.status)continue;const z=v.find(T=>T.id===C.projectId);if(z&&Rc(e,C.kind,z.name),S.sourceAction==="run-all"){Of(C.id);continue}const q=Hk(C.projectId,S.projectLabel,v);xn({title:SX(C),detail:jX(C,q),tone:kX(C.status),dedupeKey:`run:${C.id}`,dedupeMode:"replace",cta:{label:"View run",intent:"open-run-drawer",runId:C.id}}),Of(C.id)}if(o.data!==void 0){const S=new Set(b.map(_=>_.id)),C=EQ(Object.values(n.runs),S,Date.now(),TQ);for(const _ of C){const z=v.find(q=>q.id===_.projectId);z&&Rc(e,_.kind,z.name),_.sourceAction!=="run-all"&&xn({title:`${wc(_.kind)} status unavailable`,detail:Hk(_.projectId,_.projectLabel,v),tone:"neutral",dedupeKey:`run-stale:${_.runId}`,dedupeMode:"replace"}),Of(_.runId)}}for(const S of Object.values(n.batches)){const C=RQ(S.runIds,x);C.finished&&(xn({title:"Run-all batch finished",detail:AX(C,S.skippedCount),tone:NX(C),dedupeKey:`batch:${S.batchId}`,dedupeMode:"replace",cta:{label:"View runs",intent:"go-to-runs"}}),CQ(S.batchId))}h.current=k},[u.data,o.data,n,e]),null}function _X(){const{account:e,isAdmin:n}=fa(),i=Wc(),o=N.useMemo(()=>dN(),[]),u=N.useMemo(cK,[]),h=N.useMemo(uK,[]),f=h1()||h&&iC({isAdmin:n,account:e}),b=N.useMemo(mK,[]),v=sS(),{dashboard:x,isLoading:k,refetch:S}=Gm(void 0,{includeSettings:!o,includeOverviews:!1,pauseProjectPolling:v.pathname==="/setup"}),z=N1(!i,i?.health).data??i?.health??wX,{runId:q,evidenceId:T,closeDrawer:V}=C1(),[Y,M]=N.useState(!1),[U,Z]=N.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem("canonry:sidebarHidden")==="true"}catch{return!1}}),[te,B]=N.useState(()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem("canonry:dismissedUpdateVersion")}catch{return null}}),[X]=N.useState(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("force-update")),le=X?{current:z.apiStatus.version??"0.0.0",latest:X,url:"https://www.npmjs.com/package/@canonry/canonry",upgradeCommand:"npm install -g @canonry/canonry"}:z.apiStatus.updateAvailable,Je=b&&le&&le.latest!==te,nt=()=>{if(le){try{window.localStorage.setItem("canonry:dismissedUpdateVersion",le.latest)}catch{}B(le.latest)}},$e=()=>{const me=!U;try{me?window.localStorage.setItem("canonry:sidebarHidden","true"):window.localStorage.removeItem("canonry:sidebarHidden")}catch{}Z(me)},Pe=gY(q),Se=Pe.data??null,Ue=Pe.isLoading;N.useEffect(()=>{Se&&Se.status!=="running"&&Se.status!=="queued"&&S()},[Se?.status,S]),N.useEffect(()=>{M(!1)},[v.pathname]),N.useEffect(()=>{if(typeof window>"u"||!q&&!T)return;const me=at=>{at.key==="Escape"&&V()};return window.addEventListener("keydown",me),()=>{window.removeEventListener("keydown",me)}},[q,T,V]);const P=x??i?.dashboard??null,J=v.pathname==="/setup",be=J&&P!==null&&P.portfolioOverview.projects.length===0,je=J&&(v.search.onboarding==="site-health"||v.search.onboarding==="first-run"||v.search.onboarding==="complete"),[W,_e]=N.useState(be);N.useEffect(()=>{J?be&&_e(!0):_e(!1)},[be,J]);const ve=J&&(je||be||W||J&&P===null),de=ve?"app-shell-focus":U?"app-shell-sidebar-hidden":"",ce=q?(P?UZ(P,q):void 0)??(Se?$m(Se,P?.projects.find(me=>me.project.id===Se.projectId)?.project.displayName??P?.projects.find(me=>me.project.id===Se.projectId)?.project.name??"Unknown project"):void 0):void 0,F=N.useMemo(()=>qZ(v.pathname,P),[v.pathname,P]),{commandCenter:pe,evidenceLoading:Oe,evidenceError:Ae,isError:st,refetch:Ve}=pY(T?F:null,{evidence:!0}),At=N.useMemo(()=>{if(T)return $Z(pe,P,T)},[T,pe,P]),Ke=(()=>{const me=v.pathname;if(me==="/")return"Portfolio";if(me==="/projects")return"Projects";if(me==="/runs")return"Runs";if(me==="/history")return"History";if(me==="/settings")return"Settings";if(me==="/setup")return"Setup";if(me==="/backlinks")return"Backlink data";if(me==="/traffic"||me.startsWith("/traffic/"))return"Traffic sources";if(me.startsWith("/projects/")){const at=P?.projects.find(zt=>zt.project.name===F);return at?.project.displayName||at?.project.name||F||"Projects"}return"Not found"})();if(o){const me=$A(o.projectTabs),at=!o.views||o.views.includes(CH(v.pathname));return l.jsxs("div",{className:"app-shell app-shell-embed","data-theme":DH(o.theme),style:zH(o.theme),children:[l.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),l.jsx("main",{id:"content",className:"page-shell",children:me?l.jsx("div",{className:"embed-view-unavailable",role:"status",children:"This embed uses the retired Report tab. Update its allowed tabs to show AI Visibility."}):at?l.jsx(Gf,{}):l.jsx("div",{className:"embed-view-unavailable",role:"status",children:"This view is not available in embed mode."})})]})}return l.jsxs(l.Fragment,{children:[l.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),l.jsx(SY,{}),l.jsxs("div",{className:`app-shell ${de}${wo()?" app-shell-demo":""}`,children:[!ve&&!U&&l.jsxs("aside",{id:"desktop-sidebar",className:"sidebar","aria-label":"Primary navigation",children:[l.jsx("div",{className:"sidebar-brand",children:l.jsx(Sk,{version:z.apiStatus.version,updateAvailable:Je?le:null,onDismissUpdate:nt})}),l.jsxs("nav",{className:"sidebar-nav",children:[l.jsxs(et,{to:"/",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(q5,{className:"sidebar-icon"}),l.jsx("span",{children:"Portfolio"})]}),l.jsxs(et,{to:"/projects",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[l.jsx(M5,{className:"sidebar-icon"}),l.jsx("span",{children:"Projects"})]}),l.jsxs(et,{to:"/runs",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(B5,{className:"sidebar-icon"}),l.jsx("span",{children:"Runs"})]}),l.jsxs(et,{to:"/history",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(pS,{className:"sidebar-icon"}),l.jsx("span",{children:"History"})]}),l.jsxs(et,{to:"/traffic",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[l.jsx(L5,{className:"sidebar-icon"}),l.jsx("span",{children:"Traffic sources"})]}),!wo()&&l.jsxs(et,{to:"/backlinks",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(U5,{className:"sidebar-icon"}),l.jsx("span",{children:"Backlink data"})]}),n&&l.jsxs(et,{to:"/settings",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(V5,{className:"sidebar-icon"}),l.jsx("span",{children:"Settings"})]}),k?l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"sidebar-section-title",children:"Tracked projects"}),[1,2,3].map(me=>l.jsxs("div",{className:"sidebar-skeleton-item",children:[l.jsx("span",{className:"skeleton-circle size-2"}),l.jsx("span",{className:"skeleton-text flex-1",style:{width:`${50+me*15}%`}})]},me))]}):P&&P.projects.length>0?l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"sidebar-section-title",children:"Tracked projects"}),P.projects.map(me=>{const at=me.visibilitySummary.tone;return l.jsxs(et,{to:"/projects/$projectName",params:{projectName:me.project.name},className:"sidebar-project",activeProps:{className:"sidebar-project sidebar-project-active"},children:[l.jsx("span",{className:`sidebar-dot sidebar-dot-${at}`}),l.jsx("span",{children:me.project.displayName||me.project.name})]},me.project.id)})]}):k?null:l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"sidebar-section-title",children:"Resources"}),n&&l.jsxs(et,{to:"/setup",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx($5,{className:"sidebar-icon"}),l.jsx("span",{children:"Setup"})]})]})]}),e&&l.jsxs("div",{className:"sidebar-account",children:[l.jsxs("div",{className:"sidebar-account-identity",children:[l.jsx("span",{className:"sidebar-account-name",children:e.name}),e.role==="viewer"?l.jsx("span",{className:"sidebar-account-role",children:nk()}):null]}),l.jsx(re,{type:"button",variant:"ghost",size:"sm",onClick:fn(async()=>{await ok(),window.location.reload()}),children:"Sign out"})]}),u?l.jsx("div",{className:"sidebar-footer",children:Gk.map(({label:me,href:at,Icon:zt})=>l.jsx("a",{className:"sidebar-footer-icon",href:at,target:"_blank",rel:"noopener noreferrer",title:me,"aria-label":me,children:l.jsx(zt,{className:"size-4"})},at))}):null]}),l.jsxs("div",{className:"main-area",children:[l.jsxs("header",{className:"topbar",children:[l.jsxs("div",{className:"topbar-left",children:[!ve&&l.jsx(re,{className:"sidebar-privacy-toggle",variant:"ghost",size:"icon",type:"button","aria-label":U?"Show sidebar":"Hide sidebar","aria-controls":U?void 0:"desktop-sidebar","aria-expanded":!U,title:U?"Show sidebar":"Hide sidebar",onClick:$e,children:U?l.jsx(H5,{className:"size-4"}):l.jsx(F5,{className:"size-4"})}),l.jsx("div",{className:"topbar-brand-mobile",children:l.jsx(Sk,{compact:!0})}),l.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[l.jsx(et,{to:"/",children:"Home"}),l.jsx(Pc,{className:"breadcrumb-sep size-3"}),l.jsx("span",{className:"breadcrumb-current",children:Ke})]})]}),l.jsxs("div",{className:"topbar-actions",children:[l.jsx(jY,{}),l.jsxs("div",{className:"health-pill-row",children:[l.jsxs("span",{className:`health-pill health-pill-${z.apiStatus.state}`,title:Br(z.apiStatus),children:["API ",z.apiStatus.state==="ok"?"ok":z.apiStatus.state]}),l.jsx("span",{className:`health-pill health-pill-${z.workerStatus.state}`,title:Br(z.workerStatus),children:`Worker ${z.workerStatus.state==="ok"?"ok":z.workerStatus.state}`})]}),ve?null:l.jsxs(re,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":Y,"aria-controls":"mobile-nav",onClick:()=>M(me=>!me),children:[l.jsx(Q5,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),ve?null:l.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${Y?"mobile-nav-open":""}`,children:[l.jsxs(re,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>M(!1),children:[l.jsx(Lr,{className:"size-5"}),l.jsx("span",{className:"sr-only",children:"Close navigation"})]}),l.jsx(et,{to:"/",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Portfolio"}),l.jsx(et,{to:"/projects",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Projects"}),l.jsx(et,{to:"/runs",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Runs"}),l.jsx(et,{to:"/history",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"History"}),l.jsx(et,{to:"/traffic",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Traffic sources"}),!wo()&&l.jsx(et,{to:"/backlinks",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Backlink data"}),n&&l.jsx(et,{to:"/settings",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Settings"}),P&&P.projects.length>0?l.jsxs("div",{className:"mobile-nav-section",children:[l.jsx("p",{className:"mobile-nav-section-title",children:"Tracked projects"}),P.projects.map(me=>l.jsx(et,{to:"/projects/$projectName",params:{projectName:me.project.name},className:"mobile-nav-link",children:me.project.name},me.project.id))]}):null,e&&l.jsxs("div",{className:"mobile-nav-section",children:[l.jsx("p",{className:"mobile-nav-section-title",children:"Signed in"}),l.jsxs("div",{className:"sidebar-account",children:[l.jsxs("div",{className:"sidebar-account-identity",children:[l.jsx("span",{className:"sidebar-account-name",children:e.name}),e.role==="viewer"?l.jsx("span",{className:"sidebar-account-role",children:nk()}):null]}),l.jsx(re,{type:"button",variant:"ghost",size:"sm","data-testid":"mobile-sign-out",onClick:fn(async()=>{await ok(),window.location.reload()}),children:"Sign out"})]})]})]}),l.jsx("main",{id:"content",className:`page-shell ${f&&F?"pb-20":""}`.trim(),children:k&&!i?l.jsxs("div",{className:"page-skeleton",children:[l.jsxs("div",{className:"page-skeleton-header",children:[l.jsx("div",{className:"skeleton-text h-6 w-40"}),l.jsx("div",{className:"skeleton-text-sm w-72"})]}),l.jsx("div",{className:"page-skeleton-grid",children:[1,2,3].map(me=>l.jsxs("div",{className:"page-skeleton-card",children:[l.jsx("div",{className:"skeleton-text w-24"}),l.jsx("div",{className:"skeleton-text w-full"}),l.jsx("div",{className:"skeleton-text-sm w-3/4"})]},me))}),l.jsx("div",{className:"page-skeleton-grid",style:{gridTemplateColumns:"1fr 1fr"},children:[1,2].map(me=>l.jsxs("div",{className:"page-skeleton-card",children:[l.jsx("div",{className:"skeleton-text w-20"}),l.jsx("div",{className:"space-y-2",children:[1,2,3].map(at=>l.jsx("div",{className:"skeleton-text-sm w-full"},at))})]},me))})]}):l.jsx(Gf,{})}),l.jsxs("footer",{className:"footer",children:[l.jsxs("span",{className:"footer-brand",children:[l.jsx("span",{children:l.jsx("a",{href:"https://canonry.ai",children:"Canonry"})}),z.apiStatus.version&&z.apiStatus.version!=="unknown"?l.jsxs("span",{className:"footer-version",children:["v",z.apiStatus.version]}):null]}),u?l.jsx("div",{className:"footer-links",children:Gk.map(({label:me,href:at,Icon:zt})=>l.jsx("a",{href:at,target:"_blank",rel:"noopener noreferrer",title:me,"aria-label":me,className:"footer-icon",children:l.jsx(zt,{className:"size-3.5"})},at))}):null]})]}),q&&!ce&&Ue?l.jsx(Sd,{open:!0,title:"Loading run details",subtitle:"Fetching the durable run record",onClose:V,children:l.jsx("p",{className:"text-sm text-muted",role:"status",children:"Loading run details…"})}):null,q&&!ce&&Pe.isError?l.jsx(Sd,{open:!0,title:"Run unavailable",subtitle:"The run could not be loaded",onClose:V,children:l.jsx("p",{className:"text-sm text-negative",children:Pe.error instanceof Error?Pe.error.message:"Run details are unavailable."})}):null,ce?l.jsxs(Sd,{open:!0,title:ce.summary,subtitle:`${ce.projectName} · ${ce.kindLabel}`,onClose:V,children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[l.jsx(A1,{status:ce.status}),l.jsx("span",{className:"text-secondary",children:ce.startedAt}),l.jsx("span",{className:"text-muted",children:ce.duration}),l.jsx("span",{className:"text-faint",children:ce.triggerLabel})]}),ce.status==="failed"&&ce.statusDetail&&l.jsx("p",{className:"mt-2 text-sm text-negative",children:ce.statusDetail}),l.jsxs("div",{className:"mt-4",children:[l.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted mb-2",children:"Activity Log"}),Ue?l.jsx("p",{className:"text-sm text-muted",children:"Loading run details..."}):Se?.snapshots&&Se.snapshots.length>0?l.jsxs("div",{className:"space-y-2",children:[Se.snapshots.map(me=>l.jsxs("div",{className:"rounded-lg border border-default bg-surface p-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[l.jsx("p",{className:"text-sm font-medium text-strong truncate",children:me.query??"Unknown query"}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(jZ,{provider:me.provider}),l.jsx(KN,{variant:me.citationState===yc.cited?"success":"neutral",children:me.citationState})]})]}),me.model&&l.jsx("p",{className:"text-[11px] text-muted font-mono",children:me.model}),me.citedDomains.length>0&&l.jsxs("p",{className:"text-xs text-muted mt-1",children:[l.jsx("span",{className:"text-secondary",children:"Sources:"})," ",me.citedDomains.join(", ")]}),me.citedCompetitorDomains.length>0&&l.jsxs("p",{className:"text-xs text-negative-400/80 mt-0.5",children:["Competitor cited: ",me.citedCompetitorDomains.join(", ")]}),me.mentionedCompetitorDomains.length>0&&l.jsxs("p",{className:"text-xs text-negative-400/80 mt-0.5",children:["Competitor mentioned: ",me.mentionedCompetitorDomains.join(", ")]}),me.groundingSources&&me.groundingSources.length>0&&l.jsxs("details",{className:"mt-2",children:[l.jsxs("summary",{className:"text-xs text-muted cursor-pointer hover:text-secondary",children:[me.groundingSources.length," grounding source",me.groundingSources.length!==1?"s":""]}),l.jsx("ul",{className:"mt-2 space-y-3",children:me.groundingSources.map((at,zt)=>l.jsx("li",{className:"min-w-0",children:l.jsx(A0,{url:at.uri,title:at.title})},zt))})]}),me.answerText&&l.jsxs("details",{className:"mt-1",children:[l.jsx("summary",{className:"text-xs text-muted cursor-pointer hover:text-secondary",children:"Answer preview"}),l.jsx("p",{className:"mt-1 text-xs text-secondary leading-relaxed whitespace-pre-wrap",children:me.answerText})]})]},me.id)),Se.status==="running"&&l.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[l.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-caution-500 animate-pulse"}),"Running remaining queries..."]})]}):Se&&Se.status==="running"?l.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[l.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-caution-500 animate-pulse"}),"Waiting for first query result..."]}):Se&&Se.status==="queued"?l.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[l.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-mono-500 animate-pulse"}),"Run queued, waiting for execution slot..."]}):Se&&Se.error?l.jsxs("div",{className:"rounded-lg border border-negative-800/40 bg-negative-950/20 p-3",children:[l.jsx("p",{className:"text-sm font-medium text-negative mb-2",children:"Run failed"}),l.jsx("pre",{className:"max-h-48 overflow-y-auto whitespace-pre-wrap break-words font-mono text-xs leading-5 text-negative",children:xH(Se.error)})]}):l.jsx("p",{className:"text-sm text-muted",children:"No snapshot data available."})]})]}):null,T&&!At?l.jsx(Sd,{open:!0,title:Oe?"Loading answer":"Answer unavailable",subtitle:"Query evidence",onClose:V,children:Oe?l.jsx("p",{role:"status",className:"text-sm text-secondary",children:"Loading answer…"}):l.jsxs(l.Fragment,{children:[l.jsx("p",{role:"alert",className:"text-sm text-secondary",children:Ae||st?"Could not load this answer.":"This answer is not in the available query evidence."}),l.jsx(re,{type:"button",variant:"outline",onClick:()=>{Ve()},children:"Retry"})]})}):null,At?l.jsx(IZ,{evidence:At.evidence,project:At.project,onClose:V}):null,l.jsx(CX,{}),l.jsx(vY,{}),f?l.jsx(xX,{}):null]})]})}class TX extends N.Component{state={error:null};static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,i){console.error("[ErrorBoundary]",n,i.componentStack),nm({kind:"render",error:n,component:this.props.name??"root"})}handleReset=()=>{this.setState({error:null})};render(){return this.state.error?l.jsx("div",{className:"page-container",children:l.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-20 text-center",children:[l.jsx("div",{className:"rounded-full bg-negative-950/40 p-3",children:l.jsx(dm,{className:"size-6 text-negative-400"})}),l.jsx("h2",{className:"text-lg font-semibold text-heading",children:"Something went wrong"}),l.jsx("p",{className:"text-sm text-secondary max-w-md",children:this.state.error.message||"An unexpected error occurred while rendering this page."}),l.jsxs("div",{className:"flex gap-3 mt-2",children:[l.jsxs(re,{variant:"secondary",size:"sm",onClick:this.handleReset,children:[l.jsx(Z5,{className:"size-3.5 mr-1.5"}),"Try again"]}),l.jsx(re,{variant:"secondary",size:"sm",onClick:()=>{const n=window.__CANONRY_CONFIG__?.basePath?.replace(/\/$/,"")??"";window.location.href=n||"/"},children:"Go home"})]})]})}):this.props.children}}const _a=N.forwardRef(({className:e,...n},i)=>l.jsx("div",{ref:i,className:Da("rounded-xl border border-base bg-bg/75 shadow-[0_0_0_1px_var(--color-shadow-hairline)]",e),...n}));_a.displayName="Card";const Cr=N.forwardRef(({className:e,...n},i)=>l.jsx("div",{ref:i,className:Da("flex flex-col gap-1.5 p-5",e),...n}));Cr.displayName="CardHeader";const sC=N.forwardRef(({className:e,...n},i)=>l.jsx("h3",{ref:i,className:Da("font-medium tracking-tight text-primary",e),...n}));sC.displayName="CardTitle";const cm=N.forwardRef(({className:e,...n},i)=>l.jsx("p",{ref:i,className:Da("text-sm text-muted",e),...n}));cm.displayName="CardDescription";const yo=N.forwardRef(({className:e,...n},i)=>l.jsx("div",{ref:i,className:Da("p-5 pt-0",e),...n}));yo.displayName="CardContent";function D0({disabled:e,title:n,...i}){const{canWrite:o}=fa();return o?l.jsx(re,{disabled:e,title:n,...i}):l.jsx(re,{...i,disabled:!0,title:xN})}function E1({title:e,children:n}){const{isAdmin:i}=fa();return i?l.jsx(l.Fragment,{children:n}):l.jsxs(_a,{className:"surface-card mx-auto mt-8 max-w-lg",children:[l.jsxs(Cr,{children:[l.jsxs(sC,{children:[e," is for administrators"]}),l.jsx(cm,{children:"Your account has view-only access. You can read everything this install has measured; changing how it is set up needs an administrator account."})]}),l.jsx(yo,{children:l.jsx("p",{className:"supporting-copy",children:"If you need to make a change here, ask an administrator on this install."})})]})}function _ie(e,n,i){return{mode:n,scope:e.measurementScope,scopeKey:e.measurementScopeKey,marketKey:e.marketKey,queryClass:e.queryClass==="non-brand"?"non-brand":"branded",provider:e.provider,model:e.model,location:e.location,runId:e.measurementRunId,revision:e.revision,evaluationDefinitionId:i}}function Tie(e,n,i){const o=[...new Set(n.filter(u=>!i||u.provider===i).map(u=>u.sourceRunId).filter(u=>!!u))].sort();return{...e,mode:"simple",scope:"project",scopeKey:void 0,marketKey:void 0,provider:i||void 0,model:void 0,revision:void 0,runId:o.length===1?o[0]:void 0,runIds:o.length>1?o:void 0}}function kc(e,n,i,o){return["sentiment",e,n,i??null,o??null]}const oC=5e3,EX=new Set(["pending","running","waiting-to-retry"]);function Fk(e){return EX.has(e.state)}function RX(e){const n=e?.coverage.counts;return!!(n&&n.pending+n.running+n["waiting-to-retry"]>0)}function DX(e,n){return RX(e)||n?oC:!1}function zX(e,n,i=!0){const o=yt({queryKey:kc(e,"settings"),queryFn:()=>Dd(e),retry:!1,staleTime:0,refetchOnWindowFocus:"always"}),u=yt({queryKey:kc(e,"jobs"),queryFn:()=>WK(e),enabled:!!o.data?.actions.configure,retry:!1,refetchOnWindowFocus:"always",refetchInterval:x=>x.state.data?.jobs.some(Fk)?oC:!1}),h=!!u.data?.jobs.some(Fk),f=x=>{const k={...n,queryClass:x};return{queryKey:kc(e,"summary",k),queryFn:()=>QK(e,k),enabled:i&&!!(o.data?.enabled&&o.data.installEnabled),retry:!1,staleTime:0,refetchOnWindowFocus:"always",refetchInterval:S=>DX(S.state.data,h)}},b=yt(f("branded")),v=yt(f("non-brand"));return{settings:o,branded:b,nonBrand:v,jobs:u}}const qi={branded:"Branded","non-brand":"Non-brand"},R1=10;function D1(e){return e>=R1}const Ye={states:{disabled:"Sentiment is off.","not-measured":"No ratings yet.",processing:"Analyzing sentiment…",canceled:"Analysis canceled.",partial:"Partial results.",failed:"Analysis failed.",complete:"Analysis complete.",unsupported:"Sentiment unavailable."},noJudgments:"No ratings available.",tooFew:"too few",minRated:`Shown from ${R1} ratings`,partial:"Partial results",columns:{favorable:"Favorable",rated:"With opinion"},title:"Sentiment",subtitle:"How AI answers describe you in queries that name you",rated:"Share of answers that give an opinion (favorable, mixed or unfavorable) about who they name",noAnswers:"No answers yet",ratedUnavailable:"Unavailable",details:{ratedAnswers:"Answers with an opinion",unadmitted:"Checks not yet analyzed",checksCaption:"Not counted in the favorable share:",interval:"Likely range (95%)"},nonBrand:{label:"Non-brand queries",none:"No unfavorable or mixed answers in non-brand queries.",noneSoFar:"No unfavorable or mixed answers in non-brand queries so far.",notRated:"Non-brand answers are not rated yet.",view:"View answers",evidence:"Non-brand queries, unfavorable and mixed",rowNone:"No unfavorable or mixed answers",rowLabel:"Unfavorable or mixed",help:"A non-brand answer almost always names you to recommend you, so its favorable share is near 100% and says little. Sentiment is measured on branded queries; unfavorable or mixed answers to non-brand queries are listed here when they happen."},properties:{title:"Most criticized properties",evidence:"unfavorable and mixed",viewAll:"View all unfavorable and mixed answers",allEvidence:"Branded queries, unfavorable and mixed"},overall:"Favorable share of ratings in answers to branded queries. Each saved answer-subject assessment counts once. Answers with no opinion, or where it is unclear who they name, are left out.",favorable:"The favorable share of favorable, mixed and unfavorable ratings in answers to branded queries. Each rating covers one subject named in an answer; answers with no opinion are left out."},Sc="—",IX={factual:"Named, no opinion","subject-not-mentioned":"Not named in the answer","wrong-subject":"Named someone else","ambiguous-subject":"Unclear which one was meant","ambiguous-judgment":"Opinion unclear","subject-not-applicable":"Not applicable","unsupported-language":"Not in English","missing-source-text":"No answer text","input-too-large":"Answer too long to rate","invalid-conclusion-evidence":"Rating set aside",pending:"Waiting to be rated",running:"Being rated","waiting-to-retry":"Retrying"};function Gi(e){return IX[e]??e.replaceAll("-"," ").replace(/^./,n=>n.toUpperCase())}const Co=["favorable","mixed","unfavorable"];function rC(e){return e==="favorable"?"positive":e==="unfavorable"?"negative":e==="mixed"?"caution":"neutral"}const Dc=["mixed","unfavorable"];function lC(e){return e.interval?`${Yd(e.interval.low,$a.fraction)} to ${Yd(e.interval.high,$a.fraction)}`:null}const Qm={favorable:"progress-fill-info",mixed:"progress-fill-caution",unfavorable:"progress-fill-negative"};function Od(e){return`${e} ${e===1?"rating":"ratings"}`}function Zm(e){return e.score.favorableRate!==null&&e.coverage.judged>0}function z0(e){return e.state==="complete"&&!e.provisional&&e.coverage.unadmittedAssessments===0}function cC(e){return e.state==="complete"?Ye.partial:Ye.states[e.state]}function z1(e){return e?Zm(e)&&D1(e.coverage.judged):!1}function OX({value:e,label:n}){const{counts:i,judged:o}=e.coverage;if(!Zm(e))return l.jsx("div",{className:"sentiment-bar sentiment-bar-track","data-sentiment-bar":"empty","aria-hidden":"true"});const u=Co.map(h=>`${i[h]} ${h}`).join(", ");return z1(e)?l.jsx("div",{role:"img","aria-label":`${n}: ${u}, ${e.score.favorableDisplay} favorable of ${Od(o)}`,className:"sentiment-bar","data-sentiment-bar":"rated",children:Co.filter(h=>i[h]>0).map(h=>l.jsx("span",{"data-outcome":h,className:`sentiment-bar-segment ${Qm[h]}`,style:{flexGrow:i[h]},title:`${Gi(h)}: ${i[h]} of ${Od(o)}`},h))}):l.jsx("div",{role:"img","aria-label":`${n}: ${u}, ${Od(o)}, favorable share ${Ye.minRated.toLowerCase()}`,className:"sentiment-bar sentiment-bar-track","data-sentiment-bar":"too-few"})}function PX({value:e,label:n}){const{counts:i,judged:o}=e.coverage;return l.jsx("div",{role:"img","aria-label":`${n}: ${Co.map(u=>`${i[u]} ${u}`).join(", ")}, ${Od(o)}`,className:"sentiment-property-bar",children:Co.filter(u=>i[u]>0).map(u=>l.jsx("span",{"data-outcome":u,className:`sentiment-bar-segment ${Qm[u]}`,style:{flexGrow:i[u]}},u))})}function qX(e){const n=new Map(e.breakdowns.filter(i=>i.dimension==="property").map(i=>[i.key,i]));return(e.criticizedProperties?.keys??[]).flatMap(i=>n.get(i)??[])}function MX({value:e,label:n}){return l.jsx("div",{role:"group","aria-label":`${n} favorable share`,className:"sentiment-class-favorable",children:z1(e)?l.jsx("span",{className:"sentiment-class-share",children:e.score.favorableDisplay}):l.jsxs(l.Fragment,{children:[l.jsx("span",{"aria-hidden":"true",className:"sentiment-class-empty",title:Ye.minRated,children:Sc}),l.jsx("span",{className:"sr-only",children:Ye.minRated})]})})}function BX({ratedAnswers:e=0,eligibleAnswers:n=0}){return`${e} of ${n} ${n===1?"answer":"answers"} rated`}function LX(e){const{eligibleAnswers:n}=e;return n===void 0?{display:Sc,detail:Ye.ratedUnavailable,empty:!0}:n<=0?{display:Sc,detail:Ye.noAnswers,empty:!0}:e.ratedAnswerRate===null||e.ratedAnswerRate===void 0?{display:Sc,detail:Ye.states.disabled,empty:!0}:{display:Yd(e.ratedAnswerRate,$a.fraction),detail:BX(e),empty:!1}}function UX({coverage:e,label:n}){const{display:i,detail:o,empty:u}=LX(e);return l.jsxs("div",{role:"group","aria-label":`${n} share rated`,className:"sentiment-class-ratings",children:[l.jsx("span",{"aria-hidden":"true",className:u?"sentiment-class-empty":void 0,title:o,children:i}),l.jsx("span",{className:"sr-only",children:u?o:`${i}, ${o}`})]})}function VX({value:e}){return Zm(e)?e.provisional?l.jsx("p",{className:"sentiment-class-note text-caution",children:Ye.partial}):null:l.jsx("p",{className:"sentiment-class-note",children:e.state==="complete"?Ye.noJudgments:Ye.states[e.state]})}function $X(e){return!!(e.coverage.selected||e.coverage.eligibleAssessments||e.reason)}function GX({value:e,queryClass:n,open:i,setOpenClass:o}){const u=N.useContext(li),h=N.useId(),f=N.useId(),b=N.useId(),v=N.useRef(null),x=N.useRef(null),k=N.useCallback(()=>o(T=>T===n?null:T),[o,n]);N.useEffect(()=>{if(!i)return;const T=U=>U instanceof Node&&!!(v.current?.contains(U)||x.current?.contains(U)),V=U=>{T(U.target)||k()},Y=U=>{T(U.target)||k()},M=U=>{U.key==="Escape"&&(k(),v.current?.focus())};return document.addEventListener("pointerdown",V),document.addEventListener("focusin",Y),document.addEventListener("keydown",M),()=>{document.removeEventListener("pointerdown",V),document.removeEventListener("focusin",Y),document.removeEventListener("keydown",M)}},[i,k]);const{coverage:S,score:C}=e,_=lC(C),z=S.judged>0&&!D1(S.judged),q=n==="branded"?qX(e):[];return $X(e)?l.jsxs(l.Fragment,{children:[l.jsx("button",{ref:v,type:"button",className:"sentiment-class-details-toggle","aria-label":`${qi[n]} details`,"aria-expanded":i,"aria-controls":h,onClick:()=>o(T=>T===n?null:n),children:l.jsx(Ic,{className:"sentiment-class-details-chevron","aria-hidden":"true"})}),l.jsxs("div",{ref:x,id:h,role:"group","aria-labelledby":f,className:"sentiment-class-details",hidden:!i,children:[l.jsx("p",{id:f,className:"sentiment-class-details-title",children:qi[n]}),l.jsxs("dl",{className:"sentiment-details-list",children:[(S.eligibleAnswers??0)>0&&l.jsxs("div",{children:[l.jsx("dt",{children:Ye.details.ratedAnswers}),l.jsxs("dd",{children:[S.ratedAnswers??0," of ",S.eligibleAnswers]})]}),z&&Co.filter(T=>S.counts[T]>0).map(T=>l.jsxs("div",{children:[l.jsx("dt",{children:Gi(T)}),l.jsx("dd",{children:S.counts[T]})]},T)),z&&l.jsxs("div",{children:[l.jsx("dt",{children:"Favorable share"}),l.jsx("dd",{children:Ye.minRated})]}),_&&l.jsxs("div",{children:[l.jsxs("dt",{children:[Ye.details.interval," ",l.jsx(la,{text:C.limitation,placement:"bottom"})]}),l.jsx("dd",{children:_})]})]}),u&&q.length>0&&l.jsxs("div",{className:"sentiment-details-properties",role:"group","aria-labelledby":b,children:[l.jsxs("p",{id:b,className:"sentiment-details-subtitle",children:[Ye.properties.title,e.criticizedProperties&&e.criticizedProperties.total>q.length?l.jsxs("span",{className:"sentiment-details-subtitle-count",children:[" · ",q.length," of ",e.criticizedProperties.total]}):null]}),l.jsx("ul",{children:q.map(T=>l.jsxs("li",{className:"sentiment-property",children:[l.jsx("button",{type:"button",className:"sentiment-property-name","aria-label":`View ${Ye.properties.evidence} answers for ${T.label}`,onClick:()=>{if(!v.current)return;const V=I0(u,e);u.openEvidence({...V,queryClass:n,scope:"property",scopeKey:T.key,marketKey:V.scope==="market"?V.scopeKey:V.marketKey,outcome:Dc},`${T.label}, ${Ye.properties.evidence}`,v.current)},children:T.label}),l.jsxs("span",{className:"sentiment-property-count",children:[T.coverage.counts.favorable," of ",T.coverage.judged," favorable"]}),l.jsx(PX,{value:T,label:T.label})]},T.key))}),l.jsx("button",{type:"button",className:"sentiment-property-name sentiment-details-view-all",onClick:()=>{v.current&&u.openEvidence({...I0(u,e),queryClass:n,outcome:Dc},Ye.properties.allEvidence,v.current)},children:Ye.properties.viewAll})]}),(S.unadmittedAssessments>0||Object.entries(S.counts).some(([T,V])=>V>0&&!Co.includes(T)))&&l.jsx("p",{className:"sentiment-details-caption",children:Ye.details.checksCaption}),l.jsxs("dl",{className:"sentiment-details-list",children:[S.unadmittedAssessments>0&&l.jsxs("div",{children:[l.jsx("dt",{children:Ye.details.unadmitted}),l.jsx("dd",{children:S.unadmittedAssessments})]}),Object.entries(S.counts).filter(([T,V])=>V>0&&!["favorable","mixed","unfavorable"].includes(T)).map(([T,V])=>l.jsxs("div",{children:[l.jsx("dt",{children:Gi(T)}),l.jsx("dd",{children:V})]},T))]}),e.reason&&l.jsx("p",{className:"sentiment-class-details-reason",children:e.reason})]})]}):null}function I1(e){return!!(e?.configured&&e.branded.coverage.judged>0&&e.branded.score.favorableRate!==null)&&!f1()}function KX({value:e}){if(!I1(e))return null;const n=e.branded,i=n.coverage.judged,o=lC(n.score),u=`${Ye.overall} ${i} of ${n.coverage.selected} judged${o?`, 95% interval ${o}`:""}. ${n.provisional?"Provisional. ":""}${Ye.states[n.state]}${n.reason?` ${n.reason}`:""}`;return l.jsx("div",{className:"project-row-stat","data-sentiment-score":!0,children:l.jsxs("div",{className:"metric-inline-block",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("p",{className:"metric-inline-label",children:"Sentiment"}),l.jsx("span",{className:"relative z-10",children:l.jsx(la,{text:u,placement:"bottom"})})]}),D1(i)?l.jsxs("p",{className:"metric-inline-value",children:[n.score.favorableDisplay,l.jsx("span",{className:"sr-only",children:" favorable judgments, branded queries"})]}):l.jsxs("p",{className:"metric-inline-value text-secondary",children:[Ye.tooFew,l.jsxs("span",{className:"sr-only",children:[" ratings for a favorable share, ",i," of ",R1," needed, branded queries"]})]}),l.jsx("p",{className:"metric-inline-caption","aria-hidden":"true"})]})})}const li=N.createContext(null);function I0(e,n){const{selection:i}=n;return{...e.selection,...i,runId:i.runId??void 0,runIds:i.runId?void 0:i.runIds,revision:i.revision??void 0,evaluationDefinitionId:i.evaluationDefinitionId??void 0}}function Eie(){return N.useContext(li)?.configured??!1}function Rie({projectName:e,selection:n,runOptions:i=[],waitForResolvedRun:o=!1,evidenceReady:u=!0,hasSourceEvidence:h=!0,children:f}){return l.jsx(HX,{projectName:e,selection:n,runOptions:i,waitForResolvedRun:o,evidenceReady:u,hasSourceEvidence:h,children:f})}function HX({projectName:e,selection:n,runOptions:i,waitForResolvedRun:o,evidenceReady:u,hasSourceEvidence:h,children:f}){const b=JSON.stringify([e,n]),[v,x]=N.useState(null),k=N.useCallback(Pe=>x(Se=>Se?.key===b&&Se?.runId===Pe?.runId&&Se?.revision===Pe?.revision?Se:Pe?{...Pe,key:b}:null),[b]),S=u&&(!o||v?.key===b),C=o&&S&&v?{...n,runId:v.runId,revision:v.revision}:n,_=JSON.stringify([e,C]),{settings:z,branded:q,nonBrand:T,jobs:V}=zX(e,C,S&&h),[Y,M]=N.useState(!1),[U,Z]=N.useState(null),te=N.useRef(null);N.useEffect(()=>{M(!1),Z(null)},[_]);const B=S&&!!(z.data?.enabled&&z.data.installEnabled),le=(n.queryClass==="non-brand"?T.data:q.data)?.selection,Je={...C,...le?{...le,runId:le.runId??void 0,runIds:le.runId?void 0:le.runIds,revision:le.revision??void 0,evaluationDefinitionId:le.evaluationDefinitionId??void 0}:{}},nt=Je.runId&&!i.some(Pe=>Pe.id===Je.runId)?[{id:Je.runId,label:"Displayed sweep"},...i]:i,$e=Pe=>{Pe.preventDefault(),te.current?.focus()};return l.jsxs(li.Provider,{value:{projectName:e,selection:C,resolveSource:k,settings:z,summaries:{branded:q,"non-brand":T},configured:B,hasSourceEvidence:h,openManage:Pe=>{te.current=Pe,M(!0)},openEvidence:(Pe,Se,Ue)=>{te.current=Ue,Z({selection:Pe,label:Se})}},children:[f,l.jsx(S0,{open:Y&&!!z.data?.actions.configure,onOpenChange:M,children:l.jsxs(om,{onCloseAutoFocus:$e,className:"overflow-y-auto",children:[l.jsxs(j0,{children:[l.jsx(rm,{children:"Manage sentiment"}),l.jsx(lm,{children:"Classify saved answers and review the cost before submitting a backfill."})]}),z.data?.actions.configure&&l.jsx(sJ,{projectName:e,settings:z.data,selection:Je,runOptions:nt},JSON.stringify([z.data.evaluationDefinitionId,z.data.enabled,z.data.enablementEpoch])),V.data&&l.jsx(eJ,{projectName:e,jobs:V.data.jobs})]})}),l.jsx(S0,{open:U!==null,onOpenChange:Pe=>{Pe||Z(null)},children:l.jsxs(om,{onCloseAutoFocus:$e,className:"overflow-y-auto",children:[l.jsxs(j0,{children:[l.jsxs(rm,{children:["Sentiment evidence",U?`: ${U.label}`:""]}),l.jsx(lm,{children:"Stored judgments and exact quotations for the selected query and scope."})]}),U&&l.jsx(XX,{projectName:e,selection:U.selection},JSON.stringify(U.selection))]})})]})}function Die(e,n){const i=N.useContext(li)?.resolveSource;N.useEffect(()=>{i?.(e?{runId:e,revision:void 0}:null)},[i,e,n])}function Qk(){const e=N.useContext(li);return e?.settings.data?.actions.configure?l.jsx(D0,{type:"button",variant:"outline",size:"sm",onClick:n=>e.openManage(n.currentTarget),children:e.settings.data.enabled?"Manage sentiment":"Enable sentiment"}):null}function uC(e,n){return!e?.configured||n==="unknown"||n==="unclassified"?null:["branded"]}function FX({queryClass:e="all"}){const n=N.useContext(li),i=uC(n,e);return!n?.hasSourceEvidence||!i?.some(o=>z1(n.summaries[o].data))?null:l.jsx("ul",{className:"sentiment-legend","aria-hidden":"true",children:Co.map(o=>l.jsxs("li",{children:[l.jsx("span",{className:`sentiment-legend-swatch ${Qm[o]}`}),Gi(o)]},o))})}function QX({queryClass:e}){const n=N.useContext(li);if(!n?.hasSourceEvidence)return null;const i=n.summaries["non-brand"],o=i.data,u=e==="non-brand";if(!o)return u?i.isError?l.jsxs("p",{role:"alert",className:"sentiment-nonbrand-note",children:["Couldn’t load non-brand sentiment. ",l.jsx(re,{variant:"ghost",onClick:()=>{i.refetch()},children:"Retry"})]}):l.jsx("p",{role:"status",className:"sentiment-nonbrand-note",children:"Loading non-brand sentiment…"}):null;const h=o.coverage.counts;return h.unfavorable===0&&h.mixed===0?u?z0(o)?l.jsx("p",{className:"sentiment-nonbrand-note",children:Ye.nonBrand.none}):Zm(o)?l.jsx("p",{className:"sentiment-nonbrand-note",children:Ye.nonBrand.noneSoFar}):l.jsx("p",{className:"sentiment-nonbrand-note",children:o.state==="not-measured"?Ye.nonBrand.notRated:`${Ye.nonBrand.label}: ${cC(o)}`}):null:l.jsx("div",{className:"sentiment-nonbrand",role:"group","aria-label":Ye.nonBrand.label,children:l.jsxs("div",{className:"sentiment-nonbrand-line",children:[l.jsxs("span",{className:"sentiment-nonbrand-label",children:[Ye.nonBrand.label,l.jsx(la,{text:Ye.nonBrand.help})]}),l.jsxs("span",{className:"sentiment-nonbrand-counts",children:[Dc.slice().reverse().filter(f=>h[f]>0).map(f=>l.jsxs("span",{children:[l.jsx("span",{"aria-hidden":"true",className:`sentiment-legend-swatch ${Qm[f]}`}),h[f]," ",f]},f)),!z0(o)&&l.jsx("span",{className:"text-caution",children:Ye.partial})]}),l.jsx(re,{type:"button",variant:"outline",size:"sm",onClick:f=>n.openEvidence({...I0(n,o),queryClass:"non-brand",outcome:Dc},Ye.nonBrand.evidence,f.currentTarget),children:Ye.nonBrand.view})]})})}function zie({queryClass:e="all",legend:n=!0,manage:i=!1}){const o=N.useContext(li),u=uC(o,e),[h,f]=N.useState(null);if(!o)return null;if(!u){const v=o.settings.data;return!i||!v?.actions.configure?null:l.jsxs("div",{className:"sentiment-headlines-title",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"sentiment-headlines-heading",children:Ye.title}),!(v.enabled&&v.installEnabled)&&l.jsx("p",{className:"sentiment-headlines-subtitle",children:Ye.states.disabled})]}),l.jsx(Qk,{})]})}const b=o.hasSourceEvidence&&u.some(v=>o.summaries[v].data);return l.jsxs("div",{className:"sentiment-headlines",role:"group","aria-label":"Favorable answer scores",children:[l.jsxs("div",{className:"sentiment-headlines-title",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"sentiment-headlines-heading",children:Ye.title}),l.jsx("p",{className:"sentiment-headlines-subtitle",children:Ye.subtitle})]}),i&&l.jsx(Qk,{})]}),n&&l.jsx(FX,{queryClass:e}),b&&l.jsxs("div",{className:"sentiment-headlines-columns","aria-hidden":"true",children:[l.jsx("span",{className:"sentiment-headlines-favorable",children:Ye.columns.favorable}),l.jsx("span",{className:"sentiment-headlines-ratings",title:Ye.rated,children:Ye.columns.rated})]}),u.map(v=>{const x=o.summaries[v];return l.jsxs("div",{className:"sentiment-class","data-query-class":v,children:[l.jsxs("div",{className:"sentiment-class-label",children:[l.jsx("span",{children:qi[v]}),l.jsx(la,{text:Ye.favorable})]}),o.hasSourceEvidence?x.data?l.jsxs(l.Fragment,{children:[l.jsx(OX,{value:x.data,label:qi[v]}),l.jsx(MX,{value:x.data,label:qi[v]}),l.jsx(UX,{coverage:x.data.coverage,label:qi[v]}),l.jsx(VX,{value:x.data}),l.jsx(GX,{value:x.data,queryClass:v,open:h===v,setOpenClass:f})]}):x.isError?l.jsxs("p",{role:"alert",className:"sentiment-class-status",children:["Couldn’t load sentiment. ",l.jsx(re,{variant:"ghost",onClick:()=>{x.refetch()},children:"Retry"})]}):l.jsx("p",{role:"status",className:"sentiment-class-status",children:"Loading sentiment…"}):l.jsx("p",{className:"sentiment-class-status",children:"No saved answers."})]},v)}),e!=="branded"&&l.jsx(QX,{queryClass:e})]})}function Iie({queryId:e,sourceSnapshotIds:n=[],queryClass:i,location:o,showLabel:u=!1}){const h=N.useContext(li);if(!h?.configured)return null;const f=i?h.summaries[i]:void 0,b=h.hasSourceEvidence?f?.data:void 0,v=b?.queries.filter(C=>C.queryClass===i&&(e?C.queryId===e:n.length>0)&&n.every(_=>C.sourceSnapshotIds.includes(_)))??[],x=v.length===1?v[0]:void 0,k=o===void 0?x:x?.locations.find(C=>C.location===o);if(!x||!k)return l.jsx("span",{className:"text-sm text-secondary",children:h.hasSourceEvidence&&f?.isPending&&(e||n.length)?"Loading…":"Unavailable"});const S={...h.selection,...b.selection,runId:b.selection.runId??void 0,runIds:b.selection.runId?void 0:b.selection.runIds,revision:b.selection.revision??void 0,evaluationDefinitionId:b.selection.evaluationDefinitionId??void 0,queryClass:x.queryClass,queryId:x.queryId,executionNodeKey:x.executionNodeKey??void 0,...o===void 0?{}:{location:o??"none"}};if(x.queryClass==="non-brand"){if(k.state==="unsupported")return l.jsx("span",{className:"text-sm text-secondary",children:"Unavailable"});const{unfavorable:C,mixed:_}=k.coverage.counts;if(C===0&&_===0){const z=u&&l.jsx("span",{className:"block text-sm font-normal text-secondary",children:Ye.nonBrand.rowLabel});return z0(k)?l.jsxs("span",{className:"text-sm text-muted",children:[z,l.jsx("span",{"aria-hidden":"true",title:Ye.nonBrand.rowNone,children:Sc}),l.jsx("span",{className:"sr-only",children:Ye.nonBrand.rowNone})]}):l.jsxs("span",{className:"text-sm text-secondary",children:[z,l.jsx("span",{children:cC(k)})]})}return l.jsxs(re,{type:"button",variant:"ghost",className:"h-auto min-h-11 flex-col items-start gap-0 px-1","aria-label":`View unfavorable and mixed answers for ${x.queryText}`,onKeyDown:z=>z.stopPropagation(),onClick:z=>{z.stopPropagation(),h.openEvidence({...S,outcome:Dc},`${x.queryText}, unfavorable and mixed`,z.currentTarget)},children:[u&&l.jsx("span",{className:"text-sm font-normal text-secondary",children:Ye.nonBrand.rowLabel}),C>0&&l.jsxs("span",{className:"text-sm text-negative",children:[C," unfavorable"]}),_>0&&l.jsxs("span",{className:"text-sm text-caution",children:[_," mixed"]}),k.provisional&&l.jsx("span",{className:"text-xs font-normal text-caution",children:"Provisional"})]})}return l.jsxs(re,{type:"button",variant:"ghost",className:"h-auto min-h-11 flex-col items-start gap-0 px-1","aria-label":`View ${qi[x.queryClass]} sentiment evidence for ${x.queryText}`,onKeyDown:C=>C.stopPropagation(),onClick:C=>{C.stopPropagation(),h.openEvidence(S,x.queryText,C.currentTarget)},children:[u&&l.jsx("span",{className:"text-sm font-normal text-secondary",children:"Favorable"}),l.jsx("span",{className:"font-mono text-primary",children:k.score.favorableDisplay}),l.jsxs("span",{className:"text-sm font-normal text-secondary",children:[k.coverage.judged," judged"]}),k.provisional&&l.jsx("span",{className:"text-xs font-normal text-caution",children:"Provisional"})]})}function ZX(e){return e.outcome==="subject-not-mentioned"?"Not mentioned":e.outcome==="running"?"Classifying":e.outcome==="waiting-to-retry"?"Retrying":e.outcome?Gi(e.outcome):e.state==="not-measured"?"Not classified":e.state==="processing"?"Classifying":e.state==="failed"?"Failed":e.state==="canceled"?"Canceled":"Unavailable"}function Oie({queryId:e,sourceSnapshotIds:n,queryClass:i,provider:o,model:u,location:h,showSubjects:f=!1,showLabel:b=!1}){const v=N.useContext(li);if(!v?.configured)return null;const x=i?v.summaries[i]:void 0,k=v.hasSourceEvidence?x?.data:void 0,S=k?.queries.filter(z=>z.queryClass===i&&(!e||z.queryId===e)&&n.length>0&&n.every(q=>z.sourceSnapshotIds.includes(q)))??[],C=S.length===1?S[0]:void 0,_=C?.assessments?.filter(z=>n.includes(z.sourceSnapshotId)&&z.provider===o&&z.location===h&&(u===void 0||z.servedModel===u))??[];return l.jsxs("div",{role:"group",className:"text-sm text-secondary","aria-label":`${o||"Saved answer"} sentiment`,children:[b&&l.jsx("span",{className:"block text-sm text-secondary",children:"Sentiment"}),_.length?_.map(z=>{const q=ZX(z),T=rC(z.outcome),V=l.jsxs(l.Fragment,{children:[f&&l.jsxs("span",{children:[z.subjectLabel," · "]}),l.jsx(vn,{tone:T,className:"max-w-full shrink-0 rounded-none border-0 bg-transparent p-0 text-sm font-normal tracking-normal [overflow-wrap:normal]",children:q})]}),Y={...v.selection,...k.selection,runId:k.selection.runId??void 0,runIds:k.selection.runId?void 0:k.selection.runIds,revision:k.selection.revision??void 0,evaluationDefinitionId:k.selection.evaluationDefinitionId??void 0,queryClass:C.queryClass,queryId:C.queryId,executionNodeKey:C.executionNodeKey??void 0,assessmentId:z.assessmentId??void 0};return l.jsxs("div",{className:"flex items-center gap-1",children:[z.assessmentId?l.jsx(re,{type:"button",variant:"ghost",className:"h-auto min-h-11 flex-wrap justify-start whitespace-normal px-1 text-left text-sm","aria-label":`View ${z.provider} sentiment evidence for ${z.subjectLabel}: ${q}`,onKeyDown:M=>M.stopPropagation(),onClick:M=>{M.stopPropagation(),v.openEvidence(Y,`${C.queryText} · ${z.provider} · ${z.subjectLabel}`,M.currentTarget)},children:V}):l.jsx("span",{children:V}),z.reason&&l.jsx(la,{text:z.reason})]},JSON.stringify([z.sourceSnapshotId,z.subjectId,z.assessmentId]))}):l.jsx("span",{children:v.hasSourceEvidence&&x?.isPending&&n.length?"Loading…":"Unavailable"})]})}function YX({item:e}){return l.jsxs("article",{className:"space-y-4 border-b border-default py-5 text-sm text-secondary",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("strong",{className:"text-primary",children:e.subject.displayName}),l.jsx(vn,{tone:rC(e.outcome),children:Gi(e.outcome)}),l.jsx("span",{children:qi[e.context.queryClass]}),l.jsx("span",{children:e.context.provider}),l.jsx("span",{children:e.context.servedModel??"Source model unavailable"}),l.jsx("span",{children:e.context.location??"No location"})]}),e.reason&&l.jsx("p",{children:e.reason}),l.jsxs("section",{children:[l.jsx("h3",{className:"mb-2 text-heading",children:"Conclusion evidence"}),e.conclusion.length?e.conclusion.map(n=>l.jsx("blockquote",{className:"mb-2 border-l border-strong pl-3 text-primary",children:n.text},`${n.id}:${n.start}`)):l.jsx("p",{children:"No valid conclusion evidence is available."})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"mb-2 text-heading",children:"Complaint evidence"}),e.complaint?.length?e.complaint.map(n=>l.jsx("blockquote",{className:"mb-2 border-l border-strong pl-3 text-primary",children:n.text},`${n.id}:${n.start}`)):l.jsx("p",{children:"No complaint was identified."})]}),l.jsxs("details",{children:[l.jsx("summary",{className:"cursor-pointer",children:"Original source answer"}),l.jsx("p",{className:"mt-2 whitespace-pre-wrap break-words text-primary",children:e.sourceText})]}),l.jsxs("details",{children:[l.jsx("summary",{className:"cursor-pointer",children:"Assessment provenance"}),l.jsxs("dl",{className:"mt-3 space-y-2 break-all",children:[l.jsx("dt",{children:"Query"}),l.jsx("dd",{children:e.context.queryText}),l.jsx("dt",{children:"Subject"}),l.jsxs("dd",{children:[e.subject.displayName," (",e.subject.id,")"]}),l.jsx("dt",{children:"Run"}),l.jsx("dd",{children:e.runId}),l.jsx("dt",{children:"Revision"}),l.jsx("dd",{children:e.context.revision??"Unavailable"}),l.jsx("dt",{children:"Evaluator"}),l.jsx("dd",{children:e.returnedModel??"Unavailable"}),l.jsx("dt",{children:"Evaluation definition"}),l.jsx("dd",{children:e.evaluationDefinitionId}),l.jsx("dt",{children:"Source snapshot"}),l.jsx("dd",{children:e.sourceSnapshotId}),l.jsx("dt",{children:"Source hash"}),l.jsx("dd",{children:e.sourceTextHash}),e.context.usageEdges.map((n,i)=>l.jsxs("div",{children:[l.jsx("dt",{children:"Assignment"}),l.jsxs("dd",{children:["Target ",n.targetId,"; Property ",n.propertyId??"None","; market ",n.marketId??"None","; ",n.queryClass]})]},i))]})]})]})}function XX({projectName:e,selection:n}){const[i,o]=N.useState(),u=yt({queryKey:kc(e,"evidence",n,i),queryFn:()=>YK(e,n,i),retry:!1});return u.isPending?l.jsx("p",{role:"status",className:"mt-4 text-sm text-secondary",children:"Loading sentiment evidence…"}):u.isError?l.jsxs("p",{role:"alert",className:"mt-4 text-sm text-secondary",children:["Could not load sentiment evidence. ",l.jsx(re,{variant:"outline",onClick:()=>{u.refetch()},children:"Retry evidence"})]}):l.jsxs(l.Fragment,{children:[u.data.items.length?u.data.items.map(h=>l.jsx(YX,{item:h},h.assessmentId)):l.jsx("p",{className:"mt-4 text-sm text-secondary",children:"No stored sentiment evidence for this query and scope."}),l.jsxs("div",{className:"mt-3 flex gap-2",children:[i&&l.jsx(re,{variant:"outline",onClick:()=>o(void 0),children:"First evidence page"}),u.data.nextCursor&&l.jsx(re,{variant:"outline",onClick:()=>o(u.data.nextCursor??void 0),children:"Next evidence page"})]})]})}function JX({projectName:e,jobId:n}){const[i,o]=N.useState(),u=yt({queryKey:kc(e,`job:${n}`,void 0,i),queryFn:()=>eH(e,n,i),retry:!1});return u.isPending?l.jsx("p",{role:"status",children:"Loading attempts…"}):u.isError?l.jsxs("p",{role:"alert",children:["Could not load attempts. ",l.jsx(re,{variant:"outline",onClick:()=>{u.refetch()},children:"Retry attempts"})]}):l.jsxs(l.Fragment,{children:[u.data.attempts.map(h=>l.jsxs("p",{children:[h.errorCode??"Request complete","; ",h.usage.kind==="unknown"?"Usage unknown":`${h.usage.inputTokens??"Unknown"} input tokens (${h.usage.kind})`]},h.id)),l.jsxs("div",{className:"mt-2 flex gap-2",children:[i&&l.jsx(re,{variant:"outline",onClick:()=>o(void 0),children:"Newest attempts"}),u.data.nextAttemptCursor&&l.jsx(re,{variant:"outline",onClick:()=>o(u.data.nextAttemptCursor??void 0),children:"Older attempts"})]})]})}function WX({projectName:e,job:n}){const[i,o]=N.useState(!1);return l.jsxs("details",{onToggle:u=>o(u.currentTarget.open),children:[l.jsx("summary",{children:"Job details"}),n.cancellationReason&&l.jsx("p",{children:n.cancellationReason}),Object.entries(n.counts).filter(([,u])=>u>0).map(([u,h])=>l.jsxs("p",{children:[Gi(u),": ",h]},u)),l.jsxs("p",{children:["Attempts: ",n.attemptCount]}),i&&n.attemptCount>0&&l.jsx(JX,{projectName:e,jobId:n.id})]})}function eJ({projectName:e,jobs:n}){return l.jsxs("details",{className:"mt-6 text-sm text-secondary",children:[l.jsx("summary",{className:"cursor-pointer",children:"Recent sentiment jobs"}),n.length===0?l.jsx("p",{className:"mt-2",children:"No sentiment jobs have been submitted."}):l.jsx("div",{className:"data-table-wrapper mt-3",children:l.jsxs("table",{className:"data-table","aria-label":"Sentiment jobs",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Submitted"}),l.jsx("th",{children:"State"}),l.jsx("th",{children:"Selected"}),l.jsx("th",{children:"Details"})]})}),l.jsx("tbody",{children:n.map(i=>l.jsxs("tr",{children:[l.jsx("td",{children:AH(i.createdAt)}),l.jsx("td",{children:Gi(i.state)}),l.jsx("td",{children:i.selected}),l.jsx("td",{children:l.jsx(WX,{projectName:e,job:i})})]},i.id))})]})})]})}const tJ={probe:"Probe sweeps","unsupported-run-kind":"Not an answer sweep","failed-run":"Failed sweep","incomplete-run":"Incomplete sweep","legacy-missing-provenance":"Saved without its frozen query and subject record","legacy-missing-language":"Saved before the answer language was recorded","excluded-branded":"Branded answers (backfill that class separately)","excluded-non-brand":"Non-brand answers (backfill that class separately)"};function nJ(e){return tJ[e]??Gi(e)}function dC(e){return[e.provider&&`engine ${e.provider}`,e.model&&`model ${e.model}`,e.location&&(e.location==="none"?"no location":`location ${e.location}`),e.scope!=="project"&&e.scopeKey&&`${e.scope} ${e.scopeKey}`,e.marketKey&&`market ${e.marketKey}`,e.queryId&&`query ${e.queryId}`,e.revision!==void 0&&`revision ${e.revision}`].filter(n=>!!n)}function aJ(e){const n=dC(e);return[`${qi[e.queryClass]} queries`,...n.length?n:["whole sweep"]].join(" · ")}function iJ(e,n,i,o){return o?{...e,queryClass:i,queryId:void 0,runIds:void 0,runId:n}:{mode:"auto",scope:"project",queryClass:i,runId:n}}function sJ({projectName:e,settings:n,selection:i,runOptions:o}){const u=ma(),[h,f]=N.useState(n.enabled),[b,v]=N.useState(i.runId??""),[x,k]=N.useState(i.queryClass),[S,C]=N.useState(!1),[_,z]=N.useState(null),q=N.useRef(null),T=dC({...i,queryId:void 0}),V=()=>u.invalidateQueries({queryKey:["sentiment",e]}),Y=()=>{z(null),q.current=null},M=si({mutationFn:async()=>{if(!(await Dd(e)).actions.configure)throw new Error("Administrator permission is required to configure sentiment.");return ZK(e,{enabled:h})},onSuccess:async()=>{Y(),await V(),await u.invalidateQueries({queryKey:["project-overview-slim"]})},onError:V}),U=si({mutationFn:async()=>{if(!(await Dd(e)).actions.backfill)throw new Error("Administrator permission is required to backfill sentiment.");return XK(e,iJ(i,b,x,S&&T.length>0))},onSuccess:B=>{z(B),q.current=crypto.randomUUID()},onError:V}),Z=si({mutationFn:async()=>{if(!_?.previewToken||!q.current)throw new Error("Create and review a backfill preview first.");if(!(await Dd(e)).actions.backfill)throw new Error("Administrator permission is required to backfill sentiment.");return JK(e,_.previewToken,q.current)},onSuccess:async()=>{Y(),await V()},onError:V}),te=M.isPending||U.isPending||Z.isPending;return l.jsxs("div",{className:"mt-5 space-y-5 text-sm text-secondary",children:[l.jsx("p",{children:n.disclosure}),!n.ready&&l.jsx("p",{children:n.readinessReasons.join("; ")||"An operator must configure sentiment on this installation."}),l.jsxs("form",{className:"space-y-3",onSubmit:B=>{B.preventDefault(),M.mutate()},children:[l.jsxs("label",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"checkbox",checked:h,disabled:te,onChange:B=>{f(B.target.checked),Y()}}),"Enable project sentiment"]}),l.jsx("p",{children:"Enabling applies to future completed sweeps. Past sweeps require an explicit backfill."}),l.jsx(D0,{type:"submit",disabled:te,children:M.isPending?"Saving…":"Save sentiment settings"}),M.isError&&l.jsx("p",{role:"alert",children:Oi(M.error)}),M.isSuccess&&l.jsx("p",{role:"status",children:"Sentiment settings saved."})]}),n.actions.backfill&&l.jsxs("section",{className:"space-y-3",children:[l.jsx("h3",{children:"Backfill a saved sweep"}),l.jsxs("label",{className:"block",children:["Saved sweep",l.jsxs("select",{className:"mt-1 block w-full rounded-md border border-default bg-bg p-2 text-primary",value:b,disabled:te,onChange:B=>{v(B.target.value),Y()},children:[l.jsx("option",{value:"",children:"Select a saved sweep"}),o.map(B=>l.jsx("option",{value:B.id,children:B.label},B.id))]})]}),l.jsxs("label",{className:"block",children:["Query class",l.jsxs("select",{className:"mt-1 block w-full rounded-md border border-default bg-bg p-2 text-primary",value:x,disabled:te,onChange:B=>{k(B.target.value),Y()},children:[l.jsx("option",{value:"non-brand",children:"Non-brand"}),l.jsx("option",{value:"branded",children:"Branded"})]})]}),l.jsx("p",{children:"The backfill covers every engine, location and query of the chosen sweep for this query class."}),T.length>0&&l.jsxs("label",{className:"flex items-start gap-2",children:[l.jsx("input",{type:"checkbox",className:"mt-1",checked:S,disabled:te,onChange:B=>{C(B.target.checked),Y()}}),l.jsxs("span",{children:["Limit to the current view",l.jsx("span",{className:"block",children:T.join(" · ")})]})]}),l.jsx(re,{variant:"outline",disabled:te||!b||!n.enabled||!n.ready,onClick:()=>{Y(),U.mutate()},children:U.isPending?"Preparing preview…":"Preview sentiment backfill"}),U.isError&&l.jsx("p",{role:"alert",children:Oi(U.error)}),_&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("dl",{className:"grid grid-cols-[1fr_auto] gap-2",children:[l.jsx("dt",{children:"Selection"}),l.jsx("dd",{className:"text-right",children:aJ(_.selection)}),l.jsx("dt",{children:"Eligible assessments"}),l.jsx("dd",{children:_.eligibleAssessments}),l.jsx("dt",{children:"Already classified"}),l.jsx("dd",{children:_.alreadyClassified}),l.jsx("dt",{children:"Estimated input tokens"}),l.jsx("dd",{children:_.estimatedInputTokens}),l.jsx("dt",{children:"Estimated cost (USD)"}),l.jsx("dd",{children:_.estimatedCostUsd??"Unavailable"})]}),l.jsx(la,{text:_.estimateMethod}),_.eligibleAssessments===0&&l.jsx("p",{children:"No saved answers in this selection can be classified."}),_.skipped.length>0&&l.jsxs("div",{children:[l.jsx("p",{children:"Not included:"}),l.jsx("ul",{"aria-label":"Skipped assessments",className:"list-disc pl-5",children:_.skipped.map(B=>l.jsxs("li",{children:[nJ(B.reason),": ",B.count]},`${B.runId}:${B.reason}`))})]}),l.jsx(D0,{disabled:te||!_.previewToken||_.eligibleAssessments===0,onClick:()=>Z.mutate(),children:Z.isPending?"Submitting…":"Confirm sentiment backfill"})]}),Z.isError&&l.jsxs("p",{role:"alert",children:[Oi(Z.error)," Retry uses the same request key."]}),Z.isSuccess&&l.jsx("p",{role:"status",children:"Backfill submitted. Progress is available in Recent jobs."})]})]})}const oJ=20,rJ=6;function lJ({points:e,tone:n}){const i=N.useId();if(e.length===0)return null;const o=42,u=132,h=5,f=u-h*2,b=o-h*2,v=b-rJ,x=T=>h+T/Math.max(e.length-1,1)*f,k=gG(e),S=Math.min(...e),C=Math.max(...e),_=Math.max(C-S,oJ),z=(C+S)/2-_/2,q=e.map((T,V)=>({x:x(V),y:h+(1-(T-z)/_)*v}));return l.jsxs("svg",{className:`sparkline sparkline-${n}${k?" sparkline-provisional":""}`,viewBox:`0 0 ${u} ${o}`,"aria-hidden":"true",children:[l.jsx("defs",{children:l.jsx("clipPath",{id:i,children:l.jsx("rect",{x:h,y:h,width:f,height:b,rx:"8"})})}),l.jsx("line",{className:"sparkline-guide",x1:h,x2:u-h,y1:o-h,y2:o-h}),q.length===1?l.jsx("circle",{className:"sparkline-point",cx:q[0].x,cy:q[0].y,r:"3"}):l.jsx("polyline",{clipPath:`url(#${i})`,points:q.map(T=>`${T.x},${T.y}`).join(" "),vectorEffect:"non-scaling-stroke"})]})}function cJ({project:e,sentimentColumn:n}){return l.jsxs("div",{className:`project-row relative${n?" project-row-with-sentiment":""}`,children:[l.jsx("div",{className:"project-row-chart",children:l.jsx(lJ,{points:e.trend,tone:NN(e.lastRun.status)})}),l.jsxs("div",{className:"project-row-primary",children:[l.jsxs(et,{to:"/projects/$projectName",params:{projectName:e.project.name},className:"after:absolute after:inset-0 after:rounded-xl focus-visible:outline-none focus-visible:after:ring-2 focus-visible:after:ring-mono-400",children:[l.jsx("p",{className:"project-name",children:e.project.name}),l.jsx("p",{className:"project-domain",children:e.project.canonicalDomain})]}),l.jsx("p",{className:"project-insight",children:e.insight})]}),l.jsx("div",{className:"project-row-stat",children:l.jsxs("div",{className:"metric-inline-block",children:[l.jsx("p",{className:"metric-inline-label",children:"Mentioned"}),l.jsx("p",{className:`metric-inline-value ${e.mentionTone==="caution"?"text-caution-400":""}`,children:e.hasMeasurement===!1?"Not measured":Yd(e.mentionScore,$a.percent)}),l.jsx("p",{className:`metric-inline-caption${e.providerCoverage?" text-caution":""}`,title:e.providerCoverage,children:e.providerCoverage?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"sr-only",children:"Partial sweep: "}),e.providerCoverage]}):e.mentionDelta})]})}),l.jsx("div",{className:"project-row-stat",children:l.jsxs("div",{className:"metric-inline-block",children:[l.jsxs("p",{className:"metric-inline-label",children:[l.jsx("span",{"aria-hidden":"true",children:"Pressure"}),l.jsx("span",{className:"sr-only",children:"Competitor pressure"})]}),l.jsx("p",{className:"metric-inline-value",children:e.hasMeasurement===!1?"Not measured":e.competitorPressureLabel}),l.jsx("p",{className:"metric-inline-caption","aria-hidden":"true"})]})}),I1(e.sentiment)?l.jsx(KX,{value:e.sentiment}):n&&l.jsx("div",{className:"project-row-stat","aria-hidden":"true","data-sentiment-placeholder":!0}),l.jsx("span",{className:"project-row-link",children:l.jsx(Pc,{className:"h-4 w-4 text-muted"})})]})}function uJ(){const{isAdmin:e}=fa(),n=Wc(),{dashboard:i,isLoading:o,isError:u,refetch:h}=Gm(),f=i??n?.dashboard,v=N1(!n,n?.health),{openRun:x}=C1();if(u&&!f)return l.jsxs("div",{className:"page-container",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Portfolio unavailable"}),l.jsx("p",{className:"page-subtitle",children:"Canonry could not load the project list."})]})}),l.jsxs("div",{className:"max-w-xl rounded-lg border border-negative bg-negative-soft p-4",role:"alert",children:[l.jsx("p",{className:"text-sm font-medium text-heading",children:"Your projects have not been changed."}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Check the connection or sign in again, then retry."}),l.jsx(re,{type:"button",variant:"secondary",className:"mt-4",onClick:()=>{h()},children:"Retry loading portfolio"})]})]});if(!f||o)return l.jsxs("div",{className:"page-skeleton",children:[l.jsxs("div",{className:"page-skeleton-header",children:[l.jsx("div",{className:"skeleton-text h-6 w-32"}),l.jsx("div",{className:"skeleton-text-sm w-64"})]}),l.jsx("div",{className:"space-y-3",children:[1,2,3].map(T=>l.jsxs("div",{className:"rounded-xl border border-default bg-surface p-4 flex items-center gap-4",children:[l.jsxs("div",{className:"flex-1 space-y-2",children:[l.jsx("div",{className:"skeleton-text w-36"}),l.jsx("div",{className:"skeleton-text-sm w-48"})]}),l.jsx("div",{className:"skeleton-text w-16"}),l.jsx("div",{className:"skeleton-text w-16"}),l.jsx("div",{className:"skeleton h-8 w-20 rounded"})]},T))})]});const k=f.portfolioOverview,S=k.projects.length>0&&k.projects.every(T=>T.hasMeasurement===!1),C=k.projects.some(T=>I1(T.sentiment)),_=k.attentionItems.map(T=>S&&T.id==="attention_stable"?{...T,tone:"neutral",title:"Awaiting first measurement",detail:"Visibility results will appear after the first sweep."}:T),z=v.data??n?.health??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},q=vQ(k.systemHealth.filter(T=>e||T.id==="api"||T.id==="worker"),z,f.settings);return l.jsxs("div",{className:"page-container",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Portfolio"}),l.jsx("p",{className:"page-subtitle",children:"Visibility across all projects."})]})}),k.projects.length>0?l.jsx("div",{className:"project-list project-list-scrollable",children:k.projects.map(T=>l.jsx(cJ,{project:T,sentimentColumn:C},T.project.id))}):l.jsxs(_a,{className:"surface-card empty-card",children:[l.jsx("h3",{children:k.emptyState?.title??"No projects yet"}),l.jsx("p",{className:"supporting-copy",children:k.emptyState?.detail}),l.jsx(re,{size:"sm",asChild:!0,children:l.jsx(et,{to:k.emptyState?.ctaHref==="/setup"||!k.emptyState?.ctaHref?"/setup":"/",children:k.emptyState?.ctaLabel??"Launch setup"})})]}),l.jsxs("div",{className:"overview-secondary-grid",children:[_.length>0&&l.jsxs("section",{className:"overview-secondary-section",children:[l.jsx("div",{className:"section-head section-head-inline",children:l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Needs attention"}),l.jsx("h2",{className:"section-title-sm",children:"What changed"})]})}),l.jsx("div",{className:"attention-list attention-list-scrollable",children:_.map(T=>T.href?l.jsxs(et,{to:T.href,className:`attention-item attention-item-${T.tone}`,children:[l.jsxs("div",{children:[l.jsx("p",{className:"attention-title",children:T.title}),l.jsx("p",{className:"attention-detail",children:T.detail})]}),T.actionLabel&&l.jsx("span",{className:"attention-action",children:T.actionLabel})]},T.id):l.jsxs("div",{className:`attention-item attention-item-static attention-item-${T.tone}`,children:[l.jsxs("div",{children:[l.jsx("p",{className:"attention-title",children:T.title}),l.jsx("p",{className:"attention-detail",children:T.detail})]}),T.actionLabel&&l.jsx("span",{className:"attention-action",children:T.actionLabel})]},T.id))})]}),l.jsxs("section",{className:"overview-secondary-section",children:[l.jsx("div",{className:"section-head section-head-inline",children:l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Recent runs"}),l.jsx("h2",{className:"section-title-sm",children:"Activity"})]})}),l.jsx("div",{className:"compact-stack compact-stack-scrollable",children:k.recentRuns.length>0?k.recentRuns.map(T=>l.jsxs("button",{className:"compact-run",type:"button",onClick:()=>x(T.id),children:[l.jsxs("div",{children:[l.jsx("p",{className:"compact-run-title",children:T.projectName}),l.jsx("p",{className:"compact-run-detail",children:T.summary})]}),l.jsx(A1,{status:T.status})]},T.id)):l.jsx("p",{className:"supporting-copy",children:"Run history appears here after the first launch."})})]})]}),l.jsxs("section",{className:"page-section",children:[l.jsx("div",{className:"section-head section-head-inline",children:l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"System health"}),l.jsx("h2",{className:"section-title-sm",children:"Infrastructure"})]})}),l.jsx("div",{className:"divide-y divide-default border-y border-default",children:q.map(T=>{const V=T.id==="api"?z.apiStatus:T.id==="worker"?z.workerStatus:void 0,Y=V?V.state==="ok"?void 0:Br(V):T.tone==="positive"?void 0:T.meta;return l.jsxs("div",{className:"flex items-start justify-between gap-4 py-3",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-heading",children:T.label}),Y&&l.jsx("p",{className:"mt-1 text-sm text-secondary",children:Y})]}),l.jsx(vn,{tone:T.tone,title:V?Br(V):T.meta,children:T.detail})]},T.id)})})]})]})}const dJ='a, button, input, select, textarea, label, [role="button"], [role="link"], [role="checkbox"], [role="menuitem"]';function mJ(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return!1;const n=e.target;if(n&&typeof n.closest=="function"&&n.closest(dJ))return!1;const i=typeof window<"u"?window.getSelection():null;return!(i&&!i.isCollapsed&&i.toString().trim()!=="")}function pJ({onApplied:e}){const{canWrite:n}=fa(),[i,o]=N.useState(""),[u,h]=N.useState(!1),[f,b]=N.useState([]),[v,x]=N.useState([]);if(f1()||!n)return null;const k=async()=>{if(!i.trim())return;h(!0),b([]),x([]);const S=e6(i),C=[],_=[];for(let z=0;z<S.length;z++){const q=S[z];if(q.errors.length>0){C.push(`Document ${z+1}: ${q.errors[0]?.message}`);continue}const T=q.toJSON();if(!(!T||typeof T!="object"))try{const V=await qK(T);_.push(`Applied "${V.displayName||V.name}" (revision ${V.configRevision})`)}catch(V){C.push(`Document ${z+1}: ${Oi(V)}`)}}b(_),x(C),h(!1),_.length>0&&(xn({title:"YAML applied",detail:`Applied ${_.length} document${_.length===1?"":"s"} successfully.`,tone:C.length>0?"caution":"positive",dedupeKey:"yaml:apply",dedupeMode:"replace"}),e())};return l.jsxs("section",{className:"mt-8",children:[l.jsx("div",{className:"page-section-divider"}),l.jsx("div",{className:"section-head mt-6",children:l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Config as code"}),l.jsx("h2",{className:"text-sm font-medium text-strong",children:"Apply YAML"})]})}),l.jsxs("p",{className:"text-muted text-sm mb-3",children:["Paste a ",l.jsx("code",{className:"text-secondary",children:"canonry.yaml"})," config (multi-document YAML with ",l.jsx("code",{className:"text-secondary",children:"---"})," separators supported)."]}),l.jsx("textarea",{className:"setup-input w-full font-mono text-xs",rows:10,placeholder:`apiVersion: canonry/v1
|
|
65
|
+
kind: Project
|
|
66
|
+
metadata:
|
|
67
|
+
name: my-project
|
|
68
|
+
spec:
|
|
69
|
+
canonicalDomain: example.com
|
|
70
|
+
country: US
|
|
71
|
+
language: en
|
|
72
|
+
queries: []`,value:i,onChange:S=>o(S.target.value)}),f.length>0&&l.jsx("ul",{className:"mt-2 space-y-1",children:f.map((S,C)=>l.jsx("li",{className:"text-positive-400 text-sm",children:S},C))}),v.length>0&&l.jsx("ul",{className:"mt-2 space-y-1",children:v.map((S,C)=>l.jsx("li",{className:"text-negative-400 text-sm",children:S},C))}),l.jsx("div",{className:"mt-3",children:l.jsx(re,{type:"button",disabled:!i.trim()||u,onClick:fn(k),children:u?"Applying...":"Apply"})})]})}function hJ(){const{dashboard:e,isLoading:n,refetch:i}=Gm(),{canWrite:o,isAdmin:u}=fa(),h=Rs();if(!e||n)return l.jsxs("div",{className:"page-skeleton",children:[l.jsxs("div",{className:"page-skeleton-header",children:[l.jsx("div",{className:"skeleton-text h-6 w-28"}),l.jsx("div",{className:"skeleton-text-sm w-40"})]}),l.jsxs("div",{className:"rounded-xl border border-default bg-surface overflow-hidden",children:[l.jsx("div",{className:"p-3 border-b border-default flex gap-8",children:["Name","Domain","Mentions","Last run","Country"].map(b=>l.jsx("div",{className:"skeleton-text-sm w-16"},b))}),[1,2,3].map(b=>l.jsxs("div",{className:"p-3 border-b border-subtle flex gap-8 items-center",children:[l.jsxs("div",{className:"flex-1 space-y-1",children:[l.jsx("div",{className:"skeleton-text w-28"}),l.jsx("div",{className:"skeleton-text-sm w-16"})]}),l.jsx("div",{className:"skeleton-text w-24"}),l.jsx("div",{className:"skeleton h-5 w-14 rounded-full"}),l.jsx("div",{className:"skeleton h-5 w-16 rounded-full"}),l.jsx("div",{className:"skeleton-text-sm w-8"})]},b))]})]});const f=e.projects;return l.jsxs("div",{className:"page-container",children:[l.jsxs("div",{className:"page-header",children:[l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Projects"}),l.jsxs("p",{className:"page-subtitle",children:[f.length," project",f.length!==1?"s":""," tracked"]})]}),u?l.jsx("div",{className:"page-header-right",children:l.jsxs(re,{type:"button",onClick:()=>{h({to:"/setup",search:{experience:"platform"}})},children:[l.jsx(Kf,{className:"size-4 mr-1.5"}),f.length===0?"Map a site":"Add project"]})}):null]}),f.length>0?l.jsx("div",{className:"data-table-wrapper",children:l.jsxs("table",{className:"data-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Name"}),l.jsx("th",{children:"Domain"}),l.jsx("th",{children:"Mentions"}),l.jsx("th",{children:"Last run"}),l.jsx("th",{className:"text-right",children:"Country"})]})}),l.jsx("tbody",{children:f.map(b=>{const v=b.recentRuns[0];return l.jsxs("tr",{className:"cursor-pointer",onClick:x=>{mJ(x)&&h({to:"/projects/$projectName",params:{projectName:b.project.name}})},children:[l.jsxs("td",{children:[l.jsx(et,{to:"/projects/$projectName",params:{projectName:b.project.name},className:"text-heading font-medium hover:underline",children:b.project.displayName||b.project.name}),l.jsx("p",{className:"text-[11px] text-muted",children:b.project.name})]}),l.jsx("td",{className:"text-secondary",children:b.project.canonicalDomain}),l.jsx("td",{children:l.jsx(vn,{tone:b.mentionSummary.tone,children:b.mentionSummary.value})}),l.jsx("td",{className:"text-muted text-sm",children:v?l.jsx(A1,{status:v.status}):l.jsx("span",{className:"text-faint",children:"No runs"})}),l.jsx("td",{className:"text-right text-muted",children:b.project.country})]},b.project.id)})})]})}):l.jsxs(_a,{className:"surface-card empty-card",children:[l.jsx("h3",{children:"No projects yet"}),l.jsx("p",{className:"supporting-copy",children:"Map a public site to capture its Page Health baseline and exact fixes."}),u?l.jsxs(re,{type:"button",onClick:()=>{h({to:"/setup",search:{experience:"platform"}})},children:[l.jsx(Kf,{className:"size-4 mr-1.5"}),"Map a site"]}):null]}),o?l.jsx(pJ,{onApplied:()=>{i()}}):null]})}class fJ extends Error{constructor(){super(xN),this.name="ViewOnlyError"}}function gJ(e){if(!e.canWrite)throw new fJ}function mC(e){e.invalidateQueries({queryKey:x1({client:ee})}),e.invalidateQueries({queryKey:Es({client:ee})})}function el(){const e=fa();return()=>{gJ(e)}}function yJ(e){return e==="gsc-sync"?"GSC sync queued":e==="inspect-sitemap"?"Sitemap inspection queued":"Visibility sweep queued"}function bJ(e,n){const i=e??"Project";return n==="gsc-sync"?`${i} will refresh after the sync completes.`:n==="inspect-sitemap"?`${i} will notify you when sitemap inspection finishes.`:`${i} will notify you when the run finishes.`}function O1(e,n){k1({id:e.id,projectId:e.projectId,kind:e.kind,projectLabel:n.projectLabel,sourceAction:n.sourceAction,lastAnnouncedStatus:"queued"}),xn({title:yJ(e.kind),detail:bJ(n.projectLabel,e.kind),tone:"neutral",dedupeKey:`run:${e.id}`,dedupeMode:"replace"})}function vJ(e){const n=e.filter(f=>f.status!=="conflict"&&f.status!=="error"),i=e.filter(f=>f.status==="conflict"),o=e.filter(f=>f.status==="error"),u=i.length+o.length;if(n.length===0){const f=[o.length>0?`${o.length} need provider or query setup`:null,i.length>0?`${i.length} already have an active run`:null].filter(b=>b!==null);xn({title:"No runs queued",detail:f.length>0?`${f.join("; ")}.`:"No projects were available to queue.",tone:"caution",durationMs:8e3,dedupeKey:"run-all:conflict",dedupeMode:"replace"});return}for(const f of n)k1({id:f.id,projectId:f.projectId,kind:f.kind,projectLabel:f.projectName,sourceAction:"run-all",lastAnnouncedStatus:"queued"});const h=NQ({runIds:n.map(f=>f.id),queuedCount:n.length,skippedCount:u});xn({title:"Run-all batch queued",detail:u>0?`${n.length} project${n.length===1?"":"s"} queued; ${u} need attention or already have an active run.`:`${n.length} project${n.length===1?"":"s"} queued.`,tone:u>0?"caution":"neutral",dedupeKey:`batch:${h}`,dedupeMode:"replace"})}function Ym(e,n){if(e instanceof Tn&&e.code==="RUN_IN_PROGRESS"){xn({title:"Run already in progress",detail:n?.projectLabel?`${n.projectLabel} already has an active run. Wait for it to finish, then retry.`:"This project already has an active run. Wait for it to finish, then retry.",tone:"caution",durationMs:8e3,dedupeKey:`run-in-progress:${n?.projectKey??"project"}:${n?.sourceAction??"run"}`,dedupeMode:"replace"});return}xn({title:e instanceof Error?e.message:"Failed to queue run",tone:"negative"})}function xJ(){const e=el(),n=ma();return si({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:i,opts:o})=>EK(i,o),onSuccess:(i,o)=>{mC(n),O1(i,{projectLabel:o.projectLabel??o.projectName,sourceAction:o.sourceAction})},onError:(i,o)=>{o.sourceAction!=="setup-launch"&&Ym(i,{projectKey:o.projectName,projectLabel:o.projectLabel??o.projectName,sourceAction:o.sourceAction})}})}function Pie(){const e=el(),n=ma();return si({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:i=>MK(i),onSuccess:i=>{mC(n),vJ(i)},onError:i=>{xn({title:i instanceof Error?i.message:"Failed to queue runs",tone:"negative"})}})}function wJ(){const e=el(),n=ma();return si({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:i,body:o})=>UK(i,o),onSuccess:(i,o)=>{Rc(n,ze["site-audit"],o.projectName),k1({id:i.runId,projectId:o.projectId,kind:ze["site-audit"],projectLabel:o.projectLabel??o.projectName,sourceAction:"site-audit",lastAnnouncedStatus:i.status}),xn({title:i.status==="running"?"Site Health scan already running":"Site Health scan queued",detail:`${o.projectLabel??o.projectName} will refresh automatically when the scan finishes.`,tone:"neutral",dedupeKey:`run:${i.runId}`,dedupeMode:"replace"})},onError:(i,o)=>{o.suppressErrorToast||Ym(i,{projectKey:o.projectName,projectLabel:o.projectLabel??o.projectName,sourceAction:"site-audit"})}})}function qie(){const e=el(),n=ma();return si({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:i,opts:o})=>BK(i,o),onSuccess:(i,o)=>{Rc(n,ze["gsc-sync"],o.projectName),O1(i,{projectLabel:o.projectLabel??o.projectName,sourceAction:"gsc-sync"})},onError:(i,o)=>{Ym(i,{projectKey:o.projectName,projectLabel:o.projectLabel??o.projectName,sourceAction:"gsc-sync"})}})}function Mie(){const e=el(),n=ma();return si({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:i,opts:o})=>LK(i,o),onSuccess:(i,o)=>{Rc(n,ze["inspect-sitemap"],o.projectName),O1(i,{projectLabel:o.projectLabel??o.projectName,sourceAction:"inspect-sitemap"})},onError:(i,o)=>{Ym(i,{projectKey:o.projectName,projectLabel:o.projectLabel??o.projectName,sourceAction:"inspect-sitemap"})}})}function pC(e){if(!Array.isArray(e.queryKey)||e.queryKey.length<=1)return!1;const n=e.queryKey[0];return n==="projects"||n==="project-dashboard-full"}function Bie(){const e=el(),n=ma();return si({onMutate:e,mutationFn:({projectName:i,queries:o})=>_K(i,o),onSuccess:()=>{n.invalidateQueries({queryKey:Es({client:ee})}),n.invalidateQueries({predicate:pC})}})}const Zk=[{id:"site",label:"Scan site",optional:!1},{id:"fixes",label:"Page health",optional:!1},{id:"visibility",label:"AI Visibility",optional:!0},{id:"done",label:"Next steps",optional:!1}],kJ={skipped:"Skipped",pending:"In progress",incomplete:"Didn’t finish",unknown:null};function _o({current:e,outcomes:n={}}){const i=Zk.findIndex(o=>o.id===e);return l.jsx("ol",{"aria-label":"Onboarding progress",className:"grid border-y border-default sm:grid-cols-4 sm:divide-x sm:divide-default",children:Zk.map((o,u)=>{const h=u<i?n[o.id]:void 0,f=u<i&&h===void 0,b=u===i,v=h?kJ[h]:null;return l.jsxs("li",{"aria-current":b?"step":void 0,className:"flex min-h-12 items-center gap-3 py-2 sm:px-3 sm:first:pl-0 sm:last:pr-0",children:[l.jsx("span",{"aria-hidden":"true",className:`flex size-6 shrink-0 items-center justify-center rounded-full border text-xs font-semibold tabular-nums ${b?"border-accent bg-accent text-on-inverse":f?"border-positive bg-positive-soft text-positive":"border-default bg-surface-subtle text-muted"}`,children:f?"✓":h==="skipped"||h==="incomplete"?"–":u+1}),l.jsxs("span",{className:"flex min-w-0 flex-wrap items-baseline gap-x-2",children:[l.jsx("span",{className:`text-sm font-medium ${b||f?"text-heading":"text-secondary"}`,children:o.label}),v?l.jsx("span",{className:"text-[13px] text-secondary",children:v}):o.optional&&!h?l.jsx("span",{className:"text-[13px] text-secondary",children:"Optional"}):null,f?l.jsx("span",{className:"sr-only",children:"Complete"}):null]})]},o.id)})})}function SJ(){return[{id:"search-console",icon:L0,label:"Search Console",detail:"Compare answer engines with the queries you already rank for.",action:"Connect",to:"/projects/$projectName/search-console"},{id:"analytics",icon:gS,label:"Google Analytics",detail:"See the traffic answer engines actually send you.",action:"Connect",to:"/projects/$projectName/activity"},{id:"schedule",icon:yS,label:"Scheduled sweeps",detail:"Re-measure on a schedule instead of by hand.",action:"Set up",to:"/projects/$projectName/settings"},{id:"notifications",icon:Hf,label:"Notifications",detail:"Send a webhook when a sweep finishes or a score moves.",action:"Set up",to:"/projects/$projectName/settings"},{id:"local",icon:bS,label:"Local presence",detail:"Track the Google Business Profile behind local answers.",action:"Open",to:"/projects/$projectName/local"},{id:"agent",icon:Y5,label:"Your agent",detail:"Read this project from Claude Code, Codex, or any MCP client.",action:"Docs",href:"https://github.com/Canonry/canonry/blob/main/docs/mcp.md"}]}function jJ({projectName:e}){const n=SJ();return l.jsxs("section",{"aria-labelledby":"next-steps-heading",className:"mt-6 border-t border-default pt-5",children:[l.jsx("h2",{id:"next-steps-heading",className:"text-sm font-medium text-heading",children:"What else this project can do"}),l.jsx("ul",{className:"mt-3 divide-y divide-default",children:n.map(({id:i,icon:o,label:u,detail:h,action:f,to:b,href:v})=>l.jsxs("li",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 py-3",children:[l.jsx(o,{className:"size-4 shrink-0 text-muted","aria-hidden":"true"}),l.jsx("span",{className:"min-w-36 text-sm font-medium text-heading",children:u}),l.jsx("span",{className:"min-w-0 flex-1 text-sm text-secondary",children:h}),b?l.jsxs(et,{to:b,params:{projectName:e},className:"text-sm font-medium text-link underline-offset-4 hover:underline",children:[f,l.jsxs("span",{className:"sr-only",children:[" ",u]})]}):l.jsxs("a",{href:v,target:"_blank",rel:"noreferrer",className:"text-sm font-medium text-link underline-offset-4 hover:underline",children:[f,l.jsxs("span",{className:"sr-only",children:[" ",u]})]})]},i))})]})}function AJ({providerName:e,keyUrl:n,modelHint:i,compact:o=!1,leadingField:u,secondaryActions:h,onSaved:f}){const b=e.toLowerCase()==="local",v=o&&e.toLowerCase()==="gemini"&&!!n,[x,k]=N.useState(""),[S,C]=N.useState(""),[_,z]=N.useState(""),[q,T]=N.useState(""),[V,Y]=N.useState(""),[M,U]=N.useState(""),[Z,te]=N.useState(!1),[B,X]=N.useState(null),[le,Je]=N.useState(!1),nt=b?S.trim().length>0:x.trim().length>0;async function $e(){if(nt){te(!0),X(null),Je(!1);try{const W=ce=>{const F=parseInt(ce.trim(),10);return Number.isFinite(F)&&F>0?F:void 0},_e={},qe=W(q);qe!==void 0&&(_e.maxConcurrency=qe);const ve=W(V);ve!==void 0&&(_e.maxRequestsPerMinute=ve);const de=W(M);de!==void 0&&(_e.maxRequestsPerDay=de),await yN(e.toLowerCase(),{...x.trim()?{apiKey:x.trim()}:{},...S.trim()?{baseUrl:S.trim()}:{},..._.trim()?{model:_.trim()}:{},...Object.keys(_e).length>0?{quota:_e}:{}}),k(""),C(""),z(""),T(""),Y(""),U(""),Je(!0),xn({title:"Provider updated",detail:`${e} configuration saved.`,tone:"positive",dedupeKey:`settings:provider:${e}`,dedupeMode:"replace"}),f()}catch(W){X(W instanceof Error?W.message:"Failed to update provider")}finally{te(!1)}}}const Pe=i??"Use default model",Se=o?"block text-sm font-medium text-secondary":"text-sm text-secondary",Ue=o?"setup-input min-h-11 w-full":"mt-0.5 w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",P=l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:o?"space-y-1.5":void 0,children:[l.jsx("label",{className:Se,htmlFor:`model-${e}`,children:"Model (optional)"}),l.jsx("input",{id:`model-${e}`,type:"text",className:Ue,placeholder:Pe,value:_,onChange:W=>z(W.target.value)})]}),l.jsxs("div",{children:[l.jsx("label",{className:Se,children:"Quota (optional)"}),l.jsxs("div",{className:"mt-0.5 grid grid-cols-3 gap-1.5",children:[l.jsxs("div",{children:[l.jsx("input",{type:"number",min:"1",className:o?"setup-input min-h-11 w-full":"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:"Concurrent",value:q,onChange:W=>T(W.target.value)}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Max concurrent"})]}),l.jsxs("div",{children:[l.jsx("input",{type:"number",min:"1",className:o?"setup-input min-h-11 w-full":"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:"/min",value:V,onChange:W=>Y(W.target.value)}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Per minute"})]}),l.jsxs("div",{children:[l.jsx("input",{type:"number",min:"1",className:o?"setup-input min-h-11 w-full":"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:"/day",value:M,onChange:W=>U(W.target.value)}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Per day"})]})]})]})]}),J=b?l.jsxs("div",{className:o?"space-y-1.5":void 0,children:[l.jsx("label",{className:Se,htmlFor:`base-url-${e}`,children:"Base URL"}),l.jsx("input",{id:`base-url-${e}`,type:"text",className:Ue,placeholder:"http://localhost:11434/v1",value:S,onChange:W=>C(W.target.value)}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Use any OpenAI-compatible endpoint, such as Ollama or vLLM."})]}):null,be=l.jsxs("div",{className:o?"min-w-0 space-y-1.5":void 0,children:[l.jsxs("div",{className:o?"flex items-center justify-between gap-3":"flex items-center justify-between",children:[l.jsxs("label",{className:Se,htmlFor:`api-key-${e}`,children:["API key",b?" (optional)":""]}),n&&!v&&l.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-secondary hover:text-neutral underline underline-offset-2",children:["Get API key ","↗"]})]}),l.jsx("input",{id:`api-key-${e}`,type:"password",autoComplete:"new-password",autoCapitalize:"none",spellCheck:!1,className:Ue,placeholder:b?"Optional. Most local servers do not need one.":`Enter ${e} API key`,value:x,onChange:W=>k(W.target.value)})]}),je=l.jsx(re,{type:"button",size:o?"default":"sm",className:o?"min-h-11":void 0,disabled:!nt||Z,onClick:fn($e),children:Z?"Saving...":o?"Save connection":"Save"});return l.jsxs("div",{className:o?"space-y-3":"mt-3 rounded-lg border border-base bg-bg-elevated/40 p-3 space-y-2",children:[v&&l.jsxs("div",{className:"flex flex-wrap items-start gap-x-6 gap-y-3 pb-2",children:[l.jsxs("div",{className:"min-w-0 flex-1 basis-72 space-y-1",children:[l.jsx("h3",{className:"text-base font-semibold text-heading",children:"Start with Gemini’s free tier"}),l.jsxs("p",{className:"max-w-prose text-sm text-secondary",children:["Get a key in Google AI Studio, then paste it below. Free usage has model and rate limits; paid usage is billed by Google."," ",l.jsx("a",{href:"https://ai.google.dev/gemini-api/docs/pricing",target:"_blank",rel:"noopener noreferrer",className:"text-link underline underline-offset-2 focus-visible:outline-2 focus-visible:outline-offset-2",children:"Pricing and limits"})]})]}),l.jsx(re,{variant:"outline",className:"min-h-11",asChild:!0,children:l.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:["Get a free Gemini API key ","↗"]})})]}),o?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:u?"grid items-start gap-3 sm:grid-cols-[minmax(0,0.7fr)_minmax(0,1.3fr)]":void 0,children:[u,be]}),J]}):l.jsxs(l.Fragment,{children:[J,be]}),o?l.jsxs("details",{children:[l.jsx("summary",{className:"min-h-11 cursor-pointer text-sm text-secondary py-3",children:"Advanced provider settings"}),l.jsx("div",{className:"space-y-3 pt-2",children:P})]}):P,B&&l.jsx("p",{role:"alert",className:"text-sm text-negative-400",children:B}),le&&l.jsx("p",{className:"text-sm text-positive-400",children:"Provider updated."}),o?l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[je,h]}):je]})}const um="cdp:chatgpt";function bo(e){return e.trim().toLowerCase()}function NJ({projectProviders:e,configuredApiProviders:n,cdpConfigured:i}){const o=e.map(bo),u=new Set(o),h=o.length===0||o.some(x=>x!==um),f=o.length===0||u.has(um);if(h&&n!==void 0&&n.map(bo).some(k=>o.length===0||u.has(k))||f&&i===!0)return!0;if(!(h&&n===void 0||f&&i===void 0))return!1}const CJ=[{label:"System check",description:"Verify your instance is ready"},{label:"Create project",description:"Name, domain, and locale"},{label:"Queries",description:"Add queries to track"},{label:"Competitors",description:"Add competitor domains"},{label:"Launch",description:"Start your first visibility sweep"}],_J=[{label:"Queries"},{label:"First sweep"}];function Yk(e,n){return(e==="completed"||e==="partial")&&n>0}function Xk(e){return e.launchReady?e.hasProject?e.queryCount===0?2:e.competitorCount===0&&!e.hasRunAttempt?3:4:1:0}function hC(e){return e.queryCounts.total>0}function TJ(e,n){return n?e.find(i=>i.project.name===n)??null:e.find(i=>!hC(i))??e.at(0)??null}function EJ({current:e,labels:n}){return l.jsx("div",{className:"setup-steps",role:"list","aria-label":"Setup progress",children:n.map((i,o)=>{const u=o<e,h=o===e;return l.jsxs("div",{className:`setup-step ${u?"setup-step-done":""} ${h?"setup-step-active":""}`,role:"listitem","aria-current":h?"step":void 0,children:[l.jsx("span",{className:"setup-step-number",children:u?"✓":o+1}),l.jsx("span",{children:i.label})]},i.label)})})}function RJ({visibilityProjectName:e,siteHealthOnboarding:n=!1,onboardingFinish:i=n}={}){const{canWrite:o}=fa();return e&&o?l.jsx(Jk,{visibilityProjectName:e,siteHealthOnboarding:n,onboardingFinish:i}):l.jsx(E1,{title:e?"Set up AI Visibility":"Setup",children:l.jsx(Jk,{visibilityProjectName:e,siteHealthOnboarding:n,onboardingFinish:i})})}function Jk({visibilityProjectName:e,siteHealthOnboarding:n,onboardingFinish:i}){const o=Wc(),{isAdmin:u}=fa(),{dashboard:h,isLoading:f,refetch:b}=Gm(void 0,{pauseProjectPolling:!0,includeSettings:u}),v=h??o?.dashboard,x=Rs(),k=N.useCallback(C=>{C&&e&&C.focus()},[e]),S=()=>{if(!e){x({to:"/",replace:!0});return}if(i){x({to:"/setup",search:{onboarding:"complete",setupProject:e,skipped:"visibility"},replace:!0});return}x({to:"/projects/$projectName",params:{projectName:e},replace:!0})};return!v||f?l.jsxs("div",{className:"page-skeleton",children:[l.jsxs("div",{className:"page-skeleton-header",children:[l.jsx("div",{className:"skeleton-text h-6 w-24"}),l.jsx("div",{className:"skeleton-text-sm w-80"})]}),l.jsxs("div",{className:"page-skeleton-card",children:[l.jsx("div",{className:"skeleton-text w-32"}),l.jsx("div",{className:"space-y-3 mt-3",children:[1,2,3].map(C=>l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-1 flex-1",children:[l.jsx("div",{className:"skeleton-text w-24"}),l.jsx("div",{className:"skeleton-text-sm w-48"})]}),l.jsx("div",{className:"skeleton h-6 w-16 rounded-full"})]},C))})]})]}):e&&!v.projects.some(C=>C.project.name===e)?l.jsxs("div",{className:"page-container",children:[n?l.jsx(_o,{current:"visibility"}):null,l.jsxs("div",{className:"page-header",children:[l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{ref:k,tabIndex:-1,className:"page-title",children:"Set up AI Visibility"}),l.jsx("p",{className:"page-subtitle",children:"Choose what to track, then run your first visibility sweep."})]}),n?l.jsx("div",{className:"page-header-right",children:l.jsx(re,{type:"button",variant:"outline",onClick:S,children:"Skip AI Visibility"})}):null]}),l.jsxs(_a,{role:"alert",className:"compact-stack",children:[l.jsx("h2",{children:"Project not found"}),l.jsx("p",{className:"text-secondary",children:"Canonry could not find the project handed off from Site Health. Refresh the project list or choose a project to continue."}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx(re,{type:"button",variant:"outline",onClick:()=>{b()},children:"Retry"}),l.jsx(re,{type:"button",asChild:!0,children:l.jsx(et,{to:"/projects",children:"View projects"})})]})]})]}):l.jsx(DJ,{dashboard:v,initialHealth:o?.health,enableLiveStatus:!o,refetch:b,visibilityProjectName:e,visibilityHeadingRef:k,siteHealthOnboarding:n,onboardingFinish:i})}function DJ({dashboard:e,initialHealth:n,enableLiveStatus:i,refetch:o,visibilityProjectName:u,visibilityHeadingRef:h,siteHealthOnboarding:f,onboardingFinish:b}){const v=e.settings,{isAdmin:x}=fa(),S=N1(i,n).data??n??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},C=wQ(e.setup,S,v),_=!!u,z=Rs(),q=ma(),T=N.useRef(d1()).current,V=N.useRef(new Set),Y=N.useCallback((K,Fe)=>{if(Fe){if(V.current.has(Fe))return;V.current.add(Fe)}y1({surface:"wizard",...K,eventId:m1()})},[]),M=TJ(e.projects,u),U=M?e.runs.filter(K=>K.projectId===M.project.id).sort((K,Fe)=>Fe.createdAt.localeCompare(K.createdAt)):[],Z=M?.queryCounts.total??0,te=M?.project.name,B=yt({queryKey:["setup","resume-queries",te],queryFn:()=>te?hN(te):Promise.resolve([]),enabled:!!te}),X=B.data??[],le=B.data?.length??Z,Je=M?.competitors.map(K=>K.domain)??[],nt=U.at(0)??null,$e=!!M&&hC(M),Pe=!!M&&B.isPending,Se=_?2:Xk({launchReady:C.launchState.enabled,hasProject:!!M,queryCount:le,competitorCount:Je.length,hasRunAttempt:U.length>0||$e}),Ue=Xk({launchReady:!0,hasProject:!!M,queryCount:le,competitorCount:Je.length,hasRunAttempt:U.length>0||$e}),[P,J]=N.useState(Se),[be,je]=N.useState(!Pe),W=_&&(Pe||!be),[_e,qe]=N.useState(M?.project.name??""),[ve,de]=N.useState(M?.project.displayName??""),[ce,F]=N.useState(M?.project.canonicalDomain??""),[pe,Oe]=N.useState(M?.project.country??"US"),[Ae,st]=N.useState(M?.project.language??"en"),[Ve,At]=N.useState(M?.project.autoExtractBacklinks??!1),[Ke,me]=N.useState(M?.project.name??null),[at,zt]=N.useState(null),[Pn,Kt]=N.useState(!1),Me=()=>{if(!Ke){z({to:"/",replace:!!u});return}z({to:f?"/projects/$projectName/technical-aeo":"/projects/$projectName",params:{projectName:Ke},replace:!!u})},ct=(K=!1)=>{if(!b||!Ke){Me();return}z({to:"/setup",search:{onboarding:"complete",setupProject:Ke,...K?{skipped:"visibility"}:{}},replace:!0})},Ht=()=>ct(!0),[Ft,En]=N.useState(X.map(K=>K.query).join(`
|
|
73
|
+
`)),[Ut,ci]=N.useState(le>0),[Ls,ui]=N.useState(null),[Rn,qo]=N.useState(!1),[Us,Vs]=N.useState(!1),di=v.providerStatuses.filter(K=>K.state==="ready"),yn=M?.project.providers.map(bo)??[],_t=di.filter(K=>yn.length===0||yn.includes(bo(K.name))),$n=di.map(K=>bo(K.name)),Qt=_t.length>0,$s=yn.length===0||yn.includes(um),Ia=_&&!x,Jn=yt({...BH({client:ee,path:{name:te??""}}),enabled:Ia&&!!te,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:"always",retry:!1}),oe=Jn.data?.answerVisibilityProviderReady,Ee=Ia&&(Jn.isError||Jn.isSuccess&&typeof oe!="boolean"),Ze=yt({...uF({client:ee}),enabled:!Ia&&$s&&!Qt,staleTime:6e4,retry:!1}),It=$s?Ze.isSuccess?typeof Ze.data.browserVersion=="string":Ze.isError?!1:void 0:!1,Xe=Ia?Jn.isSuccess&&Jn.isFetchedAfterMount&&!Jn.isFetching?oe:void 0:NJ({projectProviders:yn,configuredApiProviders:$n,cdpConfigured:It}),xt=_t.length+(It===!0?1:0),[sn,mi]=N.useState(_t[0]?.name??""),[Mo,Gs]=N.useState(5),[eu,tl]=N.useState(!1),[nl,al]=N.useState(null),[il,sl]=N.useState(""),Bo=N.useRef(!1),tu=N.useCallback(K=>{!K||!Bo.current||(Bo.current=!1,K.focus({preventScroll:!0}))},[]),[ga,on]=N.useState(!1),[Dn,Fi]=N.useState(!1),[Lo,nu]=N.useState(!1),Uo=v.providerStatuses.filter(K=>bo(K.name)!==um&&(yn.length===0||yn.includes(bo(K.name)))),Wn=Uo.find(K=>K.name===il)??Uo.find(K=>K.state!=="ready")??Uo.at(0),Qi=`Help me choose AI Visibility queries for Canonry project ${JSON.stringify(Ke??_e)} (${ce}).
|
|
74
|
+
1. Read the project, its existing tracked queries, and Site Health findings. Ask about my customers, services, and locations if needed, then propose relevant customer queries.
|
|
75
|
+
2. Check the configured connection's capabilities, then use Canonry's Research flow to test a small approved batch. Retrieve saved answers and any available sources. Compare brand mentions separately from site citations; unavailable citation evidence is not a "not cited" result. Text-only routes can inform query research but cannot establish an AI Visibility baseline. Research does not add queries to tracking. If more candidates are needed, propose ICP Discovery separately.
|
|
76
|
+
3. Recommend a short list with reasons. Ask before provider usage. Once I approve, preserve existing queries and return the combined list, one query per line, for me to paste into setup. Do not change tracked queries or launch a visibility sweep.`,ol=async()=>{nu(!1);try{await navigator.clipboard.writeText(Qi),Fi(!0)}catch{nu(!0)}},[pi,Zi]=N.useState(Je.join(`
|
|
77
|
+
`)),[Yi,Xi]=N.useState(Je.length>0),[en,rl]=N.useState(null),[ll,Fa]=N.useState(!1),cl=N.useRef(sN(te)).current?.runId??null,ul=N.useRef(cl),[Qa,Wm]=N.useState(!!cl||!!nt&&!$e),[hi,Hs]=N.useState(!1),[Sn,zn]=N.useState(null),[Ji,ep]=N.useState(cl??($e?null:nt?.id??null)),dl=xJ(),Za=yt({...w1({client:ee,path:{id:Ji??""}}),enabled:!!Ji,refetchInterval:({state:K})=>{const Fe=K.data?.status;return Fe==="completed"||Fe==="partial"||Fe==="failed"||Fe==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}),[Wi,au]=N.useState(""),[In,Vo]=N.useState(!1),[ml,$o]=N.useState(null),Gn=_e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),ea=Ft.split(`
|
|
78
|
+
`).map(K=>K.trim()).filter(Boolean),fi=pi.split(`
|
|
79
|
+
`).map(K=>K.trim()).filter(Boolean),ya=Math.max(le,Ut?ea.length:0),ba=_G({apiReady:S.apiStatus.state==="ok",databaseConfigured:S.apiStatus.databaseConfigured,workerReady:S.workerStatus.state==="ok",providerReady:Xe!==!1}),Ya=(ba&&ba!=="no_provider"?C.launchState.blockedReason:Ee?"Provider readiness could not be checked. Try again.":Xe===void 0?"Checking provider readiness before launch.":ba==="no_provider"?"Launch is blocked until a provider allowed by this project is configured.":void 0)??(Ke?ya===0?"Add at least one query before launching the first sweep.":void 0:"Create a project before launching the first sweep.");N.useEffect(()=>{be||Pe||(_||J(Se),X.length>0&&(En(X.map(K=>K.query).join(`
|
|
80
|
+
`)),ci(!0)),je(!0))},[X,Se,_,be,Pe]),N.useEffect(()=>{if(_t.length===0){mi("");return}_t.some(K=>K.name===sn)||mi(_t[0].name)},[_t,sn]),N.useEffect(()=>{be&&(Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.started",step:CG(Se),resumed:!!M},"onboarding.started"),!M&&Se>0&&Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.step_completed",step:"system",method:"automatic"},"onboarding.step_completed:system"))},[Y,Se,T,be,M]),N.useEffect(()=>{_||!TG(S)||!ba||Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.blocked",step:"system",action:ba==="no_provider"?"configure_provider":"continue",reasonCode:ba},`onboarding.blocked:system:${ba}`)},[Y,S,_,T,ba]);const Oa=Za.data?.status,Go=Za.data?.snapshots?.length??0;N.useEffect(()=>{if(!Qa||!Oa)return;const K=ul.current;if(!K||K!==Ji)return;if(Yk(Oa,Go)){Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.step_completed",step:"run",method:"automatic",countBucket:ai(Go)},"onboarding.step_completed:run"),em(K);return}const Fe=Oa==="cancelled"?"run_cancelled":Oa==="failed"||(Oa==="completed"||Oa==="partial")&&Go===0?"run_failed":void 0;Fe&&(Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:Fe},`onboarding.blocked:run:${Fe}`),em(K))},[Y,Ji,T,Oa,Go,Qa]);const np=async()=>{if(!(!Gn||!ce)){Kt(!0),zt(null);try{const K=await gN(Gn,{displayName:ve||_e,canonicalDomain:ce,country:pe,language:Ae,autoExtractBacklinks:Ve});me(Gn),xn({title:"Project created",detail:`${K.displayName||K.name} is ready for setup.`,tone:"positive",dedupeKey:`project:create:${K.name}`,dedupeMode:"drop"}),await o(),Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.step_completed",step:"project",method:"manual"},"onboarding.step_completed:project"),J(2)}catch(K){zt(K instanceof Error?K.message:"Failed to create project"),Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.blocked",step:"project",action:"save",reasonCode:"project_create_failed"},"onboarding.blocked:project:project_create_failed")}finally{Kt(!1)}}},Ko=async()=>{if(!Ke)return;const K=ea;if(K.length!==0){qo(!0),ui(null);try{await CK(Ke,K),ci(!0),_?await Promise.all([q.invalidateQueries({queryKey:SN({client:ee,path:{name:Ke}})}),q.invalidateQueries({predicate:pC}),q.invalidateQueries({queryKey:["setup","resume-queries",Ke]})]):await o(),Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.step_completed",step:"queries",method:Us?"generated":"manual",countBucket:ai(K.length)},"onboarding.step_completed:queries"),J(_?4:3)}catch(Fe){ui(Fe instanceof Error?Fe.message:"Failed to save queries"),Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.blocked",step:"queries",action:"save",reasonCode:"query_save_failed"},"onboarding.blocked:queries:query_save_failed")}finally{qo(!1)}}},Pa=async()=>{if(!(!Ke||!sn)){tl(!0),al(null);try{const K=await PK(Ke,sn,Mo);if(K.queries.length>0){const Fe=Ft?Ft.trimEnd()+`
|
|
81
|
+
`+K.queries.join(`
|
|
82
|
+
`):K.queries.join(`
|
|
83
|
+
`);En(Fe),Vs(!0)}}catch(K){al(K instanceof Error?K.message:"Failed to generate queries"),Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.blocked",step:"queries",action:"generate_queries",reasonCode:xc(K,"unknown")},"onboarding.blocked:queries:generate")}finally{tl(!1)}}},pl=async()=>{if(!Ke)return;const K=fi;if(K.length!==0){Fa(!0),rl(null);try{await TK(Ke,K),Xi(!0),await o(),Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.step_completed",step:"competitors",method:"manual",countBucket:ai(K.length)},"onboarding.step_completed:competitors"),J(4)}catch(Fe){rl(Fe instanceof Error?Fe.message:"Failed to save competitors"),Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.blocked",step:"competitors",action:"save",reasonCode:"unknown"},"onboarding.blocked:competitors:save")}finally{Fa(!1)}}},hl=async()=>{const K=Wi.trim();if(K){Vo(!0),$o(null);try{await yN("gemini",{apiKey:K}),xn({title:"Gemini configured",detail:"Provider is ready — continuing setup.",tone:"positive",dedupeKey:"setup:gemini:configured",dedupeMode:"drop"}),au(""),await o(),mi(v.providerStatuses.find(Fe=>Fe.name.toLowerCase()==="gemini")?.name??"gemini"),Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.step_completed",step:"system",method:"inline"},"onboarding.step_completed:system")}catch(Fe){$o(Fe instanceof Error?Fe.message:"Failed to save Gemini key"),Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.blocked",step:"system",action:"configure_provider",reasonCode:"provider_save_failed"},"onboarding.blocked:system:provider_save_failed")}finally{Vo(!1)}}},gi=async()=>{if(!go()){if(!Ke||Ya){zn(Ya??"Complete setup before launching the first sweep.");const K=ba??(Ke?ya===0?"no_queries":"run_rejected":"unknown");Ia||Y({flowVersion:ft,onboardingSessionId:T,event:"run.requested",origin:"dashboard_setup",result:"rejected",providerCountBucket:ai(xt),queryCountBucket:ai(ya),reasonCode:K});return}Hs(!0),zn(null);try{const K=await dl.mutateAsync({projectName:Ke,projectLabel:ve||_e||Ke,sourceAction:"setup-launch"});ep(K.id),Wm(!0),iN(Ke,K.id),ul.current=K.id,Ia||Y({flowVersion:ft,onboardingSessionId:T,event:"run.requested",origin:"dashboard_setup",result:"queued",providerCountBucket:ai(xt),queryCountBucket:ai(ya)}),await o()}catch(K){zn(K instanceof Error?K.message:"Failed to queue the visibility sweep. Retry when the instance is ready."),Ia||Y({flowVersion:ft,onboardingSessionId:T,event:"run.requested",origin:"dashboard_setup",result:"rejected",providerCountBucket:ai(xt),queryCountBucket:ai(ya),reasonCode:xc(K,"run_rejected")})}finally{Hs(!1)}}},qn=()=>J(K=>_?2:Math.max(0,K-1)),Ho=(K,Fe,yi)=>{Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.step_completed",step:K,method:"existing",...yi===void 0?{}:{countBucket:ai(yi)}},`onboarding.step_completed:${K}`),J(Fe)},fl=()=>{if(Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.step_completed",step:"queries",method:"skipped",countBucket:"0"},"onboarding.step_completed:queries"),_){Ht();return}J(3)},gl=()=>{Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.step_completed",step:"competitors",method:"skipped",countBucket:"0"},"onboarding.step_completed:competitors"),J(4)},Fs=_?"section":_a,va=Xe!==!0||It===!0?l.jsx(re,{type:"button",variant:"ghost",size:"sm",className:"min-h-11",onClick:()=>{o(),$s&&Ze.refetch()},children:"Check again"}):null,yl=(Xe===!1||ga)&&!!Wn,Qs=_&&(P===2||P===4)?x?l.jsxs("section",{"aria-labelledby":"setup-provider-heading",className:"space-y-3 border-b border-default pb-6 mb-6",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx("h2",{id:"setup-provider-heading",className:"text-lg font-semibold text-heading",children:Xe===!1?"Connect a provider":"Answer engine provider"}),l.jsx(vn,{tone:Xe===!0?"positive":"neutral",children:Xe===!0?"Configured":Xe===!1?"Not connected":"Checking"})]}),l.jsx("p",{className:"max-w-prose text-sm text-secondary",children:Xe===!0?_t.length>0?`${_t.map(K=>K.displayName??K.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.":Xe===!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."}),Xe===!1||ga?Wn?l.jsx("div",{children:l.jsx(AJ,{compact:!0,leadingField:l.jsxs("div",{className:"min-w-0 space-y-1.5",children:[l.jsx("label",{className:"block text-sm font-medium text-secondary",htmlFor:"setup-provider",children:"Provider to connect"}),l.jsx("select",{ref:tu,id:"setup-provider",className:"setup-input",value:Wn.name,onChange:K=>{K.target.value!==Wn.name&&(Bo.current=document.activeElement===K.currentTarget,sl(K.target.value))},children:Uo.map(K=>l.jsx("option",{value:K.name,children:K.displayName??K.name},K.name))})]}),secondaryActions:va,providerName:Wn.name,keyUrl:Wn.keyUrl,modelHint:Wn.modelHint,onSaved:()=>{on(!1),o()}},Wn.name)}):l.jsx("p",{className:"max-w-prose text-sm text-secondary",children:yn.length>0?`This project's provider selection is ${yn.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,l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Xe===!0&&!ga&&Wn?l.jsx(re,{type:"button",variant:"outline",size:"sm",onClick:()=>on(!0),children:"Configure a provider"}):null,!Wn||It===!0?l.jsx(re,{type:"button",variant:"outline",size:"sm",asChild:!0,children:l.jsx(et,{to:"/settings",target:"_blank",rel:"noopener noreferrer",children:"Open provider settings"})}):null,yl?null:va]})]}):l.jsxs("section",{"aria-labelledby":"setup-provider-heading",className:"space-y-2 border-b border-default pb-6 mb-6",children:[l.jsx("h2",{id:"setup-provider-heading",className:"text-lg font-semibold text-heading",children:"Answer engine provider"}),l.jsx("p",{className:"max-w-prose text-sm text-secondary",children:"Provider settings are managed by an administrator."}),Ee?l.jsx("p",{role:"alert",className:"text-sm text-negative",children:"Provider readiness could not be checked. Try again."}):l.jsx("p",{className:"max-w-prose text-sm text-secondary",role:"status",children:Xe===!0?"An answer engine is available for this project.":Xe===!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."}),l.jsx(re,{type:"button",variant:"ghost",size:"sm",className:"min-h-11",disabled:Jn.isFetching,onClick:()=>{Jn.refetch()},children:Ee?"Retry provider check":"Check again"})]}):null,Xa=(()=>{switch(P){case 0:return l.jsxs(_a,{className:"surface-card step-card",children:[l.jsx("div",{className:"section-head",children:l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 1 of 5"}),l.jsx("h2",{children:"System check"})]})}),l.jsx("p",{className:"supporting-copy",children:"Checking that your Canonry instance is configured and reachable."}),l.jsx("div",{className:"compact-stack",children:C.healthChecks.map(K=>l.jsxs("div",{className:"health-check-row",children:[l.jsxs("div",{children:[l.jsx("p",{className:"run-row-title",children:K.label}),l.jsx("p",{className:"supporting-copy",children:K.detail}),K.id==="provider"&&K.state!=="ready"&&l.jsxs("div",{className:"mt-3 rounded-md border border-default bg-bg-elevated/40 p-3 space-y-2",children:[l.jsxs("p",{className:"text-xs text-secondary",children:["Paste a Gemini key to enable visibility checks (free at"," ",l.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"}),")."]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"password",value:Wi,onChange:Fe=>au(Fe.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:In}),l.jsx(re,{type:"button",size:"sm",disabled:In||!Wi.trim(),onClick:fn(hl),children:In?"Saving...":"Save"})]}),ml&&l.jsxs("div",{role:"alert",className:"space-y-1 text-xs text-negative",children:[l.jsx("p",{children:ml}),l.jsx("p",{children:"Check that the key is complete, then retry Save."})]}),l.jsxs("p",{className:"text-sm text-secondary",children:["Connect more answer engines later in"," ",l.jsx(et,{to:"/settings",className:"text-link hover:underline",children:"Settings"}),"."]})]})]}),l.jsx(vn,{tone:K.state==="ready"?"positive":"caution",title:K.id==="api"?Br(S.apiStatus):K.id==="worker"?Br(S.workerStatus):K.detail,children:K.state==="ready"?"Ready":"Attention"})]},K.id))}),l.jsxs("div",{className:"setup-nav",children:[C.launchState.blockedReason?l.jsx("p",{role:"status",className:"supporting-copy text-negative",children:C.launchState.blockedReason}):l.jsx("span",{}),l.jsx(re,{type:"button",disabled:!C.launchState.enabled,title:C.launchState.blockedReason,onClick:()=>{Y({flowVersion:ft,onboardingSessionId:T,event:"onboarding.step_completed",step:"system",method:"automatic"},"onboarding.step_completed:system"),J(Ue)},children:"Continue"})]})]});case 1:return l.jsxs(_a,{className:"surface-card step-card",children:[l.jsxs("div",{className:"section-head",children:[l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 2 of 5"}),l.jsx("h2",{children:"Create project"})]}),Ke?l.jsx(vn,{tone:"positive",children:"Created"}):null]}),Ke?l.jsxs("div",{className:"compact-stack",children:[l.jsxs("p",{className:"text-neutral",children:["Project ",l.jsx("span",{className:"text-heading font-medium",children:Ke})," created successfully."]}),l.jsxs("div",{className:"setup-nav",children:[l.jsx(re,{type:"button",variant:"outline",onClick:qn,children:"Back"}),l.jsx(re,{type:"button",onClick:()=>Ho("project",2),children:"Continue"})]})]}):l.jsxs("div",{className:"compact-stack",children:[l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"project-name",children:"Project name"}),l.jsx("input",{id:"project-name",className:"setup-input",type:"text",placeholder:"my-website",value:_e,onChange:K=>qe(K.target.value)}),Gn&&Gn!==_e?l.jsxs("p",{className:"supporting-copy",children:["Slug: ",Gn]}):null]}),l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"display-name",children:"Display name (optional)"}),l.jsx("input",{id:"display-name",className:"setup-input",type:"text",placeholder:"My Website",value:ve,onChange:K=>de(K.target.value)})]}),l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"domain",children:"Canonical domain"}),l.jsx("input",{id:"domain",className:"setup-input",type:"text",placeholder:"example.com",value:ce,onChange:K=>F(K.target.value)})]}),l.jsxs("div",{className:"setup-field-row",children:[l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"country",children:"Country"}),l.jsx("input",{id:"country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:pe,onChange:K=>Oe(K.target.value.toUpperCase())})]}),l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"language",children:"Language"}),l.jsx("input",{id:"language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:Ae,onChange:K=>st(K.target.value.toLowerCase())})]})]}),l.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-default bg-surface p-3 cursor-pointer hover:border-strong",children:[l.jsx("input",{type:"checkbox",className:"mt-0.5 h-4 w-4 rounded border-strong bg-bg",checked:Ve,onChange:K=>At(K.target.checked)}),l.jsxs("span",{className:"flex-1",children:[l.jsx("span",{className:"block text-sm text-heading",children:"Auto-extract backlinks"}),l.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."," ",l.jsx(et,{to:"/backlinks",className:"text-positive-400 hover:text-positive underline underline-offset-2",children:"Manage backlinks"})]})]})]}),at?l.jsx("p",{className:"text-negative-400 text-sm",children:at}):null,l.jsxs("div",{className:"setup-nav",children:[l.jsx(re,{type:"button",variant:"outline",onClick:qn,children:"Back"}),l.jsx(re,{type:"button",disabled:!Gn||!ce||Pn,onClick:fn(np),children:Pn?"Creating...":"Create project"})]})]})]});case 2:return l.jsxs(Fs,{className:_?"visibility-setup-section step-card":"surface-card step-card","aria-labelledby":"setup-queries-heading",children:[l.jsxs("div",{className:"section-head",children:[l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:_?"Step 1 of 2":"Step 3 of 5"}),l.jsx("h2",{id:"setup-queries-heading",children:"Add queries"})]}),W?l.jsx(vn,{tone:"neutral",children:"Loading"}):B.isError?l.jsx(vn,{tone:"negative",children:"Load failed"}):Ut?l.jsxs(vn,{tone:"positive",children:[ea.length," saved"]}):l.jsxs(vn,{tone:"neutral",children:[ea.length," quer",ea.length!==1?"ies":"y"]})]}),l.jsx("p",{className:"supporting-copy",children:"Add the queries your customers use, one per line. You can refine your list later."}),l.jsxs("div",{className:"space-y-2 border-b border-default pb-4",children:[l.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[l.jsxs("div",{className:"min-w-0 space-y-1",children:[l.jsx("h3",{className:"text-sm font-semibold text-heading",children:"Research queries with your agent"}),l.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."})]}),l.jsx(re,{type:"button",variant:"outline",size:"sm",className:"min-h-11 shrink-0 self-start",onClick:fn(ol),children:Dn?"Research prompt copied":"Copy research prompt"})]}),l.jsxs("details",{open:Lo||void 0,className:"text-sm text-secondary",children:[l.jsx("summary",{className:"min-h-11 cursor-pointer py-3 text-link",children:"View agent prompt"}),l.jsx("textarea",{"aria-label":"Agent query research prompt",readOnly:!0,className:"setup-textarea mt-2 w-full",rows:8,value:Qi})]}),Lo?l.jsx("p",{role:"alert",className:"text-sm text-negative",children:"Could not copy. Select and copy the prompt above."}):null]}),W?l.jsx("div",{className:"rounded-md border border-default bg-bg-elevated/40 p-4 text-sm text-secondary",role:"status",children:"Loading saved queries…"}):B.isError?l.jsxs("div",{className:"compact-stack",children:[l.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."}),l.jsxs("div",{className:"setup-nav",children:[l.jsx(re,{type:"button",variant:"outline",onClick:_?Me:qn,children:"Back"}),l.jsx(re,{type:"button",onClick:()=>{B.refetch()},children:"Retry loading queries"})]})]}):Ut?l.jsxs("div",{className:"compact-stack",children:[l.jsx("ul",{className:"detail-list",children:ea.map(K=>l.jsx("li",{children:K},K))}),l.jsxs("div",{className:"setup-nav",children:[l.jsx(re,{type:"button",variant:"outline",onClick:_?Me:qn,children:"Back"}),l.jsx(re,{type:"button",variant:"outline",onClick:()=>ci(!1),children:"Edit queries"}),l.jsx(re,{type:"button",onClick:()=>Ho("queries",_?4:3,ea.length),children:"Continue"})]})]}):l.jsxs("div",{className:"compact-stack",children:[_t.length>0?l.jsxs("div",{className:"compact-stack",children:[l.jsxs("div",{className:"flex items-center gap-2 text-muted text-xs uppercase tracking-wide",children:[l.jsx("span",{className:"flex-1 border-t border-base"}),"auto-generate",l.jsx("span",{className:"flex-1 border-t border-base"})]}),l.jsxs("div",{className:"flex items-end gap-2",children:[l.jsxs("div",{className:"setup-field flex-1",children:[l.jsx("label",{className:"setup-label",htmlFor:"gen-provider",children:"Provider"}),l.jsx("select",{id:"gen-provider",className:"setup-input",value:sn,onChange:K=>mi(K.target.value),children:_t.map(K=>l.jsxs("option",{value:K.name,children:[K.displayName??K.name,K.model?` (${K.model})`:""]},K.name))})]}),l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"gen-count",children:"Count"}),l.jsx("select",{id:"gen-count",className:"setup-input",value:Mo,onChange:K=>Gs(Number(K.target.value)),children:[3,5,10,15,20].map(K=>l.jsx("option",{value:K,children:K},K))})]}),l.jsx(re,{type:"button",variant:"outline",disabled:eu||!sn,onClick:fn(Pa),children:eu?"Analyzing site...":"Generate"})]}),nl?l.jsx("p",{className:"text-negative-400 text-sm",children:nl}):null]}):null,_?null:l.jsxs("div",{className:"flex items-center gap-2 text-muted text-xs uppercase tracking-wide",children:[l.jsx("span",{className:"flex-1 border-t border-base"}),"or type manually",l.jsx("span",{className:"flex-1 border-t border-base"})]}),l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"queries",children:"Queries (one per line)"}),l.jsx("textarea",{id:"queries",className:"setup-textarea",rows:6,placeholder:`emergency dentist brooklyn
|
|
84
|
+
best invisalign downtown brooklyn
|
|
85
|
+
pediatric dentist brooklyn heights`,value:Ft,onChange:K=>En(K.target.value)})]}),Ls?l.jsx("p",{className:"text-negative-400 text-sm",children:Ls}):null,l.jsxs("div",{className:"setup-nav",children:[l.jsx(re,{type:"button",variant:"outline",onClick:_?Me:qn,children:"Back"}),l.jsx(re,{type:"button",variant:"ghost",onClick:fl,children:_?"Finish without AI Visibility":"Skip for now"}),l.jsx(re,{type:"button",disabled:ea.length===0||Rn,onClick:fn(Ko),children:Rn?"Saving...":`Save ${ea.length} quer${ea.length!==1?"ies":"y"}`})]})]})]});case 3:return l.jsxs(_a,{className:"surface-card step-card",children:[l.jsxs("div",{className:"section-head",children:[l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 4 of 5"}),l.jsx("h2",{children:"Add competitors"})]}),Yi?l.jsx(vn,{tone:"positive",children:"Saved"}):null]}),l.jsx("p",{className:"supporting-copy",children:"Optional. Domains that compete for the same queries, one per line. You can add them later from the project."}),Yi?l.jsxs("div",{className:"compact-stack",children:[l.jsx("ul",{className:"detail-list",children:fi.map(K=>l.jsx("li",{children:K},K))}),l.jsxs("div",{className:"setup-nav",children:[l.jsx(re,{type:"button",variant:"outline",onClick:qn,children:"Back"}),l.jsx(re,{type:"button",onClick:()=>Ho("competitors",4,fi.length),children:"Continue"})]})]}):l.jsxs("div",{className:"compact-stack",children:[l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"competitors",children:"Competitor domains (one per line)"}),l.jsx("textarea",{id:"competitors",className:"setup-textarea",rows:4,placeholder:`competitor1.com
|
|
86
|
+
competitor2.com`,value:pi,onChange:K=>Zi(K.target.value)})]}),en?l.jsx("p",{className:"text-negative-400 text-sm",children:en}):null,l.jsxs("div",{className:"setup-nav",children:[l.jsx(re,{type:"button",variant:"outline",onClick:qn,children:"Back"}),l.jsx("div",{className:"flex gap-2",children:fi.length===0?l.jsx(re,{type:"button",onClick:gl,children:"Continue without competitors"}):l.jsxs(l.Fragment,{children:[l.jsx(re,{type:"button",variant:"outline",onClick:gl,children:"Skip"}),l.jsx(re,{type:"button",disabled:ll,onClick:fn(pl),children:ll?"Saving...":`Save ${fi.length} competitor${fi.length!==1?"s":""}`})]})})]})]})]});case 4:{const K=Za.data,Fe=K?.status??(Ji===nt?.id?nt.status:void 0),yi=Fe==="completed"||Fe==="partial"||Fe==="failed"||Fe==="cancelled",es=K?.snapshots??[],qa=K?.queryCounts,bl=Fe?Yk(Fe,es.length):!1,jn=$e&&!Qa,bi=Sn??(K?.error?vH(K.error):Fe==="cancelled"?"The sweep was cancelled before it produced a baseline.":(Fe==="completed"||Fe==="partial")&&es.length===0?"The sweep finished without producing any snapshots.":nt?.statusDetail||"The sweep did not produce a baseline.");let Ja=null;return jn||bl?Ja=l.jsx(vn,{tone:"positive",children:"Complete"}):Sn&&!Qa?Ja=l.jsx(vn,{tone:"negative",children:"Failed"}):yi?Ja=l.jsx(vn,{tone:"negative",children:Fe==="cancelled"?"Cancelled":"Failed"}):Qa&&(Ja=l.jsx(vn,{tone:"caution",children:"Running"})),l.jsxs(_a,{className:"surface-card step-card",children:[l.jsxs("div",{className:"section-head",children:[l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:_?"Step 2 of 2":"Step 5 of 5"}),l.jsx("h2",{children:go()?"AI Visibility":"Launch first run"})]}),Ja]}),jn?l.jsxs("div",{className:"compact-stack",children:[l.jsxs("p",{className:"text-secondary",children:["Setup is complete. ",l.jsx("span",{className:"text-strong font-medium",children:Ke})," already has a successful answer-visibility baseline."]}),l.jsxs("div",{className:"setup-nav",children:[l.jsx("span",{}),l.jsx(re,{type:"button",onClick:()=>ct(),children:f?"Finish setup":"Open project dashboard →"})]})]}):!Qa&&go()?l.jsxs("div",{className:"compact-stack",children:[Ke?l.jsx(PY,{projectName:Ke}):l.jsx("p",{className:"text-sm text-secondary",children:C0}),Sn&&l.jsx("p",{role:"alert",className:"text-sm text-negative",children:Sn}),l.jsxs("div",{className:"setup-nav",children:[l.jsx("span",{}),l.jsx(re,{type:"button",onClick:Me,children:"Open project dashboard →"})]})]}):Qa?yi?bl?l.jsxs("div",{className:"compact-stack",children:[l.jsxs("p",{className:"text-neutral",children:["Sweep complete. Your first answer-visibility snapshot for"," ",l.jsx("span",{className:"text-heading font-medium",children:Ke}),":"]}),l.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-1",children:[l.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[l.jsx("p",{className:"text-xs font-medium text-secondary",children:"Mentioned"}),l.jsx("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:qa?l.jsxs(l.Fragment,{children:[qa.mentionedQueries,l.jsxs("span",{className:"text-faint text-lg",children:[" / ",qa.totalQueries]})]}):"Unavailable"}),l.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"queries naming your brand"})]}),l.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[l.jsx("p",{className:"text-xs font-medium text-secondary",children:"Cited"}),l.jsx("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:qa?l.jsxs(l.Fragment,{children:[qa.citedQueries,l.jsxs("span",{className:"text-faint text-lg",children:[" / ",qa.totalQueries]})]}):"Unavailable"}),l.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"queries citing your site"})]}),l.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[l.jsx("p",{className:"text-xs font-medium text-secondary",children:"Results"}),l.jsx("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:es.length}),l.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"completed engine checks"})]})]}),!b&&Ke?l.jsx(jJ,{projectName:Ke}):null,l.jsxs("div",{className:"setup-nav",children:[l.jsx("span",{}),l.jsx(re,{type:"button",onClick:()=>ct(),children:f?"Finish setup":"Open project dashboard →"})]})]}):l.jsxs("div",{className:"compact-stack",children:[l.jsxs("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:[l.jsx("p",{children:bi}),l.jsx("p",{className:"mt-1 text-xs text-secondary",children:go()?C0:x?"Fix provider or query configuration if needed, then retry without leaving setup.":"Ask an administrator to review the provider and query configuration."})]}),l.jsxs("div",{className:"setup-nav",children:[x&&!go()?l.jsx(re,{type:"button",variant:"outline",asChild:!0,children:l.jsx(et,{to:"/settings",children:"Configure providers"})}):l.jsx("span",{}),go()||!x?l.jsx(re,{type:"button",onClick:Me,children:"Open project dashboard →"}):l.jsx(re,{type:"button",disabled:hi||!!Ya,onClick:fn(gi),children:hi?"Retrying...":"Retry visibility sweep"})]})]}):l.jsxs("div",{className:"compact-stack",children:[l.jsx("p",{className:"text-neutral",children:"Sweep running. This usually takes 30 to 60 seconds."}),l.jsx("div",{className:"rounded-md border border-default bg-surface p-3 text-xs text-muted",children:l.jsxs("p",{children:["Status: ",l.jsx("span",{className:"text-neutral",children:Fe??"queued"})]})}),Za.isError&&l.jsxs("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:[l.jsx("p",{children:Za.error instanceof Error?Za.error.message:"Could not refresh the sweep status."}),l.jsx(re,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>{Za.refetch()},children:"Retry status check"})]}),l.jsxs("div",{className:"setup-nav",children:[l.jsx("span",{}),l.jsx(re,{type:"button",variant:"outline",onClick:f?()=>ct():Me,children:f?"Finish setup":"Watch on project page"})]})]}):l.jsxs("div",{className:"compact-stack",children:[l.jsxs("p",{className:"supporting-copy",children:["Your queries are saved. Run a first sweep to get a baseline for"," ",l.jsx("span",{className:"text-heading font-medium",children:Ke}),", or finish and run it later from the project. A sweep calls the answer engines, so it costs provider usage."]}),(Ya||Sn)&&l.jsxs("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:[l.jsx("p",{children:Sn??Ya}),l.jsx("p",{className:"mt-1 text-xs text-secondary",children:"Resolve the blocker above, then retry the sweep here."})]}),l.jsxs("div",{className:"setup-nav",children:[l.jsx(re,{type:"button",variant:"outline",onClick:qn,children:"Back"}),l.jsx(re,{type:"button",variant:"ghost",onClick:Ht,children:"Finish without running"}),ba==="no_provider"&&!_?l.jsx(re,{type:"button",asChild:!0,children:l.jsx(et,{to:"/settings",children:"Configure a provider"})}):l.jsx(re,{type:"button",disabled:hi||!!Ya,title:Ya,onClick:fn(gi),children:hi?"Launching...":Sn?"Retry visibility sweep":"Launch visibility sweep"})]})]})]})}default:return null}})();return l.jsxs("div",{className:_?"page-container visibility-setup":"page-container",children:[f?l.jsx(_o,{current:"visibility"}):null,l.jsxs("div",{className:"page-header",children:[l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{ref:u?h:void 0,tabIndex:u?-1:void 0,className:"page-title",children:u?"Set up AI Visibility":"Setup"}),l.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."})]}),f?l.jsx("div",{className:"page-header-right",children:l.jsx(re,{type:"button",variant:"outline",className:"min-h-11",onClick:Ht,children:"Skip AI Visibility"})}):null]}),f?null:l.jsx(EJ,{current:_?P===4?1:0:P,labels:_?_J:CJ}),l.jsxs("section",{className:"setup-wizard",children:[Qs,Xa]})]})}const $f="canonry mcp install --client claude-code",zJ="https://github.com/Canonry/canonry/blob/main/docs/mcp.md";function IJ(){const e=N.useRef(d1()).current,n=N.useRef(new Set),i=N.useCallback((o,u)=>{n.current.has(o)||(n.current.add(o),y1({...u,flowVersion:ft,onboardingSessionId:e,surface:"platform",eventId:m1()}))},[e]);return N.useEffect(()=>{i("started",{event:"onboarding.started",step:"finish",resumed:!1})},[i]),N.useCallback(o=>{i(`action:${o}`,{event:"onboarding.step_completed",step:"finish",method:"manual",nextAction:o})},[i])}const Xm=N.createContext(()=>{});function OJ({projectName:e,skippedVisibility:n=!1}){const i=yt({...nQ({client:ee,path:{name:e}}),retry:!1}),o=i.data?.hasData?i.data:null,u=IJ(),h=Wk(e,ze["site-audit"]),f=Wk(e,ze["answer-visibility"]),b={...h?{site:h,fixes:h}:{},...PJ(f,n)};return l.jsx(Xm.Provider,{value:u,children:l.jsxs("div",{className:"page-container max-w-6xl py-8 md:py-10",children:[l.jsx(_o,{current:"done",outcomes:b}),l.jsxs("header",{className:"relative mx-auto mt-12 max-w-2xl text-center md:mt-16",children:[l.jsx(qJ,{}),l.jsx("p",{className:"onb-reveal mt-6 text-sm font-medium text-positive",style:Ta(250),children:"Setup complete"}),l.jsx("h1",{className:"onb-reveal mt-2 text-5xl font-semibold tracking-tight text-heading md:text-6xl",style:Ta(350),children:"You’re set."}),l.jsxs("p",{className:"onb-reveal mx-auto mt-4 max-w-xl text-lg text-secondary",style:Ta(450),children:["Canonry is tracking ",l.jsx("span",{className:"font-medium text-heading",children:e}),". Here’s how to get the most out of it from here."]})]}),l.jsxs("div",{className:"mt-14 grid gap-4 md:grid-cols-6",children:[l.jsx(Ad,{className:"md:col-span-4 md:row-span-2",delayMs:600,labelledBy:"onb-agent-heading",children:l.jsx(LJ,{projectName:e})}),l.jsx(Ad,{className:"md:col-span-2 md:row-span-2",delayMs:700,labelledBy:"onb-data-heading",children:l.jsx($J,{projectName:e})}),l.jsx(Ad,{className:"md:col-span-3",delayMs:800,labelledBy:"onb-schedule-heading",children:l.jsx(HJ,{projectName:e})}),l.jsx(Ad,{className:"md:col-span-3",delayMs:900,labelledBy:"onb-alerts-heading",children:l.jsx(FJ,{projectName:e,score:o?.aggregateScore??null})})]}),l.jsxs("div",{className:"onb-reveal mt-12 flex flex-col items-center gap-3 sm:flex-row sm:justify-center",style:Ta(1e3),children:[l.jsx(re,{asChild:!0,className:"h-11 rounded-full px-6 text-base md:h-11",children:l.jsxs(et,{to:"/projects/$projectName",params:{projectName:e},replace:!0,onClick:()=>u("open_project"),children:["Open ",e,l.jsx(jc,{className:"size-4","aria-hidden":"true"})]})}),l.jsx(re,{asChild:!0,variant:"ghost",className:"h-11 rounded-full px-5 md:h-11",children:l.jsx(et,{to:"/projects/$projectName/technical-aeo",params:{projectName:e},replace:!0,onClick:()=>u("review_page_health"),children:"Review page health"})})]})]})})}function Wk(e,n){const i=yt({...jN({client:ee,path:{name:e},query:{kind:n,limit:20}}),retry:!1,refetchInterval:o=>eS(o.state.status==="success"?{isSuccess:!0,data:o.state.data}:{isSuccess:!1})==="pending"?5e3:!1});return eS(i)}function PJ(e,n){return e===void 0?{}:n?{visibility:"skipped"}:{visibility:e}}function eS(e){if(!e.isSuccess||!e.data)return"unknown";const n=e.data.filter(i=>i.trigger!==ii.probe);if(!n.some(i=>i.status===Zt.completed||i.status===Zt.partial))return n.some(i=>i.status===Zt.queued||i.status===Zt.running)?"pending":n.length>0?"incomplete":"skipped"}function Ta(e){return{"--onb-delay":`${e}ms`}}function qJ(){return l.jsx("div",{className:"onb-check relative mx-auto size-20","aria-hidden":"true",children:l.jsxs("svg",{viewBox:"0 0 80 80",className:"relative size-20",children:[l.jsx("circle",{className:"onb-check-ring",cx:"40",cy:"40",r:"36",fill:"none",strokeWidth:"3",pathLength:"1"}),l.jsx("path",{className:"onb-check-mark",d:"M25 41 L35 51 L56 30",fill:"none",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",pathLength:"1"})]})})}function Ad({className:e="",delayMs:n,labelledBy:i,children:o}){return l.jsx("section",{"aria-labelledby":i,className:`onb-reveal onb-tile flex flex-col overflow-hidden rounded-2xl border border-default bg-surface p-6 md:p-7 ${e}`,style:Ta(n),children:o})}function Jm({id:e,eyebrow:n,title:i,children:o}){return l.jsxs("div",{children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted",children:n}),l.jsx("h2",{id:e,className:"mt-1.5 text-2xl font-semibold tracking-tight text-heading",children:i}),l.jsx("p",{className:"mt-2 text-sm text-secondary",children:o})]})}const Nd=[{id:"diagnose",label:"Diagnose",prompt:"Why did we lose citations this week?",calls:["canonry_insights_list","canonry_competitor_landscape"],reply:"Two engines started citing a competitor’s comparison page instead of yours. Want me to draft one that answers the same query?"},{id:"fix",label:"Fix",prompt:"Fix the weakest pages on the site.",calls:["canonry_technical_aeo_pages","canonry_site_health_page_audit"],reply:"The lowest-scoring pages are missing structured data and answer-first intros. I’ve written the changes for you to review."},{id:"automate",label:"Automate",prompt:"Re-check everything every Monday and tell me in Slack.",calls:["canonry_schedule_set","canonry_agent_webhook_attach"],reply:"Done. A sweep runs every Monday, and I’ll post what changed to Slack."}],MJ=9e3;function BJ(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function LJ({projectName:e}){const n=N.useContext(Xm),[i,o]=N.useState(0),[u,h]=N.useState(!1),[f,b]=N.useState(!1);N.useEffect(()=>{if(u||BJ())return;const k=window.setTimeout(()=>o(S=>(S+1)%Nd.length),MJ);return()=>window.clearTimeout(k)},[i,u]);const v=async()=>{try{await navigator.clipboard.writeText($f),n("copy_agent_command"),b(!0),window.setTimeout(()=>b(!1),1800)}catch{xn({tone:"negative",title:"Could not copy the command",detail:`Run ${$f} in your terminal.`})}},x=Nd[i]??Nd[0];return l.jsxs(l.Fragment,{children:[l.jsxs(Jm,{id:"onb-agent-heading",eyebrow:"Your agent",title:"Let your agent run it.",children:["Your agent can do everything in Canonry: diagnose a drop, fix pages, run sweeps and scans, and write the client report. Use Claude Code, Codex, Cursor, or Aero, the analyst built into"," ",l.jsx("span",{className:"text-heading",children:e})," that reviews every sweep on its own."]}),l.jsxs("div",{className:"mt-6 flex flex-1 flex-col rounded-xl border border-default bg-bg",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onFocus:()=>h(!0),children:[l.jsxs("div",{className:"flex items-center gap-1 border-b border-default px-3 py-2",role:"tablist","aria-label":"Example agent sessions",children:[Nd.map((k,S)=>l.jsx("button",{type:"button",role:"tab","aria-selected":S===i,onClick:()=>{o(S),h(!0)},className:`rounded-md px-2.5 py-1 text-xs font-medium transition-colors ${S===i?"bg-surface-inset text-heading":"text-muted hover:text-secondary"}`,children:k.label},k.id)),l.jsx("span",{className:"ml-auto text-xs text-faint",children:"Example"})]}),l.jsxs("div",{role:"tabpanel","aria-label":`${x.label} example`,className:"flex-1 p-4 font-mono text-[13px] leading-relaxed",children:[l.jsxs("p",{className:"onb-type text-heading",style:Ta(150),children:[l.jsx("span",{className:"text-muted",children:"> "}),x.prompt]}),x.calls.map((k,S)=>l.jsxs("p",{className:"onb-line mt-1 text-muted first:mt-3",style:Ta(1300+S*450),children:[l.jsx("span",{className:"text-positive",children:"●"})," ",k]},k)),l.jsx("p",{className:"onb-line mt-3 text-secondary",style:Ta(1500+x.calls.length*450),children:x.reply}),l.jsx("span",{className:"onb-caret mt-2 inline-block h-4 w-2 bg-current align-middle text-secondary",style:Ta(1900+x.calls.length*450),"aria-hidden":"true"})]},x.id)]}),l.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[l.jsx("code",{className:"min-w-0 flex-1 truncate rounded-lg border border-default bg-surface-inset px-3 py-2 font-mono text-[13px] text-heading",children:$f}),l.jsxs(re,{type:"button",variant:"secondary",size:"sm",className:"h-9 md:h-9",onClick:()=>{v()},children:[f?l.jsx(Oc,{className:"size-4","aria-hidden":"true"}):l.jsx(U0,{className:"size-4","aria-hidden":"true"}),f?"Copied":"Copy"]}),l.jsx("a",{href:zJ,target:"_blank",rel:"noreferrer",className:"text-sm font-medium text-link underline-offset-4 hover:underline",children:"Other clients"})]})]})}const UJ=[{icon:L0,label:"Search Console",action:"connect_search_console",to:"/projects/$projectName/search-console"},{icon:gS,label:"Google Analytics",action:"connect_analytics",to:"/projects/$projectName/activity"},{icon:bS,label:"Business Profile",action:"connect_business_profile",to:"/projects/$projectName/local"}],VJ=["GPTBot","ClaudeBot","PerplexityBot"];function $J({projectName:e}){const n=N.useContext(Xm);return l.jsxs(l.Fragment,{children:[l.jsx(Jm,{id:"onb-data-heading",eyebrow:"Server-side traffic",title:"See the AI bots.",children:"AI crawlers and answer-engine fetches never run JavaScript, so Google Analytics never sees them. Canonry reads them straight from your server."}),l.jsx(GJ,{}),l.jsxs(et,{to:"/traffic",onClick:()=>n("connect_server_traffic"),"aria-label":"Connect server-side traffic",className:"group flex items-center gap-3 rounded-xl border border-strong bg-surface-inset px-4 py-3 text-sm font-medium text-heading transition-colors hover:bg-surface-inset-hover",children:[l.jsx(vS,{className:"size-4 text-positive","aria-hidden":"true"}),l.jsxs("span",{className:"flex-1",children:["Connect your server",l.jsx("span",{className:"block text-xs font-normal text-secondary",children:"Cloudflare, Vercel, WordPress, or Cloud Run"})]}),l.jsx(jc,{className:"size-4 text-link transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]}),l.jsx("p",{className:"mt-5 text-xs font-medium uppercase tracking-wide text-muted",children:"Also connect"}),l.jsx("ul",{className:"mt-1 divide-y divide-default",children:UJ.map(({icon:i,label:o,action:u,to:h})=>l.jsx("li",{children:l.jsxs(et,{to:h,params:{projectName:e},"aria-label":`Connect ${o}`,onClick:()=>n(u),className:"group flex items-center gap-3 py-2.5 text-sm text-heading",children:[l.jsx(i,{className:"size-4 text-muted","aria-hidden":"true"}),l.jsx("span",{className:"flex-1",children:o}),l.jsx(jc,{className:"size-3.5 text-link transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]})},o))})]})}function GJ(){const e=[22,70,118];return l.jsxs("div",{className:"relative my-6 h-36","aria-hidden":"true",children:[l.jsx("svg",{viewBox:"0 0 200 140",preserveAspectRatio:"none",className:"absolute inset-0 size-full",children:e.map((n,i)=>l.jsx("path",{className:"onb-flow",style:Ta(i*400),d:`M20 ${n} C 100 ${n}, 118 70, 170 70`,fill:"none",strokeWidth:"1.5"},n))}),VJ.map((n,i)=>l.jsx("span",{className:"onb-bot absolute left-0 -translate-y-1/2 rounded-md border border-default bg-bg-elevated px-2 py-1 font-mono text-[11px] text-secondary",style:{top:`${(e[i]??70)/140*100}%`,...Ta(i*600)},children:n},n)),l.jsx("span",{className:"onb-hub absolute right-0 top-1/2 flex size-11 -translate-y-1/2 items-center justify-center rounded-2xl bg-accent text-on-inverse",children:l.jsx(vS,{className:"size-5"})})]})}const KJ=["M","T","W","T","F","S","S"];function HJ({projectName:e}){return l.jsxs(l.Fragment,{children:[l.jsx(Jm,{id:"onb-schedule-heading",eyebrow:"Scheduled sweeps",title:"Runs on its own.",children:"Re-measure every week without lifting a finger, so a drop shows up before a customer notices."}),l.jsx("ol",{className:"mt-6 grid grid-cols-7 gap-2","aria-hidden":"true",children:KJ.map((n,i)=>l.jsxs("li",{className:"flex flex-col items-center gap-2",children:[l.jsx("span",{className:"onb-day size-3 rounded-full bg-surface-inset",style:Ta(i*500)}),l.jsx("span",{className:"text-xs text-muted",children:n})]},i))}),l.jsx(fC,{projectName:e,to:"/projects/$projectName/settings",icon:yS,label:"Set a schedule",action:"set_schedule"})]})}function FJ({projectName:e,score:n}){return l.jsxs(l.Fragment,{children:[l.jsx(Jm,{id:"onb-alerts-heading",eyebrow:"Notifications",title:"Hear about changes.",children:"Get a webhook in Slack or anywhere else when a sweep finishes or a score moves."}),l.jsxs("div",{className:"relative mt-6 flex h-14 items-center","aria-hidden":"true",children:[l.jsx("span",{className:"onb-bell flex size-10 items-center justify-center rounded-full border border-default bg-bg-elevated",children:l.jsx(Hf,{className:"size-4 text-secondary"})}),l.jsxs("span",{className:"onb-toast ml-3 flex items-center gap-2 rounded-xl border border-default bg-bg-elevated px-3 py-2 text-sm shadow-[0_8px_24px_var(--color-shadow-panel)]",children:[l.jsx("span",{className:"size-2 rounded-full bg-positive-400"}),l.jsx("span",{className:"text-heading",children:e}),l.jsx("span",{className:"text-secondary",children:n===null?"sweep finished":`page health ${n}`})]})]}),l.jsx(fC,{projectName:e,to:"/projects/$projectName/settings",icon:Hf,label:"Add a notification",action:"add_notification"})]})}function fC({projectName:e,to:n,icon:i,label:o,action:u}){const h=N.useContext(Xm);return l.jsxs(et,{to:n,params:{projectName:e},onClick:()=>h(u),className:"group mt-6 inline-flex items-center gap-2 self-start text-sm font-medium text-link",children:[l.jsx(i,{className:"size-4","aria-hidden":"true"}),o,l.jsx(jc,{className:"size-3.5 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]})}const QJ=N.lazy(async()=>({default:(await Hi(()=>import("./SiteHealthSection-hi54eSIt.js").then(n=>n.d),__vite__mapDeps([0,1,2,3,4]),import.meta.url)).SiteHealthSection})),ZJ=`Public pages only, crawled from this computer and stored locally. The first scan reads up to ${fj} pages, then stops.`,YJ=1800,XJ="https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent",JJ="Help me set up Canonry for my public site.\n\nUse the official Canonry 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\nPick one path and stay on it. Use connected Canonry tools (plugin or MCP) only if you have them and I have not pointed you at a specific install. A connected tool runs in its own process and never sees `CANONRY_CONFIG_DIR`, `CANONRY_PORT`, or anything else you export in a shell, so it always acts on my default install. If I named a config directory, a port, or a sandbox, that is the shell path: use `cnry` and tell me which path you chose. Never mix the two in one run, and never create a duplicate project. The `cnry` and `canonry` commands are interchangeable.\n\n1. Ask for my public domain, country, and language. Do not create or scan anything yet. Country and language are only applied when a project is created, so if you reuse an existing project, report its country and language instead of changing them.\n2. Shell path only: confirm `cnry` is on PATH, then run `cnry --version`. If Canonry is missing, propose `npm install -g @canonry/canonry` and wait for approval. Then run `cnry doctor --format json`, which is the command that says whether config, database, and server are in place. `cnry --version` does not read config and succeeds on a completely unconfigured install, so it cannot answer this. If config is missing, run `cnry bootstrap` yourself: it is not interactive, takes about a second, and is safe to rerun. Do not hand it to me and wait. The interactive command is `cnry init`, which is optional provider and OAuth setup that Page Health does not need. Bootstrap prints an API key, so do not repeat its output back to me, and never ask me to paste passwords, API keys, OAuth credentials, or command output.\n3. Confirm the API is reachable. `cnry doctor --format json` reports it, and any project read exits non-zero with `CONNECTION_ERROR` when it is not. If it is unreachable, propose `cnry start` and wait for approval. Use `cnry start`, which is the background daemon, and not `cnry serve`, which runs in the foreground and will block you until I stop it, even though some error messages suggest it. Stop anything you started with `cnry stop`.\n4. List projects with the connected project tool or `cnry project list --format json`, and reuse one whose domain matches. Confirm the proposed name is not already assigned to a different domain. To find out whether a project has already been scanned, run `cnry technical-aeo score <project> --format json` with no `--run-id`, which reports the latest run. Read the `hasData` field, not the score: this command exits 0 and reports `aggregateScore: 0` for a project that has never been scanned, so reading the score alone would have you tell me my site scored zero. If `hasData` is true and `runStatus` is `completed` or `partial`, read that scan instead of starting a new one. If no project matches, show the exact create operation and wait for approval.\n5. Propose a bounded Site Health scan: `--max-pages 100` for a first look, plus whether dead-link checking is on (it is off unless you pass `--check-dead-links`). Show the connected operation or the exact `cnry technical-aeo run <project> --max-pages 100 --wait --format json` command with the project name filled in, and wait for separate approval before scanning. `--wait` polls for up to 15 minutes and returns only the run id and status. If the status it returns is still `queued` or `running`, the scan has not finished: do not rerun it or report results, poll `cnry technical-aeo progress <project> --run-id <run-id> --format json` until it is terminal. If `--wait` outruns your own tool timeout first, recover the run id with `cnry technical-aeo score <project> --format json` and poll the same way.\n6. When the run is `completed` or `partial`, read `cnry technical-aeo crawl <project> --run-id <run-id> --format json` first. It is the only one of these commands that carries `termination` and `complete`; the score and pages commands do not. Then read `cnry technical-aeo score <project> --run-id <run-id> --format json` and `cnry technical-aeo pages <project> --run-id <run-id> --sort score-asc --limit 10 --format jsonl`. Tell me the termination reason in plain words and whether the scan covered the whole site or stopped at a page, link, depth, or time limit. A `partial` run scored the pages it reached and not my site, so never present it as a full-site result. If it stopped early, the fix depends on the reason, so say which: a page or depth limit needs a larger budget, a time limit needs a smaller scan (a lower `--max-pages` or `--max-depth`). If the run failed or was cancelled, inspect the run error and stop.\n7. Summarize only completed evidence, then propose AI Visibility setup. Ask before you add queries, connect providers, start a provider-backed or quota-consuming run, edit files, or publish.";function WJ(e,n){return e==="legacy"?"legacy":e==="platform"?"platform":n.state==="success"?n.projectCount===0?"platform":"legacy":n.state==="error"?"retry":"loading"}const eW="2000-01-01T00:00:00.000Z",tW=5e3;function nW(e,n){const i=new Set,o=new Map;for(const f of n)f.trigger!==ii.probe&&(o.has(f.projectId)||o.set(f.projectId,f.id),(f.status===Zt.completed||f.status===Zt.partial)&&i.add(f.projectId));const h=(e.every(f=>f.createdAt)?[...e].sort((f,b)=>(f.createdAt??"").localeCompare(b.createdAt??"")||f.name.localeCompare(b.name)):e).find(f=>!i.has(f.id));return h?{projectName:h.name,runId:o.get(h.id)}:null}const gC=[{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"}],yC=[{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 aW(e,n){try{const i=new Intl.DisplayNames(["en"],{type:"region"}),o=new Intl.DisplayNames(["en"],{type:"language"}),u=e.length===2?i.of(e.toUpperCase()):void 0,h=n?o.of(n.toLowerCase()):void 0;return`${u??(e||"Country")} · ${h??(n||"Language")}`}catch{return`${e||"Country"} · ${n||"Language"}`}}function iW(e,n){const i=e.trim().toUpperCase(),o=n.trim().toLowerCase();return{countryValid:gC.some(u=>u.value===i),languageValid:yC.some(u=>u.value===o)}}function sW(e){const n=e.replace(/^\[|\]$/g,"");return/^(?:\d{1,3}\.){3}\d{1,3}$/.test(n)||n.includes(":")}function oW(e){const n=e.trim();if(!n)return null;const i=/^[a-z][a-z\d+.-]*:\/\//i.test(n)?n:`https://${n}`;let o;try{o=new URL(i)}catch{return null}if(o.protocol!=="http:"&&o.protocol!=="https:")return null;const u=o.hostname.toLowerCase().replace(/^www\./,"");if(!u||u==="localhost"||sW(u)||!u.includes("."))return null;const h=u.replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return h?{canonicalDomain:u,projectName:h,displayName:u}:null}async function rW(e,n=YJ){let i;const o=new Promise(h=>{i=setTimeout(()=>h({state:"timed-out"}),n)}),u=await Promise.race([e.then(h=>({state:"queued",run:h})),o]);return i&&clearTimeout(i),u}function lW(e,n){e.catch(()=>{xn({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:${n}`})})}function bC(e){const n=N.useRef(d1()).current,i=N.useRef(new Set),o=N.useCallback((u,h)=>{if(h){if(i.current.has(h))return;i.current.add(h)}y1({...u,surface:e,eventId:m1()})},[e]);return{onboardingSessionId:n,emit:o}}function tS(e,n){return e instanceof Tn&&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:n}function O0(){return l.jsxs("div",{className:"page-container max-w-3xl","aria-busy":"true","aria-live":"polite",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Preparing setup"}),l.jsx("p",{className:"page-subtitle",children:"Checking the projects already on this install."})]})}),l.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-default bg-surface p-4 text-sm text-secondary",role:"status",children:[l.jsx(Cs,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading projects…"]})]})}function cW({onRetry:e}){return l.jsxs("div",{className:"page-container max-w-3xl",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Can’t load projects"}),l.jsx("p",{className:"page-subtitle",children:"Canonry could not confirm whether this install already has a project."})]})}),l.jsxs("div",{className:"rounded-lg border border-negative bg-negative-soft p-4",role:"alert",tabIndex:-1,children:[l.jsx("p",{className:"text-sm font-medium text-heading",children:"Setup is paused to protect existing projects."}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Check the connection or sign in again, then retry."}),l.jsx(re,{type:"button",className:"mt-4",variant:"secondary",onClick:e,children:"Retry project check"})]})]})}function uW({projectName:e,initialRunId:n}){return l.jsx(E1,{title:"Site Health setup",children:l.jsx(dW,{projectName:e,initialRunId:n})})}function dW({projectName:e,initialRunId:n}){const i=Rs(),o=yt({...Oo({client:ee}),enabled:!!e,retry:!1,refetchOnMount:"always"}),{onboardingSessionId:u,emit:h}=bC("site_health"),[f]=N.useState(()=>DG(n));N.useEffect(()=>{f&&zG()},[f]),N.useEffect(()=>{e&&h({flowVersion:ft,onboardingSessionId:u,event:"onboarding.started",step:"run",resumed:!!n&&!f},"onboarding.started")},[h,f,n,u,e]),N.useEffect(()=>{!e||!n||sN(e)?.runId!==n&&iN(e,n)},[n,e]);const v=yt({...w1({client:ee,path:{id:n??""}}),enabled:!!n,refetchInterval:({state:_})=>{const z=_.data?.status;return z==="completed"||z==="partial"||z==="failed"||z==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}).data?.status;if(N.useEffect(()=>{if(!e||!n||!v)return;if(v==="completed"||v==="partial"){h({flowVersion:ft,onboardingSessionId:u,event:"onboarding.step_completed",step:"run",method:"automatic"},"onboarding.step_completed:run"),em(n);return}if(v!=="failed"&&v!=="cancelled")return;const _=v==="cancelled"?"run_cancelled":"run_failed";h({flowVersion:ft,onboardingSessionId:u,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:_},`onboarding.blocked:run:${_}`),em(n)},[h,n,u,e,v]),!e)return l.jsxs("div",{className:"page-container max-w-3xl",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Project not found"}),l.jsx("p",{className:"page-subtitle",children:"This setup link does not identify a project."})]})}),l.jsx(re,{type:"button",variant:"secondary",onClick:()=>{i({to:"/projects"})},children:"View projects"})]});if(o.isPending)return l.jsxs("div",{className:"page-container max-w-3xl","aria-busy":"true","aria-live":"polite",children:[l.jsx(_o,{current:"site"}),l.jsxs("div",{className:"mt-8 flex items-center gap-3 text-sm text-secondary",role:"status",children:[l.jsx(Cs,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading Site Health setup…"]})]});if(o.isError)return l.jsxs("div",{className:"page-container max-w-3xl",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Can’t resume setup"}),l.jsx("p",{className:"page-subtitle",children:"Canonry could not load the project for this Site Health scan."})]})}),l.jsxs("div",{className:"rounded-lg border border-negative bg-negative-soft p-4",role:"alert",children:[l.jsx("p",{className:"text-sm text-secondary",children:"Check the connection or sign in again, then retry."}),l.jsx(re,{type:"button",className:"mt-4",variant:"secondary",onClick:()=>{o.refetch()},children:"Retry project check"})]})]});const x=o.data.find(_=>_.name===e);if(!x)return l.jsxs("div",{className:"page-container max-w-3xl",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Project not found"}),l.jsxs("p",{className:"page-subtitle",children:["Canonry could not find ",e,". It will not open a different project."]})]})}),l.jsx(re,{type:"button",variant:"secondary",onClick:()=>{i({to:"/projects"})},children:"View projects"})]});const k=()=>{i({to:"/setup",search:{onboarding:"site-health",setupProject:x.name},replace:!0})},S=()=>{i({to:"/setup",search:{experience:"legacy",onboarding:"site-health",setupProject:x.name},replace:!0})},C=()=>{h({flowVersion:ft,onboardingSessionId:u,event:"onboarding.step_completed",step:"run",method:"skipped"},"onboarding.step_completed:run"),i({to:"/setup",search:{onboarding:"complete",setupProject:x.name,skipped:"visibility"},replace:!0})};return l.jsxs("div",{className:"page-container max-w-7xl py-8 md:py-10",children:[l.jsx("h1",{className:"sr-only",children:"Set up Canonry"}),l.jsx(N.Suspense,{fallback:l.jsxs("div",{className:"space-y-5",children:[l.jsx(_o,{current:"site"}),l.jsxs("div",{className:"flex min-h-72 items-center justify-center gap-3 text-sm text-secondary",role:"status",children:[l.jsx(Cs,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading Site Health…"]})]}),children:l.jsx(QJ,{projectName:x.name,projectId:x.id,initialRunId:n,onReleaseInitialRun:k,showOnboardingActions:!0,onContinueOnboarding:S,onSkipOnboarding:C})})]})}function mW(){const e=iS({from:"/setup"}),n=e.onboarding==="site-health"&&!e.setupProject,i=e.onboarding==="site-health"&&e.experience!=="legacy",o=oK(),u=e.experience==="legacy"?"legacy":e.experience==="platform"?"platform":o,[h,f]=N.useState(!1),[b,v]=N.useState(void 0),x=yt({...Oo({client:ee}),enabled:u==="auto",retry:!1,refetchOnMount:"always"}),k=yt({...Bm({client:ee,query:{kind:ze["site-audit"],since:eW,limit:tW}}),enabled:u==="auto",retry:!1,refetchOnMount:"always"}),S=u==="auto"&&x.isSuccess&&x.isFetchedAfterMount&&x.data.length===0;N.useEffect(()=>{S&&f(!0)},[S]);const C=u!=="auto"?{state:"idle"}:x.isSuccess&&x.isFetchedAfterMount?{state:"success",projectCount:x.data.length}:x.isError?{state:"error"}:{state:"loading"},_=u==="legacy"?"legacy":h||S?"platform":WJ(u,C);if(e.onboarding==="complete"&&e.setupProject)return l.jsx(OJ,{projectName:e.setupProject,skippedVisibility:e.skipped==="visibility"});if(n||i)return l.jsx(uW,{projectName:e.setupProject,initialRunId:e.siteHealthRunId});const z=u==="auto"&&_==="legacy"&&!e.setupProject&&x.isSuccess;if(z&&b===void 0)return k.isError?v(null):k.isSuccess&&k.isFetchedAfterMount&&v(nW(x.data,k.data)),l.jsx(O0,{});const q=z?b:null;return q?l.jsx(pW,{projectName:q.projectName,runId:q.runId}):_==="legacy"?l.jsx(RJ,{visibilityProjectName:e.setupProject,siteHealthOnboarding:e.onboarding==="site-health",onboardingFinish:e.onboarding==="site-health"||e.onboarding==="first-run"}):_==="loading"?l.jsx(O0,{}):_==="retry"?l.jsx(cW,{onRetry:()=>{x.refetch()}}):l.jsx(hW,{onActivationStarted:()=>f(!0),skipSiteScan:e.siteScan==="skip"})}function pW({projectName:e,runId:n}){const i=Rs();return N.useEffect(()=>{i({to:"/setup",search:{onboarding:"site-health",setupProject:e,...n?{siteHealthRunId:n}:{}},replace:!0})},[i,e,n]),l.jsx(O0,{})}function hW({onActivationStarted:e,skipSiteScan:n}){return l.jsx(E1,{title:"Site Health setup",children:l.jsx(fW,{onActivationStarted:e,skipSiteScan:n})})}function fW({onActivationStarted:e,skipSiteScan:n}){const i=Rs(),o=ma(),u=wJ(),h=yt({...rF({client:ee}),retry:!1}),f=si(lF()),[b,v]=N.useState(""),[x,k]=N.useState(""),[S,C]=N.useState(""),[_,z]=N.useState("US"),[q,T]=N.useState("en"),[V,Y]=N.useState(!1),[M,U]=N.useState("idle"),[Z,te]=N.useState(null),[B,X]=N.useState(null),[le,Je]=N.useState(!1),[nt,$e]=N.useState(null),[Pe,Se]=N.useState(!1),Ue=h.isError?void 0:h.data,P=typeof Ue?.enabled=="boolean"?Ue.enabled:null,J=f.isPending?f.variables.body.enabled:P,[be,je]=N.useState(null),W=N.useRef(null),{onboardingSessionId:_e,emit:qe}=bC("platform");N.useEffect(()=>{qe({flowVersion:ft,onboardingSessionId:_e,event:"onboarding.started",step:"project",resumed:!1},"onboarding.started")},[qe,_e]);const ve=oW(b),de=x||ve?.projectName||"",ce=S||ve?.displayName||"",F=M==="creating"||M==="dispatching",pe=B??nt,Oe=aW(_,q),{countryValid:Ae,languageValid:st}=iW(_,q),Ve=Ae&&st;N.useEffect(()=>{pe&&W.current?.focus()},[pe]);const At=(Me,ct)=>i({to:"/setup",search:{...ct?{siteHealthRunId:ct}:{},onboarding:"site-health",setupProject:Me.name},replace:!0}),Ke=async Me=>{U("dispatching"),$e(null);try{const ct=u.mutateAsync({projectName:Me.name,projectId:Me.id,projectLabel:Me.displayName||Me.name,suppressErrorToast:!0,body:{checkDeadLinks:!0,maxPages:fj}}),Ht=await rW(ct);if(Ht.state==="queued"){qe({flowVersion:ft,onboardingSessionId:_e,event:"run.requested",origin:"dashboard_setup",result:"queued",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0"}),RG(Ht.run.runId),await At(Me,Ht.run.runId);return}ct.then(()=>{qe({flowVersion:ft,onboardingSessionId:_e,event:"run.requested",origin:"dashboard_setup",result:"queued",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0"})},Ft=>{qe({flowVersion:ft,onboardingSessionId:_e,event:"run.requested",origin:"dashboard_setup",result:"rejected",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0",reasonCode:xc(Ft,"run_rejected")})}),lW(ct,Me.id),await At(Me)}catch(ct){U("recovery"),$e(tS(ct,"The project was created, but the Site Health scan could not be started."));const Ht=xc(ct,"run_rejected");qe({flowVersion:ft,onboardingSessionId:_e,event:"run.requested",origin:"dashboard_setup",result:"rejected",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0",reasonCode:Ht}),qe({flowVersion:ft,onboardingSessionId:_e,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:Ht},`onboarding.blocked:run:${Ht}`)}},me=async Me=>{if(Me.preventDefault(),!(!ve||!n&&!V||!Ve||F)){U("creating"),X(null),Je(!1),$e(null);try{const ct=await NK({name:de,displayName:ce,canonicalDomain:ve.canonicalDomain,country:_,language:q});if(e(),te(ct),qe({flowVersion:ft,onboardingSessionId:_e,event:"onboarding.step_completed",step:"project",method:"manual"},"onboarding.step_completed:project"),await o.invalidateQueries({queryKey:Es({client:ee})}),n){await i({to:"/setup",search:{experience:"legacy",onboarding:"first-run",setupProject:ct.name},replace:!0});return}await Ke(ct)}catch(ct){U("idle");const Ht=ct instanceof Tn&&ct.statusCode===409;Je(Ht),X(tS(ct,"Could not create the project. Try again.")),qe({flowVersion:ft,onboardingSessionId:_e,event:"onboarding.blocked",step:"project",action:"save",reasonCode:xc(ct,"project_create_failed")},"onboarding.blocked:project"),Ht&&(e(),o.invalidateQueries({queryKey:Es({client:ee})}))}}},at=()=>{Z&&!F&&Ke(Z)},zt=()=>{F||i({to:"/projects"})},Pn=async()=>{try{await navigator.clipboard.writeText(JJ),Se(!0)}catch{xn({tone:"negative",title:"Could not copy setup request",detail:"Open the agent quickstart to continue with the CLI instead."})}},Kt=async Me=>{je(null);try{const ct=await f.mutateAsync({client:ee,body:{enabled:Me}});o.setQueryData(AN({client:ee}),ct),ct.enabled!==Me&&je(`The server kept telemetry ${ct.enabled?"on":"off"}. Check its telemetry settings.`)}catch{je("Could not update telemetry. Try again.")}};return Z&&M==="recovery"?l.jsxs("div",{className:"page-container max-w-3xl",children:[l.jsx(_o,{current:"site"}),l.jsx("div",{className:"page-header mt-8",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Project created"}),l.jsxs("p",{className:"page-subtitle",children:[Z.displayName||Z.name," is ready. The Site Health scan needs another try."]})]})}),l.jsxs("div",{ref:W,className:"rounded-lg border border-negative bg-negative-soft p-4",role:"alert",tabIndex:-1,children:[l.jsx("p",{className:"text-sm font-medium text-heading",children:nt}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"You can retry the scan or continue setup and retry from Site Health."}),l.jsxs("div",{className:"mt-4 flex flex-wrap gap-3",children:[l.jsx(re,{type:"button",onClick:at,children:"Retry Site Health scan"}),l.jsx(re,{type:"button",variant:"secondary",onClick:()=>{At(Z)},children:"Continue setup"})]})]})]}):l.jsxs("div",{className:"page-container max-w-xl py-8 md:py-12",children:[n?null:l.jsx(_o,{current:"site"}),l.jsxs("header",{className:`mb-8 ${n?"":"mt-8"}`,children:[l.jsx("h1",{id:"site-map-setup-title",className:"text-2xl font-semibold tracking-[-0.025em] text-heading",children:n?"Create a project":"Scan your site"}),l.jsx("p",{className:"mt-2 max-w-lg text-sm leading-6 text-secondary",children:n?"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."})]}),l.jsxs("form",{"aria-labelledby":"site-map-setup-title",className:"space-y-6",onSubmit:fn(me),noValidate:!0,children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm font-medium text-heading",htmlFor:"launchpad-domain",children:"Website URL"}),l.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&&!ve),"aria-describedby":b&&!ve?"launchpad-domain-hint launchpad-domain-error":"launchpad-domain-hint",placeholder:"https://example.com",value:b,onChange:Me=>{v(Me.target.value),X(null),Je(!1)}}),l.jsx("p",{id:"launchpad-domain-hint",className:"text-sm text-secondary",children:n?l.jsxs(l.Fragment,{children:["A public domain is still required."," ",l.jsx(et,{to:"/setup",search:{experience:"platform"},className:"font-medium text-link underline-offset-4 hover:underline",children:"Map with Site Health instead"})]}):l.jsxs(l.Fragment,{children:["Only public pages are scanned."," ",l.jsx(et,{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&&!ve?l.jsx("p",{id:"launchpad-domain-error",className:"text-sm text-negative",role:"alert",children:"Enter a public domain, such as example.com."}):null]}),l.jsxs("details",{className:"group border-y border-default",children:[l.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:[l.jsx("span",{className:"font-medium text-heading",children:"Project name and locale"}),l.jsxs("span",{className:"flex items-center gap-2 text-secondary",children:[Oe,l.jsx(Ic,{className:"size-4 transition-transform group-open:rotate-180 motion-reduce:transition-none","aria-hidden":"true"})]})]}),l.jsxs("div",{className:"space-y-5 border-t border-default py-4",children:[ve?l.jsxs("div",{children:[l.jsx("p",{className:"mb-3 text-sm font-medium text-heading",children:"Project"}),l.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-project-name",children:"Project name"}),l.jsx("input",{id:"launchpad-project-name",className:"setup-input h-10",type:"text",value:de,onChange:Me=>k(Me.target.value)})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-display-name",children:"Display name"}),l.jsx("input",{id:"launchpad-display-name",className:"setup-input h-10",type:"text",value:ce,onChange:Me=>C(Me.target.value)})]})]})]}):null,l.jsxs("div",{children:[l.jsx("p",{className:"mb-3 text-sm font-medium text-heading",children:"Locale"}),l.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-country",children:"Country"}),l.jsx("select",{id:"launchpad-country",className:"setup-input h-10",value:_,onChange:Me=>z(Me.target.value),children:gC.map(Me=>l.jsx("option",{value:Me.value,children:Me.label},Me.value))})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-language",children:"Language"}),l.jsx("select",{id:"launchpad-language",className:"setup-input h-10",value:q,onChange:Me=>T(Me.target.value),children:yC.map(Me=>l.jsx("option",{value:Me.value,children:Me.label},Me.value))})]})]})]})]})]}),n?null:l.jsxs("label",{className:"flex min-h-11 cursor-pointer items-start gap-3 py-2",children:[l.jsx("input",{className:"mt-0.5 size-4 shrink-0 rounded border-strong bg-bg",type:"checkbox",checked:V,onChange:Me=>Y(Me.target.checked),"aria-label":"Allow Canonry to scan this public site."}),l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"text-sm leading-5 text-heading",children:"Allow Canonry to scan this public site."}),l.jsx(la,{text:ZJ})]})]}),pe?l.jsxs("div",{ref:W,className:"rounded-md border border-negative bg-negative-soft p-3",role:"alert",tabIndex:-1,children:[l.jsx("p",{className:"text-sm font-medium text-heading",children:pe}),le?l.jsx(re,{type:"button",variant:"secondary",size:"sm",className:"mt-3",onClick:zt,children:"View projects"}):null]}):null,l.jsxs("div",{className:"grid gap-2",children:[l.jsx(re,{className:"h-11 w-full",type:"submit",disabled:!ve||!n&&!V||!Ve||F,children:M==="creating"||M==="dispatching"?l.jsxs(l.Fragment,{children:[l.jsx(Cs,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"})," ",n?"Creating project…":"Mapping site…"]}):n?"Create project":"Scan site"}),M==="dispatching"?l.jsx("span",{className:"text-center text-sm text-secondary",role:"status",children:"Opening Site Health when the scan is ready."}):null]})]}),l.jsxs("section",{className:"mt-8 border-t border-default pt-6","aria-labelledby":"agent-setup-title",children:[l.jsx("p",{id:"agent-setup-title",className:"text-sm font-medium text-heading",children:"Use your agent instead"}),l.jsx("p",{className:"mt-1 text-sm leading-5 text-secondary",children:"Copy a complete CLI setup request into any agent."}),l.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-1",children:[l.jsxs(re,{type:"button",variant:"ghost",size:"sm",className:"-ml-3",onClick:fn(Pn),children:[Pe?l.jsx(Oc,{className:"size-3.5","aria-hidden":"true"}):l.jsx(U0,{className:"size-3.5","aria-hidden":"true"}),l.jsx("span",{"aria-live":"polite",children:Pe?"Copied setup request":"Copy setup request"})]}),l.jsx(re,{asChild:!0,variant:"ghost",size:"sm",children:l.jsxs("a",{href:XJ,target:"_blank",rel:"noopener noreferrer",children:["Agent quickstart",l.jsx(X5,{className:"size-3.5","aria-hidden":"true"}),l.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]})})]})]}),P!==null?l.jsxs("section",{className:"mt-6 border-t border-default pt-5","aria-labelledby":"telemetry-title",children:[l.jsxs("label",{className:`flex min-h-11 items-start gap-3 py-2 ${f.isPending?"cursor-wait":"cursor-pointer"}`,children:[l.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:J??!1,disabled:f.isPending,onChange:Me=>{Kt(Me.target.checked)},"aria-describedby":"telemetry-detail"}),l.jsxs("span",{className:"grid gap-0.5",children:[l.jsx("span",{id:"telemetry-title",className:"text-sm leading-5 text-heading",children:"Share anonymous product telemetry"}),l.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."})]})]}),f.isPending?l.jsx("p",{className:"mt-1 text-sm text-secondary",role:"status",children:"Saving preference…"}):null,be?l.jsx("p",{className:"mt-1 text-sm text-negative",role:"alert",children:be}):null]}):null]})}function gW(){return l.jsx("div",{className:"page-container",children:l.jsx("section",{className:"page-section",children:l.jsxs(_a,{className:"surface-card empty-card",children:[l.jsx("h1",{children:"Route not found"}),l.jsx("p",{children:"The current path does not map to a dashboard view."}),l.jsx(re,{asChild:!0,children:l.jsx(et,{to:"/",children:"Return to overview"})})]})})})}const za=Ds(()=>Hi(()=>import("./ProjectPage-DmZZ2C7q.js"),__vite__mapDeps([5,1,0,2,3,4,6,7,8,9,10,11]),import.meta.url),"ProjectPage"),yW=Ds(()=>Hi(()=>import("./RunsPage-DHTvHcGm.js"),__vite__mapDeps([12,1,10,4,2,7,11]),import.meta.url),"RunsPage"),bW=Ds(()=>Hi(()=>import("./HistoryPage-DvupqQDM.js"),__vite__mapDeps([13,1,9,10,4,2,7,11]),import.meta.url),"HistoryPage"),vW=Ds(()=>Hi(()=>import("./SettingsPage-BwAFzB7A.js"),__vite__mapDeps([14,1,10,4,2,7,11]),import.meta.url),"SettingsPage"),xW=Ds(()=>Hi(()=>import("./BacklinksPage-B525ij0g.js"),__vite__mapDeps([15,1,2,10,4,7,11]),import.meta.url),"BacklinksPage"),wW=Ds(()=>Hi(()=>import("./TrafficPage-BOcXASAM.js"),__vite__mapDeps([16,1,8,2,10,4,7,11]),import.meta.url),"TrafficPage"),kW=Ds(()=>Hi(()=>import("./TrafficSourceDetailPage-DTq0cN6g.js"),__vite__mapDeps([17,1,8,3,4,2,10,7,11]),import.meta.url),"TrafficSourceDetailPage"),SW=Ds(()=>Hi(()=>import("./MeasurementPropertyPage-CwDbi1XN.js"),__vite__mapDeps([18,1,3,4,6,7,2,10,11]),import.meta.url),"MeasurementPropertyPage");function jW(){return l.jsx(TX,{children:l.jsx(gH,{children:l.jsx(_X,{})})})}const Un=T5()({component:jW,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==="complete"?e.onboarding:void 0,experience:e.experience==="legacy"||e.experience==="platform"?e.experience:void 0,siteScan:e.siteScan==="skip"?"skip":void 0,skipped:e.skipped==="visibility"?"visibility":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(n=>[n,typeof e[n]=="string"?e[n]:void 0]))})}),AW=Mt({getParentRoute:()=>Un,path:"/",component:uJ,beforeLoad:async({context:e})=>{let n=e.queryClient.getQueryData(Es({client:ee}));if(n===void 0)try{n=await e.queryClient.ensureQueryData(Oo({client:ee}))}catch{return}if(n.length===0)throw P0({to:"/setup"})}}),NW=Mt({getParentRoute:()=>Un,path:"/projects",component:hJ}),CW=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Vn=Mt({getParentRoute:()=>Un,path:"/projects/$projectName",component:()=>l.jsx(Gf,{}),beforeLoad:async({context:e,params:n,location:i})=>{const o=n.projectName;if(!CW.test(o))return;let u=e.queryClient.getQueryData(Es({client:ee}));if(!u)try{u=await e.queryClient.ensureQueryData(Oo({client:ee}))}catch{return}const h=u.find(f=>f.id===o);if(h)throw P0({to:i.pathname.replace(`/projects/${o}`,`/projects/${encodeURIComponent(h.name)}`),replace:!0})}}),_W=Mt({getParentRoute:()=>Vn,path:"/",component:()=>l.jsx(za,{tab:"overview"})}),TW=Mt({getParentRoute:()=>Vn,path:"/portfolio",component:()=>l.jsx(za,{tab:"portfolio"})}),EW=Mt({getParentRoute:()=>Vn,path:"/search-console",component:()=>l.jsx(za,{tab:"search-console"})}),RW=Mt({getParentRoute:()=>Vn,path:"/conversions",component:()=>l.jsx(za,{tab:"conversions"})}),DW=Mt({getParentRoute:()=>Vn,path:"/local",component:()=>l.jsx(za,{tab:"local"})}),zW=Mt({getParentRoute:()=>Vn,path:"/discovery",component:()=>l.jsx(za,{tab:"discovery"})}),IW=Mt({getParentRoute:()=>Vn,path:"/queries",component:()=>l.jsx(za,{tab:"queries"})}),OW=Mt({getParentRoute:()=>Vn,path:"/properties/$targetKey",component:()=>l.jsx(SW,{})}),PW=Mt({getParentRoute:()=>Vn,path:"/report",beforeLoad:({params:e})=>{throw P0({to:"/projects/$projectName",params:e,replace:!0})}}),qW=Mt({getParentRoute:()=>Vn,path:"/activity",component:()=>l.jsx(za,{tab:"activity"})}),MW=Mt({getParentRoute:()=>Vn,path:"/backlinks",component:()=>l.jsx(za,{tab:"backlinks"})}),BW=Mt({getParentRoute:()=>Vn,path:"/technical-aeo",component:()=>l.jsx(za,{tab:"technical-aeo"})}),LW=Mt({getParentRoute:()=>Vn,path:"/history",component:()=>l.jsx(za,{tab:"history"})}),UW=Mt({getParentRoute:()=>Vn,path:"/settings",component:()=>l.jsx(za,{tab:"settings"})}),VW=Mt({getParentRoute:()=>Un,path:"/runs",component:yW}),$W=Mt({getParentRoute:()=>Un,path:"/history",component:bW}),GW=Mt({getParentRoute:()=>Un,path:"/settings",component:vW,beforeLoad:({context:e})=>{}}),KW=Mt({getParentRoute:()=>Un,path:"/setup",component:mW}),HW=Mt({getParentRoute:()=>Un,path:"/backlinks",component:xW}),FW=Mt({getParentRoute:()=>Un,path:"/traffic",component:wW}),QW=Mt({getParentRoute:()=>Un,path:"/traffic/$projectName/$sourceId",component:kW}),ZW=Mt({getParentRoute:()=>Un,path:"*",component:gW}),YW=Un.addChildren([AW,NW,Vn.addChildren([_W,TW,EW,RW,DW,zW,IW,OW,PW,qW,MW,BW,LW,UW]),VW,$W,GW,KW,HW,FW,QW,ZW]);function XW(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath:"/"}const nS=XW(),JW=nS==="/"?"":nS.replace(/\/$/,"");function WW(e,n){return E5({routeTree:YW,basepath:JW||"/",context:{queryClient:e},...n?.initialEntries})}let aS=!1;async function eee(e){return(await I_({client:ee,body:e,keepalive:!0})).data}function tee(){aS||typeof window>"u"||(aS=!0,!(f1()||wo())&&(LG({send:eee}),ee.interceptors.request.use((e,n)=>{const i=n.fetch??globalThis.fetch,o=typeof n.url=="string"?n.url:void 0;return n.fetch=async(u,h)=>{try{return await i(u,h)}catch(f){throw f instanceof DOMException&&f.name==="AbortError"||am({method:e.method,route:o,network:!0}),f}},e}),ee.interceptors.response.use((e,n,i)=>(am({method:n.method,route:typeof i.url=="string"?i.url:void 0,path:aee(n.url),status:e.status}),e)),window.addEventListener("error",e=>{nm({kind:"unhandled",error:e.error})}),window.addEventListener("unhandledrejection",e=>{nm({kind:"unhandled",error:e.reason})}),lee()))}function nee(e){let n=null;const i=()=>{const o=e.state.matches.at(-1);if(!o)return;UG(o.fullPath);const u=e.state.location;if(!u)return;const h=u.search&&typeof u.search=="object"?u.search:{};n&&n.pathname===u.pathname&&HG(n.search,h),n={pathname:u.pathname,search:h}};return i(),e.subscribe("onResolved",i)}function aee(e){try{return new URL(e,window.location.origin).pathname}catch{return}}const iee={LCP:[2500,4e3],INP:[200,500],CLS:[.1,.25],FCP:[1800,3e3],TTFB:[800,1800]};function see(e,n){const[i,o]=iee[e];return n<=i?"good":n<=o?"needs-improvement":"poor"}function oee(){let e=0,n=0,i=-1/0,o=-1/0;return{add(u){u.hadRecentInput||(u.startTime-o<1e3&&u.startTime-i<5e3?n+=u.value:(n=u.value,i=u.startTime),o=u.startTime,e=Math.max(e,n))},value:()=>e}}function ree(){let e=0;return{add(n){n.interactionId&&(e=Math.max(e,n.duration))},value:()=>e}}function lee(){if(typeof PerformanceObserver>"u")return;const e=new Set,n=(b,v)=>{e.has(b)||!Number.isFinite(v)||(e.add(b),QG(b,see(b,v)))},i=(b,v,x={})=>{try{new PerformanceObserver(k=>v(k.getEntries())).observe({type:b,buffered:!0,...x})}catch{}};try{const b=performance.getEntriesByType("navigation")[0];b&&b.responseStart>0&&n("TTFB",b.responseStart)}catch{}i("paint",b=>{const v=b.find(x=>x.name==="first-contentful-paint");v&&n("FCP",v.startTime)});let o=0;i("largest-contentful-paint",b=>{const v=b.at(-1);v&&(o=v.startTime)});const u=oee();i("layout-shift",b=>{for(const v of b)u.add({startTime:v.startTime,value:v.value??0,hadRecentInput:v.hadRecentInput===!0})});const h=ree();i("event",b=>{for(const v of b)h.add(v)},{durationThreshold:40});const f=()=>{o>0&&n("LCP",o),n("CLS",u.value()),h.value()>0&&n("INP",h.value())};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&f()}),window.addEventListener("pagehide",f)}const cee=6e4;function uee(){const e=N.useRef(SK()).current,[n,i]=N.useState(e?"ready":"checking"),[o,u]=N.useState(null),[h,f]=N.useState(null),[b,v]=N.useState(e),[x,k]=N.useState(!1),[S,C]=N.useState(""),[_,z]=N.useState(""),[q,T]=N.useState(""),[V,Y]=N.useState(!1),[M,U]=N.useState("password"),[Z,te]=N.useState(null),[B,X]=N.useState(!1),[le,Je]=N.useState(!1),nt=N.useRef(null),$e=N.useRef(null),Pe=N.useRef(null),Se=()=>{const F=o?`${o.name}:${o.role}`:e?"api-key:explicit":h?`api-key:${h.id}`:"no-accounts";if(!nt.current||Pe.current!==F){$e.current?.clear();const pe=pH();$e.current=pe,nt.current=WW(pe),nee(nt.current),Pe.current=F}return{queryClient:$e.current,router:nt.current}},Ue=F=>F.authRequired?(k(!0),u(F.user),f(null),v(!1),i(F.user?"ready":"account-login"),!0):!1;N.useEffect(()=>{let F=!1;const pe=async(Oe,Ae=!1)=>{try{const st=await If();if(F)return;f(st),v(!1),i("ready")}catch(st){if(F)return;if(Ae&&st instanceof Tn&&st.statusCode===401)return IK().then(()=>{F||(te(null),f(null),v(!1),Je(!0),i("login"))}).catch(Ve=>{F||(te(Ve instanceof Error?Ve.message:"Could not clear the invalid session"),i(Oe))});te(st instanceof Error?st.message:"Could not verify API key access"),i(Oe)}};return e?(pe("api-key-error"),()=>{F=!0}):(Promise.allSettled([sk(),ik()]).then(([Oe,Ae])=>{if(F||Oe.status==="fulfilled"&&Ue(Oe.value))return;if(Ae.status==="rejected"){const Ve=Ae.reason;te(Ve instanceof Error?Ve.message:"Failed to reach the Canonry API"),i("login");return}const st=Ae.value;st.authenticated?(v(!0),pe("api-key-error",!0)):(f(null),v(!1),i(st.setupRequired?"setup":"login"))}),()=>{F=!0})},[]),N.useEffect(()=>{if(n!=="ready"||e)return;const F=setInterval(()=>{if(x){sk().then(pe=>{pe.authRequired&&!pe.user&&(Je(!0),u(null),f(null),i("account-login"))}).catch(()=>{});return}ik().then(pe=>{pe.authenticated||(Je(!0),f(null),i(pe.setupRequired?"setup":"login"))}).catch(()=>{})},cee);return ak(()=>{Je(!0),u(null),f(null),v(!1),i(x?"account-login":"login")}),()=>{clearInterval(F),ak(null)}},[n,x,e]);const P=async F=>{if(F.preventDefault(),!_.trim()||_.trim().length<8){te("Password must be at least 8 characters");return}if(_!==q){te("Passwords do not match");return}X(!0),te(null);try{if(!(await RK(_.trim())).authenticated){te("Setup failed");return}z(""),T(""),Y(!1),Je(!1),f(null),v(!0),i("checking");try{const Oe=await If();f(Oe),v(!1),i("ready")}catch(Oe){te(Oe instanceof Error?Oe.message:"Could not verify API key access"),i("api-key-error")}}catch(pe){te(pe instanceof Tn||pe instanceof Error?pe.message:"Setup failed")}finally{X(!1)}},J=F=>{z(F),te(null)},be=F=>{T(F),te(null)},je=async F=>{if(F.preventDefault(),!!_.trim()){X(!0),te(null);try{if(!(M==="api-key"?await zK(_.trim()):await DK(_.trim())).authenticated){te(M==="api-key"?"Invalid API key":"Incorrect password");return}const Oe=await If();f(Oe),v(!1),z(""),Y(!1),Je(!1),i("ready")}catch(pe){te(pe instanceof Tn||pe instanceof Error?pe.message:"Authentication failed")}finally{X(!1)}}},W=F=>{U(F),z(""),Y(!1),te(null)},_e=async F=>{if(F.preventDefault(),!(!S.trim()||!_)){X(!0),te(null);try{const pe=await OK(S.trim(),_);if(!pe.user){te("Incorrect name or password.");return}z(""),Je(!1),u(pe.user),f(null),v(!1),i("ready")}catch(pe){te(pe instanceof Tn?pe.message:"Incorrect name or password.")}finally{X(!1)}}};if(n==="ready"){const{queryClient:F,router:pe}=Se();return l.jsx(aH,{account:o,apiKey:h,apiKeyPending:b,children:l.jsx(R5,{client:F,children:l.jsx(D5,{router:pe})})})}const qe=_.trim(),ve=_.length>0&&qe.length<8,de=q.length>0&&_!==q,ce=qe.length>=8&&_===q;return l.jsx("div",{className:"min-h-screen bg-bg px-4 py-8",children:l.jsxs("div",{className:"mx-auto flex min-h-[calc(100vh-4rem)] max-w-md flex-col items-center justify-center gap-5",children:[l.jsxs("div",{"data-testid":"auth-brand",className:"flex items-center gap-2.5",children:[l.jsx("img",{className:"size-7",src:"./favicon.svg",alt:"","aria-hidden":"true"}),l.jsx("span",{className:"text-lg font-semibold tracking-tight text-heading",children:"Canonry"})]}),l.jsx(_a,{className:"surface-card w-full",children:n==="checking"?l.jsx(yo,{className:"py-8",children:l.jsx("p",{className:"supporting-copy text-center",children:"Connecting to Canonry…"})}):n==="api-key-error"?l.jsxs(l.Fragment,{children:[l.jsxs(Cr,{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),l.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Could not verify API key access"})]}),l.jsxs(yo,{className:"space-y-4",children:[l.jsx("p",{className:"supporting-copy",children:Z??"Canonry could not verify this session’s access, so the dashboard stayed locked."}),l.jsx(re,{type:"button",className:"w-full",onClick:()=>{window.location.reload()},children:"Try again"})]})]}):n==="account-login"?l.jsxs(l.Fragment,{children:[l.jsxs(Cr,{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),l.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Sign in to Canonry"})]}),l.jsxs(yo,{children:[le?l.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,l.jsxs("form",{className:"space-y-4",onSubmit:fn(_e),children:[l.jsxs("label",{className:"block space-y-1.5",htmlFor:"account-name",children:[l.jsx("span",{className:"text-xs font-medium text-secondary",children:"Name"}),l.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:S,onChange:F=>{C(F.target.value),te(null)},"aria-invalid":!!Z,"aria-describedby":Z?"account-login-error":void 0})]}),l.jsxs("label",{className:"block space-y-1.5",htmlFor:"account-password",children:[l.jsx("span",{className:"text-xs font-medium text-secondary",children:"Password"}),l.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:_,onChange:F=>J(F.target.value),"aria-invalid":!!Z,"aria-describedby":Z?"account-login-error":void 0})]}),Z?l.jsx("p",{id:"account-login-error",role:"alert",className:"text-sm text-negative-400",children:Z}):null,l.jsx(re,{type:"submit",disabled:B||!S.trim()||!_,children:B?"Signing in…":"Sign in"})]})]})]}):n==="setup"?l.jsxs(l.Fragment,{children:[l.jsxs(Cr,{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"First-time setup"}),l.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Create a dashboard password"}),l.jsx(cm,{children:"This password protects the dashboard on this computer."})]}),l.jsx(yo,{children:l.jsxs("form",{className:"space-y-4",onSubmit:fn(P),children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("label",{className:"block text-xs font-medium text-secondary",htmlFor:"dashboard-password-new",children:"Password"}),l.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:V?"text":"password",name:"new-password",autoComplete:"new-password",minLength:8,required:!0,value:_,onChange:F=>J(F.target.value),"aria-invalid":ve,"aria-describedby":"dashboard-password-new-help"}),l.jsx("span",{id:"dashboard-password-new-help","aria-live":"polite",className:ve?"block text-sm text-negative-400":"block text-sm text-secondary",children:ve?"Enter at least 8 characters.":"Use at least 8 characters."})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("label",{className:"block text-xs font-medium text-secondary",htmlFor:"dashboard-password-confirm",children:"Confirm password"}),l.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:V?"text":"password",name:"confirm-password",autoComplete:"new-password",minLength:8,required:!0,value:q,onChange:F=>be(F.target.value),"aria-invalid":de,"aria-describedby":"dashboard-password-confirm-help"}),l.jsx("span",{id:"dashboard-password-confirm-help","aria-live":"polite",className:de?"block text-sm text-negative-400":"block text-sm text-secondary",children:de?"Passwords do not match.":"Enter the same password again."})]}),l.jsxs("label",{className:"flex min-h-10 cursor-pointer items-center gap-2 text-sm text-secondary",htmlFor:"dashboard-password-show",children:[l.jsx("input",{id:"dashboard-password-show",type:"checkbox",checked:V,onChange:F=>Y(F.target.checked)}),"Show passwords"]}),Z?l.jsx("p",{id:"dashboard-password-setup-error",role:"alert",className:"text-sm text-negative-400",children:Z}):null,l.jsx(re,{type:"submit",disabled:B||!ce,children:B?"Creating password…":"Create password and continue"})]})})]}):l.jsxs(l.Fragment,{children:[l.jsxs(Cr,{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),l.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Sign in to Canonry"}),l.jsx(cm,{children:M==="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."})]}),l.jsxs(yo,{children:[le?l.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,l.jsxs("form",{className:"space-y-4",onSubmit:fn(je),children:[l.jsxs("label",{className:"block space-y-1.5",htmlFor:"dashboard-password-current",children:[l.jsx("span",{className:"text-xs font-medium text-secondary",children:M==="api-key"?"Canonry API key":"Password"}),l.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:V?"text":"password",name:M==="api-key"?"apiKey":"password",autoComplete:M==="api-key"?"off":"current-password",spellCheck:!1,required:!0,value:_,onChange:F=>J(F.target.value),"aria-invalid":!!Z,"aria-describedby":Z?"dashboard-password-login-error":void 0})]}),l.jsxs("label",{className:"flex min-h-10 cursor-pointer items-center gap-2 text-sm text-secondary",htmlFor:"dashboard-login-password-show",children:[l.jsx("input",{id:"dashboard-login-password-show",type:"checkbox",checked:V,onChange:F=>Y(F.target.checked)}),M==="api-key"?"Show API key":"Show password"]}),Z?l.jsx("p",{id:"dashboard-password-login-error",role:"alert",className:"text-sm text-negative-400",children:Z}):null,l.jsx(re,{type:"submit",disabled:B||!_.trim(),children:B?"Signing in…":"Open dashboard"}),l.jsx(re,{type:"button",variant:"ghost",onClick:()=>W(M==="api-key"?"password":"api-key"),children:M==="api-key"?"Use dashboard password instead":"Forgot password? Use API key"})]})]})]})})]})})}const vC=document.getElementById("root");if(!vC)throw new Error("Expected #root element for web app bootstrap.");tee();s6.createRoot(vC).render(l.jsx(N.StrictMode,{children:l.jsx(uee,{})}));export{_ae as $,Bn as A,re as B,yc as C,fn as D,Qae as E,Xae as F,Yae as G,ene as H,la as I,nne as J,tne as K,fa as L,xie as M,bH as N,qie as O,Mie as P,TZ as Q,$a as R,Qk as S,vn as T,AH as U,tte as V,jne as W,_ne as X,Nte as Y,kne as Z,Aae as _,vie as a,Cne as a$,Cae as a0,Ote as a1,Ite as a2,Kte as a3,xn as a4,Rae as a5,Dae as a6,Lte as a7,zae as a8,Ute as a9,bne as aA,Tn as aB,vne as aC,yte as aD,vH as aE,_Q as aF,g0 as aG,xne as aH,zd as aI,Wae as aJ,C0 as aK,go as aL,kH as aM,Zt as aN,uH as aO,Lne as aP,TY as aQ,Mte as aR,ite as aS,nte as aT,Oi as aU,Die as aV,Wee as aW,hte as aX,qP as aY,dte as aZ,Jee as a_,qte as aa,Bte as ab,Tae as ac,Eae as ad,Nae as ae,Pte as af,Iae as ag,Uae as ah,qae as ai,Bae as aj,Mae as ak,Lae as al,lne as am,k1 as an,ze as ao,Pae as ap,TN as aq,$i as ar,Oae as as,D0 as at,K9 as au,H9 as av,Lee as aw,Bee as ax,dne as ay,yne as az,jH as b,kee as b$,Xee as b0,OH as b1,aF as b2,Hne as b3,Xne as b4,Fne as b5,rte as b6,cte as b7,LV as b8,ute as b9,oae as bA,hae as bB,fae as bC,gae as bD,sae as bE,pae as bF,rae as bG,yae as bH,lae as bI,bae as bJ,dae as bK,xae as bL,Sae as bM,gJ as bN,cae as bO,fe as bP,qee as bQ,Pee as bR,Oee as bS,Iee as bT,Ree as bU,Eee as bV,zee as bW,Dee as bX,Tee as bY,_ee as bZ,wee as b_,HH as ba,Kne as bb,VV as bc,h0 as bd,lte as be,hK as bf,Qne as bg,Gne as bh,QH as bi,Zne as bj,Cie as bk,Yne as bl,iie as bm,sie as bn,Vte as bo,x1 as bp,Jae as bq,jN as br,nae as bs,iae as bt,mae as bu,kae as bv,wae as bw,uae as bx,vae as by,jae as bz,Mee as c,qne as c$,Cee as c0,Nee as c1,Aee as c2,See as c3,jee as c4,xee as c5,vee as c6,bee as c7,yee as c8,E6 as c9,zne as cA,pY as cB,S0 as cC,om as cD,j0 as cE,rm as cF,lm as cG,_Y as cH,BH as cI,bo as cJ,um as cK,uF as cL,NJ as cM,Bie as cN,Aie as cO,NY as cP,jie as cQ,xJ as cR,Jne as cS,One as cT,Sie as cU,Bne as cV,Pne as cW,vI as cX,cP as cY,Wne as cZ,kie as c_,mte as ca,jte as cb,Ste as cc,kte as cd,Wte as ce,pK as cf,hj as cg,Am as ch,fj as ci,oF as cj,aae as ck,Rne as cl,ate as cm,dk as cn,_te as co,Tte as cp,Tne as cq,Ene as cr,Ete as cs,Rte as ct,zte as cu,Dte as cv,Wc as cw,Oo as cx,dN as cy,Ine as cz,SH as d,mJ as d$,gie as d0,OY as d1,AK as d2,_H as d3,PY as d4,vte as d5,xte as d6,bte as d7,_K as d8,Nie as d9,Pie as dA,$m as dB,eae as dC,tae as dD,bK as dE,fte as dF,gte as dG,Cte as dH,$te as dI,Gte as dJ,E1 as dK,Gm as dL,N1 as dM,AJ as dN,Jte as dO,Br as dP,pk as dQ,cne as dR,mne as dS,hne as dT,fne as dU,une as dV,pne as dW,gne as dX,Rf as dY,rne as dZ,nie as d_,_ie as da,Tie as db,Rie as dc,wte as dd,Es as de,IH as df,MH as dg,Ate as dh,jZ as di,Vae as dj,BK as dk,Yte as dl,Gae as dm,Kae as dn,Hae as dp,$ae as dq,Ane as dr,Hte as ds,Fte as dt,Qte as du,Xte as dv,Zte as dw,A1 as dx,Mr as dy,Bm as dz,zie as e,ote as e0,i1 as e1,Dne as e2,eie as e3,aie as e4,one as e5,ste as e6,ine as e7,sne as e8,ane as e9,cie as eA,Vee as eB,mie as eC,fie as eD,die as eE,hie as eF,_o as eG,Yee as eH,Hee as eI,pie as eJ,Kee as eK,TO as eL,Qee as eM,Fee as eN,tie as ea,Sne as eb,LI as ec,Une as ed,Mne as ee,$ne as ef,Vne as eg,jk as eh,Zee as ei,pw as ej,Gee as ek,Hi as el,Da as em,$ee as en,nm as eo,pte as ep,nQ as eq,rie as er,oie as es,wJ as et,uie as eu,DY as ev,Uee as ew,yie as ex,bie as ey,lie as ez,Yd as f,Eie as g,Iie as h,Oie as i,A0 as j,Bc as k,EZ as l,wie as m,WU as n,GG as o,wne as p,Fae as q,Zae as r,Nne as s,wH as t,C1 as u,_a as v,ete as w,ee as x,f1 as y,wo as z};
|