@event4u/agent-config 4.7.1 → 4.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))r(t);new MutationObserver(t=>{for(const l of t)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function i(t){const l={};return t.integrity&&(l.integrity=t.integrity),t.referrerPolicy&&(l.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?l.credentials="include":t.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(t){if(t.ep)return;t.ep=!0;const l=i(t);fetch(t.href,l)}})();var Sn,k,mr,gr,Y,Ii,yr,br,Rn,Ke,xe,wr,ui,zn,Yn,Qe={},Ze=[],ll=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Cn=Array.isArray;function H(e,n){for(var i in n)e[i]=n[i];return e}function di(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function al(e,n,i){var r,t,l,a={};for(l in n)l=="key"?r=n[l]:l=="ref"?t=n[l]:a[l]=n[l];if(arguments.length>2&&(a.children=arguments.length>3?Sn.call(arguments,2):i),typeof e=="function"&&e.defaultProps!=null)for(l in e.defaultProps)a[l]===void 0&&(a[l]=e.defaultProps[l]);return qe(e,a,r,t,null)}function qe(e,n,i,r,t){var l={type:e,props:n,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:t??++mr,__i:-1,__u:0};return t==null&&k.vnode!=null&&k.vnode(l),l}function J(e){return e.children}function Ae(e,n){this.props=e,this.context=n}function _e(e,n){if(n==null)return e.__?_e(e.__,e.__i+1):null;for(var i;n<e.__k.length;n++)if((i=e.__k[n])!=null&&i.__e!=null)return i.__e;return typeof e.type=="function"?_e(e):null}function ol(e){if(e.__P&&e.__d){var n=e.__v,i=n.__e,r=[],t=[],l=H({},n);l.__v=n.__v+1,k.vnode&&k.vnode(l),fi(e.__P,l,n,e.__n,e.__P.namespaceURI,32&n.__u?[i]:null,r,i??_e(n),!!(32&n.__u),t),l.__v=n.__v,l.__.__k[l.__i]=l,Sr(r,l,t),n.__e=n.__=null,l.__e!=i&&kr(l)}}function kr(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),kr(e)}function Li(e){(!e.__d&&(e.__d=!0)&&Y.push(e)&&!Xe.__r++||Ii!=k.debounceRendering)&&((Ii=k.debounceRendering)||yr)(Xe)}function Xe(){try{for(var e,n=1;Y.length;)Y.length>n&&Y.sort(br),e=Y.shift(),n=Y.length,ol(e)}finally{Y.length=Xe.__r=0}}function xr(e,n,i,r,t,l,a,c,u,d,f){var s,h,p,v,g,b,w,m=r&&r.__k||Ze,D=n.length;for(u=cl(i,n,m,u,D),s=0;s<D;s++)(p=i.__k[s])!=null&&(h=p.__i!=-1&&m[p.__i]||Qe,p.__i=s,b=fi(e,p,h,t,l,a,c,u,d,f),v=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&pi(h.ref,null,p),f.push(p.ref,p.__c||v,p)),g==null&&v!=null&&(g=v),(w=!!(4&p.__u))||h.__k===p.__k?(u=Ar(p,u,e,w),w&&h.__e&&(h.__e=null)):typeof p.type=="function"&&b!==void 0?u=b:v&&(u=v.nextSibling),p.__u&=-7);return i.__e=g,u}function cl(e,n,i,r,t){var l,a,c,u,d,f=i.length,s=f,h=0;for(e.__k=new Array(t),l=0;l<t;l++)(a=n[l])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=e.__k[l]=qe(null,a,null,null,null):Cn(a)?a=e.__k[l]=qe(J,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=e.__k[l]=qe(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[l]=a,u=l+h,a.__=e,a.__b=e.__b+1,c=null,(d=a.__i=sl(a,i,u,s))!=-1&&(s--,(c=i[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(t>f?h--:t<f&&h++),typeof a.type!="function"&&(a.__u|=4)):d!=u&&(d==u-1?h--:d==u+1?h++:(d>u?h--:h++,a.__u|=4))):e.__k[l]=null;if(s)for(l=0;l<f;l++)(c=i[l])!=null&&!(2&c.__u)&&(c.__e==r&&(r=_e(c)),Tr(c,c));return r}function Ar(e,n,i,r){var t,l;if(typeof e.type=="function"){for(t=e.__k,l=0;t&&l<t.length;l++)t[l]&&(t[l].__=e,n=Ar(t[l],n,i,r));return n}e.__e!=n&&(r&&(n&&e.type&&!n.parentNode&&(n=_e(e)),i.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function sl(e,n,i,r){var t,l,a,c=e.key,u=e.type,d=n[i],f=d!=null&&(2&d.__u)==0;if(d===null&&c==null||f&&c==d.key&&u==d.type)return i;if(r>(f?1:0)){for(t=i-1,l=i+1;t>=0||l<n.length;)if((d=n[a=t>=0?t--:l++])!=null&&!(2&d.__u)&&c==d.key&&u==d.type)return a}return-1}function Fi(e,n,i){n[0]=="-"?e.setProperty(n,i??""):e[n]=i==null?"":typeof i!="number"||ll.test(n)?i:i+"px"}function Ue(e,n,i,r,t){var l,a;e:if(n=="style")if(typeof i=="string")e.style.cssText=i;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(n in r)i&&n in i||Fi(e.style,n,"");if(i)for(n in i)r&&i[n]==r[n]||Fi(e.style,n,i[n])}else if(n[0]=="o"&&n[1]=="n")l=n!=(n=n.replace(wr,"$1")),a=n.toLowerCase(),n=a in e||n=="onFocusOut"||n=="onFocusIn"?a.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+l]=i,i?r?i[xe]=r[xe]:(i[xe]=ui,e.addEventListener(n,l?Yn:zn,l)):e.removeEventListener(n,l?Yn:zn,l);else{if(t=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=i??"";break e}catch{}typeof i=="function"||(i==null||i===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&i==1?"":i))}}function Ri(e){return function(n){if(this.l){var i=this.l[n.type+e];if(n[Ke]==null)n[Ke]=ui++;else if(n[Ke]<i[xe])return;return i(k.event?k.event(n):n)}}}function fi(e,n,i,r,t,l,a,c,u,d){var f,s,h,p,v,g,b,w,m,D,Q,be,Ni,Be,Fn,j=n.type;if(n.constructor!==void 0)return null;128&i.__u&&(u=!!(32&i.__u),l=[c=n.__e=i.__e]),(f=k.__b)&&f(n);e:if(typeof j=="function")try{if(w=n.props,m=j.prototype&&j.prototype.render,D=(f=j.contextType)&&r[f.__c],Q=f?D?D.props.value:f.__:r,i.__c?b=(s=n.__c=i.__c).__=s.__E:(m?n.__c=s=new j(w,Q):(n.__c=s=new Ae(w,Q),s.constructor=j,s.render=dl),D&&D.sub(s),s.state||(s.state={}),s.__n=r,h=s.__d=!0,s.__h=[],s._sb=[]),m&&s.__s==null&&(s.__s=s.state),m&&j.getDerivedStateFromProps!=null&&(s.__s==s.state&&(s.__s=H({},s.__s)),H(s.__s,j.getDerivedStateFromProps(w,s.__s))),p=s.props,v=s.state,s.__v=n,h)m&&j.getDerivedStateFromProps==null&&s.componentWillMount!=null&&s.componentWillMount(),m&&s.componentDidMount!=null&&s.__h.push(s.componentDidMount);else{if(m&&j.getDerivedStateFromProps==null&&w!==p&&s.componentWillReceiveProps!=null&&s.componentWillReceiveProps(w,Q),n.__v==i.__v||!s.__e&&s.shouldComponentUpdate!=null&&s.shouldComponentUpdate(w,s.__s,Q)===!1){n.__v!=i.__v&&(s.props=w,s.state=s.__s,s.__d=!1),n.__e=i.__e,n.__k=i.__k,n.__k.some(function(oe){oe&&(oe.__=n)}),Ze.push.apply(s.__h,s._sb),s._sb=[],s.__h.length&&a.push(s);break e}s.componentWillUpdate!=null&&s.componentWillUpdate(w,s.__s,Q),m&&s.componentDidUpdate!=null&&s.__h.push(function(){s.componentDidUpdate(p,v,g)})}if(s.context=Q,s.props=w,s.__P=e,s.__e=!1,be=k.__r,Ni=0,m)s.state=s.__s,s.__d=!1,be&&be(n),f=s.render(s.props,s.state,s.context),Ze.push.apply(s.__h,s._sb),s._sb=[];else do s.__d=!1,be&&be(n),f=s.render(s.props,s.state,s.context),s.state=s.__s;while(s.__d&&++Ni<25);s.state=s.__s,s.getChildContext!=null&&(r=H(H({},r),s.getChildContext())),m&&!h&&s.getSnapshotBeforeUpdate!=null&&(g=s.getSnapshotBeforeUpdate(p,v)),Be=f!=null&&f.type===J&&f.key==null?Cr(f.props.children):f,c=xr(e,Cn(Be)?Be:[Be],n,i,r,t,l,a,c,u,d),s.base=n.__e,n.__u&=-161,s.__h.length&&a.push(s),b&&(s.__E=s.__=null)}catch(oe){if(n.__v=null,u||l!=null)if(oe.then){for(n.__u|=u?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;l[l.indexOf(c)]=null,n.__e=c}else{for(Fn=l.length;Fn--;)di(l[Fn]);Kn(n)}else n.__e=i.__e,n.__k=i.__k,oe.then||Kn(n);k.__e(oe,n,i)}else l==null&&n.__v==i.__v?(n.__k=i.__k,n.__e=i.__e):c=n.__e=ul(i.__e,n,i,r,t,l,a,u,d);return(f=k.diffed)&&f(n),128&n.__u?void 0:c}function Kn(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Kn))}function Sr(e,n,i){for(var r=0;r<i.length;r++)pi(i[r],i[++r],i[++r]);k.__c&&k.__c(n,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(l){l.call(t)})}catch(l){k.__e(l,t.__v)}})}function Cr(e){return typeof e!="object"||e==null||e.__b>0?e:Cn(e)?e.map(Cr):e.constructor!==void 0?null:H({},e)}function ul(e,n,i,r,t,l,a,c,u){var d,f,s,h,p,v,g,b=i.props||Qe,w=n.props,m=n.type;if(m=="svg"?t="http://www.w3.org/2000/svg":m=="math"?t="http://www.w3.org/1998/Math/MathML":t||(t="http://www.w3.org/1999/xhtml"),l!=null){for(d=0;d<l.length;d++)if((p=l[d])&&"setAttribute"in p==!!m&&(m?p.localName==m:p.nodeType==3)){e=p,l[d]=null;break}}if(e==null){if(m==null)return document.createTextNode(w);e=document.createElementNS(t,m,w.is&&w),c&&(k.__m&&k.__m(n,l),c=!1),l=null}if(m==null)b===w||c&&e.data==w||(e.data=w);else{if(l=m=="textarea"&&w.defaultValue!=null?null:l&&Sn.call(e.childNodes),!c&&l!=null)for(b={},d=0;d<e.attributes.length;d++)b[(p=e.attributes[d]).name]=p.value;for(d in b)p=b[d],d=="dangerouslySetInnerHTML"?s=p:d=="children"||d in w||d=="value"&&"defaultValue"in w||d=="checked"&&"defaultChecked"in w||Ue(e,d,null,p,t);for(d in w)p=w[d],d=="children"?h=p:d=="dangerouslySetInnerHTML"?f=p:d=="value"?v=p:d=="checked"?g=p:c&&typeof p!="function"||b[d]===p||Ue(e,d,p,b[d],t);if(f)c||s&&(f.__html==s.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),n.__k=[];else if(s&&(e.innerHTML=""),xr(n.type=="template"?e.content:e,Cn(h)?h:[h],n,i,r,m=="foreignObject"?"http://www.w3.org/1999/xhtml":t,l,a,l?l[0]:i.__k&&_e(i,0),c,u),l!=null)for(d=l.length;d--;)di(l[d]);c&&m!="textarea"||(d="value",m=="progress"&&v==null?e.removeAttribute("value"):v!=null&&(v!==e[d]||m=="progress"&&!v||m=="option"&&v!=b[d])&&Ue(e,d,v,b[d],t),d="checked",g!=null&&g!=e[d]&&Ue(e,d,g,b[d],t))}return e}function pi(e,n,i){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&n==null||(e.__u=e(n))}else e.current=n}catch(t){k.__e(t,i)}}function Tr(e,n,i){var r,t;if(k.unmount&&k.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||pi(r,null,n)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(l){k.__e(l,n)}r.base=r.__P=null}if(r=e.__k)for(t=0;t<r.length;t++)r[t]&&Tr(r[t],n,i||typeof e.type!="function");i||di(e.__e),e.__c=e.__=e.__e=void 0}function dl(e,n,i){return this.constructor(e,i)}function fl(e,n,i){var r,t,l,a;n==document&&(n=document.documentElement),k.__&&k.__(e,n),t=(r=!1)?null:n.__k,l=[],a=[],fi(n,e=n.__k=al(J,null,[e]),t||Qe,Qe,n.namespaceURI,t?null:n.firstChild?Sn.call(n.childNodes):null,l,t?t.__e:n.firstChild,r,a),Sr(l,e,a)}Sn=Ze.slice,k={__e:function(e,n,i,r){for(var t,l,a;n=n.__;)if((t=n.__c)&&!t.__)try{if((l=t.constructor)&&l.getDerivedStateFromError!=null&&(t.setState(l.getDerivedStateFromError(e)),a=t.__d),t.componentDidCatch!=null&&(t.componentDidCatch(e,r||{}),a=t.__d),a)return t.__E=t}catch(c){e=c}throw e}},mr=0,gr=function(e){return e!=null&&e.constructor===void 0},Ae.prototype.setState=function(e,n){var i;i=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=H({},this.state),typeof e=="function"&&(e=e(H({},i),this.props)),e&&H(i,e),e!=null&&this.__v&&(n&&this._sb.push(n),Li(this))},Ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Li(this))},Ae.prototype.render=J,Y=[],yr=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,br=function(e,n){return e.__v.__b-n.__v.__b},Xe.__r=0,Rn=Math.random().toString(8),Ke="__d"+Rn,xe="__a"+Rn,wr=/(PointerCapture)$|Capture$/i,ui=0,zn=Ri(!1),Yn=Ri(!0);var pl=0;function o(e,n,i,r,t,l){n||(n={});var a,c,u=n;if("ref"in u)for(c in u={},n)c=="ref"?a=n[c]:u[c]=n[c];var d={type:e,props:u,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--pl,__i:-1,__u:0,__source:t,__self:l};if(typeof e=="function"&&(a=e.defaultProps))for(c in a)u[c]===void 0&&(u[c]=a[c]);return k.vnode&&k.vnode(d),d}var Ie,S,Pn,Pi,qn=0,Er=[],C=k,$i=C.__b,Mi=C.__r,Di=C.diffed,ji=C.__c,Bi=C.unmount,Ui=C.__;function hi(e,n){C.__h&&C.__h(S,e,qn||n),qn=0;var i=S.__H||(S.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({}),i.__[e]}function Or(e){return qn=1,hl(Lr,e)}function hl(e,n,i){var r=hi(Ie++,2);if(r.t=e,!r.__c&&(r.__=[Lr(void 0,n),function(c){var u=r.__N?r.__N[0]:r.__[0],d=r.t(u,c);u!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=S,!S.__f)){var t=function(c,u,d){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(h){return h.__c});if(f.every(function(h){return!h.__N}))return!l||l.call(this,c,u,d);var s=r.__c.props!==c;return f.some(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(s=!0)}}),l&&l.call(this,c,u,d)||s};S.__f=!0;var l=S.shouldComponentUpdate,a=S.componentWillUpdate;S.componentWillUpdate=function(c,u,d){if(this.__e){var f=l;l=void 0,t(c,u,d),l=f}a&&a.call(this,c,u,d)},S.shouldComponentUpdate=t}return r.__N||r.__}function De(e,n){var i=hi(Ie++,3);!C.__s&&Ir(i.__H,n)&&(i.__=e,i.u=n,S.__H.__h.push(i))}function Nr(e,n){var i=hi(Ie++,7);return Ir(i.__H,n)&&(i.__=e(),i.__H=n,i.__h=e),i.__}function vl(){for(var e;e=Er.shift();){var n=e.__H;if(e.__P&&n)try{n.__h.some(Ge),n.__h.some(Gn),n.__h=[]}catch(i){n.__h=[],C.__e(i,e.__v)}}}C.__b=function(e){S=null,$i&&$i(e)},C.__=function(e,n){e&&n.__k&&n.__k.__m&&(e.__m=n.__k.__m),Ui&&Ui(e,n)},C.__r=function(e){Mi&&Mi(e),Ie=0;var n=(S=e.__c).__H;n&&(Pn===S?(n.__h=[],S.__h=[],n.__.some(function(i){i.__N&&(i.__=i.__N),i.u=i.__N=void 0})):(n.__h.some(Ge),n.__h.some(Gn),n.__h=[],Ie=0)),Pn=S},C.diffed=function(e){Di&&Di(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(Er.push(n)!==1&&Pi===C.requestAnimationFrame||((Pi=C.requestAnimationFrame)||_l)(vl)),n.__H.__.some(function(i){i.u&&(i.__H=i.u),i.u=void 0})),Pn=S=null},C.__c=function(e,n){n.some(function(i){try{i.__h.some(Ge),i.__h=i.__h.filter(function(r){return!r.__||Gn(r)})}catch(r){n.some(function(t){t.__h&&(t.__h=[])}),n=[],C.__e(r,i.__v)}}),ji&&ji(e,n)},C.unmount=function(e){Bi&&Bi(e);var n,i=e.__c;i&&i.__H&&(i.__H.__.some(function(r){try{Ge(r)}catch(t){n=t}}),i.__H=void 0,n&&C.__e(n,i.__v))};var Hi=typeof requestAnimationFrame=="function";function _l(e){var n,i=function(){clearTimeout(r),Hi&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(i,35);Hi&&(n=requestAnimationFrame(i))}function Ge(e){var n=S,i=e.__c;typeof i=="function"&&(e.__c=void 0,i()),S=n}function Gn(e){var n=S;e.__c=e.__(),S=n}function Ir(e,n){return!e||e.length!==n.length||n.some(function(i,r){return i!==e[r]})}function Lr(e,n){return typeof n=="function"?n(e):n}var ml=Symbol.for("preact-signals");function Tn(){if(W>1)W--;else{var e,n=!1;for(function(){var t=nn;for(nn=void 0;t!==void 0;)t.S.v===t.v&&(t.S.i=t.i),t=t.o}();Se!==void 0;){var i=Se;for(Se=void 0,en++;i!==void 0;){var r=i.u;if(i.u=void 0,i.f&=-3,!(8&i.f)&&Rr(i))try{i.c()}catch(t){n||(e=t,n=!0)}i=r}}if(en=0,W--,n)throw e}}function gl(e){if(W>0)return e();Vn=++yl,W++;try{return e()}finally{Tn()}}var x=void 0;function vi(e){var n=x;x=void 0;try{return e()}finally{x=n}}var Se=void 0,W=0,en=0,yl=0,Vn=0,nn=void 0,rn=0;function Fr(e){if(x!==void 0){var n=e.n;if(n===void 0||n.t!==x)return n={i:0,S:e,p:x.s,n:void 0,t:x,e:void 0,x:void 0,r:n},x.s!==void 0&&(x.s.n=n),x.s=n,e.n=n,32&x.f&&e.S(n),n;if(n.i===-1)return n.i=0,n.n!==void 0&&(n.n.p=n.p,n.p!==void 0&&(n.p.n=n.n),n.p=x.s,n.n=void 0,x.s.n=n,x.s=n),n}}function I(e,n){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=n?.watched,this.Z=n?.unwatched,this.name=n?.name}I.prototype.brand=ml;I.prototype.h=function(){return!0};I.prototype.S=function(e){var n=this,i=this.t;i!==e&&e.e===void 0&&(e.x=i,this.t=e,i!==void 0?i.e=e:vi(function(){var r;(r=n.W)==null||r.call(n)}))};I.prototype.U=function(e){var n=this;if(this.t!==void 0){var i=e.e,r=e.x;i!==void 0&&(i.x=r,e.e=void 0),r!==void 0&&(r.e=i,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&vi(function(){var t;(t=n.Z)==null||t.call(n)}))}};I.prototype.subscribe=function(e){var n=this;return je(function(){var i=n.value,r=x;x=void 0;try{e(i)}finally{x=r}},{name:"sub"})};I.prototype.valueOf=function(){return this.value};I.prototype.toString=function(){return this.value+""};I.prototype.toJSON=function(){return this.value};I.prototype.peek=function(){var e=this;return vi(function(){return e.value})};Object.defineProperty(I.prototype,"value",{get:function(){var e=Fr(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(en>100)throw new Error("Cycle detected");(function(i){W!==0&&en===0&&i.l!==Vn&&(i.l=Vn,nn={S:i,v:i.v,i:i.i,o:nn})})(this),this.v=e,this.i++,rn++,W++;try{for(var n=this.t;n!==void 0;n=n.x)n.t.N()}finally{Tn()}}}});function _(e,n){return new I(e,n)}function Rr(e){for(var n=e.s;n!==void 0;n=n.n)if(n.S.i!==n.i||!n.S.h()||n.S.i!==n.i)return!0;return!1}function Pr(e){for(var n=e.s;n!==void 0;n=n.n){var i=n.S.n;if(i!==void 0&&(n.r=i),n.S.n=n,n.i=-1,n.n===void 0){e.s=n;break}}}function $r(e){for(var n=e.s,i=void 0;n!==void 0;){var r=n.p;n.i===-1?(n.S.U(n),r!==void 0&&(r.n=n.n),n.n!==void 0&&(n.n.p=r)):i=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=r}e.s=i}function le(e,n){I.call(this,void 0),this.x=e,this.s=void 0,this.g=rn-1,this.f=4,this.W=n?.watched,this.Z=n?.unwatched,this.name=n?.name}le.prototype=new I;le.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===rn))return!0;if(this.g=rn,this.f|=1,this.i>0&&!Rr(this))return this.f&=-2,!0;var e=x;try{Pr(this),x=this;var n=this.x();(16&this.f||this.v!==n||this.i===0)&&(this.v=n,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return x=e,$r(this),this.f&=-2,!0};le.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var n=this.s;n!==void 0;n=n.n)n.S.S(n)}I.prototype.S.call(this,e)};le.prototype.U=function(e){if(this.t!==void 0&&(I.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var n=this.s;n!==void 0;n=n.n)n.S.U(n)}};le.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(le.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Fr(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Wi(e,n){return new le(e,n)}function Mr(e){var n=e.m;if(e.m=void 0,typeof n=="function"){W++;var i=x;x=void 0;try{n()}catch(r){throw e.f&=-2,e.f|=8,_i(e),r}finally{x=i,Tn()}}}function _i(e){for(var n=e.s;n!==void 0;n=n.n)n.S.U(n);e.x=void 0,e.s=void 0,Mr(e)}function bl(e){if(x!==this)throw new Error("Out-of-order effect");$r(this),x=e,this.f&=-2,8&this.f&&_i(this),Tn()}function ge(e,n){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=n?.name}ge.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var n=this.x();typeof n=="function"&&(this.m=n)}finally{e()}};ge.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Mr(this),Pr(this),W++;var e=x;return x=this,bl.bind(this,e)};ge.prototype.N=function(){2&this.f||(this.f|=2,this.u=Se,Se=this)};ge.prototype.d=function(){this.f|=8,1&this.f||_i(this)};ge.prototype.dispose=function(){this.d()};function je(e,n){var i=new ge(e,n);try{i.c()}catch(t){throw i.d(),t}var r=i.d.bind(i);return r[Symbol.dispose]=r,r}var Dr,He,wl=typeof window<"u"&&!!window.__PREACT_SIGNALS_DEVTOOLS__,jr=[];je(function(){Dr=this.N})();function ye(e,n){k[e]=n.bind(null,k[e]||function(){})}function tn(e){if(He){var n=He;He=void 0,n()}He=e&&e.S()}function Br(e){var n=this,i=e.data,r=xl(i);r.value=i;var t=Nr(function(){for(var c=n,u=n.__v;u=u.__;)if(u.__c){u.__c.__$f|=4;break}var d=Wi(function(){var p=r.value.value;return p===0?0:p===!0?"":p||""}),f=Wi(function(){return!Array.isArray(d.value)&&!gr(d.value)}),s=je(function(){if(this.N=Ur,f.value){var p=d.value;c.__v&&c.__v.__e&&c.__v.__e.nodeType===3&&(c.__v.__e.data=p)}}),h=n.__$u.d;return n.__$u.d=function(){s(),h.call(this)},[f,d]},[]),l=t[0],a=t[1];return l.value?a.peek():a.value}Br.displayName="ReactiveTextNode";Object.defineProperties(I.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Br},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}});ye("__b",function(e,n){if(typeof n.type=="string"){var i,r=n.props;for(var t in r)if(t!=="children"){var l=r[t];l instanceof I&&(i||(n.__np=i={}),i[t]=l,r[t]=l.peek())}}e(n)});ye("__r",function(e,n){if(e(n),n.type!==J){tn();var i,r=n.__c;r&&(r.__$f&=-2,(i=r.__$u)===void 0&&(r.__$u=i=function(t,l){var a;return je(function(){a=this},{name:l}),a.c=t,a}(function(){var t;wl&&((t=i.y)==null||t.call(i)),r.__$f|=1,r.setState({})},typeof n.type=="function"?n.type.displayName||n.type.name:""))),tn(i)}});ye("__e",function(e,n,i,r){tn(),e(n,i,r)});ye("diffed",function(e,n){tn();var i;if(typeof n.type=="string"&&(i=n.__e)){var r=n.__np,t=n.props;if(r){var l=i.U;if(l)for(var a in l){var c=l[a];c!==void 0&&!(a in r)&&(c.d(),l[a]=void 0)}else l={},i.U=l;for(var u in r){var d=l[u],f=r[u];d===void 0?(d=kl(i,u,f),l[u]=d):d.o(f,t)}for(var s in r)t[s]=r[s]}}e(n)});function kl(e,n,i,r){var t=n in e&&e.ownerSVGElement===void 0,l=_(i),a=i.peek();return{o:function(c,u){l.value=c,a=c.peek()},d:je(function(){this.N=Ur;var c=l.value.value;a!==c?(a=void 0,t?e[n]=c:c!=null&&(c!==!1||n[4]==="-")?e.setAttribute(n,c):e.removeAttribute(n)):a=void 0})}}ye("unmount",function(e,n){if(typeof n.type=="string"){var i=n.__e;if(i){var r=i.U;if(r){i.U=void 0;for(var t in r){var l=r[t];l&&l.d()}}}n.__np=void 0}else{var a=n.__c;if(a){var c=a.__$u;c&&(a.__$u=void 0,c.d())}}e(n)});ye("__h",function(e,n,i,r){(r<3||r===9)&&(n.__$f|=2),e(n,i,r)});Ae.prototype.shouldComponentUpdate=function(e,n){if(this.__R)return!0;var i=this.__$u,r=i&&i.s!==void 0;for(var t in n)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){var l=2&this.__$f;if(!(r||l||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var a in e)if(a!=="__source"&&e[a]!==this.props[a])return!0;for(var c in this.props)if(!(c in e))return!0;return!1};function xl(e,n){return Nr(function(){return _(e,n)},[])}var Al=function(e){queueMicrotask(function(){queueMicrotask(e)})};function Sl(){gl(function(){for(var e;e=jr.shift();)Dr.call(e)})}function Ur(){jr.push(this)===1&&(k.requestAnimationFrame||Al)(Sl)}function Hr(){const e=window.location.hash;return e===""||e==="#"?"/":e.startsWith("#")?e.slice(1):e}const de=_(Hr());function Jn(e){const n=e.startsWith("/")?e:`/${e}`;`#${n}`!==window.location.hash&&(window.location.hash=n)}let zi=!1;function Cl(){zi||(zi=!0,window.addEventListener("hashchange",()=>{de.value=Hr()}))}let Le=null;function Tl(e){Le=e}class $ extends Error{status;body;constructor(n,i,r){super(r),this.status=n,this.body=i}}async function A(e,n={}){const i={Accept:"application/json",...n.headers??{}};Le!==null&&(i.Authorization=`Bearer ${Le}`);const{body:r,...t}=n,l={...t,headers:i};r!==void 0&&(l.body=JSON.stringify(r),i["Content-Type"]="application/json");const a=await fetch(e,l),c=await a.text(),u=c===""?{}:JSON.parse(c);if(!a.ok){const d=u.error?.message??`request failed (${a.status})`;throw new $(a.status,u,d)}return u}async function El(e,n,i,r={}){const t={Accept:"text/event-stream","Content-Type":"application/json",...r.headers??{}};Le!==null&&(t.Authorization=`Bearer ${Le}`);const l=await fetch(e,{...r,method:"POST",headers:t,body:JSON.stringify(n)});if(!l.ok||l.body===null){const f=await l.text().catch(()=>"");let s={};try{s=f===""?{}:JSON.parse(f)}catch{}throw new $(l.status,s,s.error?.message??`stream failed (${l.status})`)}const a=l.body.getReader(),c=new TextDecoder;let u="";const d=f=>{for(const s of f.split(`
1
+ (function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))r(t);new MutationObserver(t=>{for(const l of t)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function i(t){const l={};return t.integrity&&(l.integrity=t.integrity),t.referrerPolicy&&(l.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?l.credentials="include":t.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(t){if(t.ep)return;t.ep=!0;const l=i(t);fetch(t.href,l)}})();var Sn,k,mr,gr,Y,Ii,yr,br,Rn,Ke,xe,wr,ui,zn,Yn,Qe={},Ze=[],ll=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Cn=Array.isArray;function H(e,n){for(var i in n)e[i]=n[i];return e}function di(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function al(e,n,i){var r,t,l,a={};for(l in n)l=="key"?r=n[l]:l=="ref"?t=n[l]:a[l]=n[l];if(arguments.length>2&&(a.children=arguments.length>3?Sn.call(arguments,2):i),typeof e=="function"&&e.defaultProps!=null)for(l in e.defaultProps)a[l]===void 0&&(a[l]=e.defaultProps[l]);return qe(e,a,r,t,null)}function qe(e,n,i,r,t){var l={type:e,props:n,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:t??++mr,__i:-1,__u:0};return t==null&&k.vnode!=null&&k.vnode(l),l}function J(e){return e.children}function Ae(e,n){this.props=e,this.context=n}function _e(e,n){if(n==null)return e.__?_e(e.__,e.__i+1):null;for(var i;n<e.__k.length;n++)if((i=e.__k[n])!=null&&i.__e!=null)return i.__e;return typeof e.type=="function"?_e(e):null}function ol(e){if(e.__P&&e.__d){var n=e.__v,i=n.__e,r=[],t=[],l=H({},n);l.__v=n.__v+1,k.vnode&&k.vnode(l),fi(e.__P,l,n,e.__n,e.__P.namespaceURI,32&n.__u?[i]:null,r,i??_e(n),!!(32&n.__u),t),l.__v=n.__v,l.__.__k[l.__i]=l,Sr(r,l,t),n.__e=n.__=null,l.__e!=i&&kr(l)}}function kr(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),kr(e)}function Li(e){(!e.__d&&(e.__d=!0)&&Y.push(e)&&!Xe.__r++||Ii!=k.debounceRendering)&&((Ii=k.debounceRendering)||yr)(Xe)}function Xe(){try{for(var e,n=1;Y.length;)Y.length>n&&Y.sort(br),e=Y.shift(),n=Y.length,ol(e)}finally{Y.length=Xe.__r=0}}function xr(e,n,i,r,t,l,a,c,u,d,f){var s,h,p,v,g,b,w,m=r&&r.__k||Ze,j=n.length;for(u=cl(i,n,m,u,j),s=0;s<j;s++)(p=i.__k[s])!=null&&(h=p.__i!=-1&&m[p.__i]||Qe,p.__i=s,b=fi(e,p,h,t,l,a,c,u,d,f),v=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&pi(h.ref,null,p),f.push(p.ref,p.__c||v,p)),g==null&&v!=null&&(g=v),(w=!!(4&p.__u))||h.__k===p.__k?(u=Ar(p,u,e,w),w&&h.__e&&(h.__e=null)):typeof p.type=="function"&&b!==void 0?u=b:v&&(u=v.nextSibling),p.__u&=-7);return i.__e=g,u}function cl(e,n,i,r,t){var l,a,c,u,d,f=i.length,s=f,h=0;for(e.__k=new Array(t),l=0;l<t;l++)(a=n[l])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=e.__k[l]=qe(null,a,null,null,null):Cn(a)?a=e.__k[l]=qe(J,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=e.__k[l]=qe(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[l]=a,u=l+h,a.__=e,a.__b=e.__b+1,c=null,(d=a.__i=sl(a,i,u,s))!=-1&&(s--,(c=i[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(t>f?h--:t<f&&h++),typeof a.type!="function"&&(a.__u|=4)):d!=u&&(d==u-1?h--:d==u+1?h++:(d>u?h--:h++,a.__u|=4))):e.__k[l]=null;if(s)for(l=0;l<f;l++)(c=i[l])!=null&&!(2&c.__u)&&(c.__e==r&&(r=_e(c)),Tr(c,c));return r}function Ar(e,n,i,r){var t,l;if(typeof e.type=="function"){for(t=e.__k,l=0;t&&l<t.length;l++)t[l]&&(t[l].__=e,n=Ar(t[l],n,i,r));return n}e.__e!=n&&(r&&(n&&e.type&&!n.parentNode&&(n=_e(e)),i.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function sl(e,n,i,r){var t,l,a,c=e.key,u=e.type,d=n[i],f=d!=null&&(2&d.__u)==0;if(d===null&&c==null||f&&c==d.key&&u==d.type)return i;if(r>(f?1:0)){for(t=i-1,l=i+1;t>=0||l<n.length;)if((d=n[a=t>=0?t--:l++])!=null&&!(2&d.__u)&&c==d.key&&u==d.type)return a}return-1}function Fi(e,n,i){n[0]=="-"?e.setProperty(n,i??""):e[n]=i==null?"":typeof i!="number"||ll.test(n)?i:i+"px"}function Ue(e,n,i,r,t){var l,a;e:if(n=="style")if(typeof i=="string")e.style.cssText=i;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(n in r)i&&n in i||Fi(e.style,n,"");if(i)for(n in i)r&&i[n]==r[n]||Fi(e.style,n,i[n])}else if(n[0]=="o"&&n[1]=="n")l=n!=(n=n.replace(wr,"$1")),a=n.toLowerCase(),n=a in e||n=="onFocusOut"||n=="onFocusIn"?a.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+l]=i,i?r?i[xe]=r[xe]:(i[xe]=ui,e.addEventListener(n,l?Yn:zn,l)):e.removeEventListener(n,l?Yn:zn,l);else{if(t=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=i??"";break e}catch{}typeof i=="function"||(i==null||i===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&i==1?"":i))}}function Ri(e){return function(n){if(this.l){var i=this.l[n.type+e];if(n[Ke]==null)n[Ke]=ui++;else if(n[Ke]<i[xe])return;return i(k.event?k.event(n):n)}}}function fi(e,n,i,r,t,l,a,c,u,d){var f,s,h,p,v,g,b,w,m,j,Q,be,Ni,Be,Fn,B=n.type;if(n.constructor!==void 0)return null;128&i.__u&&(u=!!(32&i.__u),l=[c=n.__e=i.__e]),(f=k.__b)&&f(n);e:if(typeof B=="function")try{if(w=n.props,m=B.prototype&&B.prototype.render,j=(f=B.contextType)&&r[f.__c],Q=f?j?j.props.value:f.__:r,i.__c?b=(s=n.__c=i.__c).__=s.__E:(m?n.__c=s=new B(w,Q):(n.__c=s=new Ae(w,Q),s.constructor=B,s.render=dl),j&&j.sub(s),s.state||(s.state={}),s.__n=r,h=s.__d=!0,s.__h=[],s._sb=[]),m&&s.__s==null&&(s.__s=s.state),m&&B.getDerivedStateFromProps!=null&&(s.__s==s.state&&(s.__s=H({},s.__s)),H(s.__s,B.getDerivedStateFromProps(w,s.__s))),p=s.props,v=s.state,s.__v=n,h)m&&B.getDerivedStateFromProps==null&&s.componentWillMount!=null&&s.componentWillMount(),m&&s.componentDidMount!=null&&s.__h.push(s.componentDidMount);else{if(m&&B.getDerivedStateFromProps==null&&w!==p&&s.componentWillReceiveProps!=null&&s.componentWillReceiveProps(w,Q),n.__v==i.__v||!s.__e&&s.shouldComponentUpdate!=null&&s.shouldComponentUpdate(w,s.__s,Q)===!1){n.__v!=i.__v&&(s.props=w,s.state=s.__s,s.__d=!1),n.__e=i.__e,n.__k=i.__k,n.__k.some(function(oe){oe&&(oe.__=n)}),Ze.push.apply(s.__h,s._sb),s._sb=[],s.__h.length&&a.push(s);break e}s.componentWillUpdate!=null&&s.componentWillUpdate(w,s.__s,Q),m&&s.componentDidUpdate!=null&&s.__h.push(function(){s.componentDidUpdate(p,v,g)})}if(s.context=Q,s.props=w,s.__P=e,s.__e=!1,be=k.__r,Ni=0,m)s.state=s.__s,s.__d=!1,be&&be(n),f=s.render(s.props,s.state,s.context),Ze.push.apply(s.__h,s._sb),s._sb=[];else do s.__d=!1,be&&be(n),f=s.render(s.props,s.state,s.context),s.state=s.__s;while(s.__d&&++Ni<25);s.state=s.__s,s.getChildContext!=null&&(r=H(H({},r),s.getChildContext())),m&&!h&&s.getSnapshotBeforeUpdate!=null&&(g=s.getSnapshotBeforeUpdate(p,v)),Be=f!=null&&f.type===J&&f.key==null?Cr(f.props.children):f,c=xr(e,Cn(Be)?Be:[Be],n,i,r,t,l,a,c,u,d),s.base=n.__e,n.__u&=-161,s.__h.length&&a.push(s),b&&(s.__E=s.__=null)}catch(oe){if(n.__v=null,u||l!=null)if(oe.then){for(n.__u|=u?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;l[l.indexOf(c)]=null,n.__e=c}else{for(Fn=l.length;Fn--;)di(l[Fn]);Kn(n)}else n.__e=i.__e,n.__k=i.__k,oe.then||Kn(n);k.__e(oe,n,i)}else l==null&&n.__v==i.__v?(n.__k=i.__k,n.__e=i.__e):c=n.__e=ul(i.__e,n,i,r,t,l,a,u,d);return(f=k.diffed)&&f(n),128&n.__u?void 0:c}function Kn(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Kn))}function Sr(e,n,i){for(var r=0;r<i.length;r++)pi(i[r],i[++r],i[++r]);k.__c&&k.__c(n,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(l){l.call(t)})}catch(l){k.__e(l,t.__v)}})}function Cr(e){return typeof e!="object"||e==null||e.__b>0?e:Cn(e)?e.map(Cr):e.constructor!==void 0?null:H({},e)}function ul(e,n,i,r,t,l,a,c,u){var d,f,s,h,p,v,g,b=i.props||Qe,w=n.props,m=n.type;if(m=="svg"?t="http://www.w3.org/2000/svg":m=="math"?t="http://www.w3.org/1998/Math/MathML":t||(t="http://www.w3.org/1999/xhtml"),l!=null){for(d=0;d<l.length;d++)if((p=l[d])&&"setAttribute"in p==!!m&&(m?p.localName==m:p.nodeType==3)){e=p,l[d]=null;break}}if(e==null){if(m==null)return document.createTextNode(w);e=document.createElementNS(t,m,w.is&&w),c&&(k.__m&&k.__m(n,l),c=!1),l=null}if(m==null)b===w||c&&e.data==w||(e.data=w);else{if(l=m=="textarea"&&w.defaultValue!=null?null:l&&Sn.call(e.childNodes),!c&&l!=null)for(b={},d=0;d<e.attributes.length;d++)b[(p=e.attributes[d]).name]=p.value;for(d in b)p=b[d],d=="dangerouslySetInnerHTML"?s=p:d=="children"||d in w||d=="value"&&"defaultValue"in w||d=="checked"&&"defaultChecked"in w||Ue(e,d,null,p,t);for(d in w)p=w[d],d=="children"?h=p:d=="dangerouslySetInnerHTML"?f=p:d=="value"?v=p:d=="checked"?g=p:c&&typeof p!="function"||b[d]===p||Ue(e,d,p,b[d],t);if(f)c||s&&(f.__html==s.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),n.__k=[];else if(s&&(e.innerHTML=""),xr(n.type=="template"?e.content:e,Cn(h)?h:[h],n,i,r,m=="foreignObject"?"http://www.w3.org/1999/xhtml":t,l,a,l?l[0]:i.__k&&_e(i,0),c,u),l!=null)for(d=l.length;d--;)di(l[d]);c&&m!="textarea"||(d="value",m=="progress"&&v==null?e.removeAttribute("value"):v!=null&&(v!==e[d]||m=="progress"&&!v||m=="option"&&v!=b[d])&&Ue(e,d,v,b[d],t),d="checked",g!=null&&g!=e[d]&&Ue(e,d,g,b[d],t))}return e}function pi(e,n,i){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&n==null||(e.__u=e(n))}else e.current=n}catch(t){k.__e(t,i)}}function Tr(e,n,i){var r,t;if(k.unmount&&k.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||pi(r,null,n)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(l){k.__e(l,n)}r.base=r.__P=null}if(r=e.__k)for(t=0;t<r.length;t++)r[t]&&Tr(r[t],n,i||typeof e.type!="function");i||di(e.__e),e.__c=e.__=e.__e=void 0}function dl(e,n,i){return this.constructor(e,i)}function fl(e,n,i){var r,t,l,a;n==document&&(n=document.documentElement),k.__&&k.__(e,n),t=(r=!1)?null:n.__k,l=[],a=[],fi(n,e=n.__k=al(J,null,[e]),t||Qe,Qe,n.namespaceURI,t?null:n.firstChild?Sn.call(n.childNodes):null,l,t?t.__e:n.firstChild,r,a),Sr(l,e,a)}Sn=Ze.slice,k={__e:function(e,n,i,r){for(var t,l,a;n=n.__;)if((t=n.__c)&&!t.__)try{if((l=t.constructor)&&l.getDerivedStateFromError!=null&&(t.setState(l.getDerivedStateFromError(e)),a=t.__d),t.componentDidCatch!=null&&(t.componentDidCatch(e,r||{}),a=t.__d),a)return t.__E=t}catch(c){e=c}throw e}},mr=0,gr=function(e){return e!=null&&e.constructor===void 0},Ae.prototype.setState=function(e,n){var i;i=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=H({},this.state),typeof e=="function"&&(e=e(H({},i),this.props)),e&&H(i,e),e!=null&&this.__v&&(n&&this._sb.push(n),Li(this))},Ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Li(this))},Ae.prototype.render=J,Y=[],yr=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,br=function(e,n){return e.__v.__b-n.__v.__b},Xe.__r=0,Rn=Math.random().toString(8),Ke="__d"+Rn,xe="__a"+Rn,wr=/(PointerCapture)$|Capture$/i,ui=0,zn=Ri(!1),Yn=Ri(!0);var pl=0;function o(e,n,i,r,t,l){n||(n={});var a,c,u=n;if("ref"in u)for(c in u={},n)c=="ref"?a=n[c]:u[c]=n[c];var d={type:e,props:u,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--pl,__i:-1,__u:0,__source:t,__self:l};if(typeof e=="function"&&(a=e.defaultProps))for(c in a)u[c]===void 0&&(u[c]=a[c]);return k.vnode&&k.vnode(d),d}var Ie,S,Pn,Pi,qn=0,Er=[],C=k,$i=C.__b,Mi=C.__r,Di=C.diffed,ji=C.__c,Bi=C.unmount,Ui=C.__;function hi(e,n){C.__h&&C.__h(S,e,qn||n),qn=0;var i=S.__H||(S.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({}),i.__[e]}function Or(e){return qn=1,hl(Lr,e)}function hl(e,n,i){var r=hi(Ie++,2);if(r.t=e,!r.__c&&(r.__=[Lr(void 0,n),function(c){var u=r.__N?r.__N[0]:r.__[0],d=r.t(u,c);u!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=S,!S.__f)){var t=function(c,u,d){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(h){return h.__c});if(f.every(function(h){return!h.__N}))return!l||l.call(this,c,u,d);var s=r.__c.props!==c;return f.some(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(s=!0)}}),l&&l.call(this,c,u,d)||s};S.__f=!0;var l=S.shouldComponentUpdate,a=S.componentWillUpdate;S.componentWillUpdate=function(c,u,d){if(this.__e){var f=l;l=void 0,t(c,u,d),l=f}a&&a.call(this,c,u,d)},S.shouldComponentUpdate=t}return r.__N||r.__}function De(e,n){var i=hi(Ie++,3);!C.__s&&Ir(i.__H,n)&&(i.__=e,i.u=n,S.__H.__h.push(i))}function Nr(e,n){var i=hi(Ie++,7);return Ir(i.__H,n)&&(i.__=e(),i.__H=n,i.__h=e),i.__}function vl(){for(var e;e=Er.shift();){var n=e.__H;if(e.__P&&n)try{n.__h.some(Ge),n.__h.some(Gn),n.__h=[]}catch(i){n.__h=[],C.__e(i,e.__v)}}}C.__b=function(e){S=null,$i&&$i(e)},C.__=function(e,n){e&&n.__k&&n.__k.__m&&(e.__m=n.__k.__m),Ui&&Ui(e,n)},C.__r=function(e){Mi&&Mi(e),Ie=0;var n=(S=e.__c).__H;n&&(Pn===S?(n.__h=[],S.__h=[],n.__.some(function(i){i.__N&&(i.__=i.__N),i.u=i.__N=void 0})):(n.__h.some(Ge),n.__h.some(Gn),n.__h=[],Ie=0)),Pn=S},C.diffed=function(e){Di&&Di(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(Er.push(n)!==1&&Pi===C.requestAnimationFrame||((Pi=C.requestAnimationFrame)||_l)(vl)),n.__H.__.some(function(i){i.u&&(i.__H=i.u),i.u=void 0})),Pn=S=null},C.__c=function(e,n){n.some(function(i){try{i.__h.some(Ge),i.__h=i.__h.filter(function(r){return!r.__||Gn(r)})}catch(r){n.some(function(t){t.__h&&(t.__h=[])}),n=[],C.__e(r,i.__v)}}),ji&&ji(e,n)},C.unmount=function(e){Bi&&Bi(e);var n,i=e.__c;i&&i.__H&&(i.__H.__.some(function(r){try{Ge(r)}catch(t){n=t}}),i.__H=void 0,n&&C.__e(n,i.__v))};var Hi=typeof requestAnimationFrame=="function";function _l(e){var n,i=function(){clearTimeout(r),Hi&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(i,35);Hi&&(n=requestAnimationFrame(i))}function Ge(e){var n=S,i=e.__c;typeof i=="function"&&(e.__c=void 0,i()),S=n}function Gn(e){var n=S;e.__c=e.__(),S=n}function Ir(e,n){return!e||e.length!==n.length||n.some(function(i,r){return i!==e[r]})}function Lr(e,n){return typeof n=="function"?n(e):n}var ml=Symbol.for("preact-signals");function Tn(){if(W>1)W--;else{var e,n=!1;for(function(){var t=nn;for(nn=void 0;t!==void 0;)t.S.v===t.v&&(t.S.i=t.i),t=t.o}();Se!==void 0;){var i=Se;for(Se=void 0,en++;i!==void 0;){var r=i.u;if(i.u=void 0,i.f&=-3,!(8&i.f)&&Rr(i))try{i.c()}catch(t){n||(e=t,n=!0)}i=r}}if(en=0,W--,n)throw e}}function gl(e){if(W>0)return e();Vn=++yl,W++;try{return e()}finally{Tn()}}var x=void 0;function vi(e){var n=x;x=void 0;try{return e()}finally{x=n}}var Se=void 0,W=0,en=0,yl=0,Vn=0,nn=void 0,rn=0;function Fr(e){if(x!==void 0){var n=e.n;if(n===void 0||n.t!==x)return n={i:0,S:e,p:x.s,n:void 0,t:x,e:void 0,x:void 0,r:n},x.s!==void 0&&(x.s.n=n),x.s=n,e.n=n,32&x.f&&e.S(n),n;if(n.i===-1)return n.i=0,n.n!==void 0&&(n.n.p=n.p,n.p!==void 0&&(n.p.n=n.n),n.p=x.s,n.n=void 0,x.s.n=n,x.s=n),n}}function I(e,n){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=n?.watched,this.Z=n?.unwatched,this.name=n?.name}I.prototype.brand=ml;I.prototype.h=function(){return!0};I.prototype.S=function(e){var n=this,i=this.t;i!==e&&e.e===void 0&&(e.x=i,this.t=e,i!==void 0?i.e=e:vi(function(){var r;(r=n.W)==null||r.call(n)}))};I.prototype.U=function(e){var n=this;if(this.t!==void 0){var i=e.e,r=e.x;i!==void 0&&(i.x=r,e.e=void 0),r!==void 0&&(r.e=i,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&vi(function(){var t;(t=n.Z)==null||t.call(n)}))}};I.prototype.subscribe=function(e){var n=this;return je(function(){var i=n.value,r=x;x=void 0;try{e(i)}finally{x=r}},{name:"sub"})};I.prototype.valueOf=function(){return this.value};I.prototype.toString=function(){return this.value+""};I.prototype.toJSON=function(){return this.value};I.prototype.peek=function(){var e=this;return vi(function(){return e.value})};Object.defineProperty(I.prototype,"value",{get:function(){var e=Fr(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(en>100)throw new Error("Cycle detected");(function(i){W!==0&&en===0&&i.l!==Vn&&(i.l=Vn,nn={S:i,v:i.v,i:i.i,o:nn})})(this),this.v=e,this.i++,rn++,W++;try{for(var n=this.t;n!==void 0;n=n.x)n.t.N()}finally{Tn()}}}});function _(e,n){return new I(e,n)}function Rr(e){for(var n=e.s;n!==void 0;n=n.n)if(n.S.i!==n.i||!n.S.h()||n.S.i!==n.i)return!0;return!1}function Pr(e){for(var n=e.s;n!==void 0;n=n.n){var i=n.S.n;if(i!==void 0&&(n.r=i),n.S.n=n,n.i=-1,n.n===void 0){e.s=n;break}}}function $r(e){for(var n=e.s,i=void 0;n!==void 0;){var r=n.p;n.i===-1?(n.S.U(n),r!==void 0&&(r.n=n.n),n.n!==void 0&&(n.n.p=r)):i=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=r}e.s=i}function le(e,n){I.call(this,void 0),this.x=e,this.s=void 0,this.g=rn-1,this.f=4,this.W=n?.watched,this.Z=n?.unwatched,this.name=n?.name}le.prototype=new I;le.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===rn))return!0;if(this.g=rn,this.f|=1,this.i>0&&!Rr(this))return this.f&=-2,!0;var e=x;try{Pr(this),x=this;var n=this.x();(16&this.f||this.v!==n||this.i===0)&&(this.v=n,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return x=e,$r(this),this.f&=-2,!0};le.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var n=this.s;n!==void 0;n=n.n)n.S.S(n)}I.prototype.S.call(this,e)};le.prototype.U=function(e){if(this.t!==void 0&&(I.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var n=this.s;n!==void 0;n=n.n)n.S.U(n)}};le.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(le.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Fr(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Wi(e,n){return new le(e,n)}function Mr(e){var n=e.m;if(e.m=void 0,typeof n=="function"){W++;var i=x;x=void 0;try{n()}catch(r){throw e.f&=-2,e.f|=8,_i(e),r}finally{x=i,Tn()}}}function _i(e){for(var n=e.s;n!==void 0;n=n.n)n.S.U(n);e.x=void 0,e.s=void 0,Mr(e)}function bl(e){if(x!==this)throw new Error("Out-of-order effect");$r(this),x=e,this.f&=-2,8&this.f&&_i(this),Tn()}function ge(e,n){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=n?.name}ge.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var n=this.x();typeof n=="function"&&(this.m=n)}finally{e()}};ge.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Mr(this),Pr(this),W++;var e=x;return x=this,bl.bind(this,e)};ge.prototype.N=function(){2&this.f||(this.f|=2,this.u=Se,Se=this)};ge.prototype.d=function(){this.f|=8,1&this.f||_i(this)};ge.prototype.dispose=function(){this.d()};function je(e,n){var i=new ge(e,n);try{i.c()}catch(t){throw i.d(),t}var r=i.d.bind(i);return r[Symbol.dispose]=r,r}var Dr,He,wl=typeof window<"u"&&!!window.__PREACT_SIGNALS_DEVTOOLS__,jr=[];je(function(){Dr=this.N})();function ye(e,n){k[e]=n.bind(null,k[e]||function(){})}function tn(e){if(He){var n=He;He=void 0,n()}He=e&&e.S()}function Br(e){var n=this,i=e.data,r=xl(i);r.value=i;var t=Nr(function(){for(var c=n,u=n.__v;u=u.__;)if(u.__c){u.__c.__$f|=4;break}var d=Wi(function(){var p=r.value.value;return p===0?0:p===!0?"":p||""}),f=Wi(function(){return!Array.isArray(d.value)&&!gr(d.value)}),s=je(function(){if(this.N=Ur,f.value){var p=d.value;c.__v&&c.__v.__e&&c.__v.__e.nodeType===3&&(c.__v.__e.data=p)}}),h=n.__$u.d;return n.__$u.d=function(){s(),h.call(this)},[f,d]},[]),l=t[0],a=t[1];return l.value?a.peek():a.value}Br.displayName="ReactiveTextNode";Object.defineProperties(I.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Br},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}});ye("__b",function(e,n){if(typeof n.type=="string"){var i,r=n.props;for(var t in r)if(t!=="children"){var l=r[t];l instanceof I&&(i||(n.__np=i={}),i[t]=l,r[t]=l.peek())}}e(n)});ye("__r",function(e,n){if(e(n),n.type!==J){tn();var i,r=n.__c;r&&(r.__$f&=-2,(i=r.__$u)===void 0&&(r.__$u=i=function(t,l){var a;return je(function(){a=this},{name:l}),a.c=t,a}(function(){var t;wl&&((t=i.y)==null||t.call(i)),r.__$f|=1,r.setState({})},typeof n.type=="function"?n.type.displayName||n.type.name:""))),tn(i)}});ye("__e",function(e,n,i,r){tn(),e(n,i,r)});ye("diffed",function(e,n){tn();var i;if(typeof n.type=="string"&&(i=n.__e)){var r=n.__np,t=n.props;if(r){var l=i.U;if(l)for(var a in l){var c=l[a];c!==void 0&&!(a in r)&&(c.d(),l[a]=void 0)}else l={},i.U=l;for(var u in r){var d=l[u],f=r[u];d===void 0?(d=kl(i,u,f),l[u]=d):d.o(f,t)}for(var s in r)t[s]=r[s]}}e(n)});function kl(e,n,i,r){var t=n in e&&e.ownerSVGElement===void 0,l=_(i),a=i.peek();return{o:function(c,u){l.value=c,a=c.peek()},d:je(function(){this.N=Ur;var c=l.value.value;a!==c?(a=void 0,t?e[n]=c:c!=null&&(c!==!1||n[4]==="-")?e.setAttribute(n,c):e.removeAttribute(n)):a=void 0})}}ye("unmount",function(e,n){if(typeof n.type=="string"){var i=n.__e;if(i){var r=i.U;if(r){i.U=void 0;for(var t in r){var l=r[t];l&&l.d()}}}n.__np=void 0}else{var a=n.__c;if(a){var c=a.__$u;c&&(a.__$u=void 0,c.d())}}e(n)});ye("__h",function(e,n,i,r){(r<3||r===9)&&(n.__$f|=2),e(n,i,r)});Ae.prototype.shouldComponentUpdate=function(e,n){if(this.__R)return!0;var i=this.__$u,r=i&&i.s!==void 0;for(var t in n)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){var l=2&this.__$f;if(!(r||l||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var a in e)if(a!=="__source"&&e[a]!==this.props[a])return!0;for(var c in this.props)if(!(c in e))return!0;return!1};function xl(e,n){return Nr(function(){return _(e,n)},[])}var Al=function(e){queueMicrotask(function(){queueMicrotask(e)})};function Sl(){gl(function(){for(var e;e=jr.shift();)Dr.call(e)})}function Ur(){jr.push(this)===1&&(k.requestAnimationFrame||Al)(Sl)}function Hr(){const e=window.location.hash;return e===""||e==="#"?"/":e.startsWith("#")?e.slice(1):e}const de=_(Hr());function Jn(e){const n=e.startsWith("/")?e:`/${e}`;`#${n}`!==window.location.hash&&(window.location.hash=n)}let zi=!1;function Cl(){zi||(zi=!0,window.addEventListener("hashchange",()=>{de.value=Hr()}))}let Le=null;function Tl(e){Le=e}class $ extends Error{status;body;constructor(n,i,r){super(r),this.status=n,this.body=i}}async function A(e,n={}){const i={Accept:"application/json",...n.headers??{}};Le!==null&&(i.Authorization=`Bearer ${Le}`);const{body:r,...t}=n,l={...t,headers:i};r!==void 0&&(l.body=JSON.stringify(r),i["Content-Type"]="application/json");const a=await fetch(e,l),c=await a.text(),u=c===""?{}:JSON.parse(c);if(!a.ok){const d=u.error?.message??`request failed (${a.status})`;throw new $(a.status,u,d)}return u}async function El(e,n,i,r={}){const t={Accept:"text/event-stream","Content-Type":"application/json",...r.headers??{}};Le!==null&&(t.Authorization=`Bearer ${Le}`);const l=await fetch(e,{...r,method:"POST",headers:t,body:JSON.stringify(n)});if(!l.ok||l.body===null){const f=await l.text().catch(()=>"");let s={};try{s=f===""?{}:JSON.parse(f)}catch{}throw new $(l.status,s,s.error?.message??`stream failed (${l.status})`)}const a=l.body.getReader(),c=new TextDecoder;let u="";const d=f=>{for(const s of f.split(`
2
2
  `)){if(!s.startsWith("data:"))continue;const h=s.slice(5).trim();if(h!=="")try{i(JSON.parse(h))}catch{}}};for(;;){const{done:f,value:s}=await a.read();if(f)break;u+=c.decode(s,{stream:!0});let h=u.indexOf(`
3
3
 
4
4
  `);for(;h!==-1;)d(u.slice(0,h)),u=u.slice(h+2),h=u.indexOf(`
@@ -12,15 +12,15 @@
12
12
  `,c+=O.repeat("-",n.indent+f+3+d.pos)+`^
13
13
  `,u=1;u<=n.linesAfter&&!(a+u>=t.length);u++)d=Mn(e.buffer,r[a+u],t[a+u],e.position-(r[a]-r[a+u]),s),c+=O.repeat(" ",n.indent)+Dn((e.line+u+1).toString(),f)+" | "+d.str+`
14
14
  `;return c.replace(/\n$/,"")}var aa=la,oa=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ca=["scalar","sequence","mapping"];function sa(e){var n={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(r){n[String(r)]=i})}),n}function ua(e,n){if(n=n||{},Object.keys(n).forEach(function(i){if(oa.indexOf(i)===-1)throw new F('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=sa(n.styleAliases||null),ca.indexOf(this.kind)===-1)throw new F('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var N=ua;function Gi(e,n){var i=[];return e[n].forEach(function(r){var t=i.length;i.forEach(function(l,a){l.tag===r.tag&&l.kind===r.kind&&l.multi===r.multi&&(t=a)}),i[t]=r}),i}function da(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,i;function r(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(n=0,i=arguments.length;n<i;n+=1)arguments[n].forEach(r);return e}function Qn(e){return this.extend(e)}Qn.prototype.extend=function(n){var i=[],r=[];if(n instanceof N)r.push(n);else if(Array.isArray(n))r=r.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(i=i.concat(n.implicit)),n.explicit&&(r=r.concat(n.explicit));else throw new F("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(l){if(!(l instanceof N))throw new F("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new F("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new F("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(l){if(!(l instanceof N))throw new F("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var t=Object.create(Qn.prototype);return t.implicit=(this.implicit||[]).concat(i),t.explicit=(this.explicit||[]).concat(r),t.compiledImplicit=Gi(t,"implicit"),t.compiledExplicit=Gi(t,"explicit"),t.compiledTypeMap=da(t.compiledImplicit,t.compiledExplicit),t};var Qr=Qn,Zr=new N("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Xr=new N("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),et=new N("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),nt=new Qr({explicit:[Zr,Xr,et]});function fa(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function pa(){return null}function ha(e){return e===null}var it=new N("tag:yaml.org,2002:null",{kind:"scalar",resolve:fa,construct:pa,predicate:ha,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function va(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function _a(e){return e==="true"||e==="True"||e==="TRUE"}function ma(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var rt=new N("tag:yaml.org,2002:bool",{kind:"scalar",resolve:va,construct:_a,predicate:ma,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function ga(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function ya(e){return 48<=e&&e<=55}function ba(e){return 48<=e&&e<=57}function wa(e){if(e===null)return!1;var n=e.length,i=0,r=!1,t;if(!n)return!1;if(t=e[i],(t==="-"||t==="+")&&(t=e[++i]),t==="0"){if(i+1===n)return!0;if(t=e[++i],t==="b"){for(i++;i<n;i++)if(t=e[i],t!=="_"){if(t!=="0"&&t!=="1")return!1;r=!0}return r&&t!=="_"}if(t==="x"){for(i++;i<n;i++)if(t=e[i],t!=="_"){if(!ga(e.charCodeAt(i)))return!1;r=!0}return r&&t!=="_"}if(t==="o"){for(i++;i<n;i++)if(t=e[i],t!=="_"){if(!ya(e.charCodeAt(i)))return!1;r=!0}return r&&t!=="_"}}if(t==="_")return!1;for(;i<n;i++)if(t=e[i],t!=="_"){if(!ba(e.charCodeAt(i)))return!1;r=!0}return!(!r||t==="_")}function ka(e){var n=e,i=1,r;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),r=n[0],(r==="-"||r==="+")&&(r==="-"&&(i=-1),n=n.slice(1),r=n[0]),n==="0")return 0;if(r==="0"){if(n[1]==="b")return i*parseInt(n.slice(2),2);if(n[1]==="x")return i*parseInt(n.slice(2),16);if(n[1]==="o")return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)}function xa(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!O.isNegativeZero(e)}var tt=new N("tag:yaml.org,2002:int",{kind:"scalar",resolve:wa,construct:ka,predicate:xa,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Aa=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Sa(e){return!(e===null||!Aa.test(e)||e[e.length-1]==="_")}function Ca(e){var n,i;return n=e.replace(/_/g,"").toLowerCase(),i=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:i*parseFloat(n,10)}var Ta=/^[-+]?[0-9]+e/;function Ea(e,n){var i;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(O.isNegativeZero(e))return"-0.0";return i=e.toString(10),Ta.test(i)?i.replace("e",".e"):i}function Oa(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||O.isNegativeZero(e))}var lt=new N("tag:yaml.org,2002:float",{kind:"scalar",resolve:Sa,construct:Ca,predicate:Oa,represent:Ea,defaultStyle:"lowercase"}),at=nt.extend({implicit:[it,rt,tt,lt]}),ot=at,ct=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),st=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Na(e){return e===null?!1:ct.exec(e)!==null||st.exec(e)!==null}function Ia(e){var n,i,r,t,l,a,c,u=0,d=null,f,s,h;if(n=ct.exec(e),n===null&&(n=st.exec(e)),n===null)throw new Error("Date resolve error");if(i=+n[1],r=+n[2]-1,t=+n[3],!n[4])return new Date(Date.UTC(i,r,t));if(l=+n[4],a=+n[5],c=+n[6],n[7]){for(u=n[7].slice(0,3);u.length<3;)u+="0";u=+u}return n[9]&&(f=+n[10],s=+(n[11]||0),d=(f*60+s)*6e4,n[9]==="-"&&(d=-d)),h=new Date(Date.UTC(i,r,t,l,a,c,u)),d&&h.setTime(h.getTime()-d),h}function La(e){return e.toISOString()}var ut=new N("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Na,construct:Ia,instanceOf:Date,represent:La});function Fa(e){return e==="<<"||e===null}var dt=new N("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Fa}),mi=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
15
- \r`;function Ra(e){if(e===null)return!1;var n,i,r=0,t=e.length,l=mi;for(i=0;i<t;i++)if(n=l.indexOf(e.charAt(i)),!(n>64)){if(n<0)return!1;r+=6}return r%8===0}function Pa(e){var n,i,r=e.replace(/[\r\n=]/g,""),t=r.length,l=mi,a=0,c=[];for(n=0;n<t;n++)n%4===0&&n&&(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)),a=a<<6|l.indexOf(r.charAt(n));return i=t%4*6,i===0?(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)):i===18?(c.push(a>>10&255),c.push(a>>2&255)):i===12&&c.push(a>>4&255),new Uint8Array(c)}function $a(e){var n="",i=0,r,t,l=e.length,a=mi;for(r=0;r<l;r++)r%3===0&&r&&(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[i&63]),i=(i<<8)+e[r];return t=l%3,t===0?(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[i&63]):t===2?(n+=a[i>>10&63],n+=a[i>>4&63],n+=a[i<<2&63],n+=a[64]):t===1&&(n+=a[i>>2&63],n+=a[i<<4&63],n+=a[64],n+=a[64]),n}function Ma(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var ft=new N("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ra,construct:Pa,predicate:Ma,represent:$a}),Da=Object.prototype.hasOwnProperty,ja=Object.prototype.toString;function Ba(e){if(e===null)return!0;var n=[],i,r,t,l,a,c=e;for(i=0,r=c.length;i<r;i+=1){if(t=c[i],a=!1,ja.call(t)!=="[object Object]")return!1;for(l in t)if(Da.call(t,l))if(!a)a=!0;else return!1;if(!a)return!1;if(n.indexOf(l)===-1)n.push(l);else return!1}return!0}function Ua(e){return e!==null?e:[]}var pt=new N("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ba,construct:Ua}),Ha=Object.prototype.toString;function Wa(e){if(e===null)return!0;var n,i,r,t,l,a=e;for(l=new Array(a.length),n=0,i=a.length;n<i;n+=1){if(r=a[n],Ha.call(r)!=="[object Object]"||(t=Object.keys(r),t.length!==1))return!1;l[n]=[t[0],r[t[0]]]}return!0}function za(e){if(e===null)return[];var n,i,r,t,l,a=e;for(l=new Array(a.length),n=0,i=a.length;n<i;n+=1)r=a[n],t=Object.keys(r),l[n]=[t[0],r[t[0]]];return l}var ht=new N("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Wa,construct:za}),Ya=Object.prototype.hasOwnProperty;function Ka(e){if(e===null)return!0;var n,i=e;for(n in i)if(Ya.call(i,n)&&i[n]!==null)return!1;return!0}function qa(e){return e!==null?e:{}}var vt=new N("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ka,construct:qa}),gi=ot.extend({implicit:[ut,dt],explicit:[ft,pt,ht,vt]}),V=Object.prototype.hasOwnProperty,on=1,_t=2,mt=3,cn=4,jn=1,Ga=2,Vi=3,Va=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ja=/[\x85\u2028\u2029]/,Qa=/[,\[\]\{\}]/,gt=/^(?:!|!!|![a-z\-]+!)$/i,yt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ji(e){return Object.prototype.toString.call(e)}function B(e){return e===10||e===13}function X(e){return e===9||e===32}function R(e){return e===9||e===32||e===10||e===13}function fe(e){return e===44||e===91||e===93||e===123||e===125}function Za(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function Xa(e){return e===120?2:e===117?4:e===85?8:0}function eo(e){return 48<=e&&e<=57?e-48:-1}function Qi(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
16
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function no(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function bt(e,n,i){n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[n]=i}var wt=new Array(256),kt=new Array(256);for(var se=0;se<256;se++)wt[se]=Qi(se)?1:0,kt[se]=Qi(se);function io(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||gi,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function xt(e,n){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=aa(i),new F(n,i)}function y(e,n){throw xt(e,n)}function sn(e,n){e.onWarning&&e.onWarning.call(null,xt(e,n))}var Zi={YAML:function(n,i,r){var t,l,a;n.version!==null&&y(n,"duplication of %YAML directive"),r.length!==1&&y(n,"YAML directive accepts exactly one argument"),t=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),t===null&&y(n,"ill-formed argument of the YAML directive"),l=parseInt(t[1],10),a=parseInt(t[2],10),l!==1&&y(n,"unacceptable YAML version of the document"),n.version=r[0],n.checkLineBreaks=a<2,a!==1&&a!==2&&sn(n,"unsupported YAML version of the document")},TAG:function(n,i,r){var t,l;r.length!==2&&y(n,"TAG directive accepts exactly two arguments"),t=r[0],l=r[1],gt.test(t)||y(n,"ill-formed tag handle (first argument) of the TAG directive"),V.call(n.tagMap,t)&&y(n,'there is a previously declared suffix for "'+t+'" tag handle'),yt.test(l)||y(n,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{y(n,"tag prefix is malformed: "+l)}n.tagMap[t]=l}};function q(e,n,i,r){var t,l,a,c;if(n<i){if(c=e.input.slice(n,i),r)for(t=0,l=c.length;t<l;t+=1)a=c.charCodeAt(t),a===9||32<=a&&a<=1114111||y(e,"expected valid JSON character");else Va.test(c)&&y(e,"the stream contains non-printable characters");e.result+=c}}function Xi(e,n,i,r){var t,l,a,c;for(O.isObject(i)||y(e,"cannot merge mappings; the provided source object is unacceptable"),t=Object.keys(i),a=0,c=t.length;a<c;a+=1)l=t[a],V.call(n,l)||(bt(n,l,i[l]),r[l]=!0)}function pe(e,n,i,r,t,l,a,c,u){var d,f;if(Array.isArray(t))for(t=Array.prototype.slice.call(t),d=0,f=t.length;d<f;d+=1)Array.isArray(t[d])&&y(e,"nested arrays are not supported inside keys"),typeof t=="object"&&Ji(t[d])==="[object Object]"&&(t[d]="[object Object]");if(typeof t=="object"&&Ji(t)==="[object Object]"&&(t="[object Object]"),t=String(t),n===null&&(n={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(d=0,f=l.length;d<f;d+=1)Xi(e,n,l[d],i);else Xi(e,n,l,i);else!e.json&&!V.call(i,t)&&V.call(n,t)&&(e.line=a||e.line,e.lineStart=c||e.lineStart,e.position=u||e.position,y(e,"duplicated mapping key")),bt(n,t,l),delete i[t];return n}function yi(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):y(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function T(e,n,i){for(var r=0,t=e.input.charCodeAt(e.position);t!==0;){for(;X(t);)t===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),t=e.input.charCodeAt(++e.position);if(n&&t===35)do t=e.input.charCodeAt(++e.position);while(t!==10&&t!==13&&t!==0);if(B(t))for(yi(e),t=e.input.charCodeAt(e.position),r++,e.lineIndent=0;t===32;)e.lineIndent++,t=e.input.charCodeAt(++e.position);else break}return i!==-1&&r!==0&&e.lineIndent<i&&sn(e,"deficient indentation"),r}function En(e){var n=e.position,i;return i=e.input.charCodeAt(n),!!((i===45||i===46)&&i===e.input.charCodeAt(n+1)&&i===e.input.charCodeAt(n+2)&&(n+=3,i=e.input.charCodeAt(n),i===0||R(i)))}function bi(e,n){n===1?e.result+=" ":n>1&&(e.result+=O.repeat(`
17
- `,n-1))}function ro(e,n,i){var r,t,l,a,c,u,d,f,s=e.kind,h=e.result,p;if(p=e.input.charCodeAt(e.position),R(p)||fe(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(t=e.input.charCodeAt(e.position+1),R(t)||i&&fe(t)))return!1;for(e.kind="scalar",e.result="",l=a=e.position,c=!1;p!==0;){if(p===58){if(t=e.input.charCodeAt(e.position+1),R(t)||i&&fe(t))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),R(r))break}else{if(e.position===e.lineStart&&En(e)||i&&fe(p))break;if(B(p))if(u=e.line,d=e.lineStart,f=e.lineIndent,T(e,!1,-1),e.lineIndent>=n){c=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=u,e.lineStart=d,e.lineIndent=f;break}}c&&(q(e,l,a,!1),bi(e,e.line-u),l=a=e.position,c=!1),X(p)||(a=e.position+1),p=e.input.charCodeAt(++e.position)}return q(e,l,a,!1),e.result?!0:(e.kind=s,e.result=h,!1)}function to(e,n){var i,r,t;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=t=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(q(e,r,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)r=e.position,e.position++,t=e.position;else return!0;else B(i)?(q(e,r,t,!0),bi(e,T(e,!1,n)),r=t=e.position):e.position===e.lineStart&&En(e)?y(e,"unexpected end of the document within a single quoted scalar"):(e.position++,t=e.position);y(e,"unexpected end of the stream within a single quoted scalar")}function lo(e,n){var i,r,t,l,a,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return q(e,i,e.position,!0),e.position++,!0;if(c===92){if(q(e,i,e.position,!0),c=e.input.charCodeAt(++e.position),B(c))T(e,!1,n);else if(c<256&&wt[c])e.result+=kt[c],e.position++;else if((a=Xa(c))>0){for(t=a,l=0;t>0;t--)c=e.input.charCodeAt(++e.position),(a=Za(c))>=0?l=(l<<4)+a:y(e,"expected hexadecimal character");e.result+=no(l),e.position++}else y(e,"unknown escape sequence");i=r=e.position}else B(c)?(q(e,i,r,!0),bi(e,T(e,!1,n)),i=r=e.position):e.position===e.lineStart&&En(e)?y(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}y(e,"unexpected end of the stream within a double quoted scalar")}function ao(e,n){var i=!0,r,t,l,a=e.tag,c,u=e.anchor,d,f,s,h,p,v=Object.create(null),g,b,w,m;if(m=e.input.charCodeAt(e.position),m===91)f=93,p=!1,c=[];else if(m===123)f=125,p=!0,c={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),m=e.input.charCodeAt(++e.position);m!==0;){if(T(e,!0,n),m=e.input.charCodeAt(e.position),m===f)return e.position++,e.tag=a,e.anchor=u,e.kind=p?"mapping":"sequence",e.result=c,!0;i?m===44&&y(e,"expected the node content, but found ','"):y(e,"missed comma between flow collection entries"),b=g=w=null,s=h=!1,m===63&&(d=e.input.charCodeAt(e.position+1),R(d)&&(s=h=!0,e.position++,T(e,!0,n))),r=e.line,t=e.lineStart,l=e.position,me(e,n,on,!1,!0),b=e.tag,g=e.result,T(e,!0,n),m=e.input.charCodeAt(e.position),(h||e.line===r)&&m===58&&(s=!0,m=e.input.charCodeAt(++e.position),T(e,!0,n),me(e,n,on,!1,!0),w=e.result),p?pe(e,c,v,b,g,w,r,t,l):s?c.push(pe(e,null,v,b,g,w,r,t,l)):c.push(g),T(e,!0,n),m=e.input.charCodeAt(e.position),m===44?(i=!0,m=e.input.charCodeAt(++e.position)):i=!1}y(e,"unexpected end of the stream within a flow collection")}function oo(e,n){var i,r,t=jn,l=!1,a=!1,c=n,u=0,d=!1,f,s;if(s=e.input.charCodeAt(e.position),s===124)r=!1;else if(s===62)r=!0;else return!1;for(e.kind="scalar",e.result="";s!==0;)if(s=e.input.charCodeAt(++e.position),s===43||s===45)jn===t?t=s===43?Vi:Ga:y(e,"repeat of a chomping mode identifier");else if((f=eo(s))>=0)f===0?y(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?y(e,"repeat of an indentation width identifier"):(c=n+f-1,a=!0);else break;if(X(s)){do s=e.input.charCodeAt(++e.position);while(X(s));if(s===35)do s=e.input.charCodeAt(++e.position);while(!B(s)&&s!==0)}for(;s!==0;){for(yi(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!a||e.lineIndent<c)&&s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>c&&(c=e.lineIndent),B(s)){u++;continue}if(e.lineIndent<c){t===Vi?e.result+=O.repeat(`
15
+ \r`;function Ra(e){if(e===null)return!1;var n,i,r=0,t=e.length,l=mi;for(i=0;i<t;i++)if(n=l.indexOf(e.charAt(i)),!(n>64)){if(n<0)return!1;r+=6}return r%8===0}function Pa(e){var n,i,r=e.replace(/[\r\n=]/g,""),t=r.length,l=mi,a=0,c=[];for(n=0;n<t;n++)n%4===0&&n&&(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)),a=a<<6|l.indexOf(r.charAt(n));return i=t%4*6,i===0?(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)):i===18?(c.push(a>>10&255),c.push(a>>2&255)):i===12&&c.push(a>>4&255),new Uint8Array(c)}function $a(e){var n="",i=0,r,t,l=e.length,a=mi;for(r=0;r<l;r++)r%3===0&&r&&(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[i&63]),i=(i<<8)+e[r];return t=l%3,t===0?(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[i&63]):t===2?(n+=a[i>>10&63],n+=a[i>>4&63],n+=a[i<<2&63],n+=a[64]):t===1&&(n+=a[i>>2&63],n+=a[i<<4&63],n+=a[64],n+=a[64]),n}function Ma(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var ft=new N("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ra,construct:Pa,predicate:Ma,represent:$a}),Da=Object.prototype.hasOwnProperty,ja=Object.prototype.toString;function Ba(e){if(e===null)return!0;var n=[],i,r,t,l,a,c=e;for(i=0,r=c.length;i<r;i+=1){if(t=c[i],a=!1,ja.call(t)!=="[object Object]")return!1;for(l in t)if(Da.call(t,l))if(!a)a=!0;else return!1;if(!a)return!1;if(n.indexOf(l)===-1)n.push(l);else return!1}return!0}function Ua(e){return e!==null?e:[]}var pt=new N("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ba,construct:Ua}),Ha=Object.prototype.toString;function Wa(e){if(e===null)return!0;var n,i,r,t,l,a=e;for(l=new Array(a.length),n=0,i=a.length;n<i;n+=1){if(r=a[n],Ha.call(r)!=="[object Object]"||(t=Object.keys(r),t.length!==1))return!1;l[n]=[t[0],r[t[0]]]}return!0}function za(e){if(e===null)return[];var n,i,r,t,l,a=e;for(l=new Array(a.length),n=0,i=a.length;n<i;n+=1)r=a[n],t=Object.keys(r),l[n]=[t[0],r[t[0]]];return l}var ht=new N("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Wa,construct:za}),Ya=Object.prototype.hasOwnProperty;function Ka(e){if(e===null)return!0;var n,i=e;for(n in i)if(Ya.call(i,n)&&i[n]!==null)return!1;return!0}function qa(e){return e!==null?e:{}}var vt=new N("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ka,construct:qa}),gi=ot.extend({implicit:[ut,dt],explicit:[ft,pt,ht,vt]}),V=Object.prototype.hasOwnProperty,on=1,_t=2,mt=3,cn=4,jn=1,Ga=2,Vi=3,Va=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ja=/[\x85\u2028\u2029]/,Qa=/[,\[\]\{\}]/,gt=/^(?:!|!!|![a-z\-]+!)$/i,yt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ji(e){return Object.prototype.toString.call(e)}function U(e){return e===10||e===13}function X(e){return e===9||e===32}function R(e){return e===9||e===32||e===10||e===13}function fe(e){return e===44||e===91||e===93||e===123||e===125}function Za(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function Xa(e){return e===120?2:e===117?4:e===85?8:0}function eo(e){return 48<=e&&e<=57?e-48:-1}function Qi(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
16
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function no(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function bt(e,n,i){n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[n]=i}var wt=new Array(256),kt=new Array(256);for(var se=0;se<256;se++)wt[se]=Qi(se)?1:0,kt[se]=Qi(se);function io(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||gi,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function xt(e,n){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=aa(i),new F(n,i)}function y(e,n){throw xt(e,n)}function sn(e,n){e.onWarning&&e.onWarning.call(null,xt(e,n))}var Zi={YAML:function(n,i,r){var t,l,a;n.version!==null&&y(n,"duplication of %YAML directive"),r.length!==1&&y(n,"YAML directive accepts exactly one argument"),t=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),t===null&&y(n,"ill-formed argument of the YAML directive"),l=parseInt(t[1],10),a=parseInt(t[2],10),l!==1&&y(n,"unacceptable YAML version of the document"),n.version=r[0],n.checkLineBreaks=a<2,a!==1&&a!==2&&sn(n,"unsupported YAML version of the document")},TAG:function(n,i,r){var t,l;r.length!==2&&y(n,"TAG directive accepts exactly two arguments"),t=r[0],l=r[1],gt.test(t)||y(n,"ill-formed tag handle (first argument) of the TAG directive"),V.call(n.tagMap,t)&&y(n,'there is a previously declared suffix for "'+t+'" tag handle'),yt.test(l)||y(n,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{y(n,"tag prefix is malformed: "+l)}n.tagMap[t]=l}};function q(e,n,i,r){var t,l,a,c;if(n<i){if(c=e.input.slice(n,i),r)for(t=0,l=c.length;t<l;t+=1)a=c.charCodeAt(t),a===9||32<=a&&a<=1114111||y(e,"expected valid JSON character");else Va.test(c)&&y(e,"the stream contains non-printable characters");e.result+=c}}function Xi(e,n,i,r){var t,l,a,c;for(O.isObject(i)||y(e,"cannot merge mappings; the provided source object is unacceptable"),t=Object.keys(i),a=0,c=t.length;a<c;a+=1)l=t[a],V.call(n,l)||(bt(n,l,i[l]),r[l]=!0)}function pe(e,n,i,r,t,l,a,c,u){var d,f;if(Array.isArray(t))for(t=Array.prototype.slice.call(t),d=0,f=t.length;d<f;d+=1)Array.isArray(t[d])&&y(e,"nested arrays are not supported inside keys"),typeof t=="object"&&Ji(t[d])==="[object Object]"&&(t[d]="[object Object]");if(typeof t=="object"&&Ji(t)==="[object Object]"&&(t="[object Object]"),t=String(t),n===null&&(n={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(d=0,f=l.length;d<f;d+=1)Xi(e,n,l[d],i);else Xi(e,n,l,i);else!e.json&&!V.call(i,t)&&V.call(n,t)&&(e.line=a||e.line,e.lineStart=c||e.lineStart,e.position=u||e.position,y(e,"duplicated mapping key")),bt(n,t,l),delete i[t];return n}function yi(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):y(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function T(e,n,i){for(var r=0,t=e.input.charCodeAt(e.position);t!==0;){for(;X(t);)t===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),t=e.input.charCodeAt(++e.position);if(n&&t===35)do t=e.input.charCodeAt(++e.position);while(t!==10&&t!==13&&t!==0);if(U(t))for(yi(e),t=e.input.charCodeAt(e.position),r++,e.lineIndent=0;t===32;)e.lineIndent++,t=e.input.charCodeAt(++e.position);else break}return i!==-1&&r!==0&&e.lineIndent<i&&sn(e,"deficient indentation"),r}function En(e){var n=e.position,i;return i=e.input.charCodeAt(n),!!((i===45||i===46)&&i===e.input.charCodeAt(n+1)&&i===e.input.charCodeAt(n+2)&&(n+=3,i=e.input.charCodeAt(n),i===0||R(i)))}function bi(e,n){n===1?e.result+=" ":n>1&&(e.result+=O.repeat(`
17
+ `,n-1))}function ro(e,n,i){var r,t,l,a,c,u,d,f,s=e.kind,h=e.result,p;if(p=e.input.charCodeAt(e.position),R(p)||fe(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(t=e.input.charCodeAt(e.position+1),R(t)||i&&fe(t)))return!1;for(e.kind="scalar",e.result="",l=a=e.position,c=!1;p!==0;){if(p===58){if(t=e.input.charCodeAt(e.position+1),R(t)||i&&fe(t))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),R(r))break}else{if(e.position===e.lineStart&&En(e)||i&&fe(p))break;if(U(p))if(u=e.line,d=e.lineStart,f=e.lineIndent,T(e,!1,-1),e.lineIndent>=n){c=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=u,e.lineStart=d,e.lineIndent=f;break}}c&&(q(e,l,a,!1),bi(e,e.line-u),l=a=e.position,c=!1),X(p)||(a=e.position+1),p=e.input.charCodeAt(++e.position)}return q(e,l,a,!1),e.result?!0:(e.kind=s,e.result=h,!1)}function to(e,n){var i,r,t;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=t=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(q(e,r,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)r=e.position,e.position++,t=e.position;else return!0;else U(i)?(q(e,r,t,!0),bi(e,T(e,!1,n)),r=t=e.position):e.position===e.lineStart&&En(e)?y(e,"unexpected end of the document within a single quoted scalar"):(e.position++,t=e.position);y(e,"unexpected end of the stream within a single quoted scalar")}function lo(e,n){var i,r,t,l,a,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return q(e,i,e.position,!0),e.position++,!0;if(c===92){if(q(e,i,e.position,!0),c=e.input.charCodeAt(++e.position),U(c))T(e,!1,n);else if(c<256&&wt[c])e.result+=kt[c],e.position++;else if((a=Xa(c))>0){for(t=a,l=0;t>0;t--)c=e.input.charCodeAt(++e.position),(a=Za(c))>=0?l=(l<<4)+a:y(e,"expected hexadecimal character");e.result+=no(l),e.position++}else y(e,"unknown escape sequence");i=r=e.position}else U(c)?(q(e,i,r,!0),bi(e,T(e,!1,n)),i=r=e.position):e.position===e.lineStart&&En(e)?y(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}y(e,"unexpected end of the stream within a double quoted scalar")}function ao(e,n){var i=!0,r,t,l,a=e.tag,c,u=e.anchor,d,f,s,h,p,v=Object.create(null),g,b,w,m;if(m=e.input.charCodeAt(e.position),m===91)f=93,p=!1,c=[];else if(m===123)f=125,p=!0,c={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),m=e.input.charCodeAt(++e.position);m!==0;){if(T(e,!0,n),m=e.input.charCodeAt(e.position),m===f)return e.position++,e.tag=a,e.anchor=u,e.kind=p?"mapping":"sequence",e.result=c,!0;i?m===44&&y(e,"expected the node content, but found ','"):y(e,"missed comma between flow collection entries"),b=g=w=null,s=h=!1,m===63&&(d=e.input.charCodeAt(e.position+1),R(d)&&(s=h=!0,e.position++,T(e,!0,n))),r=e.line,t=e.lineStart,l=e.position,me(e,n,on,!1,!0),b=e.tag,g=e.result,T(e,!0,n),m=e.input.charCodeAt(e.position),(h||e.line===r)&&m===58&&(s=!0,m=e.input.charCodeAt(++e.position),T(e,!0,n),me(e,n,on,!1,!0),w=e.result),p?pe(e,c,v,b,g,w,r,t,l):s?c.push(pe(e,null,v,b,g,w,r,t,l)):c.push(g),T(e,!0,n),m=e.input.charCodeAt(e.position),m===44?(i=!0,m=e.input.charCodeAt(++e.position)):i=!1}y(e,"unexpected end of the stream within a flow collection")}function oo(e,n){var i,r,t=jn,l=!1,a=!1,c=n,u=0,d=!1,f,s;if(s=e.input.charCodeAt(e.position),s===124)r=!1;else if(s===62)r=!0;else return!1;for(e.kind="scalar",e.result="";s!==0;)if(s=e.input.charCodeAt(++e.position),s===43||s===45)jn===t?t=s===43?Vi:Ga:y(e,"repeat of a chomping mode identifier");else if((f=eo(s))>=0)f===0?y(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?y(e,"repeat of an indentation width identifier"):(c=n+f-1,a=!0);else break;if(X(s)){do s=e.input.charCodeAt(++e.position);while(X(s));if(s===35)do s=e.input.charCodeAt(++e.position);while(!U(s)&&s!==0)}for(;s!==0;){for(yi(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!a||e.lineIndent<c)&&s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>c&&(c=e.lineIndent),U(s)){u++;continue}if(e.lineIndent<c){t===Vi?e.result+=O.repeat(`
18
18
  `,l?1+u:u):t===jn&&l&&(e.result+=`
19
19
  `);break}for(r?X(s)?(d=!0,e.result+=O.repeat(`
20
20
  `,l?1+u:u)):d?(d=!1,e.result+=O.repeat(`
21
21
  `,u+1)):u===0?l&&(e.result+=" "):e.result+=O.repeat(`
22
22
  `,u):e.result+=O.repeat(`
23
- `,l?1+u:u),l=!0,a=!0,u=0,i=e.position;!B(s)&&s!==0;)s=e.input.charCodeAt(++e.position);q(e,i,e.position,!1)}return!0}function er(e,n){var i,r=e.tag,t=e.anchor,l=[],a,c=!1,u;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),u=e.input.charCodeAt(e.position);u!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,y(e,"tab characters must not be used in indentation")),!(u!==45||(a=e.input.charCodeAt(e.position+1),!R(a))));){if(c=!0,e.position++,T(e,!0,-1)&&e.lineIndent<=n){l.push(null),u=e.input.charCodeAt(e.position);continue}if(i=e.line,me(e,n,mt,!1,!0),l.push(e.result),T(e,!0,-1),u=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>n)&&u!==0)y(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return c?(e.tag=r,e.anchor=t,e.kind="sequence",e.result=l,!0):!1}function co(e,n,i){var r,t,l,a,c,u,d=e.tag,f=e.anchor,s={},h=Object.create(null),p=null,v=null,g=null,b=!1,w=!1,m;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),m=e.input.charCodeAt(e.position);m!==0;){if(!b&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,y(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),l=e.line,(m===63||m===58)&&R(r))m===63?(b&&(pe(e,s,h,p,v,null,a,c,u),p=v=g=null),w=!0,b=!0,t=!0):b?(b=!1,t=!0):y(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,m=r;else{if(a=e.line,c=e.lineStart,u=e.position,!me(e,i,_t,!1,!0))break;if(e.line===l){for(m=e.input.charCodeAt(e.position);X(m);)m=e.input.charCodeAt(++e.position);if(m===58)m=e.input.charCodeAt(++e.position),R(m)||y(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(pe(e,s,h,p,v,null,a,c,u),p=v=g=null),w=!0,b=!1,t=!1,p=e.tag,v=e.result;else if(w)y(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=d,e.anchor=f,!0}else if(w)y(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=d,e.anchor=f,!0}if((e.line===l||e.lineIndent>n)&&(b&&(a=e.line,c=e.lineStart,u=e.position),me(e,n,cn,!0,t)&&(b?v=e.result:g=e.result),b||(pe(e,s,h,p,v,g,a,c,u),p=v=g=null),T(e,!0,-1),m=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>n)&&m!==0)y(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return b&&pe(e,s,h,p,v,null,a,c,u),w&&(e.tag=d,e.anchor=f,e.kind="mapping",e.result=s),w}function so(e){var n,i=!1,r=!1,t,l,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&y(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(i=!0,a=e.input.charCodeAt(++e.position)):a===33?(r=!0,t="!!",a=e.input.charCodeAt(++e.position)):t="!",n=e.position,i){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(l=e.input.slice(n,e.position),a=e.input.charCodeAt(++e.position)):y(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!R(a);)a===33&&(r?y(e,"tag suffix cannot contain exclamation marks"):(t=e.input.slice(n-1,e.position+1),gt.test(t)||y(e,"named tag handle cannot contain such characters"),r=!0,n=e.position+1)),a=e.input.charCodeAt(++e.position);l=e.input.slice(n,e.position),Qa.test(l)&&y(e,"tag suffix cannot contain flow indicator characters")}l&&!yt.test(l)&&y(e,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{y(e,"tag name is malformed: "+l)}return i?e.tag=l:V.call(e.tagMap,t)?e.tag=e.tagMap[t]+l:t==="!"?e.tag="!"+l:t==="!!"?e.tag="tag:yaml.org,2002:"+l:y(e,'undeclared tag handle "'+t+'"'),!0}function uo(e){var n,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&y(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!R(i)&&!fe(i);)i=e.input.charCodeAt(++e.position);return e.position===n&&y(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function fo(e){var n,i,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!R(r)&&!fe(r);)r=e.input.charCodeAt(++e.position);return e.position===n&&y(e,"name of an alias node must contain at least one character"),i=e.input.slice(n,e.position),V.call(e.anchorMap,i)||y(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],T(e,!0,-1),!0}function me(e,n,i,r,t){var l,a,c,u=1,d=!1,f=!1,s,h,p,v,g,b;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=a=c=cn===i||mt===i,r&&T(e,!0,-1)&&(d=!0,e.lineIndent>n?u=1:e.lineIndent===n?u=0:e.lineIndent<n&&(u=-1)),u===1)for(;so(e)||uo(e);)T(e,!0,-1)?(d=!0,c=l,e.lineIndent>n?u=1:e.lineIndent===n?u=0:e.lineIndent<n&&(u=-1)):c=!1;if(c&&(c=d||t),(u===1||cn===i)&&(on===i||_t===i?g=n:g=n+1,b=e.position-e.lineStart,u===1?c&&(er(e,b)||co(e,b,g))||ao(e,g)?f=!0:(a&&oo(e,g)||to(e,g)||lo(e,g)?f=!0:fo(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&y(e,"alias node should not have any properties")):ro(e,g,on===i)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):u===0&&(f=c&&er(e,b))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&y(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),s=0,h=e.implicitTypes.length;s<h;s+=1)if(v=e.implicitTypes[s],v.resolve(e.result)){e.result=v.construct(e.result),e.tag=v.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(V.call(e.typeMap[e.kind||"fallback"],e.tag))v=e.typeMap[e.kind||"fallback"][e.tag];else for(v=null,p=e.typeMap.multi[e.kind||"fallback"],s=0,h=p.length;s<h;s+=1)if(e.tag.slice(0,p[s].tag.length)===p[s].tag){v=p[s];break}v||y(e,"unknown tag !<"+e.tag+">"),e.result!==null&&v.kind!==e.kind&&y(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result,e.tag)?(e.result=v.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):y(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||f}function po(e){var n=e.position,i,r,t,l=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(T(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(l=!0,a=e.input.charCodeAt(++e.position),i=e.position;a!==0&&!R(a);)a=e.input.charCodeAt(++e.position);for(r=e.input.slice(i,e.position),t=[],r.length<1&&y(e,"directive name must not be less than one character in length");a!==0;){for(;X(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!B(a));break}if(B(a))break;for(i=e.position;a!==0&&!R(a);)a=e.input.charCodeAt(++e.position);t.push(e.input.slice(i,e.position))}a!==0&&yi(e),V.call(Zi,r)?Zi[r](e,r,t):sn(e,'unknown document directive "'+r+'"')}if(T(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,T(e,!0,-1)):l&&y(e,"directives end mark is expected"),me(e,e.lineIndent-1,cn,!1,!0),T(e,!0,-1),e.checkLineBreaks&&Ja.test(e.input.slice(n,e.position))&&sn(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&En(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,T(e,!0,-1));return}if(e.position<e.length-1)y(e,"end of the stream or a document separator is expected");else return}function At(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
23
+ `,l?1+u:u),l=!0,a=!0,u=0,i=e.position;!U(s)&&s!==0;)s=e.input.charCodeAt(++e.position);q(e,i,e.position,!1)}return!0}function er(e,n){var i,r=e.tag,t=e.anchor,l=[],a,c=!1,u;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),u=e.input.charCodeAt(e.position);u!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,y(e,"tab characters must not be used in indentation")),!(u!==45||(a=e.input.charCodeAt(e.position+1),!R(a))));){if(c=!0,e.position++,T(e,!0,-1)&&e.lineIndent<=n){l.push(null),u=e.input.charCodeAt(e.position);continue}if(i=e.line,me(e,n,mt,!1,!0),l.push(e.result),T(e,!0,-1),u=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>n)&&u!==0)y(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return c?(e.tag=r,e.anchor=t,e.kind="sequence",e.result=l,!0):!1}function co(e,n,i){var r,t,l,a,c,u,d=e.tag,f=e.anchor,s={},h=Object.create(null),p=null,v=null,g=null,b=!1,w=!1,m;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),m=e.input.charCodeAt(e.position);m!==0;){if(!b&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,y(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),l=e.line,(m===63||m===58)&&R(r))m===63?(b&&(pe(e,s,h,p,v,null,a,c,u),p=v=g=null),w=!0,b=!0,t=!0):b?(b=!1,t=!0):y(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,m=r;else{if(a=e.line,c=e.lineStart,u=e.position,!me(e,i,_t,!1,!0))break;if(e.line===l){for(m=e.input.charCodeAt(e.position);X(m);)m=e.input.charCodeAt(++e.position);if(m===58)m=e.input.charCodeAt(++e.position),R(m)||y(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(pe(e,s,h,p,v,null,a,c,u),p=v=g=null),w=!0,b=!1,t=!1,p=e.tag,v=e.result;else if(w)y(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=d,e.anchor=f,!0}else if(w)y(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=d,e.anchor=f,!0}if((e.line===l||e.lineIndent>n)&&(b&&(a=e.line,c=e.lineStart,u=e.position),me(e,n,cn,!0,t)&&(b?v=e.result:g=e.result),b||(pe(e,s,h,p,v,g,a,c,u),p=v=g=null),T(e,!0,-1),m=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>n)&&m!==0)y(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return b&&pe(e,s,h,p,v,null,a,c,u),w&&(e.tag=d,e.anchor=f,e.kind="mapping",e.result=s),w}function so(e){var n,i=!1,r=!1,t,l,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&y(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(i=!0,a=e.input.charCodeAt(++e.position)):a===33?(r=!0,t="!!",a=e.input.charCodeAt(++e.position)):t="!",n=e.position,i){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(l=e.input.slice(n,e.position),a=e.input.charCodeAt(++e.position)):y(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!R(a);)a===33&&(r?y(e,"tag suffix cannot contain exclamation marks"):(t=e.input.slice(n-1,e.position+1),gt.test(t)||y(e,"named tag handle cannot contain such characters"),r=!0,n=e.position+1)),a=e.input.charCodeAt(++e.position);l=e.input.slice(n,e.position),Qa.test(l)&&y(e,"tag suffix cannot contain flow indicator characters")}l&&!yt.test(l)&&y(e,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{y(e,"tag name is malformed: "+l)}return i?e.tag=l:V.call(e.tagMap,t)?e.tag=e.tagMap[t]+l:t==="!"?e.tag="!"+l:t==="!!"?e.tag="tag:yaml.org,2002:"+l:y(e,'undeclared tag handle "'+t+'"'),!0}function uo(e){var n,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&y(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!R(i)&&!fe(i);)i=e.input.charCodeAt(++e.position);return e.position===n&&y(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function fo(e){var n,i,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!R(r)&&!fe(r);)r=e.input.charCodeAt(++e.position);return e.position===n&&y(e,"name of an alias node must contain at least one character"),i=e.input.slice(n,e.position),V.call(e.anchorMap,i)||y(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],T(e,!0,-1),!0}function me(e,n,i,r,t){var l,a,c,u=1,d=!1,f=!1,s,h,p,v,g,b;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=a=c=cn===i||mt===i,r&&T(e,!0,-1)&&(d=!0,e.lineIndent>n?u=1:e.lineIndent===n?u=0:e.lineIndent<n&&(u=-1)),u===1)for(;so(e)||uo(e);)T(e,!0,-1)?(d=!0,c=l,e.lineIndent>n?u=1:e.lineIndent===n?u=0:e.lineIndent<n&&(u=-1)):c=!1;if(c&&(c=d||t),(u===1||cn===i)&&(on===i||_t===i?g=n:g=n+1,b=e.position-e.lineStart,u===1?c&&(er(e,b)||co(e,b,g))||ao(e,g)?f=!0:(a&&oo(e,g)||to(e,g)||lo(e,g)?f=!0:fo(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&y(e,"alias node should not have any properties")):ro(e,g,on===i)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):u===0&&(f=c&&er(e,b))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&y(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),s=0,h=e.implicitTypes.length;s<h;s+=1)if(v=e.implicitTypes[s],v.resolve(e.result)){e.result=v.construct(e.result),e.tag=v.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(V.call(e.typeMap[e.kind||"fallback"],e.tag))v=e.typeMap[e.kind||"fallback"][e.tag];else for(v=null,p=e.typeMap.multi[e.kind||"fallback"],s=0,h=p.length;s<h;s+=1)if(e.tag.slice(0,p[s].tag.length)===p[s].tag){v=p[s];break}v||y(e,"unknown tag !<"+e.tag+">"),e.result!==null&&v.kind!==e.kind&&y(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result,e.tag)?(e.result=v.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):y(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||f}function po(e){var n=e.position,i,r,t,l=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(T(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(l=!0,a=e.input.charCodeAt(++e.position),i=e.position;a!==0&&!R(a);)a=e.input.charCodeAt(++e.position);for(r=e.input.slice(i,e.position),t=[],r.length<1&&y(e,"directive name must not be less than one character in length");a!==0;){for(;X(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!U(a));break}if(U(a))break;for(i=e.position;a!==0&&!R(a);)a=e.input.charCodeAt(++e.position);t.push(e.input.slice(i,e.position))}a!==0&&yi(e),V.call(Zi,r)?Zi[r](e,r,t):sn(e,'unknown document directive "'+r+'"')}if(T(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,T(e,!0,-1)):l&&y(e,"directives end mark is expected"),me(e,e.lineIndent-1,cn,!1,!0),T(e,!0,-1),e.checkLineBreaks&&Ja.test(e.input.slice(n,e.position))&&sn(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&En(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,T(e,!0,-1));return}if(e.position<e.length-1)y(e,"end of the stream or a document separator is expected");else return}function At(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
24
24
  `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new io(e,n),r=e.indexOf("\0");for(r!==-1&&(i.position=r,y(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)po(i);return i.documents}function ho(e,n,i){n!==null&&typeof n=="object"&&typeof i>"u"&&(i=n,n=null);var r=At(e,i);if(typeof n!="function")return r;for(var t=0,l=r.length;t<l;t+=1)n(r[t])}function vo(e,n){var i=At(e,n);if(i.length!==0){if(i.length===1)return i[0];throw new F("expected a single document in the stream, but found more")}}var _o=ho,mo=vo,St={loadAll:_o,load:mo},Ct=Object.prototype.toString,Tt=Object.prototype.hasOwnProperty,wi=65279,go=9,Re=10,yo=13,bo=32,wo=33,ko=34,Zn=35,xo=37,Ao=38,So=39,Co=42,Et=44,To=45,un=58,Eo=61,Oo=62,No=63,Io=64,Ot=91,Nt=93,Lo=96,It=123,Fo=124,Lt=125,L={};L[0]="\\0";L[7]="\\a";L[8]="\\b";L[9]="\\t";L[10]="\\n";L[11]="\\v";L[12]="\\f";L[13]="\\r";L[27]="\\e";L[34]='\\"';L[92]="\\\\";L[133]="\\N";L[160]="\\_";L[8232]="\\L";L[8233]="\\P";var Ro=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Po=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function $o(e,n){var i,r,t,l,a,c,u;if(n===null)return{};for(i={},r=Object.keys(n),t=0,l=r.length;t<l;t+=1)a=r[t],c=String(n[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),u=e.compiledTypeMap.fallback[a],u&&Tt.call(u.styleAliases,c)&&(c=u.styleAliases[c]),i[a]=c;return i}function Mo(e){var n,i,r;if(n=e.toString(16).toUpperCase(),e<=255)i="x",r=2;else if(e<=65535)i="u",r=4;else if(e<=4294967295)i="U",r=8;else throw new F("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+O.repeat("0",r-n.length)+n}var Do=1,Pe=2;function jo(e){this.schema=e.schema||gi,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=O.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=$o(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Pe:Do,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function nr(e,n){for(var i=O.repeat(" ",n),r=0,t=-1,l="",a,c=e.length;r<c;)t=e.indexOf(`
25
25
  `,r),t===-1?(a=e.slice(r),r=c):(a=e.slice(r,t+1),r=t+1),a.length&&a!==`
26
26
  `&&(l+=i),l+=a;return l}function Xn(e,n){return`
@@ -36,5 +36,5 @@
36
36
  `+e.slice(t,l),t=l+1),a=c;return u+=`
37
37
  `,e.length-t>n&&a>t?u+=e.slice(t,a)+`
38
38
  `+e.slice(a+1):u+=e.slice(t),u.slice(1)}function Ko(e){for(var n="",i=0,r,t=0;t<e.length;i>=65536?t+=2:t++)i=we(e,t),r=L[i],!r&&$e(i)?(n+=e[t],i>=65536&&(n+=e[t+1])):n+=r||Mo(i);return n}function qo(e,n,i){var r="",t=e.tag,l,a,c;for(l=0,a=i.length;l<a;l+=1)c=i[l],e.replacer&&(c=e.replacer.call(i,String(l),c)),(z(e,n,c,!1,!1)||typeof c>"u"&&z(e,n,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=t,e.dump="["+r+"]"}function or(e,n,i,r){var t="",l=e.tag,a,c,u;for(a=0,c=i.length;a<c;a+=1)u=i[a],e.replacer&&(u=e.replacer.call(i,String(a),u)),(z(e,n+1,u,!0,!0,!1,!0)||typeof u>"u"&&z(e,n+1,null,!0,!0,!1,!0))&&((!r||t!=="")&&(t+=Xn(e,n)),e.dump&&Re===e.dump.charCodeAt(0)?t+="-":t+="- ",t+=e.dump);e.tag=l,e.dump=t||"[]"}function Go(e,n,i){var r="",t=e.tag,l=Object.keys(i),a,c,u,d,f;for(a=0,c=l.length;a<c;a+=1)f="",r!==""&&(f+=", "),e.condenseFlow&&(f+='"'),u=l[a],d=i[u],e.replacer&&(d=e.replacer.call(i,u,d)),z(e,n,u,!1,!1)&&(e.dump.length>1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),z(e,n,d,!1,!1)&&(f+=e.dump,r+=f));e.tag=t,e.dump="{"+r+"}"}function Vo(e,n,i,r){var t="",l=e.tag,a=Object.keys(i),c,u,d,f,s,h;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new F("sortKeys must be a boolean or a function");for(c=0,u=a.length;c<u;c+=1)h="",(!r||t!=="")&&(h+=Xn(e,n)),d=a[c],f=i[d],e.replacer&&(f=e.replacer.call(i,d,f)),z(e,n+1,d,!0,!0,!0)&&(s=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,s&&(e.dump&&Re===e.dump.charCodeAt(0)?h+="?":h+="? "),h+=e.dump,s&&(h+=Xn(e,n)),z(e,n+1,f,!0,s)&&(e.dump&&Re===e.dump.charCodeAt(0)?h+=":":h+=": ",h+=e.dump,t+=h));e.tag=l,e.dump=t||"{}"}function cr(e,n,i){var r,t,l,a,c,u;for(t=i?e.explicitTypes:e.implicitTypes,l=0,a=t.length;l<a;l+=1)if(c=t[l],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof n=="object"&&n instanceof c.instanceOf)&&(!c.predicate||c.predicate(n))){if(i?c.multi&&c.representName?e.tag=c.representName(n):e.tag=c.tag:e.tag="?",c.represent){if(u=e.styleMap[c.tag]||c.defaultStyle,Ct.call(c.represent)==="[object Function]")r=c.represent(n,u);else if(Tt.call(c.represent,u))r=c.represent[u](n,u);else throw new F("!<"+c.tag+'> tag resolver accepts not "'+u+'" style');e.dump=r}return!0}return!1}function z(e,n,i,r,t,l,a){e.tag=null,e.dump=i,cr(e,i,!1)||cr(e,i,!0);var c=Ct.call(e.dump),u=r,d;r&&(r=e.flowLevel<0||e.flowLevel>n);var f=c==="[object Object]"||c==="[object Array]",s,h;if(f&&(s=e.duplicates.indexOf(i),h=s!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&n>0)&&(t=!1),h&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(f&&h&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),c==="[object Object]")r&&Object.keys(e.dump).length!==0?(Vo(e,n,e.dump,t),h&&(e.dump="&ref_"+s+e.dump)):(Go(e,n,e.dump),h&&(e.dump="&ref_"+s+" "+e.dump));else if(c==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!a&&n>0?or(e,n-1,e.dump,t):or(e,n,e.dump,t),h&&(e.dump="&ref_"+s+e.dump)):(qo(e,n,e.dump),h&&(e.dump="&ref_"+s+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&zo(e,e.dump,n,l,u);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new F("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function Jo(e,n){var i=[],r=[],t,l;for(ni(e,i,r),t=0,l=r.length;t<l;t+=1)n.duplicates.push(i[r[t]]);n.usedDuplicates=new Array(l)}function ni(e,n,i){var r,t,l;if(e!==null&&typeof e=="object")if(t=n.indexOf(e),t!==-1)i.indexOf(t)===-1&&i.push(t);else if(n.push(e),Array.isArray(e))for(t=0,l=e.length;t<l;t+=1)ni(e[t],n,i);else for(r=Object.keys(e),t=0,l=r.length;t<l;t+=1)ni(e[r[t]],n,i)}function Qo(e,n){n=n||{};var i=new jo(n);i.noRefs||Jo(e,i);var r=e;return i.replacer&&(r=i.replacer.call({"":r},"",r)),z(i,0,r,!0,!0)?i.dump+`
39
- `:""}var Zo=Qo,Xo={dump:Zo};function ki(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var ec=N,nc=Qr,ic=nt,rc=at,tc=ot,lc=gi,ac=St.load,oc=St.loadAll,cc=Xo.dump,sc=F,uc={binary:ft,float:lt,map:et,null:it,pairs:ht,set:vt,timestamp:ut,bool:rt,int:tt,merge:dt,omap:pt,seq:Xr,str:Zr},dc=ki("safeLoad","load"),fc=ki("safeLoadAll","loadAll"),pc=ki("safeDump","dump"),hc={Type:ec,Schema:nc,FAILSAFE_SCHEMA:ic,JSON_SCHEMA:rc,CORE_SCHEMA:tc,DEFAULT_SCHEMA:lc,load:ac,loadAll:oc,dump:cc,YAMLException:sc,types:uc,safeLoad:dc,safeLoadAll:fc,safeDump:pc};function vc(e){if(e.trim()==="")return{};const i=hc.load(e);if(i==null)return{};if(typeof i!="object"||Array.isArray(i))throw new Error(".agent-user.yml must parse to an object");return i}const sr={id:"welcome",title:"Welcome — who are you?",navLabel:"You",subtitle:"Your name and language. Stored in .agent-user.yml; we pre-fill what we can detect.",kind:"welcome"},_c=[{id:"ai-tools",title:"Which AI tools do you use?",navLabel:"AI tools",subtitle:"Pick the editors and CLIs that should pick up this config. Auto-detect runs first; you can override.",kind:"aiTools"},{id:"roles",title:"What do you work on?",navLabel:"Roles",subtitle:"Pick the areas you work in. We use them to recommend capability packs on the next step, and they become your roles in .agent-user.yml.",kind:"roles"},{id:"packs",title:"Which capability packs do you want?",navLabel:"Packs",subtitle:"Founder-strategy, finance-basic, gtm-sales, ops-people, ai-video — pick zero or more. You can change this later.",kind:"packs"}],ur=[{id:"identity",title:"Editor and tooling",navLabel:"Editor",subtitle:"IDE goes into .agent-settings.yml so the agent opens files in the right tool. rtk presence is auto-detected (see the rtk row). Your name lives in .agent-user.yml (later step).",kind:"form",paths:["personal.ide","personal.open_edited_files"]},{id:"personality",title:"How should the agent behave?",navLabel:"Personality",subtitle:"Autonomy, output verbosity, and PR-comment style.",kind:"form",paths:["personal.autonomy","personal.minimal_output","personal.play_by_play","personal.pr_comment_bot_icon"]},{id:"cost",title:"Cost profile and budgets",navLabel:"Cost",subtitle:"Master switch for which rule tiers load, plus optional spending ceilings.",kind:"form",paths:["cost_profile","cost.budgets.daily","cost.budgets.weekly","cost.budgets.monthly","cost.enforcement"]},{id:"roadmap-quality",title:"Roadmap & quality cadence",navLabel:"Roadmap & quality",subtitle:"When the agent runs quality tools and refreshes roadmap dashboards.",kind:"form",paths:["roadmap.quality_cadence","roadmap.dashboard_regen_cadence","quality.local_auto_run","quality.wait_for_remote_ci"]},{id:"memory",title:"Memory & redaction",navLabel:"Memory",subtitle:"Inline-review threshold and transcript-redaction regexes.",kind:"form",paths:["memory.review_threshold","memory.redact_patterns"]},{id:"user-md",title:"Your .agent-user.yml",navLabel:"User profile",subtitle:"Identity, voice, preferences. Stored at agents/settings/.agent-user.yml. Skip to leave empty.",kind:"userMd"},{id:"review",title:"Review & finish",navLabel:"Review",subtitle:"These keys will change. Confirm to write .agent-settings.yml and .agent-user.yml atomically.",kind:"review"}];function Mt(e={}){return e.extended===!0?[sr,..._c,...ur]:[sr,...ur]}function On(e,n={}){const i=Mt(n),r=Math.max(0,Math.min(i.length-1,e));return i[r]}function mc(e,n){const i={type:"object",properties:{},...e.description!==void 0?{description:e.description}:{}},r=i.properties,t=e.properties??{};for(const l of n){const a=l.split(".").filter(D=>D.length>0);if(a.length===0)continue;const[c,u,d]=a;if(c===void 0)continue;const f=t[c];if(f===void 0)continue;if(u===void 0){r[c]=f;continue}const s=f.properties?.[u];if(s===void 0)continue;const p=r[c]??{type:"object",properties:{},...f.description!==void 0?{description:f.description}:{}},v=p.properties??={};if(d===void 0){v[u]=s,r[c]=p;continue}const g=s.properties?.[d];if(g===void 0)continue;const w=v[u]??{type:"object",properties:{},...s.description!==void 0?{description:s.description}:{}},m=w.properties??={};m[d]=g,v[u]=w,r[c]=p}return i}function gc({current:e,total:n}){const i=Math.max(1,n),r=Math.max(0,Math.min(i-1,e)),t=Array.from({length:i},(a,c)=>c<=r),l=Math.round((r+1)/i*100);return o("div",{class:"ac-wizard__progress",role:"progressbar","aria-valuenow":r+1,"aria-valuemin":1,"aria-valuemax":i,"aria-valuetext":`Step ${r+1} of ${i} (${l}%)`,children:t.map((a,c)=>o("span",{class:`ac-wizard__progress-segment${a?" ac-wizard__progress-segment--filled":""}`,"aria-hidden":"true"},c))})}function yc({step:e,index:n,total:i}){return o("header",{class:"ac-page__header ac-wizard__header",children:[o("p",{class:"ac-wizard__step-count",children:["Step ",n+1," of ",i]}),o("div",{class:"ac-wizard__header-text",children:[o("h1",{children:e.title}),o("p",{class:"ac-wizard__subtitle",children:e.subtitle})]}),o(gc,{current:n,total:i})]})}function bc(e){const n=e.canFinish??!0,i=e.completed??!1;return o("div",{class:"ac-form__actions ac-wizard__nav",children:[o("button",{type:"button",class:"ac-button",disabled:!e.canGoPrev||e.busy,onClick:e.onPrev,children:"Back"}),e.canSkip&&e.onSkip!==void 0?o("button",{type:"button",class:"ac-button ac-wizard__skip",disabled:e.busy,onClick:e.onSkip,children:e.skipLabel??"Skip"}):null,e.isLast?i?null:o("button",{type:"button",class:"ac-button ac-button--primary",disabled:e.busy||!n,onClick:e.onFinish,children:e.busy?"Saving…":"Finish & save"}):o("button",{type:"button",class:"ac-button ac-button--primary",disabled:!e.canGoNext||e.busy,onClick:e.onNext,children:e.nextLabel??"Next"})]})}function Dt(e,n){return e.kind!=="form"||e.paths===void 0?!1:!!(e.paths.includes(n)||e.id==="cost"&&(n.startsWith("telegraph.")||n.startsWith("verbosity.")))}function wc(e,n){return e.kind==="userMd"?n==="body"||n.startsWith("body."):Dt(e,n)}function kc(e,n){for(const i of Object.keys(n.errors))if(wc(e,i))return!0;return!1}function xc(e,n){if(kc(e,n))return{label:"needs attention",tone:"error"};if(e.kind==="userMd")return n.userMdChanged?{label:n.userMdAction==="create"?"will create":"will replace",tone:"changed"}:{label:"",tone:"idle"};if(e.kind==="form"){const i=n.changes.filter(r=>Dt(e,r.path)).length;return i===0?{label:"",tone:"idle"}:{label:`${i} change${i===1?"":"s"}`,tone:"changed"}}if(e.kind==="aiTools"){const i=n.selectedToolsCount??0;return i===0?{label:"",tone:"idle"}:{label:`${i} tool${i===1?"":"s"}`,tone:"changed"}}if(e.kind==="packs"){const i=n.selectedPacksCount??0;return i===0?{label:"",tone:"idle"}:{label:`${i} pack${i===1?"":"s"}`,tone:"changed"}}return{label:"",tone:"idle"}}function Ac(e){const n=e.steps.filter((i,r)=>r!==e.currentIndex);return o(J,{children:o("nav",{class:"ac-wizard__review-nav","aria-label":"Jump back to a step",children:[o("p",{class:"ac-wizard__review-nav-label",children:"Jump back to a step:"}),o("ul",{class:"ac-wizard__review-nav-list",children:n.map(i=>{const r=e.steps.indexOf(i),t=xc(i,e),l=t.tone==="error"?"ac-wizard__review-nav-button ac-wizard__review-nav-button--error":"ac-wizard__review-nav-button";return o("li",{children:o("button",{type:"button",class:l,onClick:()=>{e.onJump(r)},children:[o("span",{class:"ac-wizard__review-nav-index",children:r+1}),o("span",{class:"ac-wizard__review-nav-text",children:i.navLabel}),t.label!==""?o("span",{class:`ac-wizard__review-nav-status ac-wizard__review-nav-status--${t.tone}`,children:t.label}):null]})},i.id)})})]})})}function Sc(e){const n=e.abortedAt??"unknown time",i=e.abortNote??"no further detail recorded",r=e.writesSinceRollback;return o("aside",{class:"ac-banner ac-banner--recovery",role:"alert",children:[o("strong",{children:"Previous install was interrupted."}),o("p",{children:["Aborted at ",o("code",{children:n})," — ",i,". ",r," write",r===1?"":"s"," landed before the abort marker."]}),o("p",{children:"Pick how to recover before continuing. Resume reopens the wizard fresh, Rollback discards the abort state, Ignore hides this banner without touching the log."}),o("div",{class:"ac-banner__actions",children:[o("button",{type:"button",disabled:e.busy,onClick:()=>e.onResume(),children:"Resume install"}),o("button",{type:"button",disabled:e.busy,onClick:()=>e.onRollback(),children:"Rollback"}),o("button",{type:"button",disabled:e.busy,onClick:()=>e.onIgnore(),children:"Ignore"})]})]})}function Cc(){return o("section",{class:"ac-continue-screen","aria-labelledby":"ac-continue-title",children:[o("h2",{id:"ac-continue-title",children:"Install complete — continue with setup?"}),o("p",{children:"Your install selections (AI tools, roles, capability packs) are captured. Use the footer to continue:"}),o("ul",{children:[o("li",{children:[o("strong",{children:"Next"})," — go through the remaining personalisation steps: editor + tooling, personality, cost profile, roadmap & quality, memory, your",o("code",{children:" .agent-user.yml"}),", and finally the project module roots."]}),o("li",{children:[o("strong",{children:"Finish install here"})," — skip the rest and write ",o("code",{children:".agent-settings.yml"})," with the install-only selections. You can re-run ",o("code",{children:"agent-config setup"}),"later to pick up the personalisation steps."]})]})]})}function Tc(e){const n=e.version??"unknown";return o("section",{class:"ac-backup-screen","aria-labelledby":"ac-backup-title",children:[o("h2",{id:"ac-backup-title",children:"Existing v3 install detected"}),o("p",{children:["Found a v3.x install at ",o("code",{children:e.sourcePath})," ","(VERSION: ",o("code",{children:n}),"). v4 is a hard-cut release with no auto-migration — settings, identity, and history layouts changed. The wizard can back up the v3 tree before writing the v4 layout so you can roll back manually if needed."]}),e.error!==null?o("p",{class:"ac-banner ac-banner--error",children:["Backup failed: ",e.error]}):null,o("ul",{children:[o("li",{children:[o("strong",{children:"Backup v3 and proceed"})," — copies the tree to ",o("code",{children:e.backupTarget}),", then runs the v4 install. Restore later with",o("code",{children:[" mv ",e.backupTarget," ",e.sourcePath]}),"."]}),o("li",{children:[o("strong",{children:"Abort, uninstall v3 first"})," — closes the wizard. You decide what to keep."]})]}),o("div",{class:"ac-backup-screen__actions",children:[o("button",{type:"button",class:"ac-button ac-button--primary",disabled:e.busy,onClick:()=>e.onBackupAndProceed(),children:e.busy?"Backing up…":"Backup v3 and proceed"}),o("button",{type:"button",class:"ac-button",disabled:e.busy,onClick:()=>e.onAbort(),children:"Abort, uninstall v3 first"})]})]})}const jt=_(!1),Te=_(null),P=_(null),fn=_(!1),pn=_(!1),re=_(0),xi=_(null),U=_({}),Bt=_({}),Ut=_(0),he=_({}),E=_(null),ee=_(null),Ai=_(!1),ii=_(!1),Nn=_(!1),Ht=_({}),In=_([]);_("global");const Si=_(!1),M=_(!1),Ec=_(!1),hn=_(!1),vn=_(null),Ci=_([]),_n=_({}),mn=_(!0),gn=_(""),yn=_("agents");_(!1);const Wt=_(null),Oc=[{id:"claude-code",label:"Claude Code"},{id:"claude-desktop",label:"Claude Desktop"},{id:"cursor",label:"Cursor"},{id:"windsurf",label:"Windsurf"},{id:"cline",label:"Cline"},{id:"gemini-cli",label:"Gemini CLI"},{id:"copilot",label:"GitHub Copilot"},{id:"augment",label:"Augment"},{id:"aider",label:"Aider"},{id:"codex",label:"Codex"},{id:"roocode",label:"Roo Code"},{id:"continue",label:"Continue"},{id:"kilocode",label:"Kilo Code"},{id:"zed",label:"Zed"},{id:"jetbrains",label:"JetBrains"},{id:"kiro",label:"Kiro"},{id:"qoder",label:"Qoder"},{id:"opencode",label:"OpenCode"},{id:"trae",label:"Trae"},{id:"antigravity",label:"Antigravity"},{id:"codebuddy",label:"CodeBuddy"},{id:"droid",label:"Droid"},{id:"warp",label:"Warp"}],dr=_(!1),Ee=_(!1),ne=_(null),Ti=_([]),Ei=_([]),Ln=_([]),ie=_({}),fr=_(!1),Bn=_(!1),zt=_({}),pr=_(!1),Yt=_(null),Kt=_(null),qt=_("https://github.com/event4u-app/rtk");_(!1);_(null);_([]);_({});_({});const te=_({}),K=_({}),ri=_(!1),hr=_(!1);_({});_(null);_(null);_(!1);_(null);const bn=_(null),Gt=_(!1),ti=_(null),li=_(!1),ai=_(!1),oi=_(null),Oe=_(null),Ve=_(!1);function Vt(){return Mt({extended:M.value})}function Me(){return Vt().length}function Nc(e){return e??new Date().toISOString()}function Oi(e){return Math.max(0,Math.min(Me()-1,e))}function Ic(e){if("$ref"in e&&e.$ref!==void 0&&"definitions"in e&&e.definitions!==void 0){const n=e.$ref.replace("#/definitions/",""),i=e.definitions[n];if(i!==void 0)return i}return e}async function Lc(){try{return await A("/api/v1/settings")}catch(e){if(e instanceof $&&e.status===404&&e.body.error?.code==="NOT_FOUND"){const n=await A("/api/v1/schema");return{values:{},lastModified:0,path:".agent-settings.yml",schema:n.settings}}throw e}}async function Fc(){try{const e=await A("/api/v1/install/recovery");bn.value=e.incomplete?e:null}catch{bn.value=null}}async function Rc(){try{const e=await A("/api/v1/install/legacy-v3");ti.value=e.present?e:null}catch{ti.value=null}}async function Pc(){ai.value=!0,oi.value=null;try{await A("/api/v1/install/backup-v3",{method:"POST"}),li.value=!0}catch(e){oi.value=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e)}finally{ai.value=!1}}async function Un(e){try{await A("/api/v1/install/recovery/dismiss",{method:"POST",body:{reason:e}})}catch(n){P.value={message:n instanceof Error?n.message:String(n),tone:"error"};return}bn.value=null,Gt.value=!0}async function $c(){Te.value=null;try{Fc(),Rc();const[e,n]=await Promise.all([A("/api/v1/wizard/state"),Lc()]);xi.value=Ic(n.schema),Ut.value=n.lastModified,Bt.value=n.values,Ht.value=n.legacyHints??{},M.value=e.extendedSteps===!0,Oe.value=e.wizardMode??null;const i=Object.keys(e.partial??{});U.value=i.length>0?{...n.values,...e.partial}:n.values,re.value=Oi(e.step),Si.value=!1,jt.value=!0;const r=On(re.value,{extended:M.value});(r.kind==="welcome"||r.kind==="userMd"||r.kind==="review")&&Jt(),(r.kind==="roles"||r.kind==="aiTools"||r.kind==="packs")&&Qt(),r.kind==="aiTools"&&Zt(),r.id==="identity"&&Xt(),r.kind==="review"&&el()}catch(e){e instanceof $?Te.value=G(e.body.error??{code:"UNKNOWN",message:e.message}):Te.value=e instanceof Error?e.message:String(e)}}function Mc(e,n){return e.identity.name.trim()!==""?e:{...e,identity:{...e.identity,name:n}}}async function Jt(){if(!ii.value)try{const e=await A("/api/v1/user-md");if(Ai.value=e.exists,e.exists&&e.identity!==null){const n=qi(e.identity);ee.value=n,E.value=n}else{let n;try{const r=await A("/api/v1/user-md/template");n=qi(vc(r.body))}catch{n=Gr()}const i=Ht.value.user_name;typeof i=="string"&&i.trim()!==""&&(n=Mc(n,i)),ee.value=n,E.value=n}}catch(e){P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{ii.value=!0}}const Dc=new Set(["python"]);async function Qt(){if(!(dr.value||Ee.value)){Ee.value=!0,ne.value=null;try{const[e,n]=await Promise.all([A("/api/v1/wizard/manifest"),A("/api/v1/wizard/auto-detect")]),i=(e.packs??[]).map(l=>({id:l.id,label:l.label??l.id,description:l.description??"",requires_hint:l.requires_hint,cluster:l.cluster??void 0,workspaces:l.workspaces}));Ti.value=i,Ln.value=(e.workspaces??[]).filter(l=>l.id!=="agent-config-maintainer").map(l=>({id:l.id,label:l.label??l.id,description:l.description??"",default_packs:l.default_packs??[],optional_packs:l.optional_packs??[],...l.example_roles!==void 0?{example_roles:l.example_roles}:{}}));const r=new Set(i.map(l=>l.id)),t=n.signals.map(l=>l.id.startsWith("pack-")?l.id.slice(5):l.id).filter(l=>r.has(l)).filter(l=>!Dc.has(l));Ei.value=t}catch(e){e instanceof $?ne.value=G(e.body.error??{code:"UNKNOWN",message:e.message}):ne.value=e instanceof Error?e.message:String(e)}finally{Ee.value=!1,dr.value=!0}}}async function Zt(){if(!(fr.value||Bn.value)){Bn.value=!0;try{const e=await A("/api/v1/wizard/detect-tools"),n=e.tools??{},i=e.configured??[];if(zt.value=n,Object.keys(te.value).length===0){const r={};if(i.length>0)for(const t of i)r[t]=!0;else for(const[t,l]of Object.entries(n))l&&(r[t]=!0);te.value=r}}catch{}finally{Bn.value=!1,fr.value=!0}}}async function Xt(){if(!pr.value){pr.value=!0;try{const e=await A("/api/v1/wizard/detect-rtk"),n=e.installed===!0;Yt.value=n,Kt.value=e.installCommand??null,typeof e.repo=="string"&&(qt.value=e.repo),U.value={...U.value,"personal.rtk_installed":n}}catch{}}}async function jc(e,n){try{await A("/api/v1/wizard/state",{method:"POST",body:{step:e,totalSteps:Me(),partial:n,startedAt:Nc(null)}})}catch(i){P.value={message:i instanceof Error?i.message:String(i),tone:"error"}}}async function el(){pn.value=!0;try{const e=await A("/api/v1/settings/diff",{method:"POST",body:{values:U.value,ifUnmodifiedSince:Ut.value}});In.value=e.changes,he.value={}}catch(e){e instanceof $?(he.value=Wr(e.body.error??{message:e.message}),P.value={message:G(e.body.error??{code:"UNKNOWN",message:e.message}),tone:"error"}):P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{pn.value=!1}}function wn(){return Nn.value?!1:E.value===null||ee.value===null?E.value!==ee.value:JSON.stringify(E.value)!==JSON.stringify(ee.value)}async function ke(e){const n=Oi(e);await jc(n,U.value),re.value=n,P.value=null;const i=On(n,{extended:M.value});(i.kind==="welcome"||i.kind==="userMd")&&Jt(),(i.kind==="roles"||i.kind==="aiTools"||i.kind==="packs")&&Qt(),i.kind==="packs"&&il(),i.kind==="aiTools"&&Zt(),i.id==="identity"&&Xt(),i.kind==="review"&&el()}function nl(){const e=K.value,n=new Map(Ti.value.map(l=>[l.id,l])),i=Object.entries(e).filter(([,l])=>l===!0).map(([l])=>l).filter(l=>{const a=n.get(l)?.cluster;return a===void 0||e[a]===!0}),r=new Set,t=l=>{if(!r.has(l)){r.add(l);for(const a of n.get(l)?.requires_hint??[])t(a)}};for(const l of i)t(l);return[...r].sort()}function il(){if(ri.value)return;const e=Object.entries(ie.value).filter(([,r])=>r===!0).map(([r])=>r),n=new Map(Ln.value.map(r=>[r.id,r])),i={};for(const r of e)for(const t of n.get(r)?.default_packs??[])i[t]=!0;for(const r of Ei.value)i[r]=!0;K.value=i}function Bc(){const e=Object.entries(te.value).filter(([,r])=>r===!0).map(([r])=>r);if(e.length===0)return null;const n=nl();return{schema_version:"wizard-v2",tools:e,packs:n,settings:U.value}}async function Uc(){fn.value=!0,P.value=null;try{const e={settings:U.value},n=Object.entries(ie.value).filter(([,u])=>u===!0).map(([u])=>u),i=E.value!==null&&typeof E.value.identity?.name=="string"&&E.value.identity.name.trim().length>0;E.value!==null&&i&&(wn()||n.length>0)&&(e.identity=n.length>0?{...E.value,role:n}:E.value);const r=await A("/api/v1/wizard/finish",{method:"POST",body:e}),t="You can close this browser window now.",l=r.dryRun===!0?"Dry-run complete — no files written. Settings would be saved.":Array.isArray(r.writtenPaths)?`Saved (${r.writtenPaths.join(", ")}). Wizard complete.`:"Wizard complete.",a=M.value?Bc():null;let c="";if(a!==null)try{let u=null;await El("/api/v1/wizard/apply",a,s=>{s.type==="error"&&(u=typeof s.message=="string"?s.message:"install failed")});const d=a.tools.length,f=a.packs.length;c=u!==null?` Installer failed: ${u}. Settings were saved; re-run the wizard to retry.`:` Installer applied ${d} tool${d===1?"":"s"}`+(f>0?` and ${f} pack${f===1?"":"s"}.`:".")}catch(u){c=` Installer bridge failed: ${u instanceof $?G(u.body.error??{code:"UNKNOWN",message:u.message}):u instanceof Error?u.message:String(u)}. Settings were saved; re-run the wizard to retry the install plan.`}P.value={message:`${l}${c} ${t}`,tone:"success"},re.value=Oi(Me()-1),Bt.value=U.value,ee.value=wn()?E.value:ee.value,In.value=[],Si.value=!0}catch(e){e instanceof $?(he.value=Wr(e.body.error??{message:e.message}),P.value={message:G(e.body.error??{code:"UNKNOWN",message:e.message}),tone:"error"}):P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{fn.value=!1}}const Hc=["de","en","en-US","en-GB","fr","es","it","nl","pt","pt-BR"];function Wc(){if(hr.value)return;const e=E.value;if(e===null)return;hr.value=!0;let n=e;if(e.identity.name.trim()===""){const i=ln.value?.systemUser;i!==void 0&&i.trim()!==""&&(n={...n,identity:{...n.identity,name:i}})}if(!Ai.value&&typeof navigator<"u"){const i=(navigator.language||"").split("-")[0];i.length>=2&&(n={...n,language:i})}n!==e&&(E.value=n)}function zc(){const e=E.value;if(De(()=>{Wc()},[e]),e===null)return o("p",{children:"Loading…"});const n=i=>{E.value={...i,last_updated:new Date().toISOString().slice(0,10)},Nn.value=!1};return o("div",{class:"ac-wizard-step-stub ac-wizard__module-fields",children:[o("p",{children:["Tell the agent who you are. We pre-filled what we could detect — adjust freely. Stored in ",o("code",{children:".agent-user.yml"}),"."]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"welcome-name",children:"Name"}),o("input",{class:"ac-input",id:"welcome-name",type:"text",placeholder:"How should the agent address you?",value:e.identity.name,onInput:i=>n({...e,identity:{...e.identity,name:i.currentTarget.value}})})]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"welcome-lang",children:"Language"}),o("input",{class:"ac-input",id:"welcome-lang",type:"text",list:"welcome-lang-list",placeholder:"BCP-47 code, e.g. de, en, en-US",value:e.language,onInput:i=>n({...e,language:i.currentTarget.value})}),o("datalist",{id:"welcome-lang-list",children:Hc.map(i=>o("option",{value:i},i))})]})]})}function Yc(){const e=te.value,n=zt.value;return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:"Pick the AI tools you use. Tools detected on this machine are pre-selected on first run. The installer wires each selected tool's surface (skills, rules, commands) on apply; you can change this list later by re-running the wizard."}),o("ul",{class:"ac-wizard__tool-list",children:Oc.map(i=>{const r=n[i.id]===!0;return o("li",{class:"ac-wizard__tool-row",children:[o("label",{class:"ac-wizard__tool-label",children:[o("input",{type:"checkbox",checked:e[i.id]??!1,onChange:t=>{const l=t.currentTarget.checked;te.value={...e,[i.id]:l}}})," ",i.label]}),o("span",{class:`ac-badge ${r?"ac-badge--installed":"ac-badge--missing"}`,title:r?"Detected on this machine":"Not detected on this machine",children:r?"installed":"not installed"})]},i.id)})})]})}function Kc(){if(Ee.value)return o("p",{children:"Loading roles…"});if(ne.value!==null)return o("div",{class:"ac-wizard-step-stub",children:o("p",{class:"ac-banner ac-banner--error",children:["Discovery failed: ",ne.value]})});const e=ie.value,n=Ln.value,i=(r,t)=>{ie.value={...ie.value,[r]:t},il()};return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:["Pick the areas you work in. We use them to recommend capability packs on the next step, and they become your roles in",o("code",{children:" .agent-user.yml"}),"."]}),n.length===0?o("p",{children:o("em",{children:"No roles available in the manifest."})}):o("div",{class:"ac-wizard__pack-grid",children:n.map(r=>o("section",{class:"ac-pack-tile",children:[o("label",{class:"ac-pack-tile__head",children:[o("input",{type:"checkbox",checked:e[r.id]??!1,onChange:t=>{i(r.id,t.currentTarget.checked)}}),o("span",{class:"ac-pack-tile__title",children:r.label})]}),(r.example_roles??[]).length>0?o("p",{class:"ac-pack-tile__role",children:["e.g. ",(r.example_roles??[]).join(", ")]}):null,r.description!==""?o("p",{class:"ac-pack-tile__desc",children:r.description}):null]},r.id))})]})}function qc(){if(Ee.value)return o("p",{children:"Loading discovery manifest…"});if(ne.value!==null)return o("div",{class:"ac-wizard-step-stub",children:[o("p",{class:"ac-banner ac-banner--error",children:["Discovery failed: ",ne.value]}),o("p",{children:"The manifest endpoint is gated on extended-mode. Re-run the server with extended steps enabled to populate this list."})]});const e=K.value,n=new Set(Ei.value),i=new Map(Ln.value.map(s=>[s.id,s.label])),r=ie.value,t=s=>{const h=(s??[]).filter(p=>p!=="agent-config-maintainer");return h.length===0?null:o("span",{class:"ac-pack-tile__ws",children:h.map(p=>o("span",{class:`ac-badge ac-badge--ws${r[p]===!0?" ac-badge--ws-active":""}`,title:r[p]===!0?"Matches a role you picked":"Workspace / area",children:i.get(p)??p},p))})},l=Ti.value.filter(s=>s.id!=="engineering-base"),a=new Map;for(const s of l)if(s.cluster!==void 0){const h=a.get(s.cluster)??[];h.push(s),a.set(s.cluster,h)}const c=new Set(l.filter(s=>s.cluster!==void 0).map(s=>s.id)),u=l.filter(s=>!c.has(s.id)),d=(s,h)=>{ri.value=!0,K.value={...K.value,[s]:h}},f=(s,h)=>{ri.value=!0;const p={...K.value,[s]:h};if(h)for(const v of a.get(s)??[])p[v.id]===void 0&&(p[v.id]=!0);K.value=p};return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:"Pick the capability packs to install. Auto-detected packs are pre-selected; engineering hygiene is included automatically when a pack needs it. A language tile expands to its frameworks — turn the language off to skip them all."}),u.length===0?o("p",{children:o("em",{children:"No packs available in the manifest."})}):o("div",{class:"ac-wizard__pack-grid",children:u.map(s=>{const h=a.get(s.id)??[],p=h.length>0,v=e[s.id]??!1;return o("section",{class:"ac-pack-tile",children:[o("label",{class:"ac-pack-tile__head",children:[o("input",{type:"checkbox",checked:v,onChange:g=>{const b=g.currentTarget.checked;p?f(s.id,b):d(s.id,b)}}),o("span",{class:"ac-pack-tile__title",children:s.label}),n.has(s.id)?o("span",{class:"ac-badge ac-badge--installed",children:"auto-detected"}):null]}),t(s.workspaces),s.description!==""?o("p",{class:"ac-pack-tile__desc",children:s.description}):null,p?o("fieldset",{class:"ac-pack-tile__children",disabled:!v,children:h.map(g=>o("label",{class:"ac-pack-tile__child",children:[o("input",{type:"checkbox",checked:e[g.id]??!1,disabled:!v,onChange:b=>{d(g.id,b.currentTarget.checked)}}),o("span",{children:g.label})]},g.id))}):null]},s.id)})})]})}function Gc(){const e=Yt.value,n=Kt.value;return o("div",{class:"ac-rtk-row",children:[o("div",{class:"ac-rtk-row__head",children:[o("span",{class:"ac-rtk-row__label",children:["rtk ",o("small",{children:"(Rust Token Killer)"})]}),e===null?o("span",{class:"ac-badge ac-badge--missing",children:"detecting…"}):e?o("span",{class:"ac-badge ac-badge--installed",children:"installed"}):o("span",{class:"ac-badge ac-badge--missing",children:"not installed"})]}),e===!1?o("div",{class:"ac-rtk-row__install",children:[o("p",{class:"ac-field__description",children:"rtk wraps verbose CLI output for ~60–90% token savings. Install it, then re-open the wizard to pick up detection:"}),n!==null?o("code",{class:"ac-rtk-row__cmd",children:n}):null,o("a",{class:"ac-button",href:qt.value,target:"_blank",rel:"noreferrer noopener",children:"Open rtk repo"})]}):null]})}function Vc(){const e=On(re.value,{extended:M.value});if(M.value&&Oe.value==="install"&&e.id==="identity"&&!Ve.value)return o(Cc,{});if(e.kind==="form"){const i=mc(xi.value,e.paths??[]);return o(J,{children:[e.id==="identity"?o(Gc,{}):null,o(Bl,{schema:i,values:U.value,errors:he.value,onChange:r=>{U.value=r}})]})}return e.kind==="userMd"?!ii.value||E.value===null?o("p",{children:"Loading .agent-user.yml…"}):o(zl,{value:E.value,errors:he.value,hideRole:M.value&&Oe.value==="install",hideIdentityBasics:M.value&&Oe.value==="install",onChange:i=>{E.value=i,Nn.value=!1}}):e.kind==="welcome"?o(zc,{}):e.kind==="aiTools"?o(Yc,{}):e.kind==="roles"?o(Kc,{}):e.kind==="packs"?o(qc,{}):o(Ac,{steps:Vt(),currentIndex:re.value,changes:In.value,errors:he.value,userMdChanged:wn(),userMdAction:Ai.value?"replace":"create",loading:pn.value,onJump:i=>{ke(i)},selectedToolsCount:Object.values(te.value).filter(Boolean).length,selectedPacksCount:Object.values(K.value).filter(Boolean).length})}function Hn({path:e}){if(De(()=>{$c()},[]),!jt.value||xi.value===null)return o("div",{class:"ac-page",children:[o("h1",{children:"Setup wizard"}),Te.value!==null?o("p",{class:"ac-banner ac-banner--error",children:Te.value}):o("p",{children:"Loading…"})]});const n=re.value,i=Me(),r=On(n,{extended:M.value}),t=n===i-1,l=r.kind==="aiTools"&&Object.values(te.value).filter(Boolean).length===0||r.kind==="roles"&&Object.values(ie.value).filter(Boolean).length===0||r.kind==="packs"&&nl().length===0,a=M.value&&Oe.value==="install"&&r.id==="identity"&&!Ve.value,c=bn.value,u=c!==null&&!Gt.value,d=ti.value;return d!==null&&d.present&&!li.value?o("div",{class:"ac-page",children:o(Tc,{sourcePath:d.path,backupTarget:d.backupTarget,version:d.version,busy:ai.value,error:oi.value,onBackupAndProceed:()=>{Pc()},onAbort:()=>{P.value={tone:"info",message:"Aborted. Uninstall v3 manually, then re-run `agent-config install`."},li.value=!0}})}):o("div",{class:"ac-page",children:[o(yc,{step:r,index:n,total:i}),u?o(Sc,{abortedAt:c.abortedAt,abortNote:c.abortNote,writesSinceRollback:c.writesSinceRollback,busy:fn.value,onResume:()=>{Un("resume")},onRollback:()=>{Un("rollback")},onIgnore:()=>{Un("ignore")}}):null,P.value!==null?o("p",{class:`ac-banner${P.value.tone==="error"?" ac-banner--error":""}`,children:P.value.message}):null,o("div",{class:"ac-wizard__step",children:o(Vc,{})}),l?o("p",{class:"ac-wizard__hint",children:r.kind==="aiTools"?"Select at least one AI tool to continue.":r.kind==="roles"?"Select at least one role to continue.":"Select at least one capability pack to continue."}):null,o(bc,{canGoPrev:n>0,canGoNext:!t&&!l,canSkip:a||r.kind==="userMd",skipLabel:a?"Finish install here":"Skip",isLast:t,busy:fn.value||pn.value,canFinish:In.value.length>0||wn(),completed:Si.value,onPrev:()=>{ke(n-1)},onNext:()=>{if(a){Ve.value=!0;return}ke(n+1)},onSkip:()=>{if(a){Ve.value=!0,ke(Me()-1);return}Nn.value=!0,ke(n+1)},onFinish:()=>{Uc()}})]})}const kn=_(!1),ve=_(null);async function Jc(){hn.value=!0,vn.value=null;try{const e=await A("/api/v1/modules/detect");Ci.value=e.candidates,Wt.value=e.project_root;const n={};for(const i of e.candidates)n[i.path]=!0;_n.value=n,mn.value=e.proposed_block.enabled,gn.value=e.proposed_block.namespace_template??"",yn.value=e.proposed_block.agent_folder??"agents"}catch(e){vn.value=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e)}finally{hn.value=!1,Ec.value=!0}}function Qc(){const e=new Set(Ci.value.map(r=>r.path)),n=_n.value,i=Object.keys(n).filter(r=>n[r]===!0&&e.has(r));return{enabled:mn.value,root_paths:i,namespace_template:gn.value,agent_folder:yn.value||"agents"}}async function Zc(){kn.value=!0,ve.value=null;try{const e=await A("/api/v1/modules/apply",{method:"POST",body:Qc()});ve.value={message:e.appliedTo!==null?`Saved project settings to ${e.appliedTo}.`:`Saved project settings to ${e.projectRoot}.`,tone:"success"}}catch(e){const n=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e);ve.value={message:`Could not save project settings: ${n}`,tone:"error"}}finally{kn.value=!1}}function Xc(){if(hn.value)return o("p",{children:"Detecting module roots…"});if(vn.value!==null)return o("p",{class:"ac-banner ac-banner--error",children:["Module detection failed: ",vn.value]});const e=Ci.value,n=_n.value,i=Wt.value;return o("div",{class:"ac-section",children:[i!==null?o("p",{class:"ac-section__description",children:["Scanning ",o("code",{children:i}),". Pick which detected roots the agent should treat as modules. These write to",o("code",{children:" .agent-project-settings.yml"})," in this repo only."]}):null,o("label",{children:[o("input",{type:"checkbox",checked:mn.value,onChange:r=>{mn.value=r.currentTarget.checked}})," ","Enable module discovery (writes ",o("code",{children:"modules.enabled"}),")"]}),e.length===0?o("p",{children:[o("em",{children:"No module roots detected."})," The scan found no common module layouts (Laravel ",o("code",{children:"app/Modules/"}),", Symfony",o("code",{children:" src/Module/"}),", Node ",o("code",{children:"packages/"}),", Python",o("code",{children:" src/"}),", Go ",o("code",{children:"internal/"}),")."]}):o("ul",{style:"list-style: none; padding-left: 0;",children:e.map(r=>o("li",{children:o("label",{children:[o("input",{type:"checkbox",checked:n[r.path]??!1,onChange:t=>{const l=t.currentTarget.checked;_n.value={...n,[r.path]:l}}})," ",o("code",{children:r.path})," — ",r.stack," ",o("small",{children:["(",r.confidence," confidence)"]})]})},r.path))}),o("div",{class:"ac-wizard__module-fields",children:[o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"ac-modules-namespace",children:"Namespace template"}),o("input",{id:"ac-modules-namespace",class:"ac-input",type:"text",value:gn.value,placeholder:"e.g. App\\\\Modules\\\\{ModuleName}\\\\App",onInput:r=>{gn.value=r.currentTarget.value}}),o("span",{class:"ac-field__description",children:"How a module path maps to its namespace. Leave blank to skip namespacing."})]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"ac-modules-agent-folder",children:"Agent folder"}),o("input",{id:"ac-modules-agent-folder",class:"ac-input",type:"text",value:yn.value,placeholder:"agents",onInput:r=>{yn.value=r.currentTarget.value}}),o("span",{class:"ac-field__description",children:["Folder name that holds per-module agent docs (default ",o("code",{children:"agents"}),")."]})]})]})]})}function es(){return De(()=>{Jc()},[]),o("div",{class:"ac-page",children:[o("header",{class:"ac-page__header",children:[o("h1",{children:"Project settings"}),o("p",{class:"ac-section__description",children:["Configuration scoped to this repository — written to",o("code",{children:" .agent-project-settings.yml"}),", not the global tree."]})]}),ve.value!==null?o("p",{class:`ac-banner ac-banner--${ve.value.tone==="success"?"success":"error"}`,children:ve.value.message}):null,o("section",{class:"ac-section",children:[o("h2",{class:"ac-section__title",children:"Modules"}),o(Xc,{})]}),o("div",{class:"ac-form__actions ac-wizard__nav",children:o("button",{type:"button",class:"ac-button ac-button--primary",disabled:kn.value||hn.value,onClick:()=>{Zc()},children:kn.value?"Saving…":"Save project settings"})})]})}const Je=_([]),xn=_([]),ci=_([]),si=_([]),An=_(null),rl=_(!1),Ne=_(null),Z=_(null),Wn=_("plain");async function ns(){Ne.value=null;try{const[e,n,i,r]=await Promise.all([A("/api/v1/workspace/roles"),A("/api/v1/workspace/sessions?limit=20"),A("/api/v1/workspace/knowledge?limit=20"),A("/api/v1/workspace/documents?limit=20")]);Je.value=e.roles,xn.value=n.sessions,ci.value=i.chunks,si.value=r.documents,rl.value=!0}catch(e){e instanceof $?Ne.value=e.body?.error?.message??e.message:Ne.value=e instanceof Error?e.message:String(e)}}async function is(e,n){Z.value=null;try{const i=await A("/api/v1/workspace/launch",{method:"POST",body:{role:e,task:n,host:"local"}});Z.value=`Started session ${i.id} (${i.role} · ${i.task}).`;const r=await A("/api/v1/workspace/sessions?limit=20");xn.value=r.sessions}catch(i){i instanceof $?Z.value=i.body?.error?.message??i.message:Z.value=i instanceof Error?i.message:String(i)}}function rs({role:e}){const n=An.value===e.slug;return o("button",{type:"button",class:`ac-workspace__role${n?" ac-workspace__role--active":""}`,"aria-current":n?"true":void 0,"aria-label":`Pick role ${e.display_name}`,onClick:()=>{An.value=e.slug,Z.value=null},children:[o("span",{class:"ac-workspace__role-name",children:e.display_name}),o("span",{class:"ac-workspace__role-status","data-status":e.status,children:e.status}),o("span",{class:"ac-workspace__role-tagline",children:e.tagline})]})}function ts({role:e}){return o("section",{class:"ac-workspace__tasks","aria-labelledby":"task-heading",children:[o("h2",{id:"task-heading",class:"ac-workspace__heading",children:["First tasks · ",e.display_name]}),e.first_tasks.length===0?o("p",{class:"ac-workspace__empty",children:"No tasks scaffolded yet for this role."}):o("ul",{class:"ac-workspace__task-list",children:e.first_tasks.map(n=>o("li",{class:"ac-workspace__task",children:[o("div",{class:"ac-workspace__task-head",children:[o("span",{class:"ac-workspace__task-name",children:n.name}),o("button",{type:"button",class:"ac-button ac-button--primary",onClick:()=>{is(e.slug,n.name)},children:"Start session"})]}),o("p",{class:"ac-workspace__task-intent",children:n.intent}),n.prompt!==""?o("code",{class:"ac-workspace__task-prompt",children:["prompts/",n.prompt]}):null]},n.name))}),e.skills.length>0?o("details",{class:"ac-workspace__skills",children:[o("summary",{children:["Skill shortlist (",e.skills.length,")"]}),o("ul",{class:"ac-workspace__skill-list",children:[e.skills.slice(0,5).map(n=>o("li",{class:"ac-workspace__skill",children:[o("code",{children:n.id})," — ",n.why]},n.id)),e.skills.length>5?o("li",{class:"ac-workspace__skill-more",children:["+ ",e.skills.length-5," more"]}):null]})]}):null]})}function ls(){return o("section",{class:"ac-workspace__sessions","aria-labelledby":"sessions-heading",children:[o("h2",{id:"sessions-heading",class:"ac-workspace__heading",children:"Recent sessions"}),xn.value.length===0?o("p",{class:"ac-workspace__empty",children:"No sessions yet — pick a role and start one."}):o("ul",{class:"ac-workspace__session-list",children:xn.value.map(e=>o("li",{class:"ac-workspace__session",children:[o("span",{class:"ac-workspace__session-id",children:e.id.slice(0,16)}),o("span",{class:"ac-workspace__session-role",children:e.role}),o("span",{class:"ac-workspace__session-task",children:e.task})]},e.id))})]})}function as(){return o("section",{class:"ac-workspace__knowledge","aria-labelledby":"knowledge-heading",children:[o("h2",{id:"knowledge-heading",class:"ac-workspace__heading",children:"Knowledge sources"}),ci.value.length===0?o("p",{class:"ac-workspace__empty",children:["No sources yet. Run ",o("code",{children:"/knowledge:ingest <path>"})," to add documents."]}):o("ol",{class:"ac-workspace__citation-list",children:ci.value.map((e,n)=>o("li",{class:"ac-workspace__citation",children:[o("span",{class:"ac-workspace__citation-marker","aria-label":`Citation ${n+1}`,children:["[",n+1,"]"]}),o("a",{href:`file://${e.source}`,class:"ac-workspace__citation-source",title:"Open source in OS default app",children:e.source.split("/").pop()??e.source}),e.pinned?o("span",{class:"ac-workspace__citation-pin","aria-label":"pinned",children:"★"}):null,o("p",{class:"ac-workspace__citation-excerpt",children:[e.excerpt.slice(0,200),e.excerpt.length>200?"…":""]})]},e.id))})]})}function os(){return o("section",{class:"ac-workspace__recent","aria-labelledby":"recent-heading",children:[o("h2",{id:"recent-heading",class:"ac-workspace__heading",children:"Recent documents"}),si.value.length===0?o("p",{class:"ac-workspace__empty",children:"No documents yet. Saved drafts land here."}):o("ul",{class:"ac-workspace__doc-list",children:si.value.map(e=>o("li",{class:"ac-workspace__doc",children:[o("span",{class:"ac-workspace__doc-type","data-type":e.type,children:e.type}),o("span",{class:"ac-workspace__doc-title",children:e.title}),o("time",{class:"ac-workspace__doc-time",dateTime:e.updated_at,children:e.updated_at.slice(0,10)})]},`${e.type}/${e.slug}`))})]})}function cs(){const e=Wn.value;return o("fieldset",{class:"ac-workspace__explain",children:[o("legend",{class:"ac-workspace__heading",children:"Explanation style"}),o("label",{class:"ac-workspace__explain-option",children:[o("input",{type:"radio",name:"explain-mode",value:"plain",checked:e==="plain",onChange:()=>{Wn.value="plain"},"aria-label":"Plain language"}),o("span",{children:"Plain language"})]}),o("label",{class:"ac-workspace__explain-option",children:[o("input",{type:"radio",name:"explain-mode",value:"technical",checked:e==="technical",onChange:()=>{Wn.value="technical"},"aria-label":"Technical detail"}),o("span",{children:"Technical detail"})]}),o("p",{class:"ac-workspace__explain-hint",children:e==="plain"?"Replies use everyday words. Toggle to see the technical view.":"Replies keep the technical vocabulary. Toggle for the plain view."})]})}function ss(){if(De(()=>{ns()},[]),Ne.value!==null)return o("div",{class:"ac-page ac-page--error",children:[o("h1",{children:"Workspace"}),o("p",{class:"ac-banner ac-banner--error",children:Ne.value})]});if(!rl.value)return o("div",{class:"ac-page",children:[o("h1",{children:"Workspace"}),o("p",{children:"Loading…"})]});const e=An.value!==null?Je.value.find(n=>n.slug===An.value)??null:null;return o("div",{class:"ac-page ac-workspace",children:[o("header",{class:"ac-page__header",children:[o("h1",{children:"Workspace"}),o("p",{class:"ac-page__subtitle",children:"Pick a role, pick a first task, run it."})]}),Z.value!==null?o("p",{class:"ac-banner",role:"status",children:Z.value}):null,o("div",{class:"ac-workspace__grid",children:[o("section",{class:"ac-workspace__roles","aria-labelledby":"roles-heading",children:[o("h2",{id:"roles-heading",class:"ac-workspace__heading",children:"Roles"}),Je.value.length===0?o("p",{class:"ac-workspace__empty",children:"No roles installed."}):o("div",{class:"ac-workspace__role-grid",children:Je.value.map(n=>o(rs,{role:n},n.slug))})]}),o("main",{class:"ac-workspace__main","aria-label":"Tasks and sessions",children:[e!==null?o(ts,{role:e}):o("p",{class:"ac-workspace__empty",children:"Pick a role on the left to see its first tasks."}),o(ls,{})]}),o("aside",{class:"ac-workspace__rail","aria-label":"Knowledge and documents",children:[o(as,{}),o(os,{}),o(cs,{})]})]})]})}const tl=[{id:"setup",label:"Setup",hashPath:"/setup",matches:["/setup","/wizard"]},{id:"project",label:"Projekt",hashPath:"/project",matches:["/project"]},{id:"tasks",label:"Tasks",hashPath:"/tasks",matches:["/tasks"]},{id:"council",label:"Council",hashPath:"/council",matches:["/council"]},{id:"memory",label:"Memory",hashPath:"/memory",matches:["/memory"]},{id:"explain",label:"Explain",hashPath:"/explain",matches:["/explain"]},{id:"workspace",label:"Workspace",hashPath:"/workspace",matches:["/workspace"]}];function us(e){for(const n of tl)for(const i of n.matches)if(e===i||e.startsWith(`${i}/`))return n.id;return null}function ds(){const e=de.value,n=us(e);return o("header",{class:"ac-topnav",children:o("div",{class:"ac-topnav__inner",children:[o("div",{class:"ac-topnav__brand",children:[o("h1",{class:"ac-topnav__title",children:"@event4u/agent-config"}),o("p",{class:"ac-topnav__subtitle",children:"Browser Wizard"})]}),o("nav",{class:"ac-topnav__tabs","aria-label":"Surfaces",children:tl.map(i=>o("button",{type:"button",class:`ac-topnav__tab${n===i.id?" ac-topnav__tab--active":""}`,"aria-current":n===i.id?"page":void 0,onClick:()=>Jn(i.hashPath),children:i.label},i.id))})]})})}function ze({name:e}){return o("div",{class:"ac-page",children:[o("header",{class:"ac-page__header",children:o("h1",{children:e})}),o("section",{class:"ac-section",children:[o("p",{class:"ac-section__description",children:["The ",o("strong",{children:e})," surface is currently served by the legacy installer GUI on port ",o("code",{children:"41100"}),". It is being ported to the modern shell in a follow-up phase (road-to-unified-setup § Phase 5)."]}),o("p",{class:"ac-section__description",children:["For now the legacy surface remains reachable via"," ",o("code",{children:"installer gui"}),"."]})]})]})}function fs({path:e}){return o("div",{class:"ac-page ac-page--error",children:[o("h1",{children:"Page not found"}),o("p",{children:["Nothing routed to ",o("code",{children:e}),". Try ",o("a",{href:"#/setup",children:"Setup"}),"."]})]})}function ps(){const e=ln.value;return e===null||e.dryRun!==!0?null:o("div",{class:"ac-dryrun-banner",role:"status","aria-live":"polite",children:[o("strong",{children:"DRY RUN"}),o("span",{children:" · no files will be written. Validation + rendering run normally; commits return a preview."})]})}function hs(e){return e==="/"||e==="/setup"||e.startsWith("/setup/")?o(Hn,{path:e}):e.startsWith("/wizard")?o(Hn,{path:e}):e==="/settings"||e.startsWith("/settings/")?o(Hn,{path:"/setup"}):e==="/project"||e.startsWith("/project/")?o(es,{}):e==="/tasks"?o(ze,{name:"Tasks"}):e==="/council"?o(ze,{name:"Council"}):e==="/memory"?o(ze,{name:"Memory"}):e==="/explain"?o(ze,{name:"Explain"}):e==="/workspace"?o(ss,{}):o(fs,{path:e})}function vs(){return De(()=>{Cl(),(de.value==="/"||de.value==="/settings"||de.value.startsWith("/settings/"))&&Jn("/setup"),Ol()},[]),o(J,{children:[o(ps,{}),o(ds,{}),hs(de.value)]})}const _s=3e4,ms=30*6e4;let Ye=null,vr=!1;function _r(e){if(!vr&&(vr=!0,!(typeof navigator>"u"||typeof navigator.sendBeacon!="function")))try{navigator.sendBeacon(`/api/v1/shutdown?token=${encodeURIComponent(e)}`)}catch{}}function gs(e){if(typeof window>"u")return()=>{};let n=Date.now();const i=()=>{n=Date.now()},r=["pointerdown","keydown","wheel","touchstart"];for(const c of r)window.addEventListener(c,i,{passive:!0});const t=()=>{document.hidden||i()};document.addEventListener("visibilitychange",t);const l=()=>{Ye!==null&&clearInterval(Ye),Ye=null;for(const c of r)window.removeEventListener(c,i);document.removeEventListener("visibilitychange",t),window.removeEventListener("pagehide",a)};Ye=setInterval(()=>{if(!document.hidden){if(Date.now()-n>ms){_r(e),l();return}A("/api/v1/ping").catch(()=>{})}},_s);function a(){_r(e)}return window.addEventListener("pagehide",a),l}function ys(){return new URLSearchParams(window.location.search).get("token")}function bs(){const e=document.getElementById("app");if(e===null)return;const n=ys();if(n===null){e.textContent="agent-config UI · missing token — re-open via `agent-config ui:serve`.";return}Tl(n),gs(n),e.textContent="",fl(o(vs,{}),e)}bs();
40
- //# sourceMappingURL=index-4V5HhhIV.js.map
39
+ `:""}var Zo=Qo,Xo={dump:Zo};function ki(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var ec=N,nc=Qr,ic=nt,rc=at,tc=ot,lc=gi,ac=St.load,oc=St.loadAll,cc=Xo.dump,sc=F,uc={binary:ft,float:lt,map:et,null:it,pairs:ht,set:vt,timestamp:ut,bool:rt,int:tt,merge:dt,omap:pt,seq:Xr,str:Zr},dc=ki("safeLoad","load"),fc=ki("safeLoadAll","loadAll"),pc=ki("safeDump","dump"),hc={Type:ec,Schema:nc,FAILSAFE_SCHEMA:ic,JSON_SCHEMA:rc,CORE_SCHEMA:tc,DEFAULT_SCHEMA:lc,load:ac,loadAll:oc,dump:cc,YAMLException:sc,types:uc,safeLoad:dc,safeLoadAll:fc,safeDump:pc};function vc(e){if(e.trim()==="")return{};const i=hc.load(e);if(i==null)return{};if(typeof i!="object"||Array.isArray(i))throw new Error(".agent-user.yml must parse to an object");return i}const sr={id:"welcome",title:"Welcome — who are you?",navLabel:"You",subtitle:"Your name and language. Stored in .agent-user.yml; we pre-fill what we can detect.",kind:"welcome"},_c=[{id:"ai-tools",title:"Which AI tools do you use?",navLabel:"AI tools",subtitle:"Pick the editors and CLIs that should pick up this config. Auto-detect runs first; you can override.",kind:"aiTools"},{id:"roles",title:"What do you work on?",navLabel:"Roles",subtitle:"Pick the areas you work in. We use them to recommend capability packs on the next step, and they become your roles in .agent-user.yml.",kind:"roles"},{id:"packs",title:"Which capability packs do you want?",navLabel:"Packs",subtitle:"Founder-strategy, finance-basic, gtm-sales, ops-people, ai-video — pick zero or more. You can change this later.",kind:"packs"}],ur=[{id:"identity",title:"Editor and tooling",navLabel:"Editor",subtitle:"IDE goes into .agent-settings.yml so the agent opens files in the right tool. rtk presence is auto-detected (see the rtk row). Your name lives in .agent-user.yml (later step).",kind:"form",paths:["personal.ide","personal.open_edited_files"]},{id:"personality",title:"How should the agent behave?",navLabel:"Personality",subtitle:"Autonomy, output verbosity, and PR-comment style.",kind:"form",paths:["personal.autonomy","personal.minimal_output","personal.play_by_play","personal.pr_comment_bot_icon"]},{id:"cost",title:"Cost profile and budgets",navLabel:"Cost",subtitle:"Master switch for which rule tiers load, plus optional spending ceilings.",kind:"form",paths:["cost_profile","cost.budgets.daily","cost.budgets.weekly","cost.budgets.monthly","cost.enforcement"]},{id:"roadmap-quality",title:"Roadmap & quality cadence",navLabel:"Roadmap & quality",subtitle:"When the agent runs quality tools and refreshes roadmap dashboards.",kind:"form",paths:["roadmap.quality_cadence","roadmap.dashboard_regen_cadence","quality.local_auto_run","quality.wait_for_remote_ci"]},{id:"memory",title:"Memory & redaction",navLabel:"Memory",subtitle:"Inline-review threshold and transcript-redaction regexes.",kind:"form",paths:["memory.review_threshold","memory.redact_patterns"]},{id:"user-md",title:"Your .agent-user.yml",navLabel:"User profile",subtitle:"Identity, voice, preferences. Stored at agents/settings/.agent-user.yml. Skip to leave empty.",kind:"userMd"},{id:"review",title:"Review & finish",navLabel:"Review",subtitle:"These keys will change. Confirm to write .agent-settings.yml and .agent-user.yml atomically.",kind:"review"}];function Mt(e={}){return e.extended===!0?[sr,..._c,...ur]:[sr,...ur]}function On(e,n={}){const i=Mt(n),r=Math.max(0,Math.min(i.length-1,e));return i[r]}function mc(e,n){const i={type:"object",properties:{},...e.description!==void 0?{description:e.description}:{}},r=i.properties,t=e.properties??{};for(const l of n){const a=l.split(".").filter(j=>j.length>0);if(a.length===0)continue;const[c,u,d]=a;if(c===void 0)continue;const f=t[c];if(f===void 0)continue;if(u===void 0){r[c]=f;continue}const s=f.properties?.[u];if(s===void 0)continue;const p=r[c]??{type:"object",properties:{},...f.description!==void 0?{description:f.description}:{}},v=p.properties??={};if(d===void 0){v[u]=s,r[c]=p;continue}const g=s.properties?.[d];if(g===void 0)continue;const w=v[u]??{type:"object",properties:{},...s.description!==void 0?{description:s.description}:{}},m=w.properties??={};m[d]=g,v[u]=w,r[c]=p}return i}function gc({current:e,total:n}){const i=Math.max(1,n),r=Math.max(0,Math.min(i-1,e)),t=Array.from({length:i},(a,c)=>c<=r),l=Math.round((r+1)/i*100);return o("div",{class:"ac-wizard__progress",role:"progressbar","aria-valuenow":r+1,"aria-valuemin":1,"aria-valuemax":i,"aria-valuetext":`Step ${r+1} of ${i} (${l}%)`,children:t.map((a,c)=>o("span",{class:`ac-wizard__progress-segment${a?" ac-wizard__progress-segment--filled":""}`,"aria-hidden":"true"},c))})}function yc({step:e,index:n,total:i}){return o("header",{class:"ac-page__header ac-wizard__header",children:[o("p",{class:"ac-wizard__step-count",children:["Step ",n+1," of ",i]}),o("div",{class:"ac-wizard__header-text",children:[o("h1",{children:e.title}),o("p",{class:"ac-wizard__subtitle",children:e.subtitle})]}),o(gc,{current:n,total:i})]})}function bc(e){const n=e.canFinish??!0,i=e.completed??!1;return o("div",{class:"ac-form__actions ac-wizard__nav",children:[o("button",{type:"button",class:"ac-button",disabled:!e.canGoPrev||e.busy,onClick:e.onPrev,children:"Back"}),e.canSkip&&e.onSkip!==void 0?o("button",{type:"button",class:"ac-button ac-wizard__skip",disabled:e.busy,onClick:e.onSkip,children:e.skipLabel??"Skip"}):null,e.isLast?i?null:o("button",{type:"button",class:"ac-button ac-button--primary",disabled:e.busy||!n,onClick:e.onFinish,children:e.busy?"Saving…":"Finish & save"}):o("button",{type:"button",class:"ac-button ac-button--primary",disabled:!e.canGoNext||e.busy,onClick:e.onNext,children:e.nextLabel??"Next"})]})}function Dt(e,n){return e.kind!=="form"||e.paths===void 0?!1:!!(e.paths.includes(n)||e.id==="cost"&&(n.startsWith("telegraph.")||n.startsWith("verbosity.")))}function wc(e,n){return e.kind==="userMd"?n==="body"||n.startsWith("body."):Dt(e,n)}function kc(e,n){for(const i of Object.keys(n.errors))if(wc(e,i))return!0;return!1}function xc(e,n){if(kc(e,n))return{label:"needs attention",tone:"error"};if(e.kind==="userMd")return n.userMdChanged?{label:n.userMdAction==="create"?"will create":"will replace",tone:"changed"}:{label:"",tone:"idle"};if(e.kind==="form"){const i=n.changes.filter(r=>Dt(e,r.path)).length;return i===0?{label:"",tone:"idle"}:{label:`${i} change${i===1?"":"s"}`,tone:"changed"}}if(e.kind==="aiTools"){const i=n.selectedToolsCount??0;return i===0?{label:"",tone:"idle"}:{label:`${i} tool${i===1?"":"s"}`,tone:"changed"}}if(e.kind==="packs"){const i=n.selectedPacksCount??0;return i===0?{label:"",tone:"idle"}:{label:`${i} pack${i===1?"":"s"}`,tone:"changed"}}return{label:"",tone:"idle"}}function Ac(e){const n=e.steps.filter((i,r)=>r!==e.currentIndex);return o(J,{children:o("nav",{class:"ac-wizard__review-nav","aria-label":"Jump back to a step",children:[o("p",{class:"ac-wizard__review-nav-label",children:"Jump back to a step:"}),o("ul",{class:"ac-wizard__review-nav-list",children:n.map(i=>{const r=e.steps.indexOf(i),t=xc(i,e),l=t.tone==="error"?"ac-wizard__review-nav-button ac-wizard__review-nav-button--error":"ac-wizard__review-nav-button";return o("li",{children:o("button",{type:"button",class:l,onClick:()=>{e.onJump(r)},children:[o("span",{class:"ac-wizard__review-nav-index",children:r+1}),o("span",{class:"ac-wizard__review-nav-text",children:i.navLabel}),t.label!==""?o("span",{class:`ac-wizard__review-nav-status ac-wizard__review-nav-status--${t.tone}`,children:t.label}):null]})},i.id)})})]})})}function Sc(e){const n=e.abortedAt??"unknown time",i=e.abortNote??"no further detail recorded",r=e.writesSinceRollback;return o("aside",{class:"ac-banner ac-banner--recovery",role:"alert",children:[o("strong",{children:"Previous install was interrupted."}),o("p",{children:["Aborted at ",o("code",{children:n})," — ",i,". ",r," write",r===1?"":"s"," landed before the abort marker."]}),o("p",{children:"Pick how to recover before continuing. Resume reopens the wizard fresh, Rollback discards the abort state, Ignore hides this banner without touching the log."}),o("div",{class:"ac-banner__actions",children:[o("button",{type:"button",disabled:e.busy,onClick:()=>e.onResume(),children:"Resume install"}),o("button",{type:"button",disabled:e.busy,onClick:()=>e.onRollback(),children:"Rollback"}),o("button",{type:"button",disabled:e.busy,onClick:()=>e.onIgnore(),children:"Ignore"})]})]})}function Cc(){return o("section",{class:"ac-continue-screen","aria-labelledby":"ac-continue-title",children:[o("h2",{id:"ac-continue-title",children:"Install complete — continue with setup?"}),o("p",{children:"Your install selections (AI tools, roles, capability packs) are captured. Use the footer to continue:"}),o("ul",{children:[o("li",{children:[o("strong",{children:"Next"})," — go through the remaining personalisation steps: editor + tooling, personality, cost profile, roadmap & quality, memory, your",o("code",{children:" .agent-user.yml"}),", and finally the project module roots."]}),o("li",{children:[o("strong",{children:"Finish install here"})," — skip the rest and write ",o("code",{children:".agent-settings.yml"})," with the install-only selections. You can re-run ",o("code",{children:"agent-config setup"}),"later to pick up the personalisation steps."]})]})]})}function Tc(e){const n=e.version??"unknown";return o("section",{class:"ac-backup-screen","aria-labelledby":"ac-backup-title",children:[o("h2",{id:"ac-backup-title",children:"Existing v3 install detected"}),o("p",{children:["Found a v3.x install at ",o("code",{children:e.sourcePath})," ","(VERSION: ",o("code",{children:n}),"). v4 is a hard-cut release with no auto-migration — settings, identity, and history layouts changed. The wizard can back up the v3 tree before writing the v4 layout so you can roll back manually if needed."]}),e.error!==null?o("p",{class:"ac-banner ac-banner--error",children:["Backup failed: ",e.error]}):null,o("ul",{children:[o("li",{children:[o("strong",{children:"Backup v3 and proceed"})," — copies the tree to ",o("code",{children:e.backupTarget}),", then runs the v4 install. Restore later with",o("code",{children:[" mv ",e.backupTarget," ",e.sourcePath]}),"."]}),o("li",{children:[o("strong",{children:"Abort, uninstall v3 first"})," — closes the wizard. You decide what to keep."]})]}),o("div",{class:"ac-backup-screen__actions",children:[o("button",{type:"button",class:"ac-button ac-button--primary",disabled:e.busy,onClick:()=>e.onBackupAndProceed(),children:e.busy?"Backing up…":"Backup v3 and proceed"}),o("button",{type:"button",class:"ac-button",disabled:e.busy,onClick:()=>e.onAbort(),children:"Abort, uninstall v3 first"})]})]})}const jt=_(!1),Te=_(null),P=_(null),fn=_(!1),pn=_(!1),re=_(0),xi=_(null),D=_({}),Bt=_({}),Ut=_(0),he=_({}),E=_(null),ee=_(null),Ai=_(!1),ii=_(!1),Nn=_(!1),Ht=_({}),In=_([]);_("global");const Si=_(!1),M=_(!1),Ec=_(!1),hn=_(!1),vn=_(null),Ci=_([]),_n=_({}),mn=_(!0),gn=_(""),yn=_("agents");_(!1);const Wt=_(null),Oc=[{id:"claude-code",label:"Claude Code"},{id:"claude-desktop",label:"Claude Desktop"},{id:"cursor",label:"Cursor"},{id:"windsurf",label:"Windsurf"},{id:"cline",label:"Cline"},{id:"gemini-cli",label:"Gemini CLI"},{id:"copilot",label:"GitHub Copilot"},{id:"augment",label:"Augment"},{id:"aider",label:"Aider"},{id:"codex",label:"Codex"},{id:"roocode",label:"Roo Code"},{id:"continue",label:"Continue"},{id:"kilocode",label:"Kilo Code"},{id:"zed",label:"Zed"},{id:"jetbrains",label:"JetBrains"},{id:"kiro",label:"Kiro"},{id:"qoder",label:"Qoder"},{id:"opencode",label:"OpenCode"},{id:"trae",label:"Trae"},{id:"antigravity",label:"Antigravity"},{id:"codebuddy",label:"CodeBuddy"},{id:"droid",label:"Droid"},{id:"warp",label:"Warp"}],dr=_(!1),Ee=_(!1),ne=_(null),Ti=_([]),Ei=_([]),Ln=_([]),ie=_({}),fr=_(!1),Bn=_(!1),zt=_({}),pr=_(!1),Yt=_(null),Kt=_(null),qt=_("https://github.com/event4u-app/rtk");_(!1);_(null);_([]);_({});_({});const te=_({}),K=_({}),ri=_(!1),hr=_(!1);_({});_(null);_(null);_(!1);_(null);const bn=_(null),Gt=_(!1),ti=_(null),li=_(!1),ai=_(!1),oi=_(null),Oe=_(null),Ve=_(!1);function Vt(){return Mt({extended:M.value})}function Me(){return Vt().length}function Nc(e){return e??new Date().toISOString()}function Oi(e){return Math.max(0,Math.min(Me()-1,e))}function Ic(e){if("$ref"in e&&e.$ref!==void 0&&"definitions"in e&&e.definitions!==void 0){const n=e.$ref.replace("#/definitions/",""),i=e.definitions[n];if(i!==void 0)return i}return e}async function Lc(){try{return await A("/api/v1/settings")}catch(e){if(e instanceof $&&e.status===404&&e.body.error?.code==="NOT_FOUND"){const n=e.body;if(n.defaults!==void 0&&n.schema!==void 0)return{values:n.defaults,lastModified:n.lastModified??0,path:n.path??".agent-settings.yml",schema:n.schema};const i=await A("/api/v1/schema");return{values:{},lastModified:0,path:".agent-settings.yml",schema:i.settings}}throw e}}async function Fc(){try{const e=await A("/api/v1/install/recovery");bn.value=e.incomplete?e:null}catch{bn.value=null}}async function Rc(){try{const e=await A("/api/v1/install/legacy-v3");ti.value=e.present?e:null}catch{ti.value=null}}async function Pc(){ai.value=!0,oi.value=null;try{await A("/api/v1/install/backup-v3",{method:"POST"}),li.value=!0}catch(e){oi.value=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e)}finally{ai.value=!1}}async function Un(e){try{await A("/api/v1/install/recovery/dismiss",{method:"POST",body:{reason:e}})}catch(n){P.value={message:n instanceof Error?n.message:String(n),tone:"error"};return}bn.value=null,Gt.value=!0}async function $c(){Te.value=null;try{Fc(),Rc();const[e,n]=await Promise.all([A("/api/v1/wizard/state"),Lc()]);xi.value=Ic(n.schema),Ut.value=n.lastModified,Bt.value=n.values,Ht.value=n.legacyHints??{},M.value=e.extendedSteps===!0,Oe.value=e.wizardMode??null;const i=Object.keys(e.partial??{});D.value=i.length>0?{...n.values,...e.partial}:n.values,re.value=Oi(e.step),Si.value=!1,jt.value=!0;const r=On(re.value,{extended:M.value});(r.kind==="welcome"||r.kind==="userMd"||r.kind==="review")&&Jt(),(r.kind==="roles"||r.kind==="aiTools"||r.kind==="packs")&&Qt(),r.kind==="aiTools"&&Zt(),r.id==="identity"&&Xt(),r.kind==="review"&&el()}catch(e){e instanceof $?Te.value=G(e.body.error??{code:"UNKNOWN",message:e.message}):Te.value=e instanceof Error?e.message:String(e)}}function Mc(e,n){return e.identity.name.trim()!==""?e:{...e,identity:{...e.identity,name:n}}}async function Jt(){if(!ii.value)try{const e=await A("/api/v1/user-md");if(Ai.value=e.exists,e.exists&&e.identity!==null){const n=qi(e.identity);ee.value=n,E.value=n}else{let n;try{const r=await A("/api/v1/user-md/template");n=qi(vc(r.body))}catch{n=Gr()}const i=Ht.value.user_name;typeof i=="string"&&i.trim()!==""&&(n=Mc(n,i)),ee.value=n,E.value=n}}catch(e){P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{ii.value=!0}}const Dc=new Set(["python"]);async function Qt(){if(!(dr.value||Ee.value)){Ee.value=!0,ne.value=null;try{const[e,n]=await Promise.all([A("/api/v1/wizard/manifest"),A("/api/v1/wizard/auto-detect")]),i=(e.packs??[]).map(l=>({id:l.id,label:l.label??l.id,description:l.description??"",requires_hint:l.requires_hint,cluster:l.cluster??void 0,workspaces:l.workspaces}));Ti.value=i,Ln.value=(e.workspaces??[]).filter(l=>l.id!=="agent-config-maintainer").map(l=>({id:l.id,label:l.label??l.id,description:l.description??"",default_packs:l.default_packs??[],optional_packs:l.optional_packs??[],...l.example_roles!==void 0?{example_roles:l.example_roles}:{}}));const r=new Set(i.map(l=>l.id)),t=n.signals.map(l=>l.id.startsWith("pack-")?l.id.slice(5):l.id).filter(l=>r.has(l)).filter(l=>!Dc.has(l));Ei.value=t}catch(e){e instanceof $?ne.value=G(e.body.error??{code:"UNKNOWN",message:e.message}):ne.value=e instanceof Error?e.message:String(e)}finally{Ee.value=!1,dr.value=!0}}}async function Zt(){if(!(fr.value||Bn.value)){Bn.value=!0;try{const e=await A("/api/v1/wizard/detect-tools"),n=e.tools??{},i=e.configured??[];if(zt.value=n,Object.keys(te.value).length===0){const r={};if(i.length>0)for(const t of i)r[t]=!0;else for(const[t,l]of Object.entries(n))l&&(r[t]=!0);te.value=r}}catch{}finally{Bn.value=!1,fr.value=!0}}}async function Xt(){if(!pr.value){pr.value=!0;try{const e=await A("/api/v1/wizard/detect-rtk"),n=e.installed===!0;Yt.value=n,Kt.value=e.installCommand??null,typeof e.repo=="string"&&(qt.value=e.repo);const i=D.value.personal??{};D.value={...D.value,personal:{...i,rtk_installed:n}}}catch{}}}async function jc(e,n){try{await A("/api/v1/wizard/state",{method:"POST",body:{step:e,totalSteps:Me(),partial:n,startedAt:Nc(null)}})}catch(i){P.value={message:i instanceof Error?i.message:String(i),tone:"error"}}}async function el(){pn.value=!0;try{const e=await A("/api/v1/settings/diff",{method:"POST",body:{values:D.value,ifUnmodifiedSince:Ut.value}});In.value=e.changes,he.value={}}catch(e){e instanceof $?(he.value=Wr(e.body.error??{message:e.message}),P.value={message:G(e.body.error??{code:"UNKNOWN",message:e.message}),tone:"error"}):P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{pn.value=!1}}function wn(){return Nn.value?!1:E.value===null||ee.value===null?E.value!==ee.value:JSON.stringify(E.value)!==JSON.stringify(ee.value)}async function ke(e){const n=Oi(e);await jc(n,D.value),re.value=n,P.value=null;const i=On(n,{extended:M.value});(i.kind==="welcome"||i.kind==="userMd")&&Jt(),(i.kind==="roles"||i.kind==="aiTools"||i.kind==="packs")&&Qt(),i.kind==="packs"&&il(),i.kind==="aiTools"&&Zt(),i.id==="identity"&&Xt(),i.kind==="review"&&el()}function nl(){const e=K.value,n=new Map(Ti.value.map(l=>[l.id,l])),i=Object.entries(e).filter(([,l])=>l===!0).map(([l])=>l).filter(l=>{const a=n.get(l)?.cluster;return a===void 0||e[a]===!0}),r=new Set,t=l=>{if(!r.has(l)){r.add(l);for(const a of n.get(l)?.requires_hint??[])t(a)}};for(const l of i)t(l);return[...r].sort()}function il(){if(ri.value)return;const e=Object.entries(ie.value).filter(([,r])=>r===!0).map(([r])=>r),n=new Map(Ln.value.map(r=>[r.id,r])),i={};for(const r of e)for(const t of n.get(r)?.default_packs??[])i[t]=!0;for(const r of Ei.value)i[r]=!0;K.value=i}function Bc(){const e=Object.entries(te.value).filter(([,r])=>r===!0).map(([r])=>r);if(e.length===0)return null;const n=nl();return{schema_version:"wizard-v2",tools:e,packs:n,settings:D.value}}async function Uc(){fn.value=!0,P.value=null;try{const e={settings:D.value},n=Object.entries(ie.value).filter(([,u])=>u===!0).map(([u])=>u),i=E.value!==null&&typeof E.value.identity?.name=="string"&&E.value.identity.name.trim().length>0;E.value!==null&&i&&(wn()||n.length>0)&&(e.identity=n.length>0?{...E.value,role:n}:E.value);const r=await A("/api/v1/wizard/finish",{method:"POST",body:e}),t="You can close this browser window now.",l=r.dryRun===!0?"Dry-run complete — no files written. Settings would be saved.":Array.isArray(r.writtenPaths)?`Saved (${r.writtenPaths.join(", ")}). Wizard complete.`:"Wizard complete.",a=M.value?Bc():null;let c="";if(a!==null)try{let u=null;await El("/api/v1/wizard/apply",a,s=>{s.type==="error"&&(u=typeof s.message=="string"?s.message:"install failed")});const d=a.tools.length,f=a.packs.length;c=u!==null?` Installer failed: ${u}. Settings were saved; re-run the wizard to retry.`:` Installer applied ${d} tool${d===1?"":"s"}`+(f>0?` and ${f} pack${f===1?"":"s"}.`:".")}catch(u){c=` Installer bridge failed: ${u instanceof $?G(u.body.error??{code:"UNKNOWN",message:u.message}):u instanceof Error?u.message:String(u)}. Settings were saved; re-run the wizard to retry the install plan.`}P.value={message:`${l}${c} ${t}`,tone:"success"},re.value=Oi(Me()-1),Bt.value=D.value,ee.value=wn()?E.value:ee.value,In.value=[],Si.value=!0}catch(e){e instanceof $?(he.value=Wr(e.body.error??{message:e.message}),P.value={message:G(e.body.error??{code:"UNKNOWN",message:e.message}),tone:"error"}):P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{fn.value=!1}}const Hc=["de","en","en-US","en-GB","fr","es","it","nl","pt","pt-BR"];function Wc(){if(hr.value)return;const e=E.value;if(e===null)return;hr.value=!0;let n=e;if(e.identity.name.trim()===""){const i=ln.value?.systemUser;i!==void 0&&i.trim()!==""&&(n={...n,identity:{...n.identity,name:i}})}if(!Ai.value&&typeof navigator<"u"){const i=(navigator.language||"").split("-")[0];i.length>=2&&(n={...n,language:i})}n!==e&&(E.value=n)}function zc(){const e=E.value;if(De(()=>{Wc()},[e]),e===null)return o("p",{children:"Loading…"});const n=i=>{E.value={...i,last_updated:new Date().toISOString().slice(0,10)},Nn.value=!1};return o("div",{class:"ac-wizard-step-stub ac-wizard__module-fields",children:[o("p",{children:["Tell the agent who you are. We pre-filled what we could detect — adjust freely. Stored in ",o("code",{children:".agent-user.yml"}),"."]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"welcome-name",children:"Name"}),o("input",{class:"ac-input",id:"welcome-name",type:"text",placeholder:"How should the agent address you?",value:e.identity.name,onInput:i=>n({...e,identity:{...e.identity,name:i.currentTarget.value}})})]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"welcome-lang",children:"Language"}),o("input",{class:"ac-input",id:"welcome-lang",type:"text",list:"welcome-lang-list",placeholder:"BCP-47 code, e.g. de, en, en-US",value:e.language,onInput:i=>n({...e,language:i.currentTarget.value})}),o("datalist",{id:"welcome-lang-list",children:Hc.map(i=>o("option",{value:i},i))})]})]})}function Yc(){const e=te.value,n=zt.value;return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:"Pick the AI tools you use. Tools detected on this machine are pre-selected on first run. The installer wires each selected tool's surface (skills, rules, commands) on apply; you can change this list later by re-running the wizard."}),o("ul",{class:"ac-wizard__tool-list",children:Oc.map(i=>{const r=n[i.id]===!0;return o("li",{class:"ac-wizard__tool-row",children:[o("label",{class:"ac-wizard__tool-label",children:[o("input",{type:"checkbox",checked:e[i.id]??!1,onChange:t=>{const l=t.currentTarget.checked;te.value={...e,[i.id]:l}}})," ",i.label]}),o("span",{class:`ac-badge ${r?"ac-badge--installed":"ac-badge--missing"}`,title:r?"Detected on this machine":"Not detected on this machine",children:r?"installed":"not installed"})]},i.id)})})]})}function Kc(){if(Ee.value)return o("p",{children:"Loading roles…"});if(ne.value!==null)return o("div",{class:"ac-wizard-step-stub",children:o("p",{class:"ac-banner ac-banner--error",children:["Discovery failed: ",ne.value]})});const e=ie.value,n=Ln.value,i=(r,t)=>{ie.value={...ie.value,[r]:t},il()};return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:["Pick the areas you work in. We use them to recommend capability packs on the next step, and they become your roles in",o("code",{children:" .agent-user.yml"}),"."]}),n.length===0?o("p",{children:o("em",{children:"No roles available in the manifest."})}):o("div",{class:"ac-wizard__pack-grid",children:n.map(r=>o("section",{class:"ac-pack-tile",children:[o("label",{class:"ac-pack-tile__head",children:[o("input",{type:"checkbox",checked:e[r.id]??!1,onChange:t=>{i(r.id,t.currentTarget.checked)}}),o("span",{class:"ac-pack-tile__title",children:r.label})]}),(r.example_roles??[]).length>0?o("p",{class:"ac-pack-tile__role",children:["e.g. ",(r.example_roles??[]).join(", ")]}):null,r.description!==""?o("p",{class:"ac-pack-tile__desc",children:r.description}):null]},r.id))})]})}function qc(){if(Ee.value)return o("p",{children:"Loading discovery manifest…"});if(ne.value!==null)return o("div",{class:"ac-wizard-step-stub",children:[o("p",{class:"ac-banner ac-banner--error",children:["Discovery failed: ",ne.value]}),o("p",{children:"The manifest endpoint is gated on extended-mode. Re-run the server with extended steps enabled to populate this list."})]});const e=K.value,n=new Set(Ei.value),i=new Map(Ln.value.map(s=>[s.id,s.label])),r=ie.value,t=s=>{const h=(s??[]).filter(p=>p!=="agent-config-maintainer");return h.length===0?null:o("span",{class:"ac-pack-tile__ws",children:h.map(p=>o("span",{class:`ac-badge ac-badge--ws${r[p]===!0?" ac-badge--ws-active":""}`,title:r[p]===!0?"Matches a role you picked":"Workspace / area",children:i.get(p)??p},p))})},l=Ti.value.filter(s=>s.id!=="engineering-base"),a=new Map;for(const s of l)if(s.cluster!==void 0){const h=a.get(s.cluster)??[];h.push(s),a.set(s.cluster,h)}const c=new Set(l.filter(s=>s.cluster!==void 0).map(s=>s.id)),u=l.filter(s=>!c.has(s.id)),d=(s,h)=>{ri.value=!0,K.value={...K.value,[s]:h}},f=(s,h)=>{ri.value=!0;const p={...K.value,[s]:h};if(h)for(const v of a.get(s)??[])p[v.id]===void 0&&(p[v.id]=!0);K.value=p};return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:"Pick the capability packs to install. Auto-detected packs are pre-selected; engineering hygiene is included automatically when a pack needs it. A language tile expands to its frameworks — turn the language off to skip them all."}),u.length===0?o("p",{children:o("em",{children:"No packs available in the manifest."})}):o("div",{class:"ac-wizard__pack-grid",children:u.map(s=>{const h=a.get(s.id)??[],p=h.length>0,v=e[s.id]??!1;return o("section",{class:"ac-pack-tile",children:[o("label",{class:"ac-pack-tile__head",children:[o("input",{type:"checkbox",checked:v,onChange:g=>{const b=g.currentTarget.checked;p?f(s.id,b):d(s.id,b)}}),o("span",{class:"ac-pack-tile__title",children:s.label}),n.has(s.id)?o("span",{class:"ac-badge ac-badge--installed",children:"auto-detected"}):null]}),t(s.workspaces),s.description!==""?o("p",{class:"ac-pack-tile__desc",children:s.description}):null,p?o("fieldset",{class:"ac-pack-tile__children",disabled:!v,children:h.map(g=>o("label",{class:"ac-pack-tile__child",children:[o("input",{type:"checkbox",checked:e[g.id]??!1,disabled:!v,onChange:b=>{d(g.id,b.currentTarget.checked)}}),o("span",{children:g.label})]},g.id))}):null]},s.id)})})]})}function Gc(){const e=Yt.value,n=Kt.value;return o("div",{class:"ac-rtk-row",children:[o("div",{class:"ac-rtk-row__head",children:[o("span",{class:"ac-rtk-row__label",children:["rtk ",o("small",{children:"(Rust Token Killer)"})]}),e===null?o("span",{class:"ac-badge ac-badge--missing",children:"detecting…"}):e?o("span",{class:"ac-badge ac-badge--installed",children:"installed"}):o("span",{class:"ac-badge ac-badge--missing",children:"not installed"})]}),e===!1?o("div",{class:"ac-rtk-row__install",children:[o("p",{class:"ac-field__description",children:"rtk wraps verbose CLI output for ~60–90% token savings. Install it, then re-open the wizard to pick up detection:"}),n!==null?o("code",{class:"ac-rtk-row__cmd",children:n}):null,o("a",{class:"ac-button",href:qt.value,target:"_blank",rel:"noreferrer noopener",children:"Open rtk repo"})]}):null]})}function Vc(){const e=On(re.value,{extended:M.value});if(M.value&&Oe.value==="install"&&e.id==="identity"&&!Ve.value)return o(Cc,{});if(e.kind==="form"){const i=mc(xi.value,e.paths??[]);return o(J,{children:[e.id==="identity"?o(Gc,{}):null,o(Bl,{schema:i,values:D.value,errors:he.value,onChange:r=>{D.value=r}})]})}return e.kind==="userMd"?!ii.value||E.value===null?o("p",{children:"Loading .agent-user.yml…"}):o(zl,{value:E.value,errors:he.value,hideRole:M.value&&Oe.value==="install",hideIdentityBasics:M.value&&Oe.value==="install",onChange:i=>{E.value=i,Nn.value=!1}}):e.kind==="welcome"?o(zc,{}):e.kind==="aiTools"?o(Yc,{}):e.kind==="roles"?o(Kc,{}):e.kind==="packs"?o(qc,{}):o(Ac,{steps:Vt(),currentIndex:re.value,changes:In.value,errors:he.value,userMdChanged:wn(),userMdAction:Ai.value?"replace":"create",loading:pn.value,onJump:i=>{ke(i)},selectedToolsCount:Object.values(te.value).filter(Boolean).length,selectedPacksCount:Object.values(K.value).filter(Boolean).length})}function Hn({path:e}){if(De(()=>{$c()},[]),!jt.value||xi.value===null)return o("div",{class:"ac-page",children:[o("h1",{children:"Setup wizard"}),Te.value!==null?o("p",{class:"ac-banner ac-banner--error",children:Te.value}):o("p",{children:"Loading…"})]});const n=re.value,i=Me(),r=On(n,{extended:M.value}),t=n===i-1,l=r.kind==="aiTools"&&Object.values(te.value).filter(Boolean).length===0||r.kind==="roles"&&Object.values(ie.value).filter(Boolean).length===0||r.kind==="packs"&&nl().length===0,a=M.value&&Oe.value==="install"&&r.id==="identity"&&!Ve.value,c=bn.value,u=c!==null&&!Gt.value,d=ti.value;return d!==null&&d.present&&!li.value?o("div",{class:"ac-page",children:o(Tc,{sourcePath:d.path,backupTarget:d.backupTarget,version:d.version,busy:ai.value,error:oi.value,onBackupAndProceed:()=>{Pc()},onAbort:()=>{P.value={tone:"info",message:"Aborted. Uninstall v3 manually, then re-run `agent-config install`."},li.value=!0}})}):o("div",{class:"ac-page",children:[o(yc,{step:r,index:n,total:i}),u?o(Sc,{abortedAt:c.abortedAt,abortNote:c.abortNote,writesSinceRollback:c.writesSinceRollback,busy:fn.value,onResume:()=>{Un("resume")},onRollback:()=>{Un("rollback")},onIgnore:()=>{Un("ignore")}}):null,P.value!==null?o("p",{class:`ac-banner${P.value.tone==="error"?" ac-banner--error":""}`,children:P.value.message}):null,o("div",{class:"ac-wizard__step",children:o(Vc,{})}),l?o("p",{class:"ac-wizard__hint",children:r.kind==="aiTools"?"Select at least one AI tool to continue.":r.kind==="roles"?"Select at least one role to continue.":"Select at least one capability pack to continue."}):null,o(bc,{canGoPrev:n>0,canGoNext:!t&&!l,canSkip:a||r.kind==="userMd",skipLabel:a?"Finish install here":"Skip",isLast:t,busy:fn.value||pn.value,canFinish:In.value.length>0||wn(),completed:Si.value,onPrev:()=>{ke(n-1)},onNext:()=>{if(a){Ve.value=!0;return}ke(n+1)},onSkip:()=>{if(a){Ve.value=!0,ke(Me()-1);return}Nn.value=!0,ke(n+1)},onFinish:()=>{Uc()}})]})}const kn=_(!1),ve=_(null);async function Jc(){hn.value=!0,vn.value=null;try{const e=await A("/api/v1/modules/detect");Ci.value=e.candidates,Wt.value=e.project_root;const n={};for(const i of e.candidates)n[i.path]=!0;_n.value=n,mn.value=e.proposed_block.enabled,gn.value=e.proposed_block.namespace_template??"",yn.value=e.proposed_block.agent_folder??"agents"}catch(e){vn.value=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e)}finally{hn.value=!1,Ec.value=!0}}function Qc(){const e=new Set(Ci.value.map(r=>r.path)),n=_n.value,i=Object.keys(n).filter(r=>n[r]===!0&&e.has(r));return{enabled:mn.value,root_paths:i,namespace_template:gn.value,agent_folder:yn.value||"agents"}}async function Zc(){kn.value=!0,ve.value=null;try{const e=await A("/api/v1/modules/apply",{method:"POST",body:Qc()});ve.value={message:e.appliedTo!==null?`Saved project settings to ${e.appliedTo}.`:`Saved project settings to ${e.projectRoot}.`,tone:"success"}}catch(e){const n=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e);ve.value={message:`Could not save project settings: ${n}`,tone:"error"}}finally{kn.value=!1}}function Xc(){if(hn.value)return o("p",{children:"Detecting module roots…"});if(vn.value!==null)return o("p",{class:"ac-banner ac-banner--error",children:["Module detection failed: ",vn.value]});const e=Ci.value,n=_n.value,i=Wt.value;return o("div",{class:"ac-section",children:[i!==null?o("p",{class:"ac-section__description",children:["Scanning ",o("code",{children:i}),". Pick which detected roots the agent should treat as modules. These write to",o("code",{children:" .agent-project-settings.yml"})," in this repo only."]}):null,o("label",{children:[o("input",{type:"checkbox",checked:mn.value,onChange:r=>{mn.value=r.currentTarget.checked}})," ","Enable module discovery (writes ",o("code",{children:"modules.enabled"}),")"]}),e.length===0?o("p",{children:[o("em",{children:"No module roots detected."})," The scan found no common module layouts (Laravel ",o("code",{children:"app/Modules/"}),", Symfony",o("code",{children:" src/Module/"}),", Node ",o("code",{children:"packages/"}),", Python",o("code",{children:" src/"}),", Go ",o("code",{children:"internal/"}),")."]}):o("ul",{style:"list-style: none; padding-left: 0;",children:e.map(r=>o("li",{children:o("label",{children:[o("input",{type:"checkbox",checked:n[r.path]??!1,onChange:t=>{const l=t.currentTarget.checked;_n.value={...n,[r.path]:l}}})," ",o("code",{children:r.path})," — ",r.stack," ",o("small",{children:["(",r.confidence," confidence)"]})]})},r.path))}),o("div",{class:"ac-wizard__module-fields",children:[o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"ac-modules-namespace",children:"Namespace template"}),o("input",{id:"ac-modules-namespace",class:"ac-input",type:"text",value:gn.value,placeholder:"e.g. App\\\\Modules\\\\{ModuleName}\\\\App",onInput:r=>{gn.value=r.currentTarget.value}}),o("span",{class:"ac-field__description",children:"How a module path maps to its namespace. Leave blank to skip namespacing."})]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"ac-modules-agent-folder",children:"Agent folder"}),o("input",{id:"ac-modules-agent-folder",class:"ac-input",type:"text",value:yn.value,placeholder:"agents",onInput:r=>{yn.value=r.currentTarget.value}}),o("span",{class:"ac-field__description",children:["Folder name that holds per-module agent docs (default ",o("code",{children:"agents"}),")."]})]})]})]})}function es(){return De(()=>{Jc()},[]),o("div",{class:"ac-page",children:[o("header",{class:"ac-page__header",children:[o("h1",{children:"Project settings"}),o("p",{class:"ac-section__description",children:["Configuration scoped to this repository — written to",o("code",{children:" .agent-project-settings.yml"}),", not the global tree."]})]}),ve.value!==null?o("p",{class:`ac-banner ac-banner--${ve.value.tone==="success"?"success":"error"}`,children:ve.value.message}):null,o("section",{class:"ac-section",children:[o("h2",{class:"ac-section__title",children:"Modules"}),o(Xc,{})]}),o("div",{class:"ac-form__actions ac-wizard__nav",children:o("button",{type:"button",class:"ac-button ac-button--primary",disabled:kn.value||hn.value,onClick:()=>{Zc()},children:kn.value?"Saving…":"Save project settings"})})]})}const Je=_([]),xn=_([]),ci=_([]),si=_([]),An=_(null),rl=_(!1),Ne=_(null),Z=_(null),Wn=_("plain");async function ns(){Ne.value=null;try{const[e,n,i,r]=await Promise.all([A("/api/v1/workspace/roles"),A("/api/v1/workspace/sessions?limit=20"),A("/api/v1/workspace/knowledge?limit=20"),A("/api/v1/workspace/documents?limit=20")]);Je.value=e.roles,xn.value=n.sessions,ci.value=i.chunks,si.value=r.documents,rl.value=!0}catch(e){e instanceof $?Ne.value=e.body?.error?.message??e.message:Ne.value=e instanceof Error?e.message:String(e)}}async function is(e,n){Z.value=null;try{const i=await A("/api/v1/workspace/launch",{method:"POST",body:{role:e,task:n,host:"local"}});Z.value=`Started session ${i.id} (${i.role} · ${i.task}).`;const r=await A("/api/v1/workspace/sessions?limit=20");xn.value=r.sessions}catch(i){i instanceof $?Z.value=i.body?.error?.message??i.message:Z.value=i instanceof Error?i.message:String(i)}}function rs({role:e}){const n=An.value===e.slug;return o("button",{type:"button",class:`ac-workspace__role${n?" ac-workspace__role--active":""}`,"aria-current":n?"true":void 0,"aria-label":`Pick role ${e.display_name}`,onClick:()=>{An.value=e.slug,Z.value=null},children:[o("span",{class:"ac-workspace__role-name",children:e.display_name}),o("span",{class:"ac-workspace__role-status","data-status":e.status,children:e.status}),o("span",{class:"ac-workspace__role-tagline",children:e.tagline})]})}function ts({role:e}){return o("section",{class:"ac-workspace__tasks","aria-labelledby":"task-heading",children:[o("h2",{id:"task-heading",class:"ac-workspace__heading",children:["First tasks · ",e.display_name]}),e.first_tasks.length===0?o("p",{class:"ac-workspace__empty",children:"No tasks scaffolded yet for this role."}):o("ul",{class:"ac-workspace__task-list",children:e.first_tasks.map(n=>o("li",{class:"ac-workspace__task",children:[o("div",{class:"ac-workspace__task-head",children:[o("span",{class:"ac-workspace__task-name",children:n.name}),o("button",{type:"button",class:"ac-button ac-button--primary",onClick:()=>{is(e.slug,n.name)},children:"Start session"})]}),o("p",{class:"ac-workspace__task-intent",children:n.intent}),n.prompt!==""?o("code",{class:"ac-workspace__task-prompt",children:["prompts/",n.prompt]}):null]},n.name))}),e.skills.length>0?o("details",{class:"ac-workspace__skills",children:[o("summary",{children:["Skill shortlist (",e.skills.length,")"]}),o("ul",{class:"ac-workspace__skill-list",children:[e.skills.slice(0,5).map(n=>o("li",{class:"ac-workspace__skill",children:[o("code",{children:n.id})," — ",n.why]},n.id)),e.skills.length>5?o("li",{class:"ac-workspace__skill-more",children:["+ ",e.skills.length-5," more"]}):null]})]}):null]})}function ls(){return o("section",{class:"ac-workspace__sessions","aria-labelledby":"sessions-heading",children:[o("h2",{id:"sessions-heading",class:"ac-workspace__heading",children:"Recent sessions"}),xn.value.length===0?o("p",{class:"ac-workspace__empty",children:"No sessions yet — pick a role and start one."}):o("ul",{class:"ac-workspace__session-list",children:xn.value.map(e=>o("li",{class:"ac-workspace__session",children:[o("span",{class:"ac-workspace__session-id",children:e.id.slice(0,16)}),o("span",{class:"ac-workspace__session-role",children:e.role}),o("span",{class:"ac-workspace__session-task",children:e.task})]},e.id))})]})}function as(){return o("section",{class:"ac-workspace__knowledge","aria-labelledby":"knowledge-heading",children:[o("h2",{id:"knowledge-heading",class:"ac-workspace__heading",children:"Knowledge sources"}),ci.value.length===0?o("p",{class:"ac-workspace__empty",children:["No sources yet. Run ",o("code",{children:"/knowledge:ingest <path>"})," to add documents."]}):o("ol",{class:"ac-workspace__citation-list",children:ci.value.map((e,n)=>o("li",{class:"ac-workspace__citation",children:[o("span",{class:"ac-workspace__citation-marker","aria-label":`Citation ${n+1}`,children:["[",n+1,"]"]}),o("a",{href:`file://${e.source}`,class:"ac-workspace__citation-source",title:"Open source in OS default app",children:e.source.split("/").pop()??e.source}),e.pinned?o("span",{class:"ac-workspace__citation-pin","aria-label":"pinned",children:"★"}):null,o("p",{class:"ac-workspace__citation-excerpt",children:[e.excerpt.slice(0,200),e.excerpt.length>200?"…":""]})]},e.id))})]})}function os(){return o("section",{class:"ac-workspace__recent","aria-labelledby":"recent-heading",children:[o("h2",{id:"recent-heading",class:"ac-workspace__heading",children:"Recent documents"}),si.value.length===0?o("p",{class:"ac-workspace__empty",children:"No documents yet. Saved drafts land here."}):o("ul",{class:"ac-workspace__doc-list",children:si.value.map(e=>o("li",{class:"ac-workspace__doc",children:[o("span",{class:"ac-workspace__doc-type","data-type":e.type,children:e.type}),o("span",{class:"ac-workspace__doc-title",children:e.title}),o("time",{class:"ac-workspace__doc-time",dateTime:e.updated_at,children:e.updated_at.slice(0,10)})]},`${e.type}/${e.slug}`))})]})}function cs(){const e=Wn.value;return o("fieldset",{class:"ac-workspace__explain",children:[o("legend",{class:"ac-workspace__heading",children:"Explanation style"}),o("label",{class:"ac-workspace__explain-option",children:[o("input",{type:"radio",name:"explain-mode",value:"plain",checked:e==="plain",onChange:()=>{Wn.value="plain"},"aria-label":"Plain language"}),o("span",{children:"Plain language"})]}),o("label",{class:"ac-workspace__explain-option",children:[o("input",{type:"radio",name:"explain-mode",value:"technical",checked:e==="technical",onChange:()=>{Wn.value="technical"},"aria-label":"Technical detail"}),o("span",{children:"Technical detail"})]}),o("p",{class:"ac-workspace__explain-hint",children:e==="plain"?"Replies use everyday words. Toggle to see the technical view.":"Replies keep the technical vocabulary. Toggle for the plain view."})]})}function ss(){if(De(()=>{ns()},[]),Ne.value!==null)return o("div",{class:"ac-page ac-page--error",children:[o("h1",{children:"Workspace"}),o("p",{class:"ac-banner ac-banner--error",children:Ne.value})]});if(!rl.value)return o("div",{class:"ac-page",children:[o("h1",{children:"Workspace"}),o("p",{children:"Loading…"})]});const e=An.value!==null?Je.value.find(n=>n.slug===An.value)??null:null;return o("div",{class:"ac-page ac-workspace",children:[o("header",{class:"ac-page__header",children:[o("h1",{children:"Workspace"}),o("p",{class:"ac-page__subtitle",children:"Pick a role, pick a first task, run it."})]}),Z.value!==null?o("p",{class:"ac-banner",role:"status",children:Z.value}):null,o("div",{class:"ac-workspace__grid",children:[o("section",{class:"ac-workspace__roles","aria-labelledby":"roles-heading",children:[o("h2",{id:"roles-heading",class:"ac-workspace__heading",children:"Roles"}),Je.value.length===0?o("p",{class:"ac-workspace__empty",children:"No roles installed."}):o("div",{class:"ac-workspace__role-grid",children:Je.value.map(n=>o(rs,{role:n},n.slug))})]}),o("main",{class:"ac-workspace__main","aria-label":"Tasks and sessions",children:[e!==null?o(ts,{role:e}):o("p",{class:"ac-workspace__empty",children:"Pick a role on the left to see its first tasks."}),o(ls,{})]}),o("aside",{class:"ac-workspace__rail","aria-label":"Knowledge and documents",children:[o(as,{}),o(os,{}),o(cs,{})]})]})]})}const tl=[{id:"setup",label:"Setup",hashPath:"/setup",matches:["/setup","/wizard"]},{id:"project",label:"Projekt",hashPath:"/project",matches:["/project"]},{id:"tasks",label:"Tasks",hashPath:"/tasks",matches:["/tasks"]},{id:"council",label:"Council",hashPath:"/council",matches:["/council"]},{id:"memory",label:"Memory",hashPath:"/memory",matches:["/memory"]},{id:"explain",label:"Explain",hashPath:"/explain",matches:["/explain"]},{id:"workspace",label:"Workspace",hashPath:"/workspace",matches:["/workspace"]}];function us(e){for(const n of tl)for(const i of n.matches)if(e===i||e.startsWith(`${i}/`))return n.id;return null}function ds(){const e=de.value,n=us(e);return o("header",{class:"ac-topnav",children:o("div",{class:"ac-topnav__inner",children:[o("div",{class:"ac-topnav__brand",children:[o("h1",{class:"ac-topnav__title",children:"@event4u/agent-config"}),o("p",{class:"ac-topnav__subtitle",children:"Browser Wizard"})]}),o("nav",{class:"ac-topnav__tabs","aria-label":"Surfaces",children:tl.map(i=>o("button",{type:"button",class:`ac-topnav__tab${n===i.id?" ac-topnav__tab--active":""}`,"aria-current":n===i.id?"page":void 0,onClick:()=>Jn(i.hashPath),children:i.label},i.id))})]})})}function ze({name:e}){return o("div",{class:"ac-page",children:[o("header",{class:"ac-page__header",children:o("h1",{children:e})}),o("section",{class:"ac-section",children:[o("p",{class:"ac-section__description",children:["The ",o("strong",{children:e})," surface is currently served by the legacy installer GUI on port ",o("code",{children:"41100"}),". It is being ported to the modern shell in a follow-up phase (road-to-unified-setup § Phase 5)."]}),o("p",{class:"ac-section__description",children:["For now the legacy surface remains reachable via"," ",o("code",{children:"installer gui"}),"."]})]})]})}function fs({path:e}){return o("div",{class:"ac-page ac-page--error",children:[o("h1",{children:"Page not found"}),o("p",{children:["Nothing routed to ",o("code",{children:e}),". Try ",o("a",{href:"#/setup",children:"Setup"}),"."]})]})}function ps(){const e=ln.value;return e===null||e.dryRun!==!0?null:o("div",{class:"ac-dryrun-banner",role:"status","aria-live":"polite",children:[o("strong",{children:"DRY RUN"}),o("span",{children:" · no files will be written. Validation + rendering run normally; commits return a preview."})]})}function hs(e){return e==="/"||e==="/setup"||e.startsWith("/setup/")?o(Hn,{path:e}):e.startsWith("/wizard")?o(Hn,{path:e}):e==="/settings"||e.startsWith("/settings/")?o(Hn,{path:"/setup"}):e==="/project"||e.startsWith("/project/")?o(es,{}):e==="/tasks"?o(ze,{name:"Tasks"}):e==="/council"?o(ze,{name:"Council"}):e==="/memory"?o(ze,{name:"Memory"}):e==="/explain"?o(ze,{name:"Explain"}):e==="/workspace"?o(ss,{}):o(fs,{path:e})}function vs(){return De(()=>{Cl(),(de.value==="/"||de.value==="/settings"||de.value.startsWith("/settings/"))&&Jn("/setup"),Ol()},[]),o(J,{children:[o(ps,{}),o(ds,{}),hs(de.value)]})}const _s=3e4,ms=30*6e4;let Ye=null,vr=!1;function _r(e){if(!vr&&(vr=!0,!(typeof navigator>"u"||typeof navigator.sendBeacon!="function")))try{navigator.sendBeacon(`/api/v1/shutdown?token=${encodeURIComponent(e)}`)}catch{}}function gs(e){if(typeof window>"u")return()=>{};let n=Date.now();const i=()=>{n=Date.now()},r=["pointerdown","keydown","wheel","touchstart"];for(const c of r)window.addEventListener(c,i,{passive:!0});const t=()=>{document.hidden||i()};document.addEventListener("visibilitychange",t);const l=()=>{Ye!==null&&clearInterval(Ye),Ye=null;for(const c of r)window.removeEventListener(c,i);document.removeEventListener("visibilitychange",t),window.removeEventListener("pagehide",a)};Ye=setInterval(()=>{if(!document.hidden){if(Date.now()-n>ms){_r(e),l();return}A("/api/v1/ping").catch(()=>{})}},_s);function a(){_r(e)}return window.addEventListener("pagehide",a),l}function ys(){return new URLSearchParams(window.location.search).get("token")}function bs(){const e=document.getElementById("app");if(e===null)return;const n=ys();if(n===null){e.textContent="agent-config UI · missing token — re-open via `agent-config ui:serve`.";return}Tl(n),gs(n),e.textContent="",fl(o(vs,{}),e)}bs();
40
+ //# sourceMappingURL=index-Tk7lkVH8.js.map