@canonry/canonry 7.22.0 → 7.24.0

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.
Files changed (31) hide show
  1. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +14 -0
  2. package/assets/assets/{AuditHistoryPanel-J8AR3x5F.js → AuditHistoryPanel-DKKnX8IT.js} +1 -1
  3. package/assets/assets/{BacklinksPage-CRDPutGA.js → BacklinksPage-DNbur8am.js} +1 -1
  4. package/assets/assets/{HistoryPage-C5taVW3t.js → HistoryPage-DahtHlpM.js} +1 -1
  5. package/assets/assets/{MeasurementPropertyPage-txucmLuz.js → MeasurementPropertyPage-BoNDtLfp.js} +1 -1
  6. package/assets/assets/{ProjectPage-C4FaBoWI.js → ProjectPage--ZlpQduH.js} +1 -1
  7. package/assets/assets/{RunsPage-D-3XKUhh.js → RunsPage-DKB2CHTM.js} +1 -1
  8. package/assets/assets/{SettingsPage-Cq_SJRj_.js → SettingsPage-lnmMZzEj.js} +1 -1
  9. package/assets/assets/{SiteHealthSection-Cn_IZVO1.js → SiteHealthSection-BBjucRed.js} +3 -3
  10. package/assets/assets/{TrafficPage-BMdFZs3X.js → TrafficPage-DNyTmPLd.js} +1 -1
  11. package/assets/assets/{TrafficSourceDetailPage-BmrIOc-2.js → TrafficSourceDetailPage-D1zKZHSh.js} +1 -1
  12. package/assets/assets/{extract-error-message-HlQy5L7O.js → extract-error-message-v0b8P-wc.js} +1 -1
  13. package/assets/assets/index-CfaBRiBG.js +86 -0
  14. package/assets/assets/{react-sigma_core.esm.min-CogAr1i4.js → react-sigma_core.esm.min-BZSJoRrV.js} +1 -1
  15. package/assets/assets/{v2-overview-adapter-tps7TUxq.js → v2-overview-adapter-DXAl-O_h.js} +1 -1
  16. package/assets/index.html +1 -1
  17. package/dist/{chunk-222NAFTY.js → chunk-7Q7QCBJ3.js} +2 -2
  18. package/dist/{chunk-5IXQAOVK.js → chunk-DS2ZKB3T.js} +15 -6
  19. package/dist/{chunk-MRKV43TV.js → chunk-IM2BFAAT.js} +565 -206
  20. package/dist/{chunk-NDQOCFJQ.js → chunk-JJBVYL45.js} +39 -4
  21. package/dist/{chunk-46JZR2IV.js → chunk-O5UMRQVN.js} +1303 -504
  22. package/dist/{chunk-6Z2LFFRT.js → chunk-SG3MPCDL.js} +5731 -4596
  23. package/dist/{chunk-6H2BC5EY.js → chunk-YCPTP2NC.js} +3 -3
  24. package/dist/cli.js +371 -143
  25. package/dist/{demo-server-32PU7BM6.js → demo-server-C7UGXXN7.js} +4 -4
  26. package/dist/index.d.ts +2 -0
  27. package/dist/index.js +6 -6
  28. package/dist/{intelligence-service-256DQBVR.js → intelligence-service-37TX4YV7.js} +2 -2
  29. package/dist/mcp.js +4 -4
  30. package/package.json +13 -13
  31. package/assets/assets/index-BJcjB5XW.js +0 -86
@@ -0,0 +1,86 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SiteHealthSection-BBjucRed.js","./vendor-tanstack-ZXXkndVj.js","./vendor-lucide-Y6jANGfG.js","./ChartPrimitives-CZ4wVBJL.js","./vendor-recharts-D-cUuLZo.js","./ProjectPage--ZlpQduH.js","./v2-overview-adapter-DXAl-O_h.js","./vendor-markdown-B4giJcws.js","./extract-error-message-v0b8P-wc.js","./Hint-DICI5Jq9.js","./AuditHistoryPanel-DKKnX8IT.js","./vendor-radix-twS1M3FF.js","./vendor-yaml-GWJz5H2G.js","./RunsPage-DKB2CHTM.js","./HistoryPage-DahtHlpM.js","./SettingsPage-lnmMZzEj.js","./BacklinksPage-DNbur8am.js","./TrafficPage-DNyTmPLd.js","./TrafficSourceDetailPage-D1zKZHSh.js","./MeasurementPropertyPage-BoNDtLfp.js"])))=>i.map(i=>d[i]);
2
+ import{c as b_,d as v_,r as C,j as l,Q as x_,M as w_,q as be,e as Bc,L as at,a as S_,t as Cr,u as yt,f as k_,h as Di,k as zi,l as jk,m as j_,n as Ak,O as eg,o as os,p as A_,s as Bt,v as Qg,x as Ii,y as N_,z as C_,A as __}from"./vendor-tanstack-ZXXkndVj.js";import{S as T_,O as Zg,P as Nk,C as Yg,a as Ck,T as Xg,D as _k,R as Tk}from"./vendor-radix-twS1M3FF.js";import{c as Ek}from"./vendor-recharts-D-cUuLZo.js";import{A as Tc,X as Hr,S as Jg,a as Rk,G as Dk,C as Lc,L as Ti,R as hd,M as E_,b as R_,P as tg,H as zk,c as Ik,d as D_,e as Uc,f as Wg,T as ym,g as Vc,W as Ok,h as z_,i as I_,j as O_,k as P_,l as q_,m as M_,n as B_,B as L_,F as U_,o as V_,p as $_,q as K_,r as G_,s as Pk,t as qk,u as ng,v as Mk,w as H_,x as Bk,E as F_}from"./vendor-lucide-Y6jANGfG.js";import{M as Q_,r as Z_}from"./vendor-markdown-B4giJcws.js";import{p as Y_}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"]'))r(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"&&r(f)}).observe(document,{childList:!0,subtree:!0});function s(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 r(u){if(u.ep)return;u.ep=!0;const h=s(u);fetch(u.href,h)}})();var uf={exports:{}},cc={},df={exports:{}},mf={};var Nx;function X_(){return Nx||(Nx=1,(function(e){function n(B,W){var ve=B.length;B.push(W);e:for(;0<ve;){var Ae=ve-1>>>1,ie=B[Ae];if(0<u(ie,W))B[Ae]=W,B[ve]=ie,ve=Ae;else break e}}function s(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var W=B[0],ve=B.pop();if(ve!==W){B[0]=ve;e:for(var Ae=0,ie=B.length,Se=ie>>>1;Ae<Se;){var Me=2*(Ae+1)-1,xe=B[Me],pe=Me+1,ce=B[pe];if(0>u(xe,ve))pe<ie&&0>u(ce,xe)?(B[Ae]=ce,B[pe]=ve,Ae=pe):(B[Ae]=xe,B[Me]=ve,Ae=Me);else if(pe<ie&&0>u(ce,ve))B[Ae]=ce,B[pe]=ve,Ae=pe;else break e}}return W}function u(B,W){var ve=B.sortIndex-W.sortIndex;return ve!==0?ve:B.id-W.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=[],S=1,k=null,N=3,T=!1,z=!1,q=!1,E=!1,P=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function $(B){for(var W=s(x);W!==null;){if(W.callback===null)r(x);else if(W.startTime<=B)r(x),W.sortIndex=W.expirationTime,n(v,W);else break;W=s(x)}}function Q(B){if(q=!1,$(B),!z)if(s(v)!==null)z=!0,ae||(ae=!0,Ke());else{var W=s(x);W!==null&&Le(Q,W.startTime-B)}}var ae=!1,V=-1,Z=5,X=-1;function Ce(){return E?!0:!(e.unstable_now()-X<Z)}function tt(){if(E=!1,ae){var B=e.unstable_now();X=B;var W=!0;try{e:{z=!1,q&&(q=!1,M(V),V=-1),T=!0;var ve=N;try{t:{for($(B),k=s(v);k!==null&&!(k.expirationTime>B&&Ce());){var Ae=k.callback;if(typeof Ae=="function"){k.callback=null,N=k.priorityLevel;var ie=Ae(k.expirationTime<=B);if(B=e.unstable_now(),typeof ie=="function"){k.callback=ie,$(B),W=!0;break t}k===s(v)&&r(v),$(B)}else r(v);k=s(v)}if(k!==null)W=!0;else{var Se=s(x);Se!==null&&Le(Q,Se.startTime-B),W=!1}}break e}finally{k=null,N=ve,T=!1}W=void 0}}finally{W?Ke():ae=!1}}}var Ke;if(typeof L=="function")Ke=function(){L(tt)};else if(typeof MessageChannel<"u"){var Ue=new MessageChannel,ke=Ue.port2;Ue.port1.onmessage=tt,Ke=function(){ke.postMessage(null)}}else Ke=function(){P(tt,0)};function Le(B,W){V=P(function(){B(e.unstable_now())},W)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return N},e.unstable_next=function(B){switch(N){case 1:case 2:case 3:var W=3;break;default:W=N}var ve=N;N=W;try{return B()}finally{N=ve}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(B,W){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ve=N;N=B;try{return W()}finally{N=ve}},e.unstable_scheduleCallback=function(B,W,ve){var Ae=e.unstable_now();switch(typeof ve=="object"&&ve!==null?(ve=ve.delay,ve=typeof ve=="number"&&0<ve?Ae+ve:Ae):ve=Ae,B){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=ve+ie,B={id:S++,callback:W,priorityLevel:B,startTime:ve,expirationTime:ie,sortIndex:-1},ve>Ae?(B.sortIndex=ve,n(x,B),s(v)===null&&B===s(x)&&(q?(M(V),V=-1):q=!0,Le(Q,ve-Ae))):(B.sortIndex=ie,n(v,B),z||T||(z=!0,ae||(ae=!0,Ke()))),B},e.unstable_shouldYield=Ce,e.unstable_wrapCallback=function(B){var W=N;return function(){var ve=N;N=W;try{return B.apply(this,arguments)}finally{N=ve}}}})(mf)),mf}var Cx;function J_(){return Cx||(Cx=1,df.exports=X_()),df.exports}var _x;function W_(){if(_x)return cc;_x=1;var e=J_(),n=b_(),s=v_();function r(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)a+="&args[]="+encodeURIComponent(arguments[i])}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,i=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(i=a.return),t=a.return;while(t)}return a.tag===3?i: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(r(188))}function x(t){var a=t.alternate;if(!a){if(a=h(t),a===null)throw Error(r(188));return a!==t?null:t}for(var i=t,c=a;;){var p=i.return;if(p===null)break;var g=p.alternate;if(g===null){if(c=p.return,c!==null){i=c;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===i)return v(p),t;if(g===c)return v(p),a;g=g.sibling}throw Error(r(188))}if(i.return!==c.return)i=p,c=g;else{for(var w=!1,A=p.child;A;){if(A===i){w=!0,i=p,c=g;break}if(A===c){w=!0,c=p,i=g;break}A=A.sibling}if(!w){for(A=g.child;A;){if(A===i){w=!0,i=g,c=p;break}if(A===c){w=!0,c=g,i=p;break}A=A.sibling}if(!w)throw Error(r(189))}}if(i.alternate!==c)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?t:a}function S(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=S(t),a!==null)return a;t=t.sibling}return null}var k=Object.assign,N=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),L=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),Ce=Symbol.for("react.memo_cache_sentinel"),tt=Symbol.iterator;function Ke(t){return t===null||typeof t!="object"?null:(t=tt&&t[tt]||t["@@iterator"],typeof t=="function"?t:null)}var Ue=Symbol.for("react.client.reference");function ke(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Ue?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case q:return"Fragment";case P:return"Profiler";case E:return"StrictMode";case Q:return"Suspense";case ae:return"SuspenseList";case X:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case z:return"Portal";case L:return t.displayName||"Context";case M:return(t._context.displayName||"Context")+".Consumer";case $:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case V:return a=t.displayName||null,a!==null?a:ke(t.type)||"Memo";case Z:a=t._payload,t=t._init;try{return ke(t(a))}catch{}}return null}var Le=Array.isArray,B=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ve={pending:!1,data:null,method:null,action:null},Ae=[],ie=-1;function Se(t){return{current:t}}function Me(t){0>ie||(t.current=Ae[ie],Ae[ie]=null,ie--)}function xe(t,a){ie++,Ae[ie]=t.current,t.current=a}var pe=Se(null),ce=Se(null),ue=Se(null),_e=Se(null);function Qe(t,a){switch(xe(ue,a),xe(ce,t),xe(pe,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=Yv(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Me(pe),xe(pe,t)}function Ee(){Me(pe),Me(ce),Me(ue)}function Ct(t){t.memoizedState!==null&&xe(_e,t);var a=pe.current,i=Yv(a,t.type);a!==i&&(xe(ce,t),xe(pe,i))}function me(t){ce.current===t&&(Me(pe),Me(ce)),_e.current===t&&(Me(_e),ic._currentValue=ve)}var Be,Ne;function re(t){if(Be===void 0)try{throw Error()}catch(i){var a=i.stack.trim().match(/\n( *(at )?)/);Be=a&&a[1]||"",Ne=-1<i.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+Be+t+Ne}var Ze=!1;function bt(t,a){if(!t||Ze)return"";Ze=!0;var i=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(Y){var F=Y}Reflect.construct(t,[],se)}else{try{se.call()}catch(Y){F=Y}t.call(se.prototype)}}else{try{throw Error()}catch(Y){F=Y}(se=t())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(Y){if(Y&&F&&typeof Y.stack=="string")return[Y.stack,F.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 ee=`
7
+ `+D[c].replace(" at new "," at ");return t.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",t.displayName)),ee}while(1<=c&&0<=p);break}}}finally{Ze=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?re(i):""}function qn(t,a){switch(t.tag){case 26:case 27:case 5:return re(t.type);case 16:return re("Lazy");case 13:return t.child!==a&&a!==null?re("Suspense Fallback"):re("Suspense");case 19:return re("SuspenseList");case 0:case 15:return bt(t.type,!1);case 11:return bt(t.type.render,!1);case 1:return bt(t.type,!0);case 31:return re("Activity");default:return""}}function Ht(t){try{var a="",i=null;do a+=qn(t,i),i=t,t=t.return;while(t);return a}catch(c){return`
8
+ Error generating stack: `+c.message+`
9
+ `+c.stack}}var Ve=Object.prototype.hasOwnProperty,ct=e.unstable_scheduleCallback,Ft=e.unstable_cancelCallback,Qt=e.unstable_shouldYield,En=e.unstable_requestPaint,Vt=e.unstable_now,ds=e.unstable_getCurrentPriorityLevel,Vi=e.unstable_ImmediatePriority,ms=e.unstable_UserBlockingPriority,Rn=e.unstable_NormalPriority,Vo=e.unstable_LowPriority,$i=e.unstable_IdlePriority,Ki=e.log,ps=e.unstable_setDisableYieldValue,vn=null,Et=null;function $n(t){if(typeof Ki=="function"&&ps(t),Et&&typeof Et.setStrictMode=="function")try{Et.setStrictMode(vn,t)}catch{}}var Zt=Math.clz32?Math.clz32:ea,Gi=Math.log,Oa=Math.LN2;function ea(t){return t>>>=0,t===0?32:31-(Gi(t)/Oa|0)|0}var oe=256,ze=262144,Je=4194304;function Ot(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 et(t,a,i){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=Ot(c):(w&=A,w!==0?p=Ot(w):i||(i=A&~t,i!==0&&(p=Ot(i))))):(A=c&~g,A!==0?p=Ot(A):w!==0?p=Ot(w):i||(i=c&~t,i!==0&&(p=Ot(i)))),p===0?0:a!==0&&a!==p&&(a&g)===0&&(g=p&-p,i=a&-a,g>=i||g===32&&(i&4194048)!==0)?a:p}function kt(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 hs(){var t=Je;return Je<<=1,(Je&62914560)===0&&(Je=4194304),t}function $o(t){for(var a=[],i=0;31>i;i++)a.push(t);return a}function Hi(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function ou(t,a,i,c,p,g){var w=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var A=t.entanglements,D=t.expirationTimes,G=t.hiddenUpdates;for(i=w&~i;0<i;){var ee=31-Zt(i),se=1<<ee;A[ee]=0,D[ee]=-1;var F=G[ee];if(F!==null)for(G[ee]=null,ee=0;ee<F.length;ee++){var Y=F[ee];Y!==null&&(Y.lane&=-536870913)}i&=~se}c!==0&&ol(t,c,0),g!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=g&~(w&~a))}function ol(t,a,i){t.pendingLanes|=a,t.suspendedLanes&=~a;var c=31-Zt(a);t.entangledLanes|=a,t.entanglements[c]=t.entanglements[c]|1073741824|i&261930}function rl(t,a){var i=t.entangledLanes|=a;for(t=t.entanglements;i;){var c=31-Zt(i),p=1<<c;p&a|t[c]&a&&(t[c]|=a),i&=~p}}function ll(t,a){var i=a&-a;return i=(i&42)!==0?1:cl(i),(i&(t.suspendedLanes|a))!==0?0:i}function cl(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 ul(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ko(){var t=W.p;return t!==0?t:(t=window.event,t===void 0?32:vx(t.type))}function ru(t,a){var i=W.p;try{return W.p=t,a()}finally{W.p=i}}var ga=Math.random().toString(36).slice(2),on="__reactFiber$"+ga,Dn="__reactProps$"+ga,Qs="__reactContainer$"+ga,Go="__reactEvents$"+ga,lu="__reactListeners$"+ga,Ho="__reactHandles$"+ga,ta="__reactResources$"+ga,Zs="__reactMarker$"+ga;function dl(t){delete t[on],delete t[Dn],delete t[Go],delete t[lu],delete t[Ho]}function fs(t){var a=t[on];if(a)return a;for(var i=t.parentNode;i;){if(a=i[Qs]||i[on]){if(i=a.alternate,a.child!==null||i!==null&&i.child!==null)for(t=ax(t);t!==null;){if(i=t[on])return i;t=ax(t)}return a}t=i,i=t.parentNode}return null}function Ys(t){if(t=t[on]||t[Qs]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function Xs(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(r(33))}function Js(t){var a=t[ta];return a||(a=t[ta]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function en(t){t[Zs]=!0}var ml=new Set,pl={};function Qa(t,a){Fi(t,a),Fi(t+"Capture",a)}function Fi(t,a){for(pl[t]=a,t=0;t<a.length;t++)ml.add(a[t])}var hl=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]*$"),fl={},Za={};function rp(t){return Ve.call(Za,t)?!0:Ve.call(fl,t)?!1:hl.test(t)?Za[t]=!0:(fl[t]=!0,!1)}function gs(t,a,i){if(rp(a))if(i===null)t.removeAttribute(a);else{switch(typeof i){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,""+i)}}function Qi(t,a,i){if(i===null)t.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+i)}}function jn(t,a,i,c){if(c===null)t.removeAttribute(i);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(a,i,""+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 Ws(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function lp(t,a,i){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){i=""+w,g.call(this,w)}}),Object.defineProperty(t,a,{enumerable:c.enumerable}),{getValue:function(){return i},setValue:function(w){i=""+w},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function gl(t){if(!t._valueTracker){var a=Ws(t)?"checked":"value";t._valueTracker=lp(t,a,""+t[a])}}function Ya(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var i=a.getValue(),c="";return t&&(c=Ws(t)?t.checked?"true":"false":t.value),t=c,t!==i?(a.setValue(t),!0):!1}function ei(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 cu=/[\n"\\]/g;function In(t){return t.replace(cu,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Fo(t,a,i,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?Qo(t,w,zn(a)):i!=null?Qo(t,w,zn(i)):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 yl(t,a,i,c,p,g,w,A){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),a!=null||i!=null){if(!(g!=="submit"&&g!=="reset"||a!=null)){gl(t);return}i=i!=null?""+zn(i):"",a=a!=null?""+zn(a):i,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),gl(t)}function Qo(t,a,i){a==="number"&&ei(t.ownerDocument)===t||t.defaultValue===""+i||(t.defaultValue=""+i)}function Kn(t,a,i,c){if(t=t.options,a){a={};for(var p=0;p<i.length;p++)a["$"+i[p]]=!0;for(i=0;i<t.length;i++)p=a.hasOwnProperty("$"+t[i].value),t[i].selected!==p&&(t[i].selected=p),p&&c&&(t[i].defaultSelected=!0)}else{for(i=""+zn(i),a=null,p=0;p<t.length;p++){if(t[p].value===i){t[p].selected=!0,c&&(t[p].defaultSelected=!0);return}a!==null||t[p].disabled||(a=t[p])}a!==null&&(a.selected=!0)}}function na(t,a,i){if(a!=null&&(a=""+zn(a),a!==t.value&&(t.value=a),i==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=i!=null?""+zn(i):""}function ys(t,a,i,c){if(a==null){if(c!=null){if(i!=null)throw Error(r(92));if(Le(c)){if(1<c.length)throw Error(r(93));c=c[0]}i=c}i==null&&(i=""),a=i}i=zn(a),t.defaultValue=i,c=t.textContent,c===i&&c!==""&&c!==null&&(t.value=c),gl(t)}function ya(t,a){if(a){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.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 cp(t,a,i){var c=a.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?c?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":c?t.setProperty(a,i):typeof i!="number"||i===0||ba.has(a)?a==="float"?t.cssFloat=i:t[a]=(""+i).trim():t[a]=i+"px"}function Xa(t,a,i){if(a!=null&&typeof a!="object")throw Error(r(62));if(t=t.style,i!=null){for(var c in i)!i.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)&&i[p]!==c&&cp(t,p,c)}else for(var g in a)a.hasOwnProperty(g)&&cp(t,g,a[g])}function Pa(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 Zo=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"]]),up=/^[\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 Yo(t){return up.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function qa(){}var bl=null;function vl(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var bs=null,Mn=null;function Xo(t){var a=Ys(t);if(a&&(t=a.stateNode)){var i=t[Dn]||null;e:switch(t=a.stateNode,a.type){case"input":if(Fo(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),a=i.name,i.type==="radio"&&a!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+In(""+a)+'"][type="radio"]'),a=0;a<i.length;a++){var c=i[a];if(c!==t&&c.form===t.form){var p=c[Dn]||null;if(!p)throw Error(r(90));Fo(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<i.length;a++)c=i[a],c.form===t.form&&Ya(c)}break e;case"textarea":na(t,i.value,i.defaultValue);break e;case"select":a=i.value,a!=null&&Kn(t,!!i.multiple,a,!1)}}}var xl=!1;function wl(t,a,i){if(xl)return t(a,i);xl=!0;try{var c=t(a);return c}finally{if(xl=!1,(bs!==null||Mn!==null)&&(Hu(),bs&&(a=bs,t=Mn,Mn=bs=null,Xo(a),t)))for(a=0;a<t.length;a++)Xo(t[a])}}function Zi(t,a){var i=t.stateNode;if(i===null)return null;var c=i[Dn]||null;if(c===null)return null;i=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(i&&typeof i!="function")throw Error(r(231,a,typeof i));return i}var va=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sl=!1;if(va)try{var Yi={};Object.defineProperty(Yi,"passive",{get:function(){Sl=!0}}),window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{Sl=!1}var Ja=null,H=null,Ye=null;function vs(){if(Ye)return Ye;var t,a=H,i=a.length,c,p="value"in Ja?Ja.value:Ja.textContent,g=p.length;for(t=0;t<i&&a[t]===p[t];t++);var w=i-t;for(c=1;c<=w&&a[i-c]===p[g-c];c++);return Ye=p.slice(t,1<c?1-c:void 0)}function ti(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 Ma(){return!0}function kl(){return!1}function An(t){function a(i,c,p,g,w){this._reactName=i,this._targetInst=p,this.type=c,this.nativeEvent=g,this.target=w,this.currentTarget=null;for(var A in t)t.hasOwnProperty(A)&&(i=t[A],this[A]=i?i(g):g[A]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Ma:kl,this.isPropagationStopped=kl,this}return k(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Ma)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Ma)},persist:function(){},isPersistent:Ma}),a}var xs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wa=An(xs),jl=k({},xs,{view:0,detail:0}),g4=An(jl),dp,mp,Al,uu=k({},jl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hp,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!==Al&&(Al&&t.type==="mousemove"?(dp=t.screenX-Al.screenX,mp=t.screenY-Al.screenY):mp=dp=0,Al=t),dp)},movementY:function(t){return"movementY"in t?t.movementY:mp}}),J1=An(uu),y4=k({},uu,{dataTransfer:0}),b4=An(y4),v4=k({},jl,{relatedTarget:0}),pp=An(v4),x4=k({},xs,{animationName:0,elapsedTime:0,pseudoElement:0}),w4=An(x4),S4=k({},xs,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),k4=An(S4),j4=k({},xs,{data:0}),W1=An(j4),A4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},N4={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"},C4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _4(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=C4[t])?!!a[t]:!1}function hp(){return _4}var T4=k({},jl,{key:function(t){if(t.key){var a=A4[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=ti(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?N4[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hp,charCode:function(t){return t.type==="keypress"?ti(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ti(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),E4=An(T4),R4=k({},uu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ey=An(R4),D4=k({},jl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hp}),z4=An(D4),I4=k({},xs,{propertyName:0,elapsedTime:0,pseudoElement:0}),O4=An(I4),P4=k({},uu,{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}),q4=An(P4),M4=k({},xs,{newState:0,oldState:0}),B4=An(M4),L4=[9,13,27,32],fp=va&&"CompositionEvent"in window,Nl=null;va&&"documentMode"in document&&(Nl=document.documentMode);var U4=va&&"TextEvent"in window&&!Nl,ty=va&&(!fp||Nl&&8<Nl&&11>=Nl),ny=" ",ay=!1;function sy(t,a){switch(t){case"keyup":return L4.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function iy(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Jo=!1;function V4(t,a){switch(t){case"compositionend":return iy(a);case"keypress":return a.which!==32?null:(ay=!0,ny);case"textInput":return t=a.data,t===ny&&ay?null:t;default:return null}}function $4(t,a){if(Jo)return t==="compositionend"||!fp&&sy(t,a)?(t=vs(),Ye=H=Ja=null,Jo=!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 ty&&a.locale!=="ko"?null:a.data;default:return null}}var K4={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 oy(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!K4[t.type]:a==="textarea"}function ry(t,a,i,c){bs?Mn?Mn.push(c):Mn=[c]:bs=c,a=Wu(a,"onChange"),0<a.length&&(i=new Wa("onChange","change",null,i,c),t.push({event:i,listeners:a}))}var Cl=null,_l=null;function G4(t){$v(t,0)}function du(t){var a=Xs(t);if(Ya(a))return t}function ly(t,a){if(t==="change")return a}var cy=!1;if(va){var gp;if(va){var yp="oninput"in document;if(!yp){var uy=document.createElement("div");uy.setAttribute("oninput","return;"),yp=typeof uy.oninput=="function"}gp=yp}else gp=!1;cy=gp&&(!document.documentMode||9<document.documentMode)}function dy(){Cl&&(Cl.detachEvent("onpropertychange",my),_l=Cl=null)}function my(t){if(t.propertyName==="value"&&du(_l)){var a=[];ry(a,_l,t,vl(t)),wl(G4,a)}}function H4(t,a,i){t==="focusin"?(dy(),Cl=a,_l=i,Cl.attachEvent("onpropertychange",my)):t==="focusout"&&dy()}function F4(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return du(_l)}function Q4(t,a){if(t==="click")return du(a)}function Z4(t,a){if(t==="input"||t==="change")return du(a)}function Y4(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var aa=typeof Object.is=="function"?Object.is:Y4;function Tl(t,a){if(aa(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var i=Object.keys(t),c=Object.keys(a);if(i.length!==c.length)return!1;for(c=0;c<i.length;c++){var p=i[c];if(!Ve.call(a,p)||!aa(t[p],a[p]))return!1}return!0}function py(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function hy(t,a){var i=py(t);t=0;for(var c;i;){if(i.nodeType===3){if(c=t+i.textContent.length,t<=a&&c>=a)return{node:i,offset:a-t};t=c}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=py(i)}}function fy(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?fy(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function gy(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=ei(t.document);a instanceof t.HTMLIFrameElement;){try{var i=typeof a.contentWindow.location.href=="string"}catch{i=!1}if(i)t=a.contentWindow;else break;a=ei(t.document)}return a}function bp(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 X4=va&&"documentMode"in document&&11>=document.documentMode,Wo=null,vp=null,El=null,xp=!1;function yy(t,a,i){var c=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;xp||Wo==null||Wo!==ei(c)||(c=Wo,"selectionStart"in c&&bp(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}),El&&Tl(El,c)||(El=c,c=Wu(vp,"onSelect"),0<c.length&&(a=new Wa("onSelect","select",null,a,i),t.push({event:a,listeners:c}),a.target=Wo)))}function Xi(t,a){var i={};return i[t.toLowerCase()]=a.toLowerCase(),i["Webkit"+t]="webkit"+a,i["Moz"+t]="moz"+a,i}var er={animationend:Xi("Animation","AnimationEnd"),animationiteration:Xi("Animation","AnimationIteration"),animationstart:Xi("Animation","AnimationStart"),transitionrun:Xi("Transition","TransitionRun"),transitionstart:Xi("Transition","TransitionStart"),transitioncancel:Xi("Transition","TransitionCancel"),transitionend:Xi("Transition","TransitionEnd")},wp={},by={};va&&(by=document.createElement("div").style,"AnimationEvent"in window||(delete er.animationend.animation,delete er.animationiteration.animation,delete er.animationstart.animation),"TransitionEvent"in window||delete er.transitionend.transition);function Ji(t){if(wp[t])return wp[t];if(!er[t])return t;var a=er[t],i;for(i in a)if(a.hasOwnProperty(i)&&i in by)return wp[t]=a[i];return t}var vy=Ji("animationend"),xy=Ji("animationiteration"),wy=Ji("animationstart"),J4=Ji("transitionrun"),W4=Ji("transitionstart"),e5=Ji("transitioncancel"),Sy=Ji("transitionend"),ky=new Map,Sp="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(" ");Sp.push("scrollEnd");function Ba(t,a){ky.set(t,a),Qa(a,[t])}var mu=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=[],tr=0,kp=0;function pu(){for(var t=tr,a=kp=tr=0;a<t;){var i=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&&jy(i,p,g)}}function hu(t,a,i,c){xa[tr++]=t,xa[tr++]=a,xa[tr++]=i,xa[tr++]=c,kp|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function jp(t,a,i,c){return hu(t,a,i,c),fu(t)}function Wi(t,a){return hu(t,null,null,a),fu(t)}function jy(t,a,i){t.lanes|=i;var c=t.alternate;c!==null&&(c.lanes|=i);for(var p=!1,g=t.return;g!==null;)g.childLanes|=i,c=g.alternate,c!==null&&(c.childLanes|=i),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-Zt(i),t=g.hiddenUpdates,c=t[p],c===null?t[p]=[a]:c.push(a),a.lane=i|536870912),g):null}function fu(t){if(50<Jl)throw Jl=0,zh=null,Error(r(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var nr={};function t5(t,a,i,c){this.tag=t,this.key=i,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 sa(t,a,i,c){return new t5(t,a,i,c)}function Ap(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ws(t,a){var i=t.alternate;return i===null?(i=sa(t.tag,a,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=a,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&65011712,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,a=t.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function Ay(t,a){t.flags&=65011714;var i=t.alternate;return i===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=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,a=i.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function gu(t,a,i,c,p,g){var w=0;if(c=t,typeof t=="function")Ap(t)&&(w=1);else if(typeof t=="string")w=o_(t,i,pe.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case X:return t=sa(31,i,a,p),t.elementType=X,t.lanes=g,t;case q:return eo(i.children,p,g,a);case E:w=8,p|=24;break;case P:return t=sa(12,i,a,p|2),t.elementType=P,t.lanes=g,t;case Q:return t=sa(13,i,a,p),t.elementType=Q,t.lanes=g,t;case ae:return t=sa(19,i,a,p),t.elementType=ae,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case L:w=10;break e;case M:w=9;break e;case $:w=11;break e;case V:w=14;break e;case Z:w=16,c=null;break e}w=29,i=Error(r(130,t===null?"null":typeof t,"")),c=null}return a=sa(w,i,a,p),a.elementType=t,a.type=c,a.lanes=g,a}function eo(t,a,i,c){return t=sa(7,t,c,a),t.lanes=i,t}function Np(t,a,i){return t=sa(6,t,null,a),t.lanes=i,t}function Ny(t){var a=sa(18,null,null,0);return a.stateNode=t,a}function Cp(t,a,i){return a=sa(4,t.children!==null?t.children:[],t.key,a),a.lanes=i,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var Cy=new WeakMap;function wa(t,a){if(typeof t=="object"&&t!==null){var i=Cy.get(t);return i!==void 0?i:(a={value:t,source:a,stack:Ht(a)},Cy.set(t,a),a)}return{value:t,source:a,stack:Ht(a)}}var ar=[],sr=0,yu=null,Rl=0,Sa=[],ka=0,ni=null,es=1,ts="";function Ss(t,a){ar[sr++]=Rl,ar[sr++]=yu,yu=t,Rl=a}function _y(t,a,i){Sa[ka++]=es,Sa[ka++]=ts,Sa[ka++]=ni,ni=t;var c=es;t=ts;var p=32-Zt(c)-1;c&=~(1<<p),i+=1;var g=32-Zt(a)+p;if(30<g){var w=p-p%5;g=(c&(1<<w)-1).toString(32),c>>=w,p-=w,es=1<<32-Zt(a)+p|i<<p|c,ts=g+t}else es=1<<g|i<<p|c,ts=t}function _p(t){t.return!==null&&(Ss(t,1),_y(t,1,0))}function Tp(t){for(;t===yu;)yu=ar[--sr],ar[sr]=null,Rl=ar[--sr],ar[sr]=null;for(;t===ni;)ni=Sa[--ka],Sa[ka]=null,ts=Sa[--ka],Sa[ka]=null,es=Sa[--ka],Sa[ka]=null}function Ty(t,a){Sa[ka++]=es,Sa[ka++]=ts,Sa[ka++]=ni,es=a.id,ts=a.overflow,ni=t}var Nn=null,qt=null,ht=!1,ai=null,ja=!1,Ep=Error(r(519));function si(t){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Dl(wa(a,t)),Ep}function Ey(t){var a=t.stateNode,i=t.type,c=t.memoizedProps;switch(a[on]=t,a[Dn]=c,i){case"dialog":lt("cancel",a),lt("close",a);break;case"iframe":case"object":case"embed":lt("load",a);break;case"video":case"audio":for(i=0;i<ec.length;i++)lt(ec[i],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),yl(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),ys(a,c.value,c.defaultValue,c.children)}i=c.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||a.textContent===""+i||c.suppressHydrationWarning===!0||Fv(a.textContent,i)?(c.popover!=null&&(lt("beforetoggle",a),lt("toggle",a)),c.onScroll!=null&&lt("scroll",a),c.onScrollEnd!=null&&lt("scrollend",a),c.onClick!=null&&(a.onclick=qa),a=!0):a=!1,a||si(t,!0)}function Ry(t){for(Nn=t.return;Nn;)switch(Nn.tag){case 5:case 31:case 13:ja=!1;return;case 27:case 3:ja=!0;return;default:Nn=Nn.return}}function ir(t){if(t!==Nn)return!1;if(!ht)return Ry(t),ht=!0,!1;var a=t.tag,i;if((i=a!==3&&a!==27)&&((i=a===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||Qh(t.type,t.memoizedProps)),i=!i),i&&qt&&si(t),Ry(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));qt=nx(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));qt=nx(t)}else a===27?(a=qt,bi(t.type)?(t=Wh,Wh=null,qt=t):qt=a):qt=Nn?Na(t.stateNode.nextSibling):null;return!0}function to(){qt=Nn=null,ht=!1}function Rp(){var t=ai;return t!==null&&(Qn===null?Qn=t:Qn.push.apply(Qn,t),ai=null),t}function Dl(t){ai===null?ai=[t]:ai.push(t)}var Dp=Se(null),no=null,ks=null;function ii(t,a,i){xe(Dp,a._currentValue),a._currentValue=i}function js(t){t._currentValue=Dp.current,Me(Dp)}function zp(t,a,i){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===i)break;t=t.return}}function Ip(t,a,i,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|=i,A=g.alternate,A!==null&&(A.lanes|=i),zp(g.return,i,t),c||(w=null);break e}g=A.next}}else if(p.tag===18){if(w=p.return,w===null)throw Error(r(341));w.lanes|=i,g=w.alternate,g!==null&&(g.lanes|=i),zp(w,i,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 or(t,a,i,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(r(387));if(w=w.memoizedProps,w!==null){var A=p.type;aa(p.pendingProps.value,w.value)||(t!==null?t.push(A):t=[A])}}else if(p===_e.current){if(w=p.alternate,w===null)throw Error(r(387));w.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(t!==null?t.push(ic):t=[ic])}p=p.return}t!==null&&Ip(a,t,i,c),a.flags|=262144}function bu(t){for(t=t.firstContext;t!==null;){if(!aa(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ao(t){no=t,ks=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Cn(t){return Dy(no,t)}function vu(t,a){return no===null&&ao(t),Dy(t,a)}function Dy(t,a){var i=a._currentValue;if(a={context:a,memoizedValue:i,next:null},ks===null){if(t===null)throw Error(r(308));ks=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else ks=ks.next=a;return i}var n5=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(i,c){t.push(c)}};this.abort=function(){a.aborted=!0,t.forEach(function(i){return i()})}},a5=e.unstable_scheduleCallback,s5=e.unstable_NormalPriority,rn={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Op(){return{controller:new n5,data:new Map,refCount:0}}function zl(t){t.refCount--,t.refCount===0&&a5(s5,function(){t.controller.abort()})}var Il=null,Pp=0,rr=0,lr=null;function i5(t,a){if(Il===null){var i=Il=[];Pp=0,rr=Bh(),lr={status:"pending",value:void 0,then:function(c){i.push(c)}}}return Pp++,a.then(zy,zy),a}function zy(){if(--Pp===0&&Il!==null){lr!==null&&(lr.status="fulfilled");var t=Il;Il=null,rr=0,lr=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function o5(t,a){var i=[],c={status:"pending",value:null,reason:null,then:function(p){i.push(p)}};return t.then(function(){c.status="fulfilled",c.value=a;for(var p=0;p<i.length;p++)(0,i[p])(a)},function(p){for(c.status="rejected",c.reason=p,p=0;p<i.length;p++)(0,i[p])(void 0)}),c}var Iy=B.S;B.S=function(t,a){yv=Vt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&i5(t,a),Iy!==null&&Iy(t,a)};var so=Se(null);function qp(){var t=so.current;return t!==null?t:It.pooledCache}function xu(t,a){a===null?xe(so,so.current):xe(so,a.pool)}function Oy(){var t=qp();return t===null?null:{parent:rn._currentValue,pool:t}}var cr=Error(r(460)),Mp=Error(r(474)),wu=Error(r(542)),Su={then:function(){}};function Py(t){return t=t.status,t==="fulfilled"||t==="rejected"}function qy(t,a,i){switch(i=t[i],i===void 0?t.push(a):i!==a&&(a.then(qa,qa),a=i),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,By(t),t;default:if(typeof a.status=="string")a.then(qa,qa);else{if(t=It,t!==null&&100<t.shellSuspendCounter)throw Error(r(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,By(t),t}throw oo=a,cr}}function io(t){try{var a=t._init;return a(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(oo=i,cr):i}}var oo=null;function My(){if(oo===null)throw Error(r(459));var t=oo;return oo=null,t}function By(t){if(t===cr||t===wu)throw Error(r(483))}var ur=null,Ol=0;function ku(t){var a=Ol;return Ol+=1,ur===null&&(ur=[]),qy(ur,t,a)}function Pl(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function ju(t,a){throw a.$$typeof===N?Error(r(525)):(t=Object.prototype.toString.call(a),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function Ly(t){function a(U,O){if(t){var K=U.deletions;K===null?(U.deletions=[O],U.flags|=16):K.push(O)}}function i(U,O){if(!t)return null;for(;O!==null;)a(U,O),O=O.sibling;return null}function c(U){for(var O=new Map;U!==null;)U.key!==null?O.set(U.key,U):O.set(U.index,U),U=U.sibling;return O}function p(U,O){return U=ws(U,O),U.index=0,U.sibling=null,U}function g(U,O,K){return U.index=K,t?(K=U.alternate,K!==null?(K=K.index,K<O?(U.flags|=67108866,O):K):(U.flags|=67108866,O)):(U.flags|=1048576,O)}function w(U){return t&&U.alternate===null&&(U.flags|=67108866),U}function A(U,O,K,ne){return O===null||O.tag!==6?(O=Np(K,U.mode,ne),O.return=U,O):(O=p(O,K),O.return=U,O)}function D(U,O,K,ne){var Ge=K.type;return Ge===q?ee(U,O,K.props.children,ne,K.key):O!==null&&(O.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===Z&&io(Ge)===O.type)?(O=p(O,K.props),Pl(O,K),O.return=U,O):(O=gu(K.type,K.key,K.props,null,U.mode,ne),Pl(O,K),O.return=U,O)}function G(U,O,K,ne){return O===null||O.tag!==4||O.stateNode.containerInfo!==K.containerInfo||O.stateNode.implementation!==K.implementation?(O=Cp(K,U.mode,ne),O.return=U,O):(O=p(O,K.children||[]),O.return=U,O)}function ee(U,O,K,ne,Ge){return O===null||O.tag!==7?(O=eo(K,U.mode,ne,Ge),O.return=U,O):(O=p(O,K),O.return=U,O)}function se(U,O,K){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Np(""+O,U.mode,K),O.return=U,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case T:return K=gu(O.type,O.key,O.props,null,U.mode,K),Pl(K,O),K.return=U,K;case z:return O=Cp(O,U.mode,K),O.return=U,O;case Z:return O=io(O),se(U,O,K)}if(Le(O)||Ke(O))return O=eo(O,U.mode,K,null),O.return=U,O;if(typeof O.then=="function")return se(U,ku(O),K);if(O.$$typeof===L)return se(U,vu(U,O),K);ju(U,O)}return null}function F(U,O,K,ne){var Ge=O!==null?O.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return Ge!==null?null:A(U,O,""+K,ne);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case T:return K.key===Ge?D(U,O,K,ne):null;case z:return K.key===Ge?G(U,O,K,ne):null;case Z:return K=io(K),F(U,O,K,ne)}if(Le(K)||Ke(K))return Ge!==null?null:ee(U,O,K,ne,null);if(typeof K.then=="function")return F(U,O,ku(K),ne);if(K.$$typeof===L)return F(U,O,vu(U,K),ne);ju(U,K)}return null}function Y(U,O,K,ne,Ge){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return U=U.get(K)||null,A(O,U,""+ne,Ge);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case T:return U=U.get(ne.key===null?K:ne.key)||null,D(O,U,ne,Ge);case z:return U=U.get(ne.key===null?K:ne.key)||null,G(O,U,ne,Ge);case Z:return ne=io(ne),Y(U,O,K,ne,Ge)}if(Le(ne)||Ke(ne))return U=U.get(K)||null,ee(O,U,ne,Ge,null);if(typeof ne.then=="function")return Y(U,O,K,ku(ne),Ge);if(ne.$$typeof===L)return Y(U,O,K,vu(O,ne),Ge);ju(O,ne)}return null}function Te(U,O,K,ne){for(var Ge=null,vt=null,Ie=O,st=O=0,dt=null;Ie!==null&&st<K.length;st++){Ie.index>st?(dt=Ie,Ie=null):dt=Ie.sibling;var xt=F(U,Ie,K[st],ne);if(xt===null){Ie===null&&(Ie=dt);break}t&&Ie&&xt.alternate===null&&a(U,Ie),O=g(xt,O,st),vt===null?Ge=xt:vt.sibling=xt,vt=xt,Ie=dt}if(st===K.length)return i(U,Ie),ht&&Ss(U,st),Ge;if(Ie===null){for(;st<K.length;st++)Ie=se(U,K[st],ne),Ie!==null&&(O=g(Ie,O,st),vt===null?Ge=Ie:vt.sibling=Ie,vt=Ie);return ht&&Ss(U,st),Ge}for(Ie=c(Ie);st<K.length;st++)dt=Y(Ie,U,st,K[st],ne),dt!==null&&(t&&dt.alternate!==null&&Ie.delete(dt.key===null?st:dt.key),O=g(dt,O,st),vt===null?Ge=dt:vt.sibling=dt,vt=dt);return t&&Ie.forEach(function(ki){return a(U,ki)}),ht&&Ss(U,st),Ge}function Fe(U,O,K,ne){if(K==null)throw Error(r(151));for(var Ge=null,vt=null,Ie=O,st=O=0,dt=null,xt=K.next();Ie!==null&&!xt.done;st++,xt=K.next()){Ie.index>st?(dt=Ie,Ie=null):dt=Ie.sibling;var ki=F(U,Ie,xt.value,ne);if(ki===null){Ie===null&&(Ie=dt);break}t&&Ie&&ki.alternate===null&&a(U,Ie),O=g(ki,O,st),vt===null?Ge=ki:vt.sibling=ki,vt=ki,Ie=dt}if(xt.done)return i(U,Ie),ht&&Ss(U,st),Ge;if(Ie===null){for(;!xt.done;st++,xt=K.next())xt=se(U,xt.value,ne),xt!==null&&(O=g(xt,O,st),vt===null?Ge=xt:vt.sibling=xt,vt=xt);return ht&&Ss(U,st),Ge}for(Ie=c(Ie);!xt.done;st++,xt=K.next())xt=Y(Ie,U,st,xt.value,ne),xt!==null&&(t&&xt.alternate!==null&&Ie.delete(xt.key===null?st:xt.key),O=g(xt,O,st),vt===null?Ge=xt:vt.sibling=xt,vt=xt);return t&&Ie.forEach(function(y_){return a(U,y_)}),ht&&Ss(U,st),Ge}function zt(U,O,K,ne){if(typeof K=="object"&&K!==null&&K.type===q&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case T:e:{for(var Ge=K.key;O!==null;){if(O.key===Ge){if(Ge=K.type,Ge===q){if(O.tag===7){i(U,O.sibling),ne=p(O,K.props.children),ne.return=U,U=ne;break e}}else if(O.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===Z&&io(Ge)===O.type){i(U,O.sibling),ne=p(O,K.props),Pl(ne,K),ne.return=U,U=ne;break e}i(U,O);break}else a(U,O);O=O.sibling}K.type===q?(ne=eo(K.props.children,U.mode,ne,K.key),ne.return=U,U=ne):(ne=gu(K.type,K.key,K.props,null,U.mode,ne),Pl(ne,K),ne.return=U,U=ne)}return w(U);case z:e:{for(Ge=K.key;O!==null;){if(O.key===Ge)if(O.tag===4&&O.stateNode.containerInfo===K.containerInfo&&O.stateNode.implementation===K.implementation){i(U,O.sibling),ne=p(O,K.children||[]),ne.return=U,U=ne;break e}else{i(U,O);break}else a(U,O);O=O.sibling}ne=Cp(K,U.mode,ne),ne.return=U,U=ne}return w(U);case Z:return K=io(K),zt(U,O,K,ne)}if(Le(K))return Te(U,O,K,ne);if(Ke(K)){if(Ge=Ke(K),typeof Ge!="function")throw Error(r(150));return K=Ge.call(K),Fe(U,O,K,ne)}if(typeof K.then=="function")return zt(U,O,ku(K),ne);if(K.$$typeof===L)return zt(U,O,vu(U,K),ne);ju(U,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,O!==null&&O.tag===6?(i(U,O.sibling),ne=p(O,K),ne.return=U,U=ne):(i(U,O),ne=Np(K,U.mode,ne),ne.return=U,U=ne),w(U)):i(U,O)}return function(U,O,K,ne){try{Ol=0;var Ge=zt(U,O,K,ne);return ur=null,Ge}catch(Ie){if(Ie===cr||Ie===wu)throw Ie;var vt=sa(29,Ie,null,U.mode);return vt.lanes=ne,vt.return=U,vt}}}var ro=Ly(!0),Uy=Ly(!1),oi=!1;function Bp(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lp(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 ri(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function li(t,a,i){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var p=c.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),c.pending=a,a=fu(t),jy(t,null,i),a}return hu(t,c,a,i),fu(t)}function ql(t,a,i){if(a=a.updateQueue,a!==null&&(a=a.shared,(i&4194048)!==0)){var c=a.lanes;c&=t.pendingLanes,i|=c,a.lanes=i,rl(t,i)}}function Up(t,a){var i=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,i===c)){var p=null,g=null;if(i=i.firstBaseUpdate,i!==null){do{var w={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};g===null?p=g=w:g=g.next=w,i=i.next}while(i!==null);g===null?p=g=a:g=g.next=a}else p=g=a;i={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=a:t.next=a,i.lastBaseUpdate=a}var Vp=!1;function Ml(){if(Vp){var t=lr;if(t!==null)throw t}}function Bl(t,a,i,c){Vp=!1;var p=t.updateQueue;oi=!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 ee=t.alternate;ee!==null&&(ee=ee.updateQueue,A=ee.lastBaseUpdate,A!==w&&(A===null?ee.firstBaseUpdate=G:A.next=G,ee.lastBaseUpdate=D))}if(g!==null){var se=p.baseState;w=0,ee=G=D=null,A=g;do{var F=A.lane&-536870913,Y=F!==A.lane;if(Y?(ut&F)===F:(c&F)===F){F!==0&&F===rr&&(Vp=!0),ee!==null&&(ee=ee.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var Te=t,Fe=A;F=a;var zt=i;switch(Fe.tag){case 1:if(Te=Fe.payload,typeof Te=="function"){se=Te.call(zt,se,F);break e}se=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=Fe.payload,F=typeof Te=="function"?Te.call(zt,se,F):Te,F==null)break e;se=k({},se,F);break e;case 2:oi=!0}}F=A.callback,F!==null&&(t.flags|=64,Y&&(t.flags|=8192),Y=p.callbacks,Y===null?p.callbacks=[F]:Y.push(F))}else Y={lane:F,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ee===null?(G=ee=Y,D=se):ee=ee.next=Y,w|=F;if(A=A.next,A===null){if(A=p.shared.pending,A===null)break;Y=A,A=Y.next,Y.next=null,p.lastBaseUpdate=Y,p.shared.pending=null}}while(!0);ee===null&&(D=se),p.baseState=D,p.firstBaseUpdate=G,p.lastBaseUpdate=ee,g===null&&(p.shared.lanes=0),pi|=w,t.lanes=w,t.memoizedState=se}}function Vy(t,a){if(typeof t!="function")throw Error(r(191,t));t.call(a)}function $y(t,a){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)Vy(i[t],a)}var dr=Se(null),Au=Se(0);function Ky(t,a){t=zs,xe(Au,t),xe(dr,a),zs=t|a.baseLanes}function $p(){xe(Au,zs),xe(dr,dr.current)}function Kp(){zs=Au.current,Me(dr),Me(Au)}var ia=Se(null),Aa=null;function ci(t){var a=t.alternate;xe(tn,tn.current&1),xe(ia,t),Aa===null&&(a===null||dr.current!==null||a.memoizedState!==null)&&(Aa=t)}function Gp(t){xe(tn,tn.current),xe(ia,t),Aa===null&&(Aa=t)}function Gy(t){t.tag===22?(xe(tn,tn.current),xe(ia,t),Aa===null&&(Aa=t)):ui()}function ui(){xe(tn,tn.current),xe(ia,ia.current)}function oa(t){Me(ia),Aa===t&&(Aa=null),Me(tn)}var tn=Se(0);function Nu(t){for(var a=t;a!==null;){if(a.tag===13){var i=a.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Xh(i)||Jh(i)))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 As=0,nt=null,Rt=null,ln=null,Cu=!1,mr=!1,lo=!1,_u=0,Ll=0,pr=null,r5=0;function Jt(){throw Error(r(321))}function Hp(t,a){if(a===null)return!1;for(var i=0;i<a.length&&i<t.length;i++)if(!aa(t[i],a[i]))return!1;return!0}function Fp(t,a,i,c,p,g){return As=g,nt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,B.H=t===null||t.memoizedState===null?_b:lh,lo=!1,g=i(c,p),lo=!1,mr&&(g=Fy(a,i,c,p)),Hy(t),g}function Hy(t){B.H=$l;var a=Rt!==null&&Rt.next!==null;if(As=0,ln=Rt=nt=null,Cu=!1,Ll=0,pr=null,a)throw Error(r(300));t===null||cn||(t=t.dependencies,t!==null&&bu(t)&&(cn=!0))}function Fy(t,a,i,c){nt=t;var p=0;do{if(mr&&(pr=null),Ll=0,mr=!1,25<=p)throw Error(r(301));if(p+=1,ln=Rt=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}B.H=Tb,g=a(i,c)}while(mr);return g}function l5(){var t=B.H,a=t.useState()[0];return a=typeof a.then=="function"?Ul(a):a,t=t.useState()[0],(Rt!==null?Rt.memoizedState:null)!==t&&(nt.flags|=1024),a}function Qp(){var t=_u!==0;return _u=0,t}function Zp(t,a,i){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~i}function Yp(t){if(Cu){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Cu=!1}As=0,ln=Rt=nt=null,mr=!1,Ll=_u=0,pr=null}function Bn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ln===null?nt.memoizedState=ln=t:ln=ln.next=t,ln}function nn(){if(Rt===null){var t=nt.alternate;t=t!==null?t.memoizedState:null}else t=Rt.next;var a=ln===null?nt.memoizedState:ln.next;if(a!==null)ln=a,Rt=t;else{if(t===null)throw nt.alternate===null?Error(r(467)):Error(r(310));Rt=t,t={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},ln===null?nt.memoizedState=ln=t:ln=ln.next=t}return ln}function Tu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ul(t){var a=Ll;return Ll+=1,pr===null&&(pr=[]),t=qy(pr,t,a),a=nt,(ln===null?a.memoizedState:ln.next)===null&&(a=a.alternate,B.H=a===null||a.memoizedState===null?_b:lh),t}function Eu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ul(t);if(t.$$typeof===L)return Cn(t)}throw Error(r(438,String(t)))}function Xp(t){var a=null,i=nt.updateQueue;if(i!==null&&(a=i.memoCache),a==null){var c=nt.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}),i===null&&(i=Tu(),nt.updateQueue=i),i.memoCache=a,i=a.data[a.index],i===void 0)for(i=a.data[a.index]=Array(t),c=0;c<t;c++)i[c]=Ce;return a.index++,i}function Ns(t,a){return typeof a=="function"?a(t):a}function Ru(t){var a=nn();return Jp(a,Rt,t)}function Jp(t,a,i){var c=t.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;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,ee=!1;do{var se=G.lane&-536870913;if(se!==G.lane?(ut&se)===se:(As&se)===se){var F=G.revertLane;if(F===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),se===rr&&(ee=!0);else if((As&F)===F){G=G.next,F===rr&&(ee=!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,nt.lanes|=F,pi|=F;se=G.action,lo&&i(g,se),g=G.hasEagerState?G.eagerState:i(g,se)}else F={lane:se,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},D===null?(A=D=F,w=g):D=D.next=F,nt.lanes|=se,pi|=se;G=G.next}while(G!==null&&G!==a);if(D===null?w=g:D.next=A,!aa(g,t.memoizedState)&&(cn=!0,ee&&(i=lr,i!==null)))throw i;t.memoizedState=g,t.baseState=w,t.baseQueue=D,c.lastRenderedState=g}return p===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Wp(t){var a=nn(),i=a.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=t;var c=i.dispatch,p=i.pending,g=a.memoizedState;if(p!==null){i.pending=null;var w=p=p.next;do g=t(g,w.action),w=w.next;while(w!==p);aa(g,a.memoizedState)||(cn=!0),a.memoizedState=g,a.baseQueue===null&&(a.baseState=g),i.lastRenderedState=g}return[g,c]}function Qy(t,a,i){var c=nt,p=nn(),g=ht;if(g){if(i===void 0)throw Error(r(407));i=i()}else i=a();var w=!aa((Rt||p).memoizedState,i);if(w&&(p.memoizedState=i,cn=!0),p=p.queue,nh(Xy.bind(null,c,p,t),[t]),p.getSnapshot!==a||w||ln!==null&&ln.memoizedState.tag&1){if(c.flags|=2048,hr(9,{destroy:void 0},Yy.bind(null,c,p,i,a),null),It===null)throw Error(r(349));g||(As&127)!==0||Zy(c,a,i)}return i}function Zy(t,a,i){t.flags|=16384,t={getSnapshot:a,value:i},a=nt.updateQueue,a===null?(a=Tu(),nt.updateQueue=a,a.stores=[t]):(i=a.stores,i===null?a.stores=[t]:i.push(t))}function Yy(t,a,i,c){a.value=i,a.getSnapshot=c,Jy(a)&&Wy(t)}function Xy(t,a,i){return i(function(){Jy(a)&&Wy(t)})}function Jy(t){var a=t.getSnapshot;t=t.value;try{var i=a();return!aa(t,i)}catch{return!0}}function Wy(t){var a=Wi(t,2);a!==null&&Zn(a,t,2)}function eh(t){var a=Bn();if(typeof t=="function"){var i=t;if(t=i(),lo){$n(!0);try{i()}finally{$n(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ns,lastRenderedState:t},a}function eb(t,a,i,c){return t.baseState=i,Jp(t,Rt,typeof c=="function"?c:Ns)}function c5(t,a,i,c,p){if(Iu(t))throw Error(r(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)}};B.T!==null?i(!0):g.isTransition=!1,c(g),i=a.pending,i===null?(g.next=a.pending=g,tb(a,g)):(g.next=i.next,a.pending=i.next=g)}}function tb(t,a){var i=a.action,c=a.payload,p=t.state;if(a.isTransition){var g=B.T,w={};B.T=w;try{var A=i(p,c),D=B.S;D!==null&&D(w,A),nb(t,a,A)}catch(G){th(t,a,G)}finally{g!==null&&w.types!==null&&(g.types=w.types),B.T=g}}else try{g=i(p,c),nb(t,a,g)}catch(G){th(t,a,G)}}function nb(t,a,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(c){ab(t,a,c)},function(c){return th(t,a,c)}):ab(t,a,i)}function ab(t,a,i){a.status="fulfilled",a.value=i,sb(a),t.state=i,a=t.pending,a!==null&&(i=a.next,i===a?t.pending=null:(i=i.next,a.next=i,tb(t,i)))}function th(t,a,i){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=i,sb(a),a=a.next;while(a!==c)}t.action=null}function sb(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function ib(t,a){return a}function ob(t,a){if(ht){var i=It.formState;if(i!==null){e:{var c=nt;if(ht){if(qt){t:{for(var p=qt,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){qt=Na(p.nextSibling),c=p.data==="F!";break e}}si(c)}c=!1}c&&(a=i[0])}}return i=Bn(),i.memoizedState=i.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ib,lastRenderedState:a},i.queue=c,i=Ab.bind(null,nt,c),c.dispatch=i,c=eh(!1),g=rh.bind(null,nt,!1,c.queue),c=Bn(),p={state:a,dispatch:null,action:t,pending:null},c.queue=p,i=c5.bind(null,nt,p,g,i),p.dispatch=i,c.memoizedState=t,[a,i,!1]}function rb(t){var a=nn();return lb(a,Rt,t)}function lb(t,a,i){if(a=Jp(t,a,ib)[0],t=Ru(Ns)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=Ul(a)}catch(w){throw w===cr?wu:w}else c=a;a=nn();var p=a.queue,g=p.dispatch;return i!==a.memoizedState&&(nt.flags|=2048,hr(9,{destroy:void 0},u5.bind(null,p,i),null)),[c,g,t]}function u5(t,a){t.action=a}function cb(t){var a=nn(),i=Rt;if(i!==null)return lb(a,i,t);nn(),a=a.memoizedState,i=nn();var c=i.queue.dispatch;return i.memoizedState=t,[a,c,!1]}function hr(t,a,i,c){return t={tag:t,create:i,deps:c,inst:a,next:null},a=nt.updateQueue,a===null&&(a=Tu(),nt.updateQueue=a),i=a.lastEffect,i===null?a.lastEffect=t.next=t:(c=i.next,i.next=t,t.next=c,a.lastEffect=t),t}function ub(){return nn().memoizedState}function Du(t,a,i,c){var p=Bn();nt.flags|=t,p.memoizedState=hr(1|a,{destroy:void 0},i,c===void 0?null:c)}function zu(t,a,i,c){var p=nn();c=c===void 0?null:c;var g=p.memoizedState.inst;Rt!==null&&c!==null&&Hp(c,Rt.memoizedState.deps)?p.memoizedState=hr(a,g,i,c):(nt.flags|=t,p.memoizedState=hr(1|a,g,i,c))}function db(t,a){Du(8390656,8,t,a)}function nh(t,a){zu(2048,8,t,a)}function d5(t){nt.flags|=4;var a=nt.updateQueue;if(a===null)a=Tu(),nt.updateQueue=a,a.events=[t];else{var i=a.events;i===null?a.events=[t]:i.push(t)}}function mb(t){var a=nn().memoizedState;return d5({ref:a,nextImpl:t}),function(){if((jt&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function pb(t,a){return zu(4,2,t,a)}function hb(t,a){return zu(4,4,t,a)}function fb(t,a){if(typeof a=="function"){t=t();var i=a(t);return function(){typeof i=="function"?i():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function gb(t,a,i){i=i!=null?i.concat([t]):null,zu(4,4,fb.bind(null,a,t),i)}function ah(){}function yb(t,a){var i=nn();a=a===void 0?null:a;var c=i.memoizedState;return a!==null&&Hp(a,c[1])?c[0]:(i.memoizedState=[t,a],t)}function bb(t,a){var i=nn();a=a===void 0?null:a;var c=i.memoizedState;if(a!==null&&Hp(a,c[1]))return c[0];if(c=t(),lo){$n(!0);try{t()}finally{$n(!1)}}return i.memoizedState=[c,a],c}function sh(t,a,i){return i===void 0||(As&1073741824)!==0&&(ut&261930)===0?t.memoizedState=a:(t.memoizedState=i,t=vv(),nt.lanes|=t,pi|=t,i)}function vb(t,a,i,c){return aa(i,a)?i:dr.current!==null?(t=sh(t,i,c),aa(t,a)||(cn=!0),t):(As&42)===0||(As&1073741824)!==0&&(ut&261930)===0?(cn=!0,t.memoizedState=i):(t=vv(),nt.lanes|=t,pi|=t,a)}function xb(t,a,i,c,p){var g=W.p;W.p=g!==0&&8>g?g:8;var w=B.T,A={};B.T=A,rh(t,!1,a,i);try{var D=p(),G=B.S;if(G!==null&&G(A,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var ee=o5(D,c);Vl(t,a,ee,ca(t))}else Vl(t,a,c,ca(t))}catch(se){Vl(t,a,{then:function(){},status:"rejected",reason:se},ca())}finally{W.p=g,w!==null&&A.types!==null&&(w.types=A.types),B.T=w}}function m5(){}function ih(t,a,i,c){if(t.tag!==5)throw Error(r(476));var p=wb(t).queue;xb(t,p,a,ve,i===null?m5:function(){return Sb(t),i(c)})}function wb(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:ve,baseState:ve,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ns,lastRenderedState:ve},next:null};var i={};return a.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ns,lastRenderedState:i},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function Sb(t){var a=wb(t);a.next===null&&(a=t.alternate.memoizedState),Vl(t,a.next.queue,{},ca())}function oh(){return Cn(ic)}function kb(){return nn().memoizedState}function jb(){return nn().memoizedState}function p5(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var i=ca();t=ri(i);var c=li(a,t,i);c!==null&&(Zn(c,a,i),ql(c,a,i)),a={cache:Op()},t.payload=a;return}a=a.return}}function h5(t,a,i){var c=ca();i={lane:c,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Iu(t)?Nb(a,i):(i=jp(t,a,i,c),i!==null&&(Zn(i,t,c),Cb(i,a,c)))}function Ab(t,a,i){var c=ca();Vl(t,a,i,c)}function Vl(t,a,i,c){var p={lane:c,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Iu(t))Nb(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,i);if(p.hasEagerState=!0,p.eagerState=A,aa(A,w))return hu(t,a,p,0),It===null&&pu(),!1}catch{}if(i=jp(t,a,p,c),i!==null)return Zn(i,t,c),Cb(i,a,c),!0}return!1}function rh(t,a,i,c){if(c={lane:2,revertLane:Bh(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Iu(t)){if(a)throw Error(r(479))}else a=jp(t,i,c,2),a!==null&&Zn(a,t,2)}function Iu(t){var a=t.alternate;return t===nt||a!==null&&a===nt}function Nb(t,a){mr=Cu=!0;var i=t.pending;i===null?a.next=a:(a.next=i.next,i.next=a),t.pending=a}function Cb(t,a,i){if((i&4194048)!==0){var c=a.lanes;c&=t.pendingLanes,i|=c,a.lanes=i,rl(t,i)}}var $l={readContext:Cn,use:Eu,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};$l.useEffectEvent=Jt;var _b={readContext:Cn,use:Eu,useCallback:function(t,a){return Bn().memoizedState=[t,a===void 0?null:a],t},useContext:Cn,useEffect:db,useImperativeHandle:function(t,a,i){i=i!=null?i.concat([t]):null,Du(4194308,4,fb.bind(null,a,t),i)},useLayoutEffect:function(t,a){return Du(4194308,4,t,a)},useInsertionEffect:function(t,a){Du(4,2,t,a)},useMemo:function(t,a){var i=Bn();a=a===void 0?null:a;var c=t();if(lo){$n(!0);try{t()}finally{$n(!1)}}return i.memoizedState=[c,a],c},useReducer:function(t,a,i){var c=Bn();if(i!==void 0){var p=i(a);if(lo){$n(!0);try{i(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=h5.bind(null,nt,t),[c.memoizedState,t]},useRef:function(t){var a=Bn();return t={current:t},a.memoizedState=t},useState:function(t){t=eh(t);var a=t.queue,i=Ab.bind(null,nt,a);return a.dispatch=i,[t.memoizedState,i]},useDebugValue:ah,useDeferredValue:function(t,a){var i=Bn();return sh(i,t,a)},useTransition:function(){var t=eh(!1);return t=xb.bind(null,nt,t.queue,!0,!1),Bn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,i){var c=nt,p=Bn();if(ht){if(i===void 0)throw Error(r(407));i=i()}else{if(i=a(),It===null)throw Error(r(349));(ut&127)!==0||Zy(c,a,i)}p.memoizedState=i;var g={value:i,getSnapshot:a};return p.queue=g,db(Xy.bind(null,c,g,t),[t]),c.flags|=2048,hr(9,{destroy:void 0},Yy.bind(null,c,g,i,a),null),i},useId:function(){var t=Bn(),a=It.identifierPrefix;if(ht){var i=ts,c=es;i=(c&~(1<<32-Zt(c)-1)).toString(32)+i,a="_"+a+"R_"+i,i=_u++,0<i&&(a+="H"+i.toString(32)),a+="_"}else i=r5++,a="_"+a+"r_"+i.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:oh,useFormState:ob,useActionState:ob,useOptimistic:function(t){var a=Bn();a.memoizedState=a.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=i,a=rh.bind(null,nt,!0,i),i.dispatch=a,[t,a]},useMemoCache:Xp,useCacheRefresh:function(){return Bn().memoizedState=p5.bind(null,nt)},useEffectEvent:function(t){var a=Bn(),i={impl:t};return a.memoizedState=i,function(){if((jt&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},lh={readContext:Cn,use:Eu,useCallback:yb,useContext:Cn,useEffect:nh,useImperativeHandle:gb,useInsertionEffect:pb,useLayoutEffect:hb,useMemo:bb,useReducer:Ru,useRef:ub,useState:function(){return Ru(Ns)},useDebugValue:ah,useDeferredValue:function(t,a){var i=nn();return vb(i,Rt.memoizedState,t,a)},useTransition:function(){var t=Ru(Ns)[0],a=nn().memoizedState;return[typeof t=="boolean"?t:Ul(t),a]},useSyncExternalStore:Qy,useId:kb,useHostTransitionStatus:oh,useFormState:rb,useActionState:rb,useOptimistic:function(t,a){var i=nn();return eb(i,Rt,t,a)},useMemoCache:Xp,useCacheRefresh:jb};lh.useEffectEvent=mb;var Tb={readContext:Cn,use:Eu,useCallback:yb,useContext:Cn,useEffect:nh,useImperativeHandle:gb,useInsertionEffect:pb,useLayoutEffect:hb,useMemo:bb,useReducer:Wp,useRef:ub,useState:function(){return Wp(Ns)},useDebugValue:ah,useDeferredValue:function(t,a){var i=nn();return Rt===null?sh(i,t,a):vb(i,Rt.memoizedState,t,a)},useTransition:function(){var t=Wp(Ns)[0],a=nn().memoizedState;return[typeof t=="boolean"?t:Ul(t),a]},useSyncExternalStore:Qy,useId:kb,useHostTransitionStatus:oh,useFormState:cb,useActionState:cb,useOptimistic:function(t,a){var i=nn();return Rt!==null?eb(i,Rt,t,a):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:Xp,useCacheRefresh:jb};Tb.useEffectEvent=mb;function ch(t,a,i,c){a=t.memoizedState,i=i(c,a),i=i==null?a:k({},a,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var uh={enqueueSetState:function(t,a,i){t=t._reactInternals;var c=ca(),p=ri(c);p.payload=a,i!=null&&(p.callback=i),a=li(t,p,c),a!==null&&(Zn(a,t,c),ql(a,t,c))},enqueueReplaceState:function(t,a,i){t=t._reactInternals;var c=ca(),p=ri(c);p.tag=1,p.payload=a,i!=null&&(p.callback=i),a=li(t,p,c),a!==null&&(Zn(a,t,c),ql(a,t,c))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var i=ca(),c=ri(i);c.tag=2,a!=null&&(c.callback=a),a=li(t,c,i),a!==null&&(Zn(a,t,i),ql(a,t,i))}};function Eb(t,a,i,c,p,g,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,w):a.prototype&&a.prototype.isPureReactComponent?!Tl(i,c)||!Tl(p,g):!0}function Rb(t,a,i,c){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(i,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(i,c),a.state!==t&&uh.enqueueReplaceState(a,a.state,null)}function co(t,a){var i=a;if("ref"in a){i={};for(var c in a)c!=="ref"&&(i[c]=a[c])}if(t=t.defaultProps){i===a&&(i=k({},i));for(var p in t)i[p]===void 0&&(i[p]=t[p])}return i}function Db(t){mu(t)}function zb(t){console.error(t)}function Ib(t){mu(t)}function Ou(t,a){try{var i=t.onUncaughtError;i(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function Ob(t,a,i){try{var c=t.onCaughtError;c(i.value,{componentStack:i.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function dh(t,a,i){return i=ri(i),i.tag=3,i.payload={element:null},i.callback=function(){Ou(t,a)},i}function Pb(t){return t=ri(t),t.tag=3,t}function qb(t,a,i,c){var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var g=c.value;t.payload=function(){return p(g)},t.callback=function(){Ob(a,i,c)}}var w=i.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(t.callback=function(){Ob(a,i,c),typeof p!="function"&&(hi===null?hi=new Set([this]):hi.add(this));var A=c.stack;this.componentDidCatch(c.value,{componentStack:A!==null?A:""})})}function f5(t,a,i,c,p){if(i.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=i.alternate,a!==null&&or(a,i,p,!0),i=ia.current,i!==null){switch(i.tag){case 31:case 13:return Aa===null?Fu():i.alternate===null&&Wt===0&&(Wt=3),i.flags&=-257,i.flags|=65536,i.lanes=p,c===Su?i.flags|=16384:(a=i.updateQueue,a===null?i.updateQueue=new Set([c]):a.add(c),Ph(t,c,p)),!1;case 22:return i.flags|=65536,c===Su?i.flags|=16384:(a=i.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},i.updateQueue=a):(i=a.retryQueue,i===null?a.retryQueue=new Set([c]):i.add(c)),Ph(t,c,p)),!1}throw Error(r(435,i.tag))}return Ph(t,c,p),Fu(),!1}if(ht)return a=ia.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==Ep&&(t=Error(r(422),{cause:c}),Dl(wa(t,i)))):(c!==Ep&&(a=Error(r(423),{cause:c}),Dl(wa(a,i))),t=t.current.alternate,t.flags|=65536,p&=-p,t.lanes|=p,c=wa(c,i),p=dh(t.stateNode,c,p),Up(t,p),Wt!==4&&(Wt=2)),!1;var g=Error(r(520),{cause:c});if(g=wa(g,i),Xl===null?Xl=[g]:Xl.push(g),Wt!==4&&(Wt=2),a===null)return!0;c=wa(c,i),i=a;do{switch(i.tag){case 3:return i.flags|=65536,t=p&-p,i.lanes|=t,t=dh(i.stateNode,c,t),Up(i,t),!1;case 1:if(a=i.type,g=i.stateNode,(i.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(hi===null||!hi.has(g))))return i.flags|=65536,p&=-p,i.lanes|=p,p=Pb(p),qb(p,t,i,c),Up(i,p),!1}i=i.return}while(i!==null);return!1}var mh=Error(r(461)),cn=!1;function _n(t,a,i,c){a.child=t===null?Uy(a,null,i,c):ro(a,t.child,i,c)}function Mb(t,a,i,c,p){i=i.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 ao(a),c=Fp(t,a,i,w,g,p),A=Qp(),t!==null&&!cn?(Zp(t,a,p),Cs(t,a,p)):(ht&&A&&_p(a),a.flags|=1,_n(t,a,c,p),a.child)}function Bb(t,a,i,c,p){if(t===null){var g=i.type;return typeof g=="function"&&!Ap(g)&&g.defaultProps===void 0&&i.compare===null?(a.tag=15,a.type=g,Lb(t,a,g,c,p)):(t=gu(i.type,null,c,a,a.mode,p),t.ref=a.ref,t.return=a,a.child=t)}if(g=t.child,!xh(t,p)){var w=g.memoizedProps;if(i=i.compare,i=i!==null?i:Tl,i(w,c)&&t.ref===a.ref)return Cs(t,a,p)}return a.flags|=1,t=ws(g,c),t.ref=a.ref,t.return=a,a.child=t}function Lb(t,a,i,c,p){if(t!==null){var g=t.memoizedProps;if(Tl(g,c)&&t.ref===a.ref)if(cn=!1,a.pendingProps=c=g,xh(t,p))(t.flags&131072)!==0&&(cn=!0);else return a.lanes=t.lanes,Cs(t,a,p)}return ph(t,a,i,c,p)}function Ub(t,a,i,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|i:i,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 Vb(t,a,g,i,c)}if((i&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&xu(a,g!==null?g.cachePool:null),g!==null?Ky(a,g):$p(),Gy(a);else return c=a.lanes=536870912,Vb(t,a,g!==null?g.baseLanes|i:i,i,c)}else g!==null?(xu(a,g.cachePool),Ky(a,g),ui(),a.memoizedState=null):(t!==null&&xu(a,null),$p(),ui());return _n(t,a,p,i),a.child}function Kl(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Vb(t,a,i,c,p){var g=qp();return g=g===null?null:{parent:rn._currentValue,pool:g},a.memoizedState={baseLanes:i,cachePool:g},t!==null&&xu(a,null),$p(),Gy(a),t!==null&&or(t,a,c,!0),a.childLanes=p,null}function Pu(t,a){return a=Mu({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function $b(t,a,i){return ro(a,t.child,null,i),t=Pu(a,a.pendingProps),t.flags|=2,oa(a),a.memoizedState=null,t}function g5(t,a,i){var c=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(ht){if(c.mode==="hidden")return t=Pu(a,c),a.lanes=536870912,Kl(null,t);if(Gp(a),(t=qt)?(t=tx(t,ja),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:ni!==null?{id:es,overflow:ts}:null,retryLane:536870912,hydrationErrors:null},i=Ny(t),i.return=a,a.child=i,Nn=a,qt=null)):t=null,t===null)throw si(a);return a.lanes=536870912,null}return Pu(a,c)}var g=t.memoizedState;if(g!==null){var w=g.dehydrated;if(Gp(a),p)if(a.flags&256)a.flags&=-257,a=$b(t,a,i);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(r(558));else if(cn||or(t,a,i,!1),p=(i&t.childLanes)!==0,cn||p){if(c=It,c!==null&&(w=ll(c,i),w!==0&&w!==g.retryLane))throw g.retryLane=w,Wi(t,w),Zn(c,t,w),mh;Fu(),a=$b(t,a,i)}else t=g.treeContext,qt=Na(w.nextSibling),Nn=a,ht=!0,ai=null,ja=!1,t!==null&&Ty(a,t),a=Pu(a,c),a.flags|=4096;return a}return t=ws(t.child,{mode:c.mode,children:c.children}),t.ref=a.ref,a.child=t,t.return=a,t}function qu(t,a){var i=a.ref;if(i===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(t===null||t.ref!==i)&&(a.flags|=4194816)}}function ph(t,a,i,c,p){return ao(a),i=Fp(t,a,i,c,void 0,p),c=Qp(),t!==null&&!cn?(Zp(t,a,p),Cs(t,a,p)):(ht&&c&&_p(a),a.flags|=1,_n(t,a,i,p),a.child)}function Kb(t,a,i,c,p,g){return ao(a),a.updateQueue=null,i=Fy(a,c,i,p),Hy(t),c=Qp(),t!==null&&!cn?(Zp(t,a,g),Cs(t,a,g)):(ht&&c&&_p(a),a.flags|=1,_n(t,a,i,g),a.child)}function Gb(t,a,i,c,p){if(ao(a),a.stateNode===null){var g=nr,w=i.contextType;typeof w=="object"&&w!==null&&(g=Cn(w)),g=new i(c,g),a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=uh,a.stateNode=g,g._reactInternals=a,g=a.stateNode,g.props=c,g.state=a.memoizedState,g.refs={},Bp(a),w=i.contextType,g.context=typeof w=="object"&&w!==null?Cn(w):nr,g.state=a.memoizedState,w=i.getDerivedStateFromProps,typeof w=="function"&&(ch(a,i,w,c),g.state=a.memoizedState),typeof i.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&&uh.enqueueReplaceState(g,g.state,null),Bl(a,c,g,p),Ml(),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=co(i,A);g.props=D;var G=g.context,ee=i.contextType;w=nr,typeof ee=="object"&&ee!==null&&(w=Cn(ee));var se=i.getDerivedStateFromProps;ee=typeof se=="function"||typeof g.getSnapshotBeforeUpdate=="function",A=a.pendingProps!==A,ee||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(A||G!==w)&&Rb(a,g,c,w),oi=!1;var F=a.memoizedState;g.state=F,Bl(a,c,g,p),Ml(),G=a.memoizedState,A||F!==G||oi?(typeof se=="function"&&(ch(a,i,se,c),G=a.memoizedState),(D=oi||Eb(a,i,D,c,F,G,w))?(ee||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,Lp(t,a),w=a.memoizedProps,ee=co(i,w),g.props=ee,se=a.pendingProps,F=g.context,G=i.contextType,D=nr,typeof G=="object"&&G!==null&&(D=Cn(G)),A=i.getDerivedStateFromProps,(G=typeof A=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(w!==se||F!==D)&&Rb(a,g,c,D),oi=!1,F=a.memoizedState,g.state=F,Bl(a,c,g,p),Ml();var Y=a.memoizedState;w!==se||F!==Y||oi||t!==null&&t.dependencies!==null&&bu(t.dependencies)?(typeof A=="function"&&(ch(a,i,A,c),Y=a.memoizedState),(ee=oi||Eb(a,i,ee,c,F,Y,D)||t!==null&&t.dependencies!==null&&bu(t.dependencies))?(G||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,Y,D),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,Y,D)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&F===t.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&F===t.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=Y),g.props=c,g.state=Y,g.context=D,c=ee):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&F===t.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&F===t.memoizedState||(a.flags|=1024),c=!1)}return g=c,qu(t,a),c=(a.flags&128)!==0,g||c?(g=a.stateNode,i=c&&typeof i.getDerivedStateFromError!="function"?null:g.render(),a.flags|=1,t!==null&&c?(a.child=ro(a,t.child,null,p),a.child=ro(a,null,i,p)):_n(t,a,i,p),a.memoizedState=g.state,t=a.child):t=Cs(t,a,p),t}function Hb(t,a,i,c){return to(),a.flags|=256,_n(t,a,i,c),a.child}var hh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fh(t){return{baseLanes:t,cachePool:Oy()}}function gh(t,a,i){return t=t!==null?t.childLanes&~i:0,a&&(t|=la),t}function Fb(t,a,i){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?ci(a):ui(),(t=qt)?(t=tx(t,ja),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:ni!==null?{id:es,overflow:ts}:null,retryLane:536870912,hydrationErrors:null},i=Ny(t),i.return=a,a.child=i,Nn=a,qt=null)):t=null,t===null)throw si(a);return Jh(t)?a.lanes=32:a.lanes=536870912,null}var A=c.children;return c=c.fallback,p?(ui(),p=a.mode,A=Mu({mode:"hidden",children:A},p),c=eo(c,p,i,null),A.return=a,c.return=a,A.sibling=c,a.child=A,c=a.child,c.memoizedState=fh(i),c.childLanes=gh(t,w,i),a.memoizedState=hh,Kl(null,c)):(ci(a),yh(a,A))}var D=t.memoizedState;if(D!==null&&(A=D.dehydrated,A!==null)){if(g)a.flags&256?(ci(a),a.flags&=-257,a=bh(t,a,i)):a.memoizedState!==null?(ui(),a.child=t.child,a.flags|=128,a=null):(ui(),A=c.fallback,p=a.mode,c=Mu({mode:"visible",children:c.children},p),A=eo(A,p,i,null),A.flags|=2,c.return=a,A.return=a,c.sibling=A,a.child=c,ro(a,t.child,null,i),c=a.child,c.memoizedState=fh(i),c.childLanes=gh(t,w,i),a.memoizedState=hh,a=Kl(null,c));else if(ci(a),Jh(A)){if(w=A.nextSibling&&A.nextSibling.dataset,w)var G=w.dgst;w=G,c=Error(r(419)),c.stack="",c.digest=w,Dl({value:c,source:null,stack:null}),a=bh(t,a,i)}else if(cn||or(t,a,i,!1),w=(i&t.childLanes)!==0,cn||w){if(w=It,w!==null&&(c=ll(w,i),c!==0&&c!==D.retryLane))throw D.retryLane=c,Wi(t,c),Zn(w,t,c),mh;Xh(A)||Fu(),a=bh(t,a,i)}else Xh(A)?(a.flags|=192,a.child=t.child,a=null):(t=D.treeContext,qt=Na(A.nextSibling),Nn=a,ht=!0,ai=null,ja=!1,t!==null&&Ty(a,t),a=yh(a,c.children),a.flags|=4096);return a}return p?(ui(),A=c.fallback,p=a.mode,D=t.child,G=D.sibling,c=ws(D,{mode:"hidden",children:c.children}),c.subtreeFlags=D.subtreeFlags&65011712,G!==null?A=ws(G,A):(A=eo(A,p,i,null),A.flags|=2),A.return=a,c.return=a,c.sibling=A,a.child=c,Kl(null,c),c=a.child,A=t.child.memoizedState,A===null?A=fh(i):(p=A.cachePool,p!==null?(D=rn._currentValue,p=p.parent!==D?{parent:D,pool:D}:p):p=Oy(),A={baseLanes:A.baseLanes|i,cachePool:p}),c.memoizedState=A,c.childLanes=gh(t,w,i),a.memoizedState=hh,Kl(t.child,c)):(ci(a),i=t.child,t=i.sibling,i=ws(i,{mode:"visible",children:c.children}),i.return=a,i.sibling=null,t!==null&&(w=a.deletions,w===null?(a.deletions=[t],a.flags|=16):w.push(t)),a.child=i,a.memoizedState=null,i)}function yh(t,a){return a=Mu({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function Mu(t,a){return t=sa(22,t,null,a),t.lanes=0,t}function bh(t,a,i){return ro(a,t.child,null,i),t=yh(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function Qb(t,a,i){t.lanes|=a;var c=t.alternate;c!==null&&(c.lanes|=a),zp(t.return,a,i)}function vh(t,a,i,c,p,g){var w=t.memoizedState;w===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:i,tailMode:p,treeForkCount:g}:(w.isBackwards=a,w.rendering=null,w.renderingStartTime=0,w.last=c,w.tail=i,w.tailMode=p,w.treeForkCount=g)}function Zb(t,a,i){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,xe(tn,w),_n(t,a,c,i),c=ht?Rl:0,!A&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Qb(t,i,a);else if(t.tag===19)Qb(t,i,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(i=a.child,p=null;i!==null;)t=i.alternate,t!==null&&Nu(t)===null&&(p=i),i=i.sibling;i=p,i===null?(p=a.child,a.child=null):(p=i.sibling,i.sibling=null),vh(a,!1,p,i,g,c);break;case"backwards":case"unstable_legacy-backwards":for(i=null,p=a.child,a.child=null;p!==null;){if(t=p.alternate,t!==null&&Nu(t)===null){a.child=p;break}t=p.sibling,p.sibling=i,i=p,p=t}vh(a,!0,i,null,g,c);break;case"together":vh(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function Cs(t,a,i){if(t!==null&&(a.dependencies=t.dependencies),pi|=a.lanes,(i&a.childLanes)===0)if(t!==null){if(or(t,a,i,!1),(i&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(r(153));if(a.child!==null){for(t=a.child,i=ws(t,t.pendingProps),a.child=i,i.return=a;t.sibling!==null;)t=t.sibling,i=i.sibling=ws(t,t.pendingProps),i.return=a;i.sibling=null}return a.child}function xh(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&bu(t)))}function y5(t,a,i){switch(a.tag){case 3:Qe(a,a.stateNode.containerInfo),ii(a,rn,t.memoizedState.cache),to();break;case 27:case 5:Ct(a);break;case 4:Qe(a,a.stateNode.containerInfo);break;case 10:ii(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Gp(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(ci(a),a.flags|=128,null):(i&a.child.childLanes)!==0?Fb(t,a,i):(ci(a),t=Cs(t,a,i),t!==null?t.sibling:null);ci(a);break;case 19:var p=(t.flags&128)!==0;if(c=(i&a.childLanes)!==0,c||(or(t,a,i,!1),c=(i&a.childLanes)!==0),p){if(c)return Zb(t,a,i);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),xe(tn,tn.current),c)break;return null;case 22:return a.lanes=0,Ub(t,a,i,a.pendingProps);case 24:ii(a,rn,t.memoizedState.cache)}return Cs(t,a,i)}function Yb(t,a,i){if(t!==null)if(t.memoizedProps!==a.pendingProps)cn=!0;else{if(!xh(t,i)&&(a.flags&128)===0)return cn=!1,y5(t,a,i);cn=(t.flags&131072)!==0}else cn=!1,ht&&(a.flags&1048576)!==0&&_y(a,Rl,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(t=io(a.elementType),a.type=t,typeof t=="function")Ap(t)?(c=co(t,c),a.tag=1,a=Gb(null,a,t,c,i)):(a.tag=0,a=ph(null,a,t,c,i));else{if(t!=null){var p=t.$$typeof;if(p===$){a.tag=11,a=Mb(null,a,t,c,i);break e}else if(p===V){a.tag=14,a=Bb(null,a,t,c,i);break e}}throw a=ke(t)||t,Error(r(306,a,""))}}return a;case 0:return ph(t,a,a.type,a.pendingProps,i);case 1:return c=a.type,p=co(c,a.pendingProps),Gb(t,a,c,p,i);case 3:e:{if(Qe(a,a.stateNode.containerInfo),t===null)throw Error(r(387));c=a.pendingProps;var g=a.memoizedState;p=g.element,Lp(t,a),Bl(a,c,null,i);var w=a.memoizedState;if(c=w.cache,ii(a,rn,c),c!==g.cache&&Ip(a,[rn],i,!0),Ml(),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=Hb(t,a,c,i);break e}else if(c!==p){p=wa(Error(r(424)),a),Dl(p),a=Hb(t,a,c,i);break e}else for(t=a.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,qt=Na(t.firstChild),Nn=a,ht=!0,ai=null,ja=!0,i=Uy(a,null,c,i),a.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(to(),c===p){a=Cs(t,a,i);break e}_n(t,a,c,i)}a=a.child}return a;case 26:return qu(t,a),t===null?(i=rx(a.type,null,a.pendingProps,null))?a.memoizedState=i:ht||(i=a.type,t=a.pendingProps,c=ed(ue.current).createElement(i),c[on]=a,c[Dn]=t,Tn(c,i,t),en(c),a.stateNode=c):a.memoizedState=rx(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return Ct(a),t===null&&ht&&(c=a.stateNode=sx(a.type,a.pendingProps,ue.current),Nn=a,ja=!0,p=qt,bi(a.type)?(Wh=p,qt=Na(c.firstChild)):qt=p),_n(t,a,a.pendingProps.children,i),qu(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&ht&&((p=c=qt)&&(c=F5(c,a.type,a.pendingProps,ja),c!==null?(a.stateNode=c,Nn=a,qt=Na(c.firstChild),ja=!1,p=!0):p=!1),p||si(a)),Ct(a),p=a.type,g=a.pendingProps,w=t!==null?t.memoizedProps:null,c=g.children,Qh(p,g)?c=null:w!==null&&Qh(p,w)&&(a.flags|=32),a.memoizedState!==null&&(p=Fp(t,a,l5,null,null,i),ic._currentValue=p),qu(t,a),_n(t,a,c,i),a.child;case 6:return t===null&&ht&&((t=i=qt)&&(i=Q5(i,a.pendingProps,ja),i!==null?(a.stateNode=i,Nn=a,qt=null,t=!0):t=!1),t||si(a)),null;case 13:return Fb(t,a,i);case 4:return Qe(a,a.stateNode.containerInfo),c=a.pendingProps,t===null?a.child=ro(a,null,c,i):_n(t,a,c,i),a.child;case 11:return Mb(t,a,a.type,a.pendingProps,i);case 7:return _n(t,a,a.pendingProps,i),a.child;case 8:return _n(t,a,a.pendingProps.children,i),a.child;case 12:return _n(t,a,a.pendingProps.children,i),a.child;case 10:return c=a.pendingProps,ii(a,a.type,c.value),_n(t,a,c.children,i),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,ao(a),p=Cn(p),c=c(p),a.flags|=1,_n(t,a,c,i),a.child;case 14:return Bb(t,a,a.type,a.pendingProps,i);case 15:return Lb(t,a,a.type,a.pendingProps,i);case 19:return Zb(t,a,i);case 31:return g5(t,a,i);case 22:return Ub(t,a,i,a.pendingProps);case 24:return ao(a),c=Cn(rn),t===null?(p=qp(),p===null&&(p=It,g=Op(),p.pooledCache=g,g.refCount++,g!==null&&(p.pooledCacheLanes|=i),p=g),a.memoizedState={parent:c,cache:p},Bp(a),ii(a,rn,p)):((t.lanes&i)!==0&&(Lp(t,a),Bl(a,null,null,i),Ml()),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),ii(a,rn,c)):(c=g.cache,ii(a,rn,c),c!==p.cache&&Ip(a,[rn],i,!0))),_n(t,a,a.pendingProps.children,i),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function _s(t){t.flags|=4}function wh(t,a,i,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(kv())t.flags|=8192;else throw oo=Su,Mp}else t.flags&=-16777217}function Xb(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!mx(a))if(kv())t.flags|=8192;else throw oo=Su,Mp}function Bu(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?hs():536870912,t.lanes|=a,br|=a)}function Gl(t,a){if(!ht)switch(t.tailMode){case"hidden":a=t.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var c=null;i!==null;)i.alternate!==null&&(c=i),i=i.sibling;c===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Mt(t){var a=t.alternate!==null&&t.alternate.child===t.child,i=0,c=0;if(a)for(var p=t.child;p!==null;)i|=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;)i|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=c,t.childLanes=i,a}function b5(t,a,i){var c=a.pendingProps;switch(Tp(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(a),null;case 1:return Mt(a),null;case 3:return i=a.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),js(rn),Ee(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(ir(a)?_s(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Rp())),Mt(a),null;case 26:var p=a.type,g=a.memoizedState;return t===null?(_s(a),g!==null?(Mt(a),Xb(a,g)):(Mt(a),wh(a,p,null,c,i))):g?g!==t.memoizedState?(_s(a),Mt(a),Xb(a,g)):(Mt(a),a.flags&=-16777217):(t=t.memoizedProps,t!==c&&_s(a),Mt(a),wh(a,p,t,c,i)),null;case 27:if(me(a),i=ue.current,p=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==c&&_s(a);else{if(!c){if(a.stateNode===null)throw Error(r(166));return Mt(a),null}t=pe.current,ir(a)?Ey(a):(t=sx(p,c,i),a.stateNode=t,_s(a))}return Mt(a),null;case 5:if(me(a),p=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==c&&_s(a);else{if(!c){if(a.stateNode===null)throw Error(r(166));return Mt(a),null}if(g=pe.current,ir(a))Ey(a);else{var w=ed(ue.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(Tn(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&&_s(a)}}return Mt(a),wh(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,i),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==c&&_s(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(r(166));if(t=ue.current,ir(a)){if(t=a.stateNode,i=a.memoizedProps,c=null,p=Nn,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}t[on]=a,t=!!(t.nodeValue===i||c!==null&&c.suppressHydrationWarning===!0||Fv(t.nodeValue,i)),t||si(a,!0)}else t=ed(t).createTextNode(c),t[on]=a,a.stateNode=t}return Mt(a),null;case 31:if(i=a.memoizedState,t===null||t.memoizedState!==null){if(c=ir(a),i!==null){if(t===null){if(!c)throw Error(r(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[on]=a}else to(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Mt(a),t=!1}else i=Rp(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return a.flags&256?(oa(a),a):(oa(a),null);if((a.flags&128)!==0)throw Error(r(558))}return Mt(a),null;case 13:if(c=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(p=ir(a),c!==null&&c.dehydrated!==null){if(t===null){if(!p)throw Error(r(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[on]=a}else to(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Mt(a),p=!1}else p=Rp(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(oa(a),a):(oa(a),null)}return oa(a),(a.flags&128)!==0?(a.lanes=i,a):(i=c!==null,t=t!==null&&t.memoizedState!==null,i&&(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)),i!==t&&i&&(a.child.flags|=8192),Bu(a,a.updateQueue),Mt(a),null);case 4:return Ee(),t===null&&$h(a.stateNode.containerInfo),Mt(a),null;case 10:return js(a.type),Mt(a),null;case 19:if(Me(tn),c=a.memoizedState,c===null)return Mt(a),null;if(p=(a.flags&128)!==0,g=c.rendering,g===null)if(p)Gl(c,!1);else{if(Wt!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(g=Nu(t),g!==null){for(a.flags|=128,Gl(c,!1),t=g.updateQueue,a.updateQueue=t,Bu(a,t),a.subtreeFlags=0,t=i,i=a.child;i!==null;)Ay(i,t),i=i.sibling;return xe(tn,tn.current&1|2),ht&&Ss(a,c.treeForkCount),a.child}t=t.sibling}c.tail!==null&&Vt()>Ku&&(a.flags|=128,p=!0,Gl(c,!1),a.lanes=4194304)}else{if(!p)if(t=Nu(g),t!==null){if(a.flags|=128,p=!0,t=t.updateQueue,a.updateQueue=t,Bu(a,t),Gl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!ht)return Mt(a),null}else 2*Vt()-c.renderingStartTime>Ku&&i!==536870912&&(a.flags|=128,p=!0,Gl(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=Vt(),t.sibling=null,i=tn.current,xe(tn,p?i&1|2:i&1),ht&&Ss(a,c.treeForkCount),t):(Mt(a),null);case 22:case 23:return oa(a),Kp(),c=a.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(i&536870912)!==0&&(a.flags&128)===0&&(Mt(a),a.subtreeFlags&6&&(a.flags|=8192)):Mt(a),i=a.updateQueue,i!==null&&Bu(a,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==i&&(a.flags|=2048),t!==null&&Me(so),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),a.memoizedState.cache!==i&&(a.flags|=2048),js(rn),Mt(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function v5(t,a){switch(Tp(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return js(rn),Ee(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return me(a),null;case 31:if(a.memoizedState!==null){if(oa(a),a.alternate===null)throw Error(r(340));to()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(oa(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(r(340));to()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return Me(tn),null;case 4:return Ee(),null;case 10:return js(a.type),null;case 22:case 23:return oa(a),Kp(),t!==null&&Me(so),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return js(rn),null;case 25:return null;default:return null}}function Jb(t,a){switch(Tp(a),a.tag){case 3:js(rn),Ee();break;case 26:case 27:case 5:me(a);break;case 4:Ee();break;case 31:a.memoizedState!==null&&oa(a);break;case 13:oa(a);break;case 19:Me(tn);break;case 10:js(a.type);break;case 22:case 23:oa(a),Kp(),t!==null&&Me(so);break;case 24:js(rn)}}function Hl(t,a){try{var i=a.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var p=c.next;i=p;do{if((i.tag&t)===t){c=void 0;var g=i.create,w=i.inst;c=g(),w.destroy=c}i=i.next}while(i!==p)}}catch(A){Tt(a,a.return,A)}}function di(t,a,i){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=i,G=A;try{G()}catch(ee){Tt(p,D,ee)}}}c=c.next}while(c!==g)}}catch(ee){Tt(a,a.return,ee)}}function Wb(t){var a=t.updateQueue;if(a!==null){var i=t.stateNode;try{$y(a,i)}catch(c){Tt(t,t.return,c)}}}function ev(t,a,i){i.props=co(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(c){Tt(t,a,c)}}function Fl(t,a){try{var i=t.ref;if(i!==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 i=="function"?t.refCleanup=i(c):i.current=c}}catch(p){Tt(t,a,p)}}function ns(t,a){var i=t.ref,c=t.refCleanup;if(i!==null)if(typeof c=="function")try{c()}catch(p){Tt(t,a,p)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(p){Tt(t,a,p)}else i.current=null}function tv(t){var a=t.type,i=t.memoizedProps,c=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":i.autoFocus&&c.focus();break e;case"img":i.src?c.src=i.src:i.srcSet&&(c.srcset=i.srcSet)}}catch(p){Tt(t,t.return,p)}}function Sh(t,a,i){try{var c=t.stateNode;U5(c,t.type,i,a),c[Dn]=a}catch(p){Tt(t,t.return,p)}}function nv(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&bi(t.type)||t.tag===4}function kh(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||nv(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&&bi(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 jh(t,a,i){var c=t.tag;if(c===5||c===6)t=t.stateNode,a?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(t,a):(a=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,a.appendChild(t),i=i._reactRootContainer,i!=null||a.onclick!==null||(a.onclick=qa));else if(c!==4&&(c===27&&bi(t.type)&&(i=t.stateNode,a=null),t=t.child,t!==null))for(jh(t,a,i),t=t.sibling;t!==null;)jh(t,a,i),t=t.sibling}function Lu(t,a,i){var c=t.tag;if(c===5||c===6)t=t.stateNode,a?i.insertBefore(t,a):i.appendChild(t);else if(c!==4&&(c===27&&bi(t.type)&&(i=t.stateNode),t=t.child,t!==null))for(Lu(t,a,i),t=t.sibling;t!==null;)Lu(t,a,i),t=t.sibling}function av(t){var a=t.stateNode,i=t.memoizedProps;try{for(var c=t.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Tn(a,c,i),a[on]=t,a[Dn]=i}catch(g){Tt(t,t.return,g)}}var Ts=!1,un=!1,Ah=!1,sv=typeof WeakSet=="function"?WeakSet:Set,xn=null;function x5(t,a){if(t=t.containerInfo,Hh=rd,t=gy(t),bp(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var c=i.getSelection&&i.getSelection();if(c&&c.rangeCount!==0){i=c.anchorNode;var p=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{i.nodeType,g.nodeType}catch{i=null;break e}var w=0,A=-1,D=-1,G=0,ee=0,se=t,F=null;t:for(;;){for(var Y;se!==i||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),(Y=se.firstChild)!==null;)F=se,se=Y;for(;;){if(se===t)break t;if(F===i&&++G===p&&(A=w),F===g&&++ee===c&&(D=w),(Y=se.nextSibling)!==null)break;se=F,F=se.parentNode}se=Y}i=A===-1||D===-1?null:{start:A,end:D}}else i=null}i=i||{start:0,end:0}}else i=null;for(Fh={focusedElem:t,selectionRange:i},rd=!1,xn=a;xn!==null;)if(a=xn,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,xn=t;else for(;xn!==null;){switch(a=xn,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(i=0;i<t.length;i++)p=t[i],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,i=a,p=g.memoizedProps,g=g.memoizedState,c=i.stateNode;try{var Te=co(i.type,p);t=c.getSnapshotBeforeUpdate(Te,g),c.__reactInternalSnapshotBeforeUpdate=t}catch(Fe){Tt(i,i.return,Fe)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,i=t.nodeType,i===9)Yh(t);else if(i===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Yh(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(r(163))}if(t=a.sibling,t!==null){t.return=a.return,xn=t;break}xn=a.return}}function iv(t,a,i){var c=i.flags;switch(i.tag){case 0:case 11:case 15:Rs(t,i),c&4&&Hl(5,i);break;case 1:if(Rs(t,i),c&4)if(t=i.stateNode,a===null)try{t.componentDidMount()}catch(w){Tt(i,i.return,w)}else{var p=co(i.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(p,a,t.__reactInternalSnapshotBeforeUpdate)}catch(w){Tt(i,i.return,w)}}c&64&&Wb(i),c&512&&Fl(i,i.return);break;case 3:if(Rs(t,i),c&64&&(t=i.updateQueue,t!==null)){if(a=null,i.child!==null)switch(i.child.tag){case 27:case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}try{$y(t,a)}catch(w){Tt(i,i.return,w)}}break;case 27:a===null&&c&4&&av(i);case 26:case 5:Rs(t,i),a===null&&c&4&&tv(i),c&512&&Fl(i,i.return);break;case 12:Rs(t,i);break;case 31:Rs(t,i),c&4&&lv(t,i);break;case 13:Rs(t,i),c&4&&cv(t,i),c&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=T5.bind(null,i),Z5(t,i))));break;case 22:if(c=i.memoizedState!==null||Ts,!c){a=a!==null&&a.memoizedState!==null||un,p=Ts;var g=un;Ts=c,(un=a)&&!g?Ds(t,i,(i.subtreeFlags&8772)!==0):Rs(t,i),Ts=p,un=g}break;case 30:break;default:Rs(t,i)}}function ov(t){var a=t.alternate;a!==null&&(t.alternate=null,ov(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&dl(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 $t=null,Gn=!1;function Es(t,a,i){for(i=i.child;i!==null;)rv(t,a,i),i=i.sibling}function rv(t,a,i){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(vn,i)}catch{}switch(i.tag){case 26:un||ns(i,a),Es(t,a,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:un||ns(i,a);var c=$t,p=Gn;bi(i.type)&&($t=i.stateNode,Gn=!1),Es(t,a,i),nc(i.stateNode),$t=c,Gn=p;break;case 5:un||ns(i,a);case 6:if(c=$t,p=Gn,$t=null,Es(t,a,i),$t=c,Gn=p,$t!==null)if(Gn)try{($t.nodeType===9?$t.body:$t.nodeName==="HTML"?$t.ownerDocument.body:$t).removeChild(i.stateNode)}catch(g){Tt(i,a,g)}else try{$t.removeChild(i.stateNode)}catch(g){Tt(i,a,g)}break;case 18:$t!==null&&(Gn?(t=$t,Wv(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),Nr(t)):Wv($t,i.stateNode));break;case 4:c=$t,p=Gn,$t=i.stateNode.containerInfo,Gn=!0,Es(t,a,i),$t=c,Gn=p;break;case 0:case 11:case 14:case 15:di(2,i,a),un||di(4,i,a),Es(t,a,i);break;case 1:un||(ns(i,a),c=i.stateNode,typeof c.componentWillUnmount=="function"&&ev(i,a,c)),Es(t,a,i);break;case 21:Es(t,a,i);break;case 22:un=(c=un)||i.memoizedState!==null,Es(t,a,i),un=c;break;default:Es(t,a,i)}}function lv(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Nr(t)}catch(i){Tt(a,a.return,i)}}}function cv(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Nr(t)}catch(i){Tt(a,a.return,i)}}function w5(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new sv),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new sv),a;default:throw Error(r(435,t.tag))}}function Uu(t,a){var i=w5(t);a.forEach(function(c){if(!i.has(c)){i.add(c);var p=E5.bind(null,t,c);c.then(p,p)}})}function Hn(t,a){var i=a.deletions;if(i!==null)for(var c=0;c<i.length;c++){var p=i[c],g=t,w=a,A=w;e:for(;A!==null;){switch(A.tag){case 27:if(bi(A.type)){$t=A.stateNode,Gn=!1;break e}break;case 5:$t=A.stateNode,Gn=!1;break e;case 3:case 4:$t=A.stateNode.containerInfo,Gn=!0;break e}A=A.return}if($t===null)throw Error(r(160));rv(g,w,p),$t=null,Gn=!1,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)uv(a,t),a=a.sibling}var La=null;function uv(t,a){var i=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Hn(a,t),Fn(t),c&4&&(di(3,t,t.return),Hl(3,t),di(5,t,t.return));break;case 1:Hn(a,t),Fn(t),c&512&&(un||i===null||ns(i,i.return)),c&64&&Ts&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?c:i.concat(c))));break;case 26:var p=La;if(Hn(a,t),Fn(t),c&512&&(un||i===null||ns(i,i.return)),c&4){var g=i!==null?i.memoizedState:null;if(c=t.memoizedState,i===null)if(c===null)if(t.stateNode===null){e:{c=t.type,i=t.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":g=p.getElementsByTagName("title")[0],(!g||g[Zs]||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"))),Tn(g,c,i),g[on]=t,en(g),c=g;break e;case"link":var w=ux("link","href",p).get(c+(i.href||""));if(w){for(var A=0;A<w.length;A++)if(g=w[A],g.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&g.getAttribute("rel")===(i.rel==null?null:i.rel)&&g.getAttribute("title")===(i.title==null?null:i.title)&&g.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){w.splice(A,1);break t}}g=p.createElement(c),Tn(g,c,i),p.head.appendChild(g);break;case"meta":if(w=ux("meta","content",p).get(c+(i.content||""))){for(A=0;A<w.length;A++)if(g=w[A],g.getAttribute("content")===(i.content==null?null:""+i.content)&&g.getAttribute("name")===(i.name==null?null:i.name)&&g.getAttribute("property")===(i.property==null?null:i.property)&&g.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&g.getAttribute("charset")===(i.charSet==null?null:i.charSet)){w.splice(A,1);break t}}g=p.createElement(c),Tn(g,c,i),p.head.appendChild(g);break;default:throw Error(r(468,c))}g[on]=t,en(g),c=g}t.stateNode=c}else dx(p,t.type,t.stateNode);else t.stateNode=cx(p,c,t.memoizedProps);else g!==c?(g===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):g.count--,c===null?dx(p,t.type,t.stateNode):cx(p,c,t.memoizedProps)):c===null&&t.stateNode!==null&&Sh(t,t.memoizedProps,i.memoizedProps)}break;case 27:Hn(a,t),Fn(t),c&512&&(un||i===null||ns(i,i.return)),i!==null&&c&4&&Sh(t,t.memoizedProps,i.memoizedProps);break;case 5:if(Hn(a,t),Fn(t),c&512&&(un||i===null||ns(i,i.return)),t.flags&32){p=t.stateNode;try{ya(p,"")}catch(Te){Tt(t,t.return,Te)}}c&4&&t.stateNode!=null&&(p=t.memoizedProps,Sh(t,p,i!==null?i.memoizedProps:p)),c&1024&&(Ah=!0);break;case 6:if(Hn(a,t),Fn(t),c&4){if(t.stateNode===null)throw Error(r(162));c=t.memoizedProps,i=t.stateNode;try{i.nodeValue=c}catch(Te){Tt(t,t.return,Te)}}break;case 3:if(ad=null,p=La,La=td(a.containerInfo),Hn(a,t),La=p,Fn(t),c&4&&i!==null&&i.memoizedState.isDehydrated)try{Nr(a.containerInfo)}catch(Te){Tt(t,t.return,Te)}Ah&&(Ah=!1,dv(t));break;case 4:c=La,La=td(t.stateNode.containerInfo),Hn(a,t),Fn(t),La=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,Uu(t,c)));break;case 13:Hn(a,t),Fn(t),t.child.flags&8192&&t.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&($u=Vt()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Uu(t,c)));break;case 22:p=t.memoizedState!==null;var D=i!==null&&i.memoizedState!==null,G=Ts,ee=un;if(Ts=G||p,un=ee||D,Hn(a,t),un=ee,Ts=G,Fn(t),c&8192)e:for(a=t.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(i===null||D||Ts||un||uo(t)),i=null,a=t;;){if(a.tag===5||a.tag===26){if(i===null){D=i=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,F=se!=null&&se.hasOwnProperty("display")?se.display:null;A.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(Te){Tt(D,D.return,Te)}}}else if(a.tag===6){if(i===null){D=a;try{D.stateNode.nodeValue=p?"":D.memoizedProps}catch(Te){Tt(D,D.return,Te)}}}else if(a.tag===18){if(i===null){D=a;try{var Y=D.stateNode;p?ex(Y,!0):ex(D.stateNode,!1)}catch(Te){Tt(D,D.return,Te)}}}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;i===a&&(i=null),a=a.return}i===a&&(i=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=t.updateQueue,c!==null&&(i=c.retryQueue,i!==null&&(c.retryQueue=null,Uu(t,i))));break;case 19:Hn(a,t),Fn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Uu(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 i,c=t.return;c!==null;){if(nv(c)){i=c;break}c=c.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var p=i.stateNode,g=kh(t);Lu(t,g,p);break;case 5:var w=i.stateNode;i.flags&32&&(ya(w,""),i.flags&=-33);var A=kh(t);Lu(t,A,w);break;case 3:case 4:var D=i.stateNode.containerInfo,G=kh(t);jh(t,G,D);break;default:throw Error(r(161))}}catch(ee){Tt(t,t.return,ee)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function dv(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;dv(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function Rs(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)iv(t,a.alternate,a),a=a.sibling}function uo(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:di(4,a,a.return),uo(a);break;case 1:ns(a,a.return);var i=a.stateNode;typeof i.componentWillUnmount=="function"&&ev(a,a.return,i),uo(a);break;case 27:nc(a.stateNode);case 26:case 5:ns(a,a.return),uo(a);break;case 22:a.memoizedState===null&&uo(a);break;case 30:uo(a);break;default:uo(a)}t=t.sibling}}function Ds(t,a,i){for(i=i&&(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:Ds(p,g,i),Hl(4,g);break;case 1:if(Ds(p,g,i),c=g,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(G){Tt(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++)Vy(D[p],A)}catch(G){Tt(c,c.return,G)}}i&&w&64&&Wb(g),Fl(g,g.return);break;case 27:av(g);case 26:case 5:Ds(p,g,i),i&&c===null&&w&4&&tv(g),Fl(g,g.return);break;case 12:Ds(p,g,i);break;case 31:Ds(p,g,i),i&&w&4&&lv(p,g);break;case 13:Ds(p,g,i),i&&w&4&&cv(p,g);break;case 22:g.memoizedState===null&&Ds(p,g,i),Fl(g,g.return);break;case 30:break;default:Ds(p,g,i)}a=a.sibling}}function Nh(t,a){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&zl(i))}function Ch(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&zl(t))}function Ua(t,a,i,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)mv(t,a,i,c),a=a.sibling}function mv(t,a,i,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:Ua(t,a,i,c),p&2048&&Hl(9,a);break;case 1:Ua(t,a,i,c);break;case 3:Ua(t,a,i,c),p&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&zl(t)));break;case 12:if(p&2048){Ua(t,a,i,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){Tt(a,a.return,D)}}else Ua(t,a,i,c);break;case 31:Ua(t,a,i,c);break;case 13:Ua(t,a,i,c);break;case 23:break;case 22:g=a.stateNode,w=a.alternate,a.memoizedState!==null?g._visibility&2?Ua(t,a,i,c):Ql(t,a):g._visibility&2?Ua(t,a,i,c):(g._visibility|=2,fr(t,a,i,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&Nh(w,a);break;case 24:Ua(t,a,i,c),p&2048&&Ch(a.alternate,a);break;default:Ua(t,a,i,c)}}function fr(t,a,i,c,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=t,w=a,A=i,D=c,G=w.flags;switch(w.tag){case 0:case 11:case 15:fr(g,w,A,D,p),Hl(8,w);break;case 23:break;case 22:var ee=w.stateNode;w.memoizedState!==null?ee._visibility&2?fr(g,w,A,D,p):Ql(g,w):(ee._visibility|=2,fr(g,w,A,D,p)),p&&G&2048&&Nh(w.alternate,w);break;case 24:fr(g,w,A,D,p),p&&G&2048&&Ch(w.alternate,w);break;default:fr(g,w,A,D,p)}a=a.sibling}}function Ql(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var i=t,c=a,p=c.flags;switch(c.tag){case 22:Ql(i,c),p&2048&&Nh(c.alternate,c);break;case 24:Ql(i,c),p&2048&&Ch(c.alternate,c);break;default:Ql(i,c)}a=a.sibling}}var Zl=8192;function gr(t,a,i){if(t.subtreeFlags&Zl)for(t=t.child;t!==null;)pv(t,a,i),t=t.sibling}function pv(t,a,i){switch(t.tag){case 26:gr(t,a,i),t.flags&Zl&&t.memoizedState!==null&&r_(i,La,t.memoizedState,t.memoizedProps);break;case 5:gr(t,a,i);break;case 3:case 4:var c=La;La=td(t.stateNode.containerInfo),gr(t,a,i),La=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=Zl,Zl=16777216,gr(t,a,i),Zl=c):gr(t,a,i));break;default:gr(t,a,i)}}function hv(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 Yl(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var i=0;i<a.length;i++){var c=a[i];xn=c,gv(c,t)}hv(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)fv(t),t=t.sibling}function fv(t){switch(t.tag){case 0:case 11:case 15:Yl(t),t.flags&2048&&di(9,t,t.return);break;case 3:Yl(t);break;case 12:Yl(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,Vu(t)):Yl(t);break;default:Yl(t)}}function Vu(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var i=0;i<a.length;i++){var c=a[i];xn=c,gv(c,t)}hv(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:di(8,a,a.return),Vu(a);break;case 22:i=a.stateNode,i._visibility&2&&(i._visibility&=-3,Vu(a));break;default:Vu(a)}t=t.sibling}}function gv(t,a){for(;xn!==null;){var i=xn;switch(i.tag){case 0:case 11:case 15:di(8,i,a);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var c=i.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:zl(i.memoizedState.cache)}if(c=i.child,c!==null)c.return=i,xn=c;else e:for(i=t;xn!==null;){c=xn;var p=c.sibling,g=c.return;if(ov(c),c===i){xn=null;break e}if(p!==null){p.return=g,xn=p;break e}xn=g}}}var S5={getCacheForType:function(t){var a=Cn(rn),i=a.data.get(t);return i===void 0&&(i=t(),a.data.set(t,i)),i},cacheSignal:function(){return Cn(rn).controller.signal}},k5=typeof WeakMap=="function"?WeakMap:Map,jt=0,It=null,rt=null,ut=0,_t=0,ra=null,mi=!1,yr=!1,_h=!1,zs=0,Wt=0,pi=0,mo=0,Th=0,la=0,br=0,Xl=null,Qn=null,Eh=!1,$u=0,yv=0,Ku=1/0,Gu=null,hi=null,pn=0,fi=null,vr=null,Is=0,Rh=0,Dh=null,bv=null,Jl=0,zh=null;function ca(){return(jt&2)!==0&&ut!==0?ut&-ut:B.T!==null?Bh():Ko()}function vv(){if(la===0)if((ut&536870912)===0||ht){var t=ze;ze<<=1,(ze&3932160)===0&&(ze=262144),la=t}else la=536870912;return t=ia.current,t!==null&&(t.flags|=32),la}function Zn(t,a,i){(t===It&&(_t===2||_t===9)||t.cancelPendingCommit!==null)&&(xr(t,0),gi(t,ut,la,!1)),Hi(t,i),((jt&2)===0||t!==It)&&(t===It&&((jt&2)===0&&(mo|=i),Wt===4&&gi(t,ut,la,!1)),as(t))}function xv(t,a,i){if((jt&6)!==0)throw Error(r(327));var c=!i&&(a&127)===0&&(a&t.expiredLanes)===0||kt(t,a),p=c?N5(t,a):Oh(t,a,!0),g=c;do{if(p===0){yr&&!c&&gi(t,a,0,!1);break}else{if(i=t.current.alternate,g&&!j5(i)){p=Oh(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=Xl;var D=A.current.memoizedState.isDehydrated;if(D&&(xr(A,w).flags|=256),w=Oh(A,w,!1),w!==2){if(_h&&!D){A.errorRecoveryDisabledLanes|=g,mo|=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){xr(t,0),gi(t,a,0,!0);break}e:{switch(c=t,g=p,g){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:gi(c,a,la,!mi);break e;case 2:Qn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(p=$u+300-Vt(),10<p)){if(gi(c,a,la,!mi),et(c,0,!0)!==0)break e;Is=a,c.timeoutHandle=Xv(wv.bind(null,c,i,Qn,Gu,Eh,a,la,mo,br,mi,g,"Throttled",-0,0),p);break e}wv(c,i,Qn,Gu,Eh,a,la,mo,br,mi,g,null,-0,0)}}break}while(!0);as(t)}function wv(t,a,i,c,p,g,w,A,D,G,ee,se,F,Y){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:qa},pv(a,g,se);var Te=(g&62914560)===g?$u-Vt():(g&4194048)===g?yv-Vt():0;if(Te=l_(se,Te),Te!==null){Is=g,t.cancelPendingCommit=Te(Tv.bind(null,t,a,g,i,c,p,w,A,D,ee,se,null,F,Y)),gi(t,g,w,!G);return}}Tv(t,a,g,i,c,p,w,A,D)}function j5(t){for(var a=t;;){var i=a.tag;if((i===0||i===11||i===15)&&a.flags&16384&&(i=a.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var c=0;c<i.length;c++){var p=i[c],g=p.getSnapshot;p=p.value;try{if(!aa(g(),p))return!1}catch{return!1}}if(i=a.child,a.subtreeFlags&16384&&i!==null)i.return=a,a=i;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 gi(t,a,i,c){a&=~Th,a&=~mo,t.suspendedLanes|=a,t.pingedLanes&=~a,c&&(t.warmLanes|=a),c=t.expirationTimes;for(var p=a;0<p;){var g=31-Zt(p),w=1<<g;c[g]=-1,p&=~w}i!==0&&ol(t,i,a)}function Hu(){return(jt&6)===0?(Wl(0),!1):!0}function Ih(){if(rt!==null){if(_t===0)var t=rt.return;else t=rt,ks=no=null,Yp(t),ur=null,Ol=0,t=rt;for(;t!==null;)Jb(t.alternate,t),t=t.return;rt=null}}function xr(t,a){var i=t.timeoutHandle;i!==-1&&(t.timeoutHandle=-1,K5(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),Is=0,Ih(),It=t,rt=i=ws(t.current,null),ut=a,_t=0,ra=null,mi=!1,yr=kt(t,a),_h=!1,br=la=Th=mo=pi=Wt=0,Qn=Xl=null,Eh=!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-Zt(c),g=1<<p;a|=t[p],c&=~g}return zs=a,pu(),i}function Sv(t,a){nt=null,B.H=$l,a===cr||a===wu?(a=My(),_t=3):a===Mp?(a=My(),_t=4):_t=a===mh?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,ra=a,rt===null&&(Wt=1,Ou(t,wa(a,t.current)))}function kv(){var t=ia.current;return t===null?!0:(ut&4194048)===ut?Aa===null:(ut&62914560)===ut||(ut&536870912)!==0?t===Aa:!1}function jv(){var t=B.H;return B.H=$l,t===null?$l:t}function Av(){var t=B.A;return B.A=S5,t}function Fu(){Wt=4,mi||(ut&4194048)!==ut&&ia.current!==null||(yr=!0),(pi&134217727)===0&&(mo&134217727)===0||It===null||gi(It,ut,la,!1)}function Oh(t,a,i){var c=jt;jt|=2;var p=jv(),g=Av();(It!==t||ut!==a)&&(Gu=null,xr(t,a)),a=!1;var w=Wt;e:do try{if(_t!==0&&rt!==null){var A=rt,D=ra;switch(_t){case 8:Ih(),w=6;break e;case 3:case 2:case 9:case 6:ia.current===null&&(a=!0);var G=_t;if(_t=0,ra=null,wr(t,A,D,G),i&&yr){w=0;break e}break;default:G=_t,_t=0,ra=null,wr(t,A,D,G)}}A5(),w=Wt;break}catch(ee){Sv(t,ee)}while(!0);return a&&t.shellSuspendCounter++,ks=no=null,jt=c,B.H=p,B.A=g,rt===null&&(It=null,ut=0,pu()),w}function A5(){for(;rt!==null;)Nv(rt)}function N5(t,a){var i=jt;jt|=2;var c=jv(),p=Av();It!==t||ut!==a?(Gu=null,Ku=Vt()+500,xr(t,a)):yr=kt(t,a);e:do try{if(_t!==0&&rt!==null){a=rt;var g=ra;t:switch(_t){case 1:_t=0,ra=null,wr(t,a,g,1);break;case 2:case 9:if(Py(g)){_t=0,ra=null,Cv(a);break}a=function(){_t!==2&&_t!==9||It!==t||(_t=7),as(t)},g.then(a,a);break e;case 3:_t=7;break e;case 4:_t=5;break e;case 7:Py(g)?(_t=0,ra=null,Cv(a)):(_t=0,ra=null,wr(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?mx(w):A.stateNode.complete){_t=0,ra=null;var D=A.sibling;if(D!==null)rt=D;else{var G=A.return;G!==null?(rt=G,Qu(G)):rt=null}break t}}_t=0,ra=null,wr(t,a,g,5);break;case 6:_t=0,ra=null,wr(t,a,g,6);break;case 8:Ih(),Wt=6;break e;default:throw Error(r(462))}}C5();break}catch(ee){Sv(t,ee)}while(!0);return ks=no=null,B.H=c,B.A=p,jt=i,rt!==null?0:(It=null,ut=0,pu(),Wt)}function C5(){for(;rt!==null&&!Qt();)Nv(rt)}function Nv(t){var a=Yb(t.alternate,t,zs);t.memoizedProps=t.pendingProps,a===null?Qu(t):rt=a}function Cv(t){var a=t,i=a.alternate;switch(a.tag){case 15:case 0:a=Kb(i,a,a.pendingProps,a.type,void 0,ut);break;case 11:a=Kb(i,a,a.pendingProps,a.type.render,a.ref,ut);break;case 5:Yp(a);default:Jb(i,a),a=rt=Ay(a,zs),a=Yb(i,a,zs)}t.memoizedProps=t.pendingProps,a===null?Qu(t):rt=a}function wr(t,a,i,c){ks=no=null,Yp(a),ur=null,Ol=0;var p=a.return;try{if(f5(t,p,a,i,ut)){Wt=1,Ou(t,wa(i,t.current)),rt=null;return}}catch(g){if(p!==null)throw rt=p,g;Wt=1,Ou(t,wa(i,t.current)),rt=null;return}a.flags&32768?(ht||c===1?t=!0:yr||(ut&536870912)!==0?t=!1:(mi=t=!0,(c===2||c===9||c===3||c===6)&&(c=ia.current,c!==null&&c.tag===13&&(c.flags|=16384))),_v(a,t)):Qu(a)}function Qu(t){var a=t;do{if((a.flags&32768)!==0){_v(a,mi);return}t=a.return;var i=b5(a.alternate,a,zs);if(i!==null){rt=i;return}if(a=a.sibling,a!==null){rt=a;return}rt=a=t}while(a!==null);Wt===0&&(Wt=5)}function _v(t,a){do{var i=v5(t.alternate,t);if(i!==null){i.flags&=32767,rt=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!a&&(t=t.sibling,t!==null)){rt=t;return}rt=t=i}while(t!==null);Wt=6,rt=null}function Tv(t,a,i,c,p,g,w,A,D){t.cancelPendingCommit=null;do Zu();while(pn!==0);if((jt&6)!==0)throw Error(r(327));if(a!==null){if(a===t.current)throw Error(r(177));if(g=a.lanes|a.childLanes,g|=kp,ou(t,i,g,w,A,D),t===It&&(rt=It=null,ut=0),vr=a,fi=t,Is=i,Rh=g,Dh=p,bv=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,R5(Rn,function(){return Iv(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=B.T,B.T=null,p=W.p,W.p=2,w=jt,jt|=4;try{x5(t,a,i)}finally{jt=w,W.p=p,B.T=c}}pn=1,Ev(),Rv(),Dv()}}function Ev(){if(pn===1){pn=0;var t=fi,a=vr,i=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||i){i=B.T,B.T=null;var c=W.p;W.p=2;var p=jt;jt|=4;try{uv(a,t);var g=Fh,w=gy(t.containerInfo),A=g.focusedElem,D=g.selectionRange;if(w!==A&&A&&A.ownerDocument&&fy(A.ownerDocument.documentElement,A)){if(D!==null&&bp(A)){var G=D.start,ee=D.end;if(ee===void 0&&(ee=G),"selectionStart"in A)A.selectionStart=G,A.selectionEnd=Math.min(ee,A.value.length);else{var se=A.ownerDocument||document,F=se&&se.defaultView||window;if(F.getSelection){var Y=F.getSelection(),Te=A.textContent.length,Fe=Math.min(D.start,Te),zt=D.end===void 0?Fe:Math.min(D.end,Te);!Y.extend&&Fe>zt&&(w=zt,zt=Fe,Fe=w);var U=hy(A,Fe),O=hy(A,zt);if(U&&O&&(Y.rangeCount!==1||Y.anchorNode!==U.node||Y.anchorOffset!==U.offset||Y.focusNode!==O.node||Y.focusOffset!==O.offset)){var K=se.createRange();K.setStart(U.node,U.offset),Y.removeAllRanges(),Fe>zt?(Y.addRange(K),Y.extend(O.node,O.offset)):(K.setEnd(O.node,O.offset),Y.addRange(K))}}}}for(se=[],Y=A;Y=Y.parentNode;)Y.nodeType===1&&se.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<se.length;A++){var ne=se[A];ne.element.scrollLeft=ne.left,ne.element.scrollTop=ne.top}}rd=!!Hh,Fh=Hh=null}finally{jt=p,W.p=c,B.T=i}}t.current=a,pn=2}}function Rv(){if(pn===2){pn=0;var t=fi,a=vr,i=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||i){i=B.T,B.T=null;var c=W.p;W.p=2;var p=jt;jt|=4;try{iv(t,a.alternate,a)}finally{jt=p,W.p=c,B.T=i}}pn=3}}function Dv(){if(pn===4||pn===3){pn=0,En();var t=fi,a=vr,i=Is,c=bv;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?pn=5:(pn=0,vr=fi=null,zv(t,t.pendingLanes));var p=t.pendingLanes;if(p===0&&(hi=null),ul(i),a=a.stateNode,Et&&typeof Et.onCommitFiberRoot=="function")try{Et.onCommitFiberRoot(vn,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=B.T,p=W.p,W.p=2,B.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{B.T=a,W.p=p}}(Is&3)!==0&&Zu(),as(t),p=t.pendingLanes,(i&261930)!==0&&(p&42)!==0?t===zh?Jl++:(Jl=0,zh=t):Jl=0,Wl(0)}}function zv(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,zl(a)))}function Zu(){return Ev(),Rv(),Dv(),Iv()}function Iv(){if(pn!==5)return!1;var t=fi,a=Rh;Rh=0;var i=ul(Is),c=B.T,p=W.p;try{W.p=32>i?32:i,B.T=null,i=Dh,Dh=null;var g=fi,w=Is;if(pn=0,vr=fi=null,Is=0,(jt&6)!==0)throw Error(r(331));var A=jt;if(jt|=4,fv(g.current),mv(g,g.current,w,i),jt=A,Wl(0,!1),Et&&typeof Et.onPostCommitFiberRoot=="function")try{Et.onPostCommitFiberRoot(vn,g)}catch{}return!0}finally{W.p=p,B.T=c,zv(t,a)}}function Ov(t,a,i){a=wa(i,a),a=dh(t.stateNode,a,2),t=li(t,a,2),t!==null&&(Hi(t,2),as(t))}function Tt(t,a,i){if(t.tag===3)Ov(t,t,i);else for(;a!==null;){if(a.tag===3){Ov(a,t,i);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(hi===null||!hi.has(c))){t=wa(i,t),i=Pb(2),c=li(a,i,2),c!==null&&(qb(i,c,a,t),Hi(c,2),as(c));break}}a=a.return}}function Ph(t,a,i){var c=t.pingCache;if(c===null){c=t.pingCache=new k5;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(i)||(_h=!0,p.add(i),t=_5.bind(null,t,a,i),a.then(t,t))}function _5(t,a,i){var c=t.pingCache;c!==null&&c.delete(a),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,It===t&&(ut&i)===i&&(Wt===4||Wt===3&&(ut&62914560)===ut&&300>Vt()-$u?(jt&2)===0&&xr(t,0):Th|=i,br===ut&&(br=0)),as(t)}function Pv(t,a){a===0&&(a=hs()),t=Wi(t,a),t!==null&&(Hi(t,a),as(t))}function T5(t){var a=t.memoizedState,i=0;a!==null&&(i=a.retryLane),Pv(t,i)}function E5(t,a){var i=0;switch(t.tag){case 31:case 13:var c=t.stateNode,p=t.memoizedState;p!==null&&(i=p.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(a),Pv(t,i)}function R5(t,a){return ct(t,a)}var Yu=null,Sr=null,qh=!1,Xu=!1,Mh=!1,yi=0;function as(t){t!==Sr&&t.next===null&&(Sr===null?Yu=Sr=t:Sr=Sr.next=t),Xu=!0,qh||(qh=!0,z5())}function Wl(t,a){if(!Mh&&Xu){Mh=!0;do for(var i=!1,c=Yu;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-Zt(42|t)+1)-1,g&=p&~(w&~A),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(i=!0,Lv(c,g))}else g=ut,g=et(c,c===It?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||kt(c,g)||(i=!0,Lv(c,g));c=c.next}while(i);Mh=!1}}function D5(){qv()}function qv(){Xu=qh=!1;var t=0;yi!==0&&$5()&&(t=yi);for(var a=Vt(),i=null,c=Yu;c!==null;){var p=c.next,g=Mv(c,a);g===0?(c.next=null,i===null?Yu=p:i.next=p,p===null&&(Sr=i)):(i=c,(t!==0||(g&3)!==0)&&(Xu=!0)),c=p}pn!==0&&pn!==5||Wl(t),yi!==0&&(yi=0)}function Mv(t,a){for(var i=t.suspendedLanes,c=t.pingedLanes,p=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var w=31-Zt(g),A=1<<w,D=p[w];D===-1?((A&i)===0||(A&c)!==0)&&(p[w]=sn(A,a)):D<=a&&(t.expiredLanes|=A),g&=~A}if(a=It,i=ut,i=et(t,t===a?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,i===0||t===a&&(_t===2||_t===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&Ft(c),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||kt(t,i)){if(a=i&-i,a===t.callbackPriority)return a;switch(c!==null&&Ft(c),ul(i)){case 2:case 8:i=ms;break;case 32:i=Rn;break;case 268435456:i=$i;break;default:i=Rn}return c=Bv.bind(null,t),i=ct(i,c),t.callbackPriority=a,t.callbackNode=i,a}return c!==null&&c!==null&&Ft(c),t.callbackPriority=2,t.callbackNode=null,2}function Bv(t,a){if(pn!==0&&pn!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(Zu()&&t.callbackNode!==i)return null;var c=ut;return c=et(t,t===It?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(xv(t,c,a),Mv(t,Vt()),t.callbackNode!=null&&t.callbackNode===i?Bv.bind(null,t):null)}function Lv(t,a){if(Zu())return null;xv(t,a,!0)}function z5(){G5(function(){(jt&6)!==0?ct(Vi,D5):qv()})}function Bh(){if(yi===0){var t=rr;t===0&&(t=oe,oe<<=1,(oe&261888)===0&&(oe=256)),yi=t}return yi}function Uv(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Yo(""+t)}function Vv(t,a){var i=a.ownerDocument.createElement("input");return i.name=a.name,i.value=a.value,t.id&&i.setAttribute("form",t.id),a.parentNode.insertBefore(i,a),t=new FormData(t),i.parentNode.removeChild(i),t}function I5(t,a,i,c,p){if(a==="submit"&&i&&i.stateNode===p){var g=Uv((p[Dn]||null).action),w=c.submitter;w&&(a=(a=w[Dn]||null)?Uv(a.formAction):w.getAttribute("formAction"),a!==null&&(g=a,w=null));var A=new Wa("action","action",null,c,p);t.push({event:A,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(yi!==0){var D=w?Vv(p,w):new FormData(p);ih(i,{pending:!0,data:D,method:p.method,action:g},null,D)}}else typeof g=="function"&&(A.preventDefault(),D=w?Vv(p,w):new FormData(p),ih(i,{pending:!0,data:D,method:p.method,action:g},g,D))},currentTarget:p}]})}}for(var Lh=0;Lh<Sp.length;Lh++){var Uh=Sp[Lh],O5=Uh.toLowerCase(),P5=Uh[0].toUpperCase()+Uh.slice(1);Ba(O5,"on"+P5)}Ba(vy,"onAnimationEnd"),Ba(xy,"onAnimationIteration"),Ba(wy,"onAnimationStart"),Ba("dblclick","onDoubleClick"),Ba("focusin","onFocus"),Ba("focusout","onBlur"),Ba(J4,"onTransitionRun"),Ba(W4,"onTransitionStart"),Ba(e5,"onTransitionCancel"),Ba(Sy,"onTransitionEnd"),Fi("onMouseEnter",["mouseout","mouseover"]),Fi("onMouseLeave",["mouseout","mouseover"]),Fi("onPointerEnter",["pointerout","pointerover"]),Fi("onPointerLeave",["pointerout","pointerover"]),Qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ec="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(" "),q5=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ec));function $v(t,a){a=(a&4)!==0;for(var i=0;i<t.length;i++){var c=t[i],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(ee){mu(ee)}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(ee){mu(ee)}p.currentTarget=null,g=D}}}}function lt(t,a){var i=a[Go];i===void 0&&(i=a[Go]=new Set);var c=t+"__bubble";i.has(c)||(Kv(a,t,2,!1),i.add(c))}function Vh(t,a,i){var c=0;a&&(c|=4),Kv(i,t,c,a)}var Ju="_reactListening"+Math.random().toString(36).slice(2);function $h(t){if(!t[Ju]){t[Ju]=!0,ml.forEach(function(i){i!=="selectionchange"&&(q5.has(i)||Vh(i,!1,t),Vh(i,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[Ju]||(a[Ju]=!0,Vh("selectionchange",!1,a))}}function Kv(t,a,i,c){switch(vx(a)){case 2:var p=d_;break;case 8:p=m_;break;default:p=sf}i=p.bind(null,a,i,t),p=void 0,!Sl||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),c?p!==void 0?t.addEventListener(a,i,{capture:!0,passive:p}):t.addEventListener(a,i,!0):p!==void 0?t.addEventListener(a,i,{passive:p}):t.addEventListener(a,i,!1)}function Kh(t,a,i,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=fs(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}wl(function(){var G=g,ee=vl(i),se=[];e:{var F=ky.get(t);if(F!==void 0){var Y=Wa,Te=t;switch(t){case"keypress":if(ti(i)===0)break e;case"keydown":case"keyup":Y=E4;break;case"focusin":Te="focus",Y=pp;break;case"focusout":Te="blur",Y=pp;break;case"beforeblur":case"afterblur":Y=pp;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=J1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=b4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=z4;break;case vy:case xy:case wy:Y=w4;break;case Sy:Y=O4;break;case"scroll":case"scrollend":Y=g4;break;case"wheel":Y=q4;break;case"copy":case"cut":case"paste":Y=k4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=ey;break;case"toggle":case"beforetoggle":Y=B4}var Fe=(a&4)!==0,zt=!Fe&&(t==="scroll"||t==="scrollend"),U=Fe?F!==null?F+"Capture":null:F;Fe=[];for(var O=G,K;O!==null;){var ne=O;if(K=ne.stateNode,ne=ne.tag,ne!==5&&ne!==26&&ne!==27||K===null||U===null||(ne=Zi(O,U),ne!=null&&Fe.push(tc(O,ne,K))),zt)break;O=O.return}0<Fe.length&&(F=new Y(F,Te,null,i,ee),se.push({event:F,listeners:Fe}))}}if((a&7)===0){e:{if(F=t==="mouseover"||t==="pointerover",Y=t==="mouseout"||t==="pointerout",F&&i!==bl&&(Te=i.relatedTarget||i.fromElement)&&(fs(Te)||Te[Qs]))break e;if((Y||F)&&(F=ee.window===ee?ee:(F=ee.ownerDocument)?F.defaultView||F.parentWindow:window,Y?(Te=i.relatedTarget||i.toElement,Y=G,Te=Te?fs(Te):null,Te!==null&&(zt=h(Te),Fe=Te.tag,Te!==zt||Fe!==5&&Fe!==27&&Fe!==6)&&(Te=null)):(Y=null,Te=G),Y!==Te)){if(Fe=J1,ne="onMouseLeave",U="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(Fe=ey,ne="onPointerLeave",U="onPointerEnter",O="pointer"),zt=Y==null?F:Xs(Y),K=Te==null?F:Xs(Te),F=new Fe(ne,O+"leave",Y,i,ee),F.target=zt,F.relatedTarget=K,ne=null,fs(ee)===G&&(Fe=new Fe(U,O+"enter",Te,i,ee),Fe.target=K,Fe.relatedTarget=zt,ne=Fe),zt=ne,Y&&Te)t:{for(Fe=M5,U=Y,O=Te,K=0,ne=U;ne;ne=Fe(ne))K++;ne=0;for(var Ge=O;Ge;Ge=Fe(Ge))ne++;for(;0<K-ne;)U=Fe(U),K--;for(;0<ne-K;)O=Fe(O),ne--;for(;K--;){if(U===O||O!==null&&U===O.alternate){Fe=U;break t}U=Fe(U),O=Fe(O)}Fe=null}else Fe=null;Y!==null&&Gv(se,F,Y,Fe,!1),Te!==null&&zt!==null&&Gv(se,zt,Te,Fe,!0)}}e:{if(F=G?Xs(G):window,Y=F.nodeName&&F.nodeName.toLowerCase(),Y==="select"||Y==="input"&&F.type==="file")var vt=ly;else if(oy(F))if(cy)vt=Z4;else{vt=F4;var Ie=H4}else Y=F.nodeName,!Y||Y.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?G&&Pa(G.elementType)&&(vt=ly):vt=Q4;if(vt&&(vt=vt(t,G))){ry(se,vt,i,ee);break e}Ie&&Ie(t,F,G),t==="focusout"&&G&&F.type==="number"&&G.memoizedProps.value!=null&&Qo(F,"number",F.value)}switch(Ie=G?Xs(G):window,t){case"focusin":(oy(Ie)||Ie.contentEditable==="true")&&(Wo=Ie,vp=G,El=null);break;case"focusout":El=vp=Wo=null;break;case"mousedown":xp=!0;break;case"contextmenu":case"mouseup":case"dragend":xp=!1,yy(se,i,ee);break;case"selectionchange":if(X4)break;case"keydown":case"keyup":yy(se,i,ee)}var st;if(fp)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 Jo?sy(t,i)&&(dt="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(dt="onCompositionStart");dt&&(ty&&i.locale!=="ko"&&(Jo||dt!=="onCompositionStart"?dt==="onCompositionEnd"&&Jo&&(st=vs()):(Ja=ee,H="value"in Ja?Ja.value:Ja.textContent,Jo=!0)),Ie=Wu(G,dt),0<Ie.length&&(dt=new W1(dt,t,null,i,ee),se.push({event:dt,listeners:Ie}),st?dt.data=st:(st=iy(i),st!==null&&(dt.data=st)))),(st=U4?V4(t,i):$4(t,i))&&(dt=Wu(G,"onBeforeInput"),0<dt.length&&(Ie=new W1("onBeforeInput","beforeinput",null,i,ee),se.push({event:Ie,listeners:dt}),Ie.data=st)),I5(se,t,G,i,ee)}$v(se,a)})}function tc(t,a,i){return{instance:t,listener:a,currentTarget:i}}function Wu(t,a){for(var i=a+"Capture",c=[];t!==null;){var p=t,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=Zi(t,i),p!=null&&c.unshift(tc(t,p,g)),p=Zi(t,a),p!=null&&c.push(tc(t,p,g))),t.tag===3)return c;t=t.return}return[]}function M5(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Gv(t,a,i,c,p){for(var g=a._reactName,w=[];i!==null&&i!==c;){var A=i,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=Zi(i,g),G!=null&&w.unshift(tc(i,G,D))):p||(G=Zi(i,g),G!=null&&w.push(tc(i,G,D)))),i=i.return}w.length!==0&&t.push({event:a,listeners:w})}var B5=/\r\n?/g,L5=/\u0000|\uFFFD/g;function Hv(t){return(typeof t=="string"?t:""+t).replace(B5,`
10
+ `).replace(L5,"")}function Fv(t,a){return a=Hv(a),Hv(t)===a}function Dt(t,a,i,c,p,g){switch(i){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":Qi(t,"class",c);break;case"tabIndex":Qi(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Qi(t,i,c);break;case"style":Xa(t,c,g);break;case"data":if(a!=="object"){Qi(t,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||i!=="href")){t.removeAttribute(i);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(i);break}c=Yo(""+c),t.setAttribute(i,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(i,"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"&&(i==="formAction"?(a!=="input"&&Dt(t,a,"name",p.name,p,null),Dt(t,a,"formEncType",p.formEncType,p,null),Dt(t,a,"formMethod",p.formMethod,p,null),Dt(t,a,"formTarget",p.formTarget,p,null)):(Dt(t,a,"encType",p.encType,p,null),Dt(t,a,"method",p.method,p,null),Dt(t,a,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(i);break}c=Yo(""+c),t.setAttribute(i,c);break;case"onClick":c!=null&&(t.onclick=qa);break;case"onScroll":c!=null&&lt("scroll",t);break;case"onScrollEnd":c!=null&&lt("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(i=c.__html,i!=null){if(p.children!=null)throw Error(r(60));t.innerHTML=i}}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}i=Yo(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);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(i,""+c):t.removeAttribute(i);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(i,""):t.removeAttribute(i);break;case"capture":case"download":c===!0?t.setAttribute(i,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(i,c):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(i,c):t.removeAttribute(i);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(i):t.setAttribute(i,c);break;case"popover":lt("beforetoggle",t),lt("toggle",t),gs(t,"popover",c);break;case"xlinkActuate":jn(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":jn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":jn(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":jn(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":jn(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":jn(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":jn(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":jn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":jn(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":gs(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Zo.get(i)||i,gs(t,i,c))}}function Gh(t,a,i,c,p,g){switch(i){case"style":Xa(t,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(i=c.__html,i!=null){if(p.children!=null)throw Error(r(60));t.innerHTML=i}}break;case"children":typeof c=="string"?ya(t,c):(typeof c=="number"||typeof c=="bigint")&&ya(t,""+c);break;case"onScroll":c!=null&&lt("scroll",t);break;case"onScrollEnd":c!=null&&lt("scrollend",t);break;case"onClick":c!=null&&(t.onclick=qa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!pl.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(p=i.endsWith("Capture"),a=i.slice(2,p?i.length-7:void 0),g=t[Dn]||null,g=g!=null?g[i]:null,typeof g=="function"&&t.removeEventListener(a,g,p),typeof c=="function")){typeof g!="function"&&g!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(a,c,p);break e}i in t?t[i]=c:c===!0?t.setAttribute(i,""):gs(t,i,c)}}}function Tn(t,a,i){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 i)if(i.hasOwnProperty(g)){var w=i[g];if(w!=null)switch(g){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Dt(t,a,g,w,i,null)}}p&&Dt(t,a,"srcSet",i.srcSet,i,null),c&&Dt(t,a,"src",i.src,i,null);return;case"input":lt("invalid",t);var A=g=w=p=null,D=null,G=null;for(c in i)if(i.hasOwnProperty(c)){var ee=i[c];if(ee!=null)switch(c){case"name":p=ee;break;case"type":w=ee;break;case"checked":D=ee;break;case"defaultChecked":G=ee;break;case"value":g=ee;break;case"defaultValue":A=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,a));break;default:Dt(t,a,c,ee,i,null)}}yl(t,g,A,D,G,w,p,!1);return;case"select":lt("invalid",t),c=w=g=null;for(p in i)if(i.hasOwnProperty(p)&&(A=i[p],A!=null))switch(p){case"value":g=A;break;case"defaultValue":w=A;break;case"multiple":c=A;default:Dt(t,a,p,A,i,null)}a=g,i=w,t.multiple=!!c,a!=null?Kn(t,!!c,a,!1):i!=null&&Kn(t,!!c,i,!0);return;case"textarea":lt("invalid",t),g=p=c=null;for(w in i)if(i.hasOwnProperty(w)&&(A=i[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(r(91));break;default:Dt(t,a,w,A,i,null)}ys(t,c,p,g);return;case"option":for(D in i)i.hasOwnProperty(D)&&(c=i[D],c!=null)&&(D==="selected"?t.selected=c&&typeof c!="function"&&typeof c!="symbol":Dt(t,a,D,c,i,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<ec.length;c++)lt(ec[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 i)if(i.hasOwnProperty(G)&&(c=i[G],c!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Dt(t,a,G,c,i,null)}return;default:if(Pa(a)){for(ee in i)i.hasOwnProperty(ee)&&(c=i[ee],c!==void 0&&Gh(t,a,ee,c,i,void 0));return}}for(A in i)i.hasOwnProperty(A)&&(c=i[A],c!=null&&Dt(t,a,A,c,i,null))}function U5(t,a,i,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,ee=null;for(Y in i){var se=i[Y];if(i.hasOwnProperty(Y)&&se!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":D=se;default:c.hasOwnProperty(Y)||Dt(t,a,Y,null,c,se)}}for(var F in c){var Y=c[F];if(se=i[F],c.hasOwnProperty(F)&&(Y!=null||se!=null))switch(F){case"type":g=Y;break;case"name":p=Y;break;case"checked":G=Y;break;case"defaultChecked":ee=Y;break;case"value":w=Y;break;case"defaultValue":A=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(r(137,a));break;default:Y!==se&&Dt(t,a,F,Y,c,se)}}Fo(t,w,A,D,G,ee,g,p);return;case"select":Y=w=A=F=null;for(g in i)if(D=i[g],i.hasOwnProperty(g)&&D!=null)switch(g){case"value":break;case"multiple":Y=D;default:c.hasOwnProperty(g)||Dt(t,a,g,null,c,D)}for(p in c)if(g=c[p],D=i[p],c.hasOwnProperty(p)&&(g!=null||D!=null))switch(p){case"value":F=g;break;case"defaultValue":A=g;break;case"multiple":w=g;default:g!==D&&Dt(t,a,p,g,c,D)}a=A,i=w,c=Y,F!=null?Kn(t,!!i,F,!1):!!c!=!!i&&(a!=null?Kn(t,!!i,a,!0):Kn(t,!!i,i?[]:"",!1));return;case"textarea":Y=F=null;for(A in i)if(p=i[A],i.hasOwnProperty(A)&&p!=null&&!c.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:Dt(t,a,A,null,c,p)}for(w in c)if(p=c[w],g=i[w],c.hasOwnProperty(w)&&(p!=null||g!=null))switch(w){case"value":F=p;break;case"defaultValue":Y=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==g&&Dt(t,a,w,p,c,g)}na(t,F,Y);return;case"option":for(var Te in i)F=i[Te],i.hasOwnProperty(Te)&&F!=null&&!c.hasOwnProperty(Te)&&(Te==="selected"?t.selected=!1:Dt(t,a,Te,null,c,F));for(D in c)F=c[D],Y=i[D],c.hasOwnProperty(D)&&F!==Y&&(F!=null||Y!=null)&&(D==="selected"?t.selected=F&&typeof F!="function"&&typeof F!="symbol":Dt(t,a,D,F,c,Y));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 Fe in i)F=i[Fe],i.hasOwnProperty(Fe)&&F!=null&&!c.hasOwnProperty(Fe)&&Dt(t,a,Fe,null,c,F);for(G in c)if(F=c[G],Y=i[G],c.hasOwnProperty(G)&&F!==Y&&(F!=null||Y!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(r(137,a));break;default:Dt(t,a,G,F,c,Y)}return;default:if(Pa(a)){for(var zt in i)F=i[zt],i.hasOwnProperty(zt)&&F!==void 0&&!c.hasOwnProperty(zt)&&Gh(t,a,zt,void 0,c,F);for(ee in c)F=c[ee],Y=i[ee],!c.hasOwnProperty(ee)||F===Y||F===void 0&&Y===void 0||Gh(t,a,ee,F,c,Y);return}}for(var U in i)F=i[U],i.hasOwnProperty(U)&&F!=null&&!c.hasOwnProperty(U)&&Dt(t,a,U,null,c,F);for(se in c)F=c[se],Y=i[se],!c.hasOwnProperty(se)||F===Y||F==null&&Y==null||Dt(t,a,se,F,c,Y)}function Qv(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function V5(){if(typeof performance.getEntriesByType=="function"){for(var t=0,a=0,i=performance.getEntriesByType("resource"),c=0;c<i.length;c++){var p=i[c],g=p.transferSize,w=p.initiatorType,A=p.duration;if(g&&A&&Qv(w)){for(w=0,A=p.responseEnd,c+=1;c<i.length;c++){var D=i[c],G=D.startTime;if(G>A)break;var ee=D.transferSize,se=D.initiatorType;ee&&Qv(se)&&(D=D.responseEnd,w+=ee*(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 Hh=null,Fh=null;function ed(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 Yv(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 Qh(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 Zh=null;function $5(){var t=window.event;return t&&t.type==="popstate"?t===Zh?!1:(Zh=t,!0):(Zh=null,!1)}var Xv=typeof setTimeout=="function"?setTimeout:void 0,K5=typeof clearTimeout=="function"?clearTimeout:void 0,Jv=typeof Promise=="function"?Promise:void 0,G5=typeof queueMicrotask=="function"?queueMicrotask:typeof Jv<"u"?function(t){return Jv.resolve(null).then(t).catch(H5)}:Xv;function H5(t){setTimeout(function(){throw t})}function bi(t){return t==="head"}function Wv(t,a){var i=a,c=0;do{var p=i.nextSibling;if(t.removeChild(i),p&&p.nodeType===8)if(i=p.data,i==="/$"||i==="/&"){if(c===0){t.removeChild(p),Nr(a);return}c--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")c++;else if(i==="html")nc(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,nc(i);for(var g=i.firstChild;g;){var w=g.nextSibling,A=g.nodeName;g[Zs]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&g.rel.toLowerCase()==="stylesheet"||i.removeChild(g),g=w}}else i==="body"&&nc(t.ownerDocument.body);i=p}while(i);Nr(a)}function ex(t,a){var i=t;t=0;do{var c=i.nextSibling;if(i.nodeType===1?a?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(a?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),c&&c.nodeType===8)if(i=c.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=c}while(i)}function Yh(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var i=a;switch(a=a.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Yh(i),dl(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function F5(t,a,i,c){for(;t.nodeType===1;){var p=i;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[Zs])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 Q5(t,a,i){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=Na(t.nextSibling),t===null))return null;return t}function tx(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 Xh(t){return t.data==="$?"||t.data==="$~"}function Jh(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Z5(t,a){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||i.readyState!=="loading")a();else{var c=function(){a(),i.removeEventListener("DOMContentLoaded",c)};i.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 Wh=null;function nx(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(a===0)return Na(t.nextSibling);a--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||a++}t=t.nextSibling}return null}function ax(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(a===0)return t;a--}else i!=="/$"&&i!=="/&"||a++}t=t.previousSibling}return null}function sx(t,a,i){switch(a=ed(i),t){case"html":if(t=a.documentElement,!t)throw Error(r(452));return t;case"head":if(t=a.head,!t)throw Error(r(453));return t;case"body":if(t=a.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function nc(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);dl(t)}var Ca=new Map,ix=new Set;function td(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Os=W.d;W.d={f:Y5,r:X5,D:J5,C:W5,L:e_,m:t_,X:a_,S:n_,M:s_};function Y5(){var t=Os.f(),a=Hu();return t||a}function X5(t){var a=Ys(t);a!==null&&a.tag===5&&a.type==="form"?Sb(a):Os.r(t)}var kr=typeof document>"u"?null:document;function ox(t,a,i){var c=kr;if(c&&typeof a=="string"&&a){var p=In(a);p='link[rel="'+t+'"][href="'+p+'"]',typeof i=="string"&&(p+='[crossorigin="'+i+'"]'),ix.has(p)||(ix.add(p),t={rel:t,crossOrigin:i,href:a},c.querySelector(p)===null&&(a=c.createElement("link"),Tn(a,"link",t),en(a),c.head.appendChild(a)))}}function J5(t){Os.D(t),ox("dns-prefetch",t,null)}function W5(t,a){Os.C(t,a),ox("preconnect",t,a)}function e_(t,a,i){Os.L(t,a,i);var c=kr;if(c&&t&&a){var p='link[rel="preload"][as="'+In(a)+'"]';a==="image"&&i&&i.imageSrcSet?(p+='[imagesrcset="'+In(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(p+='[imagesizes="'+In(i.imageSizes)+'"]')):p+='[href="'+In(t)+'"]';var g=p;switch(a){case"style":g=jr(t);break;case"script":g=Ar(t)}Ca.has(g)||(t=k({rel:"preload",href:a==="image"&&i&&i.imageSrcSet?void 0:t,as:a},i),Ca.set(g,t),c.querySelector(p)!==null||a==="style"&&c.querySelector(ac(g))||a==="script"&&c.querySelector(sc(g))||(a=c.createElement("link"),Tn(a,"link",t),en(a),c.head.appendChild(a)))}}function t_(t,a){Os.m(t,a);var i=kr;if(i&&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=Ar(t)}if(!Ca.has(g)&&(t=k({rel:"modulepreload",href:t},a),Ca.set(g,t),i.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(sc(g)))return}c=i.createElement("link"),Tn(c,"link",t),en(c),i.head.appendChild(c)}}}function n_(t,a,i){Os.S(t,a,i);var c=kr;if(c&&t){var p=Js(c).hoistableStyles,g=jr(t);a=a||"default";var w=p.get(g);if(!w){var A={loading:0,preload:null};if(w=c.querySelector(ac(g)))A.loading=5;else{t=k({rel:"stylesheet",href:t,"data-precedence":a},i),(i=Ca.get(g))&&ef(t,i);var D=w=c.createElement("link");en(D),Tn(D,"link",t),D._p=new Promise(function(G,ee){D.onload=G,D.onerror=ee}),D.addEventListener("load",function(){A.loading|=1}),D.addEventListener("error",function(){A.loading|=2}),A.loading|=4,nd(w,a,c)}w={type:"stylesheet",instance:w,count:1,state:A},p.set(g,w)}}}function a_(t,a){Os.X(t,a);var i=kr;if(i&&t){var c=Js(i).hoistableScripts,p=Ar(t),g=c.get(p);g||(g=i.querySelector(sc(p)),g||(t=k({src:t,async:!0},a),(a=Ca.get(p))&&tf(t,a),g=i.createElement("script"),en(g),Tn(g,"link",t),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function s_(t,a){Os.M(t,a);var i=kr;if(i&&t){var c=Js(i).hoistableScripts,p=Ar(t),g=c.get(p);g||(g=i.querySelector(sc(p)),g||(t=k({src:t,async:!0,type:"module"},a),(a=Ca.get(p))&&tf(t,a),g=i.createElement("script"),en(g),Tn(g,"link",t),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function rx(t,a,i,c){var p=(p=ue.current)?td(p):null;if(!p)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(a=jr(i.href),i=Js(p).hoistableStyles,c=i.get(a),c||(c={type:"style",instance:null,count:0,state:null},i.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=jr(i.href);var g=Js(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(ac(t)))&&!g._p&&(w.instance=g,w.state.loading=5),Ca.has(t)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Ca.set(t,i),g||i_(p,t,i,w.state))),a&&c===null)throw Error(r(528,""));return w}if(a&&c!==null)throw Error(r(529,""));return null;case"script":return a=i.async,i=i.src,typeof i=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ar(i),i=Js(p).hoistableScripts,c=i.get(a),c||(c={type:"script",instance:null,count:0,state:null},i.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function jr(t){return'href="'+In(t)+'"'}function ac(t){return'link[rel="stylesheet"]['+t+"]"}function lx(t){return k({},t,{"data-precedence":t.precedence,precedence:null})}function i_(t,a,i,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}),Tn(a,"link",i),en(a),t.head.appendChild(a))}function Ar(t){return'[src="'+In(t)+'"]'}function sc(t){return"script[async]"+t}function cx(t,a,i){if(a.count++,a.instance===null)switch(a.type){case"style":var c=t.querySelector('style[data-href~="'+In(i.href)+'"]');if(c)return a.instance=c,en(c),c;var p=k({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),en(c),Tn(c,"style",p),nd(c,i.precedence,t),a.instance=c;case"stylesheet":p=jr(i.href);var g=t.querySelector(ac(p));if(g)return a.state.loading|=4,a.instance=g,en(g),g;c=lx(i),(p=Ca.get(p))&&ef(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}),Tn(g,"link",c),a.state.loading|=4,nd(g,i.precedence,t),a.instance=g;case"script":return g=Ar(i.src),(p=t.querySelector(sc(g)))?(a.instance=p,en(p),p):(c=i,(p=Ca.get(g))&&(c=k({},i),tf(c,p)),t=t.ownerDocument||t,p=t.createElement("script"),en(p),Tn(p,"link",c),t.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,nd(c,i.precedence,t));return a.instance}function nd(t,a,i){for(var c=i.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=i.nodeType===9?i.head:i,a.insertBefore(t,a.firstChild))}function ef(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function tf(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var ad=null;function ux(t,a,i){if(ad===null){var c=new Map,p=ad=new Map;p.set(i,c)}else p=ad,c=p.get(i),c||(c=new Map,p.set(i,c));if(c.has(t))return c;for(c.set(t,null),i=i.getElementsByTagName(t),p=0;p<i.length;p++){var g=i[p];if(!(g[Zs]||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 dx(t,a,i){t=t.ownerDocument||t,t.head.insertBefore(i,a==="title"?t.querySelector("head > title"):null)}function o_(t,a,i){if(i===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 mx(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function r_(t,a,i,c){if(i.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var p=jr(c.href),g=a.querySelector(ac(p));if(g){a=g._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=sd.bind(t),a.then(t,t)),i.state.loading|=4,i.instance=g,en(g);return}g=a.ownerDocument||a,c=lx(c),(p=Ca.get(p))&&ef(c,p),g=g.createElement("link"),en(g);var w=g;w._p=new Promise(function(A,D){w.onload=A,w.onerror=D}),Tn(g,"link",c),i.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,a),(a=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=sd.bind(t),a.addEventListener("load",i),a.addEventListener("error",i))}}var nf=0;function l_(t,a){return t.stylesheets&&t.count===0&&od(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var c=setTimeout(function(){if(t.stylesheets&&od(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+a);0<t.imgBytes&&nf===0&&(nf=62500*V5());var p=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&od(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>nf?50:800)+a);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function sd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)od(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var id=null;function od(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,id=new Map,a.forEach(c_,t),id=null,sd.call(t))}function c_(t,a){if(!(a.state.loading&4)){var i=id.get(t);if(i)var c=i.get(null);else{i=new Map,id.set(t,i);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")&&(i.set(w.dataset.precedence,w),c=w)}c&&i.set(null,c)}p=a.instance,w=p.getAttribute("data-precedence"),g=i.get(w)||c,g===c&&i.set(null,p),i.set(w,p),this.count++,c=sd.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 ic={$$typeof:L,Provider:null,Consumer:null,_currentValue:ve,_currentValue2:ve,_threadCount:0};function u_(t,a,i,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=$o(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$o(0),this.hiddenUpdates=$o(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 px(t,a,i,c,p,g,w,A,D,G,ee,se){return t=new u_(t,a,i,w,D,G,ee,se,A),a=1,g===!0&&(a|=24),g=sa(3,null,null,a),t.current=g,g.stateNode=t,a=Op(),a.refCount++,t.pooledCache=a,a.refCount++,g.memoizedState={element:c,isDehydrated:i,cache:a},Bp(g),t}function hx(t){return t?(t=nr,t):nr}function fx(t,a,i,c,p,g){p=hx(p),c.context===null?c.context=p:c.pendingContext=p,c=ri(a),c.payload={element:i},g=g===void 0?null:g,g!==null&&(c.callback=g),i=li(t,c,a),i!==null&&(Zn(i,t,a),ql(i,t,a))}function gx(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<a?i:a}}function af(t,a){gx(t,a),(t=t.alternate)&&gx(t,a)}function yx(t){if(t.tag===13||t.tag===31){var a=Wi(t,67108864);a!==null&&Zn(a,t,67108864),af(t,67108864)}}function bx(t){if(t.tag===13||t.tag===31){var a=ca();a=cl(a);var i=Wi(t,a);i!==null&&Zn(i,t,a),af(t,a)}}var rd=!0;function d_(t,a,i,c){var p=B.T;B.T=null;var g=W.p;try{W.p=2,sf(t,a,i,c)}finally{W.p=g,B.T=p}}function m_(t,a,i,c){var p=B.T;B.T=null;var g=W.p;try{W.p=8,sf(t,a,i,c)}finally{W.p=g,B.T=p}}function sf(t,a,i,c){if(rd){var p=of(c);if(p===null)Kh(t,a,c,ld,i),xx(t,c);else if(h_(p,t,a,i,c))c.stopPropagation();else if(xx(t,c),a&4&&-1<p_.indexOf(t)){for(;p!==null;){var g=Ys(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var w=Ot(g.pendingLanes);if(w!==0){var A=g;for(A.pendingLanes|=2,A.entangledLanes|=2;w;){var D=1<<31-Zt(w);A.entanglements[1]|=D,w&=~D}as(g),(jt&6)===0&&(Ku=Vt()+500,Wl(0))}}break;case 31:case 13:A=Wi(g,2),A!==null&&Zn(A,g,2),Hu(),af(g,2)}if(g=of(c),g===null&&Kh(t,a,c,ld,i),g===p)break;p=g}p!==null&&c.stopPropagation()}else Kh(t,a,c,null,i)}}function of(t){return t=vl(t),rf(t)}var ld=null;function rf(t){if(ld=null,t=fs(t),t!==null){var a=h(t);if(a===null)t=null;else{var i=a.tag;if(i===13){if(t=f(a),t!==null)return t;t=null}else if(i===31){if(t=b(a),t!==null)return t;t=null}else if(i===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return ld=t,null}function vx(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(ds()){case Vi:return 2;case ms:return 8;case Rn:case Vo:return 32;case $i:return 268435456;default:return 32}default:return 32}}var lf=!1,vi=null,xi=null,wi=null,oc=new Map,rc=new Map,Si=[],p_="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 xx(t,a){switch(t){case"focusin":case"focusout":vi=null;break;case"dragenter":case"dragleave":xi=null;break;case"mouseover":case"mouseout":wi=null;break;case"pointerover":case"pointerout":oc.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":rc.delete(a.pointerId)}}function lc(t,a,i,c,p,g){return t===null||t.nativeEvent!==g?(t={blockedOn:a,domEventName:i,eventSystemFlags:c,nativeEvent:g,targetContainers:[p]},a!==null&&(a=Ys(a),a!==null&&yx(a)),t):(t.eventSystemFlags|=c,a=t.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),t)}function h_(t,a,i,c,p){switch(a){case"focusin":return vi=lc(vi,t,a,i,c,p),!0;case"dragenter":return xi=lc(xi,t,a,i,c,p),!0;case"mouseover":return wi=lc(wi,t,a,i,c,p),!0;case"pointerover":var g=p.pointerId;return oc.set(g,lc(oc.get(g)||null,t,a,i,c,p)),!0;case"gotpointercapture":return g=p.pointerId,rc.set(g,lc(rc.get(g)||null,t,a,i,c,p)),!0}return!1}function wx(t){var a=fs(t.target);if(a!==null){var i=h(a);if(i!==null){if(a=i.tag,a===13){if(a=f(i),a!==null){t.blockedOn=a,ru(t.priority,function(){bx(i)});return}}else if(a===31){if(a=b(i),a!==null){t.blockedOn=a,ru(t.priority,function(){bx(i)});return}}else if(a===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function cd(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var i=of(t.nativeEvent);if(i===null){i=t.nativeEvent;var c=new i.constructor(i.type,i);bl=c,i.target.dispatchEvent(c),bl=null}else return a=Ys(i),a!==null&&yx(a),t.blockedOn=i,!1;a.shift()}return!0}function Sx(t,a,i){cd(t)&&i.delete(a)}function f_(){lf=!1,vi!==null&&cd(vi)&&(vi=null),xi!==null&&cd(xi)&&(xi=null),wi!==null&&cd(wi)&&(wi=null),oc.forEach(Sx),rc.forEach(Sx)}function ud(t,a){t.blockedOn===a&&(t.blockedOn=null,lf||(lf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,f_)))}var dd=null;function kx(t){dd!==t&&(dd=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){dd===t&&(dd=null);for(var a=0;a<t.length;a+=3){var i=t[a],c=t[a+1],p=t[a+2];if(typeof c!="function"){if(rf(c||i)===null)continue;break}var g=Ys(i);g!==null&&(t.splice(a,3),a-=3,ih(g,{pending:!0,data:p,method:i.method,action:c},c,p))}}))}function Nr(t){function a(D){return ud(D,t)}vi!==null&&ud(vi,t),xi!==null&&ud(xi,t),wi!==null&&ud(wi,t),oc.forEach(a),rc.forEach(a);for(var i=0;i<Si.length;i++){var c=Si[i];c.blockedOn===t&&(c.blockedOn=null)}for(;0<Si.length&&(i=Si[0],i.blockedOn===null);)wx(i),i.blockedOn===null&&Si.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(c=0;c<i.length;c+=3){var p=i[c],g=i[c+1],w=p[Dn]||null;if(typeof g=="function")w||kx(i);else if(w){var A=null;if(g&&g.hasAttribute("formAction")){if(p=g,w=g[Dn]||null)A=w.formAction;else if(rf(p)!==null)continue}else A=w.action;typeof A=="function"?i[c+1]=A:(i.splice(c,3),c-=3),kx(i)}}}function jx(){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(i,20)}function i(){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(i,100),function(){c=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function cf(t){this._internalRoot=t}md.prototype.render=cf.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(r(409));var i=a.current,c=ca();fx(i,c,t,a,null,null)},md.prototype.unmount=cf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;fx(t.current,2,null,t,null,null),Hu(),a[Qs]=null}};function md(t){this._internalRoot=t}md.prototype.unstable_scheduleHydration=function(t){if(t){var a=Ko();t={blockedOn:null,target:t,priority:a};for(var i=0;i<Si.length&&a!==0&&a<Si[i].priority;i++);Si.splice(i,0,t),i===0&&wx(t)}};var Ax=n.version;if(Ax!=="19.2.4")throw Error(r(527,Ax,"19.2.4"));W.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=x(a),t=t!==null?S(t):null,t=t===null?null:t.stateNode,t};var g_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pd.isDisabled&&pd.supportsFiber)try{vn=pd.inject(g_),Et=pd}catch{}}return cc.createRoot=function(t,a){if(!u(t))throw Error(r(299));var i=!1,c="",p=Db,g=zb,w=Ib;return a!=null&&(a.unstable_strictMode===!0&&(i=!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=px(t,1,!1,null,null,i,c,null,p,g,w,jx),t[Qs]=a.current,$h(t),new cf(a)},cc.hydrateRoot=function(t,a,i){if(!u(t))throw Error(r(299));var c=!1,p="",g=Db,w=zb,A=Ib,D=null;return i!=null&&(i.unstable_strictMode===!0&&(c=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(w=i.onCaughtError),i.onRecoverableError!==void 0&&(A=i.onRecoverableError),i.formState!==void 0&&(D=i.formState)),a=px(t,1,!0,a,i??null,c,p,D,g,w,A,jx),a.context=hx(null),i=a.current,c=ca(),c=cl(c),p=ri(c),p.callback=null,li(i,p,c),i=c,a.current.lanes=i,Hi(a,i),as(a),t[Qs]=a.current,$h(t),new md(a)},cc.version="19.2.4",cc}var Tx;function e6(){if(Tx)return uf.exports;Tx=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(),uf.exports=W_(),uf.exports}var t6=e6();const n6={bodySerializer:e=>JSON.stringify(e,(n,s)=>typeof s=="bigint"?s.toString():s)},a6=({onRequest:e,onSseError:n,onSseEvent:s,responseTransformer:r,responseValidator:u,sseDefaultRetryDelay:h,sseMaxRetryAttempts:f,sseMaxRetryDelay:b,sseSleepFn:v,url:x,...S})=>{let k;const N=v??(q=>new Promise(E=>setTimeout(E,q)));return{stream:async function*(){let q=h??3e3,E=0;const P=S.signal??new AbortController().signal;for(;!P.aborted;){E++;const M=S.headers instanceof Headers?S.headers:new Headers(S.headers);k!==void 0&&M.set("Last-Event-ID",k);try{const L={redirect:"follow",...S,body:S.serializedBody,headers:M,signal:P};let $=new Request(x,L);e&&($=await e(x,L));const ae=await(S.fetch??globalThis.fetch)($);if(!ae.ok)throw new Error(`SSE failed: ${ae.status} ${ae.statusText}`);if(!ae.body)throw new Error("No body in SSE response");const V=ae.body.pipeThrough(new TextDecoderStream).getReader();let Z="";const X=()=>{try{V.cancel()}catch{}};P.addEventListener("abort",X);try{for(;;){const{done:Ce,value:tt}=await V.read();if(Ce)break;Z+=tt;const Ke=Z.split(`
11
+
12
+ `);Z=Ke.pop()??"";for(const Ue of Ke){const ke=Ue.split(`
13
+ `),Le=[];let B;for(const Ae of ke)if(Ae.startsWith("data:"))Le.push(Ae.replace(/^data:\s*/,""));else if(Ae.startsWith("event:"))B=Ae.replace(/^event:\s*/,"");else if(Ae.startsWith("id:"))k=Ae.replace(/^id:\s*/,"");else if(Ae.startsWith("retry:")){const ie=Number.parseInt(Ae.replace(/^retry:\s*/,""),10);Number.isNaN(ie)||(q=ie)}let W,ve=!1;if(Le.length){const Ae=Le.join(`
14
+ `);try{W=JSON.parse(Ae),ve=!0}catch{W=Ae}}ve&&(u&&await u(W),r&&(W=await r(W))),s?.({data:W,event:B,id:k,retry:q}),Le.length&&(yield W)}}}finally{P.removeEventListener("abort",X),V.releaseLock()}break}catch(L){if(n?.(L),f!==void 0&&E>=f)break;const $=Math.min(q*2**(E-1),b??3e4);await N($)}}}()}},s6=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},i6=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},o6=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Lk=({allowReserved:e,explode:n,name:s,style:r,value:u})=>{if(!n){const b=(e?u:u.map(v=>encodeURIComponent(v))).join(i6(r));switch(r){case"label":return`.${b}`;case"matrix":return`;${s}=${b}`;case"simple":return b;default:return`${s}=${b}`}}const h=s6(r),f=u.map(b=>r==="label"||r==="simple"?e?b:encodeURIComponent(b):bm({allowReserved:e,name:s,value:b})).join(h);return r==="label"||r==="matrix"?h+f:f},bm=({allowReserved:e,name:n,value:s})=>{if(s==null)return"";if(typeof s=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${n}=${e?s:encodeURIComponent(s)}`},Uk=({allowReserved:e,explode:n,name:s,style:r,value:u,valueOnly:h})=>{if(u instanceof Date)return h?u.toISOString():`${s}=${u.toISOString()}`;if(r!=="deepObject"&&!n){let v=[];Object.entries(u).forEach(([S,k])=>{v=[...v,S,e?k:encodeURIComponent(k)]});const x=v.join(",");switch(r){case"form":return`${s}=${x}`;case"label":return`.${x}`;case"matrix":return`;${s}=${x}`;default:return x}}const f=o6(r),b=Object.entries(u).map(([v,x])=>bm({allowReserved:e,name:r==="deepObject"?`${s}[${v}]`:v,value:x})).join(f);return r==="label"||r==="matrix"?f+b:b},r6=/\{[^{}]+\}/g,l6=({path:e,url:n})=>{let s=n;const r=n.match(r6);if(r)for(const u of r){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)){s=s.replace(u,Lk({explode:h,name:f,style:b,value:v}));continue}if(typeof v=="object"){s=s.replace(u,Uk({explode:h,name:f,style:b,value:v,valueOnly:!0}));continue}if(b==="matrix"){s=s.replace(u,`;${bm({name:f,value:v})}`);continue}const x=encodeURIComponent(b==="label"?`.${v}`:v);s=s.replace(u,x)}return s},c6=({baseUrl:e,path:n,query:s,querySerializer:r,url:u})=>{const h=u.startsWith("/")?u:`/${u}`;let f=(e??"")+h;n&&(f=l6({path:n,url:f}));let b=s?r(s):"";return b.startsWith("?")&&(b=b.substring(1)),b&&(f+=`?${b}`),f};function u6(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 d6=async(e,n)=>{const s=typeof n=="function"?await n(e):n;if(s)return e.scheme==="bearer"?`Bearer ${s}`:e.scheme==="basic"?`Basic ${btoa(s)}`:s},Vk=({allowReserved:e,array:n,object:s}={})=>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=Lk({allowReserved:e,explode:!0,name:f,style:"form",value:b,...n});v&&h.push(v)}else if(typeof b=="object"){const v=Uk({allowReserved:e,explode:!0,name:f,style:"deepObject",value:b,...s});v&&h.push(v)}else{const v=bm({allowReserved:e,name:f,value:b});v&&h.push(v)}}return h.join("&")},m6=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(s=>n.startsWith(s)))return"blob";if(n.startsWith("text/"))return"text"}},p6=(e,n)=>n?!!(e.headers.has(n)||e.query?.[n]||e.headers.get("Cookie")?.includes(`${n}=`)):!1,h6=async({security:e,...n})=>{for(const s of e){if(p6(n,s.name))continue;const r=await d6(s,n.auth);if(!r)continue;const u=s.name??"Authorization";switch(s.in){case"query":n.query||(n.query={}),n.query[u]=r;break;case"cookie":n.headers.append("Cookie",`${u}=${r}`);break;default:n.headers.set(u,r);break}}},Ex=e=>c6({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:Vk(e.querySerializer),url:e.url}),Rx=(e,n)=>{const s={...e,...n};return s.baseUrl?.endsWith("/")&&(s.baseUrl=s.baseUrl.substring(0,s.baseUrl.length-1)),s.headers=$k(e.headers,n.headers),s},f6=e=>{const n=[];return e.forEach((s,r)=>{n.push([r,s])}),n},$k=(...e)=>{const n=new Headers;for(const s of e){if(!s)continue;const r=s instanceof Headers?f6(s):Object.entries(s);for(const[u,h]of r)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 pf{fns=[];clear(){this.fns=[]}eject(n){const s=this.getInterceptorIndex(n);this.fns[s]&&(this.fns[s]=null)}exists(n){const s=this.getInterceptorIndex(n);return!!this.fns[s]}getInterceptorIndex(n){return typeof n=="number"?this.fns[n]?n:-1:this.fns.indexOf(n)}update(n,s){const r=this.getInterceptorIndex(n);return this.fns[r]?(this.fns[r]=s,n):!1}use(n){return this.fns.push(n),this.fns.length-1}}const g6=()=>({error:new pf,request:new pf,response:new pf}),y6=Vk({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),b6={"Content-Type":"application/json"},Kk=(e={})=>({...n6,headers:b6,parseAs:"auto",querySerializer:y6,...e}),Gk=(e={})=>{let n=Rx(Kk(),e);const s=()=>({...n}),r=x=>(n=Rx(n,x),s()),u=g6(),h=async x=>{const S={...n,...x,fetch:x.fetch??n.fetch??globalThis.fetch,headers:$k(n.headers,x.headers),serializedBody:void 0};S.security&&await h6({...S,security:S.security}),S.requestValidator&&await S.requestValidator(S),S.body!==void 0&&S.bodySerializer&&(S.serializedBody=S.bodySerializer(S.body)),(S.body===void 0||S.serializedBody==="")&&S.headers.delete("Content-Type");const k=Ex(S);return{opts:S,url:k}},f=async x=>{const{opts:S,url:k}=await h(x),N={redirect:"follow",...S,body:u6(S)};let T=new Request(k,N);for(const Q of u.request.fns)Q&&(T=await Q(T,S));const z=S.fetch;let q=await z(T);for(const Q of u.response.fns)Q&&(q=await Q(q,T,S));const E={request:T,response:q};if(q.ok){const Q=(S.parseAs==="auto"?m6(q.headers.get("Content-Type")):S.parseAs)??"json";if(q.status===204||q.headers.get("Content-Length")==="0"){let V;switch(Q){case"arrayBuffer":case"blob":case"text":V=await q[Q]();break;case"formData":V=new FormData;break;case"stream":V=q.body;break;default:V={};break}return S.responseStyle==="data"?V:{data:V,...E}}let ae;switch(Q){case"arrayBuffer":case"blob":case"formData":case"json":case"text":ae=await q[Q]();break;case"stream":return S.responseStyle==="data"?q.body:{data:q.body,...E}}return Q==="json"&&(S.responseValidator&&await S.responseValidator(ae),S.responseTransformer&&(ae=await S.responseTransformer(ae))),S.responseStyle==="data"?ae:{data:ae,...E}}const P=await q.text();let M;try{M=JSON.parse(P)}catch{}const L=M??P;let $=L;for(const Q of u.error.fns)Q&&($=await Q(L,q,T,S));if($=$||{},S.throwOnError)throw $;return S.responseStyle==="data"?void 0:{error:$,...E}},b=x=>S=>f({...S,method:x}),v=x=>async S=>{const{opts:k,url:N}=await h(S);return a6({...k,body:k.body,headers:k.headers,method:x,onRequest:async(T,z)=>{let q=new Request(T,z);for(const E of u.request.fns)E&&(q=await E(q,k));return q},url:N})};return{buildUrl:Ex,connect:b("CONNECT"),delete:b("DELETE"),get:b("GET"),getConfig:s,head:b("HEAD"),interceptors:u,options:b("OPTIONS"),patch:b("PATCH"),post:b("POST"),put:b("PUT"),request:f,setConfig:r,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=Gk(Kk()),v6=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}}),x6=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects",...e}),w6=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects",...e,headers:{"Content-Type":"application/json",...e.headers}}),S6=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),Hk=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),k6=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),j6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan",...e}),A6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-report",...e}),N6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-setup",...e}),C6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft",...e}),ene=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}}),tne=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}}),nne=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}}),ane=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}}),sne=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}}),ine=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}}),one=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}}),rne=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}}),lne=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}}),cne=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}}),une=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}}),dne=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}}),mne=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}}),pne=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}}),hne=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}}),_6=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}}),fne=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}}),gne=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/compile-preview",...e}),yne=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/diff-preview",...e}),bne=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}}),vne=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/discard",...e}),Fk=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-overview",...e}),T6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/settings",...e}),E6=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}}),R6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment",...e}),D6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/evidence",...e}),z6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/backfill-preview",...e}),I6=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}}),O6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/jobs",...e}),P6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/jobs/{jobId}",...e}),q6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/visibility-report",...e}),M6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-property-evidence",...e}),B6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-question-result",...e}),L6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-property-competitors",...e}),U6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-query-templates",...e}),V6=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}}),$6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/runs",...e}),K6=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}}),G6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/query-tracking",...e}),H6=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}}),F6=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}}),Q6=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/runs/{runId}",...e}),Z6=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations",...e,headers:{"Content-Type":"application/json",...e.headers}}),Y6=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/{label}",...e}),X6=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}}),J6=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qk=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e}),W6=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),eT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),tT=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}}),nT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),aT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),sT=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors/{id}",...e}),iT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/analytics/competitors",...e}),Zk=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e}),oT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),rT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/run-admission",...e}),lT=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e}),cT=e=>(e?.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Yk=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs/{id}",...e}),uT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/apply",...e,headers:{"Content-Type":"application/json",...e.headers}}),dT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/history",...e}),mT=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/history",...e}),pT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/timeline",...e}),hT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/analytics/metrics",...e}),fT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/snapshots/diff",...e}),Xk=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings",...e}),gT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/providers/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),yT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/google",...e,headers:{"Content-Type":"application/json",...e.headers}}),bT=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/keys/self",...e}),vT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/bing",...e,headers:{"Content-Type":"application/json",...e.headers}}),xT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/cdp",...e,headers:{"Content-Type":"application/json",...e.headers}}),wT=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),ST=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),kT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e,headers:{"Content-Type":"application/json",...e.headers}}),jT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedules",...e}),AT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e}),NT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e,headers:{"Content-Type":"application/json",...e.headers}}),CT=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}",...e}),_T=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}/test",...e}),TT=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry",...e}),ET=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry",...e,headers:{"Content-Type":"application/json",...e.headers}}),RT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry/onboarding",...e,headers:{"Content-Type":"application/json",...e.headers}}),DT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry/ui",...e,headers:{"Content-Type":"application/json",...e.headers}}),Jk=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/cdp/status",...e}),zT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/status",...e}),IT=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}}),OT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/customers",...e}),PT=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}}),qT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/sync",...e}),MT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/performance",...e}),BT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/snapshots",...e}),LT=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/connection",...e}),UT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/status",...e}),VT=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}}),$T=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/accounts",...e}),KT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/accounts/{accountId}/containers",...e}),GT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/accounts/{accountId}/containers/{containerId}/workspaces",...e}),HT=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}}),FT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/sync",...e}),QT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/snapshots",...e}),ZT=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/connection",...e}),YT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/options",...e}),XT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/contracts",...e}),JT=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}}),WT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/contracts/{contractId}/integrity",...e}),eE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections",...e}),tE=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}}),nE=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}",...e}),aE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/properties",...e}),sE=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}}),iE=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}}),oE=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}}),rE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance",...e}),lE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance/daily",...e}),cE=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}}),uE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspections",...e}),dE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/deindexed",...e}),mE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage",...e}),pE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage/history",...e}),hE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sitemaps",...e}),fE=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}}),gE=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}}),yE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/locations",...e}),bE=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}}),vE=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}}),xE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/keywords",...e}),wE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/place-actions",...e}),SE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/lodging",...e}),kE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/places",...e}),jE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/summary",...e}),AE=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}}),NE=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/disconnect",...e}),CE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/status",...e}),_E=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/sites",...e}),TE=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}}),EE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/coverage",...e}),RE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspections",...e}),DE=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}}),zE=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}}),IE=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}}),OE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/performance",...e}),PE=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}}),qE=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/disconnect",...e}),ME=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/status",...e}),BE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/search-landing-pages",...e}),LE=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}}),UE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/traffic",...e}),VE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/ai-referral-daily",...e}),$E=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/social-referral-history",...e}),KE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/session-history",...e}),GE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/insights",...e}),HE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/health/history",...e}),FE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/citations/visibility",...e}),QE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/overview",...e}),ZE=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/status",...e}),YE=e=>(e?.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/install",...e}),XE=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e}),JE=e=>(e?.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),WE=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs/latest",...e}),e8=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/releases",...e}),t8=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/latest-release",...e}),n8=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/cache/{release}",...e}),a8=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}),i8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/domains",...e}),o8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/history",...e}),r8=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}}),l8=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}}),c8=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}}),u8=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}}),d8=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}}),m8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources",...e}),p8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/status",...e}),h8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}",...e}),f8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/events",...e}),g8=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}}),y8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions",...e}),b8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}",...e}),v8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo",...e}),x8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/pages",...e}),w8=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}),k8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/graph",...e}),j8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/crawl/pages/audit",...e}),Wk=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/crawl/pages",...e}),A8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/structure",...e}),N8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/internal-links/neighbors",...e}),C8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/dead-links",...e}),_8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs",...e}),T8=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}}),E8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs/{runId}/progress",...e}),R8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs/{runId}/page-health-preview",...e}),D8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations",...e}),z8=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}}),I8=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations/{id}",...e}),O8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations/{id}/resume",...e}),P8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/providers",...e});function q8(e){const n={baseUrl:e.baseUrl,fetch:e.fetch,headers:{...e.headers??{}}};return Gk(n)}function te(e,n,s){function r(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,S=Object.keys(x);for(let k=0;k<S.length;k++){const N=S[k];N in b||(b[N]=x[N].bind(b))}}const u=s?.Parent??Object;class h extends u{}Object.defineProperty(h,"name",{value:e});function f(b){var v;const x=s?.Parent?new h:this;r(x,b),(v=x._zod).deferred??(v.deferred=[]);for(const S of x._zod.deferred)S();return x}return Object.defineProperty(f,"init",{value:r}),Object.defineProperty(f,Symbol.hasInstance,{value:b=>s?.Parent&&b instanceof s.Parent?!0:b?._zod?.traits?.has(e)}),Object.defineProperty(f,"name",{value:e}),f}class Or extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ej extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const tj={};function Ei(e){return tj}function nj(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,u])=>n.indexOf(+r)===-1).map(([r,u])=>u)}function ag(e,n){return typeof n=="bigint"?n.toString():n}function vm(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function e0(e){return e==null}function t0(e){const n=e.startsWith("^")?1:0,s=e.endsWith("$")?e.length-1:e.length;return e.slice(n,s)}function M8(e,n){const s=(e.toString().split(".")[1]||"").length,r=n.toString();let u=(r.split(".")[1]||"").length;if(u===0&&/\d?e-\d?/.test(r)){const v=r.match(/\d?e-(\d?)/);v?.[1]&&(u=Number.parseInt(v[1]))}const h=s>u?s:u,f=Number.parseInt(e.toFixed(h).replace(".","")),b=Number.parseInt(n.toFixed(h).replace(".",""));return f%b/10**h}const Dx=Symbol("evaluating");function gt(e,n,s){let r;Object.defineProperty(e,n,{get(){if(r!==Dx)return r===void 0&&(r=Dx,r=s()),r},set(u){Object.defineProperty(e,n,{value:u})},configurable:!0})}function Do(e,n,s){Object.defineProperty(e,n,{value:s,writable:!0,enumerable:!0,configurable:!0})}function Oi(...e){const n={};for(const s of e){const r=Object.getOwnPropertyDescriptors(s);Object.assign(n,r)}return Object.defineProperties({},n)}function zx(e){return JSON.stringify(e)}function B8(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const aj="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ec(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const L8=vm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Mr(e){if(Ec(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const s=n.prototype;return!(Ec(s)===!1||Object.prototype.hasOwnProperty.call(s,"isPrototypeOf")===!1)}function sj(e){return Mr(e)?{...e}:Array.isArray(e)?[...e]:e}const U8=new Set(["string","number","symbol"]);function Br(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Pi(e,n,s){const r=new e._zod.constr(n??e._zod.def);return(!n||s?.parent)&&(r._zod.parent=e),r}function qe(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 V8(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const $8={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 s=e._zod.def,r=s.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const h=Oi(e._zod.def,{get shape(){const f={};for(const b in n){if(!(b in s.shape))throw new Error(`Unrecognized key: "${b}"`);n[b]&&(f[b]=s.shape[b])}return Do(this,"shape",f),f},checks:[]});return Pi(e,h)}function G8(e,n){const s=e._zod.def,r=s.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const h=Oi(e._zod.def,{get shape(){const f={...e._zod.def.shape};for(const b in n){if(!(b in s.shape))throw new Error(`Unrecognized key: "${b}"`);n[b]&&delete f[b]}return Do(this,"shape",f),f},checks:[]});return Pi(e,h)}function H8(e,n){if(!Mr(n))throw new Error("Invalid input to extend: expected a plain object");const s=e._zod.def.checks;if(s&&s.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=Oi(e._zod.def,{get shape(){const h={...e._zod.def.shape,...n};return Do(this,"shape",h),h}});return Pi(e,u)}function F8(e,n){if(!Mr(n))throw new Error("Invalid input to safeExtend: expected a plain object");const s=Oi(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n};return Do(this,"shape",r),r}});return Pi(e,s)}function Q8(e,n){const s=Oi(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n._zod.def.shape};return Do(this,"shape",r),r},get catchall(){return n._zod.def.catchall},checks:[]});return Pi(e,s)}function Z8(e,n,s){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=Oi(n._zod.def,{get shape(){const b=n._zod.def.shape,v={...b};if(s)for(const x in s){if(!(x in b))throw new Error(`Unrecognized key: "${x}"`);s[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 Do(this,"shape",v),v},checks:[]});return Pi(n,f)}function Y8(e,n,s){const r=Oi(n._zod.def,{get shape(){const u=n._zod.def.shape,h={...u};if(s)for(const f in s){if(!(f in h))throw new Error(`Unrecognized key: "${f}"`);s[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 Do(this,"shape",h),h}});return Pi(n,r)}function Rr(e,n=0){if(e.aborted===!0)return!0;for(let s=n;s<e.issues.length;s++)if(e.issues[s]?.continue!==!0)return!0;return!1}function Dr(e,n){return n.map(s=>{var r;return(r=s).path??(r.path=[]),s.path.unshift(e),s})}function fd(e){return typeof e=="string"?e:e?.message}function Ri(e,n,s){const r={...e,path:e.path??[]};if(!e.message){const u=fd(e.inst?._zod.def?.error?.(e))??fd(n?.error?.(e))??fd(s.customError?.(e))??fd(s.localeError?.(e))??"Invalid input";r.message=u}return delete r.inst,delete r.continue,n?.reportInput||delete r.input,r}function n0(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Rc(...e){const[n,s,r]=e;return typeof n=="string"?{message:n,code:"custom",input:s,inst:r}:{...n}}const ij=(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,ag,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},oj=te("$ZodError",ij),rj=te("$ZodError",ij,{Parent:Error});function X8(e,n=s=>s.message){const s={},r=[];for(const u of e.issues)u.path.length>0?(s[u.path[0]]=s[u.path[0]]||[],s[u.path[0]].push(n(u))):r.push(n(u));return{formErrors:r,fieldErrors:s}}function J8(e,n=s=>s.message){const s={_errors:[]},r=u=>{for(const h of u.issues)if(h.code==="invalid_union"&&h.errors.length)h.errors.map(f=>r({issues:f}));else if(h.code==="invalid_key")r({issues:h.issues});else if(h.code==="invalid_element")r({issues:h.issues});else if(h.path.length===0)s._errors.push(n(h));else{let f=s,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 r(e),s}const a0=e=>(n,s,r,u)=>{const h=r?Object.assign(r,{async:!1}):{async:!1},f=n._zod.run({value:s,issues:[]},h);if(f instanceof Promise)throw new Or;if(f.issues.length){const b=new(u?.Err??e)(f.issues.map(v=>Ri(v,h,Ei())));throw aj(b,u?.callee),b}return f.value},s0=e=>async(n,s,r,u)=>{const h=r?Object.assign(r,{async:!0}):{async:!0};let f=n._zod.run({value:s,issues:[]},h);if(f instanceof Promise&&(f=await f),f.issues.length){const b=new(u?.Err??e)(f.issues.map(v=>Ri(v,h,Ei())));throw aj(b,u?.callee),b}return f.value},xm=e=>(n,s,r)=>{const u=r?{...r,async:!1}:{async:!1},h=n._zod.run({value:s,issues:[]},u);if(h instanceof Promise)throw new Or;return h.issues.length?{success:!1,error:new(e??oj)(h.issues.map(f=>Ri(f,u,Ei())))}:{success:!0,data:h.value}},W8=xm(rj),wm=e=>async(n,s,r)=>{const u=r?Object.assign(r,{async:!0}):{async:!0};let h=n._zod.run({value:s,issues:[]},u);return h instanceof Promise&&(h=await h),h.issues.length?{success:!1,error:new e(h.issues.map(f=>Ri(f,u,Ei())))}:{success:!0,data:h.value}},eR=wm(rj),tR=e=>(n,s,r)=>{const u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return a0(e)(n,s,u)},nR=e=>(n,s,r)=>a0(e)(n,s,r),aR=e=>async(n,s,r)=>{const u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return s0(e)(n,s,u)},sR=e=>async(n,s,r)=>s0(e)(n,s,r),iR=e=>(n,s,r)=>{const u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return xm(e)(n,s,u)},oR=e=>(n,s,r)=>xm(e)(n,s,r),rR=e=>async(n,s,r)=>{const u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return wm(e)(n,s,u)},lR=e=>async(n,s,r)=>wm(e)(n,s,r),cR=/^[cC][^\s-]{8,}$/,uR=/^[0-9a-z]+$/,dR=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,mR=/^[0-9a-vA-V]{20}$/,pR=/^[A-Za-z0-9]{27}$/,hR=/^[a-zA-Z0-9_-]{21}$/,fR=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gR=/^([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})$/,Ix=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)$/,yR=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,bR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vR(){return new RegExp(bR,"u")}const xR=/^(?:(?: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])$/,wR=/^(([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}|:))$/,SR=/^((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])$/,kR=/^(([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])$/,jR=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,lj=/^[A-Za-z0-9_-]*$/,AR=/^\+[1-9]\d{6,14}$/,cj="(?:(?:\\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])))",NR=new RegExp(`^${cj}$`);function uj(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 CR(e){return new RegExp(`^${uj(e)}$`)}function _R(e){const n=uj({precision:e.precision}),s=["Z"];e.local&&s.push(""),e.offset&&s.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${n}(?:${s.join("|")})`;return new RegExp(`^${cj}T(?:${r})$`)}const TR=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},ER=/^-?\d+$/,dj=/^-?\d+(?:\.\d+)?$/,RR=/^(?:true|false)$/i,DR=/^null$/i,zR=/^[^A-Z]*$/,IR=/^[^a-z]*$/,Jn=te("$ZodCheck",(e,n)=>{var s;e._zod??(e._zod={}),e._zod.def=n,(s=e._zod).onattach??(s.onattach=[])}),mj={number:"number",bigint:"bigint",object:"date"},pj=te("$ZodCheckLessThan",(e,n)=>{Jn.init(e,n);const s=mj[typeof n.value];e._zod.onattach.push(r=>{const u=r._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=r=>{(n.inclusive?r.value<=n.value:r.value<n.value)||r.issues.push({origin:s,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),hj=te("$ZodCheckGreaterThan",(e,n)=>{Jn.init(e,n);const s=mj[typeof n.value];e._zod.onattach.push(r=>{const u=r._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=r=>{(n.inclusive?r.value>=n.value:r.value>n.value)||r.issues.push({origin:s,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),OR=te("$ZodCheckMultipleOf",(e,n)=>{Jn.init(e,n),e._zod.onattach.push(s=>{var r;(r=s._zod.bag).multipleOf??(r.multipleOf=n.value)}),e._zod.check=s=>{if(typeof s.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof s.value=="bigint"?s.value%n.value===BigInt(0):M8(s.value,n.value)===0)||s.issues.push({origin:typeof s.value,code:"not_multiple_of",divisor:n.value,input:s.value,inst:e,continue:!n.abort})}}),PR=te("$ZodCheckNumberFormat",(e,n)=>{Jn.init(e,n),n.format=n.format||"float64";const s=n.format?.includes("int"),r=s?"int":"number",[u,h]=$8[n.format];e._zod.onattach.push(f=>{const b=f._zod.bag;b.format=n.format,b.minimum=u,b.maximum=h,s&&(b.pattern=ER)}),e._zod.check=f=>{const b=f.value;if(s){if(!Number.isInteger(b)){f.issues.push({expected:r,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:r,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:r,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})}}),qR=te("$ZodCheckMaxLength",(e,n)=>{var s;Jn.init(e,n),(s=e._zod.def).when??(s.when=r=>{const u=r.value;return!e0(u)&&u.length!==void 0}),e._zod.onattach.push(r=>{const u=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<u&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{const u=r.value;if(u.length<=n.maximum)return;const f=n0(u);r.issues.push({origin:f,code:"too_big",maximum:n.maximum,inclusive:!0,input:u,inst:e,continue:!n.abort})}}),MR=te("$ZodCheckMinLength",(e,n)=>{var s;Jn.init(e,n),(s=e._zod.def).when??(s.when=r=>{const u=r.value;return!e0(u)&&u.length!==void 0}),e._zod.onattach.push(r=>{const u=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>u&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{const u=r.value;if(u.length>=n.minimum)return;const f=n0(u);r.issues.push({origin:f,code:"too_small",minimum:n.minimum,inclusive:!0,input:u,inst:e,continue:!n.abort})}}),BR=te("$ZodCheckLengthEquals",(e,n)=>{var s;Jn.init(e,n),(s=e._zod.def).when??(s.when=r=>{const u=r.value;return!e0(u)&&u.length!==void 0}),e._zod.onattach.push(r=>{const u=r._zod.bag;u.minimum=n.length,u.maximum=n.length,u.length=n.length}),e._zod.check=r=>{const u=r.value,h=u.length;if(h===n.length)return;const f=n0(u),b=h>n.length;r.issues.push({origin:f,...b?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),Sm=te("$ZodCheckStringFormat",(e,n)=>{var s,r;Jn.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?(s=e._zod).check??(s.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})}):(r=e._zod).check??(r.check=()=>{})}),LR=te("$ZodCheckRegex",(e,n)=>{Sm.init(e,n),e._zod.check=s=>{n.pattern.lastIndex=0,!n.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:"regex",input:s.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),UR=te("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=zR),Sm.init(e,n)}),VR=te("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=IR),Sm.init(e,n)}),$R=te("$ZodCheckIncludes",(e,n)=>{Jn.init(e,n);const s=Br(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position}}${s}`:s);n.pattern=r,e._zod.onattach.push(u=>{const h=u._zod.bag;h.patterns??(h.patterns=new Set),h.patterns.add(r)}),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})}}),KR=te("$ZodCheckStartsWith",(e,n)=>{Jn.init(e,n);const s=new RegExp(`^${Br(n.prefix)}.*`);n.pattern??(n.pattern=s),e._zod.onattach.push(r=>{const u=r._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(s)}),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),GR=te("$ZodCheckEndsWith",(e,n)=>{Jn.init(e,n);const s=new RegExp(`.*${Br(n.suffix)}$`);n.pattern??(n.pattern=s),e._zod.onattach.push(r=>{const u=r._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(s)}),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}}),HR=te("$ZodCheckOverwrite",(e,n)=>{Jn.init(e,n),e._zod.check=s=>{s.value=n.tx(s.value)}});class FR{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 r=n.split(`
15
+ `).filter(f=>f),u=Math.min(...r.map(f=>f.length-f.trimStart().length)),h=r.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,s=this?.args,u=[...(this?.content??[""]).map(h=>` ${h}`)];return new n(...s,u.join(`
16
+ `))}}const QR={major:4,minor:3,patch:6},Lt=te("$ZodType",(e,n)=>{var s;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=QR;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const u of r)for(const h of u._zod.onattach)h(e);if(r.length===0)(s=e._zod).deferred??(s.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const u=(f,b,v)=>{let x=Rr(f),S;for(const k of b){if(k._zod.def.when){if(!k._zod.def.when(f))continue}else if(x)continue;const N=f.issues.length,T=k._zod.check(f);if(T instanceof Promise&&v?.async===!1)throw new Or;if(S||T instanceof Promise)S=(S??Promise.resolve()).then(async()=>{await T,f.issues.length!==N&&(x||(x=Rr(f,N)))});else{if(f.issues.length===N)continue;x||(x=Rr(f,N))}}return S?S.then(()=>f):f},h=(f,b,v)=>{if(Rr(f))return f.aborted=!0,f;const x=u(b,r,v);if(x instanceof Promise){if(v.async===!1)throw new Or;return x.then(S=>e._zod.parse(S,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(S=>h(S,f,b)):h(x,f,b)}const v=e._zod.parse(f,b);if(v instanceof Promise){if(b.async===!1)throw new Or;return v.then(x=>u(x,r,b))}return u(v,r,b)}}gt(e,"~standard",()=>({validate:u=>{try{const h=W8(e,u);return h.success?{value:h.data}:{issues:h.error?.issues}}catch{return eR(e,u).then(f=>f.success?{value:f.data}:{issues:f.error?.issues})}},vendor:"zod",version:1}))}),i0=te("$ZodString",(e,n)=>{Lt.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??TR(e._zod.bag),e._zod.parse=(s,r)=>{if(n.coerce)try{s.value=String(s.value)}catch{}return typeof s.value=="string"||s.issues.push({expected:"string",code:"invalid_type",input:s.value,inst:e}),s}}),Gt=te("$ZodStringFormat",(e,n)=>{Sm.init(e,n),i0.init(e,n)}),ZR=te("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=gR),Gt.init(e,n)}),YR=te("$ZodUUID",(e,n)=>{if(n.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(r===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=Ix(r))}else n.pattern??(n.pattern=Ix());Gt.init(e,n)}),XR=te("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=yR),Gt.init(e,n)}),JR=te("$ZodURL",(e,n)=>{Gt.init(e,n),e._zod.check=s=>{try{const r=s.value.trim(),u=new URL(r);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(u.hostname)||s.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:s.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)||s.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:s.value,inst:e,continue:!n.abort})),n.normalize?s.value=u.href:s.value=r;return}catch{s.issues.push({code:"invalid_format",format:"url",input:s.value,inst:e,continue:!n.abort})}}}),WR=te("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=vR()),Gt.init(e,n)}),e7=te("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=hR),Gt.init(e,n)}),t7=te("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=cR),Gt.init(e,n)}),n7=te("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=uR),Gt.init(e,n)}),a7=te("$ZodULID",(e,n)=>{n.pattern??(n.pattern=dR),Gt.init(e,n)}),s7=te("$ZodXID",(e,n)=>{n.pattern??(n.pattern=mR),Gt.init(e,n)}),i7=te("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=pR),Gt.init(e,n)}),o7=te("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=_R(n)),Gt.init(e,n)}),r7=te("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=NR),Gt.init(e,n)}),l7=te("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=CR(n)),Gt.init(e,n)}),c7=te("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=fR),Gt.init(e,n)}),u7=te("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=xR),Gt.init(e,n),e._zod.bag.format="ipv4"}),d7=te("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=wR),Gt.init(e,n),e._zod.bag.format="ipv6",e._zod.check=s=>{try{new URL(`http://[${s.value}]`)}catch{s.issues.push({code:"invalid_format",format:"ipv6",input:s.value,inst:e,continue:!n.abort})}}}),m7=te("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=SR),Gt.init(e,n)}),p7=te("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=kR),Gt.init(e,n),e._zod.check=s=>{const r=s.value.split("/");try{if(r.length!==2)throw new Error;const[u,h]=r;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{s.issues.push({code:"invalid_format",format:"cidrv6",input:s.value,inst:e,continue:!n.abort})}}});function fj(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const h7=te("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=jR),Gt.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=s=>{fj(s.value)||s.issues.push({code:"invalid_format",format:"base64",input:s.value,inst:e,continue:!n.abort})}});function f7(e){if(!lj.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),s=n.padEnd(Math.ceil(n.length/4)*4,"=");return fj(s)}const g7=te("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=lj),Gt.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=s=>{f7(s.value)||s.issues.push({code:"invalid_format",format:"base64url",input:s.value,inst:e,continue:!n.abort})}}),y7=te("$ZodE164",(e,n)=>{n.pattern??(n.pattern=AR),Gt.init(e,n)});function b7(e,n=null){try{const s=e.split(".");if(s.length!==3)return!1;const[r]=s;if(!r)return!1;const u=JSON.parse(atob(r));return!("typ"in u&&u?.typ!=="JWT"||!u.alg||n&&(!("alg"in u)||u.alg!==n))}catch{return!1}}const v7=te("$ZodJWT",(e,n)=>{Gt.init(e,n),e._zod.check=s=>{b7(s.value,n.alg)||s.issues.push({code:"invalid_format",format:"jwt",input:s.value,inst:e,continue:!n.abort})}}),gj=te("$ZodNumber",(e,n)=>{Lt.init(e,n),e._zod.pattern=e._zod.bag.pattern??dj,e._zod.parse=(s,r)=>{if(n.coerce)try{s.value=Number(s.value)}catch{}const u=s.value;if(typeof u=="number"&&!Number.isNaN(u)&&Number.isFinite(u))return s;const h=typeof u=="number"?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return s.issues.push({expected:"number",code:"invalid_type",input:u,inst:e,...h?{received:h}:{}}),s}}),x7=te("$ZodNumberFormat",(e,n)=>{PR.init(e,n),gj.init(e,n)}),w7=te("$ZodBoolean",(e,n)=>{Lt.init(e,n),e._zod.pattern=RR,e._zod.parse=(s,r)=>{if(n.coerce)try{s.value=!!s.value}catch{}const u=s.value;return typeof u=="boolean"||s.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),s}}),S7=te("$ZodNull",(e,n)=>{Lt.init(e,n),e._zod.pattern=DR,e._zod.values=new Set([null]),e._zod.parse=(s,r)=>{const u=s.value;return u===null||s.issues.push({expected:"null",code:"invalid_type",input:u,inst:e}),s}}),k7=te("$ZodUnknown",(e,n)=>{Lt.init(e,n),e._zod.parse=s=>s}),j7=te("$ZodNever",(e,n)=>{Lt.init(e,n),e._zod.parse=(s,r)=>(s.issues.push({expected:"never",code:"invalid_type",input:s.value,inst:e}),s)});function Ox(e,n,s){e.issues.length&&n.issues.push(...Dr(s,e.issues)),n.value[s]=e.value}const A7=te("$ZodArray",(e,n)=>{Lt.init(e,n),e._zod.parse=(s,r)=>{const u=s.value;if(!Array.isArray(u))return s.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),s;s.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:[]},r);v instanceof Promise?h.push(v.then(x=>Ox(x,s,f))):Ox(v,s,f)}return h.length?Promise.all(h).then(()=>s):s}});function Vd(e,n,s,r,u){if(e.issues.length){if(u&&!(s in r))return;n.issues.push(...Dr(s,e.issues))}e.value===void 0?s in r&&(n.value[s]=void 0):n.value[s]=e.value}function yj(e){const n=Object.keys(e.shape);for(const r of n)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const s=V8(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(s)}}function bj(e,n,s,r,u,h){const f=[],b=u.keySet,v=u.catchall._zod,x=v.def.type,S=v.optout==="optional";for(const k in n){if(b.has(k))continue;if(x==="never"){f.push(k);continue}const N=v.run({value:n[k],issues:[]},r);N instanceof Promise?e.push(N.then(T=>Vd(T,s,k,n,S))):Vd(N,s,k,n,S)}return f.length&&s.issues.push({code:"unrecognized_keys",keys:f,input:n,inst:h}),e.length?Promise.all(e).then(()=>s):s}const N7=te("$ZodObject",(e,n)=>{if(Lt.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 r=vm(()=>yj(n));gt(e._zod,"propValues",()=>{const b=n.shape,v={};for(const x in b){const S=b[x]._zod;if(S.values){v[x]??(v[x]=new Set);for(const k of S.values)v[x].add(k)}}return v});const u=Ec,h=n.catchall;let f;e._zod.parse=(b,v)=>{f??(f=r.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 S=[],k=f.shape;for(const N of f.keys){const T=k[N],z=T._zod.optout==="optional",q=T._zod.run({value:x[N],issues:[]},v);q instanceof Promise?S.push(q.then(E=>Vd(E,b,N,x,z))):Vd(q,b,N,x,z)}return h?bj(S,x,b,v,r.value,e):S.length?Promise.all(S).then(()=>b):b}}),C7=te("$ZodObjectJIT",(e,n)=>{N7.init(e,n);const s=e._zod.parse,r=vm(()=>yj(n)),u=N=>{const T=new FR(["shape","payload","ctx"]),z=r.value,q=L=>{const $=zx(L);return`shape[${$}]._zod.run({ value: input[${$}], issues: [] }, ctx)`};T.write("const input = payload.value;");const E=Object.create(null);let P=0;for(const L of z.keys)E[L]=`key_${P++}`;T.write("const newResult = {};");for(const L of z.keys){const $=E[L],Q=zx(L),V=N[L]?._zod?.optout==="optional";T.write(`const ${$} = ${q(L)};`),V?T.write(`
17
+ if (${$}.issues.length) {
18
+ if (${Q} in input) {
19
+ payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
20
+ ...iss,
21
+ path: iss.path ? [${Q}, ...iss.path] : [${Q}]
22
+ })));
23
+ }
24
+ }
25
+
26
+ if (${$}.value === undefined) {
27
+ if (${Q} in input) {
28
+ newResult[${Q}] = undefined;
29
+ }
30
+ } else {
31
+ newResult[${Q}] = ${$}.value;
32
+ }
33
+
34
+ `):T.write(`
35
+ if (${$}.issues.length) {
36
+ payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
37
+ ...iss,
38
+ path: iss.path ? [${Q}, ...iss.path] : [${Q}]
39
+ })));
40
+ }
41
+
42
+ if (${$}.value === undefined) {
43
+ if (${Q} in input) {
44
+ newResult[${Q}] = undefined;
45
+ }
46
+ } else {
47
+ newResult[${Q}] = ${$}.value;
48
+ }
49
+
50
+ `)}T.write("payload.value = newResult;"),T.write("return payload;");const M=T.compile();return(L,$)=>M(N,L,$)};let h;const f=Ec,b=!tj.jitless,x=b&&L8.value,S=n.catchall;let k;e._zod.parse=(N,T)=>{k??(k=r.value);const z=N.value;return f(z)?b&&x&&T?.async===!1&&T.jitless!==!0?(h||(h=u(n.shape)),N=h(N,T),S?bj([],z,N,T,k,e):N):s(N,T):(N.issues.push({expected:"object",code:"invalid_type",input:z,inst:e}),N)}});function Px(e,n,s,r){for(const h of e)if(h.issues.length===0)return n.value=h.value,n;const u=e.filter(h=>!Rr(h));return u.length===1?(n.value=u[0].value,u[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:s,errors:e.map(h=>h.issues.map(f=>Ri(f,r,Ei())))}),n)}const vj=te("$ZodUnion",(e,n)=>{Lt.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=>t0(h.source)).join("|")})$`)}});const s=n.options.length===1,r=n.options[0]._zod.run;e._zod.parse=(u,h)=>{if(s)return r(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=>Px(v,u,e,h)):Px(b,u,e,h)}}),_7=te("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,vj.init(e,n);const s=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 r=vm(()=>{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(!Ec(f))return u.issues.push({code:"invalid_type",expected:"object",input:f,inst:e}),u;const b=r.value.get(f?.[n.discriminator]);return b?b._zod.run(u,h):n.unionFallback?s(u,h):(u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,input:f,path:[n.discriminator],inst:e}),u)}}),T7=te("$ZodIntersection",(e,n)=>{Lt.init(e,n),e._zod.parse=(s,r)=>{const u=s.value,h=n.left._zod.run({value:u,issues:[]},r),f=n.right._zod.run({value:u,issues:[]},r);return h instanceof Promise||f instanceof Promise?Promise.all([h,f]).then(([v,x])=>qx(s,v,x)):qx(s,h,f)}});function sg(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(Mr(e)&&Mr(n)){const s=Object.keys(n),r=Object.keys(e).filter(h=>s.indexOf(h)!==-1),u={...e,...n};for(const h of r){const f=sg(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 s=[];for(let r=0;r<e.length;r++){const u=e[r],h=n[r],f=sg(u,h);if(!f.valid)return{valid:!1,mergeErrorPath:[r,...f.mergeErrorPath]};s.push(f.data)}return{valid:!0,data:s}}return{valid:!1,mergeErrorPath:[]}}function qx(e,n,s){const r=new Map;let u;for(const b of n.issues)if(b.code==="unrecognized_keys"){u??(u=b);for(const v of b.keys)r.has(v)||r.set(v,{}),r.get(v).l=!0}else e.issues.push(b);for(const b of s.issues)if(b.code==="unrecognized_keys")for(const v of b.keys)r.has(v)||r.set(v,{}),r.get(v).r=!0;else e.issues.push(b);const h=[...r].filter(([,b])=>b.l&&b.r).map(([b])=>b);if(h.length&&u&&e.issues.push({...u,keys:h}),Rr(e))return e;const f=sg(n.value,s.value);if(!f.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(f.mergeErrorPath)}`);return e.value=f.data,e}const E7=te("$ZodRecord",(e,n)=>{Lt.init(e,n),e._zod.parse=(s,r)=>{const u=s.value;if(!Mr(u))return s.issues.push({expected:"record",code:"invalid_type",input:u,inst:e}),s;const h=[],f=n.keyType._zod.values;if(f){s.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 S=n.valueType._zod.run({value:u[x],issues:[]},r);S instanceof Promise?h.push(S.then(k=>{k.issues.length&&s.issues.push(...Dr(x,k.issues)),s.value[x]=k.value})):(S.issues.length&&s.issues.push(...Dr(x,S.issues)),s.value[x]=S.value)}let v;for(const x in u)b.has(x)||(v=v??[],v.push(x));v&&v.length>0&&s.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:v})}else{s.value={};for(const b of Reflect.ownKeys(u)){if(b==="__proto__")continue;let v=n.keyType._zod.run({value:b,issues:[]},r);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof b=="string"&&dj.test(b)&&v.issues.length){const k=n.keyType._zod.run({value:Number(b),issues:[]},r);if(k instanceof Promise)throw new Error("Async schemas not supported in object keys currently");k.issues.length===0&&(v=k)}if(v.issues.length){n.mode==="loose"?s.value[b]=u[b]:s.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(k=>Ri(k,r,Ei())),input:b,path:[b],inst:e});continue}const S=n.valueType._zod.run({value:u[b],issues:[]},r);S instanceof Promise?h.push(S.then(k=>{k.issues.length&&s.issues.push(...Dr(b,k.issues)),s.value[v.value]=k.value})):(S.issues.length&&s.issues.push(...Dr(b,S.issues)),s.value[v.value]=S.value)}}return h.length?Promise.all(h).then(()=>s):s}}),R7=te("$ZodEnum",(e,n)=>{Lt.init(e,n);const s=nj(n.entries),r=new Set(s);e._zod.values=r,e._zod.pattern=new RegExp(`^(${s.filter(u=>U8.has(typeof u)).map(u=>typeof u=="string"?Br(u):u.toString()).join("|")})$`),e._zod.parse=(u,h)=>{const f=u.value;return r.has(f)||u.issues.push({code:"invalid_value",values:s,input:f,inst:e}),u}}),D7=te("$ZodLiteral",(e,n)=>{if(Lt.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");const s=new Set(n.values);e._zod.values=s,e._zod.pattern=new RegExp(`^(${n.values.map(r=>typeof r=="string"?Br(r):r?Br(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,u)=>{const h=r.value;return s.has(h)||r.issues.push({code:"invalid_value",values:n.values,input:h,inst:e}),r}}),z7=te("$ZodTransform",(e,n)=>{Lt.init(e,n),e._zod.parse=(s,r)=>{if(r.direction==="backward")throw new ej(e.constructor.name);const u=n.transform(s.value,s);if(r.async)return(u instanceof Promise?u:Promise.resolve(u)).then(f=>(s.value=f,s));if(u instanceof Promise)throw new Or;return s.value=u,s}});function Mx(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const xj=te("$ZodOptional",(e,n)=>{Lt.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 s=n.innerType._zod.pattern;return s?new RegExp(`^(${t0(s.source)})?$`):void 0}),e._zod.parse=(s,r)=>{if(n.innerType._zod.optin==="optional"){const u=n.innerType._zod.run(s,r);return u instanceof Promise?u.then(h=>Mx(h,s.value)):Mx(u,s.value)}return s.value===void 0?s:n.innerType._zod.run(s,r)}}),I7=te("$ZodExactOptional",(e,n)=>{xj.init(e,n),gt(e._zod,"values",()=>n.innerType._zod.values),gt(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(s,r)=>n.innerType._zod.run(s,r)}),O7=te("$ZodNullable",(e,n)=>{Lt.init(e,n),gt(e._zod,"optin",()=>n.innerType._zod.optin),gt(e._zod,"optout",()=>n.innerType._zod.optout),gt(e._zod,"pattern",()=>{const s=n.innerType._zod.pattern;return s?new RegExp(`^(${t0(s.source)}|null)$`):void 0}),gt(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(s,r)=>s.value===null?s:n.innerType._zod.run(s,r)}),P7=te("$ZodDefault",(e,n)=>{Lt.init(e,n),e._zod.optin="optional",gt(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(s,r)=>{if(r.direction==="backward")return n.innerType._zod.run(s,r);if(s.value===void 0)return s.value=n.defaultValue,s;const u=n.innerType._zod.run(s,r);return u instanceof Promise?u.then(h=>Bx(h,n)):Bx(u,n)}});function Bx(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const q7=te("$ZodPrefault",(e,n)=>{Lt.init(e,n),e._zod.optin="optional",gt(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(s,r)=>(r.direction==="backward"||s.value===void 0&&(s.value=n.defaultValue),n.innerType._zod.run(s,r))}),M7=te("$ZodNonOptional",(e,n)=>{Lt.init(e,n),gt(e._zod,"values",()=>{const s=n.innerType._zod.values;return s?new Set([...s].filter(r=>r!==void 0)):void 0}),e._zod.parse=(s,r)=>{const u=n.innerType._zod.run(s,r);return u instanceof Promise?u.then(h=>Lx(h,e)):Lx(u,e)}});function Lx(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 B7=te("$ZodCatch",(e,n)=>{Lt.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=(s,r)=>{if(r.direction==="backward")return n.innerType._zod.run(s,r);const u=n.innerType._zod.run(s,r);return u instanceof Promise?u.then(h=>(s.value=h.value,h.issues.length&&(s.value=n.catchValue({...s,error:{issues:h.issues.map(f=>Ri(f,r,Ei()))},input:s.value}),s.issues=[]),s)):(s.value=u.value,u.issues.length&&(s.value=n.catchValue({...s,error:{issues:u.issues.map(h=>Ri(h,r,Ei()))},input:s.value}),s.issues=[]),s)}}),L7=te("$ZodPipe",(e,n)=>{Lt.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=(s,r)=>{if(r.direction==="backward"){const h=n.out._zod.run(s,r);return h instanceof Promise?h.then(f=>gd(f,n.in,r)):gd(h,n.in,r)}const u=n.in._zod.run(s,r);return u instanceof Promise?u.then(h=>gd(h,n.out,r)):gd(u,n.out,r)}});function gd(e,n,s){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},s)}const U7=te("$ZodReadonly",(e,n)=>{Lt.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=(s,r)=>{if(r.direction==="backward")return n.innerType._zod.run(s,r);const u=n.innerType._zod.run(s,r);return u instanceof Promise?u.then(Ux):Ux(u)}});function Ux(e){return e.value=Object.freeze(e.value),e}const V7=te("$ZodLazy",(e,n)=>{Lt.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=(s,r)=>e._zod.innerType._zod.run(s,r)}),$7=te("$ZodCustom",(e,n)=>{Jn.init(e,n),Lt.init(e,n),e._zod.parse=(s,r)=>s,e._zod.check=s=>{const r=s.value,u=n.fn(r);if(u instanceof Promise)return u.then(h=>Vx(h,s,r,e));Vx(u,s,r,e)}});function Vx(e,n,s,r){if(!e){const u={code:"custom",input:s,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(u.params=r._zod.def.params),n.issues.push(Rc(u))}}var $x;class K7{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...s){const r=s[0];return this._map.set(n,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const s=this._map.get(n);return s&&typeof s=="object"&&"id"in s&&this._idmap.delete(s.id),this._map.delete(n),this}get(n){const s=n._zod.parent;if(s){const r={...this.get(s)??{}};delete r.id;const u={...r,...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 G7(){return new K7}($x=globalThis).__zod_globalRegistry??($x.__zod_globalRegistry=G7());const bc=globalThis.__zod_globalRegistry;function H7(e,n){return new e({type:"string",...qe(n)})}function F7(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...qe(n)})}function Kx(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...qe(n)})}function wj(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...qe(n)})}function Q7(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...qe(n)})}function Z7(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...qe(n)})}function Y7(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...qe(n)})}function X7(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...qe(n)})}function J7(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...qe(n)})}function W7(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...qe(n)})}function eD(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...qe(n)})}function tD(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...qe(n)})}function nD(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...qe(n)})}function aD(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...qe(n)})}function sD(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...qe(n)})}function iD(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...qe(n)})}function oD(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...qe(n)})}function rD(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...qe(n)})}function lD(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...qe(n)})}function cD(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...qe(n)})}function uD(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...qe(n)})}function dD(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...qe(n)})}function mD(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...qe(n)})}function pD(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...qe(n)})}function hD(e,n){return new e({type:"string",format:"date",check:"string_format",...qe(n)})}function fD(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...qe(n)})}function gD(e,n){return new e({type:"string",format:"duration",check:"string_format",...qe(n)})}function yD(e,n){return new e({type:"number",checks:[],...qe(n)})}function bD(e,n){return new e({type:"number",coerce:!0,checks:[],...qe(n)})}function vD(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...qe(n)})}function xD(e,n){return new e({type:"boolean",...qe(n)})}function wD(e,n){return new e({type:"null",...qe(n)})}function SD(e){return new e({type:"unknown"})}function kD(e,n){return new e({type:"never",...qe(n)})}function Gx(e,n){return new pj({check:"less_than",...qe(n),value:e,inclusive:!1})}function hf(e,n){return new pj({check:"less_than",...qe(n),value:e,inclusive:!0})}function Hx(e,n){return new hj({check:"greater_than",...qe(n),value:e,inclusive:!1})}function ff(e,n){return new hj({check:"greater_than",...qe(n),value:e,inclusive:!0})}function Fx(e,n){return new OR({check:"multiple_of",...qe(n),value:e})}function Sj(e,n){return new qR({check:"max_length",...qe(n),maximum:e})}function $d(e,n){return new MR({check:"min_length",...qe(n),minimum:e})}function kj(e,n){return new BR({check:"length_equals",...qe(n),length:e})}function jD(e,n){return new LR({check:"string_format",format:"regex",...qe(n),pattern:e})}function AD(e){return new UR({check:"string_format",format:"lowercase",...qe(e)})}function ND(e){return new VR({check:"string_format",format:"uppercase",...qe(e)})}function CD(e,n){return new $R({check:"string_format",format:"includes",...qe(n),includes:e})}function _D(e,n){return new KR({check:"string_format",format:"starts_with",...qe(n),prefix:e})}function TD(e,n){return new GR({check:"string_format",format:"ends_with",...qe(n),suffix:e})}function Fr(e){return new HR({check:"overwrite",tx:e})}function ED(e){return Fr(n=>n.normalize(e))}function RD(){return Fr(e=>e.trim())}function DD(){return Fr(e=>e.toLowerCase())}function zD(){return Fr(e=>e.toUpperCase())}function ID(){return Fr(e=>B8(e))}function OD(e,n,s){return new e({type:"array",element:n,...qe(s)})}function PD(e,n,s){return new e({type:"custom",check:"custom",fn:n,...qe(s)})}function qD(e){const n=MD(s=>(s.addIssue=r=>{if(typeof r=="string")s.issues.push(Rc(r,s.value,n._zod.def));else{const u=r;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=s.value),u.inst??(u.inst=n),u.continue??(u.continue=!n._zod.def.abort),s.issues.push(Rc(u))}},e(s.value,s)));return n}function MD(e,n){const s=new Jn({check:"custom",...qe(n)});return s._zod.check=e,s}function jj(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??bc,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,s={path:[],schemaPath:[]}){var r;const u=e._zod.def,h=n.seen.get(e);if(h)return h.count++,s.schemaPath.includes(e)&&(h.cycle=s.path),h.schema;const f={schema:{},count:1,cycle:void 0,path:s.path};n.seen.set(e,f);const b=e._zod.toJSONSchema?.();if(b)f.schema=b;else{const S={...s,schemaPath:[...s.schemaPath,e],path:s.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,f.schema,S);else{const N=f.schema,T=n.processors[u.type];if(!T)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);T(e,n,N,S)}const k=e._zod.parent;k&&(f.ref||(f.ref=k),an(k,n,S),n.seen.get(k).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&&((r=f.schema).default??(r.default=f.schema._prefault)),delete f.schema._prefault,n.seen.get(e).schema}function Aj(e,n){const s=e.seen.get(n);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const f of e.seen.entries()){const b=e.metadataRegistry.get(f[0])?.id;if(b){const v=r.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.`);r.set(b,f[0])}}const u=f=>{const b=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const k=e.external.registry.get(f[0])?.id,N=e.external.uri??(z=>z);if(k)return{ref:N(k)};const T=f[1].defId??f[1].schema.id??`schema${e.counter++}`;return f[1].defId=T,{defId:T,ref:`${N("__shared")}#/${b}/${T}`}}if(f[1]===s)return{ref:"#"};const x=`#/${b}/`,S=f[1].schema.id??`__schema${e.counter++}`;return{defId:S,ref:x+S}},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 S=b.schema;for(const k in S)delete S[k];S.$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 Nj(e,n){const s=e.seen.get(n);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=f=>{const b=e.seen.get(f);if(b.ref===null)return;const v=b.def??b.schema,x={...v},S=b.ref;if(b.ref=null,S){r(S);const N=e.seen.get(S),T=N.schema;if(T.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(v.allOf=v.allOf??[],v.allOf.push(T)):Object.assign(v,T),Object.assign(v,x),f._zod.parent===S)for(const q in v)q==="$ref"||q==="allOf"||q in x||delete v[q];if(T.$ref&&N.def)for(const q in v)q==="$ref"||q==="allOf"||q in N.def&&JSON.stringify(v[q])===JSON.stringify(N.def[q])&&delete v[q]}const k=f._zod.parent;if(k&&k!==S){r(k);const N=e.seen.get(k);if(N?.schema.$ref&&(v.$ref=N.schema.$ref,N.def))for(const T in v)T==="$ref"||T==="allOf"||T in N.def&&JSON.stringify(v[T])===JSON.stringify(N.def[T])&&delete v[T]}e.override({zodSchema:f,jsonSchema:v,path:b.path??[]})};for(const f of[...e.seen.entries()].reverse())r(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,s.def??s.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:Kd(n,"input",e.processors),output:Kd(n,"output",e.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function Ln(e,n){const s=n??{seen:new Set};if(s.seen.has(e))return!1;s.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Ln(r.element,s);if(r.type==="set")return Ln(r.valueType,s);if(r.type==="lazy")return Ln(r.getter(),s);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Ln(r.innerType,s);if(r.type==="intersection")return Ln(r.left,s)||Ln(r.right,s);if(r.type==="record"||r.type==="map")return Ln(r.keyType,s)||Ln(r.valueType,s);if(r.type==="pipe")return Ln(r.in,s)||Ln(r.out,s);if(r.type==="object"){for(const u in r.shape)if(Ln(r.shape[u],s))return!0;return!1}if(r.type==="union"){for(const u of r.options)if(Ln(u,s))return!0;return!1}if(r.type==="tuple"){for(const u of r.items)if(Ln(u,s))return!0;return!!(r.rest&&Ln(r.rest,s))}return!1}const BD=(e,n={})=>s=>{const r=jj({...s,processors:n});return an(e,r),Aj(r,e),Nj(r,e)},Kd=(e,n,s={})=>r=>{const{libraryOptions:u,target:h}=r??{},f=jj({...u??{},target:h,io:n,processors:s});return an(e,f),Aj(f,e),Nj(f,e)},LD={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},UD=(e,n,s,r)=>{const u=s;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=LD[b]??b,u.format===""&&delete u.format,b==="time"&&delete u.format),x&&(u.contentEncoding=x),v&&v.size>0){const S=[...v];S.length===1?u.pattern=S[0].source:S.length>1&&(u.allOf=[...S.map(k=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:k.source}))])}},VD=(e,n,s,r)=>{const u=s,{minimum:h,maximum:f,format:b,multipleOf:v,exclusiveMaximum:x,exclusiveMinimum:S}=e._zod.bag;typeof b=="string"&&b.includes("int")?u.type="integer":u.type="number",typeof S=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(u.minimum=S,u.exclusiveMinimum=!0):u.exclusiveMinimum=S),typeof h=="number"&&(u.minimum=h,typeof S=="number"&&n.target!=="draft-04"&&(S>=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)},$D=(e,n,s,r)=>{s.type="boolean"},KD=(e,n,s,r)=>{n.target==="openapi-3.0"?(s.type="string",s.nullable=!0,s.enum=[null]):s.type="null"},GD=(e,n,s,r)=>{s.not={}},HD=(e,n,s,r)=>{},FD=(e,n,s,r)=>{const u=e._zod.def,h=nj(u.entries);h.every(f=>typeof f=="number")&&(s.type="number"),h.every(f=>typeof f=="string")&&(s.type="string"),s.enum=h},QD=(e,n,s,r)=>{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];s.type=f===null?"null":typeof f,n.target==="draft-04"||n.target==="openapi-3.0"?s.enum=[f]:s.const=f}else h.every(f=>typeof f=="number")&&(s.type="number"),h.every(f=>typeof f=="string")&&(s.type="string"),h.every(f=>typeof f=="boolean")&&(s.type="boolean"),h.every(f=>f===null)&&(s.type="null"),s.enum=h},ZD=(e,n,s,r)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},YD=(e,n,s,r)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},XD=(e,n,s,r)=>{const u=s,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,{...r,path:[...r.path,"items"]})},JD=(e,n,s,r)=>{const u=s,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,{...r,path:[...r.path,"properties",x]});const b=new Set(Object.keys(f)),v=new Set([...b].filter(x=>{const S=h.shape[x]._zod;return n.io==="input"?S.optin===void 0:S.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,{...r,path:[...r.path,"additionalProperties"]})):n.io==="output"&&(u.additionalProperties=!1)},WD=(e,n,s,r)=>{const u=e._zod.def,h=u.inclusive===!1,f=u.options.map((b,v)=>an(b,n,{...r,path:[...r.path,h?"oneOf":"anyOf",v]}));h?s.oneOf=f:s.anyOf=f},ez=(e,n,s,r)=>{const u=e._zod.def,h=an(u.left,n,{...r,path:[...r.path,"allOf",0]}),f=an(u.right,n,{...r,path:[...r.path,"allOf",1]}),b=x=>"allOf"in x&&Object.keys(x).length===1,v=[...b(h)?h.allOf:[h],...b(f)?f.allOf:[f]];s.allOf=v},tz=(e,n,s,r)=>{const u=s,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 S=an(h.valueType,n,{...r,path:[...r.path,"patternProperties","*"]});u.patternProperties={};for(const k of v)u.patternProperties[k.source]=S}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(u.propertyNames=an(h.keyType,n,{...r,path:[...r.path,"propertyNames"]})),u.additionalProperties=an(h.valueType,n,{...r,path:[...r.path,"additionalProperties"]});const x=f._zod.values;if(x){const S=[...x].filter(k=>typeof k=="string"||typeof k=="number");S.length>0&&(u.required=S)}},nz=(e,n,s,r)=>{const u=e._zod.def,h=an(u.innerType,n,r),f=n.seen.get(e);n.target==="openapi-3.0"?(f.ref=u.innerType,s.nullable=!0):s.anyOf=[h,{type:"null"}]},az=(e,n,s,r)=>{const u=e._zod.def;an(u.innerType,n,r);const h=n.seen.get(e);h.ref=u.innerType},sz=(e,n,s,r)=>{const u=e._zod.def;an(u.innerType,n,r);const h=n.seen.get(e);h.ref=u.innerType,s.default=JSON.parse(JSON.stringify(u.defaultValue))},iz=(e,n,s,r)=>{const u=e._zod.def;an(u.innerType,n,r);const h=n.seen.get(e);h.ref=u.innerType,n.io==="input"&&(s._prefault=JSON.parse(JSON.stringify(u.defaultValue)))},oz=(e,n,s,r)=>{const u=e._zod.def;an(u.innerType,n,r);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")}s.default=f},rz=(e,n,s,r)=>{const u=e._zod.def,h=n.io==="input"?u.in._zod.def.type==="transform"?u.out:u.in:u.out;an(h,n,r);const f=n.seen.get(e);f.ref=h},lz=(e,n,s,r)=>{const u=e._zod.def;an(u.innerType,n,r);const h=n.seen.get(e);h.ref=u.innerType,s.readOnly=!0},Cj=(e,n,s,r)=>{const u=e._zod.def;an(u.innerType,n,r);const h=n.seen.get(e);h.ref=u.innerType},cz=(e,n,s,r)=>{const u=e._zod.innerType;an(u,n,r);const h=n.seen.get(e);h.ref=u},uz=te("ZodISODateTime",(e,n)=>{o7.init(e,n),Xt.init(e,n)});function _j(e){return pD(uz,e)}const dz=te("ZodISODate",(e,n)=>{r7.init(e,n),Xt.init(e,n)});function Gd(e){return hD(dz,e)}const mz=te("ZodISOTime",(e,n)=>{l7.init(e,n),Xt.init(e,n)});function pz(e){return fD(mz,e)}const hz=te("ZodISODuration",(e,n)=>{c7.init(e,n),Xt.init(e,n)});function fz(e){return gD(hz,e)}const gz=(e,n)=>{oj.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:s=>J8(e,s)},flatten:{value:s=>X8(e,s)},addIssue:{value:s=>{e.issues.push(s),e.message=JSON.stringify(e.issues,ag,2)}},addIssues:{value:s=>{e.issues.push(...s),e.message=JSON.stringify(e.issues,ag,2)}},isEmpty:{get(){return e.issues.length===0}}})},Da=te("ZodError",gz,{Parent:Error}),yz=a0(Da),bz=s0(Da),vz=xm(Da),xz=wm(Da),wz=tR(Da),Sz=nR(Da),kz=aR(Da),jz=sR(Da),Az=iR(Da),Nz=oR(Da),Cz=rR(Da),_z=lR(Da),Ut=te("ZodType",(e,n)=>(Lt.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Kd(e,"input"),output:Kd(e,"output")}}),e.toJSONSchema=BD(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...s)=>e.clone(Oi(n,{checks:[...n.checks??[],...s.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(s,r)=>Pi(e,s,r),e.brand=()=>e,e.register=((s,r)=>(s.add(e,r),e)),e.parse=(s,r)=>yz(e,s,r,{callee:e.parse}),e.safeParse=(s,r)=>vz(e,s,r),e.parseAsync=async(s,r)=>bz(e,s,r,{callee:e.parseAsync}),e.safeParseAsync=async(s,r)=>xz(e,s,r),e.spa=e.safeParseAsync,e.encode=(s,r)=>wz(e,s,r),e.decode=(s,r)=>Sz(e,s,r),e.encodeAsync=async(s,r)=>kz(e,s,r),e.decodeAsync=async(s,r)=>jz(e,s,r),e.safeEncode=(s,r)=>Az(e,s,r),e.safeDecode=(s,r)=>Nz(e,s,r),e.safeEncodeAsync=async(s,r)=>Cz(e,s,r),e.safeDecodeAsync=async(s,r)=>_z(e,s,r),e.refine=(s,r)=>e.check(jI(s,r)),e.superRefine=s=>e.check(AI(s)),e.overwrite=s=>e.check(Fr(s)),e.optional=()=>Yx(e),e.exactOptional=()=>cI(e),e.nullable=()=>Xx(e),e.nullish=()=>Yx(Xx(e)),e.nonoptional=s=>fI(e,s),e.array=()=>y(e),e.or=s=>Xe([e,s]),e.and=s=>sI(e,s),e.transform=s=>og(e,Dj(s)),e.default=s=>mI(e,s),e.prefault=s=>hI(e,s),e.catch=s=>yI(e,s),e.pipe=s=>og(e,s),e.readonly=()=>xI(e),e.describe=s=>{const r=e.clone();return bc.add(r,{description:s}),r},Object.defineProperty(e,"description",{get(){return bc.get(e)?.description},configurable:!0}),e.meta=(...s)=>{if(s.length===0)return bc.get(e);const r=e.clone();return bc.add(r,s[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=s=>s(e),e)),Tj=te("_ZodString",(e,n)=>{i0.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(r,u,h)=>UD(e,r,u);const s=e._zod.bag;e.format=s.format??null,e.minLength=s.minimum??null,e.maxLength=s.maximum??null,e.regex=(...r)=>e.check(jD(...r)),e.includes=(...r)=>e.check(CD(...r)),e.startsWith=(...r)=>e.check(_D(...r)),e.endsWith=(...r)=>e.check(TD(...r)),e.min=(...r)=>e.check($d(...r)),e.max=(...r)=>e.check(Sj(...r)),e.length=(...r)=>e.check(kj(...r)),e.nonempty=(...r)=>e.check($d(1,...r)),e.lowercase=r=>e.check(AD(r)),e.uppercase=r=>e.check(ND(r)),e.trim=()=>e.check(RD()),e.normalize=(...r)=>e.check(ED(...r)),e.toLowerCase=()=>e.check(DD()),e.toUpperCase=()=>e.check(zD()),e.slugify=()=>e.check(ID())}),Tz=te("ZodString",(e,n)=>{i0.init(e,n),Tj.init(e,n),e.email=s=>e.check(F7(Ez,s)),e.url=s=>e.check(X7(Dz,s)),e.jwt=s=>e.check(mD(Fz,s)),e.emoji=s=>e.check(J7(zz,s)),e.guid=s=>e.check(Kx(Qx,s)),e.uuid=s=>e.check(wj(vc,s)),e.uuidv4=s=>e.check(Q7(vc,s)),e.uuidv6=s=>e.check(Z7(vc,s)),e.uuidv7=s=>e.check(Y7(vc,s)),e.nanoid=s=>e.check(W7(Iz,s)),e.guid=s=>e.check(Kx(Qx,s)),e.cuid=s=>e.check(eD(Oz,s)),e.cuid2=s=>e.check(tD(Pz,s)),e.ulid=s=>e.check(nD(qz,s)),e.base64=s=>e.check(cD(Kz,s)),e.base64url=s=>e.check(uD(Gz,s)),e.xid=s=>e.check(aD(Mz,s)),e.ksuid=s=>e.check(sD(Bz,s)),e.ipv4=s=>e.check(iD(Lz,s)),e.ipv6=s=>e.check(oD(Uz,s)),e.cidrv4=s=>e.check(rD(Vz,s)),e.cidrv6=s=>e.check(lD($z,s)),e.e164=s=>e.check(dD(Hz,s)),e.datetime=s=>e.check(_j(s)),e.date=s=>e.check(Gd(s)),e.time=s=>e.check(pz(s)),e.duration=s=>e.check(fz(s))});function o(e){return H7(Tz,e)}const Xt=te("ZodStringFormat",(e,n)=>{Gt.init(e,n),Tj.init(e,n)}),Ez=te("ZodEmail",(e,n)=>{XR.init(e,n),Xt.init(e,n)}),Qx=te("ZodGUID",(e,n)=>{ZR.init(e,n),Xt.init(e,n)}),vc=te("ZodUUID",(e,n)=>{YR.init(e,n),Xt.init(e,n)});function Rz(e){return wj(vc,e)}const Dz=te("ZodURL",(e,n)=>{JR.init(e,n),Xt.init(e,n)}),zz=te("ZodEmoji",(e,n)=>{WR.init(e,n),Xt.init(e,n)}),Iz=te("ZodNanoID",(e,n)=>{e7.init(e,n),Xt.init(e,n)}),Oz=te("ZodCUID",(e,n)=>{t7.init(e,n),Xt.init(e,n)}),Pz=te("ZodCUID2",(e,n)=>{n7.init(e,n),Xt.init(e,n)}),qz=te("ZodULID",(e,n)=>{a7.init(e,n),Xt.init(e,n)}),Mz=te("ZodXID",(e,n)=>{s7.init(e,n),Xt.init(e,n)}),Bz=te("ZodKSUID",(e,n)=>{i7.init(e,n),Xt.init(e,n)}),Lz=te("ZodIPv4",(e,n)=>{u7.init(e,n),Xt.init(e,n)}),Uz=te("ZodIPv6",(e,n)=>{d7.init(e,n),Xt.init(e,n)}),Vz=te("ZodCIDRv4",(e,n)=>{m7.init(e,n),Xt.init(e,n)}),$z=te("ZodCIDRv6",(e,n)=>{p7.init(e,n),Xt.init(e,n)}),Kz=te("ZodBase64",(e,n)=>{h7.init(e,n),Xt.init(e,n)}),Gz=te("ZodBase64URL",(e,n)=>{g7.init(e,n),Xt.init(e,n)}),Hz=te("ZodE164",(e,n)=>{y7.init(e,n),Xt.init(e,n)}),Fz=te("ZodJWT",(e,n)=>{v7.init(e,n),Xt.init(e,n)}),o0=te("ZodNumber",(e,n)=>{gj.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(r,u,h)=>VD(e,r,u),e.gt=(r,u)=>e.check(Hx(r,u)),e.gte=(r,u)=>e.check(ff(r,u)),e.min=(r,u)=>e.check(ff(r,u)),e.lt=(r,u)=>e.check(Gx(r,u)),e.lte=(r,u)=>e.check(hf(r,u)),e.max=(r,u)=>e.check(hf(r,u)),e.int=r=>e.check(Zx(r)),e.safe=r=>e.check(Zx(r)),e.positive=r=>e.check(Hx(0,r)),e.nonnegative=r=>e.check(ff(0,r)),e.negative=r=>e.check(Gx(0,r)),e.nonpositive=r=>e.check(hf(0,r)),e.multipleOf=(r,u)=>e.check(Fx(r,u)),e.step=(r,u)=>e.check(Fx(r,u)),e.finite=()=>e;const s=e._zod.bag;e.minValue=Math.max(s.minimum??Number.NEGATIVE_INFINITY,s.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(s.maximum??Number.POSITIVE_INFINITY,s.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(s.format??"").includes("int")||Number.isSafeInteger(s.multipleOf??.5),e.isFinite=!0,e.format=s.format??null});function m(e){return yD(o0,e)}const Qz=te("ZodNumberFormat",(e,n)=>{x7.init(e,n),o0.init(e,n)});function Zx(e){return vD(Qz,e)}const Zz=te("ZodBoolean",(e,n)=>{w7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>$D(e,s,r)});function _(e){return xD(Zz,e)}const Yz=te("ZodNull",(e,n)=>{S7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>KD(e,s,r)});function de(e){return wD(Yz,e)}const Xz=te("ZodUnknown",(e,n)=>{k7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>HD()});function Sn(){return SD(Xz)}const Jz=te("ZodNever",(e,n)=>{j7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>GD(e,s,r)});function Wz(e){return kD(Jz,e)}const eI=te("ZodArray",(e,n)=>{A7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>XD(e,s,r,u),e.element=n.element,e.min=(s,r)=>e.check($d(s,r)),e.nonempty=s=>e.check($d(1,s)),e.max=(s,r)=>e.check(Sj(s,r)),e.length=(s,r)=>e.check(kj(s,r)),e.unwrap=()=>e.element});function y(e,n){return OD(eI,e,n)}const Ej=te("ZodObject",(e,n)=>{C7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>JD(e,s,r,u),gt(e,"shape",()=>n.shape),e.keyof=()=>j(Object.keys(e._zod.def.shape)),e.catchall=s=>e.clone({...e._zod.def,catchall:s}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Sn()}),e.loose=()=>e.clone({...e._zod.def,catchall:Sn()}),e.strict=()=>e.clone({...e._zod.def,catchall:Wz()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=s=>H8(e,s),e.safeExtend=s=>F8(e,s),e.merge=s=>Q8(e,s),e.pick=s=>K8(e,s),e.omit=s=>G8(e,s),e.partial=(...s)=>Z8(zj,e,s[0]),e.required=(...s)=>Y8(Ij,e,s[0])});function d(e,n){const s={type:"object",shape:e??{},...qe(n)};return new Ej(s)}function tI(e,n){return new Ej({type:"object",shape:e,catchall:Sn(),...qe(n)})}const Rj=te("ZodUnion",(e,n)=>{vj.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>WD(e,s,r,u),e.options=n.options});function Xe(e,n){return new Rj({type:"union",options:e,...qe(n)})}const nI=te("ZodDiscriminatedUnion",(e,n)=>{Rj.init(e,n),_7.init(e,n)});function $e(e,n,s){return new nI({type:"union",options:n,discriminator:e,...qe(s)})}const aI=te("ZodIntersection",(e,n)=>{T7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>ez(e,s,r,u)});function sI(e,n){return new aI({type:"intersection",left:e,right:n})}const iI=te("ZodRecord",(e,n)=>{E7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>tz(e,s,r,u),e.keyType=n.keyType,e.valueType=n.valueType});function He(e,n,s){return new iI({type:"record",keyType:e,valueType:n,...qe(s)})}const ig=te("ZodEnum",(e,n)=>{R7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(r,u,h)=>FD(e,r,u),e.enum=n.entries,e.options=Object.values(n.entries);const s=new Set(Object.keys(n.entries));e.extract=(r,u)=>{const h={};for(const f of r)if(s.has(f))h[f]=n.entries[f];else throw new Error(`Key ${f} not found in enum`);return new ig({...n,checks:[],...qe(u),entries:h})},e.exclude=(r,u)=>{const h={...n.entries};for(const f of r)if(s.has(f))delete h[f];else throw new Error(`Key ${f} not found in enum`);return new ig({...n,checks:[],...qe(u),entries:h})}});function j(e,n){const s=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ig({type:"enum",entries:s,...qe(n)})}const oI=te("ZodLiteral",(e,n)=>{D7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>QD(e,s,r),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 oI({type:"literal",values:Array.isArray(e)?e:[e],...qe(n)})}const rI=te("ZodTransform",(e,n)=>{z7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>YD(e,s),e._zod.parse=(s,r)=>{if(r.direction==="backward")throw new ej(e.constructor.name);s.addIssue=h=>{if(typeof h=="string")s.issues.push(Rc(h,s.value,n));else{const f=h;f.fatal&&(f.continue=!1),f.code??(f.code="custom"),f.input??(f.input=s.value),f.inst??(f.inst=e),s.issues.push(Rc(f))}};const u=n.transform(s.value,s);return u instanceof Promise?u.then(h=>(s.value=h,s)):(s.value=u,s)}});function Dj(e){return new rI({type:"transform",transform:e})}const zj=te("ZodOptional",(e,n)=>{xj.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>Cj(e,s,r,u),e.unwrap=()=>e._zod.def.innerType});function Yx(e){return new zj({type:"optional",innerType:e})}const lI=te("ZodExactOptional",(e,n)=>{I7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>Cj(e,s,r,u),e.unwrap=()=>e._zod.def.innerType});function cI(e){return new lI({type:"optional",innerType:e})}const uI=te("ZodNullable",(e,n)=>{O7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>nz(e,s,r,u),e.unwrap=()=>e._zod.def.innerType});function Xx(e){return new uI({type:"nullable",innerType:e})}const dI=te("ZodDefault",(e,n)=>{P7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>sz(e,s,r,u),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function mI(e,n){return new dI({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():sj(n)}})}const pI=te("ZodPrefault",(e,n)=>{q7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>iz(e,s,r,u),e.unwrap=()=>e._zod.def.innerType});function hI(e,n){return new pI({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():sj(n)}})}const Ij=te("ZodNonOptional",(e,n)=>{M7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>az(e,s,r,u),e.unwrap=()=>e._zod.def.innerType});function fI(e,n){return new Ij({type:"nonoptional",innerType:e,...qe(n)})}const gI=te("ZodCatch",(e,n)=>{B7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>oz(e,s,r,u),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function yI(e,n){return new gI({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const bI=te("ZodPipe",(e,n)=>{L7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>rz(e,s,r,u),e.in=n.in,e.out=n.out});function og(e,n){return new bI({type:"pipe",in:e,out:n})}const vI=te("ZodReadonly",(e,n)=>{U7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>lz(e,s,r,u),e.unwrap=()=>e._zod.def.innerType});function xI(e){return new vI({type:"readonly",innerType:e})}const wI=te("ZodLazy",(e,n)=>{V7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>cz(e,s,r,u),e.unwrap=()=>e._zod.def.getter()});function SI(e){return new wI({type:"lazy",getter:e})}const kI=te("ZodCustom",(e,n)=>{$7.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(s,r,u)=>ZD(e,s)});function jI(e,n={}){return PD(kI,e,n)}function AI(e){return qD(e)}function rs(e,n){return og(Dj(e),n)}const fe={custom:"custom"};function Us(e){return bD(o0,e)}const Oj=d({id:o(),name:o(),keyPrefix:o(),scopes:y(o()),projectId:o().nullable(),projectName:o().nullable(),readOnly:_(),operator:_().optional(),createdAt:o(),lastUsedAt:o().nullable(),revokedAt:o().nullable()});d({keys:y(Oj)});d({name:o().min(1).max(100),scopes:y(o()).min(1).optional(),projectId:o().optional()});Oj.extend({key:o()});const r0=j(["used","not-used","unknown","not-applicable"]);r0.enum;const l0=j(["native-auto-v1","search-required-v1"]);l0.enum;const NI=d({maxConcurrency:m().int().positive(),maxRequestsPerMinute:m().int().positive(),maxRequestsPerDay:m().int().positive()}),rg=["gemini","openai","claude","perplexity","muse","local","cdp:chatgpt"],St=o().min(1),km=He(o(),o().trim().min(1));o().min(1);const mn=d({label:o().min(1),city:o().min(1),region:o().min(1),country:o().length(2),timezone:o().optional()}),c0=j(["answer-visibility","traffic-sync","gbp-sync","data-refresh","backlinks-sync","site-audit","ads-sync","doctor"]);c0.enum;const u0=d({everyDays:m().int().min(1).max(3650),startDate:o().date(),time:o().regex(/^([01]\d|2[0-3]):[0-5]\d$/,"Time must be HH:mm")}).strict();d({id:o(),projectId:o(),kind:c0,cronExpr:o(),recurrence:u0.nullable().optional(),preset:o().nullable().optional(),timezone:o().default("UTC"),enabled:_().default(!0),providers:y(St).default([]),sourceId:o().nullable().optional(),lastRunAt:o().nullable().optional(),nextRunAt:o().nullable().optional(),createdAt:o(),updatedAt:o()});const CI=o().datetime();d({kind:c0.optional(),preset:o().min(1).optional(),cron:o().min(1).optional(),recurrence:u0.optional(),timezone:o().optional().default("UTC"),enabled:_().optional().default(!0),providers:y(St).optional().default([]),sourceId:o().optional(),expectedUpdatedAt:CI.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 jm=j(["citation.lost","citation.gained","run.completed","run.failed","insight.critical","insight.high","health.degraded","health.recovered","review.negative","review.rating-dropped"]);d({id:o(),projectId:o(),channel:R("webhook"),url:o().url(),urlDisplay:o(),urlHost:o(),events:y(jm),enabled:_().default(!0),source:o().optional(),webhookSecret:o().optional(),createdAt:o(),updatedAt:o()});d({channel:R("webhook"),url:o().url(),events:y(jm).min(1),source:o().optional()});class _I extends Error{code;statusCode;details;constructor(n,s,r,u){super(s),this.name="AppError",this.code=n,this.statusCode=r,this.details=u}toJSON(){return{error:{code:this.code,message:this.message,...this.details?{details:this.details}:{}}}}}function Jx(e,n){return new _I("VALIDATION_ERROR",e,400,n)}function qs(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 Yn={openai:"openai.com",chatgpt:"chatgpt.com",chatgptLegacy:"chat.openai.com",claude:"claude.ai",perplexity:"perplexity.ai",gemini:"gemini.google.com",bard:"bard.google.com",copilotMicrosoft:"copilot.microsoft.com",copilot:"copilot.com",deepseek:"deepseek.com",metaAi:"meta.ai",grok:"grok.com",you:"you.com",phind:"phind.com"},TI="anthropic.com",EI=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,RI=/[\0-\x1F\x7F-\x9F]/,DI=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,zI=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var II=class{src_Any=EI.source;src_Cc=RI.source;src_Z=zI.source;src_P=DI.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,s=4){const r=this.escapeRE(e),u=this.escapeRE(n),h=`(?:(?!${this.src_ZCc}|${r}|${u}).)`;let f=`${r}${h}{0,1000}${u}`;for(let b=2;b<=s;b++)f=`${r}(?:${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")}},gf={validate:(e,n,s)=>{const r=s.re.get_http_validator();r.lastIndex=n;const u=r.exec(e);return u?u[0].length:0},normalize:(e,n)=>n.normalize(e)},OI={"http:":gf,"https:":gf,"ftp:":gf,"//":{validate:function(e,n,s){const r=s.re.get_relative_proto_validator();r.lastIndex=n;const u=r.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,s){const r=s.re.get_mailto_validator();r.lastIndex=n;const u=r.exec(e);return u?u[0].length:0},normalize:(e,n)=>n.normalize(e)}},PI="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",qI="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function MI(){const e=qI.split("|");return PI.split("|").forEach(n=>{const s=n.indexOf(":"),r=n.slice(0,s);for(const u of n.slice(s+1))e.push(r+u)}),e}var BI={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:MI(),urlAuth:!1,maxLength:1e4},Wx=class{schema;index;lastIndex;raw;text;url;constructor(e,n,s,r){const u=e.slice(s,r);this.schema=n.toLowerCase(),this.index=s,this.lastIndex=r,this.raw=u,this.text=u,this.url=u}},LI=class{__opts__;__schemas__;re;constructor(e={}){const{rebuilder:n,...s}=e;this.__opts__={...BI,...s},this.__schemas__={...OI},this.re=n||new II,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,n=null){if(!n)delete this.__schemas__[e];else{const s={normalize:(r,u)=>u.normalize(r),...n};this.__schemas__[e]=s}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,s;for(s=this.re.get_schema_search(),s.lastIndex=0;(n=s.exec(e))!==null;)if(this.testSchemaAt(e,n[2],s.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(s=this.re.get_fuzzy_link_search(),s.lastIndex=0,s.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const r=this.re.get_fuzzy_mail_host_search(),u=this.re.get_mail_name_validator();for(r.lastIndex=0;(n=r.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,s){return this.__schemas__[n.toLowerCase()]?this.__schemas__[n.toLowerCase()].validate(e.slice(0,s+this.__opts__.maxLength),s,this):0}match(e){const n=[],s=this.re.get_schema_search();let r,u,h,f,b,v,x=!1,S=!1,k=!1,N=0;if(!e.length)return null;for(s.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(r=this.re.get_fuzzy_link_search(),r.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 T=Math.max(N-1,0);if(u&&h&&!k&&(!b||b.index<N))for(u.lastIndex<T&&(u.lastIndex=T);;){const M=u.exec(e);if(!M){k=!0,b=void 0;break}const L=h.exec(e.slice(Math.max(0,M.index-65),M.index));if(L){if(b={schema:"mailto:",index:M.index-L[1].length,lastIndex:M.index+M[0].length},b.index>=N)break;u.lastIndex<T&&(u.lastIndex=T)}}if(r&&!S&&(!f||f.index<N))for(r.lastIndex<T&&(r.lastIndex=T);;){const M=r.exec(e);if(!M){S=!0,f=void 0;break}if(f={schema:"",index:M.index+M[1].length,lastIndex:M.index+M[0].length},f.index>=N)break;r.lastIndex<T&&(r.lastIndex=T)}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){s.lastIndex<T&&(s.lastIndex=T);const $=s.exec(e);if(!$){x=!0;break}v={schema:$[2],index:$.index+$[1].length,lastIndex:$.index+$[0].length}}if(v.index<N){v=void 0;continue}if(z&&v.index>z.index)break;const M=v;v=void 0;const L=this.testSchemaAt(e,M.schema,M.lastIndex);if(L){q={schema:M.schema,index:M.index,lastIndex:M.lastIndex+L};break}}let E=q;if((!E||b&&(b.index<E.index||b.index===E.index&&b.lastIndex>E.lastIndex))&&(E=b),(!E||f&&(f.index<E.index||f.index===E.index&&f.lastIndex>E.lastIndex))&&(E=f),!E)break;E===b?b=void 0:E===f&&(f=void 0);const P=new Wx(e,E.schema,E.index,E.lastIndex);P.schema?this.__schemas__[P.schema].normalize(P,this):this.normalize(P),n.push(P),N=E.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 s=this.testSchemaAt(e,n[2],n[0].length);if(!s)return null;const r=new Wx(e,n[2],n.index+n[1].length,n.index+n[0].length+s);return this.__schemas__[r.schema].normalize(r,this),r}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 Pj=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 UI(e,n){return e.endsWith(n)?e.length===n.length||e[e.length-n.length-1]===".":!1}function VI(e,n){const s=e.length-n.length-2,r=e.lastIndexOf(".",s);return r===-1?e:e.slice(r+1)}function $I(e,n,s){if(s.validHosts!==null){const u=s.validHosts;for(const h of u)if(UI(n,h))return h}let r=0;if(n.startsWith("."))for(;r<n.length&&n[r]===".";)r+=1;return e.length===n.length-r?null:VI(n,e)}function KI(e,n){return e.slice(0,-n.length-1)}const yf=/[\t\n\r]/g;let lg=!1;function ew(e){return e>=97&&e<=122||e>=48&&e<=57||e>127||e>=65&&e<=90||e===45||e===95}function tw(e,n,s){const r=s-n,u=e.charCodeAt(n)|32;if(r===2)return u===119&&(e.charCodeAt(n+1)|32)===115?1:0;if(r===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(r===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(r===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 xc(e,n,s=!1){let r=0,u=e.length,h=!1,f=!1;if(lg=!1,!n){if(e.startsWith("data:"))return null;for(;r<e.length&&e.charCodeAt(r)<=32;)r+=1;for(;u>r+1&&e.charCodeAt(u-1)<=32;)u-=1;if(e.charCodeAt(r)===47&&e.charCodeAt(r+1)===47)r+=2;else{const E=e.indexOf(":/",r);if(E!==-1){const P=tw(e,r,E);if(P===1)for(f=!0,r=E+2;e.charCodeAt(r)===47||e.charCodeAt(r)===92;)r+=1;else if(P===2){f=!0,r=E+1;let M=0;for(;(e.charCodeAt(r)===47||e.charCodeAt(r)===92)&&M<2;)r+=1,M+=1;if(M<2)return null}else{for(let M=r;M<E;M+=1){const L=e.charCodeAt(M)|32;if(!(L>=97&&L<=122||L>=48&&L<=57||L===46||L===45||L===43)){const $=e.charCodeAt(M);return $===9||$===10||$===13?xc(e.replace(yf,""),n,s):null}}if(e.charCodeAt(E+2)===47)r=E+3;else return null}}else if(e.charCodeAt(r)!==91){let P=-1;for(let M=r;M<u;M+=1){const L=e.charCodeAt(M);if(L===9||L===10||L===13)return xc(e.replace(yf,""),n,s);if(L===58){P=M;break}if(L===47||L===92||L===63||L===35)break}if(P!==-1){let M=!1;for(let L=P+1;L<u;L+=1){const $=e.charCodeAt(L);if($===47||$===92||$===63||$===35)break;if($===64){M=!0;break}}if(!M){let L=!0,$=P+1;for(;$<u;$+=1){const Q=e.charCodeAt($);if(Q===47||Q===92||Q===63||Q===35)break;if(Q<48||Q>57){L=!1;break}}if($===P+1&&(L=!1),!L){const Q=tw(e,r,P);if(Q===0){let ae=!1;for(let V=P+1;V<u;V+=1){const Z=e.charCodeAt(V);if(Z===47||Z===92||Z===63||Z===35)break;if(Z===58){ae=!0;break}}if(!ae)return null}else if(f=!0,r=P+1,Q===2){let ae=0;for(;(e.charCodeAt(r)===47||e.charCodeAt(r)===92)&&ae<2;)r+=1,ae+=1;if(ae<2)return null}else for(;e.charCodeAt(r)===47||e.charCodeAt(r)===92;)r+=1}}}}}let v=-1,x=-1,S=-1,k=-1,N=!1,T=s,z=r-1,q=-1;if(s&&r<u){const E=e.charCodeAt(r);(!(ew(E)||E===46||E===95)||E===45)&&(T=!1)}for(let E=r;E<u;E+=1){const P=e.charCodeAt(E);if(P<64)if(P===47||P===35||P===63){u=E;break}else P===58?(k===-1&&(k=E),S=E):P===9||P===10||P===13?N=!0:s&&(P===46?((E-z>64||q===46||q===45)&&(T=!1),z=E):(P<48||P>57)&&(P!==45||q===46)&&(T=!1));else if(f&&P===92){u=E;break}else P===64?(v=E,k=-1):P===93?x=E:P>=65&&P<=90?h=!0:s&&!ew(P)&&(T=!1);s&&(q=P)}if(N)return xc(e.replace(yf,""),n,s);if(v!==-1&&v>=r&&v<u&&(r=v+1),e.charCodeAt(r)===91)return x!==-1?e.slice(r+1,x).toLowerCase():null;if(S!==-1&&S>r&&S<u&&k===S&&(u=S),r>=u)return null;s&&T&&v===-1&&S===-1&&x===-1&&e.charCodeAt(u-1)!==46&&u-r<=255&&u-z-1<=63&&q!==45&&(lg=!0)}for(;u>r+1&&e.charCodeAt(u-1)===46;)u-=1;const b=r!==0||u!==e.length?e.slice(r,u):e;return h?b.toLowerCase():b}function GI(e){if(e.length<7||e.length>15)return!1;let n=0;for(let s=0;s<e.length;s+=1){const r=e.charCodeAt(s);if(r===46)n+=1;else if(r<48||r>57)return!1}return n===3&&e.charCodeAt(0)!==46&&e.charCodeAt(e.length-1)!==46}function HI(e){if(e.length<3)return!1;let n=e.startsWith("[")?1:0,s=e.length;if(e[s-1]==="]"&&(s-=1),s-n>39)return!1;let r=!1;for(;n<s;n+=1){const u=e.charCodeAt(n);if(u===58)r=!0;else if(!(u>=48&&u<=57||u>=97&&u<=102||u>=65&&u<=70))return!1}return r}function FI(e){return HI(e)||GI(e)}const QI=["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 ZI(e){for(const n of QI)if(e.endsWith(n)&&(e.length===n.length||e.charCodeAt(e.length-n.length-1)===46))return!0;return!1}function nw(e){return e>=97&&e<=122||e>=48&&e<=57||e>127}function aw(e){if(e.length>255||e.length===0||!nw(e.charCodeAt(0))&&e.charCodeAt(0)!==46&&e.charCodeAt(0)!==95)return!1;let n=-1,s=-1;const r=e.length;for(let u=0;u<r;u+=1){const h=e.charCodeAt(u);if(h===46){if(u-n>64||s===46||s===45)return!1;n=u}else if(!(nw(h)||h===45||h===95)||h===45&&s===46)return!1;s=h}return r-n-1<=63&&s!==45}function qj({allowIcannDomains:e=!0,allowPrivateDomains:n=!1,detectIp:s=!0,detectSpecialUse:r=!1,extractHostname:u=!0,mixedInputs:h=!0,validHosts:f=null,validateHostname:b=!0}){return{allowIcannDomains:e,allowPrivateDomains:n,detectIp:s,detectSpecialUse:r,extractHostname:u,mixedInputs:h,validHosts:f,validateHostname:b}}const YI=qj({});function XI(e){return e===void 0?YI:qj(e)}function JI(e,n){return n.length===e.length?"":e.slice(0,-n.length-1)}function WI(){return{domain:null,domainWithoutSuffix:null,hostname:null,isIcann:null,isIp:null,isPrivate:null,isSpecialUse:null,publicSuffix:null,subdomain:null}}function Mj(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 Bj(e,n,s,r,u){const h=XI(r);if(typeof e!="string")return u;let f=!1;return h.extractHostname?h.mixedInputs?(f=aw(e),u.hostname=xc(e,f,h.validateHostname)):u.hostname=xc(e,!1,h.validateHostname):u.hostname=e,h.detectIp&&u.hostname!==null&&(u.isIp=FI(u.hostname),u.isIp)?u:h.validateHostname&&h.extractHostname&&u.hostname!==null&&!(f&&u.hostname===e)&&!lg&&!aw(u.hostname)?(u.hostname=null,u):(n===0||u.hostname===null||(n===5&&h.detectSpecialUse&&(u.isSpecialUse=ZI(u.hostname)),s(u.hostname,h,u),n===2||u.publicSuffix===null)||(u.domain=$I(u.publicSuffix,u.hostname,h),n===3||u.domain===null)||(u.subdomain=JI(u.hostname,u.domain),n===4)||(u.domainWithoutSuffix=KI(u.domain,u.publicSuffix)),u)}function e9(e,n,s){if(!n.allowPrivateDomains&&e.length>3){const r=e.length-1,u=e.charCodeAt(r),h=e.charCodeAt(r-1),f=e.charCodeAt(r-2),b=e.charCodeAt(r-3);if(u===109&&h===111&&f===99&&b===46)return s.isIcann=!0,s.isPrivate=!1,s.publicSuffix="com",!0;if(u===103&&h===114&&f===111&&b===46)return s.isIcann=!0,s.isPrivate=!1,s.publicSuffix="org",!0;if(u===117&&h===100&&f===101&&b===46)return s.isIcann=!0,s.isPrivate=!1,s.publicSuffix="edu",!0;if(u===118&&h===111&&f===103&&b===46)return s.isIcann=!0,s.isPrivate=!1,s.publicSuffix="gov",!0;if(u===116&&h===101&&f===110&&b===46)return s.isIcann=!0,s.isPrivate=!1,s.publicSuffix="net",!0;if(u===101&&h===100&&f===46)return s.isIcann=!0,s.isPrivate=!1,s.publicSuffix="de",!0}return!1}const wo=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]),Hd=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]),Fd=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]),sw=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]),cg="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",t9=621,n9=625,Lj=wo.length,Uj=Fd.length,Vj=new Uint32Array(Uj),zd=new Uint32Array(Uj),ug=new Int32Array(Lj).fill(-1);for(let e=0,n=0;e<Lj;e+=1)for(let s=Hd[e];s<Hd[e+1];s+=1){Vj[s]=n;const r=n+Fd[s];let u=5381;for(let h=r-1;h>=n;h-=1)u=u*33^cg.charCodeAt(h);zd[s]=u>>>0,Fd[s]===1&&cg.charCodeAt(n)===42&&(ug[e]=s),n=r}let Ms=-1,dg=0,mg=0;function iw(e,n,s,r){if(Fd[e]!==r)return!1;const u=Vj[e];for(let h=0;h<r;h+=1)if(cg.charCodeAt(u+h)!==n.charCodeAt(s+h))return!1;return!0}function ow(e,n,s,r,u){let h=Hd[e],f=Hd[e+1];for(;h<f;){const b=h+f>>>1,v=zd[b];if(v<n)h=b+1;else if(v>n)f=b;else{for(let x=b;x>=h&&zd[x]===n;x-=1)if(iw(x,s,r,u))return x;for(let x=b+1;x<f&&zd[x]===n;x+=1)if(iw(x,s,r,u))return x;return-1}}return-1}function rw(e,n,s){let r=n,u=e.length,h=5381;Ms=-1;for(let b=e.length-1;b>=0;b-=1){const v=e.charCodeAt(b);if(v===46){const x=b+1;let S=ow(r,h>>>0,e,x,u-x);if(S===-1&&(S=ug[r]),S===-1)return Ms!==-1;r=sw[S],(wo[r]&s)!==0&&(Ms=r,dg=x,mg=u),u=b,h=5381}else h=h*33^v}let f=ow(r,h>>>0,e,0,u);return f===-1&&(f=ug[r]),f!==-1&&(r=sw[f],(wo[r]&s)!==0&&(Ms=r,dg=0,mg=u)),Ms!==-1}function $j(e,n,s){if(e9(e,n,s))return;const r=(n.allowPrivateDomains?2:0)|(n.allowIcannDomains?1:0);if(rw(e,n9,r)){s.isIcann=(wo[Ms]&1)!==0,s.isPrivate=(wo[Ms]&2)!==0,s.publicSuffix=e.slice(mg+1);return}if(rw(e,t9,r)){s.isIcann=(wo[Ms]&1)!==0,s.isPrivate=(wo[Ms]&2)!==0,s.publicSuffix=e.slice(dg);return}s.isIcann=!1,s.isPrivate=!1;const u=e.lastIndexOf(".");s.publicSuffix=u===-1?e:e.slice(u+1)}const Qd=WI();function a9(e,n){return Mj(Qd),Bj(e,0,$j,n,Qd).hostname}function s9(e,n){return Mj(Qd),Bj(e,5,$j,n,Qd).domainWithoutSuffix}function Kj(e,n){return e<n?-1:e>n?1:0}const i9={allowPrivateDomains:!0};new LI({fuzzyLink:!0,fuzzyEmail:!1}).tlds(Pj);function $c(e){if(e==null)return null;const n=e.trim();if(!n)return null;const s=a9(n);return s?s.replace(/^www\./i,"").toLowerCase():null}function Dc(e){return $c(e)??e.trim().toLowerCase().replace(/^www\./,"")}function d0(e){return e==null||e.trim()===""?"":s9(e,i9)?.toLowerCase()??""}function xne(e){return d0(e)||e}const Gj=j(["chatgpt","perplexity","gemini","claude","copilot","grok","deepseek","meta-ai","phind","you-com"]),ss=Gj.enum,m0=[{engine:ss.chatgpt,label:"ChatGPT",domains:[Yn.chatgpt,Yn.chatgptLegacy,Yn.openai],tokens:["chatgpt","openai"],labels:["chatgpt","openai"]},{engine:ss.perplexity,label:"Perplexity",domains:[Yn.perplexity],tokens:["perplexity"],labels:["perplexity"]},{engine:ss.gemini,label:"Gemini",domains:[Yn.gemini,Yn.bard],tokens:["gemini","bard"],labels:[]},{engine:ss.claude,label:"Claude",domains:[Yn.claude,TI],tokens:["claude","anthropic"],labels:["claude","anthropic"]},{engine:ss.copilot,label:"Copilot",domains:[Yn.copilotMicrosoft,Yn.copilot],tokens:["copilot"],labels:[]},{engine:ss.grok,label:"Grok",domains:[Yn.grok],tokens:["grok"],labels:[]},{engine:ss.deepseek,label:"DeepSeek",domains:[Yn.deepseek],tokens:["deepseek"],labels:["deepseek"]},{engine:ss["meta-ai"],label:"Meta AI",domains:[Yn.metaAi],tokens:[],labels:[]},{engine:ss.phind,label:"Phind",domains:[Yn.phind],tokens:["phind"],labels:["phind"]},{engine:ss["you-com"],label:"You.com",domains:[Yn.you],tokens:[],labels:[]}];new Map(m0.flatMap(e=>e.tokens.map(n=>[n,e.engine])));new Map(m0.flatMap(e=>e.labels.map(n=>[n,e.engine])));new Map(m0.map(e=>[e.engine,e.label]));const o9=j(["fraction","percent"]),Ga=o9.enum,r9="x-unit";function Hj(e,n){return e.meta({[r9]:n})}function we(e=m()){return Hj(e,Ga.fraction)}function ot(e=m()){return Hj(e,Ga.percent)}Ga.fraction+"",Ga.percent+"";function bf(e,n=!1){const s=new Set,r=[];for(const u of e){const h=n?u.toLowerCase():u;s.has(h)||(s.add(h),r.push(u))}return r}function lw(e){try{const n=e.includes("://"),s=new URL(n?e:`https://${e}`);if(!n&&(s.pathname!=="/"||s.search||s.hash)||s.username||s.password||s.port)return null;const r=s.hostname.trim().toLowerCase().replace(/^www\./,"");return!r||r.includes("/")||r.includes("?")||r.includes("#")?null:r}catch{return null}}const l9=o().trim().min(1).refine(e=>lw(e)!==null,{message:"Marketing hosts must be valid hostnames without credentials or ports"}).overwrite(e=>lw(e)??e),c9=o().trim().min(1),u9=o().trim().regex(/^[a-z]\w{0,39}$/i,{message:"GA4 event names must start with a letter and contain only letters, numbers, or underscores"}),p0=d({marketingHosts:y(l9).overwrite(e=>bf(e,!0)),brandTerms:y(c9).overwrite(e=>bf(e,!0)),leadEventNames:y(u9).overwrite(e=>bf(e))});function d9(){return{marketingHosts:[],brandTerms:[],leadEventNames:["generate_lead"]}}const vf=Object.freeze({marketingHosts:Object.freeze([]),brandTerms:Object.freeze([]),leadEventNames:Object.freeze(["generate_lead"])}),Fj=()=>d9(),cw=j(["never-synced","ready","error"]),m9=j(["landing-page","channel"]),p9=j(["30d","60d","90d"]),h9=j(["marketing","all"]),wc=Gd(),Qr=d({label:j(["earliest","middle","previous","latest"]),startDate:wc,endDate:wc}),xf=Qr.extend({sessions:m().int().nonnegative()}),uw=Qr.extend({eventCount:m().int().nonnegative()}),dw=Qr.extend({clicks:m().int().nonnegative(),impressions:m().int().nonnegative()}),f9=Qr.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()}),wf=Qr.extend({eventCount:m().int().nonnegative(),sessions:m().int().nonnegative(),leadRate:we(m().nonnegative()).nullable()}),Qj=j(["no-data","sync-not-ready","channel-leads-unfiltered","paid-split-needs-landing-page","sessions-behind-leads","sessions-missing-on-lead-days"]);Qj.enum;const mw=d({periods:y(wf),engines:y(d({engine:Gj,label:o(),sources:y(o()),periods:y(wf)})),unattributed:d({sources:y(o()),periods:y(wf)})}),g9=d({leadRateAvailable:_(),leadRateUnavailableReason:Qj.nullable(),organic:mw,paid:mw}),y9=Qr.extend({sessions:m().int().nonnegative(),engagementRate:we(m().min(0).max(1)).nullable(),dailyTotalUsers:m().int().nonnegative().nullable(),dailyNewUsers:m().int().nonnegative().nullable(),metricsAvailable:_(),daysInPeriod:m().int().nonnegative(),daysWithEngagementRate:m().int().nonnegative(),daysWithUserSplit:m().int().nonnegative()}),b9=d({window:p9,bucketDays:R(30),filters:d({hostScope:h9,marketingHosts:y(o()),pathPrefix:o().nullable(),brandTerms:y(o()),queryMixScope:R("property")}),acquisition:d({status:cw,error:o().nullable(),syncedAt:o().datetime().nullable(),periods:y(xf),channels:y(d({channelGroup:o(),periods:y(xf)})),pages:y(d({hostName:o(),landingPage:o(),periods:y(xf)}))}),leads:d({status:cw,error:o().nullable(),syncedAt:o().datetime().nullable(),attributionScope:m9.nullable(),hostAndPathFiltersApplied:_(),periods:y(uw),channels:y(d({channelGroup:o(),periods:y(uw)})),aiEngines:g9}),engagement:d({status:j(["ready","unavailable"]),availableFromDate:wc.nullable(),latestDate:wc.nullable(),periods:y(y9)}),searchDemand:d({status:j(["ready","unavailable"]),periods:y(f9),queries:y(d({query:o(),classification:j(["branded","non-branded"]),periods:y(dw)})),pages:y(d({hostName:o(),landingPage:o(),periods:y(dw)})),latestDate:wc.nullable()})}),Kc=j(["sync","batch"]);Kc.enum;const h0=He(o(),Kc),Zj=j(["submitting","submitted","ended","ingested","cancelled","failed","unknown"]),pw=Zj.enum;pw.submitted,pw.ended;const f0=j(["standard","batch"]),hw=f0.enum,v9=d({inputTokens:m().int().nonnegative(),cachedInputTokens:m().int().nonnegative(),cacheWriteTokens:m().int().nonnegative(),outputTokens:m().int().nonnegative(),searchCount:m().int().nonnegative()}),x9=v9.extend({pricingTier:f0,estimatedCostMicros:m().int().nonnegative().nullable(),priceSource:Xe([j(["default","override"]),de()])}),Yj=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(o().min(1),Yj).default({})}).strict();d({enabled:_().default(!1),maxRequestsPerBatch:m().int().positive().optional(),deadlineHours:m().positive().optional()}).strict();const w9=new Intl.Segmenter("en",{granularity:"word"}),S9=/[^\p{L}\p{N}]+/gu,k9=/[\p{L}\p{N}]+/gu,j9=/[\p{Script=Latin}\p{Script=Greek}\p{Script=Cyrillic}]/u,A9=new RegExp("\\P{ASCII}","u");function N9(e){if(!A9.test(e))return e;let n="";for(const s of e){if(s.charCodeAt(0)<128){n+=s;continue}const r=s.normalize("NFD"),u=r[0];n+=r.length>1&&j9.test(u)?u:s}return n}function Xj(e){return N9(e.normalize("NFKC")).toLocaleLowerCase("en")}function Jj(e){const n=[];for(const s of w9.segment(e))if(s.isWordLike)for(const r of s.segment.match(k9)??[])n.push(r);return n}function C9(e){return Jj(Xj(e))}function Ra(e){return C9(e).join("")}const fw=new WeakMap;function _9(e){if(!e)return null;const n=Xj(e);return{normalized:n,stripped:n.replace(S9,"")}}function T9(e){const n=fw.get(e);if(n)return n;const s=Jj(e.normalized);return fw.set(e,s),s}function E9(e){const n=new Set;let s=0;for(const r of e){if(!r)continue;const u=Ra(r);u&&(n.add(u),u.length>s&&(s=u.length))}return{keys:n,longest:s}}function R9(e,n){if(!n||e.keys.size===0)return!1;const s=typeof n=="string"?_9(n):n;if(!s)return!1;let r=!1;for(const h of e.keys)if(s.stripped.includes(h)){r=!0;break}if(!r)return!1;const u=T9(s);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 D9=d({name:o(),accountName:o().nullable(),type:o().nullable(),role:o().nullable()});d({accounts:y(D9),total:m().int().nonnegative()});const z9=d({id:o(),projectId:o(),accountName:o(),locationName:o(),displayName:o(),primaryCategoryDisplayName:o().nullable(),storefrontAddress:o().nullable(),websiteUri:o().nullable(),placeId:o().nullable(),mapsUri:o().nullable(),additionalCategories:y(o()),description:o().nullable(),serviceArea:He(o(),Sn()).nullable(),regularHours:He(o(),Sn()).nullable(),primaryPhone:o().nullable(),openStatus:o().nullable(),openingDate:o().nullable(),selected:_(),syncedAt:o().nullable(),createdAt:o(),updatedAt:o()});d({locations:y(z9),totalDiscovered:m().int().nonnegative(),totalSelected:m().int().nonnegative()});d({selectAllNew:_().default(!0),accountName:o().optional(),switchAccount:_().default(!1)});d({selected:_()});d({locationNames:y(o()).optional(),daysOfMetrics:m().int().positive().max(540).optional(),monthsOfKeywords:m().int().positive().max(18).optional()});d({runId:o(),status:o()});const I9=d({locationName:o(),date:o(),metric:o(),value:m().int()});d({metrics:y(I9),total:m().int().nonnegative()});const O9=d({locationName:o(),periodStart:o(),periodEnd:o(),keyword:o(),valueCount:m().int().nullable(),valueThreshold:m().int().nullable()});d({keywords:y(O9),total:m().int().nonnegative(),thresholdedPct:ot(m().min(0).max(100))});const P9=d({locationName:o(),placeActionLinkName:o(),placeActionType:o(),uri:o().nullable(),isPreferred:_(),providerType:o().nullable()});d({placeActions:y(P9),total:m().int().nonnegative()});const q9=d({locationName:o(),populatedGroupCount:m().int().nonnegative(),syncedAt:o(),attributes:He(o(),Sn())});d({lodging:y(q9),total:m().int().nonnegative()});const M9=d({name:o(),valueType:o(),values:y(Xe([_(),o()])),unsetValues:y(o()),uris:y(o())}),B9=d({locationName:o(),attributeCount:m().int().nonnegative(),syncedAt:o(),attributes:y(M9)});d({attributes:y(B9),total:m().int().nonnegative()});const L9=d({locationName:o(),placeId:o(),tier:o(),amenities:y(o()),syncedAt:o(),place:He(o(),Sn())});d({places:y(L9),total:m().int().nonnegative()});const Wj=j(["gbp","places"]),g0=m().int().min(1).max(4),U9=j(["ok","unavailable","error"]),e2=j(["none","baseline","stale","pending","sent","skipped","suppressed"]);e2.enum;const V9=d({locationName:o(),origin:Wj,reviewName:o(),starRating:m().int().min(1).max(5).nullable(),negative:_(),comment:o().nullable(),reviewerName:o().nullable(),createTime:o().nullable(),updateTime:o(),replied:_().nullable(),replyComment:o().nullable(),replyUpdateTime:o().nullable(),reviewUri:o().nullable(),firstSeenAt:o(),lastSeenAt:o(),alertState:e2,alertStateAt:o().nullable()}),$9=d({locationName:o(),displayName:o(),reviewsAccess:U9.nullable(),reviewsAccessReason:o().nullable(),reviewsCheckedAt:o().nullable(),rating:m().nullable(),reviewCount:m().int().nonnegative().nullable(),ratingOrigin:Wj.nullable(),ratingObservedAt:o().nullable()});d({negativeMaxStars:m().int().min(1).max(4),locations:y($9),reviews:y(V9),total:m().int().nonnegative()});d({scope:d({locationName:o().nullable(),locationCount:m().int().nonnegative()}),performance:d({totals:He(o(),m()),recent7d:He(o(),m()),prior7d:He(o(),m()),deltaPct:He(o(),ot().nullable())}),freshness:d({dataThroughDate:o().nullable(),latestStoredDate:o().nullable(),pendingDays:m().int().nonnegative()}),timeseries:y(d({date:o(),pending:_(),metrics:He(o(),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:_(),hasBookingCta:_(),hasDirectMerchantCta:_()}),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 K9={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(r=>r.toLowerCase());if(n.length===0)return e;const s=n.join(" ");return s.charAt(0).toUpperCase()+s.slice(1)}function wne(e){return K9[e]??G9(e)}const H9=["BUSINESS_DIRECTION_REQUESTS","WEBSITE_CLICKS","CALL_CLICKS"],F9=["BUSINESS_IMPRESSIONS_DESKTOP_SEARCH","BUSINESS_IMPRESSIONS_MOBILE_SEARCH","BUSINESS_IMPRESSIONS_DESKTOP_MAPS","BUSINESS_IMPRESSIONS_MOBILE_MAPS"];function Sne(e){return H9.includes(e)?"conversion":F9.includes(e)?"reach":"other"}const pt=o().trim().min(1),gw=o().regex(/^[a-f0-9]{64}$/i);function Q9(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=o().refine(Q9,{message:"Expected a calendar date as YYYY-MM-DD."});function Z9(e,n){const s=Date.parse(`${e}T00:00:00.000Z`),r=Date.parse(`${n}T00:00:00.000Z`);return Math.floor((r-s)/864e5)+1}const Y9=j(["not-connected","selection-required","connected","stale"]),yd=Y9.enum,t2=j(["enabled","suspended","closed","canceled","unspecified","unknown"]);t2.enum;const y0=j(["enabled","paused","removed","unknown"]);y0.enum;const n2=j(["enabled","hidden","removed","unknown"]);n2.enum;const b0=j(["customer","campaign"]);b0.enum;const a2=j(["customer-goal","campaign-goal","custom-goal"]);a2.enum;const s2=d({loginCustomerId:pt.nullable(),customerId:pt.nullable(),selectedAt:o().nullable()}).strict(),Sf=d({id:pt,projectId:pt,scopes:y(o()).default([]),selection:s2,lastValidatedAt:o().nullable(),lastInventorySnapshotAt:o().nullable(),lastMetricsSnapshotAt:o().nullable(),createdAt:o(),updatedAt:o()}).strict(),pg=d({resourceName:pt,customerId:pt,parentCustomerId:pt.nullable(),descriptiveName:o().nullable(),currencyCode:o().nullable(),timeZone:o().nullable(),manager:_(),hidden:_(),testAccount:_(),level:m().int().nonnegative(),status:t2}).strict(),X9=d({customers:y(pg),totalAccessible:m().int().nonnegative(),truncated:_(),selection:s2,fetchedAt:o()}).strict();$e("status",[d({connected:R(!1),status:R(yd["not-connected"]),connection:de(),selectedCustomer:de()}).strict(),d({connected:R(!0),status:R(yd["selection-required"]),connection:Sf,selectedCustomer:de()}).strict(),d({connected:R(!0),status:R(yd.connected),connection:Sf,selectedCustomer:pg}).strict(),d({connected:R(!0),status:R(yd.stale),connection:Sf,selectedCustomer:pg}).strict()]);const J9=d({id:pt,resourceName:pt,name:o(),status:y0,advertisingChannelType:o().nullable(),biddingStrategyType:o().nullable()}).strict(),W9=d({id:pt,resourceName:pt,name:o(),status:n2,category:o(),origin:o(),primaryForGoal:_(),includeInConversionsMetric:_()}).strict(),eO=d({category:o(),origin:o(),biddable:_()}).strict(),tO=d({campaignId:pt,category:o(),origin:o(),biddable:_()}).strict(),nO=d({id:pt,name:o(),conversionActionIds:y(pt)}).strict(),aO=d({campaignId:pt,goalConfigLevel:b0,customGoalId:pt.nullable()}).strict(),sO=d({customerId:pt,fetchedAt:o(),campaigns:y(J9),conversionActions:y(W9),customerConversionGoals:y(eO),campaignConversionGoals:y(tO),campaignConversionGoalsComplete:_().optional(),customConversionGoals:y(nO),campaignGoalConfigurations:y(aO)}).strict(),iO=d({source:a2,category:o().nullable(),origin:o().nullable(),customGoalId:pt.nullable(),biddable:_().nullable(),conversionActionIds:y(pt),primaryConversionActionIds:y(pt),secondaryConversionActionIds:y(pt),missingConversionActionIds:y(pt)}).strict(),oO=d({campaignId:pt,goalConfigLevel:b0,customGoalId:pt.nullable(),missingCustomGoalId:pt.nullable(),goals:y(iO)}).strict();d({customerId:pt,derivedAt:o(),campaigns:y(oO)}).strict();const i2=50,hg=31,rO=i2*hg,lO=d({campaignIds:y(pt).min(1).max(i2),startDate:kn,endDate:kn}).strict().superRefine((e,n)=>{if(new Set(e.campaignIds).size!==e.campaignIds.length&&n.addIssue({code:fe.custom,path:["campaignIds"],message:"Campaign IDs must be unique."}),e.endDate<e.startDate){n.addIssue({code:fe.custom,path:["endDate"],message:"endDate must not precede startDate."});return}Z9(e.startDate,e.endDate)>hg&&n.addIssue({code:fe.custom,path:["endDate"],message:`Campaign metrics may cover at most ${hg} calendar days.`})}),cO=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(),uO=d({query:lO,rows:y(cO).max(rO),truncated:_(),fetchedAt:o()}).strict(),o2=j(["accessible-customers","inventory","campaign-metrics"]),kf=o2.enum,v0=d({id:pt,projectId:pt,connectionId:pt,runId:pt,kind:o2,customerId:pt.nullable(),payloadChecksum:gw,rawPayloadSha256:gw.nullable(),rawPayloadBytes:m().int().nonnegative().nullable(),redactedFieldCount:m().int().nonnegative(),capturedAt:o(),createdAt:o()}).strict(),dO=$e("kind",[d({kind:R(kf["accessible-customers"]),data:X9}).strict(),d({kind:R(kf.inventory),data:sO}).strict(),d({kind:R(kf["campaign-metrics"]),data:uO}).strict()]),mO=d({metadata:v0,payload:dO}).strict().superRefine((e,n)=>{e.metadata.kind!==e.payload.kind&&n.addIssue({code:fe.custom,path:["payload","kind"],message:"Snapshot metadata and payload kinds must match."})}),pO=j(["7d","14d","30d"]),x0=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()}),hO=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()}),fO=d({campaignId:pt,name:o().nullable(),status:y0,totals:x0}),gO=d({snapshotId:pt,capturedAt:o(),customerId:pt,currencyCode:o().nullable(),timeZone:o().nullable(),asOfDate:kn,openDate:kn.nullable(),truncated:_(),campaignsQueried:m().int().nonnegative(),campaignsInInventory:m().int().nonnegative()}),yO=d({startDate:kn,endDate:kn,days:m().int().positive(),totals:x0}),bO=d({days:m().int().positive(),prior:yO,change:d({impressions:we().nullable(),clicks:we().nullable(),costMicros:we().nullable(),conversions:we().nullable(),ctr:we().nullable(),conversionRate:we().nullable()})});d({window:pO,startDate:kn,endDate:kn,days:m().int().positive(),totals:x0,daily:y(hO),campaigns:y(fO),comparison:bO.nullable(),comparisonUnavailableReason:j(["insufficient-history","no-snapshot"]).nullable(),source:gO.nullable()});const Am=j(["complete","partial","failed","unsupported"]);Am.enum;const vO=["branded","non-brand"],Zr=j(vO),w0=j(["all","branded","non-brand"]);function xO(e){const n=e.filter(r=>Ra(r).length>0);if(n.length===0)return null;const s=E9(n);return s.keys.size===0?null:{matcher:s,classify(r){return R9(s,r)?"branded":"non-brand"}}}const wO=2,SO=o().regex(/^[a-f0-9]{64}$/),Nm=o().trim().min(1).max(256),yw=j(["sensitive","insensitive"]),ge=o().trim().min(1).max(128).regex(/^[a-z0-9][\w.~-]*$/i,"Must be a URL-safe stable key"),kO=o().trim().min(1).refine(e=>$c(e)!==null,"A competitor domain must be a valid hostname"),jO=$e("kind",[d({kind:R("exact"),url:o().min(1),pathCase:yw}).strict(),d({kind:R("prefix"),host:o().min(1),pathPrefix:o().min(1),pathCase:yw}).strict(),d({kind:R("host"),host:o().min(1)}).strict()]),AO=d({canonicalHost:o().min(1),ownedHosts:y(o().min(1)),names:y(o().min(1))}).strict(),NO=d({projectBrand:AO}).strict(),CO=d({stableKey:ge,label:o().trim().min(1),aliases:y(o().min(1)),identityAliases:y(o().trim().min(1)).optional(),urlMatchers:y(jO),mentionNotApplicable:_(),discoveryIdentity:o().min(1).nullable()}).strict(),r2=d({stableKey:ge,label:o().trim().min(1),domain:kO,aliases:y(o().min(1))}).strict(),_O=d({stableKey:ge,label:o().trim().min(1),parentGroupKey:ge.optional(),targetKeys:y(ge),competitors:y(r2)}).strict(),TO=j(["manual","query-set","template","discovery","research"]),EO=d({templateId:o().trim().min(1).max(256),templateVersion:o().trim().min(1).max(256),template:o().trim().min(1).max(4e3),bindings:He(o().trim().min(1).max(128),o().trim().min(1).max(128)),output:o().trim().min(1).max(4e3)}).strict(),l2=d({source:TO,sourceId:o().min(1).nullable(),capturedAt:o().datetime(),template:EO.optional()}).strict(),RO=d({queryId:Nm,queryText:o().min(1),provenance:l2}).strict(),Cm=d({providers:y(St).min(1),models:He(St,o().min(1)),location:mn.nullable()}).strict(),DO=d({stableKey:o().min(1),queryId:Nm,queryText:o().min(1),context:Cm,expectedSnapshots:m().int().nonnegative()}).strict(),S0=Zr,zO=d({targetKey:ge,queryId:Nm,queryClass:S0,classificationSource:j(["server","operator"]).optional(),executionNodeKey:o().min(1)}).strict(),k0=d({executionNodeKey:o().min(1),targetKey:ge,queryId:Nm}).strict(),c2=d({stableKey:ge,label:o().trim().min(1),kind:R("market"),groupKey:ge.optional(),usageEdges:y(k0)}).strict();function bw(e){return[e.executionNodeKey,e.targetKey,e.queryId].join("\0")}const _m=d({schemaVersion:R(wO),identities:NO,targets:y(CO),groups:y(_O),querySnapshots:y(RO),assignments:y(zO),executionNodes:y(DO),usageEdges:y(k0),reportingScopes:y(c2).optional(),compiledChecksum:SO}).strict().superRefine((e,n)=>{const s=new Set;for(const b of e.executionNodes)s.has(b.stableKey)&&n.addIssue({code:fe.custom,path:["executionNodes"],message:`Duplicate execution node key "${b.stableKey}"`}),s.add(b.stableKey);const r=new Set(e.targets.map(b=>b.stableKey));e.usageEdges.forEach((b,v)=>{s.has(b.executionNodeKey)||n.addIssue({code:fe.custom,path:["usageEdges",v,"executionNodeKey"],message:`Usage edge references unknown execution node "${b.executionNodeKey}"`}),r.has(b.targetKey)||n.addIssue({code:fe.custom,path:["usageEdges",v,"targetKey"],message:`Usage edge references unknown Target "${b.targetKey}"`})});const u=new Set(e.usageEdges.map(bw)),h=new Set;e.reportingScopes?.forEach((b,v)=>{if(h.has(b.stableKey)&&n.addIssue({code:fe.custom,path:["reportingScopes",v,"stableKey"],message:`Duplicate reporting scope key "${b.stableKey}"`}),h.add(b.stableKey),b.groupKey!==void 0){const S=e.groups.find(k=>k.stableKey===b.groupKey);(!S||b.usageEdges.some(k=>!S.targetKeys.includes(k.targetKey)))&&n.addIssue({code:fe.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((S,k)=>{const N=bw(S);u.has(N)||n.addIssue({code:fe.custom,path:["reportingScopes",v,"usageEdges",k],message:`Reporting scope "${b.stableKey}" references a usage edge that this revision does not contain.`}),x.has(N)&&n.addIssue({code:fe.custom,path:["reportingScopes",v,"usageEdges",k],message:`Reporting scope "${b.stableKey}" repeats a usage edge.`}),x.add(N)})}),e.assignments.forEach((b,v)=>{r.has(b.targetKey)||n.addIssue({code:fe.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:fe.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:fe.custom,path:["groups",v,"parentGroupKey"],message:"A group cannot be its own parent."});return}const S=f.get(x);if(!S){n.addIssue({code:fe.custom,path:["groups",v,"parentGroupKey"],message:"Group parent does not exist: "+x});return}const k=new Set(S.targetKeys);b.targetKeys.forEach((z,q)=>{k.has(z)||n.addIssue({code:fe.custom,path:["groups",v,"targetKeys",q],message:"Group target membership must be a subset of its parent."})});const N=new Set([b.stableKey]);let T=S;for(;T.parentGroupKey!==void 0;){if(N.has(T.stableKey)){n.addIssue({code:fe.custom,path:["groups",v,"parentGroupKey"],message:"Group parent relationships cannot contain a cycle."});break}N.add(T.stableKey);const z=f.get(T.parentGroupKey);if(!z)break;T=z}});for(const b of e.groups)for(const v of b.targetKeys)r.has(v)||n.addIssue({code:fe.custom,path:["groups"],message:`Group "${b.stableKey}" references unknown Target "${v}"`})}),j0=100;function ko(e){return d({items:y(e),nextCursor:o().min(1).nullable(),totalEstimate:m().int().nonnegative().optional()}).strict()}const Gc=j(["no_completed_run","plan_v1","no_population","evidence_incomplete","identity_ambiguous","not_applicable"]),dn=$e("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:Gc}).strict()]),Ao=$e("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:Gc}).strict()]),u2=j(["all","group","market","property"]),Wn=w0,IO="non-brand",OO=j(["label-asc","label-desc","citationCoverage-asc","citationCoverage-desc","mentionCoverage-asc","mentionCoverage-desc"]),A0=j(["not_measured","queued","running","complete","partial","failed"]),PO=j(["run_measurement","review_flags","complete_setup","republish_setup","none"]);d({scope:u2,groupKey:ge.optional(),marketKey:ge.optional(),targetKey:ge.optional(),queryClass:Wn.optional(),provider:St.optional(),location:o().trim().min(1).optional(),from:o().trim().min(1).optional(),to:o().trim().min(1).optional(),runId:o().trim().min(1).optional(),search:o().optional(),sort:OO.optional(),cursor:o().trim().min(1).optional(),limit:m().int().positive().max(j0).optional(),compact:_().optional()}).strict();const qO=d({provider:St,mentionCoverage:dn,citationCoverage:dn}).strict(),MO=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(),fg=d({groupKey:ge,label:o().trim().min(1)}).strict(),BO=d({targetKey:ge,label:o().min(1),metro:fg.nullable().optional(),otherMetros:y(fg).min(1).optional(),mentionCoverage:dn,citationCoverage:dn,providers:y(qO),flags:m().int().nonnegative()}).strict(),LO=d({kind:j(["project","competitor"]),stableKey:o().min(1),label:o().min(1),domain:o().min(1),credits:m().int().nonnegative(),share:we(m().min(0).max(1))}).strict(),UO=d({groupKey:ge,queryClass:R("non-brand"),denominator:m().int().positive(),entries:y(LO)}).strict();d({mode:j(["active-v1","active-v2"]),scope:d({kind:u2,key:o().min(1).optional(),label:o().min(1)}).strict(),queryClass:Wn,measurement:d({state:A0,currentRunId:o().min(1).optional(),displayedRunId:o().min(1).optional(),completed:m().int().nonnegative(),expected:m().int().nonnegative(),completedAt:o().datetime().optional(),includesHistoricalData:_().optional()}).strict(),nextAction:d({kind:PO,count:m().int().nonnegative().optional()}).strict(),metrics:d({propertiesMentioned:Ao,mentionCoverage:dn,citationCoverage:dn,brandPresence:dn,sov:dn.describe("Deprecated alias of brandPresence carrying the identical value. Remove once the browser migrates.")}).strict(),properties:ko(BO),outcomes:MO,flags:d({total:m().int().nonnegative()}).strict(),namedShareOfVoice:UO.optional(),detailsOmitted:y(o()).optional()}).strict();const d2=j(["sources","answers","other-queries"]),VO=d2.enum;VO.sources;d({targetKey:ge,queryClass:Wn.optional(),provider:St.optional(),location:o().trim().min(1).optional(),runId:o().trim().min(1).optional(),shape:d2.optional(),cursor:o().trim().min(1).optional(),limit:m().int().positive().max(j0).optional()}).strict();const m2=1,Hc=m().int().positive(),yn=o().trim().min(1).max(128).regex(/^[a-z0-9][\w.~-]*$/i,"Must be a URL-safe stable key"),Fc=o().trim().min(1).max(256),vw=j(["sensitive","insensitive"]);function Zd(e){const n=$c(e);if(!n)throw new Error(`Invalid measurement host: ${e}`);return n}function $O(e){const n=[];let s=!1;for(let r=0;r<e.length;r++){const u=e[r];u==="/"?(s||n.push(u),s=!0):(n.push(u),s=!1)}for(;n.length>1&&n.at(-1)==="/";)n.pop();return n.length?n.join(""):"/"}function xw(e){try{return decodeURI(e).normalize("NFC").toLowerCase()}catch{return e.normalize("NFC").toLowerCase()}}function p2(e){const n=new URL(`https://measurement.invalid${e}`).pathname;return $O(n.replace(/%[0-9a-f]{2}/gi,s=>s.toUpperCase()))}function gg(e){const n=e.trim();if(!n||n.includes("?")||n.includes("#")||n.includes("://")||n.includes("\\"))throw new Error(`Invalid measurement path prefix: ${e}`);const s=n.startsWith("/")?n:`/${n}`;for(const r of s.split("/")){let u;try{u=decodeURIComponent(r)}catch{throw new Error(`Invalid measurement path prefix: ${e}`)}if(u==="."||u==="..")throw new Error(`Invalid measurement path prefix: ${e}`)}try{return p2(s)}catch{throw new Error(`Invalid measurement path prefix: ${e}`)}}function KO(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 ww(e){const n=e.trim();if(!n||n.includes("\\"))throw new Error(`Invalid exact measurement URL: ${e}`);let s;try{s=new URL(n)}catch{throw new Error(`Invalid exact measurement URL: ${e}`)}if(s.protocol!=="http:"&&s.protocol!=="https:"||s.username||s.password||s.port||s.search||s.hash)throw new Error(`Invalid exact measurement URL: ${e}`);const r=Zd(s.hostname),u=gg(KO(n));return`https://${r}${u}`}const zc=o().trim().min(1).refine(e=>{try{return Zd(e),!0}catch{return!1}},"A target URL matcher host must be a valid hostname").overwrite(e=>Zd(e)),GO=o().trim().min(1).refine(e=>{try{return gg(e),!0}catch{return!1}},"A target URL matcher pathPrefix must be an absolute path without query or fragment").overwrite(e=>gg(e)),HO=o().trim().min(1).refine(e=>{try{return ww(e),!0}catch{return!1}},"A target exact matcher must be an HTTP(S) URL without credentials, port, query, or fragment").overwrite(e=>ww(e)),FO=$e("kind",[d({kind:R("exact"),url:HO,pathCase:vw}).strict(),d({kind:R("prefix"),host:zc,pathPrefix:GO,pathCase:vw}).strict(),d({kind:R("host"),host:zc}).strict()]),h2=o().trim().min(1).max(256).refine(e=>Ra(e).length>0,"A target alias must contain mention text"),QO=He(o().trim().min(1),o()),ZO=zc,f2=d({stableKey:yn,label:o().trim().min(1),urls:y(FO).min(1),aliases:y(h2),metadata:QO.optional()}).strict(),N0=d({stableKey:yn,label:o().trim().min(1),targetKeys:y(yn).min(1),competitors:y(ZO).optional()}).strict(),g2=d({targetKey:yn,queryIds:y(Fc).min(1),context:mn.nullable().optional()}).strict();function YO(e,n=s=>s){const s=new Set,r=new Set;for(const u of e){const h=n(u);s.has(h)&&r.add(h),s.add(h)}return r}function jf(e,n,s,r,u){for(const h of YO(n,u))e.addIssue({code:"custom",path:[...s],message:`Duplicate ${r}: ${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:Zd(n.hostname),pathname:p2(n.pathname||"/")}}function XO(e,n,s,r){return e===s||(n==="insensitive"||r==="insensitive")&&xw(e)===xw(s)}function JO(e,n){if(e.kind!==n.kind)return!1;const s=Sw(e),r=Sw(n);return s.host!==r.host?!1:e.kind==="host"||n.kind==="host"?!0:XO(s.pathname,e.pathCase,r.pathname,n.pathCase)}function WO(e){const n=new Set;return[...e].sort(Kj).filter(s=>{const r=Ra(s);return n.has(r)?!1:(n.add(r),!0)})}const y2=d({schemaVersion:R(m2),targets:y(f2).min(1),groups:y(N0).optional(),targetQuerySelections:y(g2).optional()}).strict().superRefine((e,n)=>{const s=e.groups??[],r=e.targetQuerySelections??[];jf(n,e.targets.map(v=>v.stableKey),["targets"],"target stable key"),jf(n,s.map(v=>v.stableKey),["groups"],"group stable key");const u=new Set(e.targets.map(v=>v.stableKey)),h=new Set(s.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 S of WO(v.aliases)){const k=Ra(S),N=f.get(k);N&&N!==v.stableKey&&n.addIssue({code:"custom",path:["targets",x,"aliases"],message:`Target alias is already assigned to target ${N}: ${S}`}),f.set(k,v.stableKey)}v.urls.forEach((S,k)=>{b.find(T=>T.targetKey!==v.stableKey&&JO(T.matcher,S))&&n.addIssue({code:"custom",path:["targets",x,"urls",k],message:"Target URL matcher has an equal-specificity cross-target tie"}),b.push({targetKey:v.stableKey,matcher:S})})}),s.forEach((v,x)=>{jf(n,v.targetKeys,["groups",x,"targetKeys"],"group target key");for(let S=0;S<v.targetKeys.length;S++){const k=v.targetKeys[S];u.has(k)||n.addIssue({code:"custom",path:["groups",x,"targetKeys",S],message:`Unknown target: ${k}`})}}),r.forEach((v,x)=>{u.has(v.targetKey)||n.addIssue({code:"custom",path:["targetQuerySelections",x,"targetKey"],message:`Unknown target: ${v.targetKey}`})})});y2.transform(e=>({...e,groups:e.groups??[],targetQuerySelections:e.targetQuerySelections??[]}));d({expectedActiveRevision:Hc.nullable(),plan:y2}).strict();const eP=d({queryId:Fc,queryText:o().min(1)}).strict(),C0=d({stableKey:o().min(1),queryText:o().min(1),context:mn.nullable(),expectedSnapshots:m().int().nonnegative()}).strict(),tP=d({kind:R("baseline"),executionNodeKey:o().min(1),queryId:Fc}).strict(),nP=d({kind:R("target"),executionNodeKey:o().min(1),queryId:Fc,targetKey:yn}).strict(),yg=$e("kind",[tP,nP]),b2=d({code:R("target-alias-prefix-overlap"),message:o().min(1),targetKeys:y(yn).min(1),aliases:y(o().min(1)).min(1)}).strict(),v2=f2.extend({mentionNotApplicable:_()}),x2=d({schemaVersion:R(m2),defaultContext:mn.nullable(),effectiveOwnedHosts:y(zc),projectCanonicalHost:zc,projectBrandNames:y(h2),targets:y(v2),groups:y(N0),targetQuerySelections:y(g2),querySnapshots:y(eP),executionNodes:y(C0),usageEdges:y(yg),warnings:y(b2)}).strict(),aP=x2,w2=$e("schemaVersion",[x2,_m]),_0=o().regex(/^[a-f0-9]{64}$/),T0=o().datetime(),S2=d({schemaVersion:R(1),language:o().min(1).optional(),providers:y(o().min(1)).min(1),models:He(o().min(1),o().min(1)),checksum:o().regex(/^[a-f0-9]{64}$/)}).strict(),sP=d({groups:y(yn).optional(),targets:y(yn).optional()}).strict(),iP=d({groups:y(yn),targets:y(yn),queries:y(o().min(1)),resolvedTargets:y(yn)}).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:yn,retiredAt:o().datetime()});d({active:d({revision:Hc,checksum:_0,createdAt:T0,plan:w2}).nullable()});d({versions:y(d({revision:Hc,checksum:_0,createdAt:T0,active:_()}))});d({version:d({revision:Hc,checksum:_0,createdAt:T0,active:_(),plan:w2})});const Id=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(),oP=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"]),k2=d({id:oP,severity:j(["fail","warn"]),message:o().min(1),path:y(Xe([o(),m().int()]))}).strict(),rP=d({baseline:m().int().nonnegative(),target:m().int().nonnegative()}).strict(),j2=d({ok:R(!0),checks:y(k2),executionNodes:y(C0),dedupSaved:m().int().nonnegative(),usageEdges:rP,estCostUsd:de(),plan:aP,warnings:y(b2),counts:Id}).strict(),A2=d({ok:R(!1),checks:y(k2).min(1),executionNodes:y(C0).length(0),dedupSaved:R(0),usageEdges:d({baseline:R(0),target:R(0)}).strict(),estCostUsd:de()}).strict();$e("ok",[j2,A2]);const bd=d({targetKey:yn,context:mn.nullable(),queryIds:y(Fc)}).strict();function kw(e){return d({added:y(e),removed:y(e),changed:y(d({stableKey:yn,before:e,after:e}).strict()),unchanged:y(yn)}).strict()}const lP=j2.extend({diff:d({activeRevision:Hc.nullable(),targets:kw(v2),groups:kw(N0),querySelections:d({added:y(bd),removed:y(bd),changed:y(d({targetKey:yn,before:bd,after:bd}).strict()),unchanged:y(d({targetKey:yn,context:mn.nullable()}).strict())}).strict(),execution:d({addedNodeKeys:y(o().min(1)),removedNodeKeys:y(o().min(1)),addedUsageEdges:y(yg),removedUsageEdges:y(yg),counts:d({before:Id.nullable(),after:Id,delta:Id.nullable()}).strict()}).strict()}).strict()}).strict(),cP=A2.extend({diff:de()}).strict();$e("ok",[lP,cP]);const E0=j(["PROVIDER_AUTH","PROVIDER_BILLING","RATE_LIMITED","PROVIDER_UNAVAILABLE","NETWORK","TIMEOUT","PARSE_ERROR","UNKNOWN"]),kne=E0.enum,ha=j(["queued","running","completed","partial","failed","cancelled"]),Nt=ha.enum,zr=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"]),Oe=zr.enum;d({kind:zr.optional(),excludeKind:zr.optional(),excludeKinds:rs(e=>{const n=typeof e=="string"?[e]:Array.isArray(e)?e:null;return n?[...new Set(n.flatMap(s=>typeof s=="string"?s.split(",").map(r=>r.trim()).filter(Boolean):[s]))]:e},y(zr).max(zr.options.length)).optional(),status:ha.optional()});const R0=j(["manual","scheduled","config-apply","backfill","probe"]),$a=R0.enum,Vs=j(["cited","not-cited"]),Sc=Vs.enum,Yd=j(["visible","not-visible"]);Yd.enum;const Ic=j(["mentioned","not-mentioned"]);Ic.enum;const N2=j(["new","cited","lost","emerging","not-cited"]);N2.enum;const uP=j(["new","mentioned","lost","emerging","not-mentioned"]);uP.enum;const dP=j([$a.manual,$a.probe]);d({kind:R(Oe["answer-visibility"]).optional(),trigger:dP.optional(),providers:y(St).optional(),queries:y(o().min(1)).min(1).optional(),measurementScope:sP.optional(),location:o().min(1).optional(),allLocations:_().optional(),noLocation:_().optional(),dispatchMode:Kc.optional(),force:_().optional()}).refine(e=>+!!e.location+ +!!e.allLocations+ +!!e.noLocation<=1,{message:'Only one of "location", "allLocations", or "noLocation" may be provided'});const C2=d({code:E0,consecutiveRuns:m().int().positive(),since:o(),latestRunId:o(),retryAfter:o()}),mP=d({message:o(),raw:Sn().optional(),code:E0.optional(),skipped:_().optional()}),pP=d({message:o().optional(),providers:He(o(),mP).optional()}),hP=He(o(),R(Kc.enum.batch)),fP=d({id:o(),provider:o(),model:o(),status:Zj,requestCount:m().int().nonnegative(),ingestedCount:m().int().nonnegative(),recordedCount:m().int().nonnegative(),submittedAt:o().nullable(),endedAt:o().nullable(),deadlineAt:o(),error:o().nullable()}),gP=d({provider:o(),pricingTier:f0,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()}),yP=d({id:o(),projectId:o(),kind:zr,status:ha,trigger:R0.default("manual"),measurementPlanVersionId:o().nullable().optional(),measurementManifest:He(o(),Sn()).nullable().optional(),measurementScope:iP.nullable().optional(),measurementExecutionIdentity:S2.nullable().optional(),location:o().nullable().optional(),queries:y(o()).nullable().optional(),startedAt:o().nullable().optional(),finishedAt:o().nullable().optional(),error:pP.nullable().optional(),queryBasketRevision:m().int().nullable().optional(),dispatchModes:hP.optional(),skippedProviders:He(o(),C2).optional(),createdAt:o()}),jw=d({refused:_(),retryAfter:o().nullable(),providers:He(o(),C2)});function D0(e){if(e.providers){const n=Object.entries(e.providers);if(n.length===1){const[s,r]=n[0];return`${s}: ${r.message}`}if(n.length>1)return n.map(([s,r])=>`${s}: ${r.message}`).join(" • ")}return e.message??"Run failed."}const Tm=d({uri:o(),title:o()}),bP=d({status:j(["applied","ignored","browser-implicit","unknown"]),resolved:mn.nullable().optional()}),_2=d({id:o(),runId:o(),queryId:o(),query:o().optional(),provider:St,citationState:Vs,answerMentioned:_().optional(),visibilityState:Yd.optional(),mentionState:Ic.optional(),transition:N2.optional(),answerText:o().nullable().optional(),citedDomains:y(o()).default([]),citedUrls:y(o()).nullable().default(null),captureStatus:Xe([Am,de()]).default(null),sourceCount:m().int().nonnegative().nullable().default(null),resolvedCount:m().int().nonnegative().nullable().default(null),captureVersion:m().int().positive().nullable().default(null),retrievalStatus:Xe([r0,de()]).default(null),retrievalContract:Xe([l0,de()]).default(null),competitorOverlap:y(o()).default([]),citedCompetitorDomains:y(o()).default([]),mentionedCompetitorDomains:y(o()).default([]),mentionedCompetitorTerms:y(o()).default([]),recommendedCompetitors:y(o()).default([]),matchedTerms:y(o()).default([]),groundingSources:y(Tm).default([]),searchQueries:y(o()).default([]),model:o().nullable().optional(),servedModel:o().nullable().optional(),location:o().nullable().optional(),requestedContext:mn.nullable().optional(),supportedContext:bP.nullable().optional(),dispatchMode:Xe([Kc,de()]).optional(),stopReason:o().nullable().optional(),usage:x9.nullable().optional(),createdAt:o()});d({snapshots:y(_2),total:m().int().nonnegative()});const vP=d({queryId:o().nullable(),query:o().nullable(),run1State:Vs.nullable(),run2State:Vs.nullable(),run1AnswerMentioned:_().nullable(),run2AnswerMentioned:_().nullable(),run1VisibilityState:Yd.nullable(),run2VisibilityState:Yd.nullable(),run1MentionState:Ic.nullable().optional(),run2MentionState:Ic.nullable().optional(),changed:_(),visibilityChanged:_()});d({run1:o(),run2:o(),diff:y(vP)});const xP=d({totalQueries:m().int().nonnegative(),citedQueries:m().int().nonnegative(),mentionedQueries:m().int().nonnegative()}),wP=yP.extend({snapshots:y(_2).optional(),queryCounts:xP.nullable().optional(),providerBatches:y(fP).optional(),usage:y(gP).optional()}),SP=d({totalRuns:m().int().nonnegative(),run:wP.nullable(),admission:jw.optional(),manualAdmission:jw.optional()});d({id:o(),projectId:o().nullable().optional(),actor:o(),action:o(),entityType:o(),entityId:o().nullable().optional(),diff:Sn().optional(),userAgent:o().nullable().optional(),actorSession:o().nullable().optional(),requestId:o().nullable().optional(),credentialId:o().nullable().optional(),createdAt:o()});const T2=Xe([ha,de()]),z0=j(["pass","partial","fail"]),jne=z0.enum,E2=j(["up","down","flat"]);E2.enum;const kP=d({id:o(),name:o(),weight:m(),sharePct:ot(m().min(0).max(100)).nullable().default(null),avgScore:m(),status:z0,pagesPassing:m().int().nonnegative(),pagesPartial:m().int().nonnegative(),pagesFailing:m().int().nonnegative()}),jP=d({factorId:o(),factorName:o(),avgScore:m(),affectedPages:m().int().nonnegative(),totalPages:m().int().nonnegative(),affectedPct:ot(m().nonnegative()),topRecommendations:y(o()).default([])}),Ka=d({reason:j(["explicit-run","latest-date-complete","latest-date-most-pages","latest-scored-scan","requested-date-complete","requested-date-most-pages"]),date:o(),sameDateRunCount:m().int().nonnegative(),ambiguousDate:_(),candidates:y(d({runId:o(),createdAt:o(),complete:_(),pages:m().int().nonnegative()})).max(10),candidatesTruncated:_()});d({project:o(),hasData:_(),runId:o().nullable(),runStatus:T2,sitemapUrl:o().nullable(),auditedAt:o().nullable(),aggregateScore:m(),pagesDiscovered:m().int().nonnegative(),pagesAudited:m().int().nonnegative(),pagesSkipped:m().int().nonnegative(),pagesErrored:m().int().nonnegative(),deltaScore:m().nullable(),trend:Xe([E2,de()]),previousScore:m().nullable(),previousAuditedAt:o().nullable(),runSelection:Ka.optional(),factors:y(kP).default([]),affectedPageRanking:d({basis:R("pages-below-pass"),scope:R("audited-pages"),pagesAudited:m().int().nonnegative(),items:y(d({factorId:o(),pagesBelowPass:m().int().nonnegative(),pagesFailing:m().int().nonnegative(),pagesPartial:m().int().nonnegative()})),unavailableFactorIds:y(o())}).optional(),crossCuttingIssues:y(jP).default([]),prioritizedFixes:y(o()).default([])});const R2=d({id:o(),name:o(),weight:m(),score:m(),sharePct:ot(m().min(0).max(100)).nullable().default(null)}),AP=d({url:o(),overallScore:m(),status:j(["success","error"]),error:o().nullable().optional(),factors:y(R2).default([])});d({project:o(),runId:o().nullable(),auditedAt:o().nullable(),runSelection:Ka.optional(),total:m().int().nonnegative(),pages:y(AP).default([])});const NP=d({runId:o(),auditedAt:o(),aggregateScore:m(),pagesAudited:m().int().nonnegative()});d({project:o(),points:y(NP).default([])});const CP=j(["disabled","complete","partial","unavailable"]);CP.enum;const Yr=j(["indexable","redirect-terminal","canonical-to-other","robots-disallow","noindex","non-html","fetch-error","not-fetched","unknown"]);Yr.enum;const D2=d({healthReason:Yr,pages:m().int().nonnegative(),exampleUrl:o()}),z2=d({scope:R("selected-snapshot"),total:m().int().nonnegative(),eligible:m().int().nonnegative(),excluded:m().int().nonnegative(),excludedReasons:y(D2).max(Yr.options.length)}),I2=d({recentDates:y(kn).max(10),totalDates:m().int().nonnegative(),matchingMonthDayDates:y(kn).max(10),matchingMonthDayTotal:m().int().nonnegative()}),_P=d({pagesDiscovered:m().int().nonnegative(),pagesFetched:m().int().nonnegative(),pagesEligible:m().int().nonnegative(),edges:m().int().nonnegative(),findings:m().int().nonnegative()}),TP=$e("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:o(),hasCrawlData:_(),legacyAuditAvailable:_(),runId:o().nullable(),runSelection:Ka.optional(),requestedDate:kn.optional(),availableScanDates:I2.optional(),inventorySummary:z2.nullable().optional(),runStatus:T2,requestedRootUrl:o().nullable(),rootUrl:o().nullable(),crawlSchemaVersion:o().nullable().optional(),engineVersion:o().nullable().optional(),normalizationVersion:o().nullable().optional(),indexabilityVersion:o().nullable().optional(),linkScoreVersion:o().nullable().optional(),effectiveOptions:He(o(),Sn()).default({}),complete:_(),termination:o().nullable(),detailsAvailable:_(),counts:_P,deadLinks:TP});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 Em=j(["eligible","hidden","resource","redirect","failed","unchecked"]),Ane=Em.enum,Nne=Em.options,_r={discovered:"discovered",robotsBlocked:"robots-blocked",html:"html",redirect:"redirect",nonHtml:"non-html",fetchError:"fetch-error"},vd={indexable:"indexable",noindex:"noindex",blocked:"blocked",unknown:"unknown"},EP={robotsDisallow:"robots-disallow",redirectTerminal:"redirect-terminal",metaRobotsNoindex:"meta-robots-noindex",xRobotsNoindex:"x-robots-noindex",canonicalToOther:"canonical-to-other",notHtmlOrUnavailable:"not-html-or-unavailable"};function RP(e){return e.indexabilityReasons?.some(n=>n===EP.canonicalToOther)===!0||e.nodeKey!==void 0&&e.canonicalNodeKey!==null&&e.canonicalNodeKey!==void 0&&e.canonicalNodeKey!==e.nodeKey}function Cne(e){switch(e.fetchState){case _r.fetchError:return"failed";case _r.discovered:return"unchecked";case _r.nonHtml:return"resource";case _r.redirect:return"redirect";case _r.robotsBlocked:return"hidden";case _r.html:break;default:return"unchecked"}if(RP(e))return"hidden";switch(e.indexabilityState){case vd.indexable:return"eligible";case vd.noindex:case vd.blocked:return"hidden";case vd.unknown:default:return"unchecked"}}const _ne=15,DP=j(["navigation","content","unknown"]);DP.enum;const zP=d({navigation:m().int().nonnegative(),content:m().int().nonnegative(),unknown:m().int().nonnegative()}),O2=j(["placement","ubiquity","unmeasured"]);O2.enum;const Rm=j(["applied","applied-placement","applied-placement-with-ubiquity","applied-placement-partial","unavailable-too-few-pages","unavailable-legacy-scan"]);Rm.enum;function Tne(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 Dm=j(["all","content","template"]);Dm.enum;const IP=j(["anchor","redirect","canonical","link"]);IP.enum;const Oc=d({nodeKey:o(),url:o(),finalUrl:o().nullable(),path:o(),parentPath:o(),discoverySource:o(),fetchState:o(),httpStatus:m().int().nullable(),canonicalUrl:o().nullable(),indexabilityState:o(),indexabilityReasons:y(o()).default([]),auditState:o(),auditScore:m().nullable(),inventoryEligible:_(),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:Em,healthReason:Yr.optional()}),OP=d({type:j(["found","missing","info","timeout","unreachable"]),code:o().min(1),message:o().min(1)}),Aw=R2.extend({status:z0,applicable:_().nullable(),findings:y(OP).default([]),recommendations:y(o()).default([])}),Nw=d({id:o().min(1),severity:j(["critical","warning"]),detail:o().min(1),recommendation:o().min(1)}),xd=d({project:o(),runId:o(),complete:_(),termination:o().nullable(),runSelection:Ka.optional()}),Cw=d({nodeKey:o(),url:o(),auditState:o()});$e("state",[d({state:R("no-crawl"),project:o(),runId:de()}),xd.extend({state:R("details-unavailable")}),xd.extend({state:R("not-found")}),xd.merge(Cw).extend({state:R("not-audited"),auditScore:de(),factors:y(Aw).length(0).default([]),criticalDefects:y(Nw).length(0).default([])}),xd.merge(Cw).extend({state:R("ready"),auditScore:m(),evidenceState:j(["complete","scores-only"]),factors:y(Aw).default([]),criticalDefects:y(Nw).default([])})]);const PP=j(["applied","unavailable-legacy-scan"]),Qc={complete:_(),termination:o().nullable(),runSelection:Ka.optional()};d({project:o(),hasCrawlData:_(),runId:o().nullable(),...Qc,requestedDate:kn.optional(),availableScanDates:I2.optional(),inventorySummary:z2.nullable().optional(),healthReasonCounts:y(D2).max(Yr.options.length).nullable().optional(),total:m().int().nonnegative(),nextCursor:o().nullable(),healthStateFilter:Xe([PP,de()]).default(null),pages:y(Oc).default([])});const qP=d({path:o(),url:o().nullable(),hasPage:_(),pageCount:m().int().positive(),inventoryEligibleCount:m().int().nonnegative(),fetchedCount:m().int().nonnegative()});d({project:o(),hasCrawlData:_(),runId:o().nullable(),...Qc,parentPath:o(),nextCursor:o().nullable(),children:y(qP).default([])});const No=d({edgeKey:o(),sourceNodeKey:o(),sourceUrl:o(),targetNodeKey:o().nullable(),targetUrl:o(),relation:o(),internal:_(),followable:_(),occurrences:m().int().positive(),followableOccurrences:m().int().nonnegative(),nofollowOccurrences:m().int().nonnegative(),anchors:y(o()).default([]),isTemplate:Xe([_(),de()]),templateRatio:Xe([we(),de()]),templateSource:O2,placementOccurrences:Xe([zP,de()])}),MP=d({nodeKey:o(),url:o(),path:o(),depth:m().int().nonnegative().nullable(),indexabilityState:o(),fetchState:o(),auditState:o(),auditScore:m().nullable(),inventoryEligible:_(),inboundUniqueEdges:m().int().nonnegative(),outboundUniqueEdges:m().int().nonnegative(),linkScoreNormalized:ot().nullable(),healthState:Em,healthReason:Yr.optional(),x:m(),y:m()}),BP=d({edgeKey:o(),sourceNodeKey:o(),targetNodeKey:o(),followable:_(),occurrences:m().int().positive(),isTemplate:_()}),LP=j(["no-crawl","legacy-snapshot","details-unavailable","layout-failed","empty-crawl"]),UP=$e("state",[d({state:R("ready"),version:o().min(1),computedAt:o().min(1),templateLinksExcluded:_()}),d({state:R("unavailable"),version:de(),reason:LP})]);d({project:o(),hasCrawlData:_(),runId:o().nullable(),rootNodeKey:o().nullable(),...Qc,layout:UP,templateDetection:Rm,linkKind:Dm,totalNodes:m().int().nonnegative(),totalEdges:m().int().nonnegative(),totalTemplateEdges:m().int().nonnegative(),totalContentEdges:m().int().nonnegative(),nodes:y(MP).default([]),edges:y(BP).default([]),omittedNodes:m().int().nonnegative(),omittedEdges:m().int().nonnegative(),sampled:_()});const Ene=2e4,Rne=5e4,VP=j(["focus","inbound","outbound","both","transitive"]),$P=Oc.extend({distance:m().int().nonnegative(),relationToFocus:VP});d({project:o(),hasCrawlData:_(),runId:o().nullable(),complete:_(),termination:o().nullable(),runSelection:Ka.optional(),state:j(["no-crawl","details-unavailable","ready"]),focusNodeKey:o().nullable(),focusUrl:o().nullable(),hops:m().int().min(0).max(3),totalNodes:m().int().nonnegative(),totalEdges:m().int().nonnegative(),nodes:y($P).default([]),edges:y(No).default([]),omittedNodes:m().int().nonnegative(),omittedEdges:m().int().nonnegative(),countAccuracy:j(["exact","lower-bound"]),truncated:_()});const _w=d({nodeKey:o(),url:o(),path:o()});d({project:o(),runId:o().nullable(),complete:_(),termination:o().nullable(),runSelection:Ka.optional(),state:j(["no-crawl","details-unavailable","found","unreachable","truncated"]),from:_w.nullable(),to:_w.nullable(),maxDepth:m().int().positive(),visitedNodes:m().int().nonnegative(),nodes:y(Oc).default([]),edges:y(No).default([])});const P2=j(["added","removed","changed"]),KP=d({entity:R("page"),change:P2,key:o(),changedFields:y(o()).default([]),before:Oc.nullable(),after:Oc.nullable()}),GP=d({entity:R("link"),change:P2,key:o(),changedFields:y(o()).default([]),before:No.nullable(),after:No.nullable()}),HP=$e("entity",[KP,GP]),Tw=d({added:m().int().nonnegative(),removed:m().int().nonnegative(),changed:m().int().nonnegative()}),FP=d({scope:j(["all","pages","links"]),change:j(["all","added","removed","changed"])});$e("state",[d({project:o(),state:R("unavailable"),reason:j(["no-crawl","insufficient-history","details-unavailable","partial-not-comparable"]),fromRunId:o().nullable(),toRunId:o().nullable()}),d({project:o(),state:R("incompatible"),reason:R("incompatible-versions"),fromRunId:o(),toRunId:o(),mismatchedVersions:y(o()).min(1)}),d({project:o(),state:R("ready"),fromRunId:o(),toRunId:o(),versions:d({crawlSchema:o(),normalization:o(),indexability:o(),linkScore:o()}),filters:FP,summaryState:j(["exact","omitted-on-continuation"]),summary:d({pages:Tw,links:Tw}).nullable(),total:m().int().nonnegative().nullable(),nextCursor:o().nullable(),changes:y(HP).default([])})]);d({project:o(),hasCrawlData:_(),runId:o().nullable(),...Qc,total:m().int().nonnegative(),nextCursor:o().nullable(),templateDetection:Rm,linkKind:Dm,edges:y(No).default([])});d({project:o(),hasCrawlData:_(),runId:o().nullable(),...Qc,nodeKey:o().nullable(),url:o().nullable(),templateDetection:Rm,linkKind:Dm,inbound:y(No).default([]),outbound:y(No).default([]),inboundTruncated:_(),outboundTruncated:_()});const Ew=d({findingKey:o(),severity:o(),sourceNodeKey:o().nullable(),sourceUrl:o().nullable(),targetNodeKey:o().nullable(),targetUrl:o().nullable(),evidence:He(o(),Sn()).default({})});$e("state",[d({project:o(),runId:o().nullable(),state:R("unavailable"),legacyAuditAvailable:_(),runSelection:Ka.optional()}),d({project:o(),runId:o(),state:R("disabled"),checkDeadLinks:R(!1),runSelection:Ka.optional()}),d({project:o(),runId:o(),state:R("complete"),checkDeadLinks:R(!0),runSelection:Ka.optional(),checked:m().int().nonnegative(),found:m().int().nonnegative(),unverified:m().int().nonnegative(),total:m().int().nonnegative(),nextCursor:o().nullable(),deadLinks:y(Ew).default([])}),d({project:o(),runId:o(),state:R("partial"),checkDeadLinks:R(!0),runSelection:Ka.optional(),checked:m().int().nonnegative(),found:m().int().nonnegative(),unverified:m().int().nonnegative(),total:m().int().nonnegative(),nextCursor:o().nullable(),deadLinks:y(Ew).default([])})]);const q2=5e4,zm=m().int().min(1).max(q2);function Rw(e){return`${e.toLocaleString("en-US")} ${e===1?"page":"pages"}`}function Dne(e){return e===null?`full site (up to ${Rw(q2)})`:Rw(e)}const zne=10,M2=100;d({sitemapUrl:o().url().optional(),limit:m().int().positive().max(2e3).optional(),maxPages:zm.optional(),maxEdges:m().int().positive().max(1e6).optional(),maxDepth:m().int().min(0).max(100).optional(),checkDeadLinks:_().default(!1)});d({runId:o(),status:ha});const QP=d({runId:o(),status:ha,createdAt:o(),startedAt:o().nullable(),finishedAt:o().nullable(),hasCrawlData:_()});d({project:o(),preferredRunId:o().nullable().optional(),scans:y(QP).default([])});const ZP=j(["queued","discovering","checking","arranging-map","completed","partial","failed","cancelled"]),YP=d({state:j(["pending","ready","unavailable"]),layoutVersion:o().nullable(),failureCode:o().nullable(),updatedAt:o().nullable()}),XP=d({id:o(),state:o(),pagesDiscovered:m().int().nonnegative(),pagesFetched:m().int().nonnegative(),pagesEligible:m().int().nonnegative(),pagesErrored:m().int().nonnegative(),edgesDiscovered:m().int().nonnegative(),lastUpdatedAt:o(),startedAt:o().nullable(),finishedAt:o().nullable(),error:o().nullable()});d({project:o(),runId:o(),status:ha,phase:ZP,attempt:XP.nullable(),layout:YP,error:o().nullable()});const JP=j(["waiting","collecting","terminal"]),WP=d({nodeKey:o(),url:o(),auditScore:m(),checksNeedingAttention:m().int().nonnegative()});d({project:o(),runId:o(),status:ha,state:JP,attemptId:o().nullable(),pagesAudited:m().int().nonnegative(),updatedAt:o().nullable(),examples:y(WP).max(12).default([])});new Set(Pj.map(e=>e.toLowerCase()));const eq=4,B2=3;function Ine(e){return e.filter(n=>Ra(n).length>=B2)}const tq=10,nq=80,L2=y(o()).describe(`Operator-curated names this competitor goes by in answer text (at most ${tq}, each ${nq} characters or fewer, at least ${B2} letters or digits).`);d({aliases:L2});const aq=d({domain:o().trim().min(1),aliases:L2.optional()}),U2=Xe([o().trim().min(1),aq]),V2=j(["openai-annotation","claude-citation","gemini-support","perplexity-marker","answer-link","answer-host"]);V2.enum;const $2=d({name:o(),directPairs:m().int().nonnegative(),cooccurrences:m().int().nonnegative(),namingAnswers:m().int().nonnegative(),precision:we(m().min(0).max(1)),lift:m().nonnegative().nullable().optional(),nameCasedAnswers:m().int().nonnegative().optional(),runs:m().int().nonnegative(),firstSeen:o(),lastSeen:o(),addedAt:o()}),sq=j(["added","kept","removed","review","rejected"]),K2=j(["name-shape","too-few-pairs","too-few-runs","too-few-naming-answers","low-precision","low-lift","lowercase-usage","other-competitor-dominates","no-label-affinity","needs-approval","subsumed","too-long","too-short","blocked","already-matched","project-brand","other-competitor","over-limit"]),iq=d({name:o(),status:sq,reason:K2.optional(),conflictsWith:o().optional(),directPairs:m().int().nonnegative(),runs:m().int().nonnegative(),cooccurrences:m().int().nonnegative(),namingAnswers:m().int().nonnegative(),citingAnswers:m().int().nonnegative(),nameCasedAnswers:m().int().nonnegative(),precision:we(m().min(0).max(1)).nullable(),lift:m().nonnegative().nullable(),otherCompetitorPairs:m().int().nonnegative(),labelAffinity:_(),via:y(V2),firstSeen:o(),lastSeen:o()}),oq=d({domain:o(),marketKeys:y(o()).optional(),aliases:y(o()),autoAliases:y($2),blockedAliases:y(o()),added:y(o()),removed:y(d({name:o(),reason:K2,conflictsWith:o().optional()})),candidates:y(iq)});d({project:o(),applied:_(),changed:_(),scan:d({runs:m().int().nonnegative(),snapshots:m().int().nonnegative(),answers:m().int().nonnegative(),maxRuns:m().int().positive(),maxSnapshots:m().int().positive(),providerCitations:_()}),thresholds:d({minDirectPairs:m().int().positive(),minRuns:m().int().positive(),minNamingAnswers:m().int().positive(),minPrecision:we(m().min(0).max(1)),minLift:m().positive(),minNameCasedShare:we(m().min(0).max(1)),minKeyLength:m().int().positive(),dominanceMultiple:m().positive(),removeBelowPrecision:we(m().min(0).max(1)),removeBelowLift:m().nonnegative(),removeBelowNameCasedShare:we(m().min(0).max(1))}),competitors:y(oq)});d({aliases:y(o().trim().min(1)).min(1).describe("Names to block from (or release back to) answer-derived auto-detection for this competitor. Compared by brand key, so case, spacing and punctuation variants are one name.")});const G2=j(["cli","api","config-file"]);function rq(e){const n=new Set,s=new Set;for(const r of e){if(n.has(r.label)){s.add(r.label);continue}n.add(r.label)}return[...s]}function lq(e,n){return n?e.some(s=>s.label===n):!0}const I0=j(["off","preview","apply"]);I0.options;const H2=I0.optional().describe("Answer-derived competitor alias detection mode for the unattended passes queued after a completed or partial sweep, a competitor add, an unblock or a market pin write that changes pins: `off` (no pass), `preview` (the pass logs what it would add or remove and stores nothing; a new project starts here) or `apply` (the pass stores detected names and removes stored ones it no longer keeps, which restates every period's competitor counts). Omit to keep the stored mode. An explicit apply (POST /projects/{name}/competitor-auto-aliases) stores in every mode."),F2=20,Q2=200,cq=d({displayName:o().min(1),canonicalDomain:o().min(1),ownedDomains:y(o().min(1)).optional(),aliases:y(o()).optional(),country:o().length(2),language:o().min(2),tags:y(o()).optional(),labels:He(o(),o()).optional(),providers:y(St).optional(),providerModels:km.optional(),providerDispatchModes:h0.optional(),locations:y(mn).optional(),defaultLocation:o().nullable().optional(),measurement:p0.optional(),autoExtractBacklinks:_().optional(),qualifiedAliases:y(o().trim().min(1).max(Q2)).max(F2).optional(),negativeReviewMaxStars:g0.nullable().optional(),siteAuditMaxPages:zm.nullable().optional(),competitorAutoAliases:H2,configSource:G2.optional()});cq.extend({name:o().trim().min(1).max(120)});const uq=d({id:o(),name:o(),displayName:o().optional(),canonicalDomain:o(),ownedDomains:y(o()).default([]),aliases:y(o()).default([]),qualifiedAliases:y(o()).default([]),country:o().length(2),language:o().min(2),tags:y(o()).default([]),labels:He(o(),o()).default({}),providers:y(o()).default([]),providerModels:km.default({}),providerDispatchModes:h0.default({}),locations:y(mn).default([]),defaultLocation:o().nullable().optional(),measurement:p0.default(Fj),autoExtractBacklinks:_().default(!1),negativeReviewMaxStars:g0.nullable().optional(),siteAuditMaxPages:zm.nullable().optional(),competitorAutoAliases:I0.optional().describe("Answer-derived competitor alias detection mode for the unattended passes queued after a completed or partial sweep, a competitor add, an unblock or a market pin write that changes pins. `preview` (every project's default): the pass scores the stored answers and logs what it would add or remove, storing nothing. `apply`: the pass stores the detected names and removes stored ones it no longer keeps; the read-time competitor matchers then use them, restating every period's competitor counts (see competitorIdentityChangedAt). `off`: no pass runs. An explicit apply (POST /projects/{name}/competitor-auto-aliases) stores in every mode; switching to preview or off keeps names already stored. Absent only from a server that predates the setting."),configSource:G2.default("cli"),configRevision:m().int().positive().default(1),createdAt:o().optional(),updatedAt:o().optional()});d({defaultLocation:o()});d({id:o(),query:o(),createdAt:o()});d({id:o(),keyword:o(),createdAt:o()});d({queries:y(o().trim().min(1)).min(1)});d({keywords:y(o().trim().min(1)).min(1)});d({provider:St,count:m().int().min(1).max(20).optional()});d({queries:y(o()),provider:o()});d({keywords:y(o()),provider:o()});d({id:o(),domain:o(),aliases:y(o()),autoAliases:y($2).optional(),blockedAliases:y(o()).optional(),marketKeys:y(o()).optional(),createdAt:o()});d({competitors:y(o().trim().min(1)).min(1)});d({competitors:y(U2).min(1)});function Z2(e){const n=[e.canonicalDomain,...e.ownedDomains??[]],s=new Set,r=[];for(const u of n){const h=u.trim();if(!h)continue;const f=Dc(h);s.has(f)||(s.add(f),r.push(h))}return r}function dq(e,n){if(!n||n.length===0)return[];const s=e?.trim().toLowerCase()??"",r=new Set,u=[];for(const h of n){const f=h.trim();if(!f)continue;const b=f.toLowerCase();b!==s&&(r.has(b)||(r.add(b),u.push(f)))}return u}function mq(e){const n=[],s=new Set,r=h=>{const f=Ra(h);!f||s.has(f)||(s.add(f),n.push(h))},u=e.displayName?.trim()??"";u&&r(u);for(const h of dq(e.displayName,e.aliases))r(h);for(const h of Z2({canonicalDomain:e.canonicalDomain??"",ownedDomains:e.ownedDomains??[]})){const f=d0(h);if(Ra(f).length>=eq)r(f);else{const b=Dc(h);b.includes(".")&&r(b)}}return n}const pq=d({name:o().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(o(),o()).optional().default({})}),Y2=d({preset:o().min(1).optional(),cron:o().min(1).optional(),recurrence:u0.optional(),timezone:o().optional().default("UTC"),providers:y(St).optional().default([]),enabled:_().optional()});function X2(e){return[e.preset,e.cron,e.recurrence].filter(n=>n!==void 0).length===1}const J2={message:'Exactly one of "preset", "cron", or "recurrence" must be provided'},hq=Y2.refine(X2,J2).optional(),fq=d({channel:R("webhook"),url:o().url(),events:y(jm).min(1)}),gq=d({gsc:d({propertyUrl:o()}).optional(),syncSchedule:d({preset:o().optional(),cron:o().optional()}).optional()}).optional(),bg=y(o().min(1)),W2={displayName:o().min(1),canonicalDomain:o().min(1),ownedDomains:y(o().min(1)).optional().default([]),aliases:y(o().min(1)).optional().default([]),qualifiedAliases:y(o().min(1).max(Q2)).max(F2).optional(),country:o().length(2),language:o().min(2),queries:bg.optional(),keywords:bg.optional(),competitors:y(U2).optional().default([]),providers:y(St).optional().default([]),providerModels:km.optional().default({}),providerDispatchModes:h0.optional(),locations:y(mn).optional().default([]),defaultLocation:o().optional(),measurement:p0.optional().default(Fj),schedule:hq,notifications:y(fq).optional().default([]),google:gq,autoExtractBacklinks:_().optional().default(!1),negativeReviewMaxStars:g0.optional(),siteAuditMaxPages:zm.nullable().optional(),competitorAutoAliases:H2};function e3(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 s=rq(e.locations);s.length>0&&n.addIssue({code:"custom",message:`Duplicate location labels are not allowed: ${s.join(", ")}`,path:["locations"]}),lq(e.locations,e.defaultLocation)||n.addIssue({code:"custom",message:`defaultLocation "${e.defaultLocation}" must match a configured location label`,path:["defaultLocation"]})}const yq=d(W2).superRefine(e3),bq=d({apiVersion:R("canonry/v1"),kind:R("Project"),metadata:pq,spec:yq});bq.extend({spec:d({...W2,queries:bg,providerModels:km.optional(),schedule:Y2.extend({enabled:_()}).refine(X2,J2).optional(),autoExtractBacklinks:_().optional()}).superRefine(e3)});const vq=1,xq=o().refine(e=>e.trim().length>0,{message:"Must not be blank"}),t3=d({displayName:o(),aliases:y(o()),canonicalDomain:o(),ownedDomains:y(o()),qualifiedAliases:y(o()).optional()}).strict(),n3=d({provider:St.refine(e=>e.trim().length>0,{message:"Provider must not be blank"}),requestedModel:o().nullable()}).strict(),a3=d({domain:o(),label:o(),aliases:y(o())}).strict(),s3=d({queryId:xq,queryText:o(),provenance:o().nullable()}).strict(),wq=s3.extend({queryClass:Zr.nullable()}).strict();function i3(e,n){const s=new Set;e.engines.forEach((h,f)=>{const b=h.provider.trim().toLocaleLowerCase("en");s.has(b)&&n.addIssue({code:fe.custom,path:["engines",f,"provider"],message:`Duplicate engine provider "${h.provider}"`}),s.add(b)});const r=new Set;e.queries.forEach((h,f)=>{r.has(h.queryId)&&n.addIssue({code:fe.custom,path:["queries",f,"queryId"],message:`Duplicate query id "${h.queryId}"`}),r.add(h.queryId)});const u=new Set;e.competitors?.forEach((h,f)=>{const b=h.domain;u.has(b)&&n.addIssue({code:fe.custom,path:["competitors",f,"domain"],message:`Duplicate competitor domain "${h.domain}"`}),u.add(b)})}d({capturedAt:o().datetime(),identity:t3,country:o(),language:o(),location:mn.nullable(),engines:y(n3).min(1),competitors:y(a3).optional(),queries:y(s3)}).strict().superRefine(i3);d({schemaVersion:R(vq),capturedAt:o().datetime(),identity:t3,country:o(),language:o(),location:mn.nullable(),engines:y(n3).min(1),competitors:y(a3).optional(),queries:y(wq)}).strict().superRefine(i3);const Sq=j(["auto","simple","advanced"]),kq=j(["simple","advanced"]),o3=j(["branded","non-brand","unknown","all"]),jq=j(["branded","non-brand","unknown"]),O0=j(["project","group","market","property"]),r3=$e("kind",[d({kind:R("all")}).strict(),d({kind:R("none")}).strict(),d({kind:R("exact"),value:o().trim().min(1)}).strict()]);function Aq(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 wt=o().trim().min(1),$s=o().datetime(),Nq={mode:Sq.default("auto"),queryClass:o3.default("non-brand"),scope:O0.default("project"),scopeKey:wt.optional(),marketKey:wt.optional(),provider:wt.optional(),model:wt.optional(),location:o().trim().min(1).optional(),from:$s.optional(),to:$s.optional(),revision:m().int().positive().optional(),runId:wt.optional(),queryKey:wt.optional(),queryId:wt.optional(),search:o().trim().min(1).optional(),cursor:wt.optional(),limit:m().int().min(1).max(100).default(50)},Xd=d(Nq).strict().superRefine((e,n)=>{e.scope!=="project"&&e.scopeKey===void 0&&n.addIssue({code:fe.custom,path:["scopeKey"],message:`scopeKey is required for ${e.scope} scope`}),e.scope==="project"&&e.scopeKey!==void 0&&n.addIssue({code:fe.custom,path:["scopeKey"],message:"scopeKey is not valid for project scope"}),e.scope==="market"&&e.marketKey!==void 0&&n.addIssue({code:fe.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:fe.custom,path:["to"],message:"to must be on or after from"}),e.queryKey!==void 0&&e.queryId!==void 0&&n.addIssue({code:fe.custom,path:["queryId"],message:"queryKey and queryId cannot both be supplied"})});Xd.transform(e=>({...e,location:Aq(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:fe.custom,message:"Unavailable rates require null values and a reason"}),e.unattributed!==void 0&&n.addIssue({code:fe.custom,path:["unattributed"],message:"Only an available rate can leave answers out"}),e.unchecked!==void 0&&n.addIssue({code:fe.custom,path:["unchecked"],message:"Only an available rate can leave answers out"});return}e.reason!==void 0&&n.addIssue({code:fe.custom,message:"Available rates cannot carry a reason"}),e.unattributed!==void 0&&e.unchecked!==void 0&&n.addIssue({code:fe.custom,path:["unchecked"],message:"A rate reads one signal: unattributed (mention) and unchecked (citation) cannot share it"});const{numerator:r,denominator:u}=e;u===null||r===null||(u===0&&n.addIssue({code:fe.custom,path:["denominator"],message:"Available rates require a positive denominator"}),r>u&&n.addIssue({code:fe.custom,path:["numerator"],message:"Numerator cannot exceed denominator"}))}),l3=$e("kind",[d({kind:R("frozen-simple"),definitionRevision:de()}).strict(),d({kind:R("legacy-simple"),definitionRevision:de()}).strict(),d({kind:R("frozen-advanced"),definitionRevision:m().int().positive()}).strict(),d({kind:R("unsupported-advanced-v1"),definitionRevision:m().int().positive()}).strict()]),Jd=d({id:wt,label:o().trim().min(1),kind:O0,targetCount:m().int().nonnegative(),parentGroupIds:y(wt).optional(),marketKeys:y(wt).optional()}).strict(),Cq=d({provider:wt,model:wt}).strict(),_q=d({providers:y(wt),models:y(Cq),locations:y(r3)}).strict(),Tq=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:fe.custom,message:"Outcome partition must sum to total"})}),notMeasuredUnchecked:m().int().positive().optional()}).strict().superRefine((e,n)=>{e.notMeasuredUnchecked!==void 0&&e.notMeasuredUnchecked>e.outcomes.notMeasured&&n.addIssue({code:fe.custom,path:["notMeasuredUnchecked"],message:"notMeasuredUnchecked is a subset of outcomes.notMeasured"})}),Eq=d({runId:wt,createdAt:$s,revision:m().int().positive().nullable(),provenance:l3,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:o().nullable()}).strict()}).strict(),Rq=d({sourceSnapshotIds:y(wt).default([]),queryKey:wt,queryId:o().nullable(),query:o(),provider:wt,model:o().nullable(),location:o().nullable(),targetKeys:y(wt),marketKeys:y(wt).optional(),answerCount:m().int().nonnegative(),mentionCoverage:Ea,citationCoverage:Ea,uncheckedSources:d({answers:m().int().positive(),citedAnswers:m().int().nonnegative(),citedTargetKeys:y(wt)}).strict().superRefine((e,n)=>{e.citedAnswers>e.answers&&n.addIssue({code:fe.custom,path:["citedAnswers"],message:"citedAnswers cannot exceed answers"}),e.citedAnswers===0!=(e.citedTargetKeys.length===0)&&n.addIssue({code:fe.custom,path:["citedTargetKeys"],message:"citedTargetKeys is empty exactly when no saved link cites a Property"})}).optional()}).strict(),Dq=d({answerId:wt,runId:wt,queryKey:wt,query:o(),provider:wt,model:o().nullable(),location:o().nullable(),targetKeys:y(wt),mentioned:_().nullable(),mentionUnavailableReason:R("identity-ambiguous").optional(),cited:_().nullable(),answerText:o().nullable(),createdAt:$s,sources:y(o()),observedCompetitors:y(wt)}).strict(),zq=d({domain:wt,answerCount:m().int().nonnegative(),mentionCoverage:Ea,citationCoverage:Ea}).strict(),Iq=d({name:wt,answerCount:m().int().nonnegative()}).strict(),Oq=$e("state",[d({state:R("available")}).strict(),d({state:R("unavailable"),reason:R("frozen-competitor-identity-missing")}).strict()]),Dw=d({id:wt,label:o().trim().min(1),queryCount:m().int().nonnegative(),mentionCoverage:Ea,citationCoverage:Ea}).strict();function zw(e){return d({items:y(e),nextCursor:o().nullable(),total:m().int().nonnegative()}).strict()}const c3=j(["current-unavailable","previous-unavailable","not-applicable"]),One=c3.enum,Af=$e("state",[d({state:R("available"),previous:Ea,delta:we(m().min(-1).max(1))}).strict(),d({state:R("unavailable"),reason:c3}).strict()]),Iw=d({id:wt,createdAt:$s,completedAt:$s.nullable()}).strict(),u3=j(["no-selected-run","no-previous-run","scoped-run","partial-run","definition-changed","model-changed","legacy-unknown"]),Pne=u3.enum,Pq=$e("state",[d({state:R("available"),previousRun:Iw,mentionCoverage:Af,citationCoverage:Af,propertyReach:Af}).strict(),d({state:R("unavailable"),reason:u3,previousRun:Iw.nullable()}).strict()]),qq=d({queryClass:jq,summary:Tq,trend:y(Eq),comparison:Pq.optional(),queries:zw(Rq),evidence:zw(Dq),competitorAvailability:Oq,competitors:y(zq),observedCompetitors:y(Iq),breakdown:d({properties:y(Dw),groups:y(Dw)}).strict()}).strict(),Mq=j(["measured","not-measured","partial"]),Bq=d({state:Mq,activeRevision:m().int().positive().nullable(),measuredRevision:m().int().positive().nullable(),awaitingSweep:_(),pendingAssignmentCount:m().int().nonnegative(),completedAt:$s.nullable()}).strict(),Lq=d({mode:kq,queryClass:o3,scope:Jd,market:Jd.optional(),provider:o().nullable(),model:o().nullable(),location:r3,time:d({from:$s.nullable(),to:$s.nullable()}).strict(),revision:m().int().positive().nullable(),run:d({id:o().nullable(),explicit:_()}).strict(),provenance:l3,measurement:Bq,availability:$e("state",[d({state:R("available")}).strict(),d({state:R("unsupported"),reason:R("advanced-v1")}).strict()])}).strict();d({selection:Lq,scopeOptions:y(Jd),filterOptions:_q,populations:y(qq).min(1)}).strict().superRefine((e,n)=>{const s=e.selection.queryClass==="all"?["branded","non-brand","unknown"]:[e.selection.queryClass],r=e.populations.map(u=>u.queryClass);(r.length!==s.length||r.some((u,h)=>u!==s[h]))&&n.addIssue({code:fe.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],S=h.summary[b].rate,k=v.previous.rate;S===null&&n.addIssue({code:fe.custom,path:x,message:"Available changes require a current rate"}),k===null&&n.addIssue({code:fe.custom,path:[...x,"previous","rate"],message:"Available changes require a previous rate"}),S!==null&&k!==null&&Math.abs(v.delta-(S-k))>Number.EPSILON&&n.addIssue({code:fe.custom,path:[...x,"delta"],message:"Delta must equal current minus previous"}),e.selection.run.id===null&&n.addIssue({code:fe.custom,path:x,message:"Available changes require a selected run"})}}});const d3=j(["retired-scope","retired-market"]),Uq=d3.enum,Vq=d({reason:d3,kind:O0.exclude(["project"]),key:wt}).strict().superRefine((e,n)=>{e.reason===Uq["retired-market"]&&e.kind!=="market"&&n.addIssue({code:fe.custom,path:["kind"],message:"retired-market details must name a market"})});function qne(e){const n=Vq.safeParse(e);return n.success?n.data:void 0}function $q(e,n){let s=e;for(const[r,u]of Object.entries(n))s=s.split(`{${r}}`).join(u);return s.trim()}const P0=o().regex(/^[a-f0-9]{64}$/),da=o().trim().min(1).max(256),Ha=o().trim().min(1).max(4e3),q0=o().datetime(),Im=o().regex(/^qtw_[a-f0-9]{64}$/),m3=o().regex(/^qtp_[a-f0-9]{64}$/),M0=j(["simple","advanced"]),p3=d({templateId:da,templateVersion:o().trim().min(1).max(256),template:Ha,bindings:He(o().trim().min(1).max(128),o().trim().min(1).max(128)),output:Ha}).strict(),Kq=d({source:j(["manual","query-set","template","research","discovery"]),sourceId:da.nullable(),capturedAt:o().datetime(),template:p3.optional()}).strict().superRefine((e,n)=>{e.source==="template"&&e.template===void 0&&n.addIssue({code:fe.custom,path:["template"],message:"Template provenance is required for a template query."}),e.source!=="template"&&e.template!==void 0&&n.addIssue({code:fe.custom,path:["template"],message:"Only a template query may carry template provenance."})}),Gq=$e("source",[d({source:R("manual"),text:Ha}).strict(),d({source:R("template"),templateId:da,templateVersion:o().trim().min(1).max(256),template:Ha}).strict(),d({source:R("research"),researchRunQueryId:da}).strict(),d({source:R("discovery"),discoveryProbeId:da}).strict()]),B0=d({targetKeys:y(ge).optional(),groupKeys:y(ge).optional(),marketKeys:y(ge).optional()}).strict(),Hq=d({providers:y(St).min(1),models:He(St,o().trim().min(1)),location:o().trim().min(1).nullable()}).strict(),Fq=d({input:Gq,audience:B0.optional(),contexts:y(Hq).min(1).optional(),queryClass:Zr.optional()}).strict(),Qq=d({queryId:da.optional(),queryText:Ha.optional(),audience:B0.optional()}).strict().superRefine((e,n)=>{e.queryId===void 0==(e.queryText===void 0)&&n.addIssue({code:fe.custom,message:"Provide exactly one of queryId or queryText."})}),Zq=d({queryId:da,audience:B0.optional(),text:Ha.optional(),queryClass:Xe([Zr,de()]).optional()}).strict().superRefine((e,n)=>{e.text===void 0&&e.queryClass===void 0&&n.addIssue({code:fe.custom,message:"Provide query text or a classification change."})}),Yq=d({additions:y(Fq),removals:y(Qq),edits:y(Zq).optional()}).strict(),Xq=Yq.extend({expectedWorkspaceVersion:Im}).strict();Xq.extend({previewToken:m3,reviewedAt:q0}).strict();const Jq=d({stableKey:ge,label:o().trim().min(1)}).strict(),Wq=d({stableKey:ge,parentGroupKey:ge.optional(),label:o().trim().min(1),targetKeys:y(ge)}).strict(),eM=d({stableKey:ge,groupKey:ge.optional(),label:o().trim().min(1),usageEdges:y(k0)}).strict(),tM=d({targetKey:ge,groupKeys:y(ge),marketKeys:y(ge),queryClass:Zr.nullable(),classificationSource:j(["frozen","server","operator"]),contexts:y(Cm).min(1)}).strict(),h3=d({queryId:da,queryText:Ha,normalizedText:Ha,provenance:Kq.nullable(),state:j(["tracked","awaiting-sweep"]),lastMeasuredAt:o().datetime().nullable(),assignments:y(tM)}).strict(),nM=d({researchRunId:da,researchRunQueryId:da,queryText:Ha,createdAt:o().datetime()}).strict(),aM=d({discoverySessionId:da,discoveryProbeId:da,queryText:Ha,createdAt:o().datetime()}).strict();d({mode:M0,workspaceVersion:Im,active:d({revision:m().int().positive(),compiledChecksum:P0}).strict().nullable(),defaultContexts:y(Cm),targets:y(Jq),groups:y(Wq),markets:y(eM),scopeOptions:y(Jd).optional(),tracked:y(h3),savedSources:d({research:y(nM),discovery:y(aM)}).strict()}).strict();const wd=d({queryId:da,queryText:Ha,assignmentCount:m().int().nonnegative()}).strict(),f3=d({added:y(wd),removed:y(wd),reused:y(wd),unchanged:y(wd),noOp:_()}).strict(),g3=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:M0,workspaceVersion:Im,previewToken:m3,reviewedAt:q0,active:d({revision:m().int().positive(),compiledChecksum:P0}).strict().nullable(),tracked:y(h3),diff:f3,workload:g3}).strict();d({committed:_(),mode:M0,workspaceVersion:Im,reviewedAt:q0,active:d({revision:m().int().positive(),compiledChecksum:P0}).strict().nullable(),diff:f3,workload:g3}).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 sM=j(["invalid-url","unowned-host","duplicate-url","url-cap-reached"]),iM=d({kind:j(["exact","prefix","suffix","contains"]),value:o().trim().min(1)}).strict(),Ow=d({host:o().trim().min(1),pathTemplate:o().trim().min(1)}).strict(),L0=d({primary:Ow,aliases:y(Ow).optional(),excludedSlugSuffixes:y(o().trim().min(1)).optional(),excludedSlugPatterns:y(iM).optional()}).strict();d({sitemapUrl:o().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:L0,maxUrls:m().int().positive().max(1e4).optional()}).strict();const Nf=d({url:o(),canonicalUrl:o().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"})}),oM=d({classification:R("proposed"),reason:R("primary-match"),stableKey:yn,slug:o().trim().min(1),label:o().trim().min(1),primaryUrl:o().url(),aliasCoverageUrls:y(o().url())}).strict(),rM=d({classification:R("alias"),reason:R("exact-slug-match"),slug:o().trim().min(1),url:o().url(),targetStableKey:yn}).strict(),lM=d({kind:sM,url:o(),canonicalUrl:o().nullable(),duplicateOf:o().optional()}).strict();d({proposed:y(oM),aliases:y(rM),shared:y(Nf),unmatched:y(Nf),excluded:y(Nf),diagnostics:y(lM)}).strict().superRefine((e,n)=>{const s=[["shared",["shared"]],["unmatched",["unmatched"]],["excluded",["excluded"]]];for(const[r,u]of s)for(const h of e[r])u.includes(h.classification)||n.addIssue({code:"custom",path:[r],message:"Discovery item is in the wrong result bucket"})});const U0=j(["assigned","sibling","ownedUnmapped","external","ambiguous","invalid"]),y3=j(["baseline","target"]),b3=j(["incomplete","evidence-incomplete","identity-ambiguous","no-population","aliasless","no-competitors","no-project-aliases"]),Co=Xe([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:de(),denominator:de(),rate:de(),reason:b3}).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"})}),cM=o().trim().min(1).overwrite(e=>e.toLocaleLowerCase("en")),uM=d({executionId:o().trim().min(1),queryText:o().trim().min(1),provider:cM,context:mn.nullable(),requestedModel:o().trim().min(1).optional()}).strict();d({schemaVersion:R(1),expectedSlots:y(uM)}).strict().superRefine((e,n)=>{const s=new Set;for(const[r,u]of e.expectedSlots.entries()){const h=[u.executionId,u.provider].join("\0");s.has(h)&&n.addIssue({code:"custom",path:["expectedSlots",r],message:"Duplicate expected provider slot"}),s.add(h)}});const Om=d({executed:m().int().nonnegative(),expected:m().int().nonnegative(),complete:_(),sourceComplete:_(),sourceCompleteObservations:m().int().nonnegative(),answerComplete:_()}).strict(),Pw=Xe([d({domain:o().trim().min(1),own:_(),presentIn:m().int().nonnegative(),of:m().int().positive()}).strict(),d({domain:o().trim().min(1),own:_(),presentIn:de(),of:de(),reason:b3}).strict()]),dM=d({domains:y(Pw),providers:y(d({provider:St,domains:y(Pw)}).strict())}).strict(),mM=d({provider:St,completeness:Om,answerCoverage:Co}).strict(),pM=d({id:o().trim().min(1),label:o().trim().min(1),targetIds:y(o().trim().min(1)),completeness:Om,answerCoverage:Co,targetCoverage:Co,sov:dM,providers:y(mM)}).strict(),hM=d({provider:St,completeness:Om,citationCoverage:Co,mentionCoverage:Co}).strict(),fM=d({id:o().trim().min(1),label:o().trim().min(1),completeness:Om,citationCoverage:Co,mentionCoverage:Co,providers:y(hM)}).strict(),v3=d({observationId:o().trim().min(1),expectedSlotId:o().trim().min(1),executionId:o().trim().min(1),usageEdgeId:o().trim().min(1),usageEdgeType:y3,provider:St,queryText:o().trim().min(1),location:o().nullable(),sourceUrl:o(),bridged:_(),historical:_(),evidenceComplete:_(),classification:U0,normalizedUrl:o().nullable(),matchedTargetIds:y(o().trim().min(1)),matchedUrlIds:y(o().trim().min(1))}).strict(),gM=d({sourceUrl:o(),normalizedUrl:o().nullable(),classification:U0,matchedTargetIds:y(o().trim().min(1)),matchedUrlIds:y(o().trim().min(1))}).strict(),yM=d({observationId:o().trim().min(1),expectedSlotId:o().trim().min(1),executionId:o().trim().min(1),usageEdgeId:o().trim().min(1),usageEdgeType:y3,provider:St,queryText:o().trim().min(1),location:o().nullable(),queryClass:Xe([j(["branded","non-brand"]),de()]),mentioned:_().nullable(),cited:_().nullable(),sources:y(gM),sourceCount:m().int().nonnegative(),sourcesTruncated:_(),bridged:_(),historical:_(),evidenceComplete:_()}).strict(),bM=d({sourceUrl:o(),normalizedUrl:o().nullable(),matchedUrlIds:y(o().trim().min(1))}).strict(),vM=d({observationId:o().trim().min(1),expectedSlotId:o().trim().min(1),executionId:o().trim().min(1),provider:St,queryText:o().trim().min(1),location:o().nullable(),queryClass:j(["branded","non-brand"]),assignedTargetKeys:y(ge).min(1),sources:y(bM).min(1),sourceCount:m().int().positive(),sourcesTruncated:_(),evidenceComplete:_()}).strict(),xM=d({bridgedObservationIds:y(o()),historicalObservationIds:y(o()),evidenceIncompleteObservationIds:y(o()),ambiguousObservationIds:y(o()),unmatchedObservationIds:y(o())}).strict(),wM=d({id:o().trim().min(1),status:j(["completed","partial"]),createdAt:o().datetime(),startedAt:o().datetime().nullable(),finishedAt:o().datetime().nullable()}).strict();d({revision:m().int().positive(),queryClass:Wn.nullable().optional(),run:wM.nullable(),groups:y(pM),targets:y(fM),evidence:y(v3),diagnostics:xM}).strict();d({property:d({targetKey:ge,label:o().min(1)}).strict(),queryClass:Wn,measurement:d({state:A0,displayedRunId:o().min(1).optional(),completedAt:o().datetime().optional()}).strict(),evidence:ko(v3).optional(),answers:ko(yM).optional(),otherQueries:ko(vM).optional()}).strict().refine(e=>[e.evidence,e.answers,e.otherQueries].filter(n=>n!==void 0).length===1,{message:"Exactly one of evidence, answers or otherQueries is present, naming the shape that was served."});const V0=j(["queued","running","completed","partial","failed"]);V0.enum;const x3=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"]);x3.enum;d({providers:y(St).min(1).optional(),dryRun:_().optional()}).strict();const w3=d({id:o(),runId:o(),projectId:o(),status:V0,providers:y(o()),expected:m().int().nonnegative(),filled:m().int().nonnegative(),error:o().nullable(),createdAt:o(),startedAt:o().nullable(),finishedAt:o().nullable()}),SM=d({runId:o(),status:ha,planned:_(),readable:_(),expected:m().int().nonnegative(),executed:m().int().nonnegative(),missing:m().int().nonnegative(),missingByProvider:He(o(),m().int().nonnegative()),fillable:_(),refusal:d({code:x3,message:o()}).nullable(),latestFill:w3.nullable()}),kM=j(["queued","already-complete","dry-run"]);d({outcome:kM,completeness:SM,fill:w3.nullable()});const pa=o().trim().min(1),qi=o().trim().min(1),jM=o().trim().min(1),je=m().int().nonnegative(),Zc=d({state:A0,displayedRunId:pa.nullable(),planRevision:m().int().positive(),completedAt:o().datetime().nullable()}).strict(),zo=d({targetKey:ge,label:qi}).strict(),ma={runId:pa.optional(),provider:St.optional(),location:jM.optional()},_o=o().trim().min(1),Cf=5,AM=10,NM=5,CM=10,_M="tied Properties have both zero mentions and zero citations; ordered by name, not ranked",$0=j(["weakest-properties","strongest-mentions","weakest-mentions","excluded-mentions","markets","observed-names","cited-domains"]);$0.enum;d({runId:ma.runId,groupKey:ge.optional(),queryClass:Wn.default("non-brand"),provider:ma.provider,location:ma.location,limit:m().int().positive().max(50).optional(),includeNestedMarkets:_().optional(),compact:_().optional(),list:$0.optional(),cursor:pa.optional(),answers:j(["all","not-mentioned"]).optional()}).strict();const qw=fg,S3={metro:qw.nullable(),otherMetros:y(qw).min(1).optional(),submarkets:y(qi),queries:je},k3=d({name:_o,answers:je}).strict(),TM=d({name:_o,occurrences:je}).strict(),Pm=d({domain:o().trim().min(1),answers:je}).strict(),EM=zo.extend({...S3,mentionCoverage:dn,citationCoverage:dn,flags:je,namedInsteadInAnswerText:y(k3).max(Cf).optional(),namedInsteadInAnswerTextTotal:je.optional(),citedDomains:y(Pm).max(Cf).optional(),citedDomainsTotal:je.optional(),recommendedInstead:y(TM).max(Cf).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:je.optional().meta({deprecated:!0,description:"Deprecated: read namedInsteadInAnswerTextTotal, which it always equals."}),recommendedInsteadTruncated:_().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:fe.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:fe.custom,path:["citedDomainsTotal"],message:"Total cannot be smaller than the returned domains"}),e.recommendedInsteadTotal!==e.namedInsteadInAnswerTextTotal&&n.addIssue({code:fe.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:fe.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:fe.custom,path:["recommendedInsteadTruncated"],message:"Truncation must agree with the replacement total"})}),RM=d({metro:qi.nullable(),count:m().int().positive()}).strict(),DM=d({count:m().int().min(2),mentionRate:we(),citationRate:we(),note:j([_M,"tied Properties are ordered by name, not ranked"]),byMetro:y(RM).optional(),namedInstead:y(k3).max(CM).optional(),namedInsteadTotal:je.optional()}).strict().superRefine((e,n)=>{e.namedInstead!==void 0&&(e.namedInsteadTotal===void 0||e.namedInstead.length>e.namedInsteadTotal)&&n.addIssue({code:fe.custom,path:["namedInsteadTotal"],message:"Total cannot be smaller than the returned names"})}),zM=d({basis:R("initial-weakest-selection-and-zero-signal-tie").optional(),properties:je,answers:je,domains:y(Pm).max(AM),domainTotal:je,ownDomainAnswers:je.optional()}).strict().superRefine((e,n)=>{e.ownDomainAnswers!==void 0&&e.ownDomainAnswers>e.answers&&n.addIssue({code:fe.custom,path:["ownDomainAnswers"],message:"Own-domain answers cannot exceed the basis"}),e.domains.length>e.domainTotal&&n.addIssue({code:fe.custom,path:["domainTotal"],message:"Total cannot be smaller than the returned domains"}),e.domains.some(s=>s.answers>e.answers)&&n.addIssue({code:fe.custom,path:["domains"],message:"A domain cannot be cited by more answers than the basis holds"})}),IM=d({groupKey:ge,label:qi,parentGroupKey:ge.nullable(),childMarketCount:je,propertyCount:je,propertiesMentioned:Ao,propertiesNeverMentioned:Ao.optional(),mentionCoverage:dn,citationCoverage:dn}).strict(),OM=d({population:R("top-level-markets"),queryClass:Wn,totalMarkets:je,eligibleMarketCount:je,excludedMarketCount:je,items:y(d({groupKey:ge,label:qi,propertyCount:je,mentionCoverage:dn.options[0],citationCoverage:dn.options[0]}).strict()).max(NM)}).strict(),Mw=zo.extend({...S3,mentionCoverage:dn.options[0],citationCoverage:dn}).strict(),PM=d({eligiblePropertyCount:je,strongest:y(Mw).max(50),weakest:y(Mw).max(50),excluded:y(zo.extend({reason:Gc}).strict()),truncated:_(),excludedTotal:je.optional()}).strict();d({portfolio:d({groupKey:ge.nullable(),label:qi.nullable(),measurementScope:Xe([j(["full","spot_check"]),de()])}).strict(),measurement:Zc,queryClass:Wn,engines:y(St),metrics:d({propertiesMentioned:Ao,propertiesNeverMentioned:Ao.optional(),mentionCoverage:dn,citationCoverage:dn}).strict(),weakestMarkets:OM.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(EM),tiedAtWeakest:DM.nullable(),weakestAnswerSources:zM.nullable().optional(),mentionRanking:PM,markets:y(IM),totalMarkets:je,marketsTruncated:_(),totalProperties:je,truncated:_(),pageList:$0.optional(),nextCursor:pa.nullable().optional(),detailsOmitted:y(o()).optional(),answerEvidence:d({answers:R("not-mentioned"),populationSize:je,answerCount:je,unknownMentionAnswers:je,observedNames:y(d({name:_o,answerCount:je}).strict()),observedNamesTotal:je,citedDomains:y(Pm),citedDomainsTotal:je}).strict().optional()}).strict().superRefine((e,n)=>{const s=e.detailsOmitted?.includes("weakestProperties.answerEvidence")??!1,r=["namedInsteadInAnswerText","namedInsteadInAnswerTextTotal","citedDomains","citedDomainsTotal","recommendedInstead","recommendedInsteadTotal","recommendedInsteadTruncated"];s||e.weakestProperties.forEach((u,h)=>{for(const f of r)u[f]===void 0&&n.addIssue({code:fe.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:fe.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:fe.custom,path:["marketsTruncated"],message:"Market truncation must agree with the market total"})});d({targetKey:ge,runId:ma.runId,provider:ma.provider,location:ma.location,queryClass:Wn.optional(),offset:m().int().nonnegative().optional(),limit:m().int().positive().max(100).optional()}).strict();j(["answered","missing"]);const vg={queryId:pa,text:qi,class:S0,provider:St,requestedModel:o().nullable(),servedModel:o().nullable(),location:o().nullable()},qM=$e("status",[d({resultId:pa,...vg,status:R("answered"),mentioned:_().nullable(),cited:_().nullable(),recommendedInstead:y(_o),answerExcerpt:o().nullable()}).strict(),d({resultId:de(),...vg,status:R("missing"),mentioned:de(),cited:de(),recommendedInstead:y(_o).length(0),answerExcerpt:de()}).strict()]);d({property:zo,measurement:Zc,queryClass:Wn,questions:y(qM),total:je,truncated:_()}).strict();d({targetKey:ge,resultId:pa}).strict();const MM=d({url:pa,classification:U0,matchedTargetKeys:y(ge),assigned:_(),historical:_(),evidenceComplete:_()}).strict().superRefine((e,n)=>{e.assigned!==(e.classification==="assigned")&&n.addIssue({code:fe.custom,path:["assigned"],message:"Assigned must agree with the source attribution classification"})});d({property:zo,measurement:Zc,question:d({resultId:pa,...vg,status:R("answered")}).strict(),mentioned:_().nullable(),cited:_().nullable(),recommendedInstead:y(_o),answer:o().nullable(),sources:y(MM),captureStatus:Xe([Am,de()]),retrievalStatus:Xe([r0,de()]),retrievalContract:Xe([l0,de()])}).strict();d({targetKey:ge,runId:ma.runId,provider:ma.provider,location:ma.location,queryClass:Wn.optional(),limit:m().int().positive().max(50).optional()}).strict();const BM=$e("state",[d({state:R("available"),answeredResults:je,targetMissResults:je,recommendationOccurrences:je}).strict(),d({state:R("unavailable"),reason:Gc}).strict()]),LM=d({name:_o,occurrences:je,providers:y(St).max(5),providerTotal:je,providersTruncated:_(),questions:y(qi).max(5),questionTotal:je,questionsTruncated:_()}).strict().superRefine((e,n)=>{(e.providers.length>e.providerTotal||e.questions.length>e.questionTotal)&&n.addIssue({code:fe.custom,message:"Evidence totals cannot be smaller than returned evidence"}),e.providersTruncated!==e.providers.length<e.providerTotal&&n.addIssue({code:fe.custom,path:["providersTruncated"],message:"Provider truncation must agree with its total"}),e.questionsTruncated!==e.questions.length<e.questionTotal&&n.addIssue({code:fe.custom,path:["questionsTruncated"],message:"Question truncation must agree with its total"})}),UM=10;d({property:zo,measurement:Zc,queryClass:Wn,basis:BM,competitors:y(LM),total:je,truncated:_(),citedDomains:y(Pm).max(UM).optional(),citedDomainsTotal:je.optional(),citedDomainsAnswers:je.optional()}).strict().superRefine((e,n)=>{const{citedDomains:s,citedDomainsTotal:r,citedDomainsAnswers:u}=e;if(s!==void 0){if(r===void 0||u===void 0){n.addIssue({code:fe.custom,path:["citedDomains"],message:"Cited domains require their total and answer basis"});return}s.length>r&&n.addIssue({code:fe.custom,path:["citedDomainsTotal"],message:"Total cannot be smaller than the returned domains"}),s.some(h=>h.answers>u)&&n.addIssue({code:fe.custom,path:["citedDomains"],message:"A domain cannot be cited by more answers than the basis holds"})}});const j3=j(["magnitude","label"]),VM=2,$M=j(["all","group","property"]);d({runId:ma.runId,scope:$M.default("all"),groupKey:ge.optional(),targetKey:ge.optional(),queryClass:Wn.default(IO),provider:ma.provider,location:ma.location,limit:m().int().positive().max(50).optional(),sort:j3.optional()}).strict().superRefine((e,n)=>{e.scope==="all"&&(e.groupKey!==void 0||e.targetKey!==void 0)&&n.addIssue({code:fe.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:fe.custom,path:["groupKey"],message:"Group scope requires groupKey only"}),e.scope==="property"&&(e.targetKey===void 0||e.groupKey!==void 0)&&n.addIssue({code:fe.custom,path:["targetKey"],message:"Property scope requires targetKey only"})});const A3=j(["no_previous_run","execution_identity_changed","incomplete","not_comparable"]),N3=Zc.extend({executionIdentity:pa.nullable(),measurementScope:Xe([j(["full","spot_check"]),de()])}).strict();function C3(e,n){if(e.previous.state!=="available"||e.current.state!=="available"){n.addIssue({code:fe.custom,message:"Available deltas require two available metrics"});return}Math.abs(e.delta-(e.current.value-e.previous.value))>Number.EPSILON&&n.addIssue({code:fe.custom,path:["delta"],message:"Delta must equal current minus previous"})}const _3=d({state:R("unavailable"),reason:Gc}).strict(),Wd=$e("state",[d({state:R("available"),previous:dn,current:dn,delta:we()}).strict().superRefine(C3),_3]),KM=$e("state",[d({state:R("available"),previous:Ao,current:Ao,delta:m().int()}).strict().superRefine(C3),_3]),_f=d({propertiesMentioned:KM,mentionCoverage:Wd,citationCoverage:Wd}).strict(),GM=d({improved:je,declined:je,mixed:je,withinNoise:je,unchanged:je,notComparable:je,total:je,noiseAnswers:R(VM)}).strict().superRefine((e,n)=>{e.improved+e.declined+e.mixed+e.withinNoise+e.unchanged+e.notComparable!==e.total&&n.addIssue({code:fe.custom,path:["total"],message:"Move buckets must sum to total"})}),HM=zo.extend({mentionCoverage:Wd,citationCoverage:Wd,flags:je,mentionAnswersDelta:m().int().nullable().optional(),citationAnswersDelta:m().int().nullable().optional(),denominatorChanged:_().optional(),withinNoise:_().optional(),mentionWithinNoise:_().nullable().optional(),citationWithinNoise:_().nullable().optional()}).strict();d({current:N3,queryClass:Wn.optional(),comparison:$e("state",[d({state:R("available"),previous:d({displayedRunId:pa,planRevision:m().int().positive(),completedAt:o().datetime().nullable(),executionIdentity:pa,measurementScope:j(["full","spot_check"])}).strict(),metrics:_f,metricsByClass:d({branded:_f,nonBrand:_f}).strict().optional(),sort:j3.optional(),distribution:GM.optional(),changedProperties:y(HM),totalProperties:je,truncated:_()}).strict(),d({state:R("unavailable"),reason:A3}).strict()])}).strict().superRefine((e,n)=>{if(e.comparison.state!=="available")return;const{distribution:s}=e.comparison;if(s!==void 0&&s.total-s.unchanged!==e.comparison.totalProperties&&n.addIssue({code:fe.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:fe.custom,path:["current"],message:"A comparison requires an identified current run"});return}e.comparison.previous.planRevision!==e.current.planRevision&&n.addIssue({code:fe.custom,path:["comparison","previous","planRevision"],message:"Comparisons cannot cross plan revisions"}),e.comparison.previous.executionIdentity!==e.current.executionIdentity&&n.addIssue({code:fe.custom,path:["comparison","previous","executionIdentity"],message:"Comparisons cannot cross execution identities"})});d({runId:ma.runId}).strict();const FM=j(["no_completed_run","incomplete","evidence_incomplete","no_population","not_applicable"]),Yc=d({state:R("unavailable"),reason:FM}).strict(),QM=d({state:R("available"),expected:je,executed:je,answered:je,missing:je}).strict(),ZM=$e("state",[QM,Yc]).superRefine((e,n)=>{e.state==="available"&&(e.executed+e.missing!==e.expected&&n.addIssue({code:fe.custom,message:"Expected must equal executed plus missing"}),e.answered>e.executed&&n.addIssue({code:fe.custom,path:["answered"],message:"Answered cannot exceed executed"}))}),YM=d({state:R("available"),complete:je,partial:je,failed:je,unsupported:je,notRecorded:je}).strict(),XM=$e("state",[YM,Yc]),JM=d({state:R("available"),used:je,notUsed:je,unknown:je,notApplicable:je,notRecorded:je}).strict(),WM=$e("state",[JM,Yc]),eB=d({state:R("available"),expectedQuestions:je,answeredQuestions:je,missingQuestions:je}).strict(),tB=$e("state",[eB,Yc]).superRefine((e,n)=>{e.state==="available"&&e.answeredQuestions+e.missingQuestions!==e.expectedQuestions&&n.addIssue({code:fe.custom,message:"Expected questions must equal answered plus missing"})}),Bw=$e("state",[d({state:R("available"),answered:je,unattributed:je}).strict(),Yc]).superRefine((e,n)=>{e.state==="available"&&e.unattributed>e.answered&&n.addIssue({code:fe.custom,path:["unattributed"],message:"Unattributed answers cannot exceed answered"})}),nB=d({status:V0,providers:y(o()),expected:je,filled:je,createdAt:o(),finishedAt:o().nullable()}).strict();d({run:N3,completeness:ZM,capture:XM,retrieval:WM,population:tB,comparison:$e("state",[d({state:R("available"),previousDisplayedRunId:pa}).strict(),d({state:R("unavailable"),reason:A3}).strict()]),unattributedByClass:d({branded:Bw,nonBrand:Bw}).strict().optional(),latestFill:nB.nullable().optional()}).strict().superRefine((e,n)=>{if(e.completeness.state!=="available")return;const s=e.completeness.executed;e.capture.state==="available"&&e.capture.complete+e.capture.partial+e.capture.failed+e.capture.unsupported+e.capture.notRecorded!==s&&n.addIssue({code:fe.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!==s&&n.addIssue({code:fe.custom,path:["retrieval"],message:"Retrieval counts must total executed snapshots"})});const Lr=o().regex(/^[a-f0-9]{64}$/),Fa=o().trim().min(1).max(256),ls=m().int().positive(),Lw=d({kind:j(["user","api-key","system"]),id:o().trim().min(1),label:o().trim().min(1)}).strict(),aB=j(["proposed","included","excluded"]),sB=j(["manual","sitemap"]),K0=d({stableKey:ge,label:o().trim().min(1),status:aB,aliases:y(o().trim().min(1)),identityAliases:y(o().trim().min(1)).optional(),urlMatchers:y(o().trim().min(1)),source:sB,discoveredUrl:o().trim().min(1).optional(),discoveryIdentity:o().trim().min(1).optional()}).strict(),qm=d({providers:y(St).optional(),models:He(St,o().trim().min(1)).optional(),locations:y(o().trim().min(1)).optional()}).strict(),iB=j(["branded","non-brand","unclassified"]),oB=j(["rule","operator"]),T3=d({targetKey:ge,queryId:Fa,contextOverride:qm.optional(),executionContexts:y(Cm.extend({executionNodeKey:o().min(1).optional()})).min(1).optional(),queryProvenance:l2.optional(),queryClass:iB,classificationSource:oB}).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."})}),Mm=r2,E3=d({stableKey:ge,label:o().trim().min(1),parentGroupKey:ge.optional(),targetKeys:y(ge),competitors:y(Mm)}).strict(),rB=d({sitemapUrl:o().url(),rule:L0,exclusions:y(o().trim().min(1)),inputChecksum:Lr,reviewedAt:o().datetime().optional()}).strict(),lB=d({providers:y(St),models:He(St,o().trim().min(1)).optional(),locations:y(o().trim().min(1))}).strict(),R3=c2,cB=d({defaultContext:lB,targets:y(K0),assignments:y(T3),groups:y(E3),reportingScopes:y(R3).optional(),discovery:rB.optional()}).strict(),uB=d({id:o().trim().min(1),projectId:o().trim().min(1),schemaVersion:R(2),baseActiveVersionId:o().trim().min(1).nullable(),baseActiveRevision:ls.nullable(),authoring:cB,createdBy:Lw,updatedBy:Lw,createdAt:o().datetime(),updatedAt:o().datetime()}).strict(),G0=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(),dB=d({code:o().trim().min(1),message:o().trim().min(1),path:y(Xe([o(),m().int()]))}).strict(),D3=d({etag:o().trim().min(1),changed:_(),warnings:y(dB),counts:G0}).strict();d({draft:uB.nullable(),etag:o().trim().min(1).nullable()}).strict();ko(K0);ko(T3);ko(E3);d({search:o().optional(),cursor:o().trim().min(1).optional(),limit:m().int().positive().max(j0).optional()}).strict();d({expectedActiveRevision:ls.nullable()}).strict();d({sitemapUrl:o().url(),rule:L0,exclusions:y(o().trim().min(1)).optional()}).strict();const mB=d({discoveryIdentity:o().trim().min(1),action:j(["create","rebind","ignore"]),targetKey:ge.optional(),label:o().trim().min(1).optional()}).strict();d({selections:y(mB),selectedTargetKeys:y(ge).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:K0}).strict();d({targetKey:ge,label:o().trim().min(1)}).strict();d({targetKey:ge,mergedKeys:y(ge).min(1)}).strict();d({targetKey:ge,cleanup:R("assignments-and-group-memberships").optional()}).strict();d({targetKey:ge,discoveryIdentity:o().trim().min(1),discoveredUrl:o().url()}).strict();const z3={targetKeys:y(ge).optional(),groupKeys:y(ge).optional()};function I3(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(z3).strict().superRefine(I3);const pB=d({...z3,queryIds:y(Fa).min(1),contextOverride:qm.optional()}).strict().superRefine(I3);Xe([d({targetKey:ge,queryIds:y(Fa).min(1),contextOverride:qm.optional()}).strict(),pB]);const hB=d({groupKey:ge,label:o().trim().min(1),memberCount:m().int().positive()}).strict();d({draftEtag:o().trim().min(1),groups:y(hB),resolvedTargetKeys:y(ge),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:ge,queryId:Fa}).strict()).min(1),contextOverride:qm.optional()}).strict();Xe([d({targetKey:ge,queryId:Fa}).strict(),d({targetKeys:y(ge).min(1),queryId:Fa}).strict()]);d({targetKey:ge}).strict();d({queryClass:S0,assignments:y(d({targetKey:ge,queryId:Fa}).strict()).min(1)}).strict();d({group:d({stableKey:ge,label:o().trim().min(1),parentGroupKey:ge.nullable().optional(),targetKeys:y(ge),competitors:y(Mm).optional()}).strict()}).strict();d({market:R3}).strict();d({groupKey:ge}).strict();d({groupKey:ge,competitor:Mm}).strict();d({expectedActiveRevision:ls,groupKey:ge,domain:o().trim().min(1).refine(e=>$c(e)!==null,"A competitor domain must be a valid hostname"),label:o().trim().min(1).optional(),aliases:y(o().trim().min(1)).optional()}).strict();D3.extend({groupKey:ge,competitor:Mm,draftCreated:_(),published:d({revision:ls,competitorsChanged:R(!1)}).strict()}).strict();d({groupKey:ge,competitorKey:ge}).strict();const em=d({ruleId:o().trim().min(1),severity:j(["fail","warn"]),message:o().trim().min(1),path:y(Xe([o(),m().int()]))}).strict();$e("ok",[d({ok:R(!0),compiledChecksum:Lr,checks:y(em),counts:G0,plan:_m}).strict(),d({ok:R(!1),compiledChecksum:de(),checks:y(em).min(1)}).strict()]);const Uw=d({added:y(o().trim().min(1)),removed:y(o().trim().min(1)),changed:y(o().trim().min(1)),unchanged:y(o().trim().min(1))}).strict(),fB=d({activeRevision:ls.nullable(),targets:Uw,groups:Uw,assignments:d({added:m().int().nonnegative(),removed:m().int().nonnegative(),reclassified:m().int().nonnegative()}).strict(),execution:d({addedNodeKeys:y(o().trim().min(1)),removedNodeKeys:y(o().trim().min(1))}).strict()}).strict();$e("ok",[d({ok:R(!0),compiledChecksum:Lr,checks:y(em),counts:G0,plan:_m,diff:fB}).strict(),d({ok:R(!1),compiledChecksum:de(),checks:y(em).min(1),diff:de()}).strict()]);d({expectedActiveRevision:ls.nullable(),expectedCompiledChecksum:Lr}).strict();d({published:_(),active:d({revision:ls,checksum:Lr,compiledChecksum:Lr,createdAt:o().datetime(),plan:_m}).strict()}).strict();d({discarded:_()}).strict();d({expectedActiveRevision:ls}).strict();d({deactivated:_(),previousRevision:ls.nullable()}).strict();const gB=j(["republish_required","setup_in_progress","awaiting_first_run","operational","simple"]),yB=j(["republish_setup","continue_setup","run_measurement","view_measurement","start_setup"]),bB=j(["simple","draft-only","active-v1","active-v2"]);d({state:gB,nextAction:yB,mode:bB,answerVisibilityProviderReady:_(),activeRevision:ls.nullable(),activeSchemaVersion:Xe([R(1),R(2)]).nullable(),draft:d({etag:o().trim().min(1),updatedAt:o().datetime()}).strict().nullable()}).strict();const O3=d({id:o().trim().min(1),projectId:o().trim().min(1),name:o().trim().min(1),description:o().nullable(),itemCount:m().int().nonnegative(),createdAt:o().datetime(),updatedAt:o().datetime()}).strict(),vB=d({queryId:Fa,queryText:o().min(1),position:m().int().nonnegative()}).strict();O3.extend({items:y(vB)}).strict();d({querySets:y(O3)}).strict();d({name:o().trim().min(1),description:o().nullable().optional(),queryIds:y(Fa)}).strict();const xB=d({id:o().trim().min(1),projectId:o().trim().min(1),name:o().trim().min(1),description:o().nullable(),pattern:o().trim().min(1),variables:y(o().trim().min(1)),createdAt:o().datetime(),updatedAt:o().datetime()}).strict();d({templates:y(xB)}).strict();d({name:o().trim().min(1),description:o().nullable().optional(),pattern:o().trim().min(1),variables:y(o().trim().min(1))}).strict();d({bindings:y(He(o().trim().min(1),o().trim().min(1))).min(1),querySetId:o().trim().min(1).optional()}).strict();d({created:y(d({queryId:Fa,queryText:o().min(1)}).strict()),existing:y(d({queryId:Fa,queryText:o().min(1)}).strict())}).strict();const tm=o().regex(/^[a-f0-9]{64}$/),Bm=m().int().positive();d({stableKey:ge,kind:j(["target","group"]),retiredAt:o().datetime().nullable()}).strict();d({csv:o()}).strict();j(["matched","ambiguous","unmatched","invalid","duplicate","proposed","excluded"]);const wB=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"]),xg=d({dataRow:Bm,property:o(),group:o(),url:o().nullable(),normalizedProperty:o(),normalizedGroupLabel:o()}).strict(),uc=xg.extend({reason:wB}),SB=d({source:j(["draft-target","draft-group","persisted-segment","retired-segment","proposed-group"]),stableKey:ge,kind:j(["target","group"]).optional(),retiredAt:o().datetime().nullable().optional(),normalizedGroupLabel:o().optional()}).strict(),kB=d({proposedGroupKey:ge,evidence:y(SB).min(1)}).strict(),jB=$e("status",[xg.extend({status:R("matched"),targetKey:ge,groupKey:ge}).strict(),uc.extend({status:R("ambiguous"),candidateTargetKeys:y(ge).min(1).optional(),candidateGroupKeys:y(ge).min(1).optional()}).strict(),uc.extend({status:R("unmatched")}).strict(),uc.extend({status:R("invalid"),groupKeyConflict:kB.optional()}).strict(),xg.extend({status:R("duplicate"),duplicateOfRow:Bm,targetKey:ge,groupKey:ge}).strict(),uc.extend({status:R("proposed"),targetKey:ge}).strict(),uc.extend({status:R("excluded"),targetKey:ge}).strict()]),AB=d({normalizedGroupLabel:o(),groupKey:ge,label:o().trim().min(1),action:j(["create","extend"]),matchedRows:y(Bm),targetKeys:y(ge),addedTargetKeys:y(ge),unchangedTargetKeys:y(ge)}).strict(),NB=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:o().trim().min(1),sourceChecksum:tm,previewChecksum:tm,rows:y(jB),groupChanges:y(AB),counts:NB}).strict();d({csv:o(),sourceChecksum:tm,previewChecksum:tm,acceptedRows:y(Bm).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."})});D3.extend({appliedRows:m().int().nonnegative(),addedMemberships:m().int().nonnegative(),unchangedMemberships:m().int().nonnegative()}).strict();function P3(e,n){return Number((n===Ga.percent?e:e*100).toFixed(6))}function q3(e){return Math.round(Number((e*10).toFixed(4)))/10}function nm(e,n=Ga.fraction){if(e==null||!Number.isFinite(e))return"—";const s=P3(e,n);if(s===0)return"0%";const r=s<0?"-":"",u=Math.abs(s);if(u===100)return`${r}100%`;const h=q3(u);return h===0?`${r}<0.1%`:h===100&&u<100?`${r}>99.9%`:`${r}${h.toFixed(1)}%`}function Mne(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"):"—"}function Bne(e){if(!e)return"—";try{const n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),s={month:"short",day:"numeric",year:"numeric"},r=n&&n[1]&&n[2]&&n[3]?new Date(Date.UTC(Number(n[1]),Number(n[2])-1,Number(n[3]))):new Date(e);return Number.isNaN(r.getTime())?e:r.toLocaleDateString("en-US",n?{...s,timeZone:"UTC"}:s)}catch{return e}}const CB=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function kc(e,n=new Date){const s=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),r=s?CB[Number(s[2])-1]:void 0;if(!s||!r)return e;const u=`${r} ${Number(s[3])}`;return Number(s[1])===n.getFullYear()?u:`${u}, ${s[1]}`}function Lne(e,n,s=800){const r=[];if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(n))return r;for(let u=e;u<=n&&(r.push(u),!(r.length>=s));u=_B(u,1));return r}function _B(e,n){if(!Number.isFinite(n))return e;const s=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!s?.[1]||!s[2]||!s[3])return e;const r=new Date(Date.UTC(Number(s[1]),Number(s[2])-1,Number(s[3])+Math.trunc(n)));if(Number.isNaN(r.getTime()))return e;const u=r.getUTCFullYear(),h=String(r.getUTCMonth()+1).padStart(2,"0"),f=String(r.getUTCDate()).padStart(2,"0");return`${u}-${h}-${f}`}function Une(e,n=Ga.fraction){const s=P3(e,n);if(s===0)return{direction:"none",magnitude:"0"};const r=q3(Math.abs(s));return{direction:s>0?"up":"down",magnitude:r===0?"<0.1":r.toFixed(1)}}function Vne(e,n="UTC"){const s=new Date(e);if(!Number.isFinite(s.getTime()))return null;const r={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"};try{return s.toLocaleString("en-US",{...r,timeZone:n})}catch{return s.toLocaleString("en-US",{...r,timeZone:"UTC"})}}const M3=j(["introduced","repointed","retired"]),TB=M3.enum;d({modelId:o().trim().min(1),date:o().regex(/^\d{4}-\d{2}-\d{2}$/,"date must be YYYY-MM-DD"),kind:M3,confirmed:_(),sourceUrl:o().url(),note:o().min(1)});const EB=[{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.'}];TB.repointed;new Set(EB.map(e=>e.modelId.toLowerCase()));const RB=j(["not-exposed","no-known-change","known-change"]);RB.enum;const DB=d({modelId:o().trim().min(1),date:o().regex(/^\d{4}-\d{2}-\d{2}$/),confirmed:_(),sourceUrl:o().url()}),zB=d({status:j(["no-known-change","known-change"]),modelIds:y(o().trim().min(1)).min(1),changes:y(DB),changeCount:m().int().nonnegative(),unverifiedChangeCount:m().int().nonnegative(),firstChangeDate:o().optional(),lastChangeDate:o().optional(),knownGoodAsOf:o(),checkedThroughPeriodEnd:_()}),IB={openai:"ChatGPT",chatgpt:"ChatGPT",anthropic:"Claude",claude:"Claude",google:"Gemini",gemini:"Gemini",perplexity:"Perplexity"};function OB(e){const n=e.trim().toLowerCase();return IB[n]??e.charAt(0).toUpperCase()+e.slice(1)}function Tf(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):0}function dc(e){return typeof e=="string"&&e.trim().length>=10?e.trim().slice(0,10):null}function Ef(e){return[...new Set(e.filter(n=>n!==null))].sort()}function PB(e,n,s){const r=s(e),u=Array.isArray(n.changes)?n.changes:[],h=Tf(n.changeCount)||u.length,f=Math.min(h,Tf(n.unverifiedChangeCount)||Tf(n.unconfirmedChangeCount)||u.filter(k=>k.confirmed===!1).length),b=dc(n.knownGoodAsOf),v=n.checkedThroughPeriodEnd!==!1,x={engine:r,confirmedCount:h-f,unconfirmedCount:f,knownGoodAsOf:b,checkedThroughPeriodEnd:v};if(u.length>0)return{...x,confirmedDates:Ef(u.filter(k=>k.confirmed!==!1).map(k=>dc(k.date))),unconfirmedDates:Ef(u.filter(k=>k.confirmed===!1).map(k=>dc(k.date)))};const S=Ef([dc(n.firstChangeDate),dc(n.lastChangeDate)]);return h===0?{...x,confirmedDates:[],unconfirmedDates:[]}:f===0?{...x,confirmedDates:S,unconfirmedDates:[]}:x.confirmedCount===0?{...x,confirmedDates:[],unconfirmedDates:S}:{...x,confirmedDates:[],unconfirmedDates:[]}}function qB(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 Vw(e,n){return e.length===0?null:e.length===1&&n<=1?`on ${kc(e[0])}`:`more than once between ${kc(e[0])} and ${kc(e[e.length-1])}`}function MB(e){const n=Vw(e.confirmedDates,e.confirmedCount),s=Vw(e.unconfirmedDates,e.unconfirmedCount),r=`The model behind ${e.engine}`;if(e.confirmedCount>0&&e.unconfirmedCount===0)return n?`${r} was updated ${n}, inside this period.`:`${r} was updated inside this period.`;if(e.confirmedCount===0)return s?`${r} may have been updated ${s}, inside this period, though that is not confirmed.`:`${r} may have been updated inside this period, though that is not confirmed.`;if(n&&s)return`${r} was updated ${n}, inside this period, and may also have been updated ${s}.`;const u=e.unconfirmedCount>1?"more times":"once more";return`${r} was updated inside this period, and may have been updated ${u}, though that is not confirmed.`}function $w(e){const n=e.filter(r=>!r.checkedThroughPeriodEnd&&r.knownGoodAsOf!==null);if(n.length===0)return null;const s=n.map(r=>r.knownGoodAsOf).sort()[0];return`We last checked for model updates on ${kc(s)}, and this period runs past that date, so there may be later updates we do not know about.`}function $ne(e,n={}){const s=n.engineName??OB,r=Object.entries(e??{}).map(([S,k])=>PB(S,k??{},s)).sort((S,k)=>S.engine.localeCompare(k.engine));if(r.length===0)return null;const u=r.filter(S=>S.confirmedCount+S.unconfirmedCount>0);if(u.length===0){const S=[...new Set(r.map(q=>q.engine))],k=S.length>1,N=$w(r),T=[...new Set(r.map(q=>q.knownGoodAsOf).filter(q=>q!==null))].sort(),z=N??(T.length>0?`We last checked for model updates on ${kc(T[0])}.`:null);return{kind:"no-known-change",text:`No model updates are on record for ${qB(S)} in this period.`,detail:`${k?"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((S,k)=>S+k.confirmedCount+k.unconfirmedCount,0),f=u.some(S=>S.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=$w(r);return{kind:"change",text:`${u.map(MB).join(" ")} ${v}${x?` ${x}`:""}`}}const So=d({slope:m(),intercept:m(),r2:m(),start:m(),end:m(),n:m(),startIndex:m(),endIndex:m()}),BB=j(["gsc","ga4","gbp"]);d({id:o(),domain:o(),connectionType:BB,propertyId:o().nullable().optional(),sitemapUrl:o().nullable().optional(),scopes:y(o()).default([]),createdAt:o(),updatedAt:o()});const LB=d({date:o(),query:o(),page:o(),country:o().nullable().optional(),device:o().nullable().optional(),clicks:m(),impressions:m(),ctr:we(),position:m()});j(["clicks","impressions","date"]);d({rows:y(LB),totalMatching:m(),truncated:_(),latestAvailableDate:o().nullable()});const UB=d({date:o(),clicks:m(),impressions:m(),ctr:we(),position:m().nullable()}),B3=d({startDate:o().nullable(),endDate:o().nullable(),latestDataDate:o().nullable(),daysSinceLatestData:m().nullable()}),VB=d({clicks:So.nullable(),impressions:So.nullable(),ctr:So.nullable(),position:So.nullable()}),Kw=d({startDate:o(),endDate:o(),clicks:m(),impressions:m(),ctr:we().nullable(),position:m().nullable(),source:j(["property-daily","dimensioned","mixed","empty"])}),$B=d({days:m(),basis:j(["prior-window","split-window"]).optional(),prior:Kw,trailing:Kw,comparable:_(),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(UB),window:B3.optional(),trends:VB.optional(),periodComparison:$B.nullable().optional()});const KB=d({page:o(),clicks:m(),impressions:m(),ctr:we()});d({rows:y(KB),totals:d({clicks:m(),impressions:m(),ctr:we(),days:m(),coveredFrom:o().nullable(),coveredThrough:o().nullable(),complete:_()}).nullable(),totalsSource:R("property-daily"),rankedFrom:o().nullable(),rankedThrough:o().nullable()});const GB=j(["google","page-summed","mixed"]),HB=d({query:o(),clicks:m(),impressions:m(),ctr:we(),position:m(),days:m(),source:GB});d({rows:y(HB),totalMatching:m(),truncated:_(),window:B3.extend({earliestDataDate:o().nullable().optional()})});const wg=d({id:o(),url:o(),indexingState:o().nullable().optional(),verdict:o().nullable().optional(),coverageState:o().nullable().optional(),pageFetchState:o().nullable().optional(),robotsTxtState:o().nullable().optional(),crawlTime:o().nullable().optional(),lastCrawlResult:o().nullable().optional(),isMobileFriendly:_().nullable().optional(),richResults:y(o()).default([]),referringUrls:y(o()).default([]),inspectedAt:o()});j(["stable","reindexed","deindexed","still-missing","new"]);const FB=d({url:o(),previousState:o().nullable(),currentState:o().nullable(),transitionDate:o()}),QB=d({reason:o(),count:m(),urls:y(wg).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:o().nullable(),lastSyncedAt:o().nullable(),indexed:y(wg).default([]),notIndexed:y(wg).default([]),deindexed:y(FB).default([]),reasonGroups:y(QB).default([])});d({url:o(),type:j(["URL_UPDATED","URL_DELETED"]),notifiedAt:o()});const ZB=d({url:o(),type:j(["URL_UPDATED","URL_DELETED"]),notifiedAt:o(),status:j(["success","error"]),error:o().optional()});d({summary:d({total:m().int().nonnegative(),succeeded:m().int().nonnegative(),failed:m().int().nonnegative()}),results:y(ZB).default([])});d({date:o(),indexed:m(),notIndexed:m(),unknownPages:m().default(0),verifiedByInspection:m().default(0),derivedFromImpressions:m().default(0),reasonBreakdown:He(o(),m()).default({})});const YB=d({siteUrl:o(),permissionLevel:o()});d({sites:y(YB).default([])});const XB=d({type:o(),submitted:o(),indexed:o().optional().describe("Deprecated compatibility field.")}),L3=d({path:o(),parentSitemapUrl:o().optional(),lastSubmitted:o().optional(),isPending:_().optional(),isSitemapsIndex:_().optional(),type:o().optional(),lastDownloaded:o().optional(),warnings:o().optional(),errors:o().optional(),contents:y(XB).optional()});d({sitemaps:y(L3).default([]),summary:d({total:m().int().nonnegative(),indexes:m().int().nonnegative(),files:m().int().nonnegative()}),preferredSubmissionUrls:y(o()).default([])});d({sitemapUrls:y(o().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 JB=d({sitemapUrl:o(),status:j(["accepted","error"]),submittedAt:o().optional(),error:o().optional()});d({summary:d({total:m().int().nonnegative(),accepted:m().int().nonnegative(),failed:m().int().nonnegative()}),results:y(JB)});d({sitemaps:y(L3),primarySitemapUrl:o(),run:d({id:o(),projectId:o(),kind:o(),status:o(),trigger:o(),createdAt:o()}).nullable()});const mt=o().trim().min(1),Gw=o().regex(/^[a-f0-9]{64}$/i),WB=j(["not-connected","selection-required","connected","stale"]),Sd=WB.enum,eL=j(["live","draft"]),U3=eL.enum,Od=d({accountId:mt.nullable(),containerId:mt.nullable(),workspaceId:mt.nullable(),selectedAt:o().nullable()}).strict(),Rf=d({id:mt,projectId:mt,scopes:y(o()).default([]),selection:Od,lastValidatedAt:o().nullable(),lastSnapshotAt:o().nullable(),createdAt:o(),updatedAt:o()}).strict(),V3=d({id:mt,path:o(),name:o(),shareData:_().nullable()}).strict(),$3=d({accountId:mt,id:mt,path:o(),name:o(),publicId:o().nullable(),domainName:o().nullable(),usageContexts:y(o())}).strict(),H0=d({accountId:mt,containerId:mt,id:mt,path:o(),name:o(),description:o().nullable(),fingerprint:o().nullable()}).strict(),tL=d({accounts:y(V3),totalAccessible:m().int().nonnegative(),truncated:_(),fetchedAt:o()}).strict();d({accountId:mt,containers:y($3),totalAccessible:m().int().nonnegative(),truncated:_(),fetchedAt:o()}).strict();d({accountId:mt,containerId:mt,workspaces:y(H0),totalAccessible:m().int().nonnegative(),truncated:_(),fetchedAt:o()}).strict();const nL=d({id:mt,name:o(),type:o(),paused:_(),firingTriggerIds:y(mt),blockingTriggerIds:y(mt),referencedVariableIds:y(mt),parameterKeys:y(o()),fingerprint:o().nullable()}).strict(),aL=d({id:mt,name:o(),type:o(),customEventNames:y(o()),filterKeys:y(o()),autoEventFilterKeys:y(o()),fingerprint:o().nullable()}).strict(),sL=d({id:mt,name:o(),type:o(),dataLayerVariableName:o().nullable(),parameterKeys:y(o()),fingerprint:o().nullable()}).strict(),K3=j(["recognized","unknown"]),Hw=K3.enum,iL=j(["literal","variable-ref","absent","unknown"]),Lm=iL.enum,oL=o().trim().min(5).max(132).regex(/^\{\{\w[\w ./-]{0,127}\}\}$/),Xr=d({source:R(Lm.absent),literal:de(),variableRef:de()}).strict(),Jr=d({source:R(Lm.unknown),literal:de(),variableRef:de()}).strict(),Wr=d({source:R(Lm["variable-ref"]),literal:de(),variableRef:oL}).strict();function Xc(e){return d({source:R(Lm.literal),literal:e,variableRef:de()}).strict()}const rL=o().trim().max(23).regex(/^(?:AW-)?\d{1,20}$/i),lL=o().trim().min(1).max(128).regex(/^[\w-]+$/),cL=o().trim().min(1).max(20).regex(/^(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$/),uL=o().trim().length(3).regex(/^[a-z]{3}$/i);$e("source",[Xc(o().trim().min(1).max(256)),Wr,Xr,Jr]);const dL=$e("source",[Xc(rL),Wr,Xr,Jr]),mL=$e("source",[Xc(lL),Wr,Xr,Jr]),pL=$e("source",[Xc(cL),Wr,Xr,Jr]),hL=$e("source",[Wr,Xr,Jr]),fL=$e("source",[Xc(uL),Wr,Xr,Jr]),G3=j(["all-pages","custom-event","filtered","unknown"]);G3.enum;const Fw=d({operator:o().trim().min(1).max(64),value:o().max(2048),negated:_(),ignoreCase:_()}).strict(),gL=d({triggerId:mt,triggerType:o(),eventPredicates:y(Fw),hostnamePredicates:y(Fw),unsupportedConditionCount:m().int().nonnegative()}).strict(),H3=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"]);H3.enum;const yL=d({tagId:mt,tagType:o(),recognition:K3,recognitionReason:o().nullable(),conversionId:dL,conversionLabel:mL,value:pL,transactionId:hL,currency:fL,triggerStrategy:G3,triggerIds:y(mt),triggerPredicates:y(gL),reviewReasons:y(H3)}).strict().superRefine((e,n)=>{e.recognition===Hw.recognized&&e.recognitionReason!==null&&n.addIssue({code:fe.custom,path:["recognitionReason"],message:"Recognized assessments cannot carry an unknown-recognition reason."}),e.recognition===Hw.unknown&&!e.recognitionReason&&n.addIssue({code:fe.custom,path:["recognitionReason"],message:"Unknown assessments require a recognition reason."})}),F3=d({accountId:mt,containerId:mt,workspaceId:mt.nullable(),tags:y(nL),triggers:y(aL),variables:y(sL),googleAdsTagAssessments:y(yL).default([])}).strict(),bL=d({accountId:mt,containerId:mt,id:mt,path:o(),name:o(),description:o().nullable(),fingerprint:o().nullable(),deleted:_()}).strict(),Q3=d({source:R(U3.live),version:bL,graph:F3,fetchedAt:o()}).strict(),Z3=d({source:R(U3.draft),workspace:H0,graph:F3,conflictCount:m().int().nonnegative(),fetchedAt:o()}).strict(),vL=d({account:V3,container:$3,workspaces:y(H0),live:Q3.nullable(),draft:Z3.nullable(),fetchedAt:o()}).strict();$e("status",[d({connected:R(!1),status:R(Sd["not-connected"]),connection:de(),selection:de()}).strict(),d({connected:R(!0),status:R(Sd["selection-required"]),connection:Rf,selection:Od}).strict(),d({connected:R(!0),status:R(Sd.connected),connection:Rf,selection:Od}).strict(),d({connected:R(!0),status:R(Sd.stale),connection:Rf,selection:Od}).strict()]);const Y3=j(["accounts","container","live","draft"]),kd=Y3.enum,F0=d({id:mt,projectId:mt,connectionId:mt,runId:mt,kind:Y3,accountId:mt.nullable(),containerId:mt.nullable(),workspaceId:mt.nullable(),payloadChecksum:Gw,rawPayloadSha256:Gw.nullable(),rawPayloadBytes:m().int().nonnegative().nullable(),redactedFieldCount:m().int().nonnegative(),capturedAt:o(),createdAt:o()}).strict(),xL=$e("kind",[d({kind:R(kd.accounts),data:tL}).strict(),d({kind:R(kd.container),data:vL}).strict(),d({kind:R(kd.live),data:Q3}).strict(),d({kind:R(kd.draft),data:Z3}).strict()]),wL=d({metadata:F0,payload:xL}).strict().superRefine((e,n)=>{e.metadata.kind!==e.payload.kind&&n.addIssue({code:fe.custom,path:["payload","kind"],message:"Snapshot metadata and payload kinds must match."})}),Xn=o().trim().min(1),SL=o().trim().min(1).refine(e=>$c(e)!==null,"Expected a hostname or http(s) URL."),Q0=j(["configured","statically-consistent","runtime-unverified","observed"]);Q0.enum;const X3=j(["pass","fail","unknown"]);X3.enum;const J3=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"]);J3.enum;const W3=d({id:Xn,projectId:Xn,name:o().trim().min(1),eventName:o().trim().min(1),googleAds:d({customerId:Xn,conversionActionId:Xn,conversionId:o().trim().min(1).optional(),conversionLabel:o().trim().min(1).optional(),campaignIds:y(Xn).max(50).default([]),requireBiddableGoal:_().default(!0),requirePrimaryAction:_().default(!0)}).strict(),gtm:d({accountId:Xn,containerId:Xn,tagId:Xn,triggerIds:y(Xn).default([]),variableIds:y(Xn).default([])}).strict(),runtime:d({verificationRequired:_().default(!0),requireTransactionId:_().default(!0),requireValue:_().default(!0),requireCurrency:_().default(!0),productionHosts:y(SL).default([])}).strict(),createdAt:o(),updatedAt:o()}).strict();W3.omit({id:!0,projectId:!0,createdAt:!0,updatedAt:!0});const eA=j(["not-run","consistent","inconsistent"]);eA.enum;const tA=j(["not-run","not-observed","observed"]);tA.enum;d({staticCheck:eA,runtimeVerificationRequired:_(),runtimeObservation:tA}).strict();const kL=d({code:J3,subject:o().trim().min(1),outcome:X3,status:Q0,evidenceIds:y(Xn).default([])}).strict(),jL=d({contract:W3,status:Q0,findings:y(kL),evaluatedAt:o()}).strict(),Qw=d({id:Xn,name:o(),detail:o(),active:_()});d({googleAds:d({customerId:Xn.nullable(),syncedAt:o().nullable(),conversionActions:y(Qw)}),gtm:d({containerId:Xn.nullable(),syncedAt:o().nullable(),tags:y(Qw)})});const jc=o().trim().min(1);function Zw(e){const n=e.trim();return/^\d{10}$/.test(n)?n:/^\d{3}-\d{3}-\d{4}$/.test(n)?n.replaceAll("-",""):null}const AL=/^[\w-]+$/;function Z0(e){const n=e.trim();return AL.test(n)?n:null}function NL(e){const n=e.trim();return/^accounts\/([\w-]+)$/.exec(n)?.[1]??Z0(n)}function CL(e,n){const s=e.trim(),r=/^accounts\/([\w-]+)\/containers\/([\w-]+)$/.exec(s);return r?r[1]===n?r[2]:null:Z0(s)}function _L(e,n,s){const r=e.trim(),u=/^accounts\/([\w-]+)\/containers\/([\w-]+)\/workspaces\/([\w-]+)$/.exec(r);return u?u[1]===n&&u[2]===s?u[3]:null:Z0(r)}function TL(e){const n=Zw(e.customerId);if(!n)return null;if(e.loginCustomerId===null)return{loginCustomerId:null,customerId:n};if(e.loginCustomerId===void 0)return{customerId:n};const s=Zw(e.loginCustomerId);return s?{loginCustomerId:s,customerId:n}:null}function EL(e){const n=NL(e.accountId);if(!n)return null;const s=CL(e.containerId,n);if(!s)return null;if(e.workspaceId===void 0)return{accountId:n,containerId:s};const r=_L(e.workspaceId,n,s);return r?{accountId:n,containerId:s,workspaceId:r}:null}const Um=j(["google-ads","gtm"]);Um.enum;d({provider:Um,publicUrl:o().url().optional(),developerToken:o().trim().min(1).max(512).optional()}).strict();d({provider:Um,authorizationUrl:o().url(),redirectUri:o().url(),expiresAt:o().nullable()}).strict();d({loginCustomerId:jc.nullable().optional(),customerId:jc}).strict().superRefine((e,n)=>{TL(e)||n.addIssue({code:fe.custom,message:"Expected ten-digit Google Ads customer IDs, with optional 3-3-4 display hyphens."})});d({accountId:jc,containerId:jc,workspaceId:jc.optional()}).strict().superRefine((e,n)=>{EL(e)||n.addIssue({code:fe.custom,message:"GTM resource paths must match the selected account and container."})});d({provider:Um,disconnected:_()}).strict();const nA=100;d({snapshots:y(v0).max(nA),nextCursor:o().nullable(),total:m().int().nonnegative()}).strict();d({snapshot:mO}).strict();d({snapshots:y(F0).max(nA),nextCursor:o().nullable(),total:m().int().nonnegative()}).strict();d({snapshot:wL}).strict();d({assessment:jL,googleAdsSnapshot:v0.nullable(),gtmSnapshot:F0.nullable()}).strict();function RL(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}d({id:o(),domain:o(),siteUrl:o().nullable().optional(),createdAt:o(),updatedAt:o()});const Df=d({id:o(),url:o(),httpCode:m().nullable().optional(),inIndex:_().nullable().optional(),lastCrawledDate:o().nullable().optional(),inIndexDate:o().nullable().optional(),inspectedAt:o(),documentSize:m().nullable().optional(),anchorCount:m().nullable().optional(),discoveryDate:o().nullable().optional()});d({summary:d({total:m(),indexed:m(),notIndexed:m(),unknown:m().optional(),percentage:ot()}),lastInspectedAt:o().nullable(),indexed:y(Df).default([]),notIndexed:y(Df).default([]),unknown:y(Df).default([]).optional()});d({query:o(),impressions:m(),clicks:m(),ctr:we(),averagePosition:m()});d({date:o(),indexed:m(),notIndexed:m(),unknown:m()});const DL=d({url:o(),status:j(["success","error"]),submittedAt:o(),error:o().optional()});d({summary:d({total:m().int().nonnegative(),succeeded:m().int().nonnegative(),failed:m().int().nonnegative()}),results:y(DL).default([])});const aA=d({url:o(),verified:_()});d({sites:y(aA).default([])});d({connected:_(),domain:o(),siteUrl:o().nullable(),createdAt:o().nullable(),updatedAt:o().nullable()});d({connected:_(),domain:o(),siteUrl:o().nullable(),availableSites:y(aA).default([])});d({siteUrl:o()});const zL=d({name:o(),alive:_(),lastUsed:o().nullable()});d({connected:_(),endpoint:o(),version:o().optional(),browserVersion:o().optional(),targets:y(zL).default([])});const Io=j(["live","staging"]);d({projectName:o(),url:o(),stagingUrl:o().optional(),username:o(),defaultEnv:Io,createdAt:o(),updatedAt:o()});const Yw=d({url:o(),reachable:_(),pageCount:m().nullable().optional(),version:o().nullable().optional(),error:o().nullable().optional(),plugins:y(o()).optional(),authenticatedUser:d({id:m(),slug:o()}).nullable().optional()});d({connected:_(),projectName:o(),defaultEnv:Io,live:Yw.nullable(),staging:Yw.nullable(),adminUrl:o().nullable().optional()});const sA=d({id:m(),slug:o(),title:o(),status:o(),modifiedAt:o().nullable().optional(),link:o().nullable().optional()});d({env:Io,pages:y(sA)});const iA=d({title:o().nullable(),description:o().nullable(),noindex:_().nullable(),writable:_().default(!1),writeTargets:y(o()).default([])}),IL=d({type:o(),json:He(o(),Sn())}),OL=sA.extend({env:Io,content:o(),seo:iA,schemaBlocks:y(IL).default([])}),Xw=OL.extend({contentHash:o(),contentSnippet:o()}),oA=d({manualRequired:R(!0),targetUrl:o(),adminUrl:o().nullable().optional(),content:o(),nextSteps:y(o()).default([])}),PL=d({slug:o(),severity:j(["high","medium","low"]),code:j(["noindex","missing-seo-title","missing-meta-description","missing-schema","thin-content"]),message:o()});d({slug:o(),title:o(),status:o(),wordCount:m(),seo:iA,schemaPresent:_(),issues:y(PL).default([])});const qL=d({slug:o(),status:j(["applied","skipped","manual"]),error:o().optional(),manualAssist:oA.optional()});d({env:Io,strategy:j(["plugin","manual"]),results:y(qL)});const ML=d({slug:o(),status:j(["deployed","stripped","skipped","failed"]),schemasInjected:y(o()).optional(),manualAssist:oA.optional(),error:o().optional()});d({env:Io,results:y(ML)});const BL=d({slug:o(),title:o(),canonrySchemas:y(o()),thirdPartySchemas:y(o()),hasCanonrySchema:_()});d({env:Io,pages:y(BL)});const LL=d({name:o(),status:j(["completed","skipped","failed"]),summary:o().optional(),error:o().optional()});d({projectName:o(),steps:y(LL)});d({slug:o(),live:Xw,staging:Xw,hasDifferences:_(),differences:d({title:_(),slug:_(),content:_(),seoTitle:_(),seoDescription:_(),noindex:_(),schema:_()})});const UL=Yj.shape.searchUnit.unwrap().enum;UL.query;const rA=d({name:o(),displayName:o().optional(),keyUrl:o().optional(),modelHint:o().optional(),model:o().optional(),defaultModel:o().optional(),configured:_(),quota:NI.optional(),vertexConfigured:_().optional()});d({configPath:o().min(1).max(4096).optional(),databasePath:o().min(1).max(4096).optional()}).strict().refine(e=>e.configPath===void 0==(e.databasePath===void 0),"configPath and databasePath must be supplied together");const VL=j(["install-identity-mismatch"]);VL.enum;d({reloaded:R(!0),providers:y(rA)});const $L=d({name:o(),displayName:o(),mode:j(["api","browser"]),modelConfigurable:_(),defaultModel:o(),knownModels:y(d({id:o(),displayName:o(),tier:j(["flagship","standard","fast","economy"])})).default([]),modelValidationPattern:d({source:o(),flags:o()}),modelValidationHint:o()}),Jw=d({configured:_()});d({providers:y(rA).default([]),providerCatalog:y($L).default([]),google:Jw,bing:Jw});const KL=j(["recorded","errored","expired","canceled","parse_failed","duplicate"]);KL.enum;const GL=j(["not_plan_run","scoped_run","probe_run","batch_unavailable","model_not_frozen"]);GL.enum;hw.standard,hw.batch;const lA=j(["all","api","browser"]);lA.enum;const HL=j(["yes","no","unknown","not-mentioned"]),Ww=y(o().min(1)),eS=d({companyName:o().min(1),domain:o().min(1),queries:Ww.optional(),phrases:Ww.optional(),competitors:y(o().min(1)).optional(),providers:y(o().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:lA.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"]})});eS.safeExtend({competitors:eS.shape.competitors.default([])});const FL=d({name:o(),count:m().int().nonnegative()}),QL=d({id:o(),name:o(),weight:m(),score:m(),findings:y(d({type:o(),message:o()})).default([]),recommendations:y(o()).default([])}),ZL=d({url:o(),finalUrl:o(),auditedAt:o(),overallScore:m(),summary:o(),factors:y(QL).default([])}),YL=d({industry:o(),summary:o(),services:y(o()).default([]),categoryTerms:y(o()).default([])}),XL=d({provider:o(),displayName:o(),model:o().nullable().optional(),mentioned:_(),cited:_(),describedAccurately:HL,accuracyNotes:o().nullable().optional(),incorrectClaims:y(o()).default([]),recommendedCompetitors:y(o()).default([]),citedDomains:y(o()).default([]),groundingSources:y(Tm).default([]),searchQueries:y(o()).default([]),answerText:o(),error:o().nullable().optional()}),JL=d({query:o(),providerResults:y(XL).default([])}),WL=d({totalQueries:m().int().nonnegative(),totalProviders:m().int().nonnegative(),totalComparisons:m().int().nonnegative(),mentionCount:m().int().nonnegative(),citationCount:m().int().nonnegative(),topCompetitors:y(FL).default([]),visibilityGap:o(),whatThisMeans:y(o()).default([]),recommendedActions:y(o()).default([])});d({companyName:o(),domain:o(),homepageUrl:o(),generatedAt:o(),queries:y(o()).default([]),competitors:y(o()).default([]),profile:YL,audit:ZL,queryResults:y(JL).default([]),summary:WL});const eU=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()}),Y0=eU.partial().shape,X0=j(["competitor","directory","social","forum","news","reference","blog","ecommerce","video","academic","other"]);X0.enum;const J0=j(["cited","aspirational","wasted-surface"]),tS=J0.enum;tS.cited,tS.aspirational;const Jc=j(["direct-competitor","ota-aggregator","editorial-media","other","unknown"]),tU=Jc.enum;tU["direct-competitor"];const Vm=j(["queued","seeding","probing","completed","failed"]);Vm.enum;const cA=d({domain:o().min(1),hits:m().int().positive(),competitorType:Jc.default("unknown")}),nU=d({id:o(),sessionId:o(),projectId:o(),query:o(),bucket:J0.nullable().default(null),citationState:Vs,citedDomains:y(o()).default([]),answerMentioned:_().nullable().default(null),createdAt:o()}),aU=d({id:o(),projectId:o(),status:Vm,icpDescription:o().nullable().optional(),seedProvider:o().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:o().nullable().optional(),locations:y(mn).nullable().optional(),seedRawCandidates:y(o()).nullable().optional(),dedupClusterMinSims:y(m()).nullable().optional(),dedupBandPairFraction:we().nullable().optional(),dedupPairsTotal:m().int().nullable().optional(),seedProviders:y(o()).nullable().optional(),seedProviderCounts:He(o(),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(cA).default([]),warning:o().nullable().optional(),error:o().nullable().optional(),startedAt:o().nullable().optional(),finishedAt:o().nullable().optional(),createdAt:o()});aU.extend({probes:y(nU).default([])});const sU=500,iU=8,oU=["gemini","openai"],rU=j(oU);d({icpDescription:o().min(1).optional(),buyerDescription:o().min(1).optional(),seedProviders:y(rU).min(1).transform(e=>[...new Set(e)].sort()).optional(),dedupThreshold:m().min(0).max(1).optional(),maxProbes:m().int().positive().max(sU).optional(),probeConcurrency:m().int().min(1).max(iU).optional(),locations:y(o().min(1)).optional()});d({buckets:y(J0).min(1).optional(),includeCompetitors:_().optional(),competitorTypes:y(Jc).min(1).optional()});const W0=d({domain:o().min(1),hits:m().int().positive(),competitorType:Jc,sources:y(cA)}),uA=j(["already-tracked","project-domain","shared-host","claimed-by-alias"]);uA.enum;const dA=W0.extend({reason:uA,message:o()});d({sessionId:o(),projectId:o(),status:Vm,queriesByBucket:d({cited:y(o()),aspirational:y(o()),"wasted-surface":y(o())}),suggestedCompetitors:y(W0),skippedCompetitors:y(dA)});d({sessionId:o(),projectId:o(),promoted:d({queries:y(o()),competitors:y(o())}),skipped:d({queries:y(o()),competitors:y(o())}),competitorDetails:d({promoted:y(W0),skipped:y(dA)})});Xe([R("cli"),o().regex(/^discovery:.+$/)]);const lU=d({query:o().min(1),probeHits:m().int().positive()}),cU=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:o(),projectId:o(),provider:o(),status:Vm,minProbeHits:m().int().positive(),anchorApplied:_(),semanticNoveltyApplied:_(),candidates:y(lU),stats:cU});const e1=j(["own","direct-competitor","ota-aggregator","editorial-media","other"]);e1.enum;const $m=j(["7d","30d","90d","all"]),nS=j(["improving","declining","stable"]),uU=j(["mentioned","cited"]);uU.enum;const Sg=d({citationRate:we(),cited:m().int(),total:m().int(),mentionRate:we(),mentionedCount:m().int()}),el=o().trim().min(1),dU=y(el).min(1).superRefine((e,n)=>{for(let s=1;s<e.length;s+=1)e[s-1]>=e[s]&&n.addIssue({code:"custom",message:"mixed model IDs must be sorted and unique",path:[s]})}),To=$e("status",[d({status:R("known"),model:el}),d({status:R("unknown")}),d({status:R("mixed"),models:dU,includesUnknown:_()})]),mU=d({observedAt:o(),bucketStartDate:o(),from:To,to:To,fromPreWindowAnchor:_().optional(),anchorObservedAt:o().optional()}),mA=d({latestObservation:d({observedAt:o(),state:To}),events:y(mU),eventTotal:m().int().nonnegative().optional(),anchorUnavailable:_().optional()}),pU=He(o(),mA),hU=mA.extend({latestServedModelIds:y(el).default([])}),fU=He(o(),hU),gU=d({observedAt:o(),configured:To,served:To}),yU=d({scope:j(["non-brand","pooled"]),rate:we().nullable(),projectMentionSnapshots:m().int().nonnegative(),competitorMentionSnapshots:m().int().nonnegative()}),bU=d({startDate:o(),endDate:o(),dataStartDate:o(),dataEndDate:o(),sweepCount:m().int().nonnegative(),citationRate:we(),cited:m().int(),total:m().int(),queryCount:m().int(),mentionRate:we(),mentionedCount:m().int(),mentionShare:yU,byProvider:He(o(),Sg),modelEvidenceByProvider:He(o(),To).default({}),basketRevision:m().int().nullable().default(null)}),zf=d({first:we(m().min(0).max(1)),latest:we(m().min(0).max(1)),delta:we(m().min(-1).max(1))}),vU=d({citationRate:zf.nullable(),mentionRate:zf.nullable(),mentionShare:zf.nullable()}),xU=d({revision:m().int(),at:o(),added:y(o()),removed:y(o())}),wU=d({date:o(),delta:m().int(),label:o()}),SU=d({at:o(),identity:S2}),t1=o().nullable().describe("When the names the project's competitors are matched by last changed: a tracked competitor's curated or stored auto-detected names (a block counts only when it removes a stored name), a detection pass that stored or removed a market-only competitor's learned names, a write that claimed, released or dropped a market-only competitor's learned names, or a published revision that renamed a market pin; null if never. The competitor landscape reads every period with the current names, so a figure for any period quoted before this time was restated at this time. Analytics mention share and project-frame visibility-compare share of voice read only tracked competitors' names, so a market pin or learned-name change moves this time without changing them. Adding or removing a competitor or a pin is a names change only when it moves a stored or learned name.");d({window:$m,mentionShareScope:j(["non-brand","pooled"]),buckets:y(bU),overall:Sg,byProvider:He(o(),Sg),trend:nS,mentionTrend:nS,windowChange:vU.default(()=>({citationRate:null,mentionRate:null,mentionShare:null})),queryChanges:y(wU),basketChanges:y(xU).default([]),executionIdentityChanges:y(SU).default([]),referenceBasketRevision:m().int().nullable().default(null),modelAttribution:pU.default({}),servedModelAttribution:fU.default({}),modelServiceMismatch:He(o(),gU).default({}),modelPointerChanges:He(o(),zB).default({}),competitorIdentityChangedAt:t1.optional()});const aS=d({category:X0,label:o(),count:m().int(),percentage:we(),topDomains:y(d({domain:o(),count:m().int()}))}),kU=d({domain:o(),rank:m().int().positive().optional(),count:m().int(),percentage:we(),answerShare:we().optional(),category:X0,label:o(),surfaceClass:e1}),jU=d({surfaceClass:e1,label:o(),count:m().int(),percentage:we(),domainCount:m().int()}),sS=d({totalCitedSlots:m().int(),answerTotal:m().int().optional(),answersWithSources:m().int().optional(),domainTotal:m().int(),entries:y(kU),truncatedDomainCount:m().int(),truncatedCitedSlots:m().int(),bySurfaceClass:y(jU)}),AU=d({answers:y(o()),distinctDomains:y(o()),answerDomainPairs:y(o()),runs:y(o())}),NU=j(["measurement-plan","query-text"]);d({runId:o().trim().min(1).optional(),queryClass:w0.optional(),includeByQuery:j(["true","false","1","0"]).optional()});d({ranked:sS,byProvider:He(o(),sS),providersWithoutSources:y(o()).optional(),answerTotal:m().int().optional(),runCount:m().int().optional(),pooledAcrossRuns:_().optional(),unclassifiedAnswers:m().int().optional(),filters:d({runId:o().nullable(),queryClass:w0,queryClassBasis:Xe([NU,de()]),includeByQuery:_()}).optional(),runId:o(),runIds:y(o()).optional(),countUnits:AU.optional(),window:$m,limit:m().int().nullable(),overall:y(aS),byQuery:He(o(),y(aS)).optional()});const CU=j(["own","direct-competitor","ota-aggregator","editorial-media","other","unknown"]),_U=$e("kind",[d({kind:R("project")}).strict(),d({kind:R("group"),groupKey:o().trim().min(1)}).strict(),d({kind:R("all-markets")}).strict()]),pA=j(["all","branded","non-brand"]),hA=j(["project","all-markets"]);d({window:$m.optional(),groupKey:o().trim().min(1).optional(),scope:hA.optional(),provider:o().trim().min(1).optional(),model:el.optional(),groupBy:R("model").optional(),queryClass:pA.optional(),location:o().trim().min(1).optional(),runId:o().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 Ci=d({domain:o().trim().min(1),label:o().trim().min(1),surfaceClass:CU,pinned:_(),mentionCount:m().int().nonnegative(),shareOfVoice:ot(m().min(0).max(100)).nullable(),citationCount:m().int().nonnegative(),answeredResults:m().int().nonnegative(),firstSeenAt:o().datetime().nullable(),lastSeenAt:o().datetime().nullable(),sampleUrls:y(o().url()).max(3)}).strict(),fA=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(),TU=d({answers:y(o()),distinctNames:y(o()),runs:y(o())}).strict(),EU=50,RU=d({...Y0,comparison:y(d({domain:o(),mentions:m().int().nonnegative()})).optional(),observedNames:y(d({name:o(),answerCount:m().int().nonnegative()})).optional(),observedNamesTotal:m().int().nonnegative().optional(),provider:o().trim().min(1),model:el.nullable(),servedModels:To,snapshotCount:m().int().positive(),project:Ci,pinned:y(Ci),observed:y(Ci),otherSources:y(Ci),evidence:fA,truncated:_()}).strict(),DU=d({basis:R("requested-model"),groups:y(RU).max(EU),totalGroups:m().int().nonnegative(),truncated:_()}).strict();d({...Y0,comparison:y(d({domain:o(),mentions:m().int().nonnegative()})).optional(),observedNames:y(d({name:o(),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:$m,scope:_U,project:Ci,pinned:y(Ci),observed:y(Ci),otherSources:y(Ci),evidence:fA,modelComparison:DU.optional(),marketState:d({activeRevision:m().int().positive(),draft:d({etag:o().trim().min(1),pendingCompetitorDomains:y(o().trim().min(1))}).strict().nullable()}).strict().nullable(),filters:d({scope:hA,groupKey:o().nullable(),provider:o().nullable(),model:el.optional(),groupBy:R("model").optional(),queryClass:pA,location:o().nullable(),runId:o().nullable(),answers:j(["all","not-mentioned"]).optional()}).strict(),truncated:_(),runCount:m().int().nonnegative().optional(),runIds:y(o()).optional(),countUnits:TU.optional(),competitorIdentityChangedAt:t1.optional()}).strict();const n1=d({total:m().int(),checked:m().int(),mentioned:m().int(),cited:m().int(),mentionRate:we().nullable(),citedRate:we().nullable()}),gA=n1.extend({provider:o(),firstObserved:o(),lastObserved:o()}),zU=n1.extend({queryId:o().nullable(),query:o(),firstObserved:o(),lastObserved:o(),providers:y(gA).optional()}),IU=d({since:o().nullable(),until:o().nullable(),lastRuns:m().int().nullable(),runCount:m().int()}),OU=j(["provider"]),kg=d({domain:o(),mentions:m().int()}),PU=d({...Y0,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(kg)});d({project:o(),groupBy:OU.optional(),window:IU,totals:n1,byProvider:y(gA).optional(),queries:y(zU),shareOfVoice:PU.optional()});const qU=j(["within-noise","moved","insufficient-data","model-discontinuous","model-unknown"]),MU=j(["up","down","flat"]),iS=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()}),BU=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"]),LU=d({key:BU,label:o(),queryClass:j(["all","branded","non-brand","pooled"]),driftRobust:_(),from:iS,to:iS,rateRatio:m().nullable(),direction:Xe([MU,de()]),verdict:qU}),am=d({month:o(),since:o(),until:o(),runCount:m().int(),lowRunCount:_()}),yA=d({queryCount:m().int(),excludedFromOnly:m().int(),excludedToOnly:m().int(),providers:y(o()),excludedProviders:y(o())}),bA=d({provider:o(),fromModels:y(o()),toModels:y(o())}),UU=j(["included","model-discontinuous","model-unknown"]),VU=d({provider:o(),status:UU,fromModels:y(o()),toModels:y(o())}),$U=j(["comparable","model-discontinuous","model-unknown","insufficient-data"]),vA=d({status:$U,comparedProviders:y(o()),providers:y(VU)}),KU=d({provider:o(),from:d({checked:m().int(),mentioned:m().int(),cited:m().int()}),to:d({checked:m().int(),mentioned:m().int(),cited:m().int()})}),GU=d({from:d({count:m().int(),of:m().int()}),to:d({count:m().int(),of:m().int()})}),HU=d({scope:j(["project","group","market","property"]).optional(),scopeKey:o().min(1).optional(),marketKey:o().min(1).optional(),provider:o().min(1).optional(),location:o().min(1).optional()}),FU=d({from:am,to:am,basket:yA,continuity:vA,modelChanges:y(bA)});d({project:o(),selection:HU.optional(),classComparison:FU.optional(),from:am,to:am,basket:yA,metrics:y(LU),queriesMentioned:GU,byProvider:y(KU),modelChanges:y(bA),continuity:vA,competitors:d({from:y(kg),to:y(kg)}),competitorIdentityChangedAt:t1.optional()});j(["json","csv"]);const QU=d({runId:o(),runKind:R("answer-visibility"),runStatus:ha,runTrigger:R0,runCreatedAt:o(),runStartedAt:o().nullable(),runFinishedAt:o().nullable(),snapshotId:o(),snapshotCreatedAt:o(),queryId:o().nullable(),query:o().nullable(),provider:o(),model:o().nullable(),location:o().nullable(),citationState:Vs,cited:_(),answerMentioned:_().nullable(),mentionState:Xe([Ic,de()]),citedDomains:y(o()),citedUrls:y(o()).nullable(),captureStatus:Xe([Am,de()]),sourceCount:m().int().nonnegative().nullable(),resolvedCount:m().int().nonnegative().nullable(),captureVersion:m().int().positive().nullable(),competitorOverlap:y(o()),recommendedCompetitors:y(o()),answerText:o().nullable(),groundingSources:y(Tm),searchQueries:y(o())}),ZU=d({since:o().nullable(),until:o().nullable(),includeProbes:_()});d({schemaVersion:R("canonry.results-export/v1"),generatedAt:o(),project:d({id:o(),name:o(),displayName:o(),canonicalDomain:o(),country:o(),language:o()}),filters:ZU,recordCount:m().int().nonnegative(),records:y(QU)});d({runIds:y(o().trim().min(1)).max(100).default([]),researchRunIds:y(o().trim().min(1)).max(100).default([]),confirm:_().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:_(),runIds:y(o()),researchRunIds:y(o()),querySnapshots:m().int().nonnegative(),researchQueries:m().int().nonnegative(),insights:m().int().nonnegative(),healthSnapshots:m().int().nonnegative()});const Km=j(["organic","paid"]);Km.enum;d({id:o(),projectId:o(),propertyId:o(),clientEmail:o(),connected:_(),createdAt:o(),updatedAt:o()});d({date:o(),landingPage:o(),sessions:m(),organicSessions:m(),users:m()});const a1=j(["session","first_user","manual_utm"]),YU=d({source:o(),medium:o(),trafficClass:Km,sessions:m(),users:m().optional(),sourceDimension:a1,share:we()}),XU=d({source:o(),medium:o(),trafficClass:Km,sourceDimension:a1,landingPage:o(),sessions:m(),users:m().optional()}),JU=d({source:o(),medium:o(),sessions:m(),users:m().optional(),channelGroup:o(),share:we()}),mc=d({sessions:m(),sharePct:ot(),sharePctDisplay:o()}),WU=d({organic:mc,social:mc,direct:mc,ai:mc,other:mc}),eV=d({totalSessions:m(),totalOrganicSessions:m(),totalDirectSessions:m(),totalUsers:m().nullable(),topPages:y(d({landingPage:o(),sessions:m(),organicSessions:m(),directSessions:m(),users:m(),organicShare:we().nullable()})),aiReferrals:y(YU),aiReferralLandingPages:y(XU),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(JU),socialSessions:m(),socialUsers:m().optional(),channelBreakdown:WU,organicSharePct:ot(),aiSharePct:ot(),aiSharePctBySession:ot(),paidAiSharePct:ot(),paidAiSharePctBySession:ot(),organicAiSharePct:ot(),organicAiSharePctBySession:ot(),directSharePct:ot(),socialSharePct:ot(),organicSharePctDisplay:o(),aiSharePctDisplay:o(),aiSharePctBySessionDisplay:o(),paidAiSharePctDisplay:o(),paidAiSharePctBySessionDisplay:o(),organicAiSharePctDisplay:o(),organicAiSharePctBySessionDisplay:o(),directSharePctDisplay:o(),socialSharePctDisplay:o(),otherSessions:m(),otherSharePct:ot(),otherSharePctDisplay:o(),lastSyncedAt:o().nullable()});d({connected:_(),propertyId:o().nullable(),clientEmail:o().nullable(),authMethod:j(["service-account","oauth"]).nullable(),lastSyncedAt:o().nullable(),createdAt:o().nullable().optional(),updatedAt:o().nullable().optional()});const tV=d({propertyId:o(),displayName:o(),accountName:o()});d({properties:y(tV)});const s1=j(["7d","28d","90d"]),Kne=s1.options,Gne="28d",nV="(empty)";function Hne(e){return e===""?nV:e}const Fne=1e3,aV=j(["never-synced","ready","unavailable","error"]),xA=d({organicGoogleSearchClicks:m().int().nonnegative(),organicGoogleSearchImpressions:m().int().nonnegative(),organicGoogleSearchClickThroughRate:we(m().min(0).max(1)).nullable(),organicGoogleSearchAveragePosition:m().nonnegative().nullable(),activeUsers:m().int().nonnegative()}),sV=xA.extend({landingPage:o()});d({source:R("ga4-search-console-link"),status:aV,error:o().nullable(),syncedAt:o().datetime().nullable(),attemptedAt:o().datetime().nullable(),window:s1,windowStart:Gd().nullable(),windowEnd:Gd().nullable(),windowDays:m().int().positive().nullable(),timeZone:o().nullable(),subjectToThresholding:_(),dataLossFromOtherRow:_(),total:xA.nullable(),reportRowCount:m().int().nonnegative().nullable(),rowsCapped:_(),totalRows:m().int().nonnegative(),limit:m().int().positive(),offset:m().int().nonnegative(),rows:y(sV)});function Qne(e){return e.organicGoogleSearchClicks>0||e.organicGoogleSearchImpressions>0}const iV=d({status:j(["ready","unavailable","error"]),windows:y(d({window:s1,rowCount:m().int().nonnegative(),reportRowCount:m().int().nonnegative(),rowsCapped:_()})),rowCount:m().int().nonnegative(),error:o().optional()});j(["traffic","ai","social","search-landing"]);d({synced:_(),rowCount:m().int().nonnegative(),aiReferralCount:m().int().nonnegative(),socialReferralCount:m().int().nonnegative(),days:m().int().nonnegative(),requestedDays:m().int().nonnegative(),clamped:_(),syncedAt:o(),measurement:d({acquisition:d({days:m().int().nonnegative(),status:j(["ready","error"]),rowCount:m().int().nonnegative(),error:o().optional()}),leads:d({days:m().int().nonnegative(),status:j(["ready","error","not-configured"]),rowCount:m().int().nonnegative(),attributionScope:j(["landing-page","channel"]).optional(),error:o().optional()}),searchLandingPages:iV.optional()}),syncedComponents:y(o()).optional()});const wA=j(["new","small-base","percent"]);wA.enum;const jg=d({source:o(),sessions7d:m(),sessionsPrev7d:m(),changeSessions:m(),changePct:ot().nullable(),changeBasis:wA});d({socialSessions7d:m(),socialSessionsPrev7d:m(),trend7dPct:ot().nullable(),socialSessions30d:m(),socialSessionsPrev30d:m(),trend30dPct:ot().nullable(),biggestMover:jg.nullable()});const pc=d({sessions7d:m(),sessionsPrev7d:m(),trend7dPct:ot().nullable(),sessions30d:m(),sessionsPrev30d:m(),trend30dPct:ot().nullable()});d({organic:pc,ai:pc,social:pc,direct:pc,total:pc,aiBiggestMover:jg.nullable(),socialBiggestMover:jg.nullable()});eV.extend({windowStart:o().nullable(),windowEnd:o().nullable(),windowDays:m().nullable(),periodStart:o().nullable(),periodEnd:o().nullable()});d({date:o(),source:o(),medium:o(),trafficClass:Km,landingPage:o(),sessions:m(),users:m(),sourceDimension:a1});const oV=d({source:o(),sessions:m(),paidSessions:m(),organicSessions:m()}),rV=d({date:o(),sessions:m(),paidSessions:m(),organicSessions:m(),bySource:y(oV)});d({days:y(rV),sources:y(o()),totalSessions:m(),totalPaidSessions:m(),totalOrganicSessions:m()});d({date:o(),source:o(),medium:o(),sessions:m(),users:m(),channelGroup:o()});d({date:o(),sessions:m(),organicSessions:m(),users:m(),usersSource:j(["deduplicated","landing-page-sum"])});d({id:o(),projectId:o(),runId:o().nullable(),overallCitedRate:we(),overallMentionRate:we(),totalPairs:m().int().nonnegative(),citedPairs:m().int().nonnegative(),mentionedPairs:m().int().nonnegative(),providerBreakdown:He(o(),d({citedRate:we(),mentionRate:we(),cited:m().int().nonnegative(),mentioned:m().int().nonnegative(),total:m().int().nonnegative()})),createdAt:o(),status:j(["ready","no-data"]),reason:R("no-runs-yet").optional()});const lV=d({view:j(["project","visibility","property","queries","site-health"]),unavailableReason:o().trim().min(1).max(512).optional(),selection:Xd.optional(),page:d({runId:o().trim().min(1).max(256).optional(),nodeKey:o().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."})}),cV=d({maxToolCalls:m().int().min(1).max(100).default(30),timeoutMs:m().int().min(1e3).max(6e5).default(18e4)}).strict(),i1=j(["claude","openai","gemini","zai"]),uV=d({id:i1,label:o(),defaultModel:o(),configured:_(),keySource:j(["config","env"]).nullable()});d({providers:y(uV).default([]),defaultProvider:i1.nullable()});const dV=j(["aero","user","compaction"]);dV.enum;const SA=128;d({key:o().min(1).max(SA),value:o().min(1)});d({key:o().min(1).max(SA)});d({prompt:o().trim().min(1),conversationId:o().min(1).nullable().optional(),provider:i1.optional(),modelId:o().trim().min(1).optional(),scope:j(["all","read-only"]).optional(),profile:j(["default","ads-operator"]).optional(),context:lV.optional(),limits:cV.optional()});const mV=tI({role:o(),content:Sn().optional()}),kA=d({id:o(),title:o(),active:_(),modelProvider:o(),modelId:o(),createdAt:o(),updatedAt:o()});kA.extend({messages:y(mV),isStreaming:_()});d({conversations:y(kA),currentConversationId:o().nullable(),nextOffset:m().int().nullable()});d({id:Rz()}).strict();d({id:o(),status:R("deleted")});const pV=["status","changes","gaps","insights"],hV=j(pV),fV=d({text:o().optional(),tool:d({name:o(),label:o(),arguments:He(o(),Sn()),result:Sn(),durationMs:m().int().nonnegative()})}),gV=d({id:hV,steps:y(fV),answer:o()});d({project:o(),seededAt:o(),starters:y(gV)});d({offset:Us().int().min(0).default(0),limit:Us().int().min(1).max(100).default(50)}).strict();const tl=j(["commoncrawl","bing-webmaster"]);tl.enum;const o1=j(["queued","downloading","querying","ready","failed"]);o1.enum;d({id:o(),release:o(),status:o1,phaseDetail:o().nullable().optional(),vertexPath:o().nullable().optional(),edgesPath:o().nullable().optional(),vertexSha256:o().nullable().optional(),edgesSha256:o().nullable().optional(),vertexBytes:m().int().nullable().optional(),edgesBytes:m().int().nullable().optional(),projectsProcessed:m().int().nullable().optional(),domainsDiscovered:m().int().nullable().optional(),downloadStartedAt:o().nullable().optional(),downloadFinishedAt:o().nullable().optional(),queryStartedAt:o().nullable().optional(),queryFinishedAt:o().nullable().optional(),error:o().nullable().optional(),createdAt:o(),updatedAt:o()});const yV=d({linkingDomain:o(),numHosts:m().int(),source:tl}),bV=d({projectId:o(),release:o(),targetDomain:o(),totalLinkingDomains:m().int(),totalHosts:m().int(),top10HostsShare:o(),queriedAt:o(),source:tl,excludedLinkingDomains:m().int().optional(),excludedHosts:m().int().optional()});d({source:tl,summary:bV.nullable(),total:m().int(),rows:y(yV)});d({release:o(),totalLinkingDomains:m().int(),totalHosts:m().int(),top10HostsShare:o(),queriedAt:o(),source:tl});const vV=d({source:tl,connected:_(),hasData:_(),latestRelease:o().nullable(),totalLinkingDomains:m().int(),lastSyncedAt:o().nullable()});d({projectId:o(),targetDomain:o(),sources:y(vV),anyConnected:_(),anyData:_()});d({duckdbInstalled:_(),duckdbVersion:o().nullable().optional(),duckdbSpec:o(),pluginDir:o()});d({installed:_(),version:o(),path:o(),alreadyPresent:_()});d({release:o(),vertexUrl:o(),edgesUrl:o(),vertexBytes:m().int().nullable(),edgesBytes:m().int().nullable(),lastModified:o().nullable()});d({release:o(),syncStatus:o1.nullable(),bytes:m().int(),lastUsedAt:o().nullable()});const xV="jev-1.13.0",Pe=o().trim().min(1).max(256),At=m().int().nonnegative(),jA=rs(e=>typeof e=="string"?[e]:e,y(Pe).min(1).max(100)),Pd=we(m().min(0).max(1)).nullable(),Ks=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"]);Ks.enum;const r1=j(["disabled","not-measured","processing","partial","complete","failed","canceled","unsupported"]),l1=d({schemaVersion:Xe([R(1),R(2)]),requestedModel:R(xV),verdictVersion:Pe,identityVersion:Pe,evidenceVersion:Pe,segmentationVersion:Pe,preprocessingVersion:Pe,languagePolicy:R("en-only"),comparisonMethodVersion:R("wilson-independent-v1"),confidenceThreshold:m().min(0).max(1).nullable(),questions:d({identity:o(),judgment:o(),stance:o(),conclusion:o(),complaint:o()}).strict()}).strict();function AA(e){if(typeof e!="object"||e===null||!("schemaVersion"in e)||e.schemaVersion!==1)return e;const n=Object.fromEntries(Object.entries(e).filter(([s])=>s!=="themes"));return typeof n.questions=="object"&&n.questions!==null&&(n.questions=Object.fromEntries(Object.entries(n.questions).filter(([s])=>s!=="theme"))),n}rs(AA,l1);const NA=d({id:Pe,displayName:o(),aliases:y(o()),qualifiedAliases:y(o()).default([]),urls:y(o()),mentionNotApplicable:_()}).strict(),wV=d({queryId:Pe,executionNodeKey:Pe.nullable(),targetId:Pe,propertyId:Pe.nullable(),groupId:Pe.nullable(),marketId:Pe.nullable(),queryClass:j(["branded","non-brand"]),queryText:o().optional(),location:o().nullable()}).strict(),CA=d({queryId:Pe,queryText:o(),queryClass:j(["branded","non-brand"]),provider:Pe,requestedModel:o().nullable(),servedModel:o().nullable(),location:o().nullable(),revision:m().int().nullable(),usageEdges:y(wV),locationContext:mn.nullable().default(null)}).strict(),Pc=d({id:Pe,text:o().min(1),start:At,end:At}).strict(),_A=d({kind:j(["reported","estimated","unknown"]),inputTokens:At.nullable(),outputTokens:At.nullable()}).strict(),SV=d({sourceSnapshotId:Pe,sourceText:o(),sourceTextHash:Pe,subject:NA,subjectHash:Pe,context:CA,language:o(),definition:l1,sentences:y(Pc)}).strict();rs(e=>typeof e!="object"||e===null||!("definition"in e)?e:{...e,definition:AA(e.definition)},SV);const If={returnedModel:o().nullable(),usage:_A},kV=$e("kind",[d({kind:R("classified"),...If,returnedModel:o(),outcome:Ks,conclusion:y(Pc),complaint:y(Pc).nullable(),confidence:m().min(0).max(1).nullable()}).strict(),d({kind:R("abstained"),...If,outcome:Ks,reason:o()}).strict(),d({kind:R("failed"),...If,outcome:R("failed"),error:d({code:Pe,message:o(),retryable:_(),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"})});rs(e=>typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e).filter(([n])=>n!=="themes")):e,kV);const nl=d({runId:Pe.optional(),runIds:jA.optional(),revision:Us().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:Pe.optional(),scopeKey:Pe.optional(),marketKey:Pe.optional(),provider:Pe.optional(),model:Pe.optional(),location:o().min(1).optional(),evaluationDefinitionId:Pe.optional(),executionNodeKey:Pe.optional()}).strict();function Wc(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."})}nl.superRefine(Wc);const jV=j(["assessments","locations"]),AV=25,TA=500;nl.extend({include:rs(e=>typeof e=="string"?e.split(",").map(n=>n.trim()).filter(Boolean):e,y(jV).max(2)).optional(),queryLimit:Us().int().min(1).max(TA).default(AV),queryCursor:o().min(1).max(16384).optional()}).superRefine(Wc);const NV=rs(e=>{const n=typeof e=="string"?[e]:Array.isArray(e)?e:null;return n?[...new Set(n.flatMap(s=>typeof s=="string"?s.split(",").map(r=>r.trim()).filter(Boolean):[s]))]:e},y(Ks).min(1).max(Ks.options.length));nl.extend({assessmentId:Pe.optional(),outcome:NV.optional(),cursor:o().min(1).max(16384).optional(),limit:Us().int().min(1).max(100).default(50)}).superRefine(Wc);nl.extend({fromRunId:Pe.describe("Run ID or previous-rated to select the preceding run with stored ratings in this scope."),toRunId:Pe}).superRefine((e,n)=>{Wc(e,n),e.runIds&&n.addIssue({code:"custom",path:["runIds"],message:"Comparison requires one explicit run per period."})});const c1=nl.extend({runId:Pe.nullable(),revision:m().int().nullable(),evaluationDefinitionId:Pe.nullable(),mode:j(["simple","advanced"])}),u1=d(Object.fromEntries(Ks.options.map(e=>[e,At]))).strict(),CV=d({selected:At,eligibleAssessments:At,unadmittedAssessments:At,judged:At,distinctSourceAnswers:At,eligibleAnswers:At.optional(),ratedAnswers:At.optional(),ratedAnswerRate:Pd.optional(),subjectNotMentioned:At.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:u1,expectedProviderSlots:At,completedProviderSlots:At}).strict(),_V=d({favorableRate:Pd,mixedRate:Pd,unfavorableRate:Pd,favorableDisplay:o(),mixedDisplay:o(),unfavorableDisplay:o(),interval:d({low:m(),high:m()}).strict().nullable(),method:R("wilson-independent-v1"),limitation:o()}).strict(),Ur={state:r1,reason:o().nullable(),provisional:_(),coverage:CV,score:_V},oS=d({...Ur,selection:c1,runIds:y(Pe)}).strict(),rS=d({...Ur,queryClass:R("all"),pooled:R(!0).optional(),runIds:y(Pe)}).strict(),TV=d({configured:_(),branded:oS,nonBrand:oS,headlineQueryClass:R("branded").optional(),pooledOverall:rS.optional(),overall:rS.optional().describe("Deprecated compatibility field. Pooled branded and non-brand assessments; never use as the sentiment headline.")}).strict(),EV=d({assessmentId:Pe.nullable(),sourceSnapshotId:Pe,runId:Pe,subjectId:Pe,subjectLabel:o(),executionNodeKey:Pe.nullable(),provider:Pe,requestedModel:o().nullable(),servedModel:o().nullable(),location:o().nullable(),evaluationDefinitionId:Pe.nullable(),state:r1,outcome:Xe([Ks,de()]),reason:o().nullable()}).strict(),RV=d({...Ur,queryId:Pe,executionNodeKey:Pe.nullable().optional(),queryText:o(),queryClass:j(["branded","non-brand"]),sourceSnapshotIds:y(Pe),assessments:y(EV).default([]),locations:y(d({...Ur,location:o().nullable(),sourceSnapshotIds:y(Pe)}).strict())}).strict(),DV=d({...Ur,dimension:j(["provider","property","market","query"]),key:o(),label:o(),queryClass:j(["branded","non-brand"])}).strict(),Ag=d({...Ur,configured:_(),selection:c1,evaluationDefinition:l1.nullable(),breakdowns:y(DV),queries:y(RV),criticizedProperties:d({total:At,keys:y(o())}).strict().optional(),queryPage:d({total:At,limit:At,nextCursor:o().nullable()}).strict().optional()}).strict();d({enabled:_().optional()}).strict();const zV=d({installEnabled:_(),enabled:_(),ready:_(),readinessReasons:y(o()),model:o(),enablementEpoch:At,completionBoundary:At,evaluationDefinitionId:Pe.nullable(),actions:d({configure:_(),backfill:_()}).strict(),experimental:R(!0),disclosure:o()}).strict(),EA=nl.extend({runIds:jA.optional(),from:o().datetime().optional(),to:o().datetime().optional()}).superRefine(Wc);d({previewToken:o().min(1).max(65536),idempotencyKey:o().trim().min(1).max(128)}).strict();const IV=d({previewToken:o().nullable(),expiresAt:o().nullable(),selection:EA,evaluationDefinitionId:Pe.nullable(),eligibleAssessments:At,alreadyClassified:At,skipped:y(d({runId:Pe,reason:o(),count:At}).strict()),estimatedInputTokens:At,estimatedCostUsd:m().nonnegative().nullable(),estimateMethod:o()}).strict(),OV=j(["pending","running","waiting-to-retry","complete","partial","failed","canceled"]),PV=d({id:Pe,workItemId:Pe,dispatchedAt:o(),completedAt:o().nullable(),returnedModel:o().nullable(),usage:_A,errorCode:o().nullable()}).strict(),RA=d({id:Pe,projectId:Pe,origin:j(["automatic","backfill"]),state:OV,enablementEpoch:At,evaluationDefinitionId:Pe,selection:EA,createdAt:o(),updatedAt:o(),counts:u1,selected:At,cancellationReason:o().nullable(),attempts:y(PV),attemptCount:At.optional(),nextAttemptCursor:o().nullable().optional()}).strict(),qV=RA.omit({attempts:!0,attemptCount:!0,nextAttemptCursor:!0}).extend({attemptCount:At}).strict(),MV=d({jobs:y(qV)}).strict(),BV=50;d({attemptLimit:Us().int().min(1).max(200).default(BV),attemptCursor:o().min(1).max(4096).optional()}).strict();const LV=d({assessmentId:Pe,runId:Pe,sourceSnapshotId:Pe,sourceText:o(),sourceTextHash:Pe,subject:NA,subjectHash:Pe,context:CA,evaluationDefinitionId:Pe,outcome:Ks,conclusion:y(Pc),complaint:y(Pc).nullable(),returnedModel:o().nullable(),reason:o().nullable()}).strict(),UV=d({state:r1,selection:c1.extend({assessmentId:Pe.optional(),outcome:y(Ks).optional()}),items:y(LV),nextCursor:o().nullable()}).strict(),VV=d({from:Ag,to:Ag,verdict:j(["improved","declined","no-clear-change"]).nullable(),favorableRateDelta:m().nullable(),refusalReasons:y(o()),commonUnits:At,excludedFrom:At,excludedTo:At,changedScope:_(),method:R("wilson-independent-v1"),limitation:o()}).strict(),d1=j(["positive","caution","negative","neutral"]),Ni=d({label:o(),value:o(),delta:o(),tone:d1,description:o(),tooltip:o().optional(),trend:y(ot()),progress:ot().optional(),providerCoverage:o().optional()}),lS=d({projectMentionSnapshots:m().int().nonnegative(),competitorMentionSnapshots:m().int().nonnegative(),combinedMentionSnapshots:m().int().nonnegative(),perCompetitor:y(d({domain:o(),mentionSnapshots:m().int().nonnegative(),shareOfCompetitiveTotal:ot()})),ranking:y(d({kind:j(["project","competitor"]),domain:o().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()}),$V=Ni.extend({breakdown:lS,scope:j(["non-brand","pooled"]),branded:lS}),Of=d({gained:m().int().nonnegative(),lost:m().int().nonnegative(),tone:d1,hasPreviousRun:_(),gainedQueries:y(o()).optional(),lostQueries:y(o()).optional()}),KV=d({hasPreviousRun:_(),comparable:_(),querySetChanged:_(),previousRunAt:o().nullable(),currentQueryCount:m().int().nonnegative(),previousQueryCount:m().int().nonnegative(),comparableQueryCount:m().int().nonnegative(),addedQueryCount:m().int().nonnegative(),removedQueryCount:m().int().nonnegative(),addedQueries:y(o()),removedQueries:y(o())}),GV=d({id:o(),projectId:o(),runId:o().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:o(),query:o(),provider:o(),recommendation:d({action:o(),target:o().optional(),reason:o()}).optional(),cause:d({cause:o(),competitorDomain:o().optional(),details:o().optional()}).optional(),dismissed:_(),createdAt:o()}),HV=d({id:o(),projectId:o(),runId:o().nullable(),overallCitedRate:we(),overallMentionRate:we(),totalPairs:m().int().nonnegative(),citedPairs:m().int().nonnegative(),mentionedPairs:m().int().nonnegative(),providerBreakdown:He(o(),d({citedRate:we(),mentionRate:we(),cited:m().int().nonnegative(),mentioned:m().int().nonnegative(),total:m().int().nonnegative()})),createdAt:o(),status:j(["ready","no-data"]),reason:R("no-runs-yet").optional()});d({sentiment:TV.optional(),project:uq,latestRun:SP,health:HV.nullable(),topInsights:y(GV),queryClassScope:d({queryClass:R("all"),figures:y(o()),note:o()}).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:o(),citedRate:we(),cited:m().int().nonnegative(),total:m().int().nonnegative()})),transitions:d({since:o().nullable(),gained:m().int().nonnegative(),lost:m().int().nonnegative(),emerging:m().int().nonnegative()}),scores:d({mention:Ni,visibility:Ni,mentionShare:$V,gapQueries:Ni,mentionGaps:Ni,indexCoverage:Ni,competitorPressure:Ni,runStatus:Ni}),movementSummary:Of,citationMovement:Of,mentionMovement:Of,movementComparison:KV,competitors:y(d({id:o(),domain:o(),aliases:y(o()).optional(),autoAliasNames:y(o()).optional(),citationCount:m().int().nonnegative(),totalQueries:m().int().nonnegative(),pressureLabel:j(["None","Low","Moderate","High"]),citedQueries:y(o())})),providerScores:y(d({provider:o(),model:o().nullable(),score:ot(),cited:m().int().nonnegative(),total:m().int().nonnegative(),trend:y(ot()).optional()})),attentionItems:y(d({id:o(),tone:d1,title:o(),detail:o(),actionLabel:o(),href:o()})),runHistory:y(d({runId:o(),createdAt:o(),citedCount:m().int().nonnegative(),totalCount:m().int().nonnegative(),citationRate:ot(),mentionedCount:m().int().nonnegative(),mentionRate:ot(),status:o()})),suggestedQueries:d({rows:y(d({query:o(),impressions:m(),clicks:m(),avgPosition:m(),reason:o()})),totalCandidates:m().int().nonnegative(),skippedAlreadyTracked:m().int().nonnegative()}),dateRangeLabel:o(),contextLabel:o()});j(["snapshot","insight"]);const FV=d({kind:R("snapshot"),id:o(),runId:o(),query:o(),provider:o(),model:o().nullable(),citationState:Vs,matchedField:j(["answerText","citedDomains","citedUrls","searchQueries","query"]),snippet:o(),createdAt:o()}),QV=d({kind:R("insight"),id:o(),runId:o().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:o(),query:o(),provider:o(),matchedField:j(["title","query","recommendation","cause"]),snippet:o(),dismissed:_(),createdAt:o()}),ZV=$e("kind",[FV,QV]);d({query:o(),totalHits:m().int().nonnegative(),truncated:_(),hits:y(ZV)});const DA=j(["create","expand","refresh","add-schema"]);DA.enum;const zA=j(["gsc","competitor-evidence","both"]);zA.enum;const IA=j(["high","medium","low"]);IA.enum;const YV=j(["blog-post","comparison","listicle","how-to","guide","glossary"]);YV.enum;const OA=j(["proposed","briefed","payload-generated","draft-created","published","validated","dismissed"]);OA.enum;const m1=j(["ownable","ceded"]);m1.enum;const XV=d({url:o(),gscImpressions:m().nonnegative(),gscClicks:m().nonnegative(),gscAvgPosition:m().nonnegative().nullable(),organicSessions:m().nonnegative()}),JV=d({domain:o(),url:o(),title:o(),citationCount:m().int().nonnegative()}),WV=d({demand:m(),competitor:m(),absence:m(),gapSeverity:m()}),e$=d({actionId:o(),state:OA,lastUpdated:o()}),t$=d({targetRef:o(),query:o(),action:DA,ourBestPage:XV.nullable(),winningCompetitor:JV.nullable(),score:m(),scoreBreakdown:WV,drivers:y(o()),demandSource:zA,actionConfidence:IA,existingAction:e$.nullable(),winnabilityClass:m1,winnability:we(m().min(0).max(1)).nullable()});d({targets:y(t$),contextMetrics:d({totalAiReferralSessions:m().int().nonnegative(),latestRunId:o(),runTimestamp:o()})});const n$=d({targetRef:o(),addressedUrl:o().nullable(),note:o().nullable(),dismissedAt:o()});d({dismissals:y(n$)});d({targetRef:o().min(1),addressedUrl:o().url().optional(),note:o().max(500).optional()});d({targetRef:o(),promptVersion:o(),provider:o(),model:o(),responseText:o(),costMillicents:m().int().nonnegative(),generatedAt:o()});d({provider:o().optional(),model:o().optional(),forceRefresh:_().optional()});const a$=d({targetQuery:o().trim().min(1),winnabilityClass:m1,angle:o().trim().min(1),whyWinnable:o().trim().min(1),schemaHookup:o().trim().min(1),controllableSurfaceRationale:o().trim().min(1)});d({targetRef:o(),promptVersion:o(),provider:o(),model:o(),brief:a$,costMillicents:m().int().nonnegative(),generatedAt:o()});const s$=d({domain:o(),competitorType:Jc,hits:m().int().nonnegative(),updatedAt:o()});d({classifications:y(s$)});const i$=d({uri:o(),title:o(),domain:o(),isOurDomain:_(),isCompetitor:_(),citationCount:m().int().nonnegative(),providers:y(St)}),o$=d({query:o(),groundingSources:y(i$)});d({sources:y(o$),latestRunId:o()});const r$=d({query:o(),competitorDomains:y(o()),competitorCount:m().int().nonnegative(),missRate:we(m().min(0).max(1)),lastSeenInRunId:o()});d({gaps:y(r$),latestRunId:o()});const PA=j(["ok","warn","fail","skipped"]);PA.enum;const p1=j(["global","project"]);p1.enum;const qA=j(["auth","config","providers","integrations","database","schedules","agent"]);qA.enum;const MA=j(["health","silent"]);MA.enum;const l$=o().regex(/^[1-9]\d{3}-(0[1-9]|1[0-2])$/,"Expected YYYY-MM"),c$=d({id:o(),category:qA,scope:p1,title:o(),status:PA,notificationPolicy:MA.optional().describe("Health checks page by default. Silent report advisories remain visible but never affect health alert state."),code:o().describe('Stable machine-readable code (e.g. "google.token.refresh-failed"). Use this for filtering and remediation logic.'),summary:o(),remediation:o().nullable().optional().describe('Operator-facing next step. Null when status is "ok" or no specific remediation applies.'),details:He(o(),Sn()).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:p1,project:o().nullable().describe('Project name when scope is "project", null otherwise.'),reportMonths:y(l$).optional().describe("Calendar months evaluated by project report readiness checks."),generatedAt:o().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(c$)});function u$(e){return e.trim().toLowerCase()}const d$=d({provider:o(),citationState:Vs,cited:_(),mentioned:_(),runId:o(),runCreatedAt:o()}),m$=d({queryId:o(),query:o(),providers:y(d$),citedCount:m().int().nonnegative(),mentionedCount:m().int().nonnegative(),totalProviders:m().int().nonnegative()}),p$=d({queryId:o(),query:o(),provider:o(),citingCompetitors:y(o()),runId:o(),runCreatedAt:o()}),h$=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:o().nullable(),latestRunAt:o().nullable()});d({summary:h$,byQuery:y(m$),competitorGaps:y(p$),status:j(["ready","no-data"]),reason:j(["no-runs-yet","no-queries"]).optional()});const f$=Xe([R(60),R(90)]),g$=j(["earliest","middle","prior","latest"]),Er=d({clicks:m().int().nonnegative(),impressions:m().int().nonnegative()}),BA=d({name:g$,startDate:o(),endDate:o()}),y$=BA.extend({totals:Er}),b$=BA.extend({organicSessions:m().int().nonnegative()}),Pf=d({startDate:o(),endDate:o(),observedDays:m().int().nonnegative()}),jd=d({verified:m().int().nonnegative(),claimedUnverified:m().int().nonnegative(),unknownAiLike:m().int().nonnegative()}),cS=d({total:m().int().nonnegative(),paid:m().int().nonnegative(),organic:m().int().nonnegative(),unknown:m().int().nonnegative()});d({contractVersion:R("organic-evidence/v1"),periodDays:f$,asOfDate:o().nullable(),coverage:d({gsc:_(),ga4:_(),server:_(),visibility:_()}),sourceCoverage:d({gsc:Pf.nullable(),ga4:Pf.nullable(),server:Pf.nullable(),visibility:d({completedAt:o(),ageDays:m().nonnegative()}).nullable()}),gsc:d({propertyTotals:Er,namedBrand:Er,namedNonBrand:Er,suppressedOrUnreportedResidual:Er,cohorts:y(y$)}).nullable(),ga4:d({organicSessions:m().int().nonnegative(),cohorts:y(b$)}).nullable(),gaAiReferrals:d({paidSessions:m().int().nonnegative(),organicSessions:m().int().nonnegative()}).nullable(),server:d({crawlerHits:jd,userFetchHits:jd,referralSessions:cS}).nullable(),visibility:d({runId:o(),completedAt:o(),ageDays:m().nonnegative(),answerPairs:m().int().nonnegative(),mentionedPairs:m().int().nonnegative(),citedPairs:m().int().nonnegative()}).nullable(),measurement:b9,pages:y(d({path:o(),gsc:Er,ga4OrganicSessions:m().int().nonnegative(),server:d({crawlerHits:jd,userFetchHits:jd,referralSessions:cS})})),findings:y(d({tone:j(["positive","caution","neutral"]),title:o(),detail:o()})),limitations:y(d({code:o(),detail:o()}))});const v$=j(["claude","codex"]);v$.enum;const x$=j(["claude","codex","all"]);x$.enum;const LA=d({content:m().int().nonnegative(),sitemap:m().int().nonnegative(),robots:m().int().nonnegative(),asset:m().int().nonnegative(),other:m().int().nonnegative()}),w$=j(["content","sitemap","robots","asset","other"]),h1=j(["cloud-run","wordpress","cloudflare","vercel","generic-log"]);h1.enum;const S$=j(["raw-request-events","aggregate-request-metrics","request-url","status-code","user-agent","remote-ip","referer","cursor-pull"]);S$.enum;const k$=j(["raw-request","aggregate-bucket"]),j$=k$.enum,A$=j(["observed","provider-aggregated","inferred"]),N$=A$.enum,C$=d({type:o().nullable(),labels:He(o(),o())}),_$=d({sourceType:h1,evidenceKind:R(j$["raw-request"]),confidence:R(N$.observed),eventId:o().min(1),observedAt:o().min(1),method:o().nullable(),requestUrl:o().nullable(),host:o().nullable(),path:o().min(1),queryString:o().nullable(),status:m().int().nullable(),userAgent:o().nullable(),remoteIp:o().nullable(),referer:o().nullable(),latencyMs:m().nullable(),requestSizeBytes:m().int().nullable(),responseSizeBytes:m().int().nullable(),providerResource:C$,providerLabels:He(o(),o())});d({events:y(_$),rawEntryCount:m().int().nonnegative(),skippedEntryCount:m().int().nonnegative(),nextPageToken:o().optional(),filter:o()});const UA=j(["connected","paused","error","archived"]),Zne=UA.enum,VA=j(["oauth","service-account"]);VA.enum;const T$=j(["verified","claimed_unverified","unknown_ai_like"]),Yne=T$.enum,E$=d({id:o().min(1),source:o().min(1),version:o().min(1)}),$A=d({manifestId:o().min(1),manifest:E$.nullable(),hits:m().int().nonnegative()});d({gcpProjectId:o().min(1),serviceName:o().nullable().optional(),location:o().nullable().optional(),authMode:VA});d({baseUrl:o().url(),username:o().min(1)});const f1=j(["production","preview"]);f1.enum;d({projectId:o().min(1),teamId:o().min(1),environment:f1});const KA=d({id:o(),projectId:o(),sourceType:h1,displayName:o(),status:UA,lastSyncedAt:o().nullable(),lastCursor:o().nullable(),lastError:o().nullable(),skippedThroughAt:o().nullable(),queueBacklogCount:m().int().nonnegative().nullable(),queueBacklogObservedAt:o().nullable(),archivedAt:o().nullable(),config:He(o(),Sn()),createdAt:o(),updatedAt:o()});d({gcpProjectId:o().min(1),serviceName:o().min(1).optional(),location:o().min(1).optional(),displayName:o().min(1).optional(),keyJson:o().optional()});d({baseUrl:o().url(),username:o().min(1),applicationPassword:o().min(1),displayName:o().min(1).optional()});d({projectId:o().min(1),teamId:o().min(1),token:o().min(1),environment:f1.optional(),displayName:o().min(1).optional()});const R$=j(["direct-push","queue-pull"]),al=R$.enum,g1=o().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"),GA=d({schemaVersion:R(1),workerVersion:o().min(1),expectedBotListVersion:o().min(1),zoneId:o().nullable()}),D$=GA.extend({deliveryMode:R(al["direct-push"]),accountId:o().nullable()}),z$=GA.extend({deliveryMode:R(al["queue-pull"]),accountId:o().min(1),queueId:o().min(1),queueName:g1,retentionSeconds:m().int().min(60).max(1209600)});function HA(e){if(typeof e!="object"||e===null||Array.isArray(e))return e;const n=e;return"deliveryMode"in n?e:{...n,deliveryMode:"direct-push"}}rs(HA,$e("deliveryMode",[D$,z$]));const FA=d({displayName:o().min(1).optional(),zoneId:o().min(1).optional()}),I$=FA.extend({deliveryMode:R(al["direct-push"]),accountId:o().min(1).optional()}),O$=FA.extend({deliveryMode:R(al["queue-pull"]),accountId:o().min(1),queueId:o().min(1),queueName:g1,retentionSeconds:m().int().min(60).max(1209600),apiToken:o().min(1)});rs(HA,$e("deliveryMode",[I$,O$]));const QA=d({sourceId:o().min(1),workerScript:o().min(1),wranglerToml:o().min(1),workerVersion:o().min(1),instructions:o().min(1)}),P$=QA.extend({deliveryMode:R(al["direct-push"]),activationRequired:_().default(!1)}),q$=QA.extend({deliveryMode:R(al["queue-pull"]),activationRequired:_().default(!1),accountId:o().min(1),queueId:o().min(1),queueName:g1,retentionSeconds:m().int().min(60).max(1209600)});$e("deliveryMode",[P$,q$]);const M$=d({eventId:o().min(1),observedAt:o().datetime(),method:o().nullable(),host:o().nullable(),path:o().min(1),queryString:o().nullable(),status:m().int().nullable(),userAgent:o().nullable(),remoteIp:o().nullable(),referer:o().nullable(),cf:d({verifiedBot:_().nullable(),botScore:m().int().nullable(),country:o().nullable(),asn:m().int().nullable(),asOrganization:o().nullable()}).nullable()});d({schemaVersion:R(1),workerVersion:o().min(1),events:y(M$).min(1).max(100)});d({acceptedEvents:m().int(),droppedEvents:m().int(),workerVersionAck:o(),crawlerBucketRows:m().int(),aiUserFetchBucketRows:m().int(),aiReferralBucketRows:m().int(),sampleRows:m().int()});d({sourceId:o(),runId:o(),syncedAt:o(),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:o(),windowEnd:o()});d({days:m().int().positive().optional()});d({advanceToNow:R(!0)});d({sourceId:o(),runId:o(),status:ha,windowStart:o(),windowEnd:o(),daysRequested:m().int().positive(),daysApplied:m().int().positive()});const B$=d({crawlerHits:m().int().nonnegative(),crawlerContentHits:m().int().nonnegative(),crawlerInfraHits:m().int().nonnegative(),crawlerSegments:LA,aiUserFetchHits:m().int().nonnegative(),aiReferralHits:m().int().nonnegative(),aiReferralLandedHits:m().int().nonnegative(),aiReferralRedirectedHits:m().int().nonnegative(),sampleCount:m().int().nonnegative()});d({sources:y(KA)});const L$=KA.extend({totals24h:B$,latestRun:d({runId:o(),status:ha,startedAt:o().nullable(),finishedAt:o().nullable(),error:o().nullable()}).nullable()});d({sources:y(L$)});const U$=j(["crawler","ai-user-fetch","ai-referral"]),y1=U$.enum,ZA=j(["hour","day"]);ZA.enum;const V$=d({bucket:o(),crawlerHits:m().int().nonnegative(),aiUserFetchHits:m().int().nonnegative(),aiReferralHits:m().int().nonnegative(),aiReferralLandedHits:m().int().nonnegative(),crawlerContentHits:m().int().nonnegative(),measured:_()}),$$=d({kind:R(y1.crawler),sourceId:o(),tsHour:o(),botId:o(),operator:o(),verificationStatus:o(),verificationManifests:y($A).optional(),verificationUnattributedHits:m().int().nonnegative().optional(),pathNormalized:o(),pathClass:w$,status:m().int(),hits:m().int().nonnegative()}),K$=d({kind:R(y1["ai-user-fetch"]),sourceId:o(),tsHour:o(),botId:o(),operator:o(),verificationStatus:o(),verificationManifests:y($A).optional(),verificationUnattributedHits:m().int().nonnegative().optional(),pathNormalized:o(),status:m().int(),hits:m().int().nonnegative()}),G$=d({kind:R(y1["ai-referral"]),sourceId:o(),tsHour:o(),product:o(),operator:o(),sourceDomain:o(),evidenceType:o(),landingPathNormalized:o(),status:m().int(),hits:m().int().nonnegative(),paidHits:m().int().nonnegative(),organicHits:m().int().nonnegative(),unknownHits:m().int().nonnegative()}),H$=$e("kind",[$$,K$,G$]);d({windowStart:o(),windowEnd:o(),series:d({granularity:ZA,points:y(V$),coverageStart:o().nullable(),trends:d({crawlerContentHits:So.nullable(),aiUserFetchHits:So.nullable(),aiReferralLandedHits:So.nullable()})}),totals:d({crawlerHits:m().int().nonnegative(),crawlerContentHits:m().int().nonnegative(),crawlerInfraHits:m().int().nonnegative(),crawlerSegments:LA,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:_()}),events:y(H$)});const b1=j(["admin","viewer"]),F$=/^[a-z\d][\w.-]{0,63}$/i,Q$=o().regex(F$,"A name may use letters, digits, dots, dashes and underscores, and must start with a letter or digit."),uS=12,Z$=o().min(uS,`A password must be at least ${uS} characters.`),YA=d({id:o(),name:o(),role:b1,createdAt:o(),lastLoginAt:o().nullable()});d({users:y(YA)});d({name:Q$,password:Z$,role:b1});d({name:o().min(1),password:o().min(1)});d({authRequired:_(),user:YA.pick({name:!0,role:!0}).nullable()});const XA=j(["queued","running","completed","partial","failed"]),Xne=XA.enum,JA=j(["queued","running","completed","failed"]),Jne=JA.enum,Y$=20,X$=20,Ng=50,WA=d({kind:j(["market","property"]),key:ge,expectedPlanRevision:m().int().positive().optional()}).strict(),J$=d({kind:j(["market","property"]),key:ge,label:o().trim().min(1),planRevision:m().int().positive()}).strict(),eN=o().min(1).max(4e3).refine(e=>e.trim().length>0,"Research queries cannot be blank.");function Wne(e){const n=new Set;return e.filter(s=>{const r=u$(s);return!r||n.has(r)?!1:(n.add(r),!0)})}function W$(e,n){const s=e?e.kind==="market"?{market:e.label,submarket:e.label}:{property:e.label,propertyBrand:e.label}:{};return n?{...s,location:n.label}:s}function eae(e,n,s){const r=new Set(e.variables),u=[...e.pattern.matchAll(/\{([^{}]+)\}/g)].map(x=>x[1]),h=[...new Set(u.filter(x=>!r.has(x)))];if(h.length)throw Jx("The selected research template contains undeclared placeholders: "+h.join(", "));const f=W$(n,s),b=e.variables.filter(x=>f[x]===void 0);if(b.length)throw Jx("The selected research template requires unavailable bindings: "+b.join(", "));const v=Object.fromEntries(e.variables.map(x=>[x,f[x]]));return{bindings:v,output:$q(e.pattern,v)}}const tN=d({templateId:o().trim().min(1).max(256),templateVersion:o().trim().min(1).max(256),bindingLocation:mn.nullable().optional()}).strict();d({queries:y(eN).min(1).max(50),provider:o().trim().min(1).optional(),model:o().trim().min(1).max(200).optional(),location:mn.nullable().optional(),scope:WA.optional(),template:tN.optional(),idempotencyKey:o().trim().min(1).max(128).optional()}).superRefine((e,n)=>{e.model&&!e.provider&&n.addIssue({code:fe.custom,path:["provider"],message:"provider is required when model is supplied"})});const eK=WA.extend({expectedPlanRevision:m().int().positive()}).strict(),tK=d({queries:y(eN).min(1).max(Ng),provider:o().trim().min(1),model:o().trim().min(1).max(200),location:mn.nullable(),scope:eK.optional(),template:tN.optional()}).strict();d({idempotencyKey:o().trim().min(1).max(128),runs:y(tK).min(1).max(X$)}).strict().superRefine((e,n)=>{e.runs.reduce((r,u)=>r+u.queries.length,0)>Ng&&n.addIssue({code:fe.custom,path:["runs"],message:`A research batch may contain at most ${Ng} concrete queries across all destinations`})});const nK=d({kind:j(["api-key","user"]),id:o(),name:o(),role:b1.nullable(),limited:_().optional()}),nN=d({id:o(),projectId:o(),status:XA,provider:o(),requestedModel:o().nullable(),resolvedModel:o(),location:mn.nullable(),scope:J$.nullable().optional(),template:p3.nullable().optional(),totalQueries:m().int(),completedQueries:m().int(),failedQueries:m().int(),error:o().nullable(),initiatedBy:nK.nullable(),startedAt:o().nullable(),finishedAt:o().nullable(),createdAt:o()}),aK=d({id:o(),position:m().int(),query:o(),queryClass:Zr.nullable().optional(),status:JA,requestedModel:o().nullable(),resolvedModel:o(),servedModel:o().nullable(),answerText:o().nullable(),groundingSources:y(Tm),citedDomains:y(o()),searchQueries:y(o()),namedCompetitors:y(o()).default([]),citedCompetitorDomains:y(o()).default([]),answerMentioned:_().nullable(),citationState:Vs.nullable(),error:o().nullable(),startedAt:o().nullable(),finishedAt:o().nullable(),createdAt:o()}),sK=nN.extend({queries:y(aK)});d({runs:y(sK)});const iK=d({name:o(),displayName:o(),modelConfigurable:_(),defaultModel:o(),knownModels:y(d({id:o(),displayName:o()}))});d({runs:y(nN),nextCursor:o().nullable().optional(),providers:y(iK).optional(),access:d({canRun:_(),dailyRunLimit:m().int().positive().nullable()}).optional()});d({apiKey:o().min(1)});d({id:o(),name:o(),status:o(),currencyCode:o().nullable(),timezone:o().nullable(),url:o().nullable(),reviewStatus:o().nullable(),integrityReviewStatus:o().nullable(),integrityDecision:o().nullable()});d({q:o().trim().min(1).max(200),limit:m().int().min(1).max(100).default(20)});const oK=d({id:o(),type:o(),canonicalName:o(),countryCode:o(),name:o(),regionCode:o().nullable()});d({count:m().int().nonnegative(),query:o(),results:y(oK)});const rK=d({id:o(),clientType:o().optional(),name:o().optional(),pixelId:o().optional()});d({pixels:y(rK)});const lK=d({id:o(),name:o().optional()}),cK=d({id:o(),name:o().optional(),eventType:o().optional(),customEventName:o().nullable().optional(),attributionWindowDays:m().int().positive().optional(),adAccountId:o().optional(),sourceIds:y(o()).optional(),sources:y(lK).optional(),archived:_().optional(),version:m().int().nonnegative().optional()});d({eventSettings:y(cK)});d({connected:_(),adAccountId:o().nullable().optional(),displayName:o().nullable().optional(),currencyCode:o().nullable().optional(),timezone:o().nullable().optional(),status:o().nullable().optional(),reviewStatus:o().nullable().optional(),integrityReviewStatus:o().nullable().optional(),integrityDecision:o().nullable().optional(),lastSyncedAt:o().nullable().optional(),conversionTrackingConfigured:_().optional()});d({disconnected:_()});d({runId:o(),status:o()});const uK=["campaign_id","ad_group_id","ad_id","ad_account_id","oppref"],dK=/^[\w.-]+=[^&#\s]*$/,mK=/\{([^}]*)\}/g,Oo=o().min(1).max(1e3).superRefine((e,n)=>{const s=u=>n.addIssue({code:"custom",message:u});if(e.startsWith("?")||e.startsWith("&")){s("Tracking template must not start with ? or &");return}const r=new Set;for(const u of e.split("&")){if(!dK.test(u)){s(`Tracking template pair '${u}' must be key=value without whitespace, # or &`);return}const h=u.slice(0,u.indexOf("="));if(r.has(h)){s(`Tracking template repeats the parameter '${h}'`);return}r.add(h)}for(const u of e.matchAll(mK)){const h=u[1];if(!uK.includes(h)){s(`Tracking template macro '{${h}}' is not supported`);return}}}),pK=d({type:o().nullable().optional(),title:o().nullable().optional(),body:o().nullable().optional(),targetUrl:o().nullable().optional(),fileId:o().nullable().optional()}),eu=j(["impressions","clicks"]);eu.enum;const tu=j(["impression","click"]);tu.enum;const hK=d({id:o(),adGroupId:o(),name:o(),status:o(),reviewStatus:o().nullable().optional(),creative:pK.nullable().optional(),landingPageQueryStringTemplate:o().nullable().optional(),upstreamUpdatedAt:m().int().nullable().optional(),syncedAt:o().optional()}),fK=d({id:o(),campaignId:o(),name:o(),description:o().nullable().optional(),status:o(),billingEventType:Xe([tu,de()]).optional(),maxBidMicros:m().int().nullable().optional(),contextHints:y(o()).default([]),ads:y(hK).default([]),landingPageQueryStringTemplate:o().nullable().optional(),upstreamUpdatedAt:m().int().nullable().optional(),syncedAt:o().optional()}),gK=d({id:o(),name:o(),description:o().nullable().optional(),status:o(),startTime:m().int().nullable().optional(),endTime:m().int().nullable().optional(),biddingType:Xe([eu,de()]).optional(),dailySpendLimitMicros:m().int().nullable().optional(),lifetimeSpendLimitMicros:m().int().nullable().optional(),conversionEventSettingIds:y(o()).default([]),locationIds:y(o()).optional(),adGroups:y(fK).default([]),landingPageQueryStringTemplate:o().nullable().optional(),upstreamUpdatedAt:m().int().nullable().optional(),syncedAt:o().optional()});d({campaigns:y(gK)});const aN=j(["campaign","ad_group"]);aN.enum;const yK=d({level:aN,entityId:o(),date:o(),impressions:m().int(),clicks:m().int(),spendMicros:m().int(),conversions:m().int(),ctr:we().nullable(),cpcMicros:m().int().nullable(),inProgress:_()});d({rows:y(yK),currencyCode:o().nullable().optional()});const sN=d({from:o().nullable(),to:o().nullable(),inProgressDate:o().nullable()}),iN=d({impressions:m().int(),clicks:m().int(),spendMicros:m().int(),conversions:m().int(),ctr:we().nullable(),cpcMicros:m().int().nullable()});d({connected:_(),displayName:o().nullable().optional(),currencyCode:o().nullable().optional(),lastSyncedAt:o().nullable().optional(),campaignCount:m().int(),adGroupCount:m().int(),adCount:m().int(),window:sN,totals:iN});const oN=j(["unavailable","partial","complete"]);oN.enum;const rN=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"]);rN.enum;const lN=j(["unavailable","reported"]);lN.enum;const bK={storedSnapshot:"stored_ads_snapshot"},cN=j(["unavailable","partial_snapshot","metrics_unavailable","observed_activity","no_observed_activity"]);cN.enum;const vK=d({id:o(),name:o(),status:o(),reviewStatus:o().nullable()}),xK=d({id:o(),name:o(),status:o(),billingEventType:Xe([tu,de()]),maxBidMicros:m().int().nullable(),contextHints:y(o()),ads:y(vK)}),wK=d({id:o(),name:o(),status:o(),biddingType:Xe([eu,de()]),dailySpendLimitMicros:m().int().nullable(),lifetimeSpendLimitMicros:m().int().nullable(),conversionEventSettingIds:y(o()),adGroups:y(xK)});d({snapshot:d({status:oN,issue:Xe([rN,de()]),lastSyncedAt:o().nullable(),campaignCount:m().int().nonnegative(),adGroupCount:m().int().nonnegative(),adCount:m().int().nonnegative(),sourceSync:d({runId:o(),status:ha}).nullable()}),historicalCampaignRollups:d({status:lN,window:sN,totals:iN.nullable()}),storedConfiguration:d({basis:R(bK.storedSnapshot),connection:d({status:o().nullable(),reviewStatus:o().nullable(),integrityReviewStatus:o().nullable(),integrityDecision:o().nullable(),conversionTrackingConfigured:_()}).nullable(),campaigns:y(wK)}),assessment:d({state:cN})});const cs=o().min(8).max(128).regex(/^[\w.:-]+$/,"operationKey may contain letters, numbers, dot, underscore, colon, and hyphen"),Kt=o().min(1).max(200),Po=o().min(3).max(1e3).refine(e=>e.trim().length>0),Vr=m().int().min(946684800).max(4102444800),$r=m().int().positive().max(Number.MAX_SAFE_INTEGER),v1=o().regex(/^[a-f0-9]{64}$/),uN=y(Kt).max(100).refine(e=>new Set(e).size===e.length,"conversionEventSettingIds must be unique"),dN=o().url().refine(e=>new URL(e).protocol==="https:",{message:"URL must use https"}),mN=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"]);mN.enum;const pN=j(["pending","reconciling","succeeded","failed","unknown"]),Pr=pN.enum,hN=j(["known_entity","create_fingerprint","manual_only"]);hN.enum;const fN=j([Pr.pending,Pr.unknown,Pr.reconciling]);fN.enum;const gN=j(["active","paused","archived"]);gN.enum;const yN=j(["file","campaign","ad_group","ad"]);yN.enum;const bN=j(["campaign","ad_group","ad"]);bN.enum;const x1=d({id:Kt,expectedUpdatedAt:m().int().nonnegative()}).strict(),SK=x1,sm=1e3;function kK(e){return 1+e.campaign.adGroups.reduce((n,s)=>n+1+s.ads.length,0)}const jK=x1.extend({ads:y(SK).min(1).max(sm-1)}).strict(),AK=x1.extend({adGroups:y(jK).min(1).max(sm-1)}).strict();function dS(e,n,s){for(let r=1;r<e.length;r+=1)if(Kj(e[r-1].id,e[r].id)>=0){s.addIssue({code:"custom",path:n,message:"Activation manifest entities must be uniquely sorted by id"});return}}const vN=d({campaign:AK}).strict().superRefine((e,n)=>{kK(e)>sm&&n.addIssue({code:"custom",path:["campaign"],message:`Activation manifests may contain at most ${sm} entities`}),dS(e.campaign.adGroups,["campaign","adGroups"],n);const r=new Set;for(let u=0;u<e.campaign.adGroups.length;u+=1){const h=e.campaign.adGroups[u];dS(h.ads,["campaign","adGroups",u,"ads"],n);for(let f=0;f<h.ads.length;f+=1){const b=h.ads[f];r.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"}),r.add(b.id)}}}),xN=v1,NK=j(["approved","executing","consumed","revoked","expired","unknown"]),Ls=NK.enum,CK=j(["pending","executing","active","failed","rollback_executing","rolled_back","rollback_failed","unknown"]),Mi=CK.enum,_K=d({name:Po.optional(),description:o().max(4e3).nullable().optional(),status:gN.optional(),startTime:Vr.nullable().optional(),endTime:Vr.nullable().optional(),lifetimeSpendLimitMicros:$r.min(1e6).optional(),locationIds:y(Kt).max(100).optional(),biddingType:eu.optional(),conversionEventSettingIds:uN.optional(),campaignId:Kt.optional(),contextHints:y(o().min(1).max(1e3)).max(100).optional(),maxBidMicros:$r.max(1e8).optional(),billingEventType:tu.optional(),adGroupId:Kt.optional(),creativeFingerprint:v1.optional(),landingPageQueryStringTemplate:Oo.nullable().optional()}).strict();d({operationKey:cs,imageUrl:dN});d({operationKey:cs,name:Po,description:o().max(4e3).optional(),startTime:Vr.optional(),endTime:Vr.optional(),lifetimeSpendLimitMicros:$r.min(1e6),locationIds:y(Kt).min(1).max(100),biddingType:eu.optional(),conversionEventSettingIds:uN.optional(),landingPageQueryStringTemplate:Oo.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:cs,campaignId:Kt,name:Po,description:o().max(4e3).optional(),contextHints:y(o().min(1).max(1e3)).min(1).max(100),maxBidMicros:$r.max(1e8),billingEventType:tu.optional(),landingPageQueryStringTemplate:Oo.optional()});const wN=d({title:o().min(3).max(50),body:o().min(1).max(100),targetUrl:dN,fileId:Kt});d({operationKey:cs,adGroupId:Kt,name:Po,creative:wN,landingPageQueryStringTemplate:Oo.optional()});function w1(e){return Object.keys(e).some(n=>n!=="operationKey"&&n!=="expectedUpdatedAt")}d({operationKey:cs,expectedUpdatedAt:m().int().nonnegative(),name:Po.optional(),description:o().max(4e3).nullable().optional(),startTime:Vr.nullable().optional(),endTime:Vr.nullable().optional(),lifetimeSpendLimitMicros:$r.min(1e6).optional(),locationIds:y(Kt).min(1).max(100).optional(),landingPageQueryStringTemplate:Oo.nullable().optional()}).refine(w1,{message:"At least one campaign field must be updated"});d({operationKey:cs,expectedUpdatedAt:m().int().nonnegative(),name:Po.optional(),description:o().max(4e3).nullable().optional(),contextHints:y(o().min(1).max(1e3)).min(1).max(100).optional(),maxBidMicros:$r.max(1e8).optional(),landingPageQueryStringTemplate:Oo.nullable().optional()}).refine(w1,{message:"At least one ad group field must be updated"});d({operationKey:cs,expectedUpdatedAt:m().int().nonnegative(),name:Po.optional(),creative:wN.optional(),landingPageQueryStringTemplate:Oo.nullable().optional()}).refine(w1,{message:"At least one ad field must be updated"});d({operationKey:cs});d({operationKey:cs,expectedUpdatedAt:m().int().nonnegative()});const Gm=d({id:o(),adAccountId:o().nullable(),operationKey:o(),kind:mN,state:pN,entityType:Xe([yN,de()]),entityId:o().nullable(),upstreamUpdatedAt:m().int().nullable(),errorCode:o().nullable(),errorMessage:o().nullable(),reconcileStrategy:Xe([hN,de()]),reconcileParentId:Kt.nullable(),reconcileFingerprint:v1.nullable(),reconcileFields:_K.nullable(),reconcileAttempts:m().int().nonnegative(),lastReconciledAt:o().nullable(),createdAt:o(),updatedAt:o()});d({operation:Gm,replayed:_()});const Pt=_j({offset:!0}),sl={id:Kt,projectId:Kt,adAccountId:Kt,manifestHash:xN,manifest:vN,executorApiKeyId:Kt,approverApiKeyId:Kt,expiresAt:Pt,approvedAt:Pt,createdAt:Pt,updatedAt:Pt,revocationRequestedAt:Pt.nullable()},TK=d({...sl,state:R(Ls.approved),operationId:de(),executionStartedAt:de(),consumedAt:de(),revokedAt:de(),expiredAt:de()}).strict(),EK=d({...sl,state:R(Ls.executing),operationId:Kt,executionStartedAt:Pt,consumedAt:de(),revokedAt:de(),expiredAt:de()}).strict(),RK=d({...sl,state:R(Ls.consumed),operationId:Kt,executionStartedAt:Pt,consumedAt:Pt,revokedAt:de(),expiredAt:de()}).strict(),DK=d({...sl,state:R(Ls.revoked),operationId:de(),executionStartedAt:de(),consumedAt:de(),revokedAt:Pt,expiredAt:de()}).strict(),zK=d({...sl,state:R(Ls.expired),operationId:de(),executionStartedAt:de(),consumedAt:de(),revokedAt:de(),expiredAt:Pt}).strict(),IK=d({...sl,state:R(Ls.unknown),operationId:Kt,executionStartedAt:Pt,consumedAt:de(),revokedAt:de(),expiredAt:de()}).strict(),SN=$e("state",[TK,EK,RK,DK,zK,IK]).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!==Ls.executing&&e.state!==Ls.unknown&&e.state!==Ls.consumed&&n.addIssue({code:"custom",path:["revocationRequestedAt"],message:"Only an executing, cancelled, or unresolved activation can carry a cancellation request"})}),Bi={id:Kt,operationId:Kt,ordinal:m().int().nonnegative(),entityType:bN,entityId:Kt,expectedUpdatedAt:m().int().nonnegative(),createdAt:Pt,updatedAt:Pt},nu={errorCode:de(),errorMessage:de()},S1={errorCode:o().min(1).max(100),errorMessage:o().min(1).max(500),remediation:o().min(1).max(500)},OK=d({...Bi,...nu,state:R(Mi.pending),providerUpdatedAt:de(),remediation:de(),startedAt:de(),finishedAt:de()}).strict(),PK=d({...Bi,...nu,state:R(Mi.executing),providerUpdatedAt:de(),remediation:de(),startedAt:Pt,finishedAt:de()}).strict(),qK=d({...Bi,...nu,state:R(Mi.active),providerUpdatedAt:m().int().nonnegative(),remediation:de(),startedAt:Pt,finishedAt:Pt}).strict(),MK=d({...Bi,...S1,state:R(Mi.failed),providerUpdatedAt:Xe([m().int().nonnegative(),de()]),startedAt:Pt,finishedAt:Pt}).strict(),BK=d({...Bi,...nu,state:R(Mi.rollback_executing),providerUpdatedAt:m().int().nonnegative(),remediation:o().min(1).max(500),startedAt:Pt,finishedAt:de()}).strict(),LK=d({...Bi,...nu,state:R(Mi.rolled_back),providerUpdatedAt:m().int().nonnegative(),remediation:o().min(1).max(500),startedAt:Pt,finishedAt:Pt}).strict(),UK=d({...Bi,...S1,state:R(Mi.rollback_failed),providerUpdatedAt:m().int().nonnegative(),startedAt:Pt,finishedAt:Pt}).strict(),VK=d({...Bi,...S1,state:R(Mi.unknown),providerUpdatedAt:Xe([m().int().nonnegative(),de()]),startedAt:Pt,finishedAt:Pt}).strict(),$K=$e("state",[OK,PK,qK,MK,BK,LK,UK,VK]),Cg={exact:"exact",refreshSemanticallyUnchanged:"refresh_semantically_unchanged"},KK=j([Cg.exact,Cg.refreshSemanticallyUnchanged]);d({manifest:vN,executorApiKeyId:Kt,expiresAt:Pt,versionPolicy:KK.default(Cg.exact)}).strict();d({grant:SN}).strict();d({}).strict();d({operationKey:cs,grantId:Kt,manifestHash:xN}).strict();d({grant:SN,operation:Gm,steps:y($K)}).strict();const GK=[Pr.pending,Pr.unknown,Pr.reconciling];function HK(e){if(e===void 0||e==="")return GK;if(Array.isArray(e)){const n=[];for(const s of e)typeof s=="string"?n.push(...s.split(",")):n.push(s);return n}return typeof e=="string"?e.split(",").filter(Boolean):e}d({state:rs(HK,y(fN).min(1).max(3).refine(e=>new Set(e).size===e.length,"state values must be unique")),limit:Us().int().min(1).max(200).default(100),cursor:o().min(1).max(1e3).optional()});d({operations:y(Gm),count:m().int().nonnegative(),nextCursor:o().nullable()});d({}).strict();d({operation:Gm,resolved:_()});d({campaignId:o().min(1).max(200).optional(),lookbackDays:Us().int().min(1).max(30).default(7)});const kN=j(["campaign","ad_group","ad"]);kN.enum;const jN=j(["both","live-only","stored-only"]);jN.enum;const FK=R("live-provider-read"),QK=d({date:o().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()}),mS=d({impressions:m().int(),clicks:m().int(),spendMicros:m().int(),conversions:m().int()}),ZK=d({date:o(),live:mS.nullable(),stored:mS.nullable(),drifted:_()}),YK=d({field:o(),live:o().nullable(),stored:o().nullable()}),XK=d({name:o().nullable(),status:o(),reviewStatus:o().nullable(),mode:o().nullable(),updatedAt:m().nullable()}),JK=d({name:o(),status:o(),reviewStatus:o().nullable(),upstreamUpdatedAt:m().nullable(),syncedAt:o()}),WK=d({entityType:kN,id:o(),parentId:o().nullable(),presence:jN,live:XK.nullable(),stored:JK.nullable(),fieldDeltas:y(YK),liveMetrics:y(QK).nullable(),metricDeltas:y(ZK).nullable(),drifted:_()}),eG=d({surface:o(),entityId:o().nullable(),upstreamStatus:m().int().nullable()});d({basis:FK,fetchedAt:o(),adAccountId:o(),storedSnapshotSyncedAt:o().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:_()}),entities:y(WK),drift:d({entitiesCompared:m().int().nonnegative(),driftedEntities:m().int().nonnegative(),statusDrifted:m().int().nonnegative(),metricsDrifted:m().int().nonnegative()}),errors:y(eG)});const tG=d({status:j(["available","unavailable","not-supported"])}),pS="*";function AN(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 nG=j(["enabled","configured_disabled","CANONRY_TELEMETRY_DISABLED","DO_NOT_TRACK","CI","NO_CONFIG","CONFIG_UNAVAILABLE"]),aG=j(["server","local"]);d({enabled:_(),configuredEnabled:_(),reason:nG,anonymousId:o().regex(/^[0-9a-f]{8}\.\.\.$/i).optional(),target:aG.optional()}).strict();const ft=1,qf=j(["system","project","queries","competitors","run","finish"]),sG=j(["copy_agent_command","connect_server_traffic","connect_search_console","connect_analytics","connect_business_profile","set_schedule","add_notification","open_project","review_page_health"]),Mf=j(["0","1","2-3","4-5","6-10","11+"]);function is(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 hS=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"]),iG=j(["wizard","platform","site_health"]),Ad=d({eventId:o().uuid(),flowVersion:R(ft),onboardingSessionId:o().uuid(),surface:iG.optional()});$e("event",[Ad.extend({event:R("onboarding.started"),step:qf,resumed:_()}).strict(),Ad.extend({event:R("onboarding.step_completed"),step:qf,method:j(["existing","inline","manual","generated","skipped","automatic"]),countBucket:Mf.optional(),nextAction:sG.optional()}).strict(),Ad.extend({event:R("onboarding.blocked"),step:qf,action:j(["continue","configure_provider","generate_queries","save","launch_run","retry_run"]),reasonCode:hS}).strict(),Ad.extend({event:R("run.requested"),origin:R("dashboard_setup"),result:j(["queued","rejected"]),kind:j(["answer_visibility","site_health"]).optional(),providerCountBucket:Mf,queryCountBucket:Mf,reasonCode:hS.optional()}).strict()]);d({accepted:_()});j(["cli","mcp-stdio","mcp-http","aero","api","dashboard"]);const oG=["cli","mcp-stdio","mcp-http","aero","api","dashboard","system"],k1=j(oG);k1.enum;const NN=["provider","gsc","ga4","bing","gbp","google_ads","gtm","openai_ads","traffic_cloudflare","traffic_vercel","traffic_cloud_run","wordpress","backlinks","webhook","agent_webhook","cdp","traffic_wordpress"],j1=j(NN),CN=j1.enum,rG=["connect","disconnect","test","reauth","select"],_N=j(rG);_N.enum;const lG=["started","succeeded","failed","cancelled"],TN=j(lG),fS=TN.enum,cG=["succeeded","partial","failed","skipped","cancelled"],EN=j(cG),uG=EN.enum,dG=["manual","scheduled","agent","startup","retry","push"],RN=j(dG);RN.enum;const mG=["AUTH_DENIED","OAUTH_CANCELLED","OAUTH_STATE_INVALID","INVALID_CREDENTIALS","PERMISSION_MISSING","NOT_CONNECTED","ALREADY_CONNECTED","NOT_FOUND","ACCOUNT_NOT_FOUND","PROPERTY_NOT_FOUND","QUOTA_EXCEEDED","RATE_LIMITED","BILLING","NETWORK","TIMEOUT","HTTP_4XX","HTTP_5XX","BLOCKED_UNSAFE_URL","VALIDATION","UNSUPPORTED","NO_DATA","NOT_DUE","GATE_REFUSED","OPERATION_IN_PROGRESS","QUARANTINED","CANCELLED_BY_USER","SERVER_RESTARTED","INTERNAL","UNKNOWN","PORT_IN_USE","MIGRATION_FAILED","UNCAUGHT_EXCEPTION","UNHANDLED_REJECTION"],A1=j(mG);A1.enum;const DN={search_console:["sync","inspect","sitemap_submit"],ga4:["sync"],bing:["sync","inspect"],gbp:["sync","reviews"],google_ads:["sync"],gtm:["sync"],openai_ads:["sync","operation","activation","reconcile"],server_traffic:["sync","ingest","backfill","reset"],backlinks:["install","sync","extract"],content:["analyze","brief"],research:["run"],discovery:["run"],sentiment:["run"],aero:["turn"],webhooks:["deliver","test"],schedules:["slot"],exports:["export"],providers:["reload"],wordpress:["schema_deploy","llms_txt","meta_write","publish"],measurement:["publish"],insights:["generate"],site_liveness:["check"],reports:["download"],data_refresh:["refresh"],server:["start","crash"]},pG=Object.keys(DN),zN=j(pG);zN.enum;const hG=["rows","pages","urls","links","domains","reviews","events","crawlerHits","aiReferralHits","aiUserFetchHits","campaigns","operations","queries","snapshots","briefs","gaps","targets","insights","toolCalls","toolErrors","modelCalls","inputTokens","outputTokens","cachedTokens","costMicros","attempts","deliveries","failures","skipped","providers","items","bytes"],fG=new Set(hG),IN=1e12,ON=m().int().min(0).max(IN),gG=He(o(),ON).refine(e=>Object.keys(e).length>0&&Object.keys(e).length<=12,"counts must have 1 to 12 keys").refine(e=>Object.keys(e).every(n=>fG.has(n)),"unknown count key"),yG=["first_party","slack","discord"],N1=j(yG);N1.enum;const bG=["2xx","3xx","4xx","5xx","timeout","network","blocked"],PN=j(bG);PN.enum;const vG=["under_1s","1s_to_10s","10s_to_1m","1m_to_5m","5m_to_30m","30m_or_more"],Hm=j(vG);Hm.enum;const qN=o().regex(/^[A-Z_$][\w$]{0,39}$/i),MN=o().regex(/^[a-z0-9][a-z0-9._-]{0,39}$/),C1=j(rg),BN=o().regex(/^[A-Z0-9][\w.:/@-]{0,99}$/i).refine(e=>!e.includes("://"),"a model id is never a URL"),LN=o().regex(/^[a-z0-9][a-z0-9._-]{0,31}$/);d({integration:j1,provider:C1.optional(),action:_N,status:TN,reasonCode:A1.optional(),errorName:qN.optional(),target:N1.optional(),surface:k1.optional(),agent:MN.optional(),durationBucket:Hm.optional(),attempt:m().int().min(1).max(1e6).optional(),first:R(!0).optional()}).strict().refine(e=>e.integration===CN.provider==(e.provider!==void 0),"provider is required for, and only for, integration provider").refine(e=>e.status===fS.succeeded||e.status===fS.started||e.reasonCode!==void 0,"a failed or cancelled attempt needs a reasonCode");d({feature:zN,operation:o().regex(/^[a-z][a-z_]{0,31}$/),status:EN,trigger:RN.optional(),surface:k1.optional(),agent:MN.optional(),reasonCode:A1.optional(),errorName:qN.optional(),durationBucket:Hm.optional(),counts:gG.optional(),target:N1.optional(),eventType:jm.optional(),statusClass:PN.optional(),provider:C1.optional(),model:BN.optional(),modelProvider:LN.optional(),sampleRate:m().int().min(1).max(1e6).optional(),droppedBefore:m().int().min(0).max(IN).optional(),domainHash:o().regex(/^[0-9a-f]{64}$/).optional(),first:R(!0).optional()}).strict().refine(e=>DN[e.feature].includes(e.operation),"operation is not one this feature reports").refine(e=>e.status===uG.succeeded||e.reasonCode!==void 0,"a non-succeeded outcome needs a reasonCode");const xG=["npm","homebrew","docker","source"],wG=j(xG),SG=o().regex(/^[a-z0-9][a-z0-9-]{0,31}$/),kG=["projects","queries","competitors","locations","schedules","webhooks","agentWebhooks","trafficSources","googleConnections","bingConnections","backlinkSources","adsAccounts"],jG=["sweeps","audits","providerCalls","inputTokens","outputTokens","costMicros","aeroTurns","aeroModelCalls","aeroInputTokens","aeroOutputTokens","aeroCostMicros","webhookDeliveries"],Bf=e=>{const n=new Set(e);return He(o(),ON).refine(s=>Object.keys(s).every(r=>n.has(r)),"unknown key")};d({providers:y(C1).max(rg.length),integrations:y(j1.exclude([CN.provider])).max(NN.length),counts:Bf(kG),usage24h:Bf(jG),providerCalls24h:Bf(rg).optional(),agentProvider:LN.optional(),agentModel:BN.optional(),uptimeBucket:Hm.optional(),installSource:wG.optional(),installRef:SG.optional()}).strict();const UN=["/","/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"],AG=j(UN),VN=["overview","portfolio","search-console","conversions","local","discovery","queries","properties","report","activity","backlinks","technical-aeo","history","settings","other"],Lf=j(VN),NG=["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","property_names.save","discovery.run","api_key.create","api_key.revoke","export.download","report.download","aero.open","aero.send","filter.change","search.submit"],CG=j(NG),_G=["google","gsc","ga","bing","gbp","wordpress","openai_ads","google_ads","gtm","traffic_cloudflare","traffic_vercel","traffic_cloud_run","traffic_wordpress"],TG=j(_G),EG=["provider","model","location","window","query_class","other"],RG=j(EG),DG=["csv","json","html"],zG=["render","unhandled","api"],IG=["4xx","5xx","network"],OG=["LCP","INP","CLS","FCP","TTFB"],PG=["good","needs-improvement","poor"],$N=/^[a-z][a-z0-9-]{0,39}$/,KN=/^[a-z_$][\w$]{0,39}$/i,qG=/^\/api\/v1(?:\/(?:[a-z][a-z0-9-]*(?:\.[a-z]+)?|\{[A-Za-z]+\}))*$/,GN=160,MG=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"]),BG=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","providers/reload","queries/generate","queries/replace-preview","runs/latest","snapshots/diff"]),LG=/^\{[a-z]+\}$/i;function HN(e){if(e.length>GN||e.includes("://")||!qG.test(e))return!1;const n=e.split("/").slice(3);return n.every((s,r)=>{const u=n[r-1];return u===void 0||!MG.has(u)?!0:LG.test(s)||BG.has(`${u}/${s}`)})}const Nd=d({eventId:o().uuid(),uiSessionId:o().uuid(),page:AG});$e("event",[Nd.extend({event:R("ui.page_viewed"),tab:Lf.optional()}).strict(),Nd.extend({event:R("ui.action"),action:CG,tab:Lf.optional(),integration:TG.optional(),format:j(DG).optional(),filter:RG.optional()}).strict(),Nd.extend({event:R("ui.error"),kind:j(zG),tab:Lf.optional(),component:o().regex($N).optional(),errorName:o().regex(KN).optional(),route:o().max(GN).refine(HN,"route must be a route template").optional(),method:j(["GET","POST","PUT","PATCH","DELETE"]).optional(),statusClass:j(IG).optional(),status:m().int().min(400).max(599).optional()}).strict(),Nd.extend({event:R("ui.vitals"),metric:j(OG),rating:j(PG)}).strict()]);function UG(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 UN.includes(n)?n:"other"}function FN(e){if(e==="/projects/:projectName")return"overview";const n=/^\/projects\/:projectName\/([a-z-]+)/.exec(e);if(!n)return;const s=n[1];return VN.includes(s)?s:"other"}const VG=["struggle","bug","improvement","other"],$G=j(VG),hc={summary:500,details:4e3,area:40,command:120,errorCode:40};d({kind:$G,summary:o().trim().min(1).max(hc.summary),details:o().trim().min(1).max(hc.details).optional(),area:o().trim().min(1).max(hc.area).optional(),command:o().trim().min(1).max(hc.command).optional(),errorCode:o().trim().min(1).max(hc.errorCode).optional()}).strict();d({accepted:_(),id:o()});const KG=4;function GG(e){return e.length<KG}const QN=j(["trace","debug","info","warn","error","fatal"]),ZN=d({runId:o().min(1).max(256).optional(),projectId:o().min(1).max(256).optional(),requestId:o().min(1).max(256).optional(),actor:o().min(1).max(512).optional(),credentialId:o().min(1).max(512).optional(),userAgent:o().min(1).max(512).optional(),actorSession:o().min(1).max(512).optional(),method:o().min(1).max(16).optional(),route:o().min(1).max(256).optional(),operationId:o().min(1).max(256).optional(),jobId:o().min(1).max(256).optional(),taskId:o().min(1).max(256).optional(),traceId:o().min(1).max(256).optional(),provider:o().min(1).max(256).optional(),errorCode:o().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:_().optional(),retrying:_().optional(),cancelled:_().optional(),success:_().optional()}).strict(),YN=d({cursor:o().min(1).max(512),ts:o().datetime(),level:QN,module:o().min(1).max(256),action:o().min(1).max(256),message:o().max(4096).optional(),runId:o().min(1).max(256).optional(),projectId:o().min(1).max(256).optional(),context:ZN}).strict();d({level:QN.optional(),module:o().trim().min(1).max(256).optional(),runId:o().trim().min(1).max(256).optional(),projectId:o().trim().min(1).max(256).optional(),actor:o().trim().min(1).max(512).optional(),requestId:o().trim().min(1).max(256).optional(),since:o().datetime().optional(),until:o().datetime().optional(),limit:Us().int().min(1).max(200).default(100),cursor:o().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:fe.custom,path:["until"],message:'"until" must be on or after "since".'})});const XN=d({maxEntries:m().int().positive(),maxAgeSeconds:m().int().positive()}).strict(),HG=d({entries:y(YN),nextCursor:o().min(1).max(512).nullable(),truncated:m().int().nonnegative(),dropped:m().int().nonnegative(),retention:j(["process","durable"]),retentionPolicy:XN.optional(),captureErrors:m().int().nonnegative().optional(),observedAt:o().datetime()}).strict(),FG=d(ZN.shape),QG=d({...YN.shape,context:FG});d({...HG.shape,entries:y(QG),retentionPolicy:d(XN.shape).optional()});function Uf(e){return e!==""&&/^[\w./:@%+=,-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`}d({startDate:kn,endDate:kn,sourceId:o().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 po=d({total:m().int().nonnegative(),paid:m().int().nonnegative(),organic:m().int().nonnegative(),unknown:m().int().nonnegative()});d({scope:d({project:o(),sourceId:o().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(o()),confirmsAutomation:R(!1)}),totals:d({raw:po,redirects:po,subresources:po,countable:po,suspected:po,adjustedEstimate:po}),bursts:y(d({sourceId:o(),product:o(),landingPathNormalized:o(),tsHour:o(),counts:po})),evidence:d({total:m().int().nonnegative(),returned:m().int().nonnegative(),truncated:_()}),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:_().nullable(),ratio:de(),reasons:y(o()),gaScope:R("project")}),caveats:y(o())});const ZG=new Set(["optional","nullable","default","prefault","readonly","catch","nonoptional"]),gS=64;function qd(e){return e._zod.def}function ho(e,n){return e.clone({...qd(e),...n})}function yS(e){if(e.length!==0){if(e.every(n=>typeof n=="string"))return o();if(e.every(n=>typeof n=="number"))return m();if(e.every(n=>typeof n=="boolean"))return _()}}function JN(e,n,s,r){if(r>gS)throw new Error(`tolerantReadSchema: schema nesting exceeds ${gS} levels`);const u=s.get(e);if(u)return u;const h=v=>JN(v,n,s,r+1),f=qd(e);let b=e;if(f.type==="object"){const v=Object.fromEntries(Object.entries(e.shape).map(([k,N])=>[k,h(N)])),x=f.catchall,S=n.get(e)??(x&&qd(x).type!=="never"?h(x):void 0);b=S?d(v).catchall(S):d(v)}else if(ZG.has(f.type)){const v=f.innerType,x=h(v);b=x===v?e:ho(e,{innerType:x})}else if(f.type==="array"){const v=f.element,x=h(v);b=x===v?e:ho(e,{element:x})}else if(f.type==="pipe"){const v=f.in,x=f.out,S=h(v),k=h(x);b=S===v&&k===x?e:ho(e,{in:S,out:k})}else if(f.type==="union"){const v=f.options,x=v.map(h);b=x.some((k,N)=>k!==v[N])?f.discriminator?Xe(x):ho(e,{options:x}):e}else if(f.type==="record"){const v=f.keyType,x=f.valueType,S=qd(v).type==="enum"?o():v,k=h(x);b=S===v&&k===x?e:ho(e,{keyType:S,valueType:k})}else if(f.type==="intersection"){const v=f.left,x=f.right,S=h(v),k=h(x);b=S===v&&k===x?e:ho(e,{left:S,right:k})}else if(f.type==="tuple"){const v=f.items,x=f.rest,S=v.map(h),k=x&&h(x);b=k!==x||S.some((T,z)=>T!==v[z])?ho(e,{items:S,rest:k}):e}else if(f.type==="lazy"){const v=f.getter;b=SI(()=>h(v()))}else f.type==="enum"?b=yS(Object.values(f.entries))??e:f.type==="literal"&&(b=yS(f.values)??e);return s.set(e,b),b}function qo(e,n={}){const s=new Map(n.openKeys??[]);return JN(e,s,new Map,0)}const Mo={openKeys:[[u1,m().int().nonnegative()]]};qo(zV,Mo);qo(Ag,Mo);qo(UV,Mo);qo(VV,Mo);qo(IV,Mo);qo(RA,Mo);qo(MV,Mo);Xe([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 fo=d({current:m(),prior:m(),deltaPct:ot().nullable()}),YG=d({windowStart:o(),windowEnd:o(),coverageStart:o().nullable(),priorWindowComplete:_(),hasData:_().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:fo,unverifiedCrawlerHits:fo,aiUserFetchHits:fo,referralArrivals:fo,referralRedirects:m().int().nonnegative(),referralArrivalsByClass:d({paid:fo,organic:fo,unclassified:fo}),referralArrivalsClassSummary:o(),byOperator:y(d({operator:o(),verifiedHits:m(),unverifiedHits:m(),userFetchHits:m(),referralArrivals:m(),deltaPct:ot().nullable()})),topCrawledPaths:y(d({path:o(),verifiedHits:m(),unverifiedHits:m().default(0),distinctOperators:m()})),referralProducts:y(d({product:o(),arrivals:m(),distinctLandingPaths:m()})),dailyTrend:y(d({date:o(),verifiedCrawlerHits:m(),unverifiedCrawlerHits:m().default(0),userFetchHits:m(),referralArrivals:m()})),topReferralLandingPaths:y(d({path:o(),arrivals:m(),distinctProducts:m()}))});d({activity:YG.nullable()});const tae={ambiguous:"Property identity unverified"},nae="No answer could be tied to one property";function XG(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 JG(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 WG="canonry.onboarding-session.v1",im="canonry.onboarding-launched-run.v1",_1="canonry.onboarding-handoff.v1",eH=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,tH=["system","project","queries","competitors","run"];function nH(e){return tH[e]??"system"}function aH(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 sH(e){return e.apiStatus.state!=="checking"&&e.workerStatus.state!=="checking"}const iH={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 Ac(e,n){const s=e&&typeof e=="object"&&"code"in e?String(e.code):"";return iH[s]??n}function T1(){return WN(WG)}function WN(e){try{const n=typeof window<"u"?window.sessionStorage.getItem(e):null;if(n&&eH.test(n))return n;const s=rm();return typeof window<"u"&&window.sessionStorage.setItem(e,s),s}catch{return rm()}}function E1(){return rm()}function eC(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 tC(e,n){try{typeof window<"u"&&window.sessionStorage.setItem(im,JSON.stringify({projectName:e,runId:n,handled:!1}))}catch{}}function nC(e){if(!e)return null;try{if(typeof window>"u")return null;const n=window.sessionStorage.getItem(im);if(!n)return null;const s=JSON.parse(n);return!eC(s)||s.projectName!==e||s.handled?null:s}catch{return null}}function om(e){try{if(typeof window>"u")return;const n=window.sessionStorage.getItem(im);if(!n)return;const s=JSON.parse(n);if(!eC(s)||s.runId!==e)return;window.sessionStorage.setItem(im,JSON.stringify({...s,handled:!0}))}catch{}}function oH(e){try{typeof window<"u"&&window.sessionStorage.setItem(_1,e)}catch{}}function rH(e){if(!e)return!1;try{return typeof window<"u"&&window.sessionStorage.getItem(_1)===e}catch{return!1}}function lH(){try{typeof window<"u"&&window.sessionStorage.removeItem(_1)}catch{}}function rm(){const e=globalThis.crypto;if(e.randomUUID)return e.randomUUID();const n=new Uint8Array(16);if(e.getRandomValues)e.getRandomValues(n);else for(let r=0;r<n.length;r+=1)n[r]=Math.floor(Math.random()*256);n[6]=n[6]&15|64,n[8]=n[8]&63|128;const s=[...n].map(r=>r.toString(16).padStart(2,"0")).join("");return`${s.slice(0,8)}-${s.slice(8,12)}-${s.slice(12,16)}-${s.slice(16,20)}-${s.slice(20)}`}const cH="canonry.ui-session.v1",uH="canonry.ui-pages.v1",dH="canonry.ui-errors.v1",bS="canonry.ui-sent.v1",mH=30,pH=120,hH=200,Yt={sender:null,disabled:!1,page:"other",landingPage:null,pendingVitals:[],memory:new Map,sentAt:null,now:()=>Date.now()};function fH(e){Yt.sender=e.enabled===!1?null:e.send,Yt.disabled=!1,e.now&&(Yt.now=e.now)}function gH(e){const n=UG(e);if(Yt.page=n,Yt.landingPage===null){Yt.landingPage=n;const r=Yt.pendingVitals;Yt.pendingVitals=[];for(const[u,h]of r)aC(u,h)}const s=FN(n);sC(uH,`${n}|${s??""}`,{event:"ui.page_viewed"})}function Bo(e,n={}){R1({event:"ui.action",action:e,...n})}const yH=800,bH=1e3,Vf=new Map;let fc,$f="";function vH(e){if(!Yt.sender)return;const n=Vf.get(e);n&&clearTimeout(n),Vf.set(e,setTimeout(()=>{Vf.delete(e),Bo("filter.change",{filter:e})},yH))}function aae(e,n=!1){if(!Yt.sender)return;fc&&clearTimeout(fc),fc=void 0;const s=e.trim();if(s.length===0){$f="";return}const r=()=>{fc=void 0,s!==$f&&($f=s,Bo("search.submit"))};n?r():fc=setTimeout(r,bH)}const xH={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 wH(e,n){const s=new Set;for(const[r,u]of Object.entries(xH))SH(e[r],n[r])||s.add(u);for(const r of s)vH(r)}function SH(e,n){const s=r=>r==null||r===""?"":JSON.stringify(r);return s(e)===s(n)}function lm(e){const n=IH(e.error),s=e.route&&HN(e.route)?e.route:void 0;if(e.kind==="api"&&!s)return;const r=oC(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&&$N.test(e.component)?e.component:void 0,b=[e.kind,Yt.page,f,n,r,s,u??h].join("|");sC(dH,b,{event:"ui.error",kind:e.kind,...f?{component:f}:{},...n?{errorName:n}:{},...s?{route:s}:{},...r?{method:r}:{},...h?{statusClass:h}:{},...u?{status:u}:{}})}function kH(e,n){if(Yt.landingPage===null){Yt.pendingVitals.push([e,n]);return}aC(e,n)}function aC(e,n){const s=Yt.landingPage??"other";R1({event:"ui.vitals",metric:e,rating:n},s)}const jH=[["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}/measurement-plan/draft/actions/publish","measurement_plan.publish"],["POST","/api/v1/projects/{name}/measurement-plan/draft/actions/upsert-target","property_names.save"],["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"]],vS="/api/v1/projects/{name}/google/connections/{type}",AH={gsc:"gsc",ga4:"ga",gbp:"gbp"};function NH(e,n,s){const r=e==="PUT"&&n===`${vS}/property`?"integration.connect":e==="DELETE"&&n===vS?"integration.disconnect":void 0;if(!r)return;const u=s?/\/google\/connections\/([^/?#]+)/.exec(s)?.[1]:void 0,h=u&&AH[decodeURIComponent(u)]||"google";return[e,n,r,h]}const CH=[["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 _H(e,n,s){return CH.some(([r,u,h])=>(r==="*"||r===e)&&u.test(n)&&h.includes(s))}const TH=/^\/api\/v1\/(?:telemetry|feedback)(?:\/|$)/;function cm(e){if(!e.route||TH.test(e.route))return;const n=oC(e.method);if(e.network||typeof e.status=="number"&&e.status>=400){if(e.status===401||typeof e.status=="number"&&e.status<500&&_H(n,e.route,e.status))return;lm({kind:"api",route:e.route,method:n,status:e.status,network:e.network});return}if(!n||n==="GET")return;const s=NH(n,e.route,e.path)??jH.find(([r,u,,,h])=>r===n&&u===e.route&&(h===void 0||h===e.status));s&&Bo(s[2],s[3]?{integration:s[3]}:{})}function sC(e,n,s){const r=RH(e);if(!r.has(n)&&R1(s)){r.add(n);try{window.sessionStorage.setItem(e,JSON.stringify([...r].slice(-hH)))}catch{}}}function R1(e,n){try{const s=Yt.sender;if(!s||Yt.disabled||!EH())return!1;const r=n??Yt.page,u=FN(r),h={...e,eventId:rm(),uiSessionId:WN(cH),page:r,...u?{tab:u}:{}};return s(h).then(f=>{f&&f.accepted===!1&&(Yt.disabled=!0)},()=>{}),!0}catch{return!1}}function EH(){const e=Yt.now(),n=(Yt.sentAt??=zH(bS)).filter(s=>e-s<36e5&&s<=e);if(Yt.sentAt=n,n.length>=pH||n.filter(s=>e-s<6e4).length>=mH)return!1;n.push(e);try{window.sessionStorage.setItem(bS,JSON.stringify(n))}catch{}return!0}function RH(e){let n=Yt.memory.get(e);return n||(n=new Set(DH(e)),Yt.memory.set(e,n)),n}function iC(e){try{const n=window.sessionStorage.getItem(e),s=n?JSON.parse(n):[];return Array.isArray(s)?s:[]}catch{return[]}}function DH(e){return iC(e).filter(n=>typeof n=="string")}function zH(e){return iC(e).filter(n=>typeof n=="number"&&Number.isFinite(n))}function IH(e){const n=e instanceof Error?e.name:e&&typeof e=="object"&&"name"in e?String(e.name):void 0;return n&&KN.test(n)?n:void 0}function oC(e){const n=e?.toUpperCase();return n==="GET"||n==="POST"||n==="PUT"||n==="PATCH"||n==="DELETE"?n:void 0}class gn extends Error{code;statusCode;details;constructor(n,s,r,u){super(n),this.name="ApiError",this.code=r??"UNKNOWN",this.statusCode=s,this.details=u}}function sae(e){if(e instanceof gn)return e.details;if(typeof e!="object"||e===null)return;const n=e.error,s=typeof n=="object"&&n!==null?n.details:e.details;return typeof s=="object"&&s!==null&&!Array.isArray(s)?s:void 0}function jo(){if(typeof window>"u")return!1;const e=window.__CANONRY_CONFIG__?.demo;return e?.enabled===!0&&e.readOnly===!0&&e.sampleData===!0}function OH(){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 PH(){if(typeof window>"u")return;const e=window.__CANONRY_CONFIG__?.embed?.renderToken;return typeof e=="string"&&e.length>0?e:void 0}function rC(e){const n=PH();if(!n)return e;let s;const r=typeof window<"u"&&window.location?window.location.href:"http://localhost/";try{s=new URL(e,r)}catch{return e}const u=new URL(r).origin;if(s.origin!==u)return e;const f=`${Qm().replace(/\/$/,"")}/api/v1`;return s.pathname!==f&&!s.pathname.startsWith(`${f}/`)?e:(s.searchParams.set("token",n),/^[a-z][a-z\d+.-]*:/i.test(e)?s.toString():`${s.pathname}${s.search}${s.hash}`)}function qH(e,n){const s={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&&(s.body=e.body,s.duplex="half"),new Request(n,s)}function lC(){if(typeof window>"u")return null;const e=window.__CANONRY_CONFIG__?.embed;return e?.enabled?e:null}function MH(){return typeof window>"u"?!0:window.__CANONRY_CONFIG__?.dashboard?.showResourceLinks!==!1}function BH(){return typeof window>"u"?!0:window.__CANONRY_CONFIG__?.dashboard?.showAgentBar!==!1}function LH(){return typeof window>"u"?!1:window.__CANONRY_CONFIG__?.agent?.allowViewers===!0}function D1(){return jo()}function UH(){return typeof window>"u"?!0:window.__CANONRY_CONFIG__?.dashboard?.showUpdateNotification!==!1}function bo(){return VH(Oe["answer-visibility"])}function VH(e){if(typeof window>"u")return!1;const n=window.__CANONRY_CONFIG__?.dashboard;return n?.managedRunKinds!==void 0?n.managedRunKinds.includes(e):e===Oe["answer-visibility"]&&n?.managedSweeps===!0}function $H(){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:Y$}}function xS(){return $H()?"Analyst":"View only"}function Fm(){return lC()!==null}function KH(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const cC=KH();function GH(){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 Qm(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,""):""}function HH(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 FH(e,n){if(e.protocol!=="http:"&&e.protocol!=="https:"||!HH(e.hostname))return;const s=e.port?`:${e.port}`:"",r=n?n.replace(/\/$/,""):"";return`${e.protocol}//localhost${s}${r}`}function iae(e){return`${e.replace(/\/$/,"")}/api/v1/google/callback`}function oae(e){return`${e.replace(/\/$/,"")}/api/v1/google-marketing/callback`}function QH(){if(!(typeof window>"u"))return FH(window.location,Qm())}function ZH(e){return`${Qm()}${e}`}function YH(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 XH(){return""}function JH(){return!!XH()}let uC=null;function wS(e){uC=e}function z1(){uC?.()}const J=q8({baseUrl:GH()});J.interceptors.response.use((e,n)=>(e.status===401&&!n.url.includes("/api/v1/session")&&z1(),e));J.interceptors.request.use(e=>{const n=rC(e.url);return n===e.url?e:qH(e,n)});async function ye(e){const n=await e();if(n.error!==void 0&&n.error!==null){const s=n.response.status;let r=`API ${s}: ${n.response.statusText}`,u,h;if(typeof n.error=="object"&&n.error!==null){const f=n.error.error;if(typeof f=="string")r=f;else if(f&&typeof f=="object"){const b=f;b.message&&(r=b.message),b.code&&(u=b.code),b.details&&(h=b.details)}else{const b=n.error;b.message&&(r=b.message),b.code&&(u=b.code),b.details&&(h=b.details)}}else typeof n.error=="string"&&(r=n.error);throw new gn(r,s,u,h)}if(n.response.status!==204)return n.data}async function Li(e,n){const s=n?.body!=null,r=await fetch(rC(`${cC}${e}`),{...n,credentials:n?.credentials??"same-origin",headers:{...s?{"Content-Type":"application/json"}:{},...n?.headers}});if(!r.ok){const u=await r.text();let h=`API ${r.status}: ${r.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 r.status===401&&!e.startsWith("/session")&&!e.startsWith("/auth/")&&z1(),new gn(h,r.status,f,b)}if(r.status!==204)return r.json()}function WH(e){return ye(()=>Hk({client:J,path:{name:e}}))}function rae(e){return ye(()=>Zk({client:J,path:{name:e}}))}function _g(e){return ye(()=>Yk({client:J,path:{id:e}}))}function dC(e){return ye(()=>Qk({client:J,path:{name:e}}))}function eF(e,n,s){return ye(()=>pT({client:J,path:{name:e},query:{location:n,limit:s}}))}function mC(e,n){return ye(()=>QE({client:J,path:{name:e},query:{location:n?.location,since:n?.since}}))}function pC(e,n){return ye(()=>k6({client:J,path:{name:e},body:n}))}function tF(e){return ye(()=>w6({client:J,body:e}))}function nF(e,n){return ye(()=>eT({client:J,path:{name:e},body:{queries:n}}))}function aF(e,n){return ye(()=>W6({client:J,path:{name:e},body:{queries:n}}))}function lae(e,n){return ye(()=>J6({client:J,path:{name:e},body:{queries:n}}))}function sF(e,n){return ye(()=>aT({client:J,path:{name:e},body:{competitors:n}}))}function cae(e,n){return ye(()=>nT({client:J,path:{name:e},body:{competitors:n}}))}function uae(e,n){return ye(()=>sT({client:J,path:{name:e,id:n}}))}async function dae(e,n){const s=await WH(e);return pC(e,{displayName:n.displayName??s.displayName??s.name,canonicalDomain:n.canonicalDomain??s.canonicalDomain,ownedDomains:n.ownedDomains??s.ownedDomains,aliases:n.aliases??s.aliases,country:n.country??s.country,language:n.language??s.language,tags:s.tags,labels:s.labels,providers:n.providers??s.providers,providerModels:n.providerModels??s.providerModels??{},locations:n.locations??s.locations,defaultLocation:n.defaultLocation!==void 0?n.defaultLocation:s.defaultLocation,autoExtractBacklinks:s.autoExtractBacklinks,...n.siteAuditMaxPages!==void 0?{siteAuditMaxPages:n.siteAuditMaxPages}:{}})}function iF(e,n){const s={};return n?.location&&(s.location=n.location),n?.allLocations&&(s.allLocations=!0),n?.noLocation&&(s.noLocation=!0),ye(()=>oT({client:J,path:{name:e},body:s}))}function mae(e,n){return ye(()=>Z6({client:J,path:{name:e},body:n}))}async function pae(e,n){await ye(()=>Y6({client:J,path:{name:e,label:n}}))}function hae(e,n){return ye(()=>X6({client:J,path:{name:e},body:{label:n}}))}async function fae(e){await ye(()=>S6({client:J,path:{name:e}}))}function gae(){return ye(()=>Xk({client:J}))}function SS(){return Li("/session")}function oF(e,n){return Li("/session/setup",{method:"POST",body:JSON.stringify({password:e}),...n?{headers:{Authorization:`Bearer ${n}`}}:{}})}function rF(e){return Li("/session",{method:"POST",body:JSON.stringify({password:e})})}function lF(e){return Li("/session",{method:"POST",body:JSON.stringify({apiKey:e})})}function cF(){return Li("/session",{method:"DELETE"})}function Kf(){return ye(()=>bT({client:J}))}function kS(){return Li("/auth/session")}function uF(e,n){return Li("/auth/login",{method:"POST",body:JSON.stringify({name:e,password:n})})}function jS(){return Li("/auth/logout",{method:"POST"})}function hC(e,n){return ye(()=>gT({client:J,path:{name:e},body:n}))}async function I1(e){for(let n=0;n<2;n+=1)try{await ye(()=>RT({client:J,body:e}));return}catch(s){if(!(!(s instanceof gn)||s.statusCode>=500)||n===1)return}}function yae(e){return ye(()=>yT({client:J,body:e}))}function bae(e,n){return ye(()=>kT({client:J,path:{name:e},body:n}))}async function vae(e,n){await ye(()=>wT({client:J,path:{name:e},query:n===void 0?void 0:{expectedUpdatedAt:n}}))}function xae(e){return ye(()=>AT({client:J,path:{name:e}}))}function wae(e,n){return ye(()=>NT({client:J,path:{name:e},body:n}))}async function Sae(e,n){await ye(()=>CT({client:J,path:{name:e,id:n}}))}async function kae(e,n){const s=await ye(()=>_T({client:J,path:{name:e,id:n}}));return s.ok&&Bo("notification.test"),s}function dF(e,n,s){return ye(()=>tT({client:J,path:{name:e},body:{provider:n,count:s}}))}function mF(e){return ye(()=>uT({client:J,body:e}))}function pF(e){return ye(()=>cT({client:J,body:e??{}}))}function jae(e,n){const s=QH();return ye(()=>tE({client:J,path:{name:e},body:{type:n,...s?{publicUrl:s}:{}}}))}function Aae(e,n){return ye(()=>nE({client:J,path:{name:e,type:n}}))}function Nae(e,n,s){return ye(()=>sE({client:J,path:{name:e,type:n},body:{propertyId:s}}))}function Cae(e,n,s){return ye(()=>iE({client:J,path:{name:e,type:n},body:{sitemapUrl:s}}))}function hF(e,n){return ye(()=>oE({client:J,path:{name:e},body:n??{}}))}function _ae(e,n){const s={};return n&&n!=="all"&&(s.window=n),ye(()=>hT({client:J,path:{name:e},query:s}))}function Tae(e,n){return ye(()=>cE({client:J,path:{name:e},body:{url:n}}))}function fF(e,n){return ye(()=>fE({client:J,path:{name:e},body:n??{}}))}function Eae(e,n){return ye(()=>hE({client:J,path:{name:e},query:n?{sitemapIndex:n}:void 0}))}function Rae(e,n){return ye(()=>v6({client:J,path:{name:e},body:{sitemapUrls:n}}))}function gF(e,n){return ye(()=>T8({client:J,path:{name:e},body:n??{}}))}function Dae(e,n){return ye(()=>g8({client:J,path:{name:e},body:n??{}}))}function zae(){return ye(()=>Jk({client:J}))}function Iae(e,n){return ye(()=>xT({client:J,body:{host:e,port:n}}))}function Oae(e,n){return ye(()=>gE({client:J,path:{name:e},body:n}))}function Pae(e,n){return ye(()=>AE({client:J,path:{name:e},body:{apiKey:n}}))}function qae(e){return ye(()=>NE({client:J,path:{name:e}}))}function Mae(e,n){return ye(()=>TE({client:J,path:{name:e},body:{siteUrl:n}}))}function Bae(e,n){return ye(()=>DE({client:J,path:{name:e},body:{url:n}}))}function Lae(e,n){return ye(()=>zE({client:J,path:{name:e},body:{}}))}function Uae(e,n){return ye(()=>IE({client:J,path:{name:e},body:n}))}function Vae(e){return ye(()=>vT({client:J,body:{apiKey:e}}))}function yF(e){return e?/filename\s*=\s*"?([^";]+)"?/i.exec(e)?.[1]??null:null}async function $ae(e,n){const s=await fetch(`${cC}/projects/${encodeURIComponent(e)}/results/export?format=${n}`,{credentials:"same-origin",headers:{}});if(!s.ok)throw cm({method:"GET",route:"/api/v1/projects/{name}/results/export",status:s.status}),new gn(`Failed to download results: ${s.status}`,s.status);Bo("export.download",{format:n});const r=await s.blob(),u=URL.createObjectURL(r),h=yF(s.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 Kae(e,n){return ye(()=>LE({client:J,path:{name:e},body:{}}))}function Gae(e,n){return ye(()=>PE({client:J,path:{name:e},body:n}))}function Hae(e){return ye(()=>qE({client:J,path:{name:e}}))}function Fae(e,n){return ye(()=>r8({client:J,path:{name:e},body:n}))}function Qae(e,n){return ye(()=>l8({client:J,path:{name:e},body:n}))}function Zae(e,n){return ye(()=>c8({client:J,path:{name:e},body:n}))}function Yae(e,n,s){return ye(()=>u8({client:J,path:{name:e,id:n},body:s??{}}))}function Xae(e,n,s){return ye(()=>d8({client:J,path:{name:e,id:n},body:{}}))}function Jae(e,n){return ye(()=>GE({client:J,path:{name:e},query:{runId:n}}))}function bF(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 vF(e,n){const s=ZH(e);try{const r=await fetch(s,{credentials:"same-origin"});if(!r.ok)return{label:n,state:"error",detail:`${n} ${r.status}: ${r.statusText}`,statusCode:r.status,hint:YH(e,r.status)};const u=await r.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=bF(u.updateAvailable),x=tG.safeParse(u.mcp),S=[h,f===!1?"database not configured":"database configured",b?`heartbeat ${b}`:void 0].filter(Boolean).join(" · ");return{label:n,state:"ok",detail:S,version:h,databaseConfigured:f,lastHeartbeatAt:b,...v?{updateAvailable:v}:{},...x.success?{mcp:x.data}:{}}}catch(r){return{label:n,state:"error",detail:r instanceof Error?r.message:"unreachable",hint:e==="/health"?`Request failed while checking ${s}. If this instance is served behind a sub-path, verify the dashboard basePath and reverse-proxy rewrites.`:void 0}}}function Wae(){return ye(()=>ZE({client:J}))}function ese(){return ye(()=>YE({client:J}))}function tse(){return ye(()=>WE({client:J}))}function nse(){return ye(()=>XE({client:J}))}function ase(e){return ye(()=>JE({client:J,body:e?{release:e}:{}}))}function sse(){return ye(()=>e8({client:J}))}function ise(){return ye(()=>t8({client:J}))}function ose(e){return ye(()=>n8({client:J,path:{release:e}}))}function rse(e,n={}){return ye(()=>s8({client:J,path:{name:e},query:{release:n.release,excludeCrawlers:n.excludeCrawlers?"1":void 0,source:n.source}}))}function lse(e,n={}){return ye(()=>i8({client:J,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 cse(e,n={}){return ye(()=>o8({client:J,path:{name:e},query:{source:n.source}}))}function use(e,n){return ye(()=>a8({client:J,path:{name:e},body:{release:void 0}}))}async function AS(e,n){return ye(()=>D8({client:J,path:{name:e},query:n}))}async function xF(e,n){return ye(()=>z8({client:J,path:{name:e},body:{id:n}}))}async function wF(e,n){return ye(()=>O8({client:J,path:{name:e,id:n}}))}async function SF(e,n){return ye(()=>I8({client:J,path:{name:e,id:n}}))}async function kF(e,n){const s=f=>ye(()=>R6({client:J,path:{name:e},query:{...n,include:["assessments","locations"],queryLimit:TA,queryCursor:f}})),r=await s(),u=[...r.queries];let h=r.queryPage?.nextCursor??null;for(;h;){const f=await s(h);u.push(...f.queries),h=f.queryPage?.nextCursor??null}return{...r,queries:u,...r.queryPage?{queryPage:{...r.queryPage,nextCursor:null}}:{}}}function Md(e){return ye(()=>T6({client:J,path:{name:e}}))}function jF(e,n){return ye(()=>E6({client:J,path:{name:e},body:n}))}function AF(e,n,s){return ye(()=>D6({client:J,path:{name:e},query:{...n,cursor:s,limit:50}}))}function NF(e,n){return ye(()=>z6({client:J,path:{name:e},query:n}))}function CF(e,n,s){return ye(()=>I6({client:J,path:{name:e},body:{previewToken:n,idempotencyKey:s}}))}function _F(e){return ye(()=>O6({client:J,path:{name:e}}))}function TF(e,n,s){return ye(()=>P6({client:J,path:{name:e,jobId:n},query:{attemptCursor:s}}))}const fC={account:null,canWrite:!0,isAdmin:!0},EF={account:null,canWrite:!1,isAdmin:!1};function RF(e){const n=e.scopes.includes(pS);return{account:null,canWrite:!e.readOnly&&n,isAdmin:e.projectId===null&&e.scopes.includes(pS)}}const gC=C.createContext(fC);function DF({account:e,apiKey:n,apiKeyPending:s=!1,children:r}){const u=s?EF:n?RF(n):e?{account:e,canWrite:e.role==="admin",isAdmin:e.role==="admin"}:fC;return l.jsx(gC.Provider,{value:u,children:r})}function fa(){return C.useContext(gC)}const yC="View only — your account cannot change this.";function fn(e){return(...n)=>{e(...n)}}const zF=6e3,IF=5,OF=180;let Pn=[],PF=0;const Tg=new Set,Eg=new Map,Rg=new Map;function um(){const e=[...Pn];for(const n of Tg)n(e)}function O1(e){const n=Eg.get(e);n&&(clearTimeout(n),Eg.delete(e));const s=Rg.get(e);s&&(clearTimeout(s),Rg.delete(e))}function bC(e){O1(e);const n=Pn.length;Pn=Pn.filter(s=>s.id!==e),Pn.length!==n&&um()}function NS(e){O1(e.id),Eg.set(e.id,setTimeout(()=>{Dg(e.id)},e.durationMs))}function qF(e,n,s){return typeof e=="string"?{title:e,tone:n,durationMs:s}:e}function bn(e,n="negative",s=zF){const r=qF(e,n,s),u={id:String(++PF),title:r.title,detail:r.detail,tone:r.tone??n,durationMs:r.durationMs??s,dedupeKey:r.dedupeKey,cta:r.cta,state:"open"};if(r.dedupeKey){const h=Pn.find(f=>f.dedupeKey===r.dedupeKey);if(h){if((r.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 Pn=Pn.map(b=>b.id===h.id?f:b),um(),NS(f),h.id}}return Pn.length>=IF&&bC(Pn[0].id),Pn=[...Pn,u],um(),NS(u),u.id}function Dg(e){const n=Pn.find(s=>s.id===e);!n||n.state==="closing"||(O1(e),Pn=Pn.map(s=>s.id===e?{...s,state:"closing"}:s),um(),Rg.set(e,setTimeout(()=>{bC(e)},OF)))}function MF(e){return Tg.add(e),()=>{Tg.delete(e)}}function CS(){return Pn}const zg={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",runAdmission:"getApiV1ProjectsByNameRunAdmission"};function On(e,n){const s=zg[n];return e.invalidateQueries({predicate:r=>{const u=r.queryKey[0];return typeof u?._id=="string"&&u._id.startsWith(s)}})}function dse(e,n){return e.invalidateQueries({predicate:s=>{const r=s.queryKey[0];return r?.path?.name!==n||typeof r._id!="string"?!1:r._id.startsWith("getApiV1ProjectsByNameMeasurement")||r._id===zg.queryTracking||r._id===zg.visibilityReport||r._id==="getApiV1ProjectsByNameQueries"||r._id==="getApiV1ProjectsByName"}})}const BF=new Set(["getApiV1Projects","getApiV1Runs","getApiV1History","getApiV1NotificationsEvents"]);function LF(e,n,s){if(!["POST","PUT","PATCH","DELETE"].includes(n.method))return;const u=new URL(n.url).pathname.match(/\/api\/v1\/(.*)$/)?.[1];if(!u||/^(?:telemetry|feedback|auth|session)(?:\/|$)/.test(u))return;const h=u.match(/^projects\/([^/]+)(?:\/(.*))?$/),f=h?h[2]??"":u;if(n.method==="POST"&&/(?:^|\/)(?:[^/]*-preview|preview(?:-[^/]+)?|test|generate)$/.test(f))return;const b=s&&typeof s=="object"?s:null;if(b?.dryRun===!0||u.endsWith("/results/clear")&&b?.confirm!==!0)return;const v=h?decodeURIComponent(h[1]):null,x=h?.[2]?.startsWith("agent/")??!1,S=new Set(v?[v]:[]),k=new Set;if(v)for(const P of e.getQueryCache().getAll()){const M=P.queryKey[0],L=P.state.data,$=M?._id==="getApiV1Projects"&&Array.isArray(L)?L:L&&typeof L=="object"&&"project"in L?[L.project]:M?._id==="getApiV1ProjectsByName"?[L]:[];for(const Q of $)Q&&(Q.name===v||Q.id===v)&&(S.add(Q.name),S.add(Q.id),k.add(Q.id))}const N=P=>{const M=P.queryKey[0];if(x)return M?.path?.name===v&&M._id?.startsWith("getApiV1ProjectsByNameAgent")===!0||P.queryKey[0]==="aero-preview"&&P.queryKey[1]===v;if(M?._id?.startsWith("getApiV1ProjectsByName")&&M.path?.name&&S.has(M.path.name))return!0;const L=P.queryKey[0];if(["projects","project-dashboard-full","project-overview-slim"].includes(L))return k.has(P.queryKey[1]);if(["sentiment","gbp-section-insights","analytics-metrics","aero-preview"].includes(L))return L==="analytics-metrics"&&h?.[2]?.startsWith("competitors")?!1:S.has(P.queryKey[1]);if(L==="setup")return S.has(P.queryKey[2]);const $=P.state.data;return M?._id==="getApiV1RunsById"&&!!$?.projectId&&k.has($.projectId)},T=P=>BF.has(P.queryKey[0]?._id??""),z=n.method==="POST"&&/^(?:runs|technical-aeo\/runs|discover\/run|backlinks\/extract|google\/gsc\/(?:sync|inspect-sitemap)|bing\/inspect-sitemap|(?:gbp|ads|google-ads|gtm)\/sync)$/.test(f),q=P=>{const M=P.queryKey[0];return T(P)||["getApiV1ProjectsByName","getApiV1ProjectsByNameOverview","getApiV1ProjectsByNameRuns","getApiV1ProjectsByNameTechnicalAeoRuns","getApiV1ProjectsByNameTimeline"].includes(M?._id??"")||P.queryKey[0]==="project-dashboard-full"&&P.queryKey[3]==="overview"||P.queryKey[0]==="project-overview-slim"},E=v?P=>N(P)&&(!z||q(P))||!x&&T(P):P=>!z||q(P);if(e.cancelQueries({predicate:E,type:"active"}),h&&!h[2]&&n.method==="DELETE"){e.removeQueries({predicate:N}),e.setQueriesData({predicate:P=>P.queryKey[0]?._id==="getApiV1Projects"},P=>P?.filter(M=>!S.has(M.name)&&!S.has(M.id))),e.setQueriesData({predicate:P=>P.queryKey[0]?._id==="getApiV1Runs"},P=>P?.filter(M=>!k.has(M.projectId))),e.invalidateQueries({predicate:T});return}e.invalidateQueries({predicate:E})}const UF=5*6e4,Bd=30*6e4,mse=3e4,pse=6e4,_i=3e4,VF=2e3,$F=3e4;let _S;function KF(){const e=new x_({defaultOptions:{queries:{staleTime:UF,retry:1,refetchOnWindowFocus:!1}},mutationCache:new w_({onError:(u,h,f,b)=>{b.meta?.skipGlobalErrorToast||bn({title:u instanceof Error?u.message:"An unexpected error occurred",tone:"negative"})}})});_S?.();const n=new WeakSet,s=J.interceptors.request.use(u=>(n.add(u),u)),r=J.interceptors.response.use((u,h,f)=>(u.ok&&n.has(h)&&LF(e,h,f.body),u));return _S=()=>{J.interceptors.request.eject(s),J.interceptors.response.eject(r)},e}const GF="modulepreload",HF=function(e,n){return new URL(e,n).href},TS={},Fs=function(n,s,r){let u=Promise.resolve();if(s&&s.length>0){let x=function(S){return Promise.all(S.map(k=>Promise.resolve(k).then(N=>({status:"fulfilled",value:N}),N=>({status:"rejected",reason:N}))))};const f=document.getElementsByTagName("link"),b=document.querySelector("meta[property=csp-nonce]"),v=b?.nonce||b?.getAttribute("nonce");u=x(s.map(S=>{if(S=HF(S,r),S in TS)return;TS[S]=!0;const k=S.endsWith(".css"),N=k?'[rel="stylesheet"]':"";if(r)for(let z=f.length-1;z>=0;z--){const q=f[z];if(q.href===S&&(!k||q.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${S}"]${N}`))return;const T=document.createElement("link");if(T.rel=k?"stylesheet":GF,k||(T.as="script"),T.crossOrigin="",T.href=S,v&&T.setAttribute("nonce",v),document.head.appendChild(T),k)return new Promise((z,q)=>{T.addEventListener("load",z),T.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${S}`)))})}))}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)})},P1=C.createContext({view:null,publish:()=>()=>{}});function FF({children:e}){const[n,s]=C.useState(null),r=C.useCallback(u=>(s(u),()=>s(h=>h===u?null:h)),[]);return l.jsx(P1.Provider,{value:C.useMemo(()=>({view:n,publish:r}),[n,r]),children:e})}function hse(e,n){const{publish:s}=C.useContext(P1),r=JSON.stringify(n);C.useEffect(()=>s({project:e,context:JSON.parse(r)}),[s,e,r])}function QF(e,n){const{view:s}=C.useContext(P1);return s?.project===e&&s.context.view===n.view?s.context:n}var ZF=(e=>(e.Clicks="clicks",e.Impressions="impressions",e.CTR="ctr",e.Position="position",e))(ZF||{});const fse={clicks:"Clicks",impressions:"Impressions",ctr:"CTR",position:"Position"},gse={clicks:"Clicks",impressions:"Impr",ctr:"CTR",position:"Pos"},YF=D0;function yse(e){return e.endsWith("%")?{figure:e.slice(0,-1),sign:"%"}:{figure:e,sign:""}}function bse(e,n){return n==="cited"?JG(e):XG(e)}function vse(e,n){const s=Dc(e);switch(n){case"cited":return`${s} cited (any page)`;case"emerging":return`${s} newly cited (any page)`;case"lost":return`${s} citation lost (any page)`;case"not-cited":return`${s} not cited (any page)`;case"pending":return"Pending"}}function XF(e){const n=[];if(e.message&&n.push(e.message),e.providers)for(const[s,r]of Object.entries(e.providers)){const u=`[${s}] ${r.message}`;r.raw!==void 0?n.push(`${u}
53
+
54
+ ${JSON.stringify(r.raw,null,2)}`):n.push(u)}return n.length>0?n.join(`
55
+
56
+ `):"Run failed."}function JF(e){return e.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function WF(e,n,s=new Date){const r=new Date(e);if(Number.isNaN(r.getTime()))return e;const u=r.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"});return n&&new Date(n).toDateString()===r.toDateString()?u:`${eQ(e,s)}, ${u}`}function eQ(e,n=new Date){const s=new Date(e);return Number.isNaN(s.getTime())?e:s.getFullYear()===n.getFullYear()?tQ(e):s.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function tQ(e){const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function nQ(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}function xse(e){return e===null?"Unknown":e?"Pass":"Fail"}function ES(e){return e===0?"12:00 AM":e<12?`${e}:00 AM`:e===12?"12:00 PM":`${e-12}:00 PM`}function wse(e,n){return e==="twice-daily"?"twice-daily":e.startsWith("weekly@")?`${e}@${n}`:`daily@${n}`}function Sse(e,n){if(!e)return{freq:"custom",hour:6,customCron:n};if(e==="twice-daily")return{freq:"twice-daily",hour:6,customCron:""};const s=e.match(/^daily(?:@(\d+))?$/);if(s)return{freq:"daily",hour:s[1]?parseInt(s[1]):6,customCron:""};const r=e.match(/^(weekly@(?:mon|tue|wed|thu|fri|sat|sun))(?:@(\d+))?$/);return r?{freq:r[1],hour:r[2]?parseInt(r[2]):6,customCron:""}:{freq:"custom",hour:6,customCron:n}}function kse(e,n,s){const r=s==="UTC"?"UTC":s.split("/").pop()?.replace(/_/g," ")??s;if(!e)return`Custom: ${n} · ${r}`;if(e==="twice-daily")return`Twice a day (6am & 6pm) · ${r}`;const u=e.match(/^daily(?:@(\d+))?$/);if(u){const f=u[1]?parseInt(u[1]):6;return`Every day at ${ES(f)} · ${r}`}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 ${ES(b)} · ${r}`}return`${e} · ${r}`}function aQ(e,n){return n&&n!==e?`${e} · ${n}`:e}function jse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Intl.DateTimeFormat("en-US",{timeZoneName:"short"}).formatToParts().find(s=>s.type==="timeZoneName")?.value;return aQ(e,n)}function sQ(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 iQ(e,n){return!n||n.includes(e)}const vC=["overview","search-console","local","activity","backlinks","technical-aeo","history","settings"],oQ=new Set(vC);function rQ(e){if(AN(e))return[];const n=e??vC,s=[...new Set(n.filter(r=>oQ.has(r)))];return s.length>0?s:["overview"]}function Ase(e){return e?rQ(e.projectTabs):void 0}function Nse(e,n){return iQ(e,n)||!n?e:n.includes("overview")?"overview":n[0]??"overview"}const RS={bg:"--canonry-embed-bg",fg:"--canonry-embed-fg",accent:"--color-link"},lQ=/^(?:#(?:[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 cQ(e){const n=e?.mode?.trim();return n==="light"||n==="dark"?n:void 0}function uQ(e){if(!e)return{};const n={};for(const[s,r]of Object.entries(e)){const u=Object.hasOwn(RS,s)?RS[s]:void 0;if(!u||typeof r!="string")continue;const h=r.trim();lQ.test(h)&&(n[u]=h)}return n}const he=(e,n,s,r)=>{const u={_id:e,baseUrl:n?.baseUrl||(n?.client??I).getConfig().baseUrl};return s&&(u._infinite=s),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]},Kr=e=>he("getApiV1Projects",e),Lo=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await x6({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:Kr(e)}),dQ=e=>he("getApiV1ProjectsByName",e),mQ=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await Hk({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:dQ(e)}),pQ=e=>he("getApiV1ProjectsByNameMeasurementPlan",e),Cse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await j6({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:pQ(e)}),hQ=e=>he("getApiV1ProjectsByNameMeasurementReport",e),_se=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await A6({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:hQ(e)}),fQ=e=>he("getApiV1ProjectsByNameMeasurementSetup",e),gQ=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await N6({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:fQ(e)}),yQ=e=>he("getApiV1ProjectsByNameMeasurementPlanDraft",e),Tse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await C6({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:yQ(e)}),au=(e,n)=>{const s={...e[0]};return n.body&&(s.body={...e[0].body,...n.body}),n.headers&&(s.headers={...e[0].headers,...n.headers}),n.path&&(s.path={...e[0].path,...n.path}),n.query&&(s.query={...e[0].query,...n.query}),s},Ese=e=>({mutationFn:async s=>{const{data:r}=await _6({...e,...s,throwOnError:!0});return r}}),bQ=e=>he("getApiV1ProjectsByNameMeasurementOverview",e),Rse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await Fk({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:bQ(e)}),vQ=e=>he("getApiV1ProjectsByNameMeasurementOverview",e,!0),Dse=e=>Bc({queryFn:async({pageParam:n,queryKey:s,signal:r})=>{const h=au(s,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await Fk({...e,...h,signal:r,throwOnError:!0});return f},queryKey:vQ(e)}),xQ=e=>he("getApiV1ProjectsByNameVisibilityReport",e),zse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await q6({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:xQ(e)}),wQ=e=>he("getApiV1ProjectsByNameMeasurementPropertyEvidence",e,!0),Ise=e=>Bc({queryFn:async({pageParam:n,queryKey:s,signal:r})=>{const h=au(s,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await M6({...e,...h,signal:r,throwOnError:!0});return f},queryKey:wQ(e)}),SQ=e=>he("getApiV1ProjectsByNameMeasurementQuestionResult",e),Ose=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await B6({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:SQ(e)}),kQ=e=>he("getApiV1ProjectsByNameMeasurementPropertyCompetitors",e),Pse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await L6({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:kQ(e)}),jQ=e=>he("getApiV1ProjectsByNameMeasurementQueryTemplates",e),qse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await U6({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:jQ(e)}),Mse=e=>({mutationFn:async s=>{const{data:r}=await V6({...e,...s,throwOnError:!0});return r}}),AQ=e=>he("getApiV1ProjectsByNameResearchRuns",e,!0),Bse=e=>Bc({queryFn:async({pageParam:n,queryKey:s,signal:r})=>{const h=au(s,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await $6({...e,...h,signal:r,throwOnError:!0});return f},queryKey:AQ(e)}),Lse=e=>({mutationFn:async s=>{const{data:r}=await K6({...e,...s,throwOnError:!0});return r}}),NQ=e=>he("getApiV1ProjectsByNameQueryTracking",e),Use=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await G6({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:NQ(e)}),Vse=e=>({mutationFn:async s=>{const{data:r}=await H6({...e,...s,throwOnError:!0});return r}}),$se=e=>({mutationFn:async s=>{const{data:r}=await F6({...e,...s,throwOnError:!0});return r}}),CQ=e=>he("getApiV1ProjectsByNameResearchRunsByRunId",e),Kse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await Q6({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:CQ(e)}),xC=e=>he("getApiV1ProjectsByNameQueries",e),Gse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await Qk({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:xC(e)}),_Q=e=>he("getApiV1ProjectsByNameAnalyticsCompetitors",e),Hse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await iT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:_Q(e)}),TQ=e=>he("getApiV1ProjectsByNameRuns",e),wC=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await Zk({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:TQ(e)}),EQ=e=>he("getApiV1ProjectsByNameRunAdmission",e),Fse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await rT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:EQ(e)}),SC=e=>he("getApiV1Runs",e),qc=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await lT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:SC(e)}),RQ=e=>he("getApiV1RunsById",e),q1=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await Yk({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:RQ(e)}),DQ=e=>he("getApiV1ProjectsByNameHistory",e),Qse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await dT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:DQ(e)}),zQ=e=>he("getApiV1History",e),Zse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await mT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:zQ(e)}),IQ=e=>he("getApiV1ProjectsByNameSnapshotsDiff",e),Yse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await fT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:IQ(e)}),OQ=e=>he("getApiV1Settings",e),PQ=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await Xk({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:OQ(e)}),qQ=e=>he("getApiV1ProjectsByNameSchedule",e),MQ=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await ST({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:qQ(e)}),BQ=e=>he("getApiV1ProjectsByNameSchedules",e),Xse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await jT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:BQ(e)}),kC=e=>he("getApiV1Telemetry",e),LQ=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await TT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:kC(e)}),UQ=e=>({mutationFn:async s=>{const{data:r}=await ET({...e,...s,throwOnError:!0});return r}}),VQ=e=>he("getApiV1CdpStatus",e),$Q=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await Jk({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:VQ(e)}),KQ=e=>he("getApiV1ProjectsByNameGoogleAdsStatus",e),Jse=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await zT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:KQ(e)}),Wse=e=>({mutationFn:async s=>{const{data:r}=await IT({...e,...s,throwOnError:!0});return r}}),GQ=e=>he("getApiV1ProjectsByNameGoogleAdsCustomers",e),eie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await OT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:GQ(e)}),tie=e=>({mutationFn:async s=>{const{data:r}=await PT({...e,...s,throwOnError:!0});return r}}),nie=e=>({mutationFn:async s=>{const{data:r}=await qT({...e,...s,throwOnError:!0});return r}}),HQ=e=>he("getApiV1ProjectsByNameGoogleAdsPerformance",e),aie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await MT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:HQ(e)}),FQ=e=>he("getApiV1ProjectsByNameGoogleAdsSnapshots",e),sie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await BT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:FQ(e)}),iie=e=>({mutationFn:async s=>{const{data:r}=await LT({...e,...s,throwOnError:!0});return r}}),QQ=e=>he("getApiV1ProjectsByNameGtmStatus",e),oie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await UT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:QQ(e)}),rie=e=>({mutationFn:async s=>{const{data:r}=await VT({...e,...s,throwOnError:!0});return r}}),ZQ=e=>he("getApiV1ProjectsByNameGtmAccounts",e),lie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await $T({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:ZQ(e)}),YQ=e=>he("getApiV1ProjectsByNameGtmAccountsByAccountIdContainers",e),cie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await KT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:YQ(e)}),XQ=e=>he("getApiV1ProjectsByNameGtmAccountsByAccountIdContainersByContainerIdWorkspaces",e),uie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await GT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:XQ(e)}),die=e=>({mutationFn:async s=>{const{data:r}=await HT({...e,...s,throwOnError:!0});return r}}),mie=e=>({mutationFn:async s=>{const{data:r}=await FT({...e,...s,throwOnError:!0});return r}}),JQ=e=>he("getApiV1ProjectsByNameGtmSnapshots",e),pie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await QT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:JQ(e)}),hie=e=>({mutationFn:async s=>{const{data:r}=await ZT({...e,...s,throwOnError:!0});return r}}),WQ=e=>he("getApiV1ProjectsByNameConversionTrackingOptions",e),fie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await YT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:WQ(e)}),eZ=e=>he("getApiV1ProjectsByNameConversionTrackingContracts",e),gie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await XT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:eZ(e)}),yie=e=>({mutationFn:async s=>{const{data:r}=await JT({...e,...s,throwOnError:!0});return r}}),tZ=e=>he("getApiV1ProjectsByNameConversionTrackingContractsByContractIdIntegrity",e),bie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await WT({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:tZ(e)}),nZ=e=>he("getApiV1ProjectsByNameGoogleConnections",e),vie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await eE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:nZ(e)}),aZ=e=>he("getApiV1ProjectsByNameGoogleProperties",e),xie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await aE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:aZ(e)}),sZ=e=>he("getApiV1ProjectsByNameGoogleGscPerformance",e),wie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await rE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:sZ(e)}),iZ=e=>he("getApiV1ProjectsByNameGoogleGscPerformanceDaily",e),Sie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await lE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:iZ(e)}),oZ=e=>he("getApiV1ProjectsByNameGoogleGscInspections",e),kie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await uE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:oZ(e)}),rZ=e=>he("getApiV1ProjectsByNameGoogleGscDeindexed",e),jie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await dE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:rZ(e)}),lZ=e=>he("getApiV1ProjectsByNameGoogleGscCoverage",e),Aie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await mE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:lZ(e)}),cZ=e=>he("getApiV1ProjectsByNameGoogleGscCoverageHistory",e),Nie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await pE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:cZ(e)}),Cie=e=>he("getApiV1ProjectsByNameGoogleGscSitemaps",e),uZ=e=>he("getApiV1ProjectsByNameGbpLocations",e),_ie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await yE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:uZ(e)}),Tie=e=>({mutationFn:async s=>{const{data:r}=await bE({...e,...s,throwOnError:!0});return r}}),Eie=e=>({mutationFn:async s=>{const{data:r}=await vE({...e,...s,throwOnError:!0});return r}}),dZ=e=>he("getApiV1ProjectsByNameGbpKeywords",e),Rie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await xE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:dZ(e)}),mZ=e=>he("getApiV1ProjectsByNameGbpPlaceActions",e),Die=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await wE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:mZ(e)}),pZ=e=>he("getApiV1ProjectsByNameGbpLodging",e),zie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await SE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:pZ(e)}),hZ=e=>he("getApiV1ProjectsByNameGbpPlaces",e),Iie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await kE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:hZ(e)}),fZ=e=>he("getApiV1ProjectsByNameGbpSummary",e),Oie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await jE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:fZ(e)}),gZ=e=>he("getApiV1ProjectsByNameBingStatus",e),Pie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await CE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:gZ(e)}),yZ=e=>he("getApiV1ProjectsByNameBingSites",e),qie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await _E({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:yZ(e)}),bZ=e=>he("getApiV1ProjectsByNameBingCoverage",e),Mie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await EE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:bZ(e)}),vZ=e=>he("getApiV1ProjectsByNameBingInspections",e),Bie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await RE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:vZ(e)}),xZ=e=>he("getApiV1ProjectsByNameBingPerformance",e),Lie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await OE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:xZ(e)}),wZ=e=>he("getApiV1ProjectsByNameGaStatus",e),Uie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await ME({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:wZ(e)}),SZ=e=>he("getApiV1ProjectsByNameGaSearchLandingPages",e),Vie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await BE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:SZ(e)}),kZ=e=>he("getApiV1ProjectsByNameGaTraffic",e),$ie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await UE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:kZ(e)}),jZ=e=>he("getApiV1ProjectsByNameGaAiReferralDaily",e),Kie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await VE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:jZ(e)}),AZ=e=>he("getApiV1ProjectsByNameGaSocialReferralHistory",e),Gie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await $E({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:AZ(e)}),NZ=e=>he("getApiV1ProjectsByNameGaSessionHistory",e),Hie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await KE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:NZ(e)}),CZ=e=>he("getApiV1ProjectsByNameHealthHistory",e),Fie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await HE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:CZ(e)}),_Z=e=>he("getApiV1ProjectsByNameCitationsVisibility",e),Qie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await FE({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:_Z(e)}),TZ=e=>he("getApiV1ProjectsByNameTrafficSources",e),Zie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await m8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:TZ(e)}),EZ=e=>he("getApiV1ProjectsByNameTrafficStatus",e),Yie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await p8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:EZ(e)}),RZ=e=>he("getApiV1ProjectsByNameTrafficSourcesById",e),Xie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await h8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:RZ(e)}),DZ=e=>he("getApiV1ProjectsByNameTrafficEvents",e),Jie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await f8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:DZ(e)}),zZ=e=>he("getApiV1ProjectsByNameDiscoverSessions",e),Wie=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await y8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:zZ(e)}),IZ=e=>he("getApiV1ProjectsByNameDiscoverSessionsById",e),eoe=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await b8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:IZ(e)}),OZ=e=>he("getApiV1ProjectsByNameTechnicalAeo",e),PZ=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await v8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:OZ(e)}),qZ=e=>he("getApiV1ProjectsByNameTechnicalAeoPages",e),toe=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await x8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:qZ(e)}),MZ=e=>he("getApiV1ProjectsByNameTechnicalAeoTrend",e),noe=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await w8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:MZ(e)}),BZ=e=>he("getApiV1ProjectsByNameTechnicalAeoCrawl",e),aoe=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await S8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:BZ(e)}),LZ=e=>he("getApiV1ProjectsByNameTechnicalAeoGraph",e),soe=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await k8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:LZ(e)}),UZ=e=>he("getApiV1ProjectsByNameTechnicalAeoCrawlPagesAudit",e),ioe=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await j8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:UZ(e)}),VZ=e=>he("getApiV1ProjectsByNameTechnicalAeoCrawlPages",e),ooe=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await Wk({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:VZ(e)}),$Z=e=>he("getApiV1ProjectsByNameTechnicalAeoCrawlPages",e,!0),roe=e=>Bc({queryFn:async({pageParam:n,queryKey:s,signal:r})=>{const h=au(s,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await Wk({...e,...h,signal:r,throwOnError:!0});return f},queryKey:$Z(e)}),KZ=e=>he("getApiV1ProjectsByNameTechnicalAeoStructure",e,!0),loe=e=>Bc({queryFn:async({pageParam:n,queryKey:s,signal:r})=>{const h=au(s,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await A8({...e,...h,signal:r,throwOnError:!0});return f},queryKey:KZ(e)}),GZ=e=>he("getApiV1ProjectsByNameTechnicalAeoInternalLinksNeighbors",e),coe=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await N8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:GZ(e)}),HZ=e=>he("getApiV1ProjectsByNameTechnicalAeoDeadLinks",e),uoe=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await C8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:HZ(e)}),FZ=e=>he("getApiV1ProjectsByNameTechnicalAeoRuns",e),doe=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await _8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:FZ(e)}),QZ=e=>he("getApiV1ProjectsByNameTechnicalAeoRunsByRunIdProgress",e),moe=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await E8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:QZ(e)}),ZZ=e=>he("getApiV1ProjectsByNameTechnicalAeoRunsByRunIdPageHealthPreview",e),poe=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await R8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:ZZ(e)}),YZ=e=>he("getApiV1ProjectsByNameAgentProviders",e),XZ=e=>be({queryFn:async({queryKey:n,signal:s})=>{const{data:r}=await P8({...e,...n[0],signal:s,throwOnError:!0});return r},queryKey:YZ(e)});function DS(e){return e.state==="ok"?"positive":e.state==="checking"||e.state==="disabled"?"neutral":"negative"}function jC(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 hoe(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 foe={positive:"text-positive-400",caution:"text-caution-400",negative:"text-negative-400",neutral:"text-secondary"};function goe(e){return e>=50?"positive":e>=25?"caution":"negative"}function JZ(e){return e.displayName??e.name.charAt(0).toUpperCase()+e.name.slice(1)}function Gr(e){const n=[e.detail,e.hint].filter(Boolean);return n.length>0?n.join(`
57
+ `):void 0}function WZ(e,n,s){const r=e.filter(f=>f.id!=="mcp").map(f=>{if(f.id==="api")return{...f,tone:DS(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(f.id==="worker")return{...f,tone:DS(n.workerStatus),detail:n.workerStatus.state==="ok"?"Healthy":n.workerStatus.state==="disabled"?"Disabled":"Needs attention",meta:n.workerStatus.detail};const b=s.providerStatuses.filter(k=>k.state==="ready").length,v=s.providerStatuses.length,x=b>0,S=s.providerStatuses.filter(k=>k.state==="ready").map(k=>JZ(k)).join(" · ");return{...f,label:"Providers",tone:x?"positive":"caution",detail:`${b} of ${v} configured`,meta:S||"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.")),r.splice(Math.max(0,r.findIndex(f=>f.id==="api")+1),0,h),r}function eY(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(s=>s.state==="ready"))return"Launch is blocked until at least one provider is configured."}function tY(e,n,s){const r=eY(n,s),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=s.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=r===void 0,u.launchState.blockedReason=r,u.launchState.summary=r??"Queue a visibility sweep first, then follow with a site audit to explain movement.",u}const AC="canonry.run-tracker",Ig=new Set;let zS=!1,nY=0,Zm={runs:{},batches:{}};function aY(){const e=Gs();for(const n of Ig)n(e)}function sY(e){if(!e)return{runs:{},batches:{}};try{const n=JSON.parse(e);return{runs:n.runs??{},batches:n.batches??{}}}catch{return{runs:{},batches:{}}}}function iY(){typeof window>"u"||window.sessionStorage.setItem(AC,JSON.stringify(Zm))}function NC(){zS||(zS=!0,!(typeof window>"u")&&(Zm=sY(window.sessionStorage.getItem(AC))))}function Ym(e){Zm=e,iY(),aY()}function Gs(){return NC(),Zm}function CC(e){return NC(),Ig.add(e),()=>{Ig.delete(e)}}function M1(e){const n=Gs();Ym({...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 Gf(e){const n=Gs();if(!n.runs[e])return;const{[e]:s,...r}=n.runs;Ym({...n,runs:r})}function oY(e){const n=Gs(),s=`batch_${Date.now()}_${++nY}`;return Ym({...n,batches:{...n.batches,[s]:{batchId:s,runIds:e.runIds,queuedCount:e.queuedCount,skippedCount:e.skippedCount}}}),s}function rY(e){const n=Gs();if(!n.batches[e])return;const{[e]:s,...r}=n.batches;Ym({...n,batches:r})}function lY(e){return e==="completed"||e==="partial"||e==="failed"||e==="cancelled"}const cY=10*6e4;function uY(e,n,s,r){return e.filter(u=>!n.has(u.runId)&&s-(u.trackedAt??0)>=r)}function dY(e,n){let s=0,r=0,u=0,h=0,f=0;for(const b of e){const v=n[b]?.status;v==="completed"?s+=1:v==="partial"?r+=1:v==="failed"?u+=1:v==="cancelled"?h+=1:f+=1}return{completed:s,partial:r,failed:u,cancelled:h,pending:f,finished:f===0}}const IS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,OS=Ek,_C=(e,n)=>s=>{var r;if(n?.variants==null)return OS(e,s?.class,s?.className);const{variants:u,defaultVariants:h}=n,f=Object.keys(u).map(x=>{const S=s?.[x],k=h?.[x];if(S===null)return null;const N=IS(S)||IS(k);return u[x][N]}),b=s&&Object.entries(s).reduce((x,S)=>{let[k,N]=S;return N===void 0||(x[k]=N),x},{}),v=n==null||(r=n.compoundVariants)===null||r===void 0?void 0:r.reduce((x,S)=>{let{class:k,className:N,...T}=S;return Object.entries(T).every(z=>{let[q,E]=z;return Array.isArray(E)?E.includes({...h,...b}[q]):{...h,...b}[q]===E})?[...x,k,N]:x},[]);return OS(e,f,v,s?.class,s?.className)},mY=(e,n)=>{const s=new Array(e.length+n.length);for(let r=0;r<e.length;r++)s[r]=e[r];for(let r=0;r<n.length;r++)s[e.length+r]=n[r];return s},pY=(e,n)=>({classGroupId:e,validator:n}),TC=(e=new Map,n=null,s)=>({nextPart:e,validators:n,classGroupId:s}),dm="-",PS=[],hY="arbitrary..",fY=e=>{const n=yY(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return gY(f);const b=f.split(dm),v=b[0]===""&&b.length>1?1:0;return EC(b,v,n)},getConflictingClassGroupIds:(f,b)=>{if(b){const v=r[f],x=s[f];return v?x?mY(x,v):v:x||PS}return s[f]||PS}}},EC=(e,n,s)=>{if(e.length-n===0)return s.classGroupId;const u=e[n],h=s.nextPart.get(u);if(h){const x=EC(e,n+1,h);if(x)return x}const f=s.validators;if(f===null)return;const b=n===0?e.join(dm):e.slice(n).join(dm),v=f.length;for(let x=0;x<v;x++){const S=f[x];if(S.validator(b))return S.classGroupId}},gY=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),s=n.indexOf(":"),r=n.slice(0,s);return r?hY+r:void 0})(),yY=e=>{const{theme:n,classGroups:s}=e;return bY(s,n)},bY=(e,n)=>{const s=TC();for(const r in e){const u=e[r];B1(u,s,r,n)}return s},B1=(e,n,s,r)=>{const u=e.length;for(let h=0;h<u;h++){const f=e[h];vY(f,n,s,r)}},vY=(e,n,s,r)=>{if(typeof e=="string"){xY(e,n,s);return}if(typeof e=="function"){wY(e,n,s,r);return}SY(e,n,s,r)},xY=(e,n,s)=>{const r=e===""?n:RC(n,e);r.classGroupId=s},wY=(e,n,s,r)=>{if(kY(e)){B1(e(r),n,s,r);return}n.validators===null&&(n.validators=[]),n.validators.push(pY(s,e))},SY=(e,n,s,r)=>{const u=Object.entries(e),h=u.length;for(let f=0;f<h;f++){const[b,v]=u[f];B1(v,RC(n,b),s,r)}},RC=(e,n)=>{let s=e;const r=n.split(dm),u=r.length;for(let h=0;h<u;h++){const f=r[h];let b=s.nextPart.get(f);b||(b=TC(),s.nextPart.set(f,b)),s=b}return s},kY=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,jY=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,s=Object.create(null),r=Object.create(null);const u=(h,f)=>{s[h]=f,n++,n>e&&(n=0,r=s,s=Object.create(null))};return{get(h){let f=s[h];if(f!==void 0)return f;if((f=r[h])!==void 0)return u(h,f),f},set(h,f){h in s?s[h]=f:u(h,f)}}},Og="!",qS=":",AY=[],MS=(e,n,s,r,u)=>({modifiers:e,hasImportantModifier:n,baseClassName:s,maybePostfixModifierPosition:r,isExternal:u}),NY=e=>{const{prefix:n,experimentalParseClassName:s}=e;let r=u=>{const h=[];let f=0,b=0,v=0,x;const S=u.length;for(let q=0;q<S;q++){const E=u[q];if(f===0&&b===0){if(E===qS){h.push(u.slice(v,q)),v=q+1;continue}if(E==="/"){x=q;continue}}E==="["?f++:E==="]"?f--:E==="("?b++:E===")"&&b--}const k=h.length===0?u:u.slice(v);let N=k,T=!1;k.endsWith(Og)?(N=k.slice(0,-1),T=!0):k.startsWith(Og)&&(N=k.slice(1),T=!0);const z=x&&x>v?x-v:void 0;return MS(h,T,N,z)};if(n){const u=n+qS,h=r;r=f=>f.startsWith(u)?h(f.slice(u.length)):MS(AY,!1,f,void 0,!0)}if(s){const u=r;r=h=>s({className:h,parseClassName:u})}return r},CY=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((s,r)=>{n.set(s,1e6+r)}),s=>{const r=[];let u=[];for(let h=0;h<s.length;h++){const f=s[h],b=f[0]==="[",v=n.has(f);b||v?(u.length>0&&(u.sort(),r.push(...u),u=[]),r.push(f)):u.push(f)}return u.length>0&&(u.sort(),r.push(...u)),r}},_Y=e=>({cache:jY(e.cacheSize),parseClassName:NY(e),sortModifiers:CY(e),...fY(e)}),TY=/\s+/,EY=(e,n)=>{const{parseClassName:s,getClassGroupId:r,getConflictingClassGroupIds:u,sortModifiers:h}=n,f=[],b=e.trim().split(TY);let v="";for(let x=b.length-1;x>=0;x-=1){const S=b[x],{isExternal:k,modifiers:N,hasImportantModifier:T,baseClassName:z,maybePostfixModifierPosition:q}=s(S);if(k){v=S+(v.length>0?" "+v:v);continue}let E=!!q,P=r(E?z.substring(0,q):z);if(!P){if(!E){v=S+(v.length>0?" "+v:v);continue}if(P=r(z),!P){v=S+(v.length>0?" "+v:v);continue}E=!1}const M=N.length===0?"":N.length===1?N[0]:h(N).join(":"),L=T?M+Og:M,$=L+P;if(f.indexOf($)>-1)continue;f.push($);const Q=u(P,E);for(let ae=0;ae<Q.length;++ae){const V=Q[ae];f.push(L+V)}v=S+(v.length>0?" "+v:v)}return v},RY=(...e)=>{let n=0,s,r,u="";for(;n<e.length;)(s=e[n++])&&(r=DC(s))&&(u&&(u+=" "),u+=r);return u},DC=e=>{if(typeof e=="string")return e;let n,s="";for(let r=0;r<e.length;r++)e[r]&&(n=DC(e[r]))&&(s&&(s+=" "),s+=n);return s},DY=(e,...n)=>{let s,r,u,h;const f=v=>{const x=n.reduce((S,k)=>k(S),e());return s=_Y(x),r=s.cache.get,u=s.cache.set,h=b,b(v)},b=v=>{const x=r(v);if(x)return x;const S=EY(v,s);return u(v,S),S};return h=f,(...v)=>h(RY(...v))},zY=[],hn=e=>{const n=s=>s[e]||zY;return n.isThemeGetter=!0,n},zC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,IC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,IY=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,OY=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PY=/\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$/,qY=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,MY=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BY=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ji=e=>IY.test(e),it=e=>!!e&&!Number.isNaN(Number(e)),Ai=e=>!!e&&Number.isInteger(Number(e)),Hf=e=>e.endsWith("%")&&it(e.slice(0,-1)),Ps=e=>OY.test(e),OC=()=>!0,LY=e=>PY.test(e)&&!qY.test(e),L1=()=>!1,UY=e=>MY.test(e),VY=e=>BY.test(e),$Y=e=>!Re(e)&&!De(e),KY=e=>Ui(e,MC,L1),Re=e=>zC.test(e),go=e=>Ui(e,BC,LY),BS=e=>Ui(e,JY,it),GY=e=>Ui(e,UC,OC),HY=e=>Ui(e,LC,L1),LS=e=>Ui(e,PC,L1),FY=e=>Ui(e,qC,VY),Cd=e=>Ui(e,VC,UY),De=e=>IC.test(e),gc=e=>Uo(e,BC),QY=e=>Uo(e,LC),US=e=>Uo(e,PC),ZY=e=>Uo(e,MC),YY=e=>Uo(e,qC),_d=e=>Uo(e,VC,!0),XY=e=>Uo(e,UC,!0),Ui=(e,n,s)=>{const r=zC.exec(e);return r?r[1]?n(r[1]):s(r[2]):!1},Uo=(e,n,s=!1)=>{const r=IC.exec(e);return r?r[1]?n(r[1]):s:!1},PC=e=>e==="position"||e==="percentage",qC=e=>e==="image"||e==="url",MC=e=>e==="length"||e==="size"||e==="bg-size",BC=e=>e==="length",JY=e=>e==="number",LC=e=>e==="family-name",UC=e=>e==="number"||e==="weight",VC=e=>e==="shadow",WY=()=>{const e=hn("color"),n=hn("font"),s=hn("text"),r=hn("font-weight"),u=hn("tracking"),h=hn("leading"),f=hn("breakpoint"),b=hn("container"),v=hn("spacing"),x=hn("radius"),S=hn("shadow"),k=hn("inset-shadow"),N=hn("text-shadow"),T=hn("drop-shadow"),z=hn("blur"),q=hn("perspective"),E=hn("aspect"),P=hn("ease"),M=hn("animate"),L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Q=()=>[...$(),De,Re],ae=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],Z=()=>[De,Re,v],X=()=>[ji,"full","auto",...Z()],Ce=()=>[Ai,"none","subgrid",De,Re],tt=()=>["auto",{span:["full",Ai,De,Re]},Ai,De,Re],Ke=()=>[Ai,"auto",De,Re],Ue=()=>["auto","min","max","fr",De,Re],ke=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Le=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...Z()],W=()=>[ji,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Z()],ve=()=>[ji,"screen","full","dvw","lvw","svw","min","max","fit",...Z()],Ae=()=>[ji,"screen","full","lh","dvh","lvh","svh","min","max","fit",...Z()],ie=()=>[e,De,Re],Se=()=>[...$(),US,LS,{position:[De,Re]}],Me=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",ZY,KY,{size:[De,Re]}],pe=()=>[Hf,gc,go],ce=()=>["","none","full",x,De,Re],ue=()=>["",it,gc,go],_e=()=>["solid","dashed","dotted","double"],Qe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>[it,Hf,US,LS],Ct=()=>["","none",z,De,Re],me=()=>["none",it,De,Re],Be=()=>["none",it,De,Re],Ne=()=>[it,De,Re],re=()=>[ji,"full",...Z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ps],breakpoint:[Ps],color:[OC],container:[Ps],"drop-shadow":[Ps],ease:["in","out","in-out"],font:[$Y],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ps],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ps],shadow:[Ps],spacing:["px",it],text:[Ps],"text-shadow":[Ps],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ji,Re,De,E]}],container:["container"],columns:[{columns:[it,Re,De,b]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"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:Q()}],overflow:[{overflow:ae()}],"overflow-x":[{"overflow-x":ae()}],"overflow-y":[{"overflow-y":ae()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{"inset-s":X(),start:X()}],end:[{"inset-e":X(),end:X()}],"inset-bs":[{"inset-bs":X()}],"inset-be":[{"inset-be":X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[Ai,"auto",De,Re]}],basis:[{basis:[ji,"full","auto",b,...Z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[it,ji,"auto","initial","none",Re]}],grow:[{grow:["",it,De,Re]}],shrink:[{shrink:["",it,De,Re]}],order:[{order:[Ai,"first","last","none",De,Re]}],"grid-cols":[{"grid-cols":Ce()}],"col-start-end":[{col:tt()}],"col-start":[{"col-start":Ke()}],"col-end":[{"col-end":Ke()}],"grid-rows":[{"grid-rows":Ce()}],"row-start-end":[{row:tt()}],"row-start":[{"row-start":Ke()}],"row-end":[{"row-end":Ke()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ue()}],"auto-rows":[{"auto-rows":Ue()}],gap:[{gap:Z()}],"gap-x":[{"gap-x":Z()}],"gap-y":[{"gap-y":Z()}],"justify-content":[{justify:[...ke(),"normal"]}],"justify-items":[{"justify-items":[...Le(),"normal"]}],"justify-self":[{"justify-self":["auto",...Le()]}],"align-content":[{content:["normal",...ke()]}],"align-items":[{items:[...Le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Le(),{baseline:["","last"]}]}],"place-content":[{"place-content":ke()}],"place-items":[{"place-items":[...Le(),"baseline"]}],"place-self":[{"place-self":["auto",...Le()]}],p:[{p:Z()}],px:[{px:Z()}],py:[{py:Z()}],ps:[{ps:Z()}],pe:[{pe:Z()}],pbs:[{pbs:Z()}],pbe:[{pbe:Z()}],pt:[{pt:Z()}],pr:[{pr:Z()}],pb:[{pb:Z()}],pl:[{pl:Z()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":Z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Z()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],"inline-size":[{inline:["auto",...ve()]}],"min-inline-size":[{"min-inline":["auto",...ve()]}],"max-inline-size":[{"max-inline":["none",...ve()]}],"block-size":[{block:["auto",...Ae()]}],"min-block-size":[{"min-block":["auto",...Ae()]}],"max-block-size":[{"max-block":["none",...Ae()]}],w:[{w:[b,"screen",...W()]}],"min-w":[{"min-w":[b,"screen","none",...W()]}],"max-w":[{"max-w":[b,"screen","none","prose",{screen:[f]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",s,gc,go]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,XY,GY]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hf,Re]}],"font-family":[{font:[QY,HY,n]}],"font-features":[{"font-features":[Re]}],"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,De,Re]}],"line-clamp":[{"line-clamp":[it,"none",De,BS]}],leading:[{leading:[h,...Z()]}],"list-image":[{"list-image":["none",De,Re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,Re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ie()}],"text-color":[{text:ie()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._e(),"wavy"]}],"text-decoration-thickness":[{decoration:[it,"from-font","auto",De,go]}],"text-decoration-color":[{decoration:ie()}],"underline-offset":[{"underline-offset":[it,"auto",De,Re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,Re]}],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",De,Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Se()}],"bg-repeat":[{bg:Me()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ai,De,Re],radial:["",De,Re],conic:[Ai,De,Re]},YY,FY]}],"bg-color":[{bg:ie()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:ie()}],"gradient-via":[{via:ie()}],"gradient-to":[{to:ie()}],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:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[..._e(),"hidden","none"]}],"divide-style":[{divide:[..._e(),"hidden","none"]}],"border-color":[{border:ie()}],"border-color-x":[{"border-x":ie()}],"border-color-y":[{"border-y":ie()}],"border-color-s":[{"border-s":ie()}],"border-color-e":[{"border-e":ie()}],"border-color-bs":[{"border-bs":ie()}],"border-color-be":[{"border-be":ie()}],"border-color-t":[{"border-t":ie()}],"border-color-r":[{"border-r":ie()}],"border-color-b":[{"border-b":ie()}],"border-color-l":[{"border-l":ie()}],"divide-color":[{divide:ie()}],"outline-style":[{outline:[..._e(),"none","hidden"]}],"outline-offset":[{"outline-offset":[it,De,Re]}],"outline-w":[{outline:["",it,gc,go]}],"outline-color":[{outline:ie()}],shadow:[{shadow:["","none",S,_d,Cd]}],"shadow-color":[{shadow:ie()}],"inset-shadow":[{"inset-shadow":["none",k,_d,Cd]}],"inset-shadow-color":[{"inset-shadow":ie()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ie()}],"ring-offset-w":[{"ring-offset":[it,go]}],"ring-offset-color":[{"ring-offset":ie()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":ie()}],"text-shadow":[{"text-shadow":["none",N,_d,Cd]}],"text-shadow-color":[{"text-shadow":ie()}],opacity:[{opacity:[it,De,Re]}],"mix-blend":[{"mix-blend":[...Qe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Qe()}],"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":Ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ee()}],"mask-image-linear-from-color":[{"mask-linear-from":ie()}],"mask-image-linear-to-color":[{"mask-linear-to":ie()}],"mask-image-t-from-pos":[{"mask-t-from":Ee()}],"mask-image-t-to-pos":[{"mask-t-to":Ee()}],"mask-image-t-from-color":[{"mask-t-from":ie()}],"mask-image-t-to-color":[{"mask-t-to":ie()}],"mask-image-r-from-pos":[{"mask-r-from":Ee()}],"mask-image-r-to-pos":[{"mask-r-to":Ee()}],"mask-image-r-from-color":[{"mask-r-from":ie()}],"mask-image-r-to-color":[{"mask-r-to":ie()}],"mask-image-b-from-pos":[{"mask-b-from":Ee()}],"mask-image-b-to-pos":[{"mask-b-to":Ee()}],"mask-image-b-from-color":[{"mask-b-from":ie()}],"mask-image-b-to-color":[{"mask-b-to":ie()}],"mask-image-l-from-pos":[{"mask-l-from":Ee()}],"mask-image-l-to-pos":[{"mask-l-to":Ee()}],"mask-image-l-from-color":[{"mask-l-from":ie()}],"mask-image-l-to-color":[{"mask-l-to":ie()}],"mask-image-x-from-pos":[{"mask-x-from":Ee()}],"mask-image-x-to-pos":[{"mask-x-to":Ee()}],"mask-image-x-from-color":[{"mask-x-from":ie()}],"mask-image-x-to-color":[{"mask-x-to":ie()}],"mask-image-y-from-pos":[{"mask-y-from":Ee()}],"mask-image-y-to-pos":[{"mask-y-to":Ee()}],"mask-image-y-from-color":[{"mask-y-from":ie()}],"mask-image-y-to-color":[{"mask-y-to":ie()}],"mask-image-radial":[{"mask-radial":[De,Re]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ee()}],"mask-image-radial-from-color":[{"mask-radial-from":ie()}],"mask-image-radial-to-color":[{"mask-radial-to":ie()}],"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":$()}],"mask-image-conic-pos":[{"mask-conic":[it]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ee()}],"mask-image-conic-from-color":[{"mask-conic-from":ie()}],"mask-image-conic-to-color":[{"mask-conic-to":ie()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Se()}],"mask-repeat":[{mask:Me()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,Re]}],filter:[{filter:["","none",De,Re]}],blur:[{blur:Ct()}],brightness:[{brightness:[it,De,Re]}],contrast:[{contrast:[it,De,Re]}],"drop-shadow":[{"drop-shadow":["","none",T,_d,Cd]}],"drop-shadow-color":[{"drop-shadow":ie()}],grayscale:[{grayscale:["",it,De,Re]}],"hue-rotate":[{"hue-rotate":[it,De,Re]}],invert:[{invert:["",it,De,Re]}],saturate:[{saturate:[it,De,Re]}],sepia:[{sepia:["",it,De,Re]}],"backdrop-filter":[{"backdrop-filter":["","none",De,Re]}],"backdrop-blur":[{"backdrop-blur":Ct()}],"backdrop-brightness":[{"backdrop-brightness":[it,De,Re]}],"backdrop-contrast":[{"backdrop-contrast":[it,De,Re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",it,De,Re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[it,De,Re]}],"backdrop-invert":[{"backdrop-invert":["",it,De,Re]}],"backdrop-opacity":[{"backdrop-opacity":[it,De,Re]}],"backdrop-saturate":[{"backdrop-saturate":[it,De,Re]}],"backdrop-sepia":[{"backdrop-sepia":["",it,De,Re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Z()}],"border-spacing-x":[{"border-spacing-x":Z()}],"border-spacing-y":[{"border-spacing-y":Z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,Re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[it,"initial",De,Re]}],ease:[{ease:["linear","initial",P,De,Re]}],delay:[{delay:[it,De,Re]}],animate:[{animate:["none",M,De,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[q,De,Re]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Be()}],"scale-x":[{"scale-x":Be()}],"scale-y":[{"scale-y":Be()}],"scale-z":[{"scale-z":Be()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[De,Re,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:ie()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ie()}],"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",De,Re]}],"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":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mbs":[{"scroll-mbs":Z()}],"scroll-mbe":[{"scroll-mbe":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pbs":[{"scroll-pbs":Z()}],"scroll-pbe":[{"scroll-pbe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"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",De,Re]}],fill:[{fill:["none",...ie()]}],"stroke-w":[{stroke:[it,gc,go,BS]}],stroke:[{stroke:["none",...ie()]}],"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"]}},eX=DY(WY);function za(...e){return eX(Ek(e))}const tX=_C("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"}}),le=C.forwardRef(({className:e,variant:n,size:s,asChild:r=!1,...u},h)=>{const f=r?T_:"button";return l.jsx(f,{ref:h,className:za(tX({variant:n,size:s,className:e})),...u})});le.displayName="Button";const nX=_C("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 $C({className:e,variant:n,...s}){return l.jsx("div",{className:za(nX({variant:n}),e),...s})}const aX=220;function VS({compact:e=!1,version:n,updateAvailable:s,onDismissUpdate:r}){const u=!e&&n&&n!=="unknown",[h,f]=C.useState(!1),b=!e&&s&&r,v=()=>{f(!0),window.setTimeout(()=>{r?.(),f(!1)},aX)};return e?l.jsxs(at,{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(at,{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(at,{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:s.url,target:"_blank",rel:"noopener noreferrer",title:`Open release: ${s.upgradeCommand}`,"aria-label":`New version v${s.latest} available — open release page`,children:[l.jsxs("span",{className:"brand-update-bubble-from",children:["v",s.current]}),l.jsx(Tc,{className:"brand-update-bubble-arrow size-3","aria-hidden":"true"}),l.jsxs("span",{className:"brand-update-bubble-to",children:["v",s.latest]})]}),l.jsx("button",{type:"button",className:"brand-update-bubble-dismiss",onClick:v,"aria-label":`Dismiss update notification for v${s.latest}`,children:l.jsx(Hr,{className:"size-3","aria-hidden":"true"})})]}):null]})}function sX({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"},r=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 ${r}`,children:e})}function wn({tone:e,children:n,...s}){const r=e==="positive"?"success":e==="caution"?"warning":e==="negative"?"destructive":"neutral";return l.jsx($C,{variant:r,...s,children:n})}function U1({status:e}){return l.jsx(wn,{tone:jC(e),children:JF(e)})}const Pg=Tk,iX=Nk,KC=C.forwardRef(({className:e,...n},s)=>l.jsx(Zg,{ref:s,className:za("fixed inset-0 z-50 bg-overlay-scrim/70 backdrop-blur-sm",e),...n}));KC.displayName=Zg.displayName;const oX=400,rX=1200,lX=720,mm=C.forwardRef(({className:e,children:n,...s},r)=>{const[u,h]=C.useState(lX),f=C.useRef(!1),b=C.useRef(0),v=C.useRef(0),x=C.useCallback(N=>{f.current=!0,b.current=N.clientX,v.current=u,N.target.setPointerCapture(N.pointerId),N.preventDefault()},[u]),S=C.useCallback(N=>{if(!f.current)return;const T=b.current-N.clientX,z=Math.min(rX,Math.max(oX,v.current+T));h(z)},[]),k=C.useCallback(()=>{f.current=!1},[]);return l.jsxs(iX,{children:[l.jsx(KC,{}),l.jsxs(Yg,{ref:r,className:za("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)`},...s,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:S,onPointerUp:k}),n,l.jsxs(Ck,{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(Hr,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});mm.displayName=Yg.displayName;const qg=({className:e,...n})=>l.jsx("div",{className:za("flex flex-col gap-1.5 pr-10",e),...n}),pm=C.forwardRef(({className:e,...n},s)=>l.jsx(Xg,{ref:s,className:za("text-lg font-medium text-primary",e),...n}));pm.displayName=Xg.displayName;const hm=C.forwardRef(({className:e,...n},s)=>l.jsx(_k,{ref:s,className:za("text-sm text-muted",e),...n}));hm.displayName=_k.displayName;function Td({title:e,subtitle:n,children:s,open:r,onClose:u}){return l.jsx(Pg,{open:r,onOpenChange:h=>h?void 0:u(),children:l.jsxs(mm,{children:[l.jsxs(qg,{className:"drawer-head",children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),l.jsx(pm,{id:"drawer-title",children:e}),l.jsx(hm,{className:"sr-only",children:n})]}),l.jsx("div",{className:"drawer-body",children:s})]})})}function ua({text:e,placement:n="top"}){const[s,r]=C.useState(null),u=C.useRef(null),h=C.useRef(null),f=C.useRef(!1),b=C.useCallback(()=>{if(!u.current)return;const S=u.current.getBoundingClientRect(),k=S.left+S.width/2,N=Math.min(224,window.innerWidth-16)/2;r({top:n==="bottom"?S.bottom:S.top,left:n==="bottom"?Math.max(N+8,Math.min(k,window.innerWidth-N-8)):k})},[n]);C.useLayoutEffect(()=>{if(n!=="bottom"||!s||!h.current)return;const S=h.current.getBoundingClientRect().bottom-window.innerHeight+8;if(S<=0)return;const k=Math.max(0,s.top-S);k!==s.top&&r({...s,top:k})},[n,s]);const v=C.useCallback(()=>r(null),[]),x=C.useCallback(()=>{s===null?b():v()},[s,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":s!==null,onFocus:b,onBlur:v,onPointerDown:()=>{f.current=s!==null&&u.current?.ownerDocument.activeElement===u.current},onClick:S=>{S.detail===0?x():f.current?v():b()},onKeyDown:S=>{S.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"})]})}),s!==null&&S_.createPortal(l.jsx("span",{ref:h,"aria-hidden":"true",style:{position:"fixed",top:s.top,left:s.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 cX(e){const n=(e??"").trim();return n&&(n.startsWith("/")||/^https?:\/\//i.test(n)||/^mailto:/i.test(n))?n:null}function Mg({url:e,title:n}){const s=cX(e),r=s&&/^https?:\/\//i.test(s)?s: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,r?l.jsx("a",{href:r,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 uX(e){return[...e.mentionedCompetitorTerms??(e.mentionedCompetitorDomains??[]).flatMap(s=>{const r=d0(s);return r.length>=4?[r]:[]}),...e.recommendedCompetitors??[]].filter(s=>s.trim().length>2)}const dX=/[\s\-_]+/;function mX(e){const n=e.split(dX).filter(Boolean);return n.length===0?null:n.map(RL).join("[\\s\\-_]*")}function $S(e,n){const s=pX(n),r=e.split(/(\*\*[^*]+\*\*)/).filter(Boolean).map(x=>x.startsWith("**")&&x.endsWith("**")?{type:"bold",value:x.slice(2,-2)}:{type:"text",value:x}),u=s.flatMap(x=>x.terms).filter(x=>x.trim().length>1);if(u.length===0)return r.map((x,S)=>x.type==="bold"?Cr.createElement("strong",{key:`b-${S}`,className:"text-strong font-semibold"},x.value):x.value).filter(Boolean);const f=[...u].sort((x,S)=>S.length-x.length).map(mX).filter(x=>!!x);if(f.length===0)return r.map((x,S)=>x.type==="bold"?Cr.createElement("strong",{key:`b-${S}`,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 s)for(const S of x.terms){const k=Ra(S);k&&!v.has(k)&&v.set(k,x.className)}return r.flatMap((x,S)=>x.value.split(b).map((N,T)=>{if(!N)return null;if(T%2===1){const q=v.get(Ra(N))??"answer-highlight";return x.type==="bold"?Cr.createElement("mark",{key:`hl-${S}-${T}`,className:q},Cr.createElement("strong",{className:"text-strong font-semibold"},N)):Cr.createElement("mark",{key:`hl-${S}-${T}`,className:q},N)}return x.type==="bold"?Cr.createElement("strong",{key:`b-${S}-${T}`,className:"text-strong font-semibold"},N):N})).filter(Boolean)}function pX(e){return e.length===0?[]:typeof e[0]=="string"?[{terms:e,className:"answer-highlight"}]:e}function Ff(e,n){const s=e.mentionedCompetitorDomains!==void 0?e:n,r=s?.mentionedCompetitorTerms;return{citedCompetitorDomains:[...e.citedCompetitorDomains??n?.citedCompetitorDomains??[]],mentionedCompetitorDomains:[...s?.mentionedCompetitorDomains??[]],...r!==void 0?{mentionedCompetitorTerms:[...r]}:{}}}function Qf(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 hX({evidence:e,project:n,onClose:s}){const[r,u]=C.useState(!1),[h,f]=C.useState("mentions"),[b,v]=C.useState(-1),[x,S]=C.useState(null),[k,N]=C.useState(!1),[T,z]=C.useState({}),q=Z2(n.project),E=new Set(q.map(Dc)),P=e.runHistory,M=P.length>1,[L,$]=C.useState(null),Q=C.useRef(!1);C.useEffect(()=>{if(Q.current||e.answerSnippet&&(e.visibilityState!=null||e.answerMentioned!=null))return;const pe=P.at(-1);pe&&(Q.current=!0,_g(pe.runId).then(ce=>{const ue=ce.snapshots?.find(_e=>_e.query===e.query&&_e.provider===e.provider);ue&&$({citationState:ue.citationState,answerMentioned:ue.answerMentioned,visibilityState:ue.visibilityState,visibilityTransition:pe.visibilityTransition,provider:ue.provider,model:ue.model??e.model,answerSnippet:ue.answerText??e.answerSnippet,citedDomains:ue.citedDomains??e.citedDomains,...Ff(ue,e),recommendedCompetitors:ue.recommendedCompetitors??e.recommendedCompetitors??[],matchedTerms:ue.matchedTerms??e.matchedTerms??[],groundingSources:ue.groundingSources??e.groundingSources,searchQueries:ue.searchQueries,evidenceUrls:ue.citedUrls??[],changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary})}).catch(()=>{}))},[e,P]);const ae=b>=0&&x!==null,V=ae?x:L||{citationState:e.citationState,answerMentioned:e.answerMentioned,visibilityState:e.visibilityState,visibilityTransition:P.at(-1)?.visibilityTransition,provider:e.provider,model:e.model,answerSnippet:e.answerSnippet,citedDomains:e.citedDomains,...Ff(e),recommendedCompetitors:e.recommendedCompetitors??[],matchedTerms:e.matchedTerms??[],groundingSources:e.groundingSources,searchQueries:e.searchQueries??[],evidenceUrls:e.evidenceUrls,changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary},Z=V.visibilityState==="pending"||V.citationState==="pending",X=Z?!1:V.visibilityState!=null?V.visibilityState==="visible":V.answerMentioned!=null?V.answerMentioned:V.citationState===Sc.cited||V.citationState==="emerging",Ce=V.answerMentioned!=null||V.visibilityState!=null||V.mentionedCompetitorDomains.length>0||V.recommendedCompetitors.length>0,tt=V.citedDomains.length>0||V.citedCompetitorDomains.length>0||V.groundingSources.length>0||V.evidenceUrls.length>0,Ke=n.project.displayName||n.project.name,Ue=[...q.map(Dc),Ke,Ke.split(" ").slice(0,2).join(" "),...V.matchedTerms].filter(pe=>pe.trim().length>2),ke=uX(V),Le=[{terms:Ue,className:"answer-highlight-brand"},...ke.length>0?[{terms:ke,className:"answer-highlight-competitor"}]:[]],B=Z?"pending":V.visibilityTransition==="lost"?"lost":X?"mentioned":"not-mentioned",W=C.useRef(0),ve=C.useCallback(async pe=>{const ce=++W.current;if(pe===-1||pe===P.length-1){v(-1),S(null),u(!1);return}v(pe),u(!1);const ue=P[pe],_e=`${ue.runId}::${e.query}::${e.provider}`;if(T[_e]){S(T[_e]);return}N(!0);try{const Qe=await _g(ue.runId);if(ce!==W.current)return;const Ee=Qe.snapshots?.find(me=>me.query===e.query&&me.provider===e.provider)??Qe.snapshots?.find(me=>me.query===e.query),Ct=Ee?{citationState:Ee.citationState,answerMentioned:Ee.answerMentioned,visibilityState:Ee.visibilityState,visibilityTransition:ue.visibilityTransition,provider:Ee.provider,model:Ee.model??null,answerSnippet:Ee.answerText??"",citedDomains:Ee.citedDomains,...Ff(Ee),recommendedCompetitors:Ee.recommendedCompetitors??[],matchedTerms:Ee.matchedTerms??[],groundingSources:Ee.groundingSources,searchQueries:Ee.searchQueries,evidenceUrls:Ee.citedUrls??[],changeLabel:Qf(ue.mentionTransition??ue.visibilityTransition,ue.mentionState??ue.visibilityState),summary:""}:{citationState:ue.citationState,answerMentioned:ue.answerMentioned,visibilityState:ue.visibilityState,visibilityTransition:ue.visibilityTransition,provider:e.provider,model:ue.model??null,answerSnippet:"",citedDomains:[],citedCompetitorDomains:[],mentionedCompetitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],searchQueries:[],evidenceUrls:[],changeLabel:Qf(ue.mentionTransition??ue.visibilityTransition,ue.mentionState??ue.visibilityState),summary:"Snapshot data not available for this run."};z(me=>({...me,[_e]:Ct})),S(Ct)}catch{if(ce!==W.current)return;S({citationState:ue.citationState,answerMentioned:ue.answerMentioned,visibilityState:ue.visibilityState,visibilityTransition:ue.visibilityTransition,provider:e.provider,model:ue.model??null,answerSnippet:"",citedDomains:[],citedCompetitorDomains:[],mentionedCompetitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],searchQueries:[],evidenceUrls:[],changeLabel:Qf(ue.mentionTransition??ue.visibilityTransition,ue.mentionState??ue.visibilityState),summary:"Failed to load historical run data."})}finally{ce===W.current&&N(!1)}},[P,e.query,e.provider,T]),ie=(ae||e.historyScope!=="provider")&&V.model?`${V.provider} (${V.model}) · ${V.changeLabel.toLowerCase()}`:`${V.provider} · ${V.changeLabel.toLowerCase()}`,Se=!ae&&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(" · "):"",Me=X?{label:"Mentioned in answer",title:"Your brand or domain is mentioned in this answer",meta:ie}:V.visibilityTransition==="lost"?{label:"Mention lost",title:"Your brand no longer appears in this answer",meta:ie}:Z?{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:ie},xe=()=>{if(!V.answerSnippet)return null;const pe=V.answerSnippet.split(`
58
+ `),ce=[];let ue=[],_e=0;const Qe=()=>{if(ue.length===0)return;const Ee=ue.join(" ").trim();Ee&&ce.push(l.jsx("p",{className:ce.length>0?"mt-2.5":"",children:$S(Ee,Le)},_e++)),ue=[]};for(const Ee of pe){const Ct=Ee.trim();if(/^[-\u2013\u2014]{3,}$/.test(Ct)){Qe(),ce.push(l.jsx("hr",{className:"border-default my-3"},_e++));continue}const me=Ct.match(/^(#{1,3})\s+(\S.*)$/);if(me){Qe();const Be=me[1].length,Ne=me[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s]+/u,"").trim()||me[2],re=Be===1?"text-[13px] font-semibold text-heading mt-4 mb-1":Be===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:re,children:$S(Ne,Le)},_e++));continue}if(Ct===""){Qe();continue}ue.push(Ct)}return Qe(),ce};return l.jsx(Tk,{open:!0,onOpenChange:pe=>{pe||s()},children:l.jsxs(Nk,{children:[l.jsx(Zg,{className:"fixed inset-0 z-50 bg-overlay-scrim/80 backdrop-blur-sm"}),l.jsxs(Yg,{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," ","·"," ",V.provider||"All providers"]}),l.jsx(Xg,{className:"text-lg font-semibold text-primary truncate",children:e.query})]}),l.jsxs(Ck,{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(Hr,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]}),M&&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:P.map((pe,ce)=>{const ue=b===-1&&ce===P.length-1||b===ce,_e=pe.visibilityState??(pe.answerMentioned?"visible":"not-visible"),Qe=pe.visibilityTransition??_e,Ee=_e==="visible"?"bg-positive-400":Qe==="emerging"?"bg-caution-400":Qe==="lost"?"bg-negative-400":"bg-mono-600",me=new Date(pe.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"}),Be=!!(pe.model&&ce>0&&P[ce-1]?.model&&P[ce-1].model!==pe.model);return l.jsxs("button",{type:"button",className:`evidence-run-dot ${ue?"evidence-run-dot--selected":""}`,onClick:()=>{ve(ce===P.length-1?-1:ce)},"aria-label":[`Run ${me}: ${_e}`,pe.model?`model ${pe.model}`:null,Be?"model changed":null].filter(Boolean).join(" — "),"aria-pressed":ue,children:[l.jsx("span",{className:`size-2 rounded-full ${Ee} ${Be?"ring-1 ring-caution-300/80 ring-offset-2 ring-offset-bg":""}`,"aria-hidden":"true"}),l.jsx("span",{className:"text-[10px] text-muted",children:me})]},ce)})}),b>=0&&b<P.length&&l.jsxs("p",{className:"text-[11px] text-muted mt-1",children:["Viewing run from ",new Date(P[b].createdAt).toLocaleString()," ","—"," ",l.jsx("span",{className:"capitalize",children:P[b].visibilityState??(P[b].answerMentioned?"visible":"not-visible")}),l.jsxs("button",{type:"button",className:"text-secondary hover:text-strong ml-2",onClick:()=>{ve(-1)},children:["←"," Back to latest"]})]}),!ae&&(e.modelTransitions?.length??0)>0&&l.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:e.modelTransitions.map(pe=>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:`${pe.fromModel??"unknown"} -> ${pe.toModel??"unknown"} on ${new Date(pe.createdAt).toLocaleDateString()}`},`${pe.runId}:${pe.toModel??"unknown"}`))})]}),l.jsxs("div",{className:"evidence-modal-body",children:[k&&l.jsxs("div",{className:"md:col-span-2 flex items-center justify-center py-12 text-muted text-sm",children:["Loading historical run data","…"]}),!k&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"evidence-modal-main",children:[l.jsxs("div",{className:`evidence-position-hero evidence-position-hero--${B}`,children:[l.jsx("p",{className:`evidence-position-label evidence-position-label--${B}`,children:Me.label}),l.jsx("p",{className:`evidence-position-title evidence-position-title--${B}`,children:Me.title}),l.jsx("p",{className:"evidence-position-meta",children:Me.meta}),Se&&l.jsx("p",{className:"mt-1 text-[11px] text-muted",children:Se})]}),V.answerSnippet&&l.jsxs("div",{children:[l.jsx("p",{className:"drawer-section-label",children:"What the AI said"}),l.jsx("div",{className:`answer-snippet-block ${r?"evidence-answer-expanded":"evidence-answer-collapsed"}`,children:xe()}),V.answerSnippet.length>280&&l.jsx("button",{type:"button",className:"mt-1.5 text-xs text-muted hover:text-neutral transition-colors",onClick:()=>u(!r),children:r?"↑ Collapse":"↓ Show full answer"})]}),!V.answerSnippet&&!k&&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"}),V.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(ua,{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:V.searchQueries.map((pe,ce)=>l.jsxs("li",{className:"flex items-start gap-2 text-sm text-neutral",children:[l.jsx(Jg,{className:"size-3.5 mt-0.5 shrink-0 text-faint","aria-hidden":"true"}),l.jsx("span",{className:"break-words",children:pe})]},`${ce}-${pe}`))})]}),!ae&&e.relatedTechnicalSignals.length>0&&l.jsxs("div",{children:[l.jsx("p",{className:"drawer-section-label",children:X?"Why you're visible":"What to fix"}),l.jsx("div",{className:"action-items-list",children:e.relatedTechnicalSignals.map((pe,ce)=>l.jsxs("div",{className:"action-item",children:[l.jsx("svg",{className:`action-item-icon ${X?"text-positive-400":"text-caution-400"}`,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:X?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:pe})]},ce))})]}),V.summary&&l.jsx("p",{className:"text-xs text-faint border-t border-subtle pt-3 mt-1",children:V.summary})]}),l.jsxs("div",{className:"evidence-modal-sidebar",children:[(Ce||tt)&&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(ua,{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--${X?"mentioned":"not-mentioned"}`,children:[l.jsx("span",{className:"mention-status-icon",children:Z?"…":X?"✓":"—"}),l.jsx("span",{className:"mention-status-label",children:Z?"Pending":X?"Mentioned":"Not mentioned"})]}),V.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:V.matchedTerms.map(pe=>l.jsx("span",{className:"mention-chip mention-chip--brand",children:pe},pe))})]}),!Z&&!X&&V.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:Ue.map(pe=>l.jsx("span",{className:"mention-chip mention-chip--muted",children:pe},pe))}),l.jsx("p",{className:"text-[11px] text-faint mt-1.5",children:"None of these appear in the answer text."})]})]}),(V.recommendedCompetitors.length>0||V.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(ua,{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 pe=V.mentionedCompetitorDomains.map(_e=>_e.replace(/^www\./,"")),ce=new Set(pe.map(_e=>Ra(_e.replace(/\.[^.]+$/,""))));return[...V.recommendedCompetitors.filter(_e=>!ce.has(Ra(_e))),...pe].map(_e=>l.jsx("span",{className:"mention-chip mention-chip--competitor",children:_e},_e))})()})]})]}),h==="sources"&&l.jsxs(l.Fragment,{children:[V.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(ua,{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:V.citedDomains.map((pe,ce)=>{const ue=pe.toLowerCase().replace(/^www\./,""),_e=E.has(ue),Qe=!_e&&V.citedCompetitorDomains.some(Ct=>Ct.toLowerCase().replace(/^www\./,"")===ue),Ee=_e?"you":Qe?"competitor":"other";return l.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${Ee}`,children:[l.jsxs("span",{className:"citation-leaderboard-rank",children:["#",ce+1]}),l.jsx("span",{className:"citation-leaderboard-domain",children:pe}),_e&&l.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),Qe&&l.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},pe)})})]}),V.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 (",V.groundingSources.length,")"]}),l.jsx(ua,{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:V.groundingSources.map((pe,ce)=>l.jsx("li",{className:"min-w-0",children:l.jsx(Mg,{url:pe.uri,title:pe.title})},ce))})]}),V.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:V.evidenceUrls.map(pe=>l.jsx("li",{className:"min-w-0",children:l.jsx(Mg,{url:pe})},pe))})]}),V.citedDomains.length===0&&V.groundingSources.length===0&&V.evidenceUrls.length===0&&l.jsxs("div",{className:"flex items-center justify-center h-24 text-faint text-sm",children:["No source data ",ae?"for this run":"yet"]})]}),!Ce&&!tt&&l.jsxs("div",{className:"flex items-center justify-center h-24 text-faint text-sm",children:["No answer visibility data ",ae?"for this run":"yet"]})]})]})]})]})]})})}function fX(e){const n=e.match(/^\/projects\/([^/]+)/);if(!n)return null;try{return decodeURIComponent(n[1])}catch{return n[1]}}function gX(e,n){return e?n?.projects.find(r=>r.project.name===e||r.project.id===e)?.project.name??e:null}function yX(e,n){return gX(fX(e),n)}function Va(e){const n=new Date("2026-02-20");return e.map((s,r)=>({runId:`run_mock_${r+1}`,citationState:s,createdAt:new Date(n.getTime()+r*2*24*60*60*1e3).toISOString()}))}const Zf=[{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:vf,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:vf,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:vf,locations:[],defaultLocation:null,autoExtractBacklinks:!1,siteAuditMaxPages:null,configSource:"cli",configRevision:1}];function Xm(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 KS=Xm({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"}),bX=Xm({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"}),GS=Xm({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"}),vX=Xm({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"}),xX=[{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:Va(["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:Va(["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:Va(["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:Va(["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:Va(["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:Va(["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:Va(["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:Va(["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:Va(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}];Zf[0],9/21,8/21,4/21,Zf[1],11/17,6/17,Va(["cited","cited","cited","cited","cited"]),Zf[2],15/19,4/19,Va(["not-cited","not-cited","not-cited","cited"]);function wX(e,n){return e.runs.find(s=>s.id===n)}function SX(e,n){for(const s of e.projects){const r=s.visibilityEvidence.find(u=>u.id===n);if(r)return{project:s,evidence:r}}}function kX(e,n,s){if(e){const r=e.visibilityEvidence.find(u=>u.id===s);if(r)return{project:e,evidence:r}}if(n)return SX(n,s)}const jX={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"},AX={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"},NX={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"},CX={regression:!0,gain:!0,opportunity:!0,"first-citation":!0,"provider-pickup":!0,"persistent-gap":!0,"competitor-gained":!1,"competitor-lost":!1,"gbp-lodging-gap":!1,"gbp-listing-discrepancy":!1,"gbp-cta-gap":!1,"gbp-description-missing":!1,"gbp-metric-drop":!1,"gbp-keyword-drop":!1},_X={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 TX(e){return{id:e.id,tone:jX[e.type],title:e.title,detail:e.cause?.details??e.cause?.cause??"",actionLabel:e.recommendation?.action??_X[e.type],actionGroup:AX[e.type],affectedPhrases:[{query:e.query,evidenceId:"",provider:e.provider,citationState:NX[e.type],siteCitation:CX[e.type]}]}}function EX(e){return e.filter(n=>!n.dismissed).map(TX)}function GC(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 yo(e,n){return`${e} ${n}${e===1?"":"s"}`}function RX(e,n){if(!e)return"Waiting";if(!n)return"Running";const s=new Date(n).getTime()-new Date(e).getTime();if(s<1e3)return"under 1 second";const r=Math.floor(s/1e3),u=Math.floor(r/3600),h=Math.floor(r%3600/60),f=r%60;return u>0?h>0?`${yo(u,"hour")} ${yo(h,"minute")}`:yo(u,"hour"):h>0?f>0?`${yo(h,"minute")} ${yo(f,"second")}`:yo(h,"minute"):yo(f,"second")}function HC(e){switch(e){case Oe["answer-visibility"]:return"Answer visibility sweep";case Oe["gsc-sync"]:return"GSC sync";case Oe["inspect-sitemap"]:return"Sitemap inspection";case Oe["ga-sync"]:return"GA sync";case Oe["traffic-sync"]:return"Traffic sync";case Oe["bing-inspect"]:return"Bing URL inspection";case Oe["bing-inspect-sitemap"]:return"Bing sitemap inspection";case Oe["site-audit"]:return"Site audit";case Oe["backlink-extract"]:return"Backlink extract";case Oe["aeo-discover-seed"]:return"Discovery (seed phase)";case Oe["aeo-discover-probe"]:return"Discovery (probe phase)";case Oe["gbp-sync"]:return"Business Profile sync";case Oe["ads-sync"]:return"ChatGPT ads sync";case Oe["google-ads-sync"]:return"Google Ads sync";case Oe["gtm-sync"]:return"Tag Manager sync"}}function DX(e){switch(e){case $a.manual:return"Manual";case $a.scheduled:return"Scheduled";case $a["config-apply"]:return"Config apply";case $a.probe:return"Spot check";default:return e}}function su(e,n){return{id:e.id,projectId:e.projectId,projectName:n,kind:e.kind,kindLabel:HC(e.kind),status:e.status,trigger:e.trigger??"manual",location:e.location??null,createdAt:e.createdAt,startedAt:WF(e.startedAt||e.createdAt),duration:RX(e.startedAt??null,e.finishedAt??null),statusDetail:e.error?FC(e.error):zX(e),summary:IX(e),triggerLabel:DX(e.trigger)}}function FC(e){const n=D0(e);return n.length>200?n.slice(0,200)+"…":n}function zX(e){switch(e.status){case Nt.queued:return"Waiting for execution slot.";case Nt.running:return"Provider queries in progress.";case Nt.completed:return"All queries checked.";case Nt.partial:return"Run completed with some queries skipped.";case Nt.failed:return e.error?FC(e.error):"Run failed.";case Nt.cancelled:return"Run was cancelled.";default:return""}}function IX(e){const n=HC(e.kind);switch(e.status){case Nt.queued:return`${n} queued`;case Nt.running:return`${n} in progress`;case Nt.completed:return`${n} completed`;case Nt.partial:return`${n} partially completed`;case Nt.failed:return`${n} failed`;case Nt.cancelled:return`${n} cancelled`;default:return e.status}}function OX(e,n,s,r,u){const h=[];let f=0;const b=new Set;if(s.length>0){const v=s.flatMap(E=>E.snapshots??[]),x=new Map;for(const E of v)if(E.query){const P=`${E.query}::${E.provider}::${E.location??""}`;x.set(P,E)}const S=new Set(v.map(E=>E.location??null));S.size===0&&S.add(null);const k=new Set(v.map(E=>E.provider)),N=new Set(n.flatMap(E=>Object.keys(E.providerRuns??{}))),T=[...new Set([...k,...N])].sort(),z=T.length>0?T:["gemini"],q=new Set(v.flatMap(E=>E.query?[E.query]:[]));for(const E of n){if(E.runs.length===0&&!q.has(E.query))continue;b.add(E.query);const P=E.runs.at(-1),M=P?.transition??"not-cited";for(const L of z){const $=[...S].filter(V=>x.has(`${E.query}::${L}::${V??""}`)),Q=(E.providerRuns?.[L]?.length??0)>0,ae=$.length>0?$:Q?[null]:[];for(const V of ae){const Z=V??"",X=x.get(`${E.query}::${L}::${Z}`),Ce=X?.model??null,tt=Ce?`${L}:${Ce}`:null,Ke=E.providerRuns?.[L],Ue=tt?E.modelRuns?.[tt]:void 0,ke=Ht=>Ht?.filter(Ve=>(Ve.location??null)===V),Le=$.length>0?ke(Ke):Ke,B=$.length>0?ke(Ue):Ue,W=(Le?.length?Le:null)??(B?.length?B:null),ve=Le?.length?"provider":B?.length?"model":"query",Ae=X&&W?W.findIndex(Ht=>Ht.runId===X.runId):-1,ie=X?Ae>=0?W.slice(0,Ae+1):null:W,Se=X!==void 0&&ie===null,Me=ie?ie.at(-1).transition:Se?X.citationState===Sc.cited?"cited":"not-cited":M,xe=ie?ie.at(-1).visibilityTransition??(ie.at(-1).visibilityState==="visible"?"visible":"not-visible"):Se?X.visibilityState==="visible"?"visible":"not-visible":P?.visibilityTransition??(P?.visibilityState==="visible"?"visible":"not-visible"),pe=W?.at(-1)?.citationState,ce=W?.at(-1)?.visibilityState,ue=X?Me==="lost"?"lost":Me==="emerging"?"emerging":X.citationState===Sc.cited?"cited":"not-cited":pe===Sc.cited?"cited":"not-cited",_e=X?.visibilityState??(ce==="visible"?"visible":ce==="pending"?"pending":"not-visible"),Qe=ie?HS(ie):Se?1:HS(E.runs),Ee=ie?FS(ie):Se?1:FS(E.runs),Ct=PX(E,L),me=(W??E.runs).map(Ht=>({runId:Ht.runId,citationState:Ht.citationState,createdAt:Ht.createdAt,model:Ct.get(Ht.runId)??null,answerMentioned:Ht.answerMentioned,visibilityState:Ht.visibilityState,visibilityTransition:Ht.visibilityTransition,mentionState:Ht.mentionState,mentionTransition:Ht.mentionTransition})),Be=qX(me),Ne=ve==="provider"&&Be.length<=1?"model":ve,re=MX(me),Ze=X?.citedCompetitorDomains??[],bt=X?.mentionedCompetitorDomains??[],qn=[...new Set([...Ze,...bt,...X?.competitorOverlap??[]])];h.push({id:`evidence_${e}_${f++}`,query:E.query,queryId:X?.queryId??null,sourceSnapshotId:X?.id??null,sourceRunId:X?.runId??null,queryClass:u?.classify(E.query)??null,provider:X?.provider??L,model:X?.model??null,location:X?.location??V,citationState:ue,answerMentioned:X?.answerMentioned,visibilityState:_e,visibilityChangeLabel:QS(xe,Ee,{positive:"visible",negative:"not visible",first:"first visibility"}),changeLabel:QS(Me,Qe),answerSnippet:X?.answerText??"",citedDomains:X?.citedDomains??[],evidenceUrls:X?.citedUrls??[],citedCompetitorDomains:Ze,mentionedCompetitorDomains:bt,mentionedCompetitorTerms:X?.mentionedCompetitorTerms??[],competitorDomains:qn,recommendedCompetitors:X?.recommendedCompetitors??[],matchedTerms:X?.matchedTerms??[],relatedTechnicalSignals:[],groundingSources:X?.groundingSources??[],searchQueries:X?.searchQueries??[],summary:BX(_e,xe,E.query),runHistory:me,historyScope:Ne,modelsSeen:Be,modelTransitions:re})}}}}for(const v of r)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 PX(e,n){const s=new Map,r=`${n}:`;for(const[u,h]of Object.entries(e.modelRuns??{})){if(!u.startsWith(r))continue;const f=u.slice(r.length),b=f==="unknown"?null:f;for(const v of h)s.set(v.runId,b)}return s}function qX(e){const n=new Set;for(const s of e)s.model&&n.add(s.model);return[...n]}function MX(e){const n=[];let s=null;for(const r of e){const u=r.model??null;u!==s&&s!==null&&n.push({runId:r.runId,createdAt:r.createdAt,fromModel:s,toModel:u}),s=u}return n}function HS(e){if(e.length===0)return 0;const n=e[e.length-1].citationState;let s=0;for(let r=e.length-1;r>=0&&e[r].citationState===n;r--)s++;return s}function FS(e){if(e.length===0)return 0;const n=e[e.length-1].visibilityState??"not-visible";let s=0;for(let r=e.length-1;r>=0&&(e[r].visibilityState??"not-visible")===n;r--)s++;return s}function QS(e,n,s){const r={positive:s?.positive??"cited",negative:s?.negative??"not cited",first:s?.first??"first citation"};switch(e){case"new":return"First observation";case"cited":case"visible":return n<=1?`${yc(r.positive)} in latest run`:`${yc(r.positive)} for ${n} runs`;case"lost":return"Lost since last run";case"emerging":return yc(r.first);case"not-cited":case"not-visible":return n<=1?`${yc(r.negative)} in latest run`:`${yc(r.negative)} across ${n} runs`;default:return e}}function yc(e){return e.charAt(0).toUpperCase()+e.slice(1)}function BX(e,n,s){switch(n){case"lost":return`Mention was lost for "${s}". Your brand no longer appeared in the latest answer.`;case"emerging":return`Your brand started appearing in AI answers for "${s}".`}switch(e){case"visible":return`Your brand or domain is mentioned in AI answers for "${s}".`;case"pending":return`"${s}" has been added but no run has been triggered yet.`;default:return`Your brand or domain was not mentioned in AI answers for "${s}".`}}function QC(e){const n=GC(e.project),s=xO(mq(e.project)),r=OX(n.name,e.timeline,e.latestRunDetails,e.queries,s),h=[...e.runs].sort((f,b)=>b.createdAt.localeCompare(f.createdAt)).map(f=>su(f,e.project.displayName||e.project.name));return e.overview?LX(n,e.overview,r,h):UX(n,r,h)}function ZC(e){return e.filter(n=>n.kind===Oe["answer-visibility"]&&n.trigger!==$a.probe&&(n.status===Nt.completed||n.status===Nt.partial))}function LX(e,n,s,r){const u=EX(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:s,competitors:n.competitors.map(h=>({id:h.id,domain:h.domain,aliases:h.aliases??[],autoAliases:h.autoAliasNames??[],citationCount:h.citationCount,totalQueries:h.totalQueries,pressureLabel:h.pressureLabel,citedQueries:h.citedQueries,movement:"",notes:""})),recentRuns:r.slice(0,5),visibilitySweeps:ZC(r),suggestedQueries:n.suggestedQueries}}function ZS(){return{projectMentionSnapshots:0,competitorMentionSnapshots:0,combinedMentionSnapshots:0,perCompetitor:[],ranking:[],snapshotsWithAnswerText:0,snapshotsTotal:0,score:null}}function UX(e,n,s){const r={label:"",value:"No data",delta:"Loading…",tone:"neutral",description:"",tooltip:"",trend:[]};return{project:e,contextLabel:`${e.country} / ${e.language.toUpperCase()}`,mentionSummary:{...r,label:"Mention Coverage"},visibilitySummary:{...r,label:"Citation Coverage"},mentionShareSummary:{...r,label:"Mention Share",scope:"non-brand",unavailable:!0,breakdown:ZS(),branded:ZS()},queryCounts:{cited:0,total:0},gapQueries:{...r,label:"Citation Gaps"},mentionGaps:{...r,label:"Mention Gaps"},indexCoverage:{...r,label:"Index Coverage"},providerScores:[],competitorPressure:{...r,label:"Competitor Pressure"},runStatus:{...r,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:s.slice(0,5),visibilitySweeps:ZC(s),suggestedQueries:{rows:[],totalCandidates:0,skippedAlreadyTracked:0}}}function VX(e){const n=GC(e.project),s=[...e.runs].sort((N,T)=>T.createdAt.localeCompare(N.createdAt)),r=s.find(N=>N.kind===Oe["answer-visibility"])??s[0]??e.overview?.latestRun?.run??void 0,u=e.project.displayName||e.project.name,h=r?su(r,u):$X(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,S=f.queryCounts.totalQueries,k=f.providers.length;return{project:n,hasMeasurement:S>0&&b.progress!=null,mentionScore:v,mentionDelta:S>0?`${x} of ${S} queries`:"No data",mentionTone:b.tone,providerCoverage:b.providerCoverage,lastRun:h,insight:S>0?`${x} of ${S} queries mentioned across ${k} provider${k===1?"":"s"}.`:"No runs completed yet.",trend:b.trend??[],competitorPressureLabel:f.scores.competitorPressure.value,sentiment:f.sentiment}}function $X(e,n){return{id:"none",projectId:e,projectName:n,kind:Oe["answer-visibility"],kindLabel:"No runs yet",status:Nt.queued,trigger:$a.manual,createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""}}function KX(e,n){const s=[],r=[],u=[];for(const f of e){r.push(QC(f)),u.push(VX(f));const b=[...f.runs].sort((v,x)=>x.createdAt.localeCompare(v.createdAt));for(const v of b)s.push(su(v,f.project.displayName||f.project.name))}s.sort((f,b)=>b.createdAt.localeCompare(f.createdAt));const h=e.length>0;return{portfolioOverview:{projects:u,attentionItems:h?GX(r):[{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:s.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:r,runs:s,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 GX(e){const n=[];for(const s of e){const r=s.visibilityEvidence.filter(h=>h.citationState==="lost");r.length>0&&n.push({id:`attention_${s.project.id}_lost`,tone:"negative",title:`${s.project.displayName||s.project.name} lost citations`,detail:`${r.length} quer${r.length>1?"ies":"y"} lost citation.`,actionLabel:"Open project",href:`/projects/${encodeURIComponent(s.project.name)}`});const u=s.recentRuns.filter(h=>h.status===Nt.running||h.status===Nt.queued);u.length>0&&n.push({id:`attention_${s.project.id}_active`,tone:"neutral",title:`${s.project.displayName||s.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 YC=C.createContext(null);YC.Provider;function iu(){return C.useContext(YC)}function Jm(e,n={}){const r=iu()?.dashboard??null,u=n.includeSettings??!0,h=n.includeOverviews??!0,f=n.pauseProjectPolling??!1,{isAdmin:b}=fa(),v=!r&&h&&!Fm(),x=yt({...qc({client:J,query:{kind:"answer-visibility"}}),enabled:!r,staleTime:_i,refetchInterval:Q=>Q.state.data?.some(Z=>Z.status==="running"||Z.status==="queued")?3e3:_i}),S=yt({...qc({client:J,query:{excludeKinds:[Oe["bing-inspect"],Oe["traffic-sync"]],limit:5}}),enabled:v,staleTime:_i,refetchInterval:Q=>Q.state.data?.some(ae=>ae.status===Nt.running||ae.status===Nt.queued)?3e3:_i}),k=yt({...Lo({client:J}),enabled:!r,refetchInterval:f?!1:Q=>{const ae=Q.state.data,V=x.data?.some(X=>X.status==="running"||X.status==="queued");return(ae?.length??0)===0||!!V?VF:$F}}),N=yt({...PQ({client:J}),enabled:!r&&u&&b}),T=k.data??[],z=x.data??[],q=k_({queries:T.map(Q=>{const ae=z.filter(X=>X.projectId===Q.id),V=ae.filter(X=>(X.status==="completed"||X.status==="partial")&&X.kind==="answer-visibility"&&X.trigger!=="probe").sort((X,Ce)=>Ce.createdAt.localeCompare(X.createdAt)),Z=V.length>0?V[0].id:"no-run";return{queryKey:["project-overview-slim",Q.id,Z],queryFn:async()=>{const X=await mC(Q.name).catch(()=>null);return{project:Q,runs:ae,queries:[],competitors:[],timeline:[],latestRunDetails:[],previousRunDetails:[],gscCoverage:null,bingCoverage:null,dbInsights:null,overview:X}},enabled:!r&&h&&k.isSuccess&&x.isSuccess,staleTime:Bd}})}),E=!h||q.every(Q=>Q.isSuccess),P=C.useMemo(()=>{if(r)return r;if(!k.data||!x.data||T.length>0&&!E)return null;const Q=new Map(T.map(Z=>[Z.id,Z])),ae=h?q.map(Z=>{if(!Z.data)return null;const X=Q.get(Z.data.project.id);return X?{...Z.data,project:X,runs:z.filter(Ce=>Ce.projectId===X.id)}:null}).filter(Z=>Z!=null):T.map((Z,X)=>{const Ce=q[X]?.data;return{project:Z,runs:z.filter(tt=>tt.projectId===Z.id),queries:[],competitors:[],timeline:[],latestRunDetails:[],previousRunDetails:[],gscCoverage:null,bingCoverage:null,dbInsights:null,overview:Ce?.overview??null}}),V=KX(ae,N.data??null);return v&&(V.portfolioOverview.recentRuns=(S.data??[]).filter(Z=>Z.trigger!==$a.probe&&Q.has(Z.projectId)).map(Z=>{const X=Q.get(Z.projectId);return su(Z,X.displayName||X.name)})),V},[r,k.data,x.data,N.data,h,E,q,T,z,v,S.data]),M=!r&&(k.isError||x.isError),L=!r&&!P&&!M,$=C.useCallback(async()=>{const Q=[k.refetch(),x.refetch(),...v?[S.refetch()]:[],...h?q.map(ae=>ae.refetch()):[]];u&&b&&Q.push(N.refetch()),await Promise.all(Q)},[u,b,h,v,S.refetch,q,k.refetch,x.refetch,N.refetch]);return{dashboard:P,isLoading:L,isError:M,activityLoading:v&&S.isPending,activityError:v&&S.isError,refetch:$}}function HX(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],[s])=>n.localeCompare(s)))}async function Bg(e,n,s="active"){const r=u=>{const h=u.queryKey[0];return h?._id==="getApiV1ProjectsByNameAnalyticsCompetitors"&&h.path?.name===n};return s==="active"&&await e.cancelQueries({predicate:r}),e.invalidateQueries({predicate:r,refetchType:s})}function yoe(e,n,s){const r=Di(),u=C.useRef({projectName:e,revision:n,enabled:s});C.useEffect(()=>{const h=u.current;u.current={projectName:e,revision:n,enabled:s},!(!s||!h.enabled||h.projectName!==e||h.revision===n)&&Bg(r,e)},[s,e,r,n])}const FX=20;function QX(e,n={}){const s=Di(),r=iu(),u=C.useMemo(()=>!r||!e?null:r.dashboard.projects.find(Q=>Q.project.name===e)??null,[r,e]),h=yt({...mQ({client:J,path:{name:e??""}}),enabled:!!e&&!u,staleTime:Bd,refetchOnWindowFocus:"always"}),f=yt({...wC({client:J,path:{name:e??""},query:{kind:"answer-visibility"}}),enabled:!!e,staleTime:_i,refetchOnWindowFocus:"always",refetchInterval:Q=>Q.state.data?.some(Z=>Z.projectId===h.data?.id&&(Z.status==="running"||Z.status==="queued"))?3e3:_i}),b=h.data??null,v=C.useMemo(()=>b?(f.data??[]).filter(Q=>Q.projectId===b.id):[],[b,f.data]),{latestRunIds:x,latestRunIdsKey:S,latestVisibilityRevision:k}=C.useMemo(()=>{const Q=v.filter(Z=>(Z.status==="completed"||Z.status==="partial")&&Z.kind==="answer-visibility"&&Z.trigger!=="probe").sort((Z,X)=>X.createdAt.localeCompare(Z.createdAt)),ae=Q[0]?.createdAt??null,V=ae?Q.filter(Z=>Z.createdAt===ae).map(Z=>Z.id):[];return{latestRunIds:V,latestRunIdsKey:[...V].sort().join(","),latestVisibilityRevision:ae?`${ae}:${[...V].sort().join(",")}`:"none"}},[v]),N=!!b&&!!e&&f.isSuccess,T=yt({queryKey:["project-dashboard-full",b?.id??null,S||"none","overview"],queryFn:async()=>({project:b,overview:await mC(e)}),enabled:N&&n.overview===!0,staleTime:Bd,refetchOnWindowFocus:"always"}),z=yt({queryKey:["project-dashboard-full",b?.id??null,S||"none","evidence"],queryFn:async()=>{const[Q,ae,V]=await Promise.all([dC(e),eF(e,void 0,FX),Promise.all(x.map(Z=>_g(Z)))]);return{project:b,queries:Q,timeline:ae,latestRunDetails:V}},enabled:N&&n.evidence===!0,staleTime:Bd,refetchOnWindowFocus:"always"}),q=C.useMemo(()=>{if(!b||!f.data)return u;const Q=n.evidence?z.data:void 0,ae={project:b,runs:v,queries:Q?.queries??[],timeline:Q?.timeline??[],latestRunDetails:Q?.latestRunDetails??[],overview:n.overview?T.data?.overview??null:null},V=QC(ae);return u&&!(n.overview&&T.data)?{...u,project:V.project,recentRuns:V.recentRuns,visibilitySweeps:V.visibilitySweeps,visibilityEvidence:Q?V.visibilityEvidence:u.visibilityEvidence}:V},[b,v,z.data,T.data,u,n.evidence,n.overview,f.data]),E=C.useCallback(async()=>{await Promise.all([h.refetch(),f.refetch(),s.invalidateQueries({queryKey:["project-dashboard-full",b?.id??null]})])},[h.refetch,f.refetch,s,b?.id]),P=h.isError||f.isError,M=!u&&(h.isLoading||f.isLoading),L=!!e&&n.overview===!0&&!u&&!P&&T.isPending,$=!!e&&n.evidence===!0&&!u&&!P&&z.isPending;return{commandCenter:q,project:b,isLoading:M,isError:P,overviewLoading:L,overviewError:n.overview===!0&&T.isError&&!T.data,evidenceLoading:$,evidenceError:n.evidence===!0&&z.isError&&!z.data,latestVisibilityRevision:k,competitorHistoryRevision:HX(v),refetch:E}}const ZX=["health"];async function YX(){const e=await vF("/health","API"),n=jo()&&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 V1(e,n){return yt({queryKey:ZX,queryFn:YX,enabled:e,refetchInterval:15e3,initialData:n})}function XX(e){return yt({...q1({client:J,path:{id:e??""}}),enabled:!!e,refetchInterval:n=>{const s=n.state.data?.status;return s==="running"||s==="queued"?3e3:!1}})}function $1(){const e=zi(),n=jk({strict:!1}),s=j_({select:v=>v.location.pathname}),r=n.runId??null,u=n.evidenceId??null;return{runId:r,evidenceId:u,openRun:v=>{e({to:s,from:Un.to,search:x=>({...x,runId:v,evidenceId:void 0})})},openEvidence:v=>{e({to:s,from:Un.to,search:x=>({...x,evidenceId:v,runId:void 0})})},closeDrawer:()=>{e({to:s,from:Un.to,search:v=>({...v,runId:void 0,evidenceId:void 0})})}}}const JX={negative:"toast-card-negative",caution:"toast-card-caution",positive:"toast-card-positive",neutral:"toast-card-neutral"};function WX(e){if(e.cta)return`${e.cta.label}: ${e.title}`}function eJ(){const e=C.useSyncExternalStore(MF,CS,CS),n=zi(),{openRun:s}=$1(),r=C.useCallback(h=>{Dg(h)},[]),u=C.useCallback(h=>{h.cta&&(h.cta.intent==="open-run-drawer"?s(h.cta.runId):n({to:"/runs"}),Dg(h.id))},[n,s]);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 ${JX[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":WX(h),children:h.cta.label}):null]}),l.jsx("button",{type:"button",onClick:()=>r(h.id),className:"toast-dismiss","aria-label":"Dismiss",children:l.jsx(Hr,{className:"size-3.5"})})]},h.id))})}const tJ="https://github.com/Canonry/canonry",nJ="https://canonry.ai",YS="Run it from your agent with the MCP server, API, CLI, and plugins for Claude Code and Codex.",aJ=[{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 sJ(){const e=C.useId();if(!jo())return null;const n=Qm(),s=`${e}-new-tab`,r={target:"_blank",rel:"noopener noreferrer","aria-describedby":s};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:YS}),l.jsxs("div",{className:"demo-banner-actions",children:[l.jsxs("a",{className:"demo-banner-primary",href:nJ,...r,children:["canonry.ai",l.jsx(Rk,{"aria-hidden":"true",size:14})]}),l.jsxs("a",{className:"demo-banner-secondary",href:tJ,...r,children:[l.jsx(Dk,{"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(Lc,{"aria-hidden":"true",size:14})]}),l.jsxs("div",{className:"demo-banner-panel",children:[l.jsx("p",{className:"demo-banner-panel-agent",children:YS}),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:aJ.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:s,hidden:!0,children:"Opens in a new tab"})]})}function Nc(e){switch(e){case Oe["answer-visibility"]:return"Visibility sweep";case Oe["gsc-sync"]:return"GSC sync";case Oe["inspect-sitemap"]:return"Sitemap inspection";case Oe["ga-sync"]:return"GA sync";case Oe["traffic-sync"]:return"Traffic sync";case Oe["bing-inspect"]:return"Bing URL inspection";case Oe["bing-inspect-sitemap"]:return"Bing sitemap inspection";case Oe["site-audit"]:return"Technical audit";case Oe["backlink-extract"]:return"Backlink extract";case Oe["aeo-discover-seed"]:return"Discovery (seed phase)";case Oe["aeo-discover-probe"]:return"Discovery (probe phase)";case Oe["gbp-sync"]:return"Business Profile sync";case Oe["ads-sync"]:return"ChatGPT ads sync";case Oe["google-ads-sync"]:return"Google Ads sync";case Oe["gtm-sync"]:return"Tag Manager sync"}}function XS(e){return e==="running"?"Running":e==="queued"?"Queued":e==="partial"?"Partial":e==="completed"?"Completed":e==="failed"?"Failed":e==="cancelled"?"Cancelled":"Starting"}function iJ(){const e=C.useSyncExternalStore(CC,Gs,Gs),n=C.useMemo(()=>Object.values(e.runs),[e.runs]),s=n.length>0,r=yt({...qc({client:J}),enabled:s,staleTime:_i}),u=C.useMemo(()=>new Map((r.data??[]).map(b=>[b.id,b.status])),[r.data]);if(!s)return null;const h=n.map(b=>({...b,status:u.get(b.runId)??b.lastAnnouncedStatus})),f=h.length===1?Nc(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=>`${Nc(b.kind)} ${XS(b.status)}`).join(". "),"."]}),l.jsxs("details",{className:"task-center-details",children:[l.jsxs("summary",{className:"task-center-trigger",children:[l.jsx(Ti,{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(Lc,{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:Nc(b.kind)}),l.jsx("p",{className:"mt-0.5 truncate text-xs text-muted",children:b.projectLabel??b.projectId})]}),l.jsx(wn,{tone:b.status==="failed"?"negative":b.status==="partial"?"caution":"neutral",children:XS(b.status)})]},b.runId))}),l.jsx(at,{to:"/runs",className:"task-center-footer-link",children:"View all runs"})]})]})]})}const K1={queryClass:"all"},oJ=["all","non-brand","branded"];function XC(e){return typeof e=="string"&&oJ.includes(e)}function rJ(e){const n=XC(e.class)?e.class:K1.queryClass,s=e.scope;if(typeof s!="string"||s==="all"||s.length===0)return{scope:"all",queryClass:n};const r=s.startsWith("group:")?s.slice(6):"";return r?{scope:"group",groupKey:r,queryClass:n}:{scope:"all",queryClass:n}}function boe(e,n){return n===null||e===null?!1:e!==n}function voe(e){return{scope:e.scope==="group"&&e.groupKey?`group:${e.groupKey}`:void 0,class:e.queryClass===K1.queryClass?void 0:e.queryClass}}function lJ(e,n){if(!(typeof e!="string"||e.length>16384||!n))try{const s=JSON.parse(e);if(typeof s!="object"||s===null||Array.isArray(s))return;const r=s,u=f=>typeof f=="string"&&f.trim().length>0,h=f=>f===null||u(f);return r.queryKey!==n||!u(r.provider)||r.queryClass!=="branded"&&r.queryClass!=="non-brand"&&r.queryClass!=="unknown"||!h(r.model)||!h(r.location)||!h(r.runId)||r.revision!==null&&(typeof r.revision!="number"||!Number.isSafeInteger(r.revision)||r.revision<=0)?void 0:{queryKey:n,queryClass:r.queryClass,provider:r.provider,model:r.model,location:r.location,runId:r.runId,revision:r.revision}}catch{return}}function cJ(e){const n=x=>typeof e[x]=="string"&&e[x]!==""?e[x]:void 0,s=rJ({scope:n("scope"),class:n("class")}),r=n("measurementScope")??(s.scope==="group"?"group":"project"),u=n("measurementScopeKey")??(n("measurementScope")?void 0:s.groupKey),h=n("queryClass")??n("class"),f={measurementScope:u&&(r==="group"||r==="market"||r==="property")?r:"project",queryClass:h==="unknown"||XC(h)?h:K1.queryClass};f.measurementScope!=="project"&&(f.measurementScopeKey=u);for(const[x,S]of[["measurementMarketKey","marketKey"],["measurementProvider","provider"],["measurementModel","model"],["measurementLocation","location"],["measurementFrom","from"],["measurementTo","to"],["measurementRunId","measurementRunId"],["measurementQueryKey","queryKey"]]){const k=n(x);k!==void 0&&(f[S]=k)}const b=Number(e.measurementRevision);Number.isSafeInteger(b)&&b>0&&(f.revision=b);const v=lJ(e.measurementAnswer,f.queryKey);return v&&(f.answer=v),f}function uJ(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 xoe(e,n){const s={...e,...n};return["measurementScope","measurementScopeKey","measurementMarketKey","queryClass","measurementProvider","measurementModel","measurementLocation","measurementFrom","measurementTo","measurementRevision","measurementRunId"].some(r=>r in n)?(s.measurementQueryKey=n.measurementQueryKey,s.measurementAnswer=n.measurementAnswer):"measurementQueryKey"in n&&!("measurementAnswer"in n)&&(s.measurementAnswer=void 0),"measurementScope"in n&&(s.scope=void 0,"measurementMarketKey"in n||(s.measurementMarketKey=void 0),s.measurementQueryKey=void 0,n.measurementScope==="project"&&(s.measurementScopeKey=void 0)),"queryClass"in n&&(s.class=void 0),s}function woe(e){return{...e,onboarding:void 0,manageQueries:void 0,siteHealthRunId:void 0,siteScan:void 0,setupProject:void 0}}function dJ(e,n){const s=/\/properties\/([^/]+)/.exec(e),r=cJ(n);if(s)return{view:"property",selection:Xd.parse({scope:"property",scopeKey:decodeURIComponent(s[1]),queryClass:r.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=Xd.safeParse(uJ(e.endsWith("/queries")?{measurementScope:r.measurementScope,measurementScopeKey:r.measurementScopeKey,queryClass:r.queryClass}:r));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 mJ(e,n={}){const{threshold:s=80}=n,r=C.useRef(null),u=C.useRef({scrollHeight:0,wasAtEnd:!0});function h(v){return v.scrollHeight-v.scrollTop-v.clientHeight}function f(){const v=r.current;return v?h(v)<=s:!0}function b(){const v=r.current;v&&(v.scrollTop=v.scrollHeight,u.current.wasAtEnd=!0,u.current.scrollHeight=v.scrollHeight)}return C.useEffect(()=>{const v=r.current;if(!v)return;const x=()=>{u.current.wasAtEnd=h(v)<=s};return v.addEventListener("scroll",x,{passive:!0}),()=>v.removeEventListener("scroll",x)},[s]),C.useLayoutEffect(()=>{const v=r.current;if(!v)return;const x=v.scrollHeight;x>u.current.scrollHeight&&u.current.wasAtEnd&&(v.scrollTop=x),u.current.scrollHeight=x},e),C.useEffect(()=>{const v=r.current;if(!v||typeof ResizeObserver>"u")return;const x=new ResizeObserver(()=>{const S=v.scrollHeight;S>u.current.scrollHeight&&u.current.wasAtEnd&&(v.scrollTop=S),u.current.scrollHeight=S});return x.observe(v),v.firstElementChild&&x.observe(v.firstElementChild),()=>x.disconnect()},[]),{ref:r,scrollToEnd:b,isAtEnd:f}}const Lg="Sweeps are run by your Canonry team",pJ="Scans are run by your Canonry team",JS="Next sweep unavailable",hJ="Sweep running…",fJ="Next sweep:";function gJ(e,n){try{return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",timeZone:n??"UTC"}).format(new Date(e))}catch{return null}}function yJ({projectName:e,kind:n=Oe["answer-visibility"],running:s=!1,loadSchedule:r=!0}){const u=n===Oe["site-audit"],h=yt({...MQ({client:J,path:{name:e},query:{kind:n}}),enabled:r&&!!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"}):gJ(b.toISOString(),f?.timezone):null,S=(h.error instanceof gn?h.error.code:h.error?.error?.code)==="NOT_FOUND",k=!v||S||!f?.enabled;return l.jsx("p",{className:"text-sm text-secondary",role:"status",children:u?l.jsxs(l.Fragment,{children:[s&&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"]}):pJ]}):s?hJ:k?JS:v&&b?l.jsxs(l.Fragment,{children:[fJ," ",l.jsx("time",{dateTime:b.toISOString(),children:v})]}):JS})}const bJ=300,vJ=400,xJ=900,wJ=32,WS=28;let SJ=0;function kJ(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Ug(){return new DOMException("Preview stopped","AbortError")}function jJ(e,n){return n?.aborted?Promise.reject(Ug()):new Promise((s,r)=>{const u=()=>{clearTimeout(h),r(Ug())},h=setTimeout(()=>{n?.removeEventListener("abort",u),s()},e);n?.addEventListener("abort",u,{once:!0})})}function AJ(e){const n=e.match(/\S+\s*|\s+/g)??[];if(n.length<2)return[];const s=Math.ceil(n.length/wJ),r=[];for(let u=s;u<n.length;u+=s)r.push(n.slice(0,u).join(""));return r}function NJ(e){return typeof e=="string"?e:JSON.stringify(e??null)}async function CJ({starter:e,signal:n,onEvent:s,reducedMotion:r=!1}){const u=async b=>{if(n?.aborted)throw Ug();r||await jJ(b,n)},h=Date.now(),f=++SJ;await u(bJ);for(const[b,v]of e.steps.entries()){const{name:x,label:S,arguments:k,result:N,durationMs:T}=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:k}]};s({type:"message_end",message:q}),s({type:"tool_execution_start",toolCallId:z,toolName:x,label:S,args:k}),await u(Math.min(xJ,Math.max(vJ,T))),s({type:"tool_execution_end",toolCallId:z,toolName:x,result:N,isError:!1});const E={role:"toolResult",toolCallId:z,timestamp:Date.now(),isError:!1,aeroToolLabel:S,aeroDurationMs:T,content:[{type:"text",text:NJ(N)}]};s({type:"message_end",message:E})}if(!r){for(const b of AJ(e.answer))await u(WS),s({type:"message_update",message:{role:"assistant",content:[{type:"text",text:b}]},assistantMessageEvent:{}});await u(WS)}s({type:"message_end",message:{role:"assistant",timestamp:Date.now(),stopReason:"stop",content:[{type:"text",text:e.answer}]}}),s({type:"aero_turn_status",status:{reason:"completed",toolCalls:e.steps.length,modelCalls:e.steps.length+1,durationMs:Date.now()-h}})}async function Wm(e){try{return await e.json()}catch{return{}}}function _J(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const ep=_J();function tp(e){e===401&&z1()}async function Yf(e){const n=await fetch(`${ep}/projects/${encodeURIComponent(e)}/agent/transcript`,{credentials:"include"});if(!n.ok){tp(n.status);const s=await Wm(n);throw new gn(s.error?.message??`transcript fetch failed: ${n.status}`,n.status,s.error?.code)}return await n.json()}async function TJ(e){const n=await fetch(`${ep}/projects/${encodeURIComponent(e)}/agent/preview`,{credentials:"include"});if(!n.ok){tp(n.status);const s=await Wm(n);throw new gn(s.error?.message??`preview fetch failed: ${n.status}`,n.status,s.error?.code)}return await n.json()}async function EJ(e){const n=await fetch(`${ep}/projects/${encodeURIComponent(e)}/agent/transcript`,{method:"DELETE",credentials:"include"});if(!n.ok){tp(n.status);const s=await Wm(n);throw new gn(s.error?.message??`reset failed: ${n.status}`,n.status,s.error?.code)}}async function RJ({project:e,prompt:n,conversationId:s,provider:r,modelId:u,scope:h,profile:f,context:b,limits:v,signal:x,onEvent:S}){const k={prompt:n};s!==void 0&&(k.conversationId=s),r&&(k.provider=r),u&&(k.modelId=u),h&&(k.scope=h),f&&(k.profile=f),b&&(k.context=b),v&&(k.limits=v);const N=await fetch(`${ep}/projects/${encodeURIComponent(e)}/agent/prompt`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(k),signal:x});if(!N.ok||!N.body){tp(N.status),cm({method:"POST",route:"/api/v1/projects/{name}/agent/prompt",status:N.status});const M=await Wm(N);throw new gn(M.error?.message??`prompt failed: ${N.status}`,N.status,M.error?.code)}Bo("aero.send");let T=!1;const z=N.body.getReader(),q=new TextDecoder;let E="";const P=()=>{z.cancel().catch(()=>{})};x?.addEventListener("abort",P,{once:!0}),x?.aborted&&P();try{for(;;){const{value:M,done:L}=await z.read();if(L)break;E+=q.decode(M,{stream:!0});let $=E.indexOf(`
59
+
60
+ `);for(;$!==-1;){const Q=E.slice(0,$);E=E.slice($+2);for(const ae of Q.split(`
61
+ `)){if(!ae.startsWith("data:"))continue;const V=ae.slice(5).trim();if(!V)continue;let Z;try{Z=JSON.parse(V)}catch{continue}Z.type==="stream_close"&&(T=!0),S(Z)}$=E.indexOf(`
62
+
63
+ `)}}if(x?.aborted)throw new DOMException("Turn stopped","AbortError");if(!T)throw new Error("Connection ended before Aero finished. Review the partial answer before retrying.")}finally{x?.removeEventListener("abort",P);try{z.releaseLock()}catch{}}}function Ld(e){return!e||e.role!=="assistant"?"":e.content.filter(n=>n.type==="text").map(n=>n.text).join("")}const Vg=[{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."}],DJ="https://canonry.ai",zJ="This demo plays sample answers only. Pick a starting point, or type / to choose one.",IJ="Stopped. The sample answer so far is kept.";function ek(e){return{queryKey:["aero-preview",e],queryFn:()=>TJ(e),staleTime:1/0,gcTime:1/0}}const tk=[{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"}],Ed=e=>`canonry:aero:provider:${e}`,OJ=e=>`canonry:aero:scope:${e}`;function nk(e){if(typeof window>"u")return null;try{return window.localStorage.getItem(e)}catch{return null}}function PJ(e,n){if(!(typeof window>"u"))try{window.localStorage.setItem(e,n)}catch{}}function ak(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}function qJ({projectName:e,context:n,preview:s=D1()}){const r=bo(),{canWrite:u,account:h}=fa(),f=Di(),b=h?.role==="viewer",[v,x]=C.useState(!1),[S,k]=C.useState(!1),[N,T]=C.useState([]),[z,q]=C.useState(void 0),E=C.useRef(!1),[P,M]=C.useState(!1),[L,$]=C.useState(!1),[Q,ae]=C.useState(null),[V,Z]=C.useState(!1),[X,Ce]=C.useState(!1),[tt,Ke]=C.useState(null),Ue=C.useRef(!1),[ke,Le]=C.useState(""),[B,W]=C.useState(!1),[ve,Ae]=C.useState([]),[ie,Se]=C.useState(""),[Me,xe]=C.useState(null),[pe,ce]=C.useState(null),[ue,_e]=C.useState(null),Qe=C.useRef(!0),[Ee,Ct]=C.useState(()=>nk(Ed(e))??null),me=r||b||s?null:Ee,[Be]=C.useState(()=>nk(OJ(e))==="all"?"all":"read-only"),Ne=r||b||s?"read-only":Be,re=C.useRef(null),Ze=C.useRef(null),bt=C.useRef(null),qn=C.useRef(null),{ref:Ht}=mJ([N,ie,ve]),Ve=C.useRef(null);C.useLayoutEffect(()=>{const oe=Ve.current;if(!oe)return;oe.style.height="auto";const ze=S?LJ:BJ;oe.scrollHeight>0&&(oe.style.height=`${Math.min(oe.scrollHeight,ze)}px`)},[ke,S,v]);const[ct,Ft]=C.useState(0),Qt=C.useMemo(()=>{const oe=ke.trimStart();if(!oe.startsWith("/"))return[];if(/\s/.test(oe))return[];const ze=oe.toLowerCase();return tk.filter(Je=>(!(r||b)||Je.command!=="/run-sweep")&&(!b||Je.action!=="new")&&(!s||Vg.some(Ot=>Ot.prompt===Je.prompt))&&(Je.command.startsWith(ze)||Je.label.toLowerCase().includes(ze.slice(1))))},[ke,r,b,s]);C.useEffect(()=>{Ft(oe=>Qt.length===0?0:Math.min(oe,Qt.length-1))},[Qt.length]);const En=yt({...XZ({client:J,path:{name:e}}),enabled:!b&&!s,staleTime:6e4}),Vt=C.useMemo(()=>{const oe=En.data?.providers??[];if(me){const Je=oe.find(Ot=>Ot.id===me&&Ot.configured);if(Je)return Je}const ze=En.data?.defaultProvider;return ze?oe.find(Je=>Je.id===ze)??null:null},[me,En.data]),ds=b||s||Vt!==null;yt({...ek(e),enabled:s&&v}),C.useEffect(()=>{if(!En.data||!me)return;En.data.providers.find(ze=>ze.id===me&&ze.configured)||(Ct(null),ak(Ed(e)))},[En.data,me,e]);const Vi=C.useCallback(oe=>{Ct(oe),oe?PJ(Ed(e),oe):ak(Ed(e))},[e]);C.useEffect(()=>{if(!v)return;const oe=ze=>{ze.key==="Escape"&&(L?$(!1):S?k(!1):x(!1))};return window.addEventListener("keydown",oe),()=>window.removeEventListener("keydown",oe)},[v,S,L]);const ms=C.useRef(null);C.useEffect(()=>{v||(ms.current=null)},[v]),C.useEffect(()=>{if(!v||!ds||s)return;let oe=!1;ms.current!==e&&(ms.current=e,xe(null));const ze=()=>{oe||B||Ue.current||Yf(e).then(et=>{oe||Ue.current||(Ce(et.isStreaming??!1),q(et.conversationId??null),!oe&&!et.isStreaming&&(Ze.current===null||et.updatedAt&&et.updatedAt!==Ze.current.previous)&&(T(et.messages),re.current=et.updatedAt,Ze.current=null))}).catch(et=>{oe||xe(qs(et))})};ze();const Ot=window.setInterval(ze,15e3);return()=>{oe=!0,window.clearInterval(Ot)}},[v,e,B,ds,V,s]),C.useEffect(()=>(Qe.current=!0,()=>{Qe.current=!1,qn.current?.abort()}),[e]);async function Rn(oe,ze=n){const Je=oe.trim();if(!Je||L||B||V||Ue.current||X||!ds)return;if(s){await Vo(Je);return}if(r&&/^\/run-sweep(?:\s|$)/i.test(Je)){xe(Lg);return}xe(null),ce(null),_e({prompt:Je,context:ze}),Le(""),W(!0),Se(""),bt.current=null,Ae([]),Ze.current={previous:re.current};const Ot={role:"user",content:Je,timestamp:Date.now(),aeroContext:ze};T(kt=>[...kt,Ot]);const et=new AbortController;qn.current=et;try{await RJ({project:e,prompt:Je,conversationId:z,provider:me??void 0,scope:Ne,context:ze,signal:et.signal,onEvent:$i});const kt=await Yf(e);Qe.current&&!kt.isStreaming&&(q(kt.conversationId??null),T(kt.messages),re.current=kt.updatedAt,Ze.current=null)}catch(kt){if(!Qe.current)return;b&&(Ze.current=null);const sn=bt.current;sn&&Ld(sn).trim()&&T(hs=>[...hs,sn]),et.signal.aborted?ce("Stopped. Partial response preserved. An action already dispatched may still finish."):xe(qs(kt))}finally{Qe.current&&(W(!1),Se(""),Ae(kt=>kt.map(sn=>sn.endedAt===void 0?{...sn,interrupted:!0}:sn))),qn.current=null}}async function Vo(oe){const ze=tk.find(et=>et.command===oe.toLowerCase())?.prompt??oe,Je=Vg.find(et=>et.prompt===ze)?.id;if(!Je){xe(null),_e(null),ce(zJ);return}xe(null),ce(null),_e({prompt:ze}),Le(""),W(!0),Se(""),bt.current=null,Ae([]),T(et=>[...et,{role:"user",content:ze,timestamp:Date.now()}]);const Ot=new AbortController;qn.current=Ot;try{const et=await f.ensureQueryData(ek(e));if(Ot.signal.aborted)throw new DOMException("Preview stopped","AbortError");const kt=et.starters.find(sn=>sn.id===Je);if(!kt)throw new Error("This demo has no sample answer for that starting point.");await CJ({starter:kt,signal:Ot.signal,onEvent:$i,reducedMotion:kJ()})}catch(et){if(!Qe.current)return;const kt=bt.current;kt&&Ld(kt).trim()&&T(sn=>[...sn,kt]),Ot.signal.aborted?ce(IJ):xe(qs(et))}finally{Qe.current&&(W(!1),Se(""),Ae(et=>et.map(kt=>kt.endedAt===void 0?{...kt,interrupted:!0}:kt))),qn.current=null}}function $i(oe){if(Qe.current)switch(oe.type){case"message_update":oe.message.role==="assistant"&&(bt.current=oe.message),Se(Ld(oe.message));break;case"message_end":if(oe.message.role!=="user"){const ze=oe.message;T(Je=>[...Je,ze])}oe.message.role==="assistant"&&(bt.current=null,Se(""),oe.message.errorMessage&&xe(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"?_e(null):oe.status?.reason==="error"&&xe(ze=>ze??"Aero could not finish this answer. Retry to ask again.");break;case"tool_execution_start":Ae(ze=>[...ze,{id:oe.toolCallId,name:oe.toolName,label:oe.label,args:oe.args,startedAt:Date.now()}]);break;case"tool_execution_end":Ae(ze=>ze.map(Je=>Je.id===oe.toolCallId?{...Je,endedAt:Date.now(),isError:oe.isError,result:oe.result}:Je));break;case"error":xe(oe.message);break}}async function Ki(oe,ze=!1){if(!(B||X||Ue.current)){Ue.current=!0,Z(!0),xe(null);try{await oe();const Je=await Yf(e);if(!Qe.current)return;Ze.current=null,re.current=Je.updatedAt,q(Je.conversationId??null),T(Je.messages),Ae([]),Se(""),ce(null),_e(null),Ke(null),$(ze),ae(ze?await AS(e):null),Ve.current?.focus()}catch(Je){Qe.current&&xe(qs(Je))}finally{Ue.current=!1,Qe.current&&Z(!1)}}}async function ps(){if(s){if(B)return;T([]),Ae([]),Se(""),xe(null),ce(null),_e(null),Ve.current?.focus();return}await Ki(()=>b?EJ(e):xF(e,crypto.randomUUID()))}async function vn(oe=!1){if(!(Ue.current||E.current)){E.current=!0,M(!0),$(!0),xe(null);try{const ze=await AS(e,{offset:oe?Q?.nextOffset??0:0});Qe.current&&ae(Je=>oe&&Je?{...ze,conversations:[...Je.conversations,...ze.conversations]}:ze)}catch(ze){Qe.current&&xe(qs(ze))}finally{E.current=!1,Qe.current&&M(!1)}}}const Et=N.length===0,$n=!(b||s);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(hd,{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(le,{variant:"outline",size:"sm",className:"pointer-events-auto ml-auto",onClick:()=>{En.refetch()},children:"Try again"})]})});const Zt=Vt&&!Vt.configured?Vt:null;if($n&&(!Vt||Zt))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(hd,{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:[Zt?`Aero is set to ${Zt.label.replace(/\s+\(.+\)$/,"")}, which has no API key.`:"Aero needs an answer-engine provider.",l.jsx(ua,{text:Zt?`Set ${JC(Zt.id)} on the server, or providers.${Zt.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."})]}),Zt?null:u?l.jsx(le,{asChild:!0,variant:"outline",size:"sm",className:"pointer-events-auto ml-auto",children:l.jsx(at,{to:"/settings",children:"Open Settings"})}):l.jsx("span",{className:"ml-auto text-secondary",children:"Ask an administrator to configure one."})]})});const Gi=v&&S?"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",Oa=S?"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",ea=S?"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:Gi,onClick:oe=>{S&&oe.target===oe.currentTarget&&k(!1)},children:l.jsx("div",{className:Oa,children:v?l.jsxs("div",{"data-aero-panel":!0,className:S?"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(hd,{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:B||X?"working…":e})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[!r&&!b&&!s&&l.jsx(MJ,{providers:En.data?.providers??[],active:Vt,override:me,onPick:Vi,disabled:B}),l.jsx("button",{type:"button",onClick:()=>k(oe=>!oe),className:"rounded-md p-1.5 text-muted transition hover:bg-surface-inset hover:text-strong","aria-label":S?"Collapse":"Expand",title:S?"Collapse":"Expand",children:S?l.jsx(E_,{className:"h-3.5 w-3.5","aria-hidden":"true"}):l.jsx(R_,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),l.jsx("button",{type:"button",onClick:()=>{k(!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(Hr,{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(le,{variant:"outline",size:"sm",disabled:B||X||V,onClick:fn(ps),title:b||s?"Clear this conversation and start fresh.":"Save this conversation and start fresh. Shared project notes are kept.",children:[l.jsx(tg,{className:"h-3.5 w-3.5","aria-hidden":"true"})," New conversation"]}),!b&&!s&&l.jsxs(le,{variant:"ghost",size:"sm","aria-expanded":L,"aria-controls":"aero-history",disabled:V,onClick:()=>{L?$(!1):vn()},children:[l.jsx(zk,{className:"h-3.5 w-3.5","aria-hidden":"true"})," History"]})]}),L?l.jsxs("div",{id:"aero-history",className:ea,"aria-label":"Conversation history",children:[l.jsxs("h3",{className:"mb-2 text-sm font-medium text-heading",children:["Conversations in ",e]}),Q?Q.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:Q.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:B||X||V,onClick:()=>{oe.active?$(!1):Ki(()=>wF(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(le,{variant:"ghost",size:"sm",disabled:B||X||V,"aria-label":`Delete conversation: ${oe.title}`,onClick:()=>Ke(oe.id),children:"Delete"})]}),tt===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(le,{variant:"destructive",size:"sm",disabled:V,onClick:()=>{Ki(async()=>{await SF(e,oe.id)},!0)},children:"Delete conversation"}),l.jsx(le,{variant:"ghost",size:"sm",disabled:V,onClick:()=>Ke(null),children:"Cancel"})]})]})]},oe.id))}):l.jsx("p",{className:"text-sm text-secondary",children:P?"Loading history…":"History could not be loaded. Close and reopen History to retry."}),Q?.nextOffset!=null&&l.jsx(le,{variant:"ghost",size:"sm",disabled:P,onClick:()=>{vn(!0)},children:P?"Loading…":"Load more"})]}):l.jsxs("div",{ref:Ht,className:ea,children:[Et&&!B&&l.jsxs("div",{className:"flex flex-col gap-3 py-2",children:[l.jsx("p",{className:"text-sm text-secondary",children:s?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(sk,{onPick:oe=>{Rn(oe)}})]}),KJ(N,e,me,Ne,ve,B,!!ie.trim(),!b&&!s),B&&ie&&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(t4,{content:ie})]}),B&&!ie&&ve.every(oe=>oe.endedAt!==void 0)&&l.jsx(eW,{}),s&&!Et&&!B&&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(sk,{onPick:oe=>{Rn(oe)}})]})]}),(Me||pe)&&l.jsxs("div",{role:Me?"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:Me??pe}),ue&&!B&&l.jsx(le,{variant:"outline",size:"sm",onClick:()=>{Ne==="all"?(Le(ue.prompt),Ve.current?.focus()):Rn(ue.prompt,ue.context)},children:Ne==="all"?"Review prompt":"Retry"})]}),s&&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:DJ,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(Rk,{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:[!L&&Qt.length>0&&l.jsx(VJ,{title:s?"Starting points":"Commands",matches:Qt,selectedIndex:ct,onHover:Ft,onPick:oe=>{Le(""),Ve.current?.focus(),oe.action==="new"?ps():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(),Qt.length>0){const ze=Qt[ct];Le(""),ze.action==="new"?ps():Rn(ze.prompt);return}Rn(ke)},children:[l.jsx("textarea",{ref:Ve,value:ke,onChange:oe=>Le(oe.target.value),onKeyDown:oe=>{if(Qt.length>0){if(oe.key==="ArrowDown"){oe.preventDefault(),Ft(ze=>(ze+1)%Qt.length);return}if(oe.key==="ArrowUp"){oe.preventDefault(),Ft(ze=>(ze-1+Qt.length)%Qt.length);return}if(oe.key==="Tab"){oe.preventDefault();const ze=Qt[ct];Le(`${ze.command} `);return}if(oe.key==="Escape"){oe.preventDefault(),Le("");return}}if(oe.key==="Enter"&&!oe.shiftKey)if(oe.preventDefault(),Qt.length>0){const ze=Qt[ct];Le(""),ze.action==="new"?ps():Rn(ze.prompt)}else Rn(ke)},disabled:L||V,placeholder:L?"Open a conversation to continue…":s?"Type / for a starting point":"Ask Aero, or / for commands…","aria-label":"Message Aero",rows:S?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"}),B?l.jsxs(le,{type:"button",variant:"outline",size:"sm",onClick:()=>qn.current?.abort(),"aria-label":"Stop Aero",children:[l.jsx(Ik,{className:"h-3.5 w-3.5","aria-hidden":"true"})," Stop"]}):l.jsx(le,{type:"submit",size:"sm",disabled:!ke.trim()||L||V||X,"aria-label":"Send",children:l.jsx(D_,{className:"h-4 w-4","aria-hidden":"true"})})]})]})]}):l.jsx("button",{type:"button",onClick:()=>{x(!0),Bo("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(hd,{className:"h-4 w-4 text-positive-400","aria-hidden":"true"}),"Ask Aero about ",e,"…"]})})})})}function MJ({providers:e,active:n,override:s,onPick:r,disabled:u}){const[h,f]=C.useState(!1),b=C.useRef(null);if(C.useEffect(()=>{if(!h)return;const x=k=>{b.current?.contains(k.target)||f(!1)},S=k=>{k.key==="Escape"&&f(!1)};return window.addEventListener("mousedown",x),window.addEventListener("keydown",S),()=>{window.removeEventListener("mousedown",x),window.removeEventListener("keydown",S)}},[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(Lc,{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 S=n?.id===x.id,k=s===x.id;return l.jsx("li",{children:l.jsxs("button",{type:"button",role:"option","aria-selected":S,disabled:!x.configured,onClick:()=>{x.configured&&(r(k?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 ${JC(x.id)} in Settings or your environment`,children:[l.jsx("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center",children:S?l.jsx(Uc,{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+\(.+\)$/,"")}),k&&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)})}),s&&l.jsx("button",{type:"button",onClick:()=>{r(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 BJ=144,LJ=288,Xf=288,UJ=8;function VJ({title:e,matches:n,selectedIndex:s,onHover:r,onPick:u}){const h=C.useRef(null),f=C.useRef(null),b=C.useRef(null),[v,x]=C.useState(Xf);return C.useLayoutEffect(()=>{const S=h.current,k=S?.closest("[data-aero-panel]"),N=S?.parentElement;if(!S||!k||!N)return;const T=N.getBoundingClientRect().top-k.getBoundingClientRect().top-UJ*2-(f.current?.getBoundingClientRect().height??0);x(T>0?Math.min(Xf,Math.floor(T)):Xf)},[n.length]),C.useEffect(()=>{b.current?.querySelector('[aria-selected="true"]')?.scrollIntoView?.({block:"nearest"})},[s]),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((S,k)=>{const N=k===s;return l.jsx("li",{children:l.jsxs("button",{type:"button",role:"option","aria-selected":N,onMouseEnter:()=>r(k),onClick:()=>u(S),className:`flex w-full items-center gap-3 px-3 py-2 text-left text-sm transition ${N?"bg-bg-elevated text-heading":"text-neutral hover:bg-bg-elevated/60"}`,children:[l.jsx("span",{className:"font-medium",children:S.label}),l.jsx("span",{className:"ml-auto font-mono text-[11px] text-secondary",children:S.command})]})},S.command)})})]})}function sk({onPick:e}){return l.jsx("div",{className:"flex flex-wrap gap-1.5",children:Vg.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 JC(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 $J(e,n){const s=e.timestamp??0;return`${e.role}:${s}:${n}`}function KJ(e,n,s,r,u,h,f,b=!0){const v=[];let x=[],S=0;for(let N=e.length-1;N>=0;N--)if(e[N].role==="user"){S=N+1;break}const k=(N=!1)=>{x.length!==0&&(v.push(l.jsx(JJ,{trails:x,betweenSteps:N&&h&&!f},`tools:${x[0].id}`)),x=[])};for(let N=0;N<e.length;N++){const T=e[N],z=$J(T,N);if(T.role==="user"){k();const q=typeof T.content=="string"?T.content:JSON.stringify(T.content);if(q.startsWith("[system]"))continue;v.push(l.jsx(GJ,{text:q,projectName:n,providerOverride:s,scope:r,context:T.aeroContext,cliCopy:b},z));continue}if(T.role==="assistant"){const q=new Map;let E=N+1;for(;E<e.length&&e[E].role==="toolResult";){const $=e[E];q.set($.toolCallId,$),E++}const P=h&&N>=S,M=FJ(T,q).map($=>{const Q=u.find(V=>V.id===$.id),ae={...$,...Q,label:$.label??Q?.label};return{...ae,interrupted:ae.endedAt===void 0&&(!P||ae.interrupted)}}),L=Ld(T);L.trim()&&(k(),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(t4,{content:L})]},z))),x.push(...M),N=E-1;continue}}return k(!0),v}function GJ({text:e,projectName:n,providerOverride:s,scope:r,context:u,cliCopy:h=!0}){const[f,b]=C.useState(!1),v=C.useMemo(()=>HJ(n,e,s,r,u),[n,e,s,r,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(Uc,{className:"h-2.5 w-2.5 text-positive-400","aria-hidden":"true"}),"Copied"]}):l.jsxs(l.Fragment,{children:[l.jsx(Wg,{className:"h-2.5 w-2.5","aria-hidden":"true"}),"Copy as CLI"]})})]}),l.jsx("div",{className:"whitespace-pre-wrap",children:e})]})}function HJ(e,n,s,r,u){const h=["canonry","agent","ask",Uf(e),Uf(n)];return s&&h.push("--provider",s),r==="read-only"&&h.push("--scope","read-only"),u&&h.push("--context",Uf(JSON.stringify(u))),h.join(" ")}function FJ(e,n){const s=[];for(const r of e.content){if(r.type!=="toolCall")continue;const u=r,h=n.get(u.id);s.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 s}const ik=new Set(["aero_list_toolkits","aero_load_toolkit"]),QJ=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 qr(e){return e.endedAt===void 0&&!e.interrupted}function $g(e){return e.label??e.name.replace(/^(?:canonry|aero)_/,"").replace(/_/g," ")}function WC(e){const n=e.durationMs??(e.endedAt!=null&&e.startedAt!=null?e.endedAt-e.startedAt:null);return n==null||n<0?null:n}function e4(e){let n=null;for(const s of e){const r=WC(s);r!=null&&(n=(n??0)+r)}return n}function G1(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function ZJ(e){const n=Math.floor(Math.max(0,e)/1e3);return n<60?`${n}s`:`${Math.floor(n/60)}m ${n%60}s`}function Jf(e,n,s){return`${e} ${e===1?n:s}`}function ok(e=""){return QJ.get(e.charAt(0).toUpperCase()+e.slice(1))}function YJ(e){const[n,...s]=e.trim().split(/\s+/),r=ok(n);if(!r)return"Working…";if(s[0]==="or"||s[0]==="and"){const u=ok(s[1]);return u?`${[r,s[0],u.toLowerCase(),...s.slice(2)].join(" ")}…`:"Working…"}return`${[r,...s].join(" ")}…`}function XJ(e){const[n,s]=C.useState(()=>Date.now());return C.useEffect(()=>{if(!e)return;const r=()=>s(Date.now()),u=window.setTimeout(r,0),h=window.setInterval(r,1e3);return()=>{window.clearTimeout(u),window.clearInterval(h)}},[e]),n}function JJ({trails:e,betweenSteps:n}){const[s,r]=C.useState(!1),u=C.useId(),h=e.filter($=>!ik.has($.name)),f=e.filter($=>ik.has($.name)),b=h.filter(qr),v=b.length>0?b[b.length-1]:void 0,x=f.some(qr),S=v!==void 0||x||n,k=h.length>0?h:f,N=k.filter($=>!qr($)&&$.isError===!0).length,T=e.some($=>$.interrupted),z=e.flatMap($=>$.startedAt===void 0?[]:[$.startedAt]),q=z.length>0?Math.min(...z):void 0,E=XJ(S),P=e4(k),M=S?v?YJ($g(v)):x?"Loading tools…":"Working…":h.length>0?Jf(h.length,"step","steps"):Jf(f.length,"setup step","setup steps"),L=new Map;for(const $ of h){const Q=$g($),ae=L.get(Q);ae?ae.push($):L.set(Q,[$])}return l.jsxs("div",{className:"mt-3 rounded-md border border-mono-800/70 bg-surface-hover",children:[l.jsxs("button",{type:"button",onClick:()=>r($=>!$),className:"flex w-full items-center gap-2 px-2.5 py-1.5 text-left","aria-expanded":s,"aria-controls":u,children:[l.jsx("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:S?l.jsx(Ti,{className:"h-3 w-3 animate-spin text-positive-400 motion-reduce:animate-none","aria-hidden":"true"}):N>0?l.jsx(ym,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):T?l.jsx(Ik,{className:"h-3 w-3 text-muted","aria-hidden":"true"}):l.jsx(Uc,{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:M}),N>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:[N," failed"]}),T&&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:[S?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:ZJ(E-q)})]}):P!=null&&l.jsx("span",{className:"tabular-nums",children:G1(P)}),l.jsx(Vc,{className:`h-3 w-3 transition-transform ${s?"rotate-90":""}`,"aria-hidden":"true"})]})]}),s&&l.jsxs("div",{id:u,className:"space-y-1.5 border-t border-default px-2.5 py-2",children:[[...L].map(([$,Q])=>l.jsx(rk,{trails:Q,title:$},`label:${$}`)),f.length>0&&l.jsx(rk,{trails:f,title:`+ ${Jf(f.length,"setup step","setup steps")}`,muted:!0},"setup")]})]})}function rk({trails:e,title:n,muted:s=!1}){const[r,u]=C.useState(!1),h=C.useId(),f=!s&&e.length===1,b=e.some(qr),v=e.filter(N=>!qr(N)&&N.isError===!0).length,x=e.some(N=>N.interrupted),S=e4(e),k=f?()=>u(!0):void 0;return l.jsxs("div",{className:f?void 0:s?"rounded-md":"rounded-md border border-mono-800/70 bg-surface-hover",onFocus:k,onClick:k,children:[!f&&l.jsxs("button",{type:"button",onClick:()=>u(N=>!N),className:"flex w-full items-center gap-2 px-2.5 py-1.5 text-left","aria-expanded":r,"aria-controls":h,children:[!s&&l.jsx("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:b?l.jsx(Ti,{className:"h-3 w-3 animate-spin text-positive-400 motion-reduce:animate-none","aria-hidden":"true"}):v>0?l.jsx(ym,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):l.jsx(Ok,{className:"h-3 w-3 text-muted","aria-hidden":"true"})}),l.jsx("span",{className:s?"text-xs text-muted":"text-sm font-medium text-heading",children:n}),!s&&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"}),S!=null&&l.jsx("span",{className:"tabular-nums",children:G1(S)})]}),l.jsx(Vc,{className:`h-3 w-3 transition-transform ${r?"rotate-90":""}`,"aria-hidden":"true"})]})]}),(f||r)&&l.jsx("div",{id:h,className:f?void 0:"space-y-1.5 px-2.5 pb-2",children:e.map(N=>l.jsx(WJ,{trail:N},N.id))})]})}function WJ({trail:e}){const[n,s]=C.useState(!1),r=qr(e),u=!r&&e.isError===!0,h=WC(e),f=h==null?null:G1(h),b=u?"border-negative-800/50":r?"border-positive-800/50":"border-mono-800/70",v=u?"bg-negative-950/20":r?"bg-positive-950/20":"bg-surface-hover";return l.jsxs("div",{className:`rounded-md border ${b} ${v}`,children:[l.jsxs("button",{type:"button",onClick:()=>s(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:r?l.jsx(Ti,{className:"h-3 w-3 animate-spin text-positive-400","aria-hidden":"true"}):u?l.jsx(ym,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):l.jsx(Ok,{className:"h-3 w-3 text-muted","aria-hidden":"true"})}),l.jsx("span",{className:"text-sm font-medium text-heading",children:$g(e)}),l.jsxs("span",{className:"ml-auto flex items-center gap-2 text-[10px] text-muted",children:[r?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(Vc,{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:lk(e.args)}),!r&&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:lk(e.result)})]})]})]})}function lk(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 t4({content:e}){return l.jsx("div",{className:"text-heading",children:l.jsx(Q_,{remarkPlugins:[Z_],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,...s})=>l.jsx("code",{...s,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 eW(){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 n4({isAdmin:e,account:n}){return e||n?.role==="viewer"&&LH()}function tW(){const{isAdmin:e,account:n}=fa(),s=Ak(),r=/^\/projects\/([^/]+)/.exec(s.pathname),u=r?decodeURIComponent(r[1]):null,h=yt({...Lo({client:J}),enabled:u!==null,staleTime:6e4}),f=dJ(s.pathname,s.search),b=h.data??[],v=b.find(N=>N.id===u)??b.find(N=>N.name===u),x=QF(v?.name??u??"",f),S=D1(),k=S||n4({isAdmin:e,account:n});return!u||!k||!v?null:l.jsx(qJ,{projectName:v.name,context:x,preview:S},v.name)}function ck(e,n,s){switch(e.invalidateQueries({queryKey:SC({client:J})}),e.invalidateQueries({queryKey:Kr({client:J})}),On(e,"runs"),n){case Oe["answer-visibility"]:Bg(e,s,"none"),On(e,"visibilityReport"),On(e,"queryTracking");return;case Oe["backlink-extract"]:return;case Oe["site-audit"]:On(e,"technicalAeo");return;case Oe["gsc-sync"]:case Oe["inspect-sitemap"]:On(e,"gsc");return;case Oe["ga-sync"]:On(e,"ga");return;case Oe["traffic-sync"]:On(e,"ga"),On(e,"traffic");return;case Oe["bing-inspect"]:case Oe["bing-inspect-sitemap"]:On(e,"bing");return;case Oe["aeo-discover-seed"]:case Oe["aeo-discover-probe"]:Bg(e,s);return;case Oe["gbp-sync"]:On(e,"gbp");return;case Oe["ads-sync"]:On(e,"ads");return;case Oe["google-ads-sync"]:On(e,"googleAds"),On(e,"conversionTracking");return;case Oe["gtm-sync"]:On(e,"gtm"),On(e,"conversionTracking");return;default:return n}}const uk=[{label:"GitHub",href:"https://github.com/Canonry/canonry",Icon:Dk},{label:"Docs",href:"https://github.com/Canonry/canonry/tree/main/docs",Icon:L_},{label:"Changelog",href:"https://github.com/Canonry/canonry/releases",Icon:U_}],dk=e=>({label:e,state:"checking",detail:"Checking service health"}),nW={apiStatus:dk("API"),workerStatus:dk("Worker")};function aW(e){return e==="completed"?"positive":e==="partial"?"caution":"negative"}function sW(e){const n=Nc(e.kind);return e.status==="completed"?`${n} completed`:e.status==="partial"?`${n} completed with partial results`:e.status==="cancelled"?`${n} cancelled`:`${n} failed`}function iW(e,n){return e.error?`${n}: ${D0(e.error)}`:e.location?`${n} · ${e.location}`:n}function mk(e,n,s){if(n)return n;const r=s.find(u=>u.id===e);return r?.displayName||r?.name||e}function oW(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 rW(e){return e.failed>0||e.cancelled>0?"negative":e.partial>0?"caution":"positive"}function lW(){const e=Di(),n=C.useSyncExternalStore(CC,Gs,Gs),s=Object.keys(n.runs).length>0||Object.keys(n.batches).length>0,r=yt({...qc({client:J}),enabled:s,staleTime:_i,refetchInterval:3e3}),u=yt({...Lo({client:J}),enabled:s}),h=C.useRef({}),f=C.useCallback(()=>{r.refetch()},[r.refetch]);return C.useEffect(()=>{s&&f()},[s,f]),C.useEffect(()=>{if(!s||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)}},[s,f]),C.useEffect(()=>{const b=r.data??[],v=u.data??[],x=Object.fromEntries(b.map(k=>[k.id,k])),S=Object.fromEntries(b.map(k=>[k.id,k.status]));for(const k of Object.values(n.runs)){const N=x[k.runId];if(!N||!lY(N.status)||(h.current[N.id]??k.lastAnnouncedStatus)===N.status)continue;const z=v.find(E=>E.id===N.projectId);if(z&&ck(e,N.kind,z.name),k.sourceAction==="run-all"){Gf(N.id);continue}const q=mk(N.projectId,k.projectLabel,v);bn({title:sW(N),detail:iW(N,q),tone:aW(N.status),dedupeKey:`run:${N.id}`,dedupeMode:"replace",cta:{label:"View run",intent:"open-run-drawer",runId:N.id}}),Gf(N.id)}if(r.data!==void 0){const k=new Set(b.map(T=>T.id)),N=uY(Object.values(n.runs),k,Date.now(),cY);for(const T of N){const z=v.find(q=>q.id===T.projectId);z&&ck(e,T.kind,z.name),T.sourceAction!=="run-all"&&bn({title:`${Nc(T.kind)} status unavailable`,detail:mk(T.projectId,T.projectLabel,v),tone:"neutral",dedupeKey:`run-stale:${T.runId}`,dedupeMode:"replace"}),Gf(T.runId)}}for(const k of Object.values(n.batches)){const N=dY(k.runIds,x);N.finished&&(bn({title:"Run-all batch finished",detail:oW(N,k.skippedCount),tone:rW(N),dedupeKey:`batch:${k.batchId}`,dedupeMode:"replace",cta:{label:"View runs",intent:"go-to-runs"}}),rY(k.batchId))}h.current=S},[u.data,r.data,n,e]),null}function cW(){const{account:e,isAdmin:n}=fa(),s=iu(),r=C.useMemo(()=>lC(),[]),u=C.useMemo(MH,[]),h=C.useMemo(BH,[]),f=D1()||h&&n4({isAdmin:n,account:e}),b=C.useMemo(UH,[]),v=Ak(),{dashboard:x,isLoading:S,refetch:k}=Jm(void 0,{includeSettings:!r,includeOverviews:!1,pauseProjectPolling:v.pathname==="/setup"}),z=V1(!s,s?.health).data??s?.health??nW,{runId:q,evidenceId:E,closeDrawer:P}=$1(),[M,L]=C.useState(!1),[$,Q]=C.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem("canonry:sidebarHidden")==="true"}catch{return!1}}),[ae,V]=C.useState(()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem("canonry:dismissedUpdateVersion")}catch{return null}}),[Z]=C.useState(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("force-update")),X=Z?{current:z.apiStatus.version??"0.0.0",latest:Z,url:"https://www.npmjs.com/package/@canonry/canonry",upgradeCommand:"npm install -g @canonry/canonry"}:z.apiStatus.updateAvailable,Ce=b&&X&&X.latest!==ae,tt=()=>{if(X){try{window.localStorage.setItem("canonry:dismissedUpdateVersion",X.latest)}catch{}V(X.latest)}},Ke=()=>{const re=!$;try{re?window.localStorage.setItem("canonry:sidebarHidden","true"):window.localStorage.removeItem("canonry:sidebarHidden")}catch{}Q(re)},Ue=XX(q),ke=Ue.data??null,Le=Ue.isLoading;C.useEffect(()=>{ke&&ke.status!=="running"&&ke.status!=="queued"&&k()},[ke?.status,k]),C.useEffect(()=>{L(!1)},[v.pathname]),C.useEffect(()=>{if(typeof window>"u"||!q&&!E)return;const re=Ze=>{Ze.key==="Escape"&&P()};return window.addEventListener("keydown",re),()=>{window.removeEventListener("keydown",re)}},[q,E,P]);const B=x??s?.dashboard??null,W=v.pathname==="/setup",ve=W&&B!==null&&B.portfolioOverview.projects.length===0,Ae=W&&(v.search.onboarding==="site-health"||v.search.onboarding==="first-run"||v.search.onboarding==="complete"),[ie,Se]=C.useState(ve);C.useEffect(()=>{W?ve&&Se(!0):Se(!1)},[ve,W]);const xe=W&&(Ae||ve||ie||W&&B===null),pe=xe?"app-shell-focus":$?"app-shell-sidebar-hidden":"",ce=q?(B?wX(B,q):void 0)??(ke?su(ke,B?.projects.find(re=>re.project.id===ke.projectId)?.project.displayName??B?.projects.find(re=>re.project.id===ke.projectId)?.project.name??"Unknown project"):void 0):void 0,ue=C.useMemo(()=>yX(v.pathname,B),[v.pathname,B]),{commandCenter:_e,evidenceLoading:Qe,evidenceError:Ee,isError:Ct,refetch:me}=QX(E?ue:null,{evidence:!0}),Be=C.useMemo(()=>{if(E)return kX(_e,B,E)},[E,_e,B]),Ne=(()=>{const re=v.pathname;if(re==="/")return"All projects";if(re==="/projects")return"Projects";if(re==="/runs")return"Runs";if(re==="/history")return"History";if(re==="/settings")return"Settings";if(re==="/setup")return"Setup";if(re==="/backlinks")return"Backlink data";if(re==="/traffic"||re.startsWith("/traffic/"))return"Traffic sources";if(re.startsWith("/projects/")){const Ze=B?.projects.find(bt=>bt.project.name===ue);return Ze?.project.displayName||Ze?.project.name||ue||"Projects"}return"Not found"})();if(r){const re=AN(r.projectTabs),Ze=!r.views||r.views.includes(sQ(v.pathname));return l.jsxs("div",{className:"app-shell app-shell-embed","data-theme":cQ(r.theme),style:uQ(r.theme),children:[l.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),l.jsx("main",{id:"content",className:"page-shell",children:re?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."}):Ze?l.jsx(eg,{}):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(sJ,{}),l.jsxs("div",{className:`app-shell ${pe}${jo()?" app-shell-demo":""}`,children:[!xe&&!$&&l.jsxs("aside",{id:"desktop-sidebar",className:"sidebar","aria-label":"Primary navigation",children:[l.jsx("div",{className:"sidebar-brand",children:l.jsx(VS,{version:z.apiStatus.version,updateAvailable:Ce?X:null,onDismissUpdate:tt})}),l.jsxs("nav",{className:"sidebar-nav",children:[l.jsxs(at,{to:"/",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(z_,{className:"sidebar-icon"}),l.jsx("span",{children:"All projects"})]}),l.jsxs(at,{to:"/projects",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[l.jsx(I_,{className:"sidebar-icon"}),l.jsx("span",{children:"Projects"})]}),l.jsxs(at,{to:"/runs",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(O_,{className:"sidebar-icon"}),l.jsx("span",{children:"Runs"})]}),l.jsxs(at,{to:"/history",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(zk,{className:"sidebar-icon"}),l.jsx("span",{children:"History"})]}),l.jsxs(at,{to:"/traffic",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[l.jsx(P_,{className:"sidebar-icon"}),l.jsx("span",{children:"Traffic sources"})]}),!jo()&&l.jsxs(at,{to:"/backlinks",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(q_,{className:"sidebar-icon"}),l.jsx("span",{children:"Backlink data"})]}),n&&l.jsxs(at,{to:"/settings",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(M_,{className:"sidebar-icon"}),l.jsx("span",{children:"Settings"})]}),S?l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"sidebar-section-title",children:"Tracked projects"}),[1,2,3].map(re=>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+re*15}%`}})]},re))]}):B&&B.projects.length>0?l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"sidebar-section-title",children:"Tracked projects"}),B.projects.map(re=>{const Ze=re.visibilitySummary.tone;return l.jsxs(at,{to:"/projects/$projectName",params:{projectName:re.project.name},className:"sidebar-project",activeProps:{className:"sidebar-project sidebar-project-active"},children:[l.jsx("span",{className:`sidebar-dot sidebar-dot-${Ze}`}),l.jsx("span",{children:re.project.displayName||re.project.name})]},re.project.id)})]}):S?null:l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"sidebar-section-title",children:"Resources"}),n&&l.jsxs(at,{to:"/setup",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(B_,{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:xS()}):null]}),l.jsx(le,{type:"button",variant:"ghost",size:"sm",onClick:fn(async()=>{await jS(),window.location.reload()}),children:"Sign out"})]}),u?l.jsx("div",{className:"sidebar-footer",children:uk.map(({label:re,href:Ze,Icon:bt})=>l.jsx("a",{className:"sidebar-footer-icon",href:Ze,target:"_blank",rel:"noopener noreferrer",title:re,"aria-label":re,children:l.jsx(bt,{className:"size-4"})},Ze))}):null]}),l.jsxs("div",{className:"main-area",children:[l.jsxs("header",{className:"topbar",children:[l.jsxs("div",{className:"topbar-left",children:[!xe&&l.jsx(le,{className:"sidebar-privacy-toggle",variant:"ghost",size:"icon",type:"button","aria-label":$?"Show sidebar":"Hide sidebar","aria-controls":$?void 0:"desktop-sidebar","aria-expanded":!$,title:$?"Show sidebar":"Hide sidebar",onClick:Ke,children:$?l.jsx(V_,{className:"size-4"}):l.jsx($_,{className:"size-4"})}),l.jsx("div",{className:"topbar-brand-mobile",children:l.jsx(VS,{compact:!0})}),l.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[l.jsx(at,{to:"/",children:"Home"}),l.jsx(Vc,{className:"breadcrumb-sep size-3"}),l.jsx("span",{className:"breadcrumb-current",children:Ne})]})]}),l.jsxs("div",{className:"topbar-actions",children:[l.jsx(iJ,{}),l.jsxs("div",{className:"health-pill-row",children:[l.jsxs("span",{className:`health-pill health-pill-${z.apiStatus.state}`,title:Gr(z.apiStatus),children:["API ",z.apiStatus.state==="ok"?"ok":z.apiStatus.state]}),l.jsx("span",{className:`health-pill health-pill-${z.workerStatus.state}`,title:Gr(z.workerStatus),children:`Worker ${z.workerStatus.state==="ok"?"ok":z.workerStatus.state}`})]}),xe?null:l.jsxs(le,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":M,"aria-controls":"mobile-nav",onClick:()=>L(re=>!re),children:[l.jsx(K_,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),xe?null:l.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${M?"mobile-nav-open":""}`,children:[l.jsxs(le,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>L(!1),children:[l.jsx(Hr,{className:"size-5"}),l.jsx("span",{className:"sr-only",children:"Close navigation"})]}),l.jsx(at,{to:"/",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"All projects"}),l.jsx(at,{to:"/projects",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Projects"}),l.jsx(at,{to:"/runs",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Runs"}),l.jsx(at,{to:"/history",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"History"}),l.jsx(at,{to:"/traffic",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Traffic sources"}),!jo()&&l.jsx(at,{to:"/backlinks",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Backlink data"}),n&&l.jsx(at,{to:"/settings",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Settings"}),B&&B.projects.length>0?l.jsxs("div",{className:"mobile-nav-section",children:[l.jsx("p",{className:"mobile-nav-section-title",children:"Tracked projects"}),B.projects.map(re=>l.jsx(at,{to:"/projects/$projectName",params:{projectName:re.project.name},className:"mobile-nav-link",children:re.project.name},re.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:xS()}):null]}),l.jsx(le,{type:"button",variant:"ghost",size:"sm","data-testid":"mobile-sign-out",onClick:fn(async()=>{await jS(),window.location.reload()}),children:"Sign out"})]})]})]}),l.jsx("main",{id:"content",className:`page-shell ${f&&ue?"pb-20":""}`.trim(),children:S&&!s?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(re=>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"})]},re))}),l.jsx("div",{className:"page-skeleton-grid",style:{gridTemplateColumns:"1fr 1fr"},children:[1,2].map(re=>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(Ze=>l.jsx("div",{className:"skeleton-text-sm w-full"},Ze))})]},re))})]}):l.jsx(eg,{})}),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:uk.map(({label:re,href:Ze,Icon:bt})=>l.jsx("a",{href:Ze,target:"_blank",rel:"noopener noreferrer",title:re,"aria-label":re,className:"footer-icon",children:l.jsx(bt,{className:"size-3.5"})},Ze))}):null]})]}),q&&!ce&&Le?l.jsx(Td,{open:!0,title:"Loading run details",subtitle:"Fetching the durable run record",onClose:P,children:l.jsx("p",{className:"text-sm text-muted",role:"status",children:"Loading run details…"})}):null,q&&!ce&&Ue.isError?l.jsx(Td,{open:!0,title:"Run unavailable",subtitle:"The run could not be loaded",onClose:P,children:l.jsx("p",{className:"text-sm text-negative",children:Ue.error instanceof Error?Ue.error.message:"Run details are unavailable."})}):null,ce?l.jsxs(Td,{open:!0,title:ce.summary,subtitle:`${ce.projectName} · ${ce.kindLabel}`,onClose:P,children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[l.jsx(U1,{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"}),Le?l.jsx("p",{className:"text-sm text-muted",children:"Loading run details..."}):ke?.snapshots&&ke.snapshots.length>0?l.jsxs("div",{className:"space-y-2",children:[ke.snapshots.map(re=>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:re.query??"Unknown query"}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(sX,{provider:re.provider}),l.jsx($C,{variant:re.citationState===Sc.cited?"success":"neutral",children:re.citationState})]})]}),re.model&&l.jsx("p",{className:"text-[11px] text-muted font-mono",children:re.model}),re.citedDomains.length>0&&l.jsxs("p",{className:"text-xs text-muted mt-1",children:[l.jsx("span",{className:"text-secondary",children:"Sources:"})," ",re.citedDomains.join(", ")]}),re.citedCompetitorDomains.length>0&&l.jsxs("p",{className:"text-xs text-negative-400/80 mt-0.5",children:["Competitor cited: ",re.citedCompetitorDomains.join(", ")]}),re.mentionedCompetitorDomains.length>0&&l.jsxs("p",{className:"text-xs text-negative-400/80 mt-0.5",children:["Competitor mentioned: ",re.mentionedCompetitorDomains.join(", ")]}),re.groundingSources&&re.groundingSources.length>0&&l.jsxs("details",{className:"mt-2",children:[l.jsxs("summary",{className:"text-xs text-muted cursor-pointer hover:text-secondary",children:[re.groundingSources.length," grounding source",re.groundingSources.length!==1?"s":""]}),l.jsx("ul",{className:"mt-2 space-y-3",children:re.groundingSources.map((Ze,bt)=>l.jsx("li",{className:"min-w-0",children:l.jsx(Mg,{url:Ze.uri,title:Ze.title})},bt))})]}),re.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:re.answerText})]})]},re.id)),ke.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..."]})]}):ke&&ke.status===Nt.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"}),ke.kind===Oe["answer-visibility"]?"Waiting for first query result...":"Run is in progress..."]}):ke&&ke.status===Nt.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..."]}):ke&&ke.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:XF(ke.error)})]}):ce.kind!==Oe["answer-visibility"]?l.jsx("p",{className:"text-sm text-secondary",children:ce.status===Nt.completed?"Run completed.":ce.status===Nt.partial?"Run completed with partial results.":ce.status===Nt.cancelled?"Run cancelled.":ce.status===Nt.failed?"Run failed.":"No run details available."}):l.jsx("p",{className:"text-sm text-muted",children:"No snapshot data available."})]})]}):null,E&&!Be?l.jsx(Td,{open:!0,title:Qe?"Loading answer":"Answer unavailable",subtitle:"Query evidence",onClose:P,children:Qe?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:Ee||Ct?"Could not load this answer.":"This answer is not in the available query evidence."}),l.jsx(le,{type:"button",variant:"outline",onClick:()=>{me()},children:"Retry"})]})}):null,Be?l.jsx(hX,{evidence:Be.evidence,project:Be.project,onClose:P}):null,l.jsx(lW,{}),l.jsx(eJ,{}),f?l.jsx(tW,{}):null]})]})}class uW extends C.Component{state={error:null};static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,s){console.error("[ErrorBoundary]",n,s.componentStack),lm({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(ym,{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(le,{variant:"secondary",size:"sm",onClick:this.handleReset,children:[l.jsx(G_,{className:"size-3.5 mr-1.5"}),"Try again"]}),l.jsx(le,{variant:"secondary",size:"sm",onClick:()=>{const n=window.__CANONRY_CONFIG__?.basePath?.replace(/\/$/,"")??"";window.location.href=n||"/"},children:"Go home"})]})]})}):this.props.children}}const _a=C.forwardRef(({className:e,...n},s)=>l.jsx("div",{ref:s,className:za("rounded-xl border border-base bg-bg/75 shadow-[0_0_0_1px_var(--color-shadow-hairline)]",e),...n}));_a.displayName="Card";const Ir=C.forwardRef(({className:e,...n},s)=>l.jsx("div",{ref:s,className:za("flex flex-col gap-1.5 p-5",e),...n}));Ir.displayName="CardHeader";const a4=C.forwardRef(({className:e,...n},s)=>l.jsx("h3",{ref:s,className:za("font-medium tracking-tight text-primary",e),...n}));a4.displayName="CardTitle";const fm=C.forwardRef(({className:e,...n},s)=>l.jsx("p",{ref:s,className:za("text-sm text-muted",e),...n}));fm.displayName="CardDescription";const vo=C.forwardRef(({className:e,...n},s)=>l.jsx("div",{ref:s,className:za("p-5 pt-0",e),...n}));vo.displayName="CardContent";function Kg({disabled:e,title:n,...s}){const{canWrite:r}=fa();return r?l.jsx(le,{disabled:e,title:n,...s}):l.jsx(le,{...s,disabled:!0,title:yC})}function H1({title:e,children:n}){const{isAdmin:s}=fa();return s?l.jsx(l.Fragment,{children:n}):l.jsxs(_a,{className:"surface-card mx-auto mt-8 max-w-lg",children:[l.jsxs(Ir,{children:[l.jsxs(a4,{children:[e," is for administrators"]}),l.jsx(fm,{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(vo,{children:l.jsx("p",{className:"supporting-copy",children:"If you need to make a change here, ask an administrator on this install."})})]})}function Soe(e,n,s){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:s}}function koe(e,n,s){const r=[...new Set(n.filter(u=>!s||u.provider===s).map(u=>u.sourceRunId).filter(u=>!!u))].sort();return{...e,mode:"simple",scope:"project",scopeKey:void 0,marketKey:void 0,provider:s||void 0,model:void 0,revision:void 0,runId:r.length===1?r[0]:void 0,runIds:r.length>1?r:void 0}}function Cc(e,n,s,r){return["sentiment",e,n,s??null,r??null]}const s4=5e3,dW=new Set(["pending","running","waiting-to-retry"]);function pk(e){return dW.has(e.state)}function mW(e){const n=e?.coverage.counts;return!!(n&&n.pending+n.running+n["waiting-to-retry"]>0)}function pW(e,n){return mW(e)||n?s4:!1}function hW(e,n,s=!0){const r=yt({queryKey:Cc(e,"settings"),queryFn:()=>Md(e),retry:!1,staleTime:0,refetchOnWindowFocus:"always"}),u=yt({queryKey:Cc(e,"jobs"),queryFn:()=>_F(e),enabled:!!r.data?.actions.configure,retry:!1,refetchOnWindowFocus:"always",refetchInterval:x=>x.state.data?.jobs.some(pk)?s4:!1}),h=!!u.data?.jobs.some(pk),f=x=>{const S={...n,queryClass:x};return{queryKey:Cc(e,"summary",S),queryFn:()=>kF(e,S),enabled:s&&!!(r.data?.enabled&&r.data.installEnabled),retry:!1,staleTime:0,refetchOnWindowFocus:"always",refetchInterval:k=>pW(k.state.data,h)}},b=yt(f("branded")),v=yt(f("non-brand"));return{settings:r,branded:b,nonBrand:v,jobs:u}}const Bs={branded:"Branded","non-brand":"Non-brand"},F1=10;function Q1(e){return e>=F1}const We={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 ${F1} 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."},_c="—",fW={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 Hs(e){return fW[e]??e.replaceAll("-"," ").replace(/^./,n=>n.toUpperCase())}const Eo=["favorable","mixed","unfavorable"];function i4(e){return e==="favorable"?"positive":e==="unfavorable"?"negative":e==="mixed"?"caution":"neutral"}const Mc=["mixed","unfavorable"];function o4(e){return e.interval?`${nm(e.interval.low,Ga.fraction)} to ${nm(e.interval.high,Ga.fraction)}`:null}const np={favorable:"progress-fill-info",mixed:"progress-fill-caution",unfavorable:"progress-fill-negative"};function Ud(e){return`${e} ${e===1?"rating":"ratings"}`}function ap(e){return e.score.favorableRate!==null&&e.coverage.judged>0}function Gg(e){return e.state==="complete"&&!e.provisional&&e.coverage.unadmittedAssessments===0}function r4(e){return e.state==="complete"?We.partial:We.states[e.state]}function Z1(e){return e?ap(e)&&Q1(e.coverage.judged):!1}function gW({value:e,label:n}){const{counts:s,judged:r}=e.coverage;if(!ap(e))return l.jsx("div",{className:"sentiment-bar sentiment-bar-track","data-sentiment-bar":"empty","aria-hidden":"true"});const u=Eo.map(h=>`${s[h]} ${h}`).join(", ");return Z1(e)?l.jsx("div",{role:"img","aria-label":`${n}: ${u}, ${e.score.favorableDisplay} favorable of ${Ud(r)}`,className:"sentiment-bar","data-sentiment-bar":"rated",children:Eo.filter(h=>s[h]>0).map(h=>l.jsx("span",{"data-outcome":h,className:`sentiment-bar-segment ${np[h]}`,style:{flexGrow:s[h]},title:`${Hs(h)}: ${s[h]} of ${Ud(r)}`},h))}):l.jsx("div",{role:"img","aria-label":`${n}: ${u}, ${Ud(r)}, favorable share ${We.minRated.toLowerCase()}`,className:"sentiment-bar sentiment-bar-track","data-sentiment-bar":"too-few"})}function yW({value:e,label:n}){const{counts:s,judged:r}=e.coverage;return l.jsx("div",{role:"img","aria-label":`${n}: ${Eo.map(u=>`${s[u]} ${u}`).join(", ")}, ${Ud(r)}`,className:"sentiment-property-bar",children:Eo.filter(u=>s[u]>0).map(u=>l.jsx("span",{"data-outcome":u,className:`sentiment-bar-segment ${np[u]}`,style:{flexGrow:s[u]}},u))})}function bW(e){const n=new Map(e.breakdowns.filter(s=>s.dimension==="property").map(s=>[s.key,s]));return(e.criticizedProperties?.keys??[]).flatMap(s=>n.get(s)??[])}function vW({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:We.minRated,children:_c}),l.jsx("span",{className:"sr-only",children:We.minRated})]})})}function xW({ratedAnswers:e=0,eligibleAnswers:n=0}){return`${e} of ${n} ${n===1?"answer":"answers"} rated`}function wW(e){const{eligibleAnswers:n}=e;return n===void 0?{display:_c,detail:We.ratedUnavailable,empty:!0}:n<=0?{display:_c,detail:We.noAnswers,empty:!0}:e.ratedAnswerRate===null||e.ratedAnswerRate===void 0?{display:_c,detail:We.states.disabled,empty:!0}:{display:nm(e.ratedAnswerRate,Ga.fraction),detail:xW(e),empty:!1}}function SW({coverage:e,label:n}){const{display:s,detail:r,empty:u}=wW(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:r,children:s}),l.jsx("span",{className:"sr-only",children:u?r:`${s}, ${r}`})]})}function kW({value:e}){return ap(e)?e.provisional?l.jsx("p",{className:"sentiment-class-note text-caution",children:We.partial}):null:l.jsx("p",{className:"sentiment-class-note",children:e.state==="complete"?We.noJudgments:We.states[e.state]})}function jW(e){return!!(e.coverage.selected||e.coverage.eligibleAssessments||e.reason)}function AW({value:e,queryClass:n,open:s,setOpenClass:r}){const u=C.useContext(us),h=C.useId(),f=C.useId(),b=C.useId(),v=C.useRef(null),x=C.useRef(null),S=C.useCallback(()=>r(E=>E===n?null:E),[r,n]);C.useEffect(()=>{if(!s)return;const E=$=>$ instanceof Node&&!!(v.current?.contains($)||x.current?.contains($)),P=$=>{E($.target)||S()},M=$=>{E($.target)||S()},L=$=>{$.key==="Escape"&&(S(),v.current?.focus())};return document.addEventListener("pointerdown",P),document.addEventListener("focusin",M),document.addEventListener("keydown",L),()=>{document.removeEventListener("pointerdown",P),document.removeEventListener("focusin",M),document.removeEventListener("keydown",L)}},[s,S]);const{coverage:k,score:N}=e,T=o4(N),z=k.judged>0&&!Q1(k.judged),q=n==="branded"?bW(e):[];return jW(e)?l.jsxs(l.Fragment,{children:[l.jsx("button",{ref:v,type:"button",className:"sentiment-class-details-toggle","aria-label":`${Bs[n]} details`,"aria-expanded":s,"aria-controls":h,onClick:()=>r(E=>E===n?null:n),children:l.jsx(Lc,{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:!s,children:[l.jsx("p",{id:f,className:"sentiment-class-details-title",children:Bs[n]}),l.jsxs("dl",{className:"sentiment-details-list",children:[(k.eligibleAnswers??0)>0&&l.jsxs("div",{children:[l.jsx("dt",{children:We.details.ratedAnswers}),l.jsxs("dd",{children:[k.ratedAnswers??0," of ",k.eligibleAnswers]})]}),z&&Eo.filter(E=>k.counts[E]>0).map(E=>l.jsxs("div",{children:[l.jsx("dt",{children:Hs(E)}),l.jsx("dd",{children:k.counts[E]})]},E)),z&&l.jsxs("div",{children:[l.jsx("dt",{children:"Favorable share"}),l.jsx("dd",{children:We.minRated})]}),T&&l.jsxs("div",{children:[l.jsxs("dt",{children:[We.details.interval," ",l.jsx(ua,{text:N.limitation,placement:"bottom"})]}),l.jsx("dd",{children:T})]})]}),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:[We.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(E=>l.jsxs("li",{className:"sentiment-property",children:[l.jsx("button",{type:"button",className:"sentiment-property-name","aria-label":`View ${We.properties.evidence} answers for ${E.label}`,onClick:()=>{if(!v.current)return;const P=Hg(u,e);u.openEvidence({...P,queryClass:n,scope:"property",scopeKey:E.key,marketKey:P.scope==="market"?P.scopeKey:P.marketKey,outcome:Mc},`${E.label}, ${We.properties.evidence}`,v.current)},children:E.label}),l.jsxs("span",{className:"sentiment-property-count",children:[E.coverage.counts.favorable," of ",E.coverage.judged," favorable"]}),l.jsx(yW,{value:E,label:E.label})]},E.key))}),l.jsx("button",{type:"button",className:"sentiment-property-name sentiment-details-view-all",onClick:()=>{v.current&&u.openEvidence({...Hg(u,e),queryClass:n,outcome:Mc},We.properties.allEvidence,v.current)},children:We.properties.viewAll})]}),(k.unadmittedAssessments>0||Object.entries(k.counts).some(([E,P])=>P>0&&!Eo.includes(E)))&&l.jsx("p",{className:"sentiment-details-caption",children:We.details.checksCaption}),l.jsxs("dl",{className:"sentiment-details-list",children:[k.unadmittedAssessments>0&&l.jsxs("div",{children:[l.jsx("dt",{children:We.details.unadmitted}),l.jsx("dd",{children:k.unadmittedAssessments})]}),Object.entries(k.counts).filter(([E,P])=>P>0&&!["favorable","mixed","unfavorable"].includes(E)).map(([E,P])=>l.jsxs("div",{children:[l.jsx("dt",{children:Hs(E)}),l.jsx("dd",{children:P})]},E))]}),e.reason&&l.jsx("p",{className:"sentiment-class-details-reason",children:e.reason})]})]}):null}function Y1(e){return!!(e?.configured&&e.branded.coverage.judged>0&&e.branded.score.favorableRate!==null)&&!Fm()}function NW({value:e}){if(!Y1(e))return null;const n=e.branded,s=n.coverage.judged,r=o4(n.score),u=`${We.overall} ${s} of ${n.coverage.selected} judged${r?`, 95% interval ${r}`:""}. ${n.provisional?"Provisional. ":""}${We.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(ua,{text:u,placement:"bottom"})})]}),Q1(s)?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:[We.tooFew,l.jsxs("span",{className:"sr-only",children:[" ratings for a favorable share, ",s," of ",F1," needed, branded queries"]})]}),l.jsx("p",{className:"metric-inline-caption","aria-hidden":"true"})]})})}const us=C.createContext(null);function Hg(e,n){const{selection:s}=n;return{...e.selection,...s,runId:s.runId??void 0,runIds:s.runId?void 0:s.runIds,revision:s.revision??void 0,evaluationDefinitionId:s.evaluationDefinitionId??void 0}}function joe(){return C.useContext(us)?.configured??!1}function Aoe({projectName:e,selection:n,runOptions:s=[],waitForResolvedRun:r=!1,evidenceReady:u=!0,hasSourceEvidence:h=!0,children:f}){return l.jsx(CW,{projectName:e,selection:n,runOptions:s,waitForResolvedRun:r,evidenceReady:u,hasSourceEvidence:h,children:f})}function CW({projectName:e,selection:n,runOptions:s,waitForResolvedRun:r,evidenceReady:u,hasSourceEvidence:h,children:f}){const b=JSON.stringify([e,n]),[v,x]=C.useState(null),S=C.useCallback(Ue=>x(ke=>ke?.key===b&&ke?.runId===Ue?.runId&&ke?.revision===Ue?.revision?ke:Ue?{...Ue,key:b}:null),[b]),k=u&&(!r||v?.key===b),N=r&&k&&v?{...n,runId:v.runId,revision:v.revision}:n,T=JSON.stringify([e,N]),{settings:z,branded:q,nonBrand:E,jobs:P}=hW(e,N,k&&h),[M,L]=C.useState(!1),[$,Q]=C.useState(null),ae=C.useRef(null);C.useEffect(()=>{L(!1),Q(null)},[T]);const V=k&&!!(z.data?.enabled&&z.data.installEnabled),X=(n.queryClass==="non-brand"?E.data:q.data)?.selection,Ce={...N,...X?{...X,runId:X.runId??void 0,runIds:X.runId?void 0:X.runIds,revision:X.revision??void 0,evaluationDefinitionId:X.evaluationDefinitionId??void 0}:{}},tt=Ce.runId&&!s.some(Ue=>Ue.id===Ce.runId)?[{id:Ce.runId,label:"Displayed sweep"},...s]:s,Ke=Ue=>{Ue.preventDefault(),ae.current?.focus()};return l.jsxs(us.Provider,{value:{projectName:e,selection:N,resolveSource:S,settings:z,summaries:{branded:q,"non-brand":E},configured:V,hasSourceEvidence:h,openManage:Ue=>{ae.current=Ue,L(!0)},openEvidence:(Ue,ke,Le)=>{ae.current=Le,Q({selection:Ue,label:ke})}},children:[f,l.jsx(Pg,{open:M&&!!z.data?.actions.configure,onOpenChange:L,children:l.jsxs(mm,{onCloseAutoFocus:Ke,className:"overflow-y-auto",children:[l.jsxs(qg,{children:[l.jsx(pm,{children:"Manage sentiment"}),l.jsx(hm,{children:"Classify saved answers and review the cost before submitting a backfill."})]}),z.data?.actions.configure&&l.jsx(LW,{projectName:e,settings:z.data,selection:Ce,runOptions:tt},JSON.stringify([z.data.evaluationDefinitionId,z.data.enabled,z.data.enablementEpoch])),P.data&&l.jsx(OW,{projectName:e,jobs:P.data.jobs})]})}),l.jsx(Pg,{open:$!==null,onOpenChange:Ue=>{Ue||Q(null)},children:l.jsxs(mm,{onCloseAutoFocus:Ke,className:"overflow-y-auto",children:[l.jsxs(qg,{children:[l.jsxs(pm,{children:["Sentiment evidence",$?`: ${$.label}`:""]}),l.jsx(hm,{children:"Stored judgments and exact quotations for the selected query and scope."})]}),$&&l.jsx(DW,{projectName:e,selection:$.selection},JSON.stringify($.selection))]})})]})}function Noe(e,n){const s=C.useContext(us)?.resolveSource;C.useEffect(()=>{s?.(e?{runId:e,revision:void 0}:null)},[s,e,n])}function hk(){const e=C.useContext(us);return e?.settings.data?.actions.configure?l.jsx(Kg,{type:"button",variant:"outline",size:"sm",onClick:n=>e.openManage(n.currentTarget),children:e.settings.data.enabled?"Manage sentiment":"Enable sentiment"}):null}function l4(e,n){return!e?.configured||n==="unknown"||n==="unclassified"?null:["branded"]}function _W({queryClass:e="all"}){const n=C.useContext(us),s=l4(n,e);return!n?.hasSourceEvidence||!s?.some(r=>Z1(n.summaries[r].data))?null:l.jsx("ul",{className:"sentiment-legend","aria-hidden":"true",children:Eo.map(r=>l.jsxs("li",{children:[l.jsx("span",{className:`sentiment-legend-swatch ${np[r]}`}),Hs(r)]},r))})}function TW({queryClass:e}){const n=C.useContext(us);if(!n?.hasSourceEvidence)return null;const s=n.summaries["non-brand"],r=s.data,u=e==="non-brand";if(!r)return u?s.isError?l.jsxs("p",{role:"alert",className:"sentiment-nonbrand-note",children:["Couldn’t load non-brand sentiment. ",l.jsx(le,{variant:"ghost",onClick:()=>{s.refetch()},children:"Retry"})]}):l.jsx("p",{role:"status",className:"sentiment-nonbrand-note",children:"Loading non-brand sentiment…"}):null;const h=r.coverage.counts;return h.unfavorable===0&&h.mixed===0?u?Gg(r)?l.jsx("p",{className:"sentiment-nonbrand-note",children:We.nonBrand.none}):ap(r)?l.jsx("p",{className:"sentiment-nonbrand-note",children:We.nonBrand.noneSoFar}):l.jsx("p",{className:"sentiment-nonbrand-note",children:r.state==="not-measured"?We.nonBrand.notRated:`${We.nonBrand.label}: ${r4(r)}`}):null:l.jsx("div",{className:"sentiment-nonbrand",role:"group","aria-label":We.nonBrand.label,children:l.jsxs("div",{className:"sentiment-nonbrand-line",children:[l.jsxs("span",{className:"sentiment-nonbrand-label",children:[We.nonBrand.label,l.jsx(ua,{text:We.nonBrand.help})]}),l.jsxs("span",{className:"sentiment-nonbrand-counts",children:[Mc.slice().reverse().filter(f=>h[f]>0).map(f=>l.jsxs("span",{children:[l.jsx("span",{"aria-hidden":"true",className:`sentiment-legend-swatch ${np[f]}`}),h[f]," ",f]},f)),!Gg(r)&&l.jsx("span",{className:"text-caution",children:We.partial})]}),l.jsx(le,{type:"button",variant:"outline",size:"sm",onClick:f=>n.openEvidence({...Hg(n,r),queryClass:"non-brand",outcome:Mc},We.nonBrand.evidence,f.currentTarget),children:We.nonBrand.view})]})})}function Coe({queryClass:e="all",legend:n=!0,manage:s=!1}){const r=C.useContext(us),u=l4(r,e),[h,f]=C.useState(null);if(!r)return null;if(!u){const v=r.settings.data;return!s||!v?.actions.configure?null:l.jsxs("div",{className:"sentiment-headlines-title",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"sentiment-headlines-heading",children:We.title}),!(v.enabled&&v.installEnabled)&&l.jsx("p",{className:"sentiment-headlines-subtitle",children:We.states.disabled})]}),l.jsx(hk,{})]})}const b=r.hasSourceEvidence&&u.some(v=>r.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:We.title}),l.jsx("p",{className:"sentiment-headlines-subtitle",children:We.subtitle})]}),s&&l.jsx(hk,{})]}),n&&l.jsx(_W,{queryClass:e}),b&&l.jsxs("div",{className:"sentiment-headlines-columns","aria-hidden":"true",children:[l.jsx("span",{className:"sentiment-headlines-favorable",children:We.columns.favorable}),l.jsx("span",{className:"sentiment-headlines-ratings",title:We.rated,children:We.columns.rated})]}),u.map(v=>{const x=r.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:Bs[v]}),l.jsx(ua,{text:We.favorable})]}),r.hasSourceEvidence?x.data?l.jsxs(l.Fragment,{children:[l.jsx(gW,{value:x.data,label:Bs[v]}),l.jsx(vW,{value:x.data,label:Bs[v]}),l.jsx(SW,{coverage:x.data.coverage,label:Bs[v]}),l.jsx(kW,{value:x.data}),l.jsx(AW,{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(le,{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(TW,{queryClass:e})]})}function _oe({queryId:e,sourceSnapshotIds:n=[],queryClass:s,location:r,showLabel:u=!1}){const h=C.useContext(us);if(!h?.configured)return null;const f=s?h.summaries[s]:void 0,b=h.hasSourceEvidence?f?.data:void 0,v=b?.queries.filter(N=>N.queryClass===s&&(e?N.queryId===e:n.length>0)&&n.every(T=>N.sourceSnapshotIds.includes(T)))??[],x=v.length===1?v[0]:void 0,S=r===void 0?x:x?.locations.find(N=>N.location===r);if(!x||!S)return l.jsx("span",{className:"text-sm text-secondary",children:h.hasSourceEvidence&&f?.isPending&&(e||n.length)?"Loading…":"Unavailable"});const k={...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,...r===void 0?{}:{location:r??"none"}};if(x.queryClass==="non-brand"){if(S.state==="unsupported")return l.jsx("span",{className:"text-sm text-secondary",children:"Unavailable"});const{unfavorable:N,mixed:T}=S.coverage.counts;if(N===0&&T===0){const z=u&&l.jsx("span",{className:"block text-sm font-normal text-secondary",children:We.nonBrand.rowLabel});return Gg(S)?l.jsxs("span",{className:"text-sm text-muted",children:[z,l.jsx("span",{"aria-hidden":"true",title:We.nonBrand.rowNone,children:_c}),l.jsx("span",{className:"sr-only",children:We.nonBrand.rowNone})]}):l.jsxs("span",{className:"text-sm text-secondary",children:[z,l.jsx("span",{children:r4(S)})]})}return l.jsxs(le,{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({...k,outcome:Mc},`${x.queryText}, unfavorable and mixed`,z.currentTarget)},children:[u&&l.jsx("span",{className:"text-sm font-normal text-secondary",children:We.nonBrand.rowLabel}),N>0&&l.jsxs("span",{className:"text-sm text-negative",children:[N," unfavorable"]}),T>0&&l.jsxs("span",{className:"text-sm text-caution",children:[T," mixed"]}),S.provisional&&l.jsx("span",{className:"text-xs font-normal text-caution",children:"Provisional"})]})}return l.jsxs(le,{type:"button",variant:"ghost",className:"h-auto min-h-11 flex-col items-start gap-0 px-1","aria-label":`View ${Bs[x.queryClass]} sentiment evidence for ${x.queryText}`,onKeyDown:N=>N.stopPropagation(),onClick:N=>{N.stopPropagation(),h.openEvidence(k,x.queryText,N.currentTarget)},children:[u&&l.jsx("span",{className:"text-sm font-normal text-secondary",children:"Favorable"}),l.jsx("span",{className:"font-mono text-primary",children:S.score.favorableDisplay}),l.jsxs("span",{className:"text-sm font-normal text-secondary",children:[S.coverage.judged," judged"]}),S.provisional&&l.jsx("span",{className:"text-xs font-normal text-caution",children:"Provisional"})]})}function EW(e){return e.outcome==="subject-not-mentioned"?"Not mentioned":e.outcome==="running"?"Classifying":e.outcome==="waiting-to-retry"?"Retrying":e.outcome?Hs(e.outcome):e.state==="not-measured"?"Not classified":e.state==="processing"?"Classifying":e.state==="failed"?"Failed":e.state==="canceled"?"Canceled":"Unavailable"}function Toe({queryId:e,sourceSnapshotIds:n,queryClass:s,provider:r,model:u,location:h,showSubjects:f=!1,showLabel:b=!1}){const v=C.useContext(us);if(!v?.configured)return null;const x=s?v.summaries[s]:void 0,S=v.hasSourceEvidence?x?.data:void 0,k=S?.queries.filter(z=>z.queryClass===s&&(!e||z.queryId===e)&&n.length>0&&n.every(q=>z.sourceSnapshotIds.includes(q)))??[],N=k.length===1?k[0]:void 0,T=N?.assessments?.filter(z=>n.includes(z.sourceSnapshotId)&&z.provider===r&&z.location===h&&(u===void 0||z.servedModel===u))??[];return l.jsxs("div",{role:"group",className:"text-sm text-secondary","aria-label":`${r||"Saved answer"} sentiment`,children:[b&&l.jsx("span",{className:"block text-sm text-secondary",children:"Sentiment"}),T.length?T.map(z=>{const q=EW(z),E=i4(z.outcome),P=l.jsxs(l.Fragment,{children:[f&&l.jsxs("span",{children:[z.subjectLabel," · "]}),l.jsx(wn,{tone:E,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})]}),M={...v.selection,...S.selection,runId:S.selection.runId??void 0,runIds:S.selection.runId?void 0:S.selection.runIds,revision:S.selection.revision??void 0,evaluationDefinitionId:S.selection.evaluationDefinitionId??void 0,queryClass:N.queryClass,queryId:N.queryId,executionNodeKey:N.executionNodeKey??void 0,assessmentId:z.assessmentId??void 0};return l.jsxs("div",{className:"flex items-center gap-1",children:[z.assessmentId?l.jsx(le,{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:L=>L.stopPropagation(),onClick:L=>{L.stopPropagation(),v.openEvidence(M,`${N.queryText} · ${z.provider} · ${z.subjectLabel}`,L.currentTarget)},children:P}):l.jsx("span",{children:P}),z.reason&&l.jsx(ua,{text:z.reason})]},JSON.stringify([z.sourceSnapshotId,z.subjectId,z.assessmentId]))}):l.jsx("span",{children:v.hasSourceEvidence&&x?.isPending&&n.length?"Loading…":"Unavailable"})]})}function RW({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(wn,{tone:i4(e.outcome),children:Hs(e.outcome)}),l.jsx("span",{children:Bs[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,s)=>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]})]},s))]})]})]})}function DW({projectName:e,selection:n}){const[s,r]=C.useState(),u=yt({queryKey:Cc(e,"evidence",n,s),queryFn:()=>AF(e,n,s),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(le,{variant:"outline",onClick:()=>{u.refetch()},children:"Retry evidence"})]}):l.jsxs(l.Fragment,{children:[u.data.items.length?u.data.items.map(h=>l.jsx(RW,{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:[s&&l.jsx(le,{variant:"outline",onClick:()=>r(void 0),children:"First evidence page"}),u.data.nextCursor&&l.jsx(le,{variant:"outline",onClick:()=>r(u.data.nextCursor??void 0),children:"Next evidence page"})]})]})}function zW({projectName:e,jobId:n}){const[s,r]=C.useState(),u=yt({queryKey:Cc(e,`job:${n}`,void 0,s),queryFn:()=>TF(e,n,s),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(le,{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:[s&&l.jsx(le,{variant:"outline",onClick:()=>r(void 0),children:"Newest attempts"}),u.data.nextAttemptCursor&&l.jsx(le,{variant:"outline",onClick:()=>r(u.data.nextAttemptCursor??void 0),children:"Older attempts"})]})]})}function IW({projectName:e,job:n}){const[s,r]=C.useState(!1);return l.jsxs("details",{onToggle:u=>r(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:[Hs(u),": ",h]},u)),l.jsxs("p",{children:["Attempts: ",n.attemptCount]}),s&&n.attemptCount>0&&l.jsx(zW,{projectName:e,jobId:n.id})]})}function OW({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(s=>l.jsxs("tr",{children:[l.jsx("td",{children:nQ(s.createdAt)}),l.jsx("td",{children:Hs(s.state)}),l.jsx("td",{children:s.selected}),l.jsx("td",{children:l.jsx(IW,{projectName:e,job:s})})]},s.id))})]})})]})}const PW={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 qW(e){return PW[e]??Hs(e)}function c4(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 MW(e){const n=c4(e);return[`${Bs[e.queryClass]} queries`,...n.length?n:["whole sweep"]].join(" · ")}function BW(e,n,s,r){return r?{...e,queryClass:s,queryId:void 0,runIds:void 0,runId:n}:{mode:"auto",scope:"project",queryClass:s,runId:n}}function LW({projectName:e,settings:n,selection:s,runOptions:r}){const u=Di(),[h,f]=C.useState(n.enabled),[b,v]=C.useState(s.runId??""),[x,S]=C.useState(s.queryClass),[k,N]=C.useState(!1),[T,z]=C.useState(null),q=C.useRef(null),E=c4({...s,queryId:void 0}),P=()=>u.invalidateQueries({queryKey:["sentiment",e]}),M=()=>{z(null),q.current=null},L=os({mutationFn:async()=>{if(!(await Md(e)).actions.configure)throw new Error("Administrator permission is required to configure sentiment.");return jF(e,{enabled:h})},onSuccess:async()=>{M(),await P(),await u.invalidateQueries({queryKey:["project-overview-slim"]})},onError:P}),$=os({mutationFn:async()=>{if(!(await Md(e)).actions.backfill)throw new Error("Administrator permission is required to backfill sentiment.");return NF(e,BW(s,b,x,k&&E.length>0))},onSuccess:V=>{z(V),q.current=crypto.randomUUID()},onError:P}),Q=os({mutationFn:async()=>{if(!T?.previewToken||!q.current)throw new Error("Create and review a backfill preview first.");if(!(await Md(e)).actions.backfill)throw new Error("Administrator permission is required to backfill sentiment.");return CF(e,T.previewToken,q.current)},onSuccess:async()=>{M(),await P()},onError:P}),ae=L.isPending||$.isPending||Q.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:V=>{V.preventDefault(),L.mutate()},children:[l.jsxs("label",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"checkbox",checked:h,disabled:ae,onChange:V=>{f(V.target.checked),M()}}),"Enable project sentiment"]}),l.jsx("p",{children:"Enabling applies to future completed sweeps. Past sweeps require an explicit backfill."}),l.jsx(Kg,{type:"submit",disabled:ae,children:L.isPending?"Saving…":"Save sentiment settings"}),L.isError&&l.jsx("p",{role:"alert",children:qs(L.error)}),L.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:ae,onChange:V=>{v(V.target.value),M()},children:[l.jsx("option",{value:"",children:"Select a saved sweep"}),r.map(V=>l.jsx("option",{value:V.id,children:V.label},V.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:ae,onChange:V=>{S(V.target.value),M()},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."}),E.length>0&&l.jsxs("label",{className:"flex items-start gap-2",children:[l.jsx("input",{type:"checkbox",className:"mt-1",checked:k,disabled:ae,onChange:V=>{N(V.target.checked),M()}}),l.jsxs("span",{children:["Limit to the current view",l.jsx("span",{className:"block",children:E.join(" · ")})]})]}),l.jsx(le,{variant:"outline",disabled:ae||!b||!n.enabled||!n.ready,onClick:()=>{M(),$.mutate()},children:$.isPending?"Preparing preview…":"Preview sentiment backfill"}),$.isError&&l.jsx("p",{role:"alert",children:qs($.error)}),T&&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:MW(T.selection)}),l.jsx("dt",{children:"Eligible assessments"}),l.jsx("dd",{children:T.eligibleAssessments}),l.jsx("dt",{children:"Already classified"}),l.jsx("dd",{children:T.alreadyClassified}),l.jsx("dt",{children:"Estimated input tokens"}),l.jsx("dd",{children:T.estimatedInputTokens}),l.jsx("dt",{children:"Estimated cost (USD)"}),l.jsx("dd",{children:T.estimatedCostUsd??"Unavailable"})]}),l.jsx(ua,{text:T.estimateMethod}),T.eligibleAssessments===0&&l.jsx("p",{children:"No saved answers in this selection can be classified."}),T.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:T.skipped.map(V=>l.jsxs("li",{children:[qW(V.reason),": ",V.count]},`${V.runId}:${V.reason}`))})]}),l.jsx(Kg,{disabled:ae||!T.previewToken||T.eligibleAssessments===0,onClick:()=>Q.mutate(),children:Q.isPending?"Submitting…":"Confirm sentiment backfill"})]}),Q.isError&&l.jsxs("p",{role:"alert",children:[qs(Q.error)," Retry uses the same request key."]}),Q.isSuccess&&l.jsx("p",{role:"status",children:"Backfill submitted. Progress is available in Recent jobs."})]})]})}const UW=20,VW=6;function $W({points:e,tone:n}){const s=C.useId();if(e.length===0)return null;const r=42,u=132,h=5,f=u-h*2,b=r-h*2,v=b-VW,x=E=>h+E/Math.max(e.length-1,1)*f,S=GG(e),k=Math.min(...e),N=Math.max(...e),T=Math.max(N-k,UW),z=(N+k)/2-T/2,q=e.map((E,P)=>({x:x(P),y:h+(1-(E-z)/T)*v}));return l.jsxs("svg",{className:`sparkline sparkline-${n}${S?" sparkline-provisional":""}`,viewBox:`0 0 ${u} ${r}`,"aria-hidden":"true",children:[l.jsx("defs",{children:l.jsx("clipPath",{id:s,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:r-h,y2:r-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(#${s})`,points:q.map(E=>`${E.x},${E.y}`).join(" "),vectorEffect:"non-scaling-stroke"})]})}function KW({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($W,{points:e.trend,tone:jC(e.lastRun.status)})}),l.jsxs("div",{className:"project-row-primary",children:[l.jsxs(at,{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":nm(e.mentionScore,Ga.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"})]})}),Y1(e.sentiment)?l.jsx(NW,{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(Vc,{className:"h-4 w-4 text-muted"})})]})}function GW(){const{isAdmin:e}=fa(),n=iu(),{dashboard:s,isLoading:r,isError:u,activityLoading:h,activityError:f,refetch:b}=Jm(),v=s??n?.dashboard,S=V1(!n,n?.health),{openRun:k}=$1();if(u&&!v)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:"All projects 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(le,{type:"button",variant:"secondary",className:"mt-4",onClick:()=>{b()},children:"Retry loading projects"})]})]});if(!v||r)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(M=>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"})]},M))})]});const N=v.portfolioOverview,T=N.projects.length>0&&N.projects.every(M=>M.hasMeasurement===!1),z=N.projects.some(M=>Y1(M.sentiment)),q=N.attentionItems.map(M=>T&&M.id==="attention_stable"?{...M,tone:"neutral",title:"Awaiting first measurement",detail:"Visibility results will appear after the first sweep."}:M),E=S.data??n?.health??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},P=WZ(N.systemHealth.filter(M=>e||M.id==="api"||M.id==="worker"),E,v.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:"All projects"}),l.jsx("p",{className:"page-subtitle",children:"Visibility across all projects."})]})}),N.projects.length>0?l.jsx("div",{className:"project-list project-list-scrollable",children:N.projects.map(M=>l.jsx(KW,{project:M,sentimentColumn:z},M.project.id))}):l.jsxs(_a,{className:"surface-card empty-card",children:[l.jsx("h3",{children:N.emptyState?.title??"No projects yet"}),l.jsx("p",{className:"supporting-copy",children:N.emptyState?.detail}),l.jsx(le,{size:"sm",asChild:!0,children:l.jsx(at,{to:N.emptyState?.ctaHref==="/setup"||!N.emptyState?.ctaHref?"/setup":"/",children:N.emptyState?.ctaLabel??"Launch setup"})})]}),l.jsxs("div",{className:"overview-secondary-grid",children:[q.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:q.map(M=>M.href?l.jsxs(at,{to:M.href,className:`attention-item attention-item-${M.tone}`,children:[l.jsxs("div",{children:[l.jsx("p",{className:"attention-title",children:M.title}),l.jsx("p",{className:"attention-detail",children:M.detail})]}),M.actionLabel&&l.jsx("span",{className:"attention-action",children:M.actionLabel})]},M.id):l.jsxs("div",{className:`attention-item attention-item-static attention-item-${M.tone}`,children:[l.jsxs("div",{children:[l.jsx("p",{className:"attention-title",children:M.title}),l.jsx("p",{className:"attention-detail",children:M.detail})]}),M.actionLabel&&l.jsx("span",{className:"attention-action",children:M.actionLabel})]},M.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:f?l.jsxs("div",{role:"alert",children:[l.jsx("p",{className:"text-sm text-secondary",children:"Recent jobs could not be loaded."}),l.jsx(le,{type:"button",variant:"secondary",className:"mt-3",onClick:()=>{b()},children:"Retry loading activity"})]}):h?l.jsx("p",{className:"supporting-copy",role:"status",children:"Loading recent jobs…"}):N.recentRuns.length>0?N.recentRuns.map(M=>l.jsxs("button",{className:"compact-run",type:"button",onClick:()=>k(M.id),children:[l.jsxs("div",{children:[l.jsx("p",{className:"compact-run-title",children:M.projectName}),l.jsx("p",{className:"compact-run-detail",children:M.summary})]}),l.jsx(U1,{status:M.status})]},M.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:P.map(M=>{const L=M.id==="api"?E.apiStatus:M.id==="worker"?E.workerStatus:void 0,$=L?L.state==="ok"?void 0:Gr(L):M.tone==="positive"?void 0:M.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:M.label}),$&&l.jsx("p",{className:"mt-1 text-sm text-secondary",children:$})]}),l.jsx(wn,{tone:M.tone,title:L?Gr(L):M.meta,children:M.detail})]},M.id)})})]})]})}const HW='a, button, input, select, textarea, label, [role="button"], [role="link"], [role="checkbox"], [role="menuitem"]';function FW(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(HW))return!1;const s=typeof window<"u"?window.getSelection():null;return!(s&&!s.isCollapsed&&s.toString().trim()!=="")}function QW({onApplied:e}){const{canWrite:n}=fa(),[s,r]=C.useState(""),[u,h]=C.useState(!1),[f,b]=C.useState([]),[v,x]=C.useState([]);if(Fm()||!n)return null;const S=async()=>{if(!s.trim())return;h(!0),b([]),x([]);const k=Y_(s),N=[],T=[];for(let z=0;z<k.length;z++){const q=k[z];if(q.errors.length>0){N.push(`Document ${z+1}: ${q.errors[0]?.message}`);continue}const E=q.toJSON();if(!(!E||typeof E!="object"))try{const P=await mF(E);T.push(`Applied "${P.displayName||P.name}" (revision ${P.configRevision})`)}catch(P){N.push(`Document ${z+1}: ${qs(P)}`)}}b(T),x(N),h(!1),T.length>0&&(bn({title:"YAML applied",detail:`Applied ${T.length} document${T.length===1?"":"s"} successfully.`,tone:N.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:s,onChange:k=>r(k.target.value)}),f.length>0&&l.jsx("ul",{className:"mt-2 space-y-1",children:f.map((k,N)=>l.jsx("li",{className:"text-positive-400 text-sm",children:k},N))}),v.length>0&&l.jsx("ul",{className:"mt-2 space-y-1",children:v.map((k,N)=>l.jsx("li",{className:"text-negative-400 text-sm",children:k},N))}),l.jsx("div",{className:"mt-3",children:l.jsx(le,{type:"button",disabled:!s.trim()||u,onClick:fn(S),children:u?"Applying...":"Apply"})})]})}function ZW(){const{dashboard:e,isLoading:n,refetch:s}=Jm(),{canWrite:r,isAdmin:u}=fa(),h=zi();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(le,{type:"button",onClick:()=>{h({to:"/setup",search:{experience:"platform"}})},children:[l.jsx(tg,{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=>{FW(x)&&h({to:"/projects/$projectName",params:{projectName:b.project.name}})},children:[l.jsxs("td",{children:[l.jsx(at,{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(wn,{tone:b.mentionSummary.tone,children:b.mentionSummary.value})}),l.jsx("td",{className:"text-muted text-sm",children:v?l.jsx(U1,{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(le,{type:"button",onClick:()=>{h({to:"/setup",search:{experience:"platform"}})},children:[l.jsx(tg,{className:"size-4 mr-1.5"}),"Map a site"]}):null]}),r?l.jsx(QW,{onApplied:()=>{s()}}):null]})}class YW extends Error{constructor(){super(yC),this.name="ViewOnlyError"}}function XW(e){if(!e.canWrite)throw new YW}function il(){const e=fa();return()=>{XW(e)}}function JW(e){return e==="gsc-sync"?"GSC sync queued":e==="inspect-sitemap"?"Sitemap inspection queued":"Visibility sweep queued"}function WW(e,n){const s=e??"Project";return n==="gsc-sync"?`${s} will refresh after the sync completes.`:n==="inspect-sitemap"?`${s} will notify you when sitemap inspection finishes.`:`${s} will notify you when the run finishes.`}function X1(e,n){M1({id:e.id,projectId:e.projectId,kind:e.kind,projectLabel:n.projectLabel,sourceAction:n.sourceAction,lastAnnouncedStatus:"queued"}),bn({title:JW(e.kind),detail:WW(n.projectLabel,e.kind),tone:"neutral",dedupeKey:`run:${e.id}`,dedupeMode:"replace"})}function eee(e){const n=e.filter(f=>f.status!=="conflict"&&f.status!=="error"),s=e.filter(f=>f.status==="conflict"),r=e.filter(f=>f.status==="error"),u=s.length+r.length;if(n.length===0){const f=[r.length>0?`${r.length} need provider or query setup`:null,s.length>0?`${s.length} already have an active run`:null].filter(b=>b!==null);bn({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)M1({id:f.id,projectId:f.projectId,kind:f.kind,projectLabel:f.projectName,sourceAction:"run-all",lastAnnouncedStatus:"queued"});const h=oY({runIds:n.map(f=>f.id),queuedCount:n.length,skippedCount:u});bn({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 sp(e,n){if(e instanceof gn&&e.code==="PROVIDERS_FAILING"){bn({title:"Sweep not started",detail:"Every provider keeps failing on its account. The AI Visibility notice says when sweeps resume.",tone:"caution",durationMs:8e3,dedupeKey:`providers-failing:${n?.projectKey??"project"}:${n?.sourceAction??"run"}`,dedupeMode:"replace"});return}if(e instanceof gn&&e.code==="RUN_IN_PROGRESS"){bn({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}bn({title:e instanceof Error?e.message:"Failed to queue run",tone:"negative"})}function tee(){const e=il();return os({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:s})=>iF(n,s),onSuccess:(n,s)=>{X1(n,{projectLabel:s.projectLabel??s.projectName,sourceAction:s.sourceAction})},onError:(n,s)=>{s.sourceAction!=="setup-launch"&&sp(n,{projectKey:s.projectName,projectLabel:s.projectLabel??s.projectName,sourceAction:s.sourceAction})}})}function Eoe(){const e=il();return os({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:n=>pF(n),onSuccess:n=>{eee(n)},onError:n=>{bn({title:n instanceof Error?n.message:"Failed to queue runs",tone:"negative"})}})}function nee(){const e=il();return os({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,body:s})=>gF(n,s),onSuccess:(n,s)=>{M1({id:n.runId,projectId:s.projectId,kind:Oe["site-audit"],projectLabel:s.projectLabel??s.projectName,sourceAction:"site-audit",lastAnnouncedStatus:n.status}),bn({title:n.status==="running"?"Site Health scan already running":"Site Health scan queued",detail:`${s.projectLabel??s.projectName} will refresh automatically when the scan finishes.`,tone:"neutral",dedupeKey:`run:${n.runId}`,dedupeMode:"replace"})},onError:(n,s)=>{s.suppressErrorToast||sp(n,{projectKey:s.projectName,projectLabel:s.projectLabel??s.projectName,sourceAction:"site-audit"})}})}function Roe(){const e=il();return os({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:s})=>hF(n,s),onSuccess:(n,s)=>{X1(n,{projectLabel:s.projectLabel??s.projectName,sourceAction:"gsc-sync"})},onError:(n,s)=>{sp(n,{projectKey:s.projectName,projectLabel:s.projectLabel??s.projectName,sourceAction:"gsc-sync"})}})}function Doe(){const e=il();return os({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:s})=>fF(n,s),onSuccess:(n,s)=>{X1(n,{projectLabel:s.projectLabel??s.projectName,sourceAction:"inspect-sitemap"})},onError:(n,s)=>{sp(n,{projectKey:s.projectName,projectLabel:s.projectLabel??s.projectName,sourceAction:"inspect-sitemap"})}})}function aee(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 zoe(){const e=il();return os({onMutate:e,mutationFn:({projectName:n,queries:s})=>aF(n,s)})}const fk=[{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}],see={skipped:"Skipped",pending:"In progress",incomplete:"Didn’t finish",unknown:null};function Ro({current:e,outcomes:n={}}){const s=fk.findIndex(r=>r.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:fk.map((r,u)=>{const h=u<s?n[r.id]:void 0,f=u<s&&h===void 0,b=u===s,v=h?see[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:r.label}),v?l.jsx("span",{className:"text-[13px] text-secondary",children:v}):r.optional&&!h?l.jsx("span",{className:"text-[13px] text-secondary",children:"Optional"}):null,f?l.jsx("span",{className:"sr-only",children:"Complete"}):null]})]},r.id)})})}function iee(){return[{id:"search-console",icon:Jg,label:"Search Console",detail:"Compare answer engines with the queries you already rank for.",action:"Connect",to:"/projects/$projectName/search-console"},{id:"analytics",icon:Pk,label:"Google Analytics",detail:"See the traffic answer engines actually send you.",action:"Connect",to:"/projects/$projectName/activity"},{id:"schedule",icon:qk,label:"Scheduled sweeps",detail:"Re-measure on a schedule instead of by hand.",action:"Set up",to:"/projects/$projectName/settings"},{id:"notifications",icon:ng,label:"Notifications",detail:"Send a webhook when a sweep finishes or a score moves.",action:"Set up",to:"/projects/$projectName/settings"},{id:"local",icon:Mk,label:"Local presence",detail:"Track the Google Business Profile behind local answers.",action:"Open",to:"/projects/$projectName/local"},{id:"agent",icon:H_,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 oee({projectName:e}){const n=iee();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:s,icon:r,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(r,{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(at,{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]})]})]},s))})]})}function ree({providerName:e,keyUrl:n,modelHint:s,compact:r=!1,leadingField:u,secondaryActions:h,onSaved:f}){const b=Di(),v=e.toLowerCase()==="local",x=r&&e.toLowerCase()==="gemini"&&!!n,[S,k]=C.useState(""),[N,T]=C.useState(""),[z,q]=C.useState(""),[E,P]=C.useState(""),[M,L]=C.useState(""),[$,Q]=C.useState(""),[ae,V]=C.useState(!1),[Z,X]=C.useState(null),[Ce,tt]=C.useState(!1),Ke=v?N.trim().length>0:S.trim().length>0;async function Ue(){if(Ke){V(!0),X(null),tt(!1);try{const Se=ue=>{const _e=parseInt(ue.trim(),10);return Number.isFinite(_e)&&_e>0?_e:void 0},Me={},xe=Se(E);xe!==void 0&&(Me.maxConcurrency=xe);const pe=Se(M);pe!==void 0&&(Me.maxRequestsPerMinute=pe);const ce=Se($);ce!==void 0&&(Me.maxRequestsPerDay=ce),await hC(e.toLowerCase(),{...S.trim()?{apiKey:S.trim()}:{},...N.trim()?{baseUrl:N.trim()}:{},...z.trim()?{model:z.trim()}:{},...Object.keys(Me).length>0?{quota:Me}:{}}),k(""),T(""),q(""),P(""),L(""),Q(""),tt(!0),On(b,"runAdmission"),bn({title:"Provider updated",detail:`${e} configuration saved.`,tone:"positive",dedupeKey:`settings:provider:${e}`,dedupeMode:"replace"}),f()}catch(Se){X(Se instanceof Error?Se.message:"Failed to update provider")}finally{V(!1)}}}const ke=s??"Use default model",Le=r?"block text-sm font-medium text-secondary":"text-sm text-secondary",B=r?"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",W=l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:r?"space-y-1.5":void 0,children:[l.jsx("label",{className:Le,htmlFor:`model-${e}`,children:"Model (optional)"}),l.jsx("input",{id:`model-${e}`,type:"text",className:B,placeholder:ke,value:z,onChange:Se=>q(Se.target.value)})]}),l.jsxs("div",{children:[l.jsx("label",{className:Le,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:r?"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:E,onChange:Se=>P(Se.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:r?"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:M,onChange:Se=>L(Se.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:r?"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:$,onChange:Se=>Q(Se.target.value)}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Per day"})]})]})]})]}),ve=v?l.jsxs("div",{className:r?"space-y-1.5":void 0,children:[l.jsx("label",{className:Le,htmlFor:`base-url-${e}`,children:"Base URL"}),l.jsx("input",{id:`base-url-${e}`,type:"text",className:B,placeholder:"http://localhost:11434/v1",value:N,onChange:Se=>T(Se.target.value)}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Use any OpenAI-compatible endpoint, such as Ollama or vLLM."})]}):null,Ae=l.jsxs("div",{className:r?"min-w-0 space-y-1.5":void 0,children:[l.jsxs("div",{className:r?"flex items-center justify-between gap-3":"flex items-center justify-between",children:[l.jsxs("label",{className:Le,htmlFor:`api-key-${e}`,children:["API key",v?" (optional)":""]}),n&&!x&&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:B,placeholder:v?"Optional. Most local servers do not need one.":`Enter ${e} API key`,value:S,onChange:Se=>k(Se.target.value)})]}),ie=l.jsx(le,{type:"button",size:r?"default":"sm",className:r?"min-h-11":void 0,disabled:!Ke||ae,onClick:fn(Ue),children:ae?"Saving...":r?"Save connection":"Save"});return l.jsxs("div",{className:r?"space-y-3":"mt-3 rounded-lg border border-base bg-bg-elevated/40 p-3 space-y-2",children:[x&&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(le,{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 ","↗"]})})]}),r?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,Ae]}),ve]}):l.jsxs(l.Fragment,{children:[ve,Ae]}),r?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:W})]}):W,Z&&l.jsx("p",{role:"alert",className:"text-sm text-negative-400",children:Z}),Ce&&l.jsx("p",{className:"text-sm text-positive-400",children:"Provider updated."}),r?l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[ie,h]}):ie]})}const gm="cdp:chatgpt";function xo(e){return e.trim().toLowerCase()}function lee({projectProviders:e,configuredApiProviders:n,cdpConfigured:s}){const r=e.map(xo),u=new Set(r),h=r.length===0||r.some(x=>x!==gm),f=r.length===0||u.has(gm);if(h&&n!==void 0&&n.map(xo).some(S=>r.length===0||u.has(S))||f&&s===!0)return!0;if(!(h&&n===void 0||f&&s===void 0))return!1}const cee=[{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"}],uee=[{label:"Queries"},{label:"First sweep"}];function gk(e,n){return(e==="completed"||e==="partial")&&n>0}function yk(e){return e.launchReady?e.hasProject?e.queryCount===0?2:e.competitorCount===0&&!e.hasRunAttempt?3:4:1:0}function u4(e){return e.queryCounts.total>0}function dee(e,n){return n?e.find(s=>s.project.name===n)??null:e.find(s=>!u4(s))??e.at(0)??null}function mee({current:e,labels:n}){return l.jsx("div",{className:"setup-steps",role:"list","aria-label":"Setup progress",children:n.map((s,r)=>{const u=r<e,h=r===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?"✓":r+1}),l.jsx("span",{children:s.label})]},s.label)})})}function pee({visibilityProjectName:e,siteHealthOnboarding:n=!1,onboardingFinish:s=n}={}){const{canWrite:r}=fa();return e&&r?l.jsx(bk,{visibilityProjectName:e,siteHealthOnboarding:n,onboardingFinish:s}):l.jsx(H1,{title:e?"Set up AI Visibility":"Setup",children:l.jsx(bk,{visibilityProjectName:e,siteHealthOnboarding:n,onboardingFinish:s})})}function bk({visibilityProjectName:e,siteHealthOnboarding:n,onboardingFinish:s}){const r=iu(),{isAdmin:u}=fa(),{dashboard:h,isLoading:f,refetch:b}=Jm(void 0,{pauseProjectPolling:!0,includeSettings:u}),v=h??r?.dashboard,x=zi(),S=C.useCallback(N=>{N&&e&&N.focus()},[e]),k=()=>{if(!e){x({to:"/",replace:!0});return}if(s){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(N=>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"})]},N))})]})]}):e&&!v.projects.some(N=>N.project.name===e)?l.jsxs("div",{className:"page-container",children:[n?l.jsx(Ro,{current:"visibility"}):null,l.jsxs("div",{className:"page-header",children:[l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{ref:S,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(le,{type:"button",variant:"outline",onClick:k,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(le,{type:"button",variant:"outline",onClick:()=>{b()},children:"Retry"}),l.jsx(le,{type:"button",asChild:!0,children:l.jsx(at,{to:"/projects",children:"View projects"})})]})]})]}):l.jsx(hee,{dashboard:v,initialHealth:r?.health,enableLiveStatus:!r,refetch:b,visibilityProjectName:e,visibilityHeadingRef:S,siteHealthOnboarding:n,onboardingFinish:s})}function hee({dashboard:e,initialHealth:n,enableLiveStatus:s,refetch:r,visibilityProjectName:u,visibilityHeadingRef:h,siteHealthOnboarding:f,onboardingFinish:b}){const v=e.settings,{isAdmin:x}=fa(),k=V1(s,n).data??n??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},N=tY(e.setup,k,v),T=!!u,z=zi(),q=Di(),E=C.useRef(T1()).current,P=C.useRef(new Set),M=C.useCallback((H,Ye)=>{if(Ye){if(P.current.has(Ye))return;P.current.add(Ye)}I1({surface:"wizard",...H,eventId:E1()})},[]),L=dee(e.projects,u),$=L?e.runs.filter(H=>H.projectId===L.project.id).sort((H,Ye)=>Ye.createdAt.localeCompare(H.createdAt)):[],Q=L?.queryCounts.total??0,ae=L?.project.name,V=yt({queryKey:["setup","resume-queries",ae],queryFn:()=>ae?dC(ae):Promise.resolve([]),enabled:!!ae}),Z=V.data??[],X=V.data?.length??Q,Ce=L?.competitors.map(H=>H.domain)??[],tt=$.at(0)??null,Ke=!!L&&u4(L),Ue=!!L&&V.isPending,ke=T?2:yk({launchReady:N.launchState.enabled,hasProject:!!L,queryCount:X,competitorCount:Ce.length,hasRunAttempt:$.length>0||Ke}),Le=yk({launchReady:!0,hasProject:!!L,queryCount:X,competitorCount:Ce.length,hasRunAttempt:$.length>0||Ke}),[B,W]=C.useState(ke),[ve,Ae]=C.useState(!Ue),ie=T&&(Ue||!ve),[Se,Me]=C.useState(L?.project.name??""),[xe,pe]=C.useState(L?.project.displayName??""),[ce,ue]=C.useState(L?.project.canonicalDomain??""),[_e,Qe]=C.useState(L?.project.country??"US"),[Ee,Ct]=C.useState(L?.project.language??"en"),[me,Be]=C.useState(L?.project.autoExtractBacklinks??!1),[Ne,re]=C.useState(L?.project.name??null),[Ze,bt]=C.useState(null),[qn,Ht]=C.useState(!1),Ve=()=>{if(!Ne){z({to:"/",replace:!!u});return}z({to:f?"/projects/$projectName/technical-aeo":"/projects/$projectName",params:{projectName:Ne},replace:!!u})},ct=(H=!1)=>{if(!b||!Ne){Ve();return}z({to:"/setup",search:{onboarding:"complete",setupProject:Ne,...H?{skipped:"visibility"}:{}},replace:!0})},Ft=()=>ct(!0),[Qt,En]=C.useState(Z.map(H=>H.query).join(`
73
+ `)),[Vt,ds]=C.useState(X>0),[Vi,ms]=C.useState(null),[Rn,Vo]=C.useState(!1),[$i,Ki]=C.useState(!1),ps=v.providerStatuses.filter(H=>H.state==="ready"),vn=L?.project.providers.map(xo)??[],Et=ps.filter(H=>vn.length===0||vn.includes(xo(H.name))),$n=ps.map(H=>xo(H.name)),Zt=Et.length>0,Gi=vn.length===0||vn.includes(gm),Oa=T&&!x,ea=yt({...gQ({client:J,path:{name:ae??""}}),enabled:Oa&&!!ae,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:"always",retry:!1}),oe=ea.data?.answerVisibilityProviderReady,ze=Oa&&(ea.isError||ea.isSuccess&&typeof oe!="boolean"),Je=yt({...$Q({client:J}),enabled:!Oa&&Gi&&!Zt,staleTime:6e4,retry:!1}),Ot=Gi?Je.isSuccess?typeof Je.data.browserVersion=="string":Je.isError?!1:void 0:!1,et=Oa?ea.isSuccess&&ea.isFetchedAfterMount&&!ea.isFetching?oe:void 0:lee({projectProviders:vn,configuredApiProviders:$n,cdpConfigured:Ot}),kt=Et.length+(Ot===!0?1:0),[sn,hs]=C.useState(Et[0]?.name??""),[$o,Hi]=C.useState(5),[ou,ol]=C.useState(!1),[rl,ll]=C.useState(null),[cl,ul]=C.useState(""),Ko=C.useRef(!1),ru=C.useCallback(H=>{!H||!Ko.current||(Ko.current=!1,H.focus({preventScroll:!0}))},[]),[ga,on]=C.useState(!1),[Dn,Qs]=C.useState(!1),[Go,lu]=C.useState(!1),Ho=v.providerStatuses.filter(H=>xo(H.name)!==gm&&(vn.length===0||vn.includes(xo(H.name)))),ta=Ho.find(H=>H.name===cl)??Ho.find(H=>H.state!=="ready")??Ho.at(0),Zs=`Help me choose AI Visibility queries for Canonry project ${JSON.stringify(Ne??Se)} (${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.`,dl=async()=>{lu(!1);try{await navigator.clipboard.writeText(Zs),Qs(!0)}catch{lu(!0)}},[fs,Ys]=C.useState(Ce.join(`
77
+ `)),[Xs,Js]=C.useState(Ce.length>0),[en,ml]=C.useState(null),[pl,Qa]=C.useState(!1),hl=C.useRef(nC(ae)).current?.runId??null,fl=C.useRef(hl),[Za,rp]=C.useState(!!hl||!!tt&&!Ke),[gs,Qi]=C.useState(!1),[jn,zn]=C.useState(null),[Ws,lp]=C.useState(hl??(Ke?null:tt?.id??null)),gl=tee(),Ya=yt({...q1({client:J,path:{id:Ws??""}}),enabled:!!Ws,refetchInterval:({state:H})=>{const Ye=H.data?.status;return Ye==="completed"||Ye==="partial"||Ye==="failed"||Ye==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}),[ei,cu]=C.useState(""),[In,Fo]=C.useState(!1),[yl,Qo]=C.useState(null),Kn=Se.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),na=Qt.split(`
78
+ `).map(H=>H.trim()).filter(Boolean),ys=fs.split(`
79
+ `).map(H=>H.trim()).filter(Boolean),ya=Math.max(X,Vt?na.length:0),ba=aH({apiReady:k.apiStatus.state==="ok",databaseConfigured:k.apiStatus.databaseConfigured,workerReady:k.workerStatus.state==="ok",providerReady:et!==!1}),Xa=(ba&&ba!=="no_provider"?N.launchState.blockedReason:ze?"Provider readiness could not be checked. Try again.":et===void 0?"Checking provider readiness before launch.":ba==="no_provider"?"Launch is blocked until a provider allowed by this project is configured.":void 0)??(Ne?ya===0?"Add at least one query before launching the first sweep.":void 0:"Create a project before launching the first sweep.");C.useEffect(()=>{ve||Ue||(T||W(ke),Z.length>0&&(En(Z.map(H=>H.query).join(`
80
+ `)),ds(!0)),Ae(!0))},[Z,ke,T,ve,Ue]),C.useEffect(()=>{if(Et.length===0){hs("");return}Et.some(H=>H.name===sn)||hs(Et[0].name)},[Et,sn]),C.useEffect(()=>{ve&&(M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.started",step:nH(ke),resumed:!!L},"onboarding.started"),!L&&ke>0&&M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.step_completed",step:"system",method:"automatic"},"onboarding.step_completed:system"))},[M,ke,E,ve,L]),C.useEffect(()=>{T||!sH(k)||!ba||M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.blocked",step:"system",action:ba==="no_provider"?"configure_provider":"continue",reasonCode:ba},`onboarding.blocked:system:${ba}`)},[M,k,T,E,ba]);const Pa=Ya.data?.status,Zo=Ya.data?.snapshots?.length??0;C.useEffect(()=>{if(!Za||!Pa)return;const H=fl.current;if(!H||H!==Ws)return;if(gk(Pa,Zo)){M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.step_completed",step:"run",method:"automatic",countBucket:is(Zo)},"onboarding.step_completed:run"),om(H);return}const Ye=Pa==="cancelled"?"run_cancelled":Pa==="failed"||(Pa==="completed"||Pa==="partial")&&Zo===0?"run_failed":void 0;Ye&&(M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:Ye},`onboarding.blocked:run:${Ye}`),om(H))},[M,Ws,E,Pa,Zo,Za]);const up=async()=>{if(!(!Kn||!ce)){Ht(!0),bt(null);try{const H=await pC(Kn,{displayName:xe||Se,canonicalDomain:ce,country:_e,language:Ee,autoExtractBacklinks:me});re(Kn),bn({title:"Project created",detail:`${H.displayName||H.name} is ready for setup.`,tone:"positive",dedupeKey:`project:create:${H.name}`,dedupeMode:"drop"}),await r(),M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.step_completed",step:"project",method:"manual"},"onboarding.step_completed:project"),W(2)}catch(H){bt(H instanceof Error?H.message:"Failed to create project"),M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.blocked",step:"project",action:"save",reasonCode:"project_create_failed"},"onboarding.blocked:project:project_create_failed")}finally{Ht(!1)}}},Yo=async()=>{if(!Ne)return;const H=na;if(H.length!==0){Vo(!0),ms(null);try{await nF(Ne,H),ds(!0),T?await Promise.all([q.invalidateQueries({queryKey:xC({client:J,path:{name:Ne}})}),q.invalidateQueries({predicate:aee}),q.invalidateQueries({queryKey:["setup","resume-queries",Ne]})]):await r(),M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.step_completed",step:"queries",method:$i?"generated":"manual",countBucket:is(H.length)},"onboarding.step_completed:queries"),W(T?4:3)}catch(Ye){ms(Ye instanceof Error?Ye.message:"Failed to save queries"),M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.blocked",step:"queries",action:"save",reasonCode:"query_save_failed"},"onboarding.blocked:queries:query_save_failed")}finally{Vo(!1)}}},qa=async()=>{if(!(!Ne||!sn)){ol(!0),ll(null);try{const H=await dF(Ne,sn,$o);if(H.queries.length>0){const Ye=Qt?Qt.trimEnd()+`
81
+ `+H.queries.join(`
82
+ `):H.queries.join(`
83
+ `);En(Ye),Ki(!0)}}catch(H){ll(H instanceof Error?H.message:"Failed to generate queries"),M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.blocked",step:"queries",action:"generate_queries",reasonCode:Ac(H,"unknown")},"onboarding.blocked:queries:generate")}finally{ol(!1)}}},bl=async()=>{if(!Ne)return;const H=ys;if(H.length!==0){Qa(!0),ml(null);try{await sF(Ne,H),Js(!0),await r(),M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.step_completed",step:"competitors",method:"manual",countBucket:is(H.length)},"onboarding.step_completed:competitors"),W(4)}catch(Ye){ml(Ye instanceof Error?Ye.message:"Failed to save competitors"),M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.blocked",step:"competitors",action:"save",reasonCode:"unknown"},"onboarding.blocked:competitors:save")}finally{Qa(!1)}}},vl=async()=>{const H=ei.trim();if(H){Fo(!0),Qo(null);try{await hC("gemini",{apiKey:H}),bn({title:"Gemini configured",detail:"Provider is ready — continuing setup.",tone:"positive",dedupeKey:"setup:gemini:configured",dedupeMode:"drop"}),cu(""),await r(),hs(v.providerStatuses.find(Ye=>Ye.name.toLowerCase()==="gemini")?.name??"gemini"),M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.step_completed",step:"system",method:"inline"},"onboarding.step_completed:system")}catch(Ye){Qo(Ye instanceof Error?Ye.message:"Failed to save Gemini key"),M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.blocked",step:"system",action:"configure_provider",reasonCode:"provider_save_failed"},"onboarding.blocked:system:provider_save_failed")}finally{Fo(!1)}}},bs=async()=>{if(!bo()){if(!Ne||Xa){zn(Xa??"Complete setup before launching the first sweep.");const H=ba??(Ne?ya===0?"no_queries":"run_rejected":"unknown");Oa||M({flowVersion:ft,onboardingSessionId:E,event:"run.requested",origin:"dashboard_setup",result:"rejected",providerCountBucket:is(kt),queryCountBucket:is(ya),reasonCode:H});return}Qi(!0),zn(null);try{const H=await gl.mutateAsync({projectName:Ne,projectLabel:xe||Se||Ne,sourceAction:"setup-launch"});lp(H.id),rp(!0),tC(Ne,H.id),fl.current=H.id,Oa||M({flowVersion:ft,onboardingSessionId:E,event:"run.requested",origin:"dashboard_setup",result:"queued",providerCountBucket:is(kt),queryCountBucket:is(ya)}),await r()}catch(H){zn(H instanceof Error?H.message:"Failed to queue the visibility sweep. Retry when the instance is ready."),Oa||M({flowVersion:ft,onboardingSessionId:E,event:"run.requested",origin:"dashboard_setup",result:"rejected",providerCountBucket:is(kt),queryCountBucket:is(ya),reasonCode:Ac(H,"run_rejected")})}finally{Qi(!1)}}},Mn=()=>W(H=>T?2:Math.max(0,H-1)),Xo=(H,Ye,vs)=>{M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.step_completed",step:H,method:"existing",...vs===void 0?{}:{countBucket:is(vs)}},`onboarding.step_completed:${H}`),W(Ye)},xl=()=>{if(M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.step_completed",step:"queries",method:"skipped",countBucket:"0"},"onboarding.step_completed:queries"),T){Ft();return}W(3)},wl=()=>{M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.step_completed",step:"competitors",method:"skipped",countBucket:"0"},"onboarding.step_completed:competitors"),W(4)},Zi=T?"section":_a,va=et!==!0||Ot===!0?l.jsx(le,{type:"button",variant:"ghost",size:"sm",className:"min-h-11",onClick:()=>{r(),Gi&&Je.refetch()},children:"Check again"}):null,Sl=(et===!1||ga)&&!!ta,Yi=T&&(B===2||B===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:et===!1?"Connect a provider":"Answer engine provider"}),l.jsx(wn,{tone:et===!0?"positive":"neutral",children:et===!0?"Configured":et===!1?"Not connected":"Checking"})]}),l.jsx("p",{className:"max-w-prose text-sm text-secondary",children:et===!0?Et.length>0?`${Et.map(H=>H.displayName??H.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.":et===!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."}),et===!1||ga?ta?l.jsx("div",{children:l.jsx(ree,{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:ru,id:"setup-provider",className:"setup-input",value:ta.name,onChange:H=>{H.target.value!==ta.name&&(Ko.current=document.activeElement===H.currentTarget,ul(H.target.value))},children:Ho.map(H=>l.jsx("option",{value:H.name,children:H.displayName??H.name},H.name))})]}),secondaryActions:va,providerName:ta.name,keyUrl:ta.keyUrl,modelHint:ta.modelHint,onSaved:()=>{on(!1),r()}},ta.name)}):l.jsx("p",{className:"max-w-prose text-sm text-secondary",children:vn.length>0?`This project's provider selection is ${vn.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:[et===!0&&!ga&&ta?l.jsx(le,{type:"button",variant:"outline",size:"sm",onClick:()=>on(!0),children:"Configure a provider"}):null,!ta||Ot===!0?l.jsx(le,{type:"button",variant:"outline",size:"sm",asChild:!0,children:l.jsx(at,{to:"/settings",target:"_blank",rel:"noopener noreferrer",children:"Open provider settings"})}):null,Sl?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."}),ze?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:et===!0?"An answer engine is available for this project.":et===!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(le,{type:"button",variant:"ghost",size:"sm",className:"min-h-11",disabled:ea.isFetching,onClick:()=>{ea.refetch()},children:ze?"Retry provider check":"Check again"})]}):null,Ja=(()=>{switch(B){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:N.healthChecks.map(H=>l.jsxs("div",{className:"health-check-row",children:[l.jsxs("div",{children:[l.jsx("p",{className:"run-row-title",children:H.label}),l.jsx("p",{className:"supporting-copy",children:H.detail}),H.id==="provider"&&H.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:ei,onChange:Ye=>cu(Ye.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(le,{type:"button",size:"sm",disabled:In||!ei.trim(),onClick:fn(vl),children:In?"Saving...":"Save"})]}),yl&&l.jsxs("div",{role:"alert",className:"space-y-1 text-xs text-negative",children:[l.jsx("p",{children:yl}),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(at,{to:"/settings",className:"text-link hover:underline",children:"Settings"}),"."]})]})]}),l.jsx(wn,{tone:H.state==="ready"?"positive":"caution",title:H.id==="api"?Gr(k.apiStatus):H.id==="worker"?Gr(k.workerStatus):H.detail,children:H.state==="ready"?"Ready":"Attention"})]},H.id))}),l.jsxs("div",{className:"setup-nav",children:[N.launchState.blockedReason?l.jsx("p",{role:"status",className:"supporting-copy text-negative",children:N.launchState.blockedReason}):l.jsx("span",{}),l.jsx(le,{type:"button",disabled:!N.launchState.enabled,title:N.launchState.blockedReason,onClick:()=>{M({flowVersion:ft,onboardingSessionId:E,event:"onboarding.step_completed",step:"system",method:"automatic"},"onboarding.step_completed:system"),W(Le)},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"})]}),Ne?l.jsx(wn,{tone:"positive",children:"Created"}):null]}),Ne?l.jsxs("div",{className:"compact-stack",children:[l.jsxs("p",{className:"text-neutral",children:["Project ",l.jsx("span",{className:"text-heading font-medium",children:Ne})," created successfully."]}),l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:Mn,children:"Back"}),l.jsx(le,{type:"button",onClick:()=>Xo("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:Se,onChange:H=>Me(H.target.value)}),Kn&&Kn!==Se?l.jsxs("p",{className:"supporting-copy",children:["Slug: ",Kn]}):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:xe,onChange:H=>pe(H.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:H=>ue(H.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:_e,onChange:H=>Qe(H.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:Ee,onChange:H=>Ct(H.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:me,onChange:H=>Be(H.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(at,{to:"/backlinks",className:"text-positive-400 hover:text-positive underline underline-offset-2",children:"Manage backlinks"})]})]})]}),Ze?l.jsx("p",{className:"text-negative-400 text-sm",children:Ze}):null,l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:Mn,children:"Back"}),l.jsx(le,{type:"button",disabled:!Kn||!ce||qn,onClick:fn(up),children:qn?"Creating...":"Create project"})]})]})]});case 2:return l.jsxs(Zi,{className:T?"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:T?"Step 1 of 2":"Step 3 of 5"}),l.jsx("h2",{id:"setup-queries-heading",children:"Add queries"})]}),ie?l.jsx(wn,{tone:"neutral",children:"Loading"}):V.isError?l.jsx(wn,{tone:"negative",children:"Load failed"}):Vt?l.jsxs(wn,{tone:"positive",children:[na.length," saved"]}):l.jsxs(wn,{tone:"neutral",children:[na.length," quer",na.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(le,{type:"button",variant:"outline",size:"sm",className:"min-h-11 shrink-0 self-start",onClick:fn(dl),children:Dn?"Research prompt copied":"Copy research prompt"})]}),l.jsxs("details",{open:Go||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:Zs})]}),Go?l.jsx("p",{role:"alert",className:"text-sm text-negative",children:"Could not copy. Select and copy the prompt above."}):null]}),ie?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…"}):V.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(le,{type:"button",variant:"outline",onClick:T?Ve:Mn,children:"Back"}),l.jsx(le,{type:"button",onClick:()=>{V.refetch()},children:"Retry loading queries"})]})]}):Vt?l.jsxs("div",{className:"compact-stack",children:[l.jsx("ul",{className:"detail-list",children:na.map(H=>l.jsx("li",{children:H},H))}),l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:T?Ve:Mn,children:"Back"}),l.jsx(le,{type:"button",variant:"outline",onClick:()=>ds(!1),children:"Edit queries"}),l.jsx(le,{type:"button",onClick:()=>Xo("queries",T?4:3,na.length),children:"Continue"})]})]}):l.jsxs("div",{className:"compact-stack",children:[Et.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:H=>hs(H.target.value),children:Et.map(H=>l.jsxs("option",{value:H.name,children:[H.displayName??H.name,H.model?` (${H.model})`:""]},H.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:$o,onChange:H=>Hi(Number(H.target.value)),children:[3,5,10,15,20].map(H=>l.jsx("option",{value:H,children:H},H))})]}),l.jsx(le,{type:"button",variant:"outline",disabled:ou||!sn,onClick:fn(qa),children:ou?"Analyzing site...":"Generate"})]}),rl?l.jsx("p",{className:"text-negative-400 text-sm",children:rl}):null]}):null,T?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:Qt,onChange:H=>En(H.target.value)})]}),Vi?l.jsx("p",{className:"text-negative-400 text-sm",children:Vi}):null,l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:T?Ve:Mn,children:"Back"}),l.jsx(le,{type:"button",variant:"ghost",onClick:xl,children:T?"Finish without AI Visibility":"Skip for now"}),l.jsx(le,{type:"button",disabled:na.length===0||Rn,onClick:fn(Yo),children:Rn?"Saving...":`Save ${na.length} quer${na.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"})]}),Xs?l.jsx(wn,{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."}),Xs?l.jsxs("div",{className:"compact-stack",children:[l.jsx("ul",{className:"detail-list",children:ys.map(H=>l.jsx("li",{children:H},H))}),l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:Mn,children:"Back"}),l.jsx(le,{type:"button",onClick:()=>Xo("competitors",4,ys.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:fs,onChange:H=>Ys(H.target.value)})]}),en?l.jsx("p",{className:"text-negative-400 text-sm",children:en}):null,l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:Mn,children:"Back"}),l.jsx("div",{className:"flex gap-2",children:ys.length===0?l.jsx(le,{type:"button",onClick:wl,children:"Continue without competitors"}):l.jsxs(l.Fragment,{children:[l.jsx(le,{type:"button",variant:"outline",onClick:wl,children:"Skip"}),l.jsx(le,{type:"button",disabled:pl,onClick:fn(bl),children:pl?"Saving...":`Save ${ys.length} competitor${ys.length!==1?"s":""}`})]})})]})]})]});case 4:{const H=Ya.data,Ye=H?.status??(Ws===tt?.id?tt.status:void 0),vs=Ye==="completed"||Ye==="partial"||Ye==="failed"||Ye==="cancelled",ti=H?.snapshots??[],Ma=H?.queryCounts,kl=Ye?gk(Ye,ti.length):!1,An=Ke&&!Za,xs=jn??(H?.error?YF(H.error):Ye==="cancelled"?"The sweep was cancelled before it produced a baseline.":(Ye==="completed"||Ye==="partial")&&ti.length===0?"The sweep finished without producing any snapshots.":tt?.statusDetail||"The sweep did not produce a baseline.");let Wa=null;return An||kl?Wa=l.jsx(wn,{tone:"positive",children:"Complete"}):jn&&!Za?Wa=l.jsx(wn,{tone:"negative",children:"Failed"}):vs?Wa=l.jsx(wn,{tone:"negative",children:Ye==="cancelled"?"Cancelled":"Failed"}):Za&&(Wa=l.jsx(wn,{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:T?"Step 2 of 2":"Step 5 of 5"}),l.jsx("h2",{children:bo()?"AI Visibility":"Launch first run"})]}),Wa]}),An?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:Ne})," already has a successful answer-visibility baseline."]}),l.jsxs("div",{className:"setup-nav",children:[l.jsx("span",{}),l.jsx(le,{type:"button",onClick:()=>ct(),children:f?"Finish setup":"Open project dashboard →"})]})]}):!Za&&bo()?l.jsxs("div",{className:"compact-stack",children:[Ne?l.jsx(yJ,{projectName:Ne}):l.jsx("p",{className:"text-sm text-secondary",children:Lg}),jn&&l.jsx("p",{role:"alert",className:"text-sm text-negative",children:jn}),l.jsxs("div",{className:"setup-nav",children:[l.jsx("span",{}),l.jsx(le,{type:"button",onClick:Ve,children:"Open project dashboard →"})]})]}):Za?vs?kl?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:Ne}),":"]}),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:Ma?l.jsxs(l.Fragment,{children:[Ma.mentionedQueries,l.jsxs("span",{className:"text-faint text-lg",children:[" / ",Ma.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:Ma?l.jsxs(l.Fragment,{children:[Ma.citedQueries,l.jsxs("span",{className:"text-faint text-lg",children:[" / ",Ma.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:ti.length}),l.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"completed engine checks"})]})]}),!b&&Ne?l.jsx(oee,{projectName:Ne}):null,l.jsxs("div",{className:"setup-nav",children:[l.jsx("span",{}),l.jsx(le,{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:xs}),l.jsx("p",{className:"mt-1 text-xs text-secondary",children:bo()?Lg: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&&!bo()?l.jsx(le,{type:"button",variant:"outline",asChild:!0,children:l.jsx(at,{to:"/settings",children:"Configure providers"})}):l.jsx("span",{}),bo()||!x?l.jsx(le,{type:"button",onClick:Ve,children:"Open project dashboard →"}):l.jsx(le,{type:"button",disabled:gs||!!Xa,onClick:fn(bs),children:gs?"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:Ye??"queued"})]})}),Ya.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:Ya.error instanceof Error?Ya.error.message:"Could not refresh the sweep status."}),l.jsx(le,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>{Ya.refetch()},children:"Retry status check"})]}),l.jsxs("div",{className:"setup-nav",children:[l.jsx("span",{}),l.jsx(le,{type:"button",variant:"outline",onClick:f?()=>ct():Ve,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:Ne}),", or finish and run it later from the project. A sweep calls the answer engines, so it costs provider usage."]}),(Xa||jn)&&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:jn??Xa}),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(le,{type:"button",variant:"outline",onClick:Mn,children:"Back"}),l.jsx(le,{type:"button",variant:"ghost",onClick:Ft,children:"Finish without running"}),ba==="no_provider"&&!T?l.jsx(le,{type:"button",asChild:!0,children:l.jsx(at,{to:"/settings",children:"Configure a provider"})}):l.jsx(le,{type:"button",disabled:gs||!!Xa,title:Xa,onClick:fn(bs),children:gs?"Launching...":jn?"Retry visibility sweep":"Launch visibility sweep"})]})]})]})}default:return null}})();return l.jsxs("div",{className:T?"page-container visibility-setup":"page-container",children:[f?l.jsx(Ro,{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(le,{type:"button",variant:"outline",className:"min-h-11",onClick:Ft,children:"Skip AI Visibility"})}):null]}),f?null:l.jsx(mee,{current:T?B===4?1:0:B,labels:T?uee:cee}),l.jsxs("section",{className:"setup-wizard",children:[Yi,Ja]})]})}const Wf="canonry mcp install --client claude-code",fee="https://github.com/Canonry/canonry/blob/main/docs/mcp.md";function gee(){const e=C.useRef(T1()).current,n=C.useRef(new Set),s=C.useCallback((r,u)=>{n.current.has(r)||(n.current.add(r),I1({...u,flowVersion:ft,onboardingSessionId:e,surface:"platform",eventId:E1()}))},[e]);return C.useEffect(()=>{s("started",{event:"onboarding.started",step:"finish",resumed:!1})},[s]),C.useCallback(r=>{s(`action:${r}`,{event:"onboarding.step_completed",step:"finish",method:"manual",nextAction:r})},[s])}const ip=C.createContext(()=>{});function yee({projectName:e,skippedVisibility:n=!1}){const s=yt({...PZ({client:J,path:{name:e}}),retry:!1}),r=s.data?.hasData?s.data:null,u=gee(),h=vk(e,Oe["site-audit"]),f=vk(e,Oe["answer-visibility"]),b={...h?{site:h,fixes:h}:{},...bee(f,n)};return l.jsx(ip.Provider,{value:u,children:l.jsxs("div",{className:"page-container max-w-6xl py-8 md:py-10",children:[l.jsx(Ro,{current:"done",outcomes:b}),l.jsxs("header",{className:"relative mx-auto mt-12 max-w-2xl text-center md:mt-16",children:[l.jsx(vee,{}),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(Rd,{className:"md:col-span-4 md:row-span-2",delayMs:600,labelledBy:"onb-agent-heading",children:l.jsx(See,{projectName:e})}),l.jsx(Rd,{className:"md:col-span-2 md:row-span-2",delayMs:700,labelledBy:"onb-data-heading",children:l.jsx(Aee,{projectName:e})}),l.jsx(Rd,{className:"md:col-span-3",delayMs:800,labelledBy:"onb-schedule-heading",children:l.jsx(_ee,{projectName:e})}),l.jsx(Rd,{className:"md:col-span-3",delayMs:900,labelledBy:"onb-alerts-heading",children:l.jsx(Tee,{projectName:e,score:r?.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(le,{asChild:!0,className:"h-11 rounded-full px-6 text-base md:h-11",children:l.jsxs(at,{to:"/projects/$projectName",params:{projectName:e},replace:!0,onClick:()=>u("open_project"),children:["Open ",e,l.jsx(Tc,{className:"size-4","aria-hidden":"true"})]})}),l.jsx(le,{asChild:!0,variant:"ghost",className:"h-11 rounded-full px-5 md:h-11",children:l.jsx(at,{to:"/projects/$projectName/technical-aeo",params:{projectName:e},replace:!0,onClick:()=>u("review_page_health"),children:"Review page health"})})]})]})})}function vk(e,n){const s=yt({...wC({client:J,path:{name:e},query:{kind:n,limit:20}}),retry:!1,refetchInterval:r=>xk(r.state.status==="success"?{isSuccess:!0,data:r.state.data}:{isSuccess:!1})==="pending"?5e3:!1});return xk(s)}function bee(e,n){return e===void 0?{}:n?{visibility:"skipped"}:{visibility:e}}function xk(e){if(!e.isSuccess||!e.data)return"unknown";const n=e.data.filter(s=>s.trigger!==$a.probe);if(!n.some(s=>s.status===Nt.completed||s.status===Nt.partial))return n.some(s=>s.status===Nt.queued||s.status===Nt.running)?"pending":n.length>0?"incomplete":"skipped"}function Ta(e){return{"--onb-delay":`${e}ms`}}function vee(){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 Rd({className:e="",delayMs:n,labelledBy:s,children:r}){return l.jsx("section",{"aria-labelledby":s,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:r})}function op({id:e,eyebrow:n,title:s,children:r}){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:s}),l.jsx("p",{className:"mt-2 text-sm text-secondary",children:r})]})}const Dd=[{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."}],xee=9e3;function wee(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function See({projectName:e}){const n=C.useContext(ip),[s,r]=C.useState(0),[u,h]=C.useState(!1),[f,b]=C.useState(!1);C.useEffect(()=>{if(u||wee())return;const S=window.setTimeout(()=>r(k=>(k+1)%Dd.length),xee);return()=>window.clearTimeout(S)},[s,u]);const v=async()=>{try{await navigator.clipboard.writeText(Wf),n("copy_agent_command"),b(!0),window.setTimeout(()=>b(!1),1800)}catch{bn({tone:"negative",title:"Could not copy the command",detail:`Run ${Wf} in your terminal.`})}},x=Dd[s]??Dd[0];return l.jsxs(l.Fragment,{children:[l.jsxs(op,{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:[Dd.map((S,k)=>l.jsx("button",{type:"button",role:"tab","aria-selected":k===s,onClick:()=>{r(k),h(!0)},className:`rounded-md px-2.5 py-1 text-xs font-medium transition-colors ${k===s?"bg-surface-inset text-heading":"text-muted hover:text-secondary"}`,children:S.label},S.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((S,k)=>l.jsxs("p",{className:"onb-line mt-1 text-muted first:mt-3",style:Ta(1300+k*450),children:[l.jsx("span",{className:"text-positive",children:"●"})," ",S]},S)),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:Wf}),l.jsxs(le,{type:"button",variant:"secondary",size:"sm",className:"h-9 md:h-9",onClick:()=>{v()},children:[f?l.jsx(Uc,{className:"size-4","aria-hidden":"true"}):l.jsx(Wg,{className:"size-4","aria-hidden":"true"}),f?"Copied":"Copy"]}),l.jsx("a",{href:fee,target:"_blank",rel:"noreferrer",className:"text-sm font-medium text-link underline-offset-4 hover:underline",children:"Other clients"})]})]})}const kee=[{icon:Jg,label:"Search Console",action:"connect_search_console",to:"/projects/$projectName/search-console"},{icon:Pk,label:"Google Analytics",action:"connect_analytics",to:"/projects/$projectName/activity"},{icon:Mk,label:"Business Profile",action:"connect_business_profile",to:"/projects/$projectName/local"}],jee=["GPTBot","ClaudeBot","PerplexityBot"];function Aee({projectName:e}){const n=C.useContext(ip);return l.jsxs(l.Fragment,{children:[l.jsx(op,{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(Nee,{}),l.jsxs(at,{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(Bk,{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(Tc,{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:kee.map(({icon:s,label:r,action:u,to:h})=>l.jsx("li",{children:l.jsxs(at,{to:h,params:{projectName:e},"aria-label":`Connect ${r}`,onClick:()=>n(u),className:"group flex items-center gap-3 py-2.5 text-sm text-heading",children:[l.jsx(s,{className:"size-4 text-muted","aria-hidden":"true"}),l.jsx("span",{className:"flex-1",children:r}),l.jsx(Tc,{className:"size-3.5 text-link transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]})},r))})]})}function Nee(){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,s)=>l.jsx("path",{className:"onb-flow",style:Ta(s*400),d:`M20 ${n} C 100 ${n}, 118 70, 170 70`,fill:"none",strokeWidth:"1.5"},n))}),jee.map((n,s)=>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[s]??70)/140*100}%`,...Ta(s*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(Bk,{className:"size-5"})})]})}const Cee=["M","T","W","T","F","S","S"];function _ee({projectName:e}){return l.jsxs(l.Fragment,{children:[l.jsx(op,{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:Cee.map((n,s)=>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(s*500)}),l.jsx("span",{className:"text-xs text-muted",children:n})]},s))}),l.jsx(d4,{projectName:e,to:"/projects/$projectName/settings",icon:qk,label:"Set a schedule",action:"set_schedule"})]})}function Tee({projectName:e,score:n}){return l.jsxs(l.Fragment,{children:[l.jsx(op,{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(ng,{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(d4,{projectName:e,to:"/projects/$projectName/settings",icon:ng,label:"Add a notification",action:"add_notification"})]})}function d4({projectName:e,to:n,icon:s,label:r,action:u}){const h=C.useContext(ip);return l.jsxs(at,{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(s,{className:"size-4","aria-hidden":"true"}),r,l.jsx(Tc,{className:"size-3.5 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]})}const Eee=C.lazy(async()=>({default:(await Fs(()=>import("./SiteHealthSection-BBjucRed.js").then(n=>n.d),__vite__mapDeps([0,1,2,3,4]),import.meta.url)).SiteHealthSection})),Ree=`Public pages only, crawled from this computer and stored locally. The first scan reads up to ${M2} pages, then stops.`,Dee=1800,zee="https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent",Iee="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 Oee(e,n){return e==="legacy"?"legacy":e==="platform"?"platform":n.state==="success"?n.projectCount===0?"platform":"legacy":n.state==="error"?"retry":"loading"}const Pee="2000-01-01T00:00:00.000Z",qee=5e3;function Mee(e,n){const s=new Set,r=new Map;for(const f of n)f.trigger!==$a.probe&&(r.has(f.projectId)||r.set(f.projectId,f.id),(f.status===Nt.completed||f.status===Nt.partial)&&s.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=>!s.has(f.id));return h?{projectName:h.name,runId:r.get(h.id)}:null}const m4=[{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"}],p4=[{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 Bee(e,n){try{const s=new Intl.DisplayNames(["en"],{type:"region"}),r=new Intl.DisplayNames(["en"],{type:"language"}),u=e.length===2?s.of(e.toUpperCase()):void 0,h=n?r.of(n.toLowerCase()):void 0;return`${u??(e||"Country")} · ${h??(n||"Language")}`}catch{return`${e||"Country"} · ${n||"Language"}`}}function Lee(e,n){const s=e.trim().toUpperCase(),r=n.trim().toLowerCase();return{countryValid:m4.some(u=>u.value===s),languageValid:p4.some(u=>u.value===r)}}function Uee(e){const n=e.replace(/^\[|\]$/g,"");return/^(?:\d{1,3}\.){3}\d{1,3}$/.test(n)||n.includes(":")}function Vee(e){const n=e.trim();if(!n)return null;const s=/^[a-z][a-z\d+.-]*:\/\//i.test(n)?n:`https://${n}`;let r;try{r=new URL(s)}catch{return null}if(r.protocol!=="http:"&&r.protocol!=="https:")return null;const u=r.hostname.toLowerCase().replace(/^www\./,"");if(!u||u==="localhost"||Uee(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 $ee(e,n=Dee){let s;const r=new Promise(h=>{s=setTimeout(()=>h({state:"timed-out"}),n)}),u=await Promise.race([e.then(h=>({state:"queued",run:h})),r]);return s&&clearTimeout(s),u}function Kee(e,n){e.catch(()=>{bn({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 h4(e){const n=C.useRef(T1()).current,s=C.useRef(new Set),r=C.useCallback((u,h)=>{if(h){if(s.current.has(h))return;s.current.add(h)}I1({...u,surface:e,eventId:E1()})},[e]);return{onboardingSessionId:n,emit:r}}function wk(e,n){return e instanceof gn&&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 Fg(){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(Ti,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading projects…"]})]})}function Gee({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(le,{type:"button",className:"mt-4",variant:"secondary",onClick:e,children:"Retry project check"})]})]})}function Hee({projectName:e,initialRunId:n}){return l.jsx(H1,{title:"Site Health setup",children:l.jsx(Fee,{projectName:e,initialRunId:n})})}function Fee({projectName:e,initialRunId:n}){const s=zi(),r=yt({...Lo({client:J}),enabled:!!e,retry:!1,refetchOnMount:"always"}),{onboardingSessionId:u,emit:h}=h4("site_health"),[f]=C.useState(()=>rH(n));C.useEffect(()=>{f&&lH()},[f]),C.useEffect(()=>{e&&h({flowVersion:ft,onboardingSessionId:u,event:"onboarding.started",step:"run",resumed:!!n&&!f},"onboarding.started")},[h,f,n,u,e]),C.useEffect(()=>{!e||!n||nC(e)?.runId!==n&&tC(e,n)},[n,e]);const v=yt({...q1({client:J,path:{id:n??""}}),enabled:!!n,refetchInterval:({state:T})=>{const z=T.data?.status;return z==="completed"||z==="partial"||z==="failed"||z==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}).data?.status;if(C.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"),om(n);return}if(v!=="failed"&&v!=="cancelled")return;const T=v==="cancelled"?"run_cancelled":"run_failed";h({flowVersion:ft,onboardingSessionId:u,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:T},`onboarding.blocked:run:${T}`),om(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(le,{type:"button",variant:"secondary",onClick:()=>{s({to:"/projects"})},children:"View projects"})]});if(r.isPending)return l.jsxs("div",{className:"page-container max-w-3xl","aria-busy":"true","aria-live":"polite",children:[l.jsx(Ro,{current:"site"}),l.jsxs("div",{className:"mt-8 flex items-center gap-3 text-sm text-secondary",role:"status",children:[l.jsx(Ti,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading Site Health setup…"]})]});if(r.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(le,{type:"button",className:"mt-4",variant:"secondary",onClick:()=>{r.refetch()},children:"Retry project check"})]})]});const x=r.data.find(T=>T.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(le,{type:"button",variant:"secondary",onClick:()=>{s({to:"/projects"})},children:"View projects"})]});const S=()=>{s({to:"/setup",search:{onboarding:"site-health",setupProject:x.name},replace:!0})},k=()=>{s({to:"/setup",search:{experience:"legacy",onboarding:"site-health",setupProject:x.name},replace:!0})},N=()=>{h({flowVersion:ft,onboardingSessionId:u,event:"onboarding.step_completed",step:"run",method:"skipped"},"onboarding.step_completed:run"),s({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(C.Suspense,{fallback:l.jsxs("div",{className:"space-y-5",children:[l.jsx(Ro,{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(Ti,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading Site Health…"]})]}),children:l.jsx(Eee,{projectName:x.name,projectId:x.id,initialRunId:n,onReleaseInitialRun:S,showOnboardingActions:!0,onContinueOnboarding:k,onSkipOnboarding:N})})]})}function Qee(){const e=jk({from:"/setup"}),n=e.onboarding==="site-health"&&!e.setupProject,s=e.onboarding==="site-health"&&e.experience!=="legacy",r=OH(),u=e.experience==="legacy"?"legacy":e.experience==="platform"?"platform":r,[h,f]=C.useState(!1),[b,v]=C.useState(void 0),x=yt({...Lo({client:J}),enabled:u==="auto",retry:!1,refetchOnMount:"always"}),S=yt({...qc({client:J,query:{kind:Oe["site-audit"],since:Pee,limit:qee}}),enabled:u==="auto",retry:!1,refetchOnMount:"always"}),k=u==="auto"&&x.isSuccess&&x.isFetchedAfterMount&&x.data.length===0;C.useEffect(()=>{k&&f(!0)},[k]);const N=u!=="auto"?{state:"idle"}:x.isSuccess&&x.isFetchedAfterMount?{state:"success",projectCount:x.data.length}:x.isError?{state:"error"}:{state:"loading"},T=u==="legacy"?"legacy":h||k?"platform":Oee(u,N);if(e.onboarding==="complete"&&e.setupProject)return l.jsx(yee,{projectName:e.setupProject,skippedVisibility:e.skipped==="visibility"});if(n||s)return l.jsx(Hee,{projectName:e.setupProject,initialRunId:e.siteHealthRunId});const z=u==="auto"&&T==="legacy"&&!e.setupProject&&x.isSuccess;if(z&&b===void 0)return S.isError?v(null):S.isSuccess&&S.isFetchedAfterMount&&v(Mee(x.data,S.data)),l.jsx(Fg,{});const q=z?b:null;return q?l.jsx(Zee,{projectName:q.projectName,runId:q.runId}):T==="legacy"?l.jsx(pee,{visibilityProjectName:e.setupProject,siteHealthOnboarding:e.onboarding==="site-health",onboardingFinish:e.onboarding==="site-health"||e.onboarding==="first-run"}):T==="loading"?l.jsx(Fg,{}):T==="retry"?l.jsx(Gee,{onRetry:()=>{x.refetch()}}):l.jsx(Yee,{onActivationStarted:()=>f(!0),skipSiteScan:e.siteScan==="skip"})}function Zee({projectName:e,runId:n}){const s=zi();return C.useEffect(()=>{s({to:"/setup",search:{onboarding:"site-health",setupProject:e,...n?{siteHealthRunId:n}:{}},replace:!0})},[s,e,n]),l.jsx(Fg,{})}function Yee({onActivationStarted:e,skipSiteScan:n}){return l.jsx(H1,{title:"Site Health setup",children:l.jsx(Xee,{onActivationStarted:e,skipSiteScan:n})})}function Xee({onActivationStarted:e,skipSiteScan:n}){const s=zi(),r=Di(),u=nee(),h=yt({...LQ({client:J}),retry:!1}),f=os(UQ()),[b,v]=C.useState(""),[x,S]=C.useState(""),[k,N]=C.useState(""),[T,z]=C.useState("US"),[q,E]=C.useState("en"),[P,M]=C.useState(!1),[L,$]=C.useState("idle"),[Q,ae]=C.useState(null),[V,Z]=C.useState(null),[X,Ce]=C.useState(!1),[tt,Ke]=C.useState(null),[Ue,ke]=C.useState(!1),Le=h.isError?void 0:h.data,B=typeof Le?.enabled=="boolean"?Le.enabled:null,W=f.isPending?f.variables.body.enabled:B,[ve,Ae]=C.useState(null),ie=C.useRef(null),{onboardingSessionId:Se,emit:Me}=h4("platform");C.useEffect(()=>{Me({flowVersion:ft,onboardingSessionId:Se,event:"onboarding.started",step:"project",resumed:!1},"onboarding.started")},[Me,Se]);const xe=Vee(b),pe=x||xe?.projectName||"",ce=k||xe?.displayName||"",ue=L==="creating"||L==="dispatching",_e=V??tt,Qe=Bee(T,q),{countryValid:Ee,languageValid:Ct}=Lee(T,q),me=Ee&&Ct;C.useEffect(()=>{_e&&ie.current?.focus()},[_e]);const Be=(Ve,ct)=>s({to:"/setup",search:{...ct?{siteHealthRunId:ct}:{},onboarding:"site-health",setupProject:Ve.name},replace:!0}),Ne=async Ve=>{$("dispatching"),Ke(null);try{const ct=u.mutateAsync({projectName:Ve.name,projectId:Ve.id,projectLabel:Ve.displayName||Ve.name,suppressErrorToast:!0,body:{checkDeadLinks:!0,maxPages:M2}}),Ft=await $ee(ct);if(Ft.state==="queued"){Me({flowVersion:ft,onboardingSessionId:Se,event:"run.requested",origin:"dashboard_setup",result:"queued",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0"}),oH(Ft.run.runId),await Be(Ve,Ft.run.runId);return}ct.then(()=>{Me({flowVersion:ft,onboardingSessionId:Se,event:"run.requested",origin:"dashboard_setup",result:"queued",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0"})},Qt=>{Me({flowVersion:ft,onboardingSessionId:Se,event:"run.requested",origin:"dashboard_setup",result:"rejected",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0",reasonCode:Ac(Qt,"run_rejected")})}),Kee(ct,Ve.id),await Be(Ve)}catch(ct){$("recovery"),Ke(wk(ct,"The project was created, but the Site Health scan could not be started."));const Ft=Ac(ct,"run_rejected");Me({flowVersion:ft,onboardingSessionId:Se,event:"run.requested",origin:"dashboard_setup",result:"rejected",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0",reasonCode:Ft}),Me({flowVersion:ft,onboardingSessionId:Se,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:Ft},`onboarding.blocked:run:${Ft}`)}},re=async Ve=>{if(Ve.preventDefault(),!(!xe||!n&&!P||!me||ue)){$("creating"),Z(null),Ce(!1),Ke(null);try{const ct=await tF({name:pe,displayName:ce,canonicalDomain:xe.canonicalDomain,country:T,language:q});if(e(),ae(ct),Me({flowVersion:ft,onboardingSessionId:Se,event:"onboarding.step_completed",step:"project",method:"manual"},"onboarding.step_completed:project"),await r.invalidateQueries({queryKey:Kr({client:J})}),n){await s({to:"/setup",search:{experience:"legacy",onboarding:"first-run",setupProject:ct.name},replace:!0});return}await Ne(ct)}catch(ct){$("idle");const Ft=ct instanceof gn&&ct.statusCode===409;Ce(Ft),Z(wk(ct,"Could not create the project. Try again.")),Me({flowVersion:ft,onboardingSessionId:Se,event:"onboarding.blocked",step:"project",action:"save",reasonCode:Ac(ct,"project_create_failed")},"onboarding.blocked:project"),Ft&&(e(),r.invalidateQueries({queryKey:Kr({client:J})}))}}},Ze=()=>{Q&&!ue&&Ne(Q)},bt=()=>{ue||s({to:"/projects"})},qn=async()=>{try{await navigator.clipboard.writeText(Iee),ke(!0)}catch{bn({tone:"negative",title:"Could not copy setup request",detail:"Open the agent quickstart to continue with the CLI instead."})}},Ht=async Ve=>{Ae(null);try{const ct=await f.mutateAsync({client:J,body:{enabled:Ve}});r.setQueryData(kC({client:J}),ct),ct.enabled!==Ve&&Ae(`The server kept telemetry ${ct.enabled?"on":"off"}. Check its telemetry settings.`)}catch{Ae("Could not update telemetry. Try again.")}};return Q&&L==="recovery"?l.jsxs("div",{className:"page-container max-w-3xl",children:[l.jsx(Ro,{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:[Q.displayName||Q.name," is ready. The Site Health scan needs another try."]})]})}),l.jsxs("div",{ref:ie,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:tt}),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(le,{type:"button",onClick:Ze,children:"Retry Site Health scan"}),l.jsx(le,{type:"button",variant:"secondary",onClick:()=>{Be(Q)},children:"Continue setup"})]})]})]}):l.jsxs("div",{className:"page-container max-w-xl py-8 md:py-12",children:[n?null:l.jsx(Ro,{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(re),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&&!xe),"aria-describedby":b&&!xe?"launchpad-domain-hint launchpad-domain-error":"launchpad-domain-hint",placeholder:"https://example.com",value:b,onChange:Ve=>{v(Ve.target.value),Z(null),Ce(!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(at,{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(at,{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&&!xe?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:[Qe,l.jsx(Lc,{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:[xe?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:pe,onChange:Ve=>S(Ve.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:Ve=>N(Ve.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:T,onChange:Ve=>z(Ve.target.value),children:m4.map(Ve=>l.jsx("option",{value:Ve.value,children:Ve.label},Ve.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:Ve=>E(Ve.target.value),children:p4.map(Ve=>l.jsx("option",{value:Ve.value,children:Ve.label},Ve.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:P,onChange:Ve=>M(Ve.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(ua,{text:Ree})]})]}),_e?l.jsxs("div",{ref:ie,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:_e}),X?l.jsx(le,{type:"button",variant:"secondary",size:"sm",className:"mt-3",onClick:bt,children:"View projects"}):null]}):null,l.jsxs("div",{className:"grid gap-2",children:[l.jsx(le,{className:"h-11 w-full",type:"submit",disabled:!xe||!n&&!P||!me||ue,children:L==="creating"||L==="dispatching"?l.jsxs(l.Fragment,{children:[l.jsx(Ti,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"})," ",n?"Creating project…":"Mapping site…"]}):n?"Create project":"Scan site"}),L==="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(le,{type:"button",variant:"ghost",size:"sm",className:"-ml-3",onClick:fn(qn),children:[Ue?l.jsx(Uc,{className:"size-3.5","aria-hidden":"true"}):l.jsx(Wg,{className:"size-3.5","aria-hidden":"true"}),l.jsx("span",{"aria-live":"polite",children:Ue?"Copied setup request":"Copy setup request"})]}),l.jsx(le,{asChild:!0,variant:"ghost",size:"sm",children:l.jsxs("a",{href:zee,target:"_blank",rel:"noopener noreferrer",children:["Agent quickstart",l.jsx(F_,{className:"size-3.5","aria-hidden":"true"}),l.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]})})]})]}),B!==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:W??!1,disabled:f.isPending,onChange:Ve=>{Ht(Ve.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,ve?l.jsx("p",{className:"mt-1 text-sm text-negative",role:"alert",children:ve}):null]}):null]})}function Jee(){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(le,{asChild:!0,children:l.jsx(at,{to:"/",children:"Return to overview"})})]})})})}const Ia=Ii(()=>Fs(()=>import("./ProjectPage--ZlpQduH.js"),__vite__mapDeps([5,1,0,2,3,4,6,7,8,9,10,11,12]),import.meta.url),"ProjectPage"),Wee=Ii(()=>Fs(()=>import("./RunsPage-DKB2CHTM.js"),__vite__mapDeps([13,1,11,4,2,7,12]),import.meta.url),"RunsPage"),ete=Ii(()=>Fs(()=>import("./HistoryPage-DahtHlpM.js"),__vite__mapDeps([14,1,10,11,4,2,7,12]),import.meta.url),"HistoryPage"),tte=Ii(()=>Fs(()=>import("./SettingsPage-lnmMZzEj.js"),__vite__mapDeps([15,1,11,4,2,7,12]),import.meta.url),"SettingsPage"),nte=Ii(()=>Fs(()=>import("./BacklinksPage-DNbur8am.js"),__vite__mapDeps([16,1,9,2,11,4,7,12]),import.meta.url),"BacklinksPage"),ate=Ii(()=>Fs(()=>import("./TrafficPage-DNyTmPLd.js"),__vite__mapDeps([17,1,8,2,11,4,7,12]),import.meta.url),"TrafficPage"),ste=Ii(()=>Fs(()=>import("./TrafficSourceDetailPage-D1zKZHSh.js"),__vite__mapDeps([18,1,8,3,4,2,11,7,12]),import.meta.url),"TrafficSourceDetailPage"),ite=Ii(()=>Fs(()=>import("./MeasurementPropertyPage-BoNDtLfp.js"),__vite__mapDeps([19,1,3,4,6,7,2,11,12]),import.meta.url),"MeasurementPropertyPage");function ote(){return l.jsx(uW,{children:l.jsx(FF,{children:l.jsx(cW,{})})})}const Un=A_()({component:ote,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]))})}),rte=Bt({getParentRoute:()=>Un,path:"/",component:GW,beforeLoad:async({context:e})=>{let n=e.queryClient.getQueryData(Kr({client:J}));if(n===void 0)try{n=await e.queryClient.ensureQueryData(Lo({client:J}))}catch{return}if(n.length===0)throw Qg({to:"/setup"})}}),lte=Bt({getParentRoute:()=>Un,path:"/projects",component:ZW}),cte=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Vn=Bt({getParentRoute:()=>Un,path:"/projects/$projectName",component:()=>l.jsx(eg,{}),beforeLoad:async({context:e,params:n,location:s})=>{const r=n.projectName;if(!cte.test(r))return;let u=e.queryClient.getQueryData(Kr({client:J}));if(!u)try{u=await e.queryClient.ensureQueryData(Lo({client:J}))}catch{return}const h=u.find(f=>f.id===r);if(h)throw Qg({to:s.pathname.replace(`/projects/${r}`,`/projects/${encodeURIComponent(h.name)}`),replace:!0})}}),ute=Bt({getParentRoute:()=>Vn,path:"/",component:()=>l.jsx(Ia,{tab:"overview"})}),dte=Bt({getParentRoute:()=>Vn,path:"/portfolio",component:()=>l.jsx(Ia,{tab:"portfolio"})}),mte=Bt({getParentRoute:()=>Vn,path:"/search-console",component:()=>l.jsx(Ia,{tab:"search-console"})}),pte=Bt({getParentRoute:()=>Vn,path:"/conversions",component:()=>l.jsx(Ia,{tab:"conversions"})}),hte=Bt({getParentRoute:()=>Vn,path:"/local",component:()=>l.jsx(Ia,{tab:"local"})}),fte=Bt({getParentRoute:()=>Vn,path:"/discovery",component:()=>l.jsx(Ia,{tab:"discovery"})}),gte=Bt({getParentRoute:()=>Vn,path:"/queries",component:()=>l.jsx(Ia,{tab:"queries"})}),yte=Bt({getParentRoute:()=>Vn,path:"/properties/$targetKey",component:()=>l.jsx(ite,{})}),bte=Bt({getParentRoute:()=>Vn,path:"/report",beforeLoad:({params:e})=>{throw Qg({to:"/projects/$projectName",params:e,replace:!0})}}),vte=Bt({getParentRoute:()=>Vn,path:"/activity",component:()=>l.jsx(Ia,{tab:"activity"})}),xte=Bt({getParentRoute:()=>Vn,path:"/backlinks",component:()=>l.jsx(Ia,{tab:"backlinks"})}),wte=Bt({getParentRoute:()=>Vn,path:"/technical-aeo",component:()=>l.jsx(Ia,{tab:"technical-aeo"})}),Ste=Bt({getParentRoute:()=>Vn,path:"/history",component:()=>l.jsx(Ia,{tab:"history"})}),kte=Bt({getParentRoute:()=>Vn,path:"/settings",component:()=>l.jsx(Ia,{tab:"settings"})}),jte=Bt({getParentRoute:()=>Un,path:"/runs",component:Wee}),Ate=Bt({getParentRoute:()=>Un,path:"/history",component:ete}),Nte=Bt({getParentRoute:()=>Un,path:"/settings",component:tte,beforeLoad:({context:e})=>{}}),Cte=Bt({getParentRoute:()=>Un,path:"/setup",component:Qee}),_te=Bt({getParentRoute:()=>Un,path:"/backlinks",component:nte}),Tte=Bt({getParentRoute:()=>Un,path:"/traffic",component:ate}),Ete=Bt({getParentRoute:()=>Un,path:"/traffic/$projectName/$sourceId",component:ste}),Rte=Bt({getParentRoute:()=>Un,path:"*",component:Jee}),Dte=Un.addChildren([rte,lte,Vn.addChildren([ute,dte,mte,pte,hte,fte,gte,yte,bte,vte,xte,wte,Ste,kte]),jte,Ate,Nte,Cte,_te,Tte,Ete,Rte]);function zte(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath:"/"}const Sk=zte(),Ite=Sk==="/"?"":Sk.replace(/\/$/,"");function Ote(e,n){return N_({routeTree:Dte,basepath:Ite||"/",context:{queryClient:e},...n?.initialEntries})}let kk=!1;async function Pte(e){return(await DT({client:J,body:e,keepalive:!0})).data}function qte(){kk||typeof window>"u"||(kk=!0,!(Fm()||jo())&&(fH({send:Pte}),J.interceptors.request.use((e,n)=>{const s=n.fetch??globalThis.fetch,r=typeof n.url=="string"?n.url:void 0;return n.fetch=async(u,h)=>{try{return await s(u,h)}catch(f){throw f instanceof DOMException&&f.name==="AbortError"||cm({method:e.method,route:r,network:!0}),f}},e}),J.interceptors.response.use((e,n,s)=>(cm({method:n.method,route:typeof s.url=="string"?s.url:void 0,path:Bte(n.url),status:e.status}),e)),window.addEventListener("error",e=>{lm({kind:"unhandled",error:e.error})}),window.addEventListener("unhandledrejection",e=>{lm({kind:"unhandled",error:e.reason})}),Kte()))}function Mte(e){let n=null;const s=()=>{const r=e.state.matches.at(-1);if(!r)return;gH(r.fullPath);const u=e.state.location;if(!u)return;const h=u.search&&typeof u.search=="object"?u.search:{};n&&n.pathname===u.pathname&&wH(n.search,h),n={pathname:u.pathname,search:h}};return s(),e.subscribe("onResolved",s)}function Bte(e){try{return new URL(e,window.location.origin).pathname}catch{return}}const Lte={LCP:[2500,4e3],INP:[200,500],CLS:[.1,.25],FCP:[1800,3e3],TTFB:[800,1800]};function Ute(e,n){const[s,r]=Lte[e];return n<=s?"good":n<=r?"needs-improvement":"poor"}function Vte(){let e=0,n=0,s=-1/0,r=-1/0;return{add(u){u.hadRecentInput||(u.startTime-r<1e3&&u.startTime-s<5e3?n+=u.value:(n=u.value,s=u.startTime),r=u.startTime,e=Math.max(e,n))},value:()=>e}}function $te(){let e=0;return{add(n){n.interactionId&&(e=Math.max(e,n.duration))},value:()=>e}}function Kte(){if(typeof PerformanceObserver>"u")return;const e=new Set,n=(b,v)=>{e.has(b)||!Number.isFinite(v)||(e.add(b),kH(b,Ute(b,v)))},s=(b,v,x={})=>{try{new PerformanceObserver(S=>v(S.getEntries())).observe({type:b,buffered:!0,...x})}catch{}};try{const b=performance.getEntriesByType("navigation")[0];b&&b.responseStart>0&&n("TTFB",b.responseStart)}catch{}s("paint",b=>{const v=b.find(x=>x.name==="first-contentful-paint");v&&n("FCP",v.startTime)});let r=0;s("largest-contentful-paint",b=>{const v=b.at(-1);v&&(r=v.startTime)});const u=Vte();s("layout-shift",b=>{for(const v of b)u.add({startTime:v.startTime,value:v.value??0,hadRecentInput:v.hadRecentInput===!0})});const h=$te();s("event",b=>{for(const v of b)h.add(v)},{durationThreshold:40});const f=()=>{r>0&&n("LCP",r),n("CLS",u.value()),h.value()>0&&n("INP",h.value())};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&f()}),window.addEventListener("pagehide",f)}const Gte=6e4,Hte="Anyone with this password can sign in to this dashboard.",Tr={label:"Root API key",help:"To create the password from here, enter the root API key (apiKey in config.yaml). It is used once and not saved.",missing:"Enter the root API key.",rejected:"That is not the root API key for this install.",show:"Show passwords and key"};function Fte(){const e=C.useRef(JH()).current,[n,s]=C.useState(e?"ready":"checking"),[r,u]=C.useState(null),[h,f]=C.useState(null),[b,v]=C.useState(e),[x,S]=C.useState(!1),[k,N]=C.useState(""),[T,z]=C.useState(""),[q,E]=C.useState(""),[P,M]=C.useState(!1),[L,$]=C.useState("password"),[Q,ae]=C.useState(!1),[V,Z]=C.useState(""),[X,Ce]=C.useState(null),[tt,Ke]=C.useState(!1),[Ue,ke]=C.useState(!1),Le=C.useRef(null),B=C.useRef(null),W=C.useRef(null),ve=()=>{const me=r?`${r.name}:${r.role}`:e?"api-key:explicit":h?`api-key:${h.id}`:"no-accounts";if(!Le.current||W.current!==me){B.current?.clear();const Be=KF();B.current=Be,Le.current=Ote(Be),Mte(Le.current),W.current=me}return{queryClient:B.current,router:Le.current}},Ae=me=>me.authRequired?(S(!0),u(me.user),f(null),v(!1),s(me.user?"ready":"account-login"),!0):!1;C.useEffect(()=>{let me=!1;const Be=async(Ne,re=!1)=>{try{const Ze=await Kf();if(me)return;f(Ze),v(!1),s("ready")}catch(Ze){if(me)return;if(re&&Ze instanceof gn&&Ze.statusCode===401)return cF().then(()=>{me||(Ce(null),f(null),v(!1),ke(!0),s("login"))}).catch(bt=>{me||(Ce(bt instanceof Error?bt.message:"Could not clear the invalid session"),s(Ne))});Ce(Ze instanceof Error?Ze.message:"Could not verify API key access"),s(Ne)}};return e?(Be("api-key-error"),()=>{me=!0}):(Promise.allSettled([kS(),SS()]).then(([Ne,re])=>{if(me||Ne.status==="fulfilled"&&Ae(Ne.value))return;if(re.status==="rejected"){const bt=re.reason;Ce(bt instanceof Error?bt.message:"Failed to reach the Canonry API"),s("login");return}const Ze=re.value;Ze.authenticated?(v(!0),Be("api-key-error",!0)):(f(null),v(!1),s(Ze.setupRequired?"setup":"login"))}),()=>{me=!0})},[]),C.useEffect(()=>{if(n!=="ready"||e)return;const me=setInterval(()=>{if(x){kS().then(Be=>{Be.authRequired&&!Be.user&&(ke(!0),u(null),f(null),s("account-login"))}).catch(()=>{});return}SS().then(Be=>{Be.authenticated||(ke(!0),f(null),s(Be.setupRequired?"setup":"login"))}).catch(()=>{})},Gte);return wS(()=>{ke(!0),u(null),f(null),v(!1),s(x?"account-login":"login")}),()=>{clearInterval(me),wS(null)}},[n,x,e]);const ie=async me=>{if(me.preventDefault(),!T.trim()||T.trim().length<8){Ce("Password must be at least 8 characters");return}if(T!==q){Ce("Passwords do not match");return}const Be=V.trim();if(Q&&!Be){Ce(Tr.missing);return}Ke(!0),Ce(null);try{if(!(await oF(T.trim(),Q?Be:void 0)).authenticated){Ce("Setup failed");return}z(""),E(""),Z(""),ae(!1),M(!1),ke(!1),f(null),v(!0),s("checking");try{const re=await Kf();f(re),v(!1),s("ready")}catch(re){Ce(re instanceof Error?re.message:"Could not verify API key access"),s("api-key-error")}}catch(Ne){if(Ne instanceof gn&&Ne.statusCode===401&&Ne.code==="AUTH_REQUIRED"){Ce(Q?Tr.rejected:null),ae(!0);return}Ce(Ne instanceof gn||Ne instanceof Error?Ne.message:"Setup failed")}finally{Ke(!1)}},Se=me=>{z(me),Ce(null)},Me=me=>{Z(me),Ce(null)},xe=me=>{E(me),Ce(null)},pe=async me=>{if(me.preventDefault(),!!T.trim()){Ke(!0),Ce(null);try{if(!(L==="api-key"?await lF(T.trim()):await rF(T.trim())).authenticated){Ce(L==="api-key"?"Invalid API key":"Incorrect password");return}const Ne=await Kf();f(Ne),v(!1),z(""),M(!1),ke(!1),s("ready")}catch(Be){Ce(Be instanceof gn||Be instanceof Error?Be.message:"Authentication failed")}finally{Ke(!1)}}},ce=me=>{$(me),z(""),M(!1),Ce(null)},ue=async me=>{if(me.preventDefault(),!(!k.trim()||!T)){Ke(!0),Ce(null);try{const Be=await uF(k.trim(),T);if(!Be.user){Ce("Incorrect name or password.");return}z(""),ke(!1),u(Be.user),f(null),v(!1),s("ready")}catch(Be){Ce(Be instanceof gn?Be.message:"Incorrect name or password.")}finally{Ke(!1)}}};if(n==="ready"){const{queryClient:me,router:Be}=ve();return l.jsx(DF,{account:r,apiKey:h,apiKeyPending:b,children:l.jsx(C_,{client:me,children:l.jsx(__,{router:Be})})})}const _e=T.trim(),Qe=T.length>0&&_e.length<8,Ee=q.length>0&&T!==q,Ct=_e.length>=8&&T===q&&(!Q||V.trim().length>0);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(vo,{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(Ir,{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(vo,{className:"space-y-4",children:[l.jsx("p",{className:"supporting-copy",children:X??"Canonry could not verify this session’s access, so the dashboard stayed locked."}),l.jsx(le,{type:"button",className:"w-full",onClick:()=>{window.location.reload()},children:"Try again"})]})]}):n==="account-login"?l.jsxs(l.Fragment,{children:[l.jsxs(Ir,{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(vo,{children:[Ue?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(ue),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:k,onChange:me=>{N(me.target.value),Ce(null)},"aria-invalid":!!X,"aria-describedby":X?"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:T,onChange:me=>Se(me.target.value),"aria-invalid":!!X,"aria-describedby":X?"account-login-error":void 0})]}),X?l.jsx("p",{id:"account-login-error",role:"alert",className:"text-sm text-negative-400",children:X}):null,l.jsx(le,{type:"submit",disabled:tt||!k.trim()||!T,children:tt?"Signing in…":"Sign in"})]})]})]}):n==="setup"?l.jsxs(l.Fragment,{children:[l.jsxs(Ir,{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(fm,{children:Hte})]}),l.jsx(vo,{children:l.jsxs("form",{className:"space-y-4",onSubmit:fn(ie),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:P?"text":"password",name:"new-password",autoComplete:"new-password",minLength:8,required:!0,value:T,onChange:me=>Se(me.target.value),"aria-invalid":Qe,"aria-describedby":"dashboard-password-new-help"}),l.jsx("span",{id:"dashboard-password-new-help","aria-live":"polite",className:Qe?"block text-sm text-negative-400":"block text-sm text-secondary",children:Qe?"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:P?"text":"password",name:"confirm-password",autoComplete:"new-password",minLength:8,required:!0,value:q,onChange:me=>xe(me.target.value),"aria-invalid":Ee,"aria-describedby":"dashboard-password-confirm-help"}),l.jsx("span",{id:"dashboard-password-confirm-help","aria-live":"polite",className:Ee?"block text-sm text-negative-400":"block text-sm text-secondary",children:Ee?"Passwords do not match.":"Enter the same password again."})]}),Q?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("label",{className:"block text-xs font-medium text-secondary",htmlFor:"dashboard-setup-root-key",children:Tr.label}),l.jsx("input",{autoFocus:!0,id:"dashboard-setup-root-key",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:P?"text":"password",name:"apiKey",autoComplete:"off",spellCheck:!1,required:!0,value:V,onChange:me=>Me(me.target.value),"aria-invalid":X===Tr.rejected,"aria-describedby":"dashboard-setup-root-key-help"}),l.jsx("span",{id:"dashboard-setup-root-key-help","aria-live":"polite",className:"block text-sm text-secondary",children:Tr.help})]}):null,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:P,onChange:me=>M(me.target.checked)}),Q?Tr.show:"Show passwords"]}),X?l.jsx("p",{id:"dashboard-password-setup-error",role:"alert",className:"text-sm text-negative-400",children:X}):null,l.jsx(le,{type:"submit",disabled:tt||!Ct,children:tt?"Creating password…":"Create password and continue"})]})})]}):l.jsxs(l.Fragment,{children:[l.jsxs(Ir,{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(fm,{children:L==="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(vo,{children:[Ue?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(pe),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:L==="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:P?"text":"password",name:L==="api-key"?"apiKey":"password",autoComplete:L==="api-key"?"off":"current-password",spellCheck:!1,required:!0,value:T,onChange:me=>Se(me.target.value),"aria-invalid":!!X,"aria-describedby":X?"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:P,onChange:me=>M(me.target.checked)}),L==="api-key"?"Show API key":"Show password"]}),X?l.jsx("p",{id:"dashboard-password-login-error",role:"alert",className:"text-sm text-negative-400",children:X}):null,l.jsx(le,{type:"submit",disabled:tt||!T.trim(),children:tt?"Signing in…":"Open dashboard"}),l.jsx(le,{type:"button",variant:"ghost",onClick:()=>ce(L==="api-key"?"password":"api-key"),children:L==="api-key"?"Use dashboard password instead":"Forgot password? Use API key"})]})]})]})})]})})}const f4=document.getElementById("root");if(!f4)throw new Error("Expected #root element for web app bootstrap.");qte();t6.createRoot(f4).render(l.jsx(C.StrictMode,{children:l.jsx(Fte,{})}));export{cX as $,jo as A,le as B,Sc as C,On as D,fn as E,$ie as F,Hie as G,Gie as H,ua as I,Kae as J,Hae as K,Gne as L,foe as M,Vie as N,Hne as O,Bne as P,Kne as Q,Ga as R,hk as S,wn as T,Qne as U,Gae as V,Fne as W,fa as X,ZF as Y,Roe as Z,Doe as _,hoe as a,Une as a$,nQ as a0,Lne as a1,fse as a2,xse as a3,gae as a4,pse as a5,vie as a6,Sie as a7,wie as a8,Aae as a9,Tie as aA,Kg as aB,H9 as aC,F9 as aD,Sne as aE,wne as aF,tse as aG,rse as aH,lse as aI,gn as aJ,cse as aK,rae as aL,YF as aM,lY as aN,_g as aO,use as aP,Bd as aQ,Qie as aR,Lg as aS,bo as aT,WF as aU,Nt as aV,UF as aW,zse as aX,uJ as aY,_ae as aZ,$ne as a_,jae as aa,Oae as ab,bn as ac,Aie as ad,Nie as ae,Eae as af,Cie as ag,Rae as ah,Cae as ai,Tae as aj,kie as ak,jie as al,xie as am,Nae as an,_ie as ao,Oie as ap,Rie as aq,zie as ar,Die as as,Iie as at,Jae as au,M1 as av,Oe as aw,Eie as ax,CC as ay,Gs as az,vse as b,$ae as b$,qs as b0,Noe as b1,qne as b2,sae as b3,Uq as b4,tae as b5,Pne as b6,bse as b7,One as b8,mQ as b9,Yse as bA,Jse as bB,oie as bC,gie as bD,fie as bE,sie as bF,pie as bG,bie as bH,eie as bI,lie as bJ,cie as bK,uie as bL,Wse as bM,rie as bN,tie as bO,die as bP,nie as bQ,mie as bR,iie as bS,hie as bT,yie as bU,XW as bV,aie as bW,nae as bX,hae as bY,pae as bZ,mae as b_,PQ as ba,Bse as bb,Kse as bc,Lse as bd,Xne as be,Wne as bf,X$ as bg,eae as bh,jQ as bi,Mse as bj,W$ as bk,Ng as bl,Jne as bm,$H as bn,Use as bo,qse as bp,NQ as bq,Vse as br,dse as bs,$se as bt,Wie as bu,eoe as bv,Dae as bw,SC as bx,Fie as by,wC as bz,xne as c,koe as c$,VH as c0,q2 as c1,zm as c2,M2 as c3,_i as c4,Fse as c5,kne as c6,BQ as c7,Xse as c8,kse as c9,lee as cA,zoe as cB,xoe as cC,rJ as cD,voe as cE,tee as cF,Gse as cG,Cse as cH,boe as cI,Dse as cJ,_se as cK,xO as cL,mq as cM,Hse as cN,yoe as cO,Ese as cP,doe as cQ,gJ as cR,eF as cS,iQ as cT,yJ as cU,cae as cV,uae as cW,lae as cX,aF as cY,woe as cZ,Soe as c_,Vne as ca,ES as cb,bae as cc,vae as cd,wse as ce,Sse as cf,xae as cg,wae as ch,kae as ci,Sae as cj,iu as ck,Lo as cl,lC as cm,Nse as cn,Ase as co,QX as cp,Pg as cq,mm as cr,qg as cs,pm as ct,hm as cu,cJ as cv,gQ as cw,xo as cx,gm as cy,$Q as cz,tQ as d,R9 as d$,Aoe as d0,dae as d1,dQ as d2,fae as d3,sX as d4,Pie as d5,hF as d6,Lae as d7,Mie as d8,Bie as d9,Gr as dA,DS as dB,Wae as dC,nse as dD,sse as dE,ise as dF,ese as dG,ase as dH,ose as dI,Uf as dJ,Xae as dK,Xie as dL,FW as dM,Yne as dN,y1 as dO,jse as dP,Zie as dQ,Jie as dR,Yae as dS,Zne as dT,Qae as dU,Zae as dV,Fae as dW,Yie as dX,Ine as dY,E9 as dZ,Ra as d_,Lie as da,qie as db,gse as dc,Pae as dd,qae as de,Mae as df,Uae as dg,Bae as dh,U1 as di,qc as dj,Eoe as dk,su as dl,Qse as dm,Zse as dn,FH as dp,iae as dq,oae as dr,yae as ds,zae as dt,Iae as du,H1 as dv,Jm as dw,V1 as dx,ree as dy,Vae as dz,eQ as e,Rne as e$,eq as e0,Tse as e1,hse as e2,VO as e3,Ise as e4,Rse as e5,Pse as e6,Ose as e7,$S as e8,ye as e9,Fs as eA,za as eB,Nne as eC,lm as eD,aae as eE,PZ as eF,noe as eG,toe as eH,nee as eI,ioe as eJ,pJ as eK,jne as eL,moe as eM,poe as eN,aoe as eO,soe as eP,Ane as eQ,roe as eR,uoe as eS,ooe as eT,coe as eU,Ro as eV,zne as eW,Tne as eX,loe as eY,_ne as eZ,EP as e_,vne as ea,bne as eb,yne as ec,gne as ed,pne as ee,mne as ef,fne as eg,hne as eh,dne as ei,une as ej,ane as ek,sne as el,cne as em,lne as en,rne as eo,ine as ep,one as eq,nne as er,tne as es,ene as et,C6 as eu,N6 as ev,Dne as ew,Rw as ex,Cne as ey,Kj as ez,nm as f,Ene as f0,Coe as g,joe as h,_oe as i,Toe as j,Mg as k,$c as l,goe as m,u$ as n,uX as o,vH as p,mse as q,Uie as r,yse as s,JF as t,$1 as u,Kie as v,_a as w,Mne as x,J as y,Fm as z};