@event4u/agent-config 4.5.0 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +21 -264
- package/dist/cli/agent-config.js +13 -9
- package/dist/cli/agent-config.js.map +1 -1
- package/dist/cli/commands/uiServe.js.map +1 -1
- package/dist/cli/registry.js +1 -1
- package/dist/cli/registry.js.map +1 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +1 -1
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +1 -1
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +1 -1
- package/dist/discovery/trust-report.md +1 -1
- package/dist/discovery/workspaces.json +1 -1
- package/dist/mcp/registry-manifest.json +2 -2
- package/dist/server/app.js.map +1 -1
- package/dist/server/routes/wizard.js +45 -11
- package/dist/server/routes/wizard.js.map +1 -1
- package/dist/ui/assets/index-BAJQeVdX.js +40 -0
- package/dist/ui/assets/index-BAJQeVdX.js.map +1 -0
- package/dist/ui/assets/index-BbWWuFrF.css +1 -0
- package/dist/ui/index.html +2 -2
- package/docs/archive/CHANGELOG-pre-4.5.0.md +289 -0
- package/docs/contracts/gui-wizard.md +8 -1
- package/package.json +1 -1
- package/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
- package/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
- package/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
- package/scripts/condense.py +56 -1
- package/scripts/install.py +16 -43
- package/dist/ui/assets/index-J0-0d7RC.js +0 -40
- package/dist/ui/assets/index-J0-0d7RC.js.map +0 -1
- package/dist/ui/assets/index-ZiC8PbdW.css +0 -1
|
@@ -1,40 +0,0 @@
|
|
|
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 a of t)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function i(t){const a={};return t.integrity&&(a.integrity=t.integrity),t.referrerPolicy&&(a.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?a.credentials="include":t.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(t){if(t.ep)return;t.ep=!0;const a=i(t);fetch(t.href,a)}})();var Tn,k,Sr,Tr,q,$i,Er,Or,$n,Ve,Se,Ir,_i,Gn,Vn,rn={},tn=[],bl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,En=Array.isArray;function H(e,n){for(var i in n)e[i]=n[i];return e}function mi(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function wl(e,n,i){var r,t,a,o={};for(a in n)a=="key"?r=n[a]:a=="ref"?t=n[a]:o[a]=n[a];if(arguments.length>2&&(o.children=arguments.length>3?Tn.call(arguments,2):i),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Je(e,o,r,t,null)}function Je(e,n,i,r,t){var a={type:e,props:n,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:t??++Sr,__i:-1,__u:0};return t==null&&k.vnode!=null&&k.vnode(a),a}function j(e){return e.children}function Te(e,n){this.props=e,this.context=n}function ye(e,n){if(n==null)return e.__?ye(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"?ye(e):null}function kl(e){if(e.__P&&e.__d){var n=e.__v,i=n.__e,r=[],t=[],a=H({},n);a.__v=n.__v+1,k.vnode&&k.vnode(a),gi(e.__P,a,n,e.__n,e.__P.namespaceURI,32&n.__u?[i]:null,r,i??ye(n),!!(32&n.__u),t),a.__v=n.__v,a.__.__k[a.__i]=a,Rr(r,a,t),n.__e=n.__=null,a.__e!=i&&Nr(a)}}function Nr(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}),Nr(e)}function Di(e){(!e.__d&&(e.__d=!0)&&q.push(e)&&!ln.__r++||$i!=k.debounceRendering)&&(($i=k.debounceRendering)||Er)(ln)}function ln(){try{for(var e,n=1;q.length;)q.length>n&&q.sort(Or),e=q.shift(),n=q.length,kl(e)}finally{q.length=ln.__r=0}}function Lr(e,n,i,r,t,a,o,c,u,d,f){var s,p,h,v,g,b,w,m=r&&r.__k||tn,D=n.length;for(u=xl(i,n,m,u,D),s=0;s<D;s++)(h=i.__k[s])!=null&&(p=h.__i!=-1&&m[h.__i]||rn,h.__i=s,b=gi(e,h,p,t,a,o,c,u,d,f),v=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&yi(p.ref,null,h),f.push(h.ref,h.__c||v,h)),g==null&&v!=null&&(g=v),(w=!!(4&h.__u))||p.__k===h.__k?(u=Fr(h,u,e,w),w&&p.__e&&(p.__e=null)):typeof h.type=="function"&&b!==void 0?u=b:v&&(u=v.nextSibling),h.__u&=-7);return i.__e=g,u}function xl(e,n,i,r,t){var a,o,c,u,d,f=i.length,s=f,p=0;for(e.__k=new Array(t),a=0;a<t;a++)(o=n[a])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=e.__k[a]=Je(null,o,null,null,null):En(o)?o=e.__k[a]=Je(j,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=Je(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,u=a+p,o.__=e,o.__b=e.__b+1,c=null,(d=o.__i=Cl(o,i,u,s))!=-1&&(s--,(c=i[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(t>f?p--:t<f&&p++),typeof o.type!="function"&&(o.__u|=4)):d!=u&&(d==u-1?p--:d==u+1?p++:(d>u?p--:p++,o.__u|=4))):e.__k[a]=null;if(s)for(a=0;a<f;a++)(c=i[a])!=null&&!(2&c.__u)&&(c.__e==r&&(r=ye(c)),Mr(c,c));return r}function Fr(e,n,i,r){var t,a;if(typeof e.type=="function"){for(t=e.__k,a=0;t&&a<t.length;a++)t[a]&&(t[a].__=e,n=Fr(t[a],n,i,r));return n}e.__e!=n&&(r&&(n&&e.type&&!n.parentNode&&(n=ye(e)),i.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function Cl(e,n,i,r){var t,a,o,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,a=i+1;t>=0||a<n.length;)if((d=n[o=t>=0?t--:a++])!=null&&!(2&d.__u)&&c==d.key&&u==d.type)return o}return-1}function Bi(e,n,i){n[0]=="-"?e.setProperty(n,i??""):e[n]=i==null?"":typeof i!="number"||bl.test(n)?i:i+"px"}function We(e,n,i,r,t){var a,o;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||Bi(e.style,n,"");if(i)for(n in i)r&&i[n]==r[n]||Bi(e.style,n,i[n])}else if(n[0]=="o"&&n[1]=="n")a=n!=(n=n.replace(Ir,"$1")),o=n.toLowerCase(),n=o in e||n=="onFocusOut"||n=="onFocusIn"?o.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+a]=i,i?r?i[Se]=r[Se]:(i[Se]=_i,e.addEventListener(n,a?Vn:Gn,a)):e.removeEventListener(n,a?Vn:Gn,a);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 zi(e){return function(n){if(this.l){var i=this.l[n.type+e];if(n[Ve]==null)n[Ve]=_i++;else if(n[Ve]<i[Se])return;return i(k.event?k.event(n):n)}}}function gi(e,n,i,r,t,a,o,c,u,d){var f,s,p,h,v,g,b,w,m,D,X,xe,Mi,He,Mn,B=n.type;if(n.constructor!==void 0)return null;128&i.__u&&(u=!!(32&i.__u),a=[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,D=(f=B.contextType)&&r[f.__c],X=f?D?D.props.value:f.__:r,i.__c?b=(s=n.__c=i.__c).__=s.__E:(m?n.__c=s=new B(w,X):(n.__c=s=new Te(w,X),s.constructor=B,s.render=Sl),D&&D.sub(s),s.state||(s.state={}),s.__n=r,p=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))),h=s.props,v=s.state,s.__v=n,p)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!==h&&s.componentWillReceiveProps!=null&&s.componentWillReceiveProps(w,X),n.__v==i.__v||!s.__e&&s.shouldComponentUpdate!=null&&s.shouldComponentUpdate(w,s.__s,X)===!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(se){se&&(se.__=n)}),tn.push.apply(s.__h,s._sb),s._sb=[],s.__h.length&&o.push(s);break e}s.componentWillUpdate!=null&&s.componentWillUpdate(w,s.__s,X),m&&s.componentDidUpdate!=null&&s.__h.push(function(){s.componentDidUpdate(h,v,g)})}if(s.context=X,s.props=w,s.__P=e,s.__e=!1,xe=k.__r,Mi=0,m)s.state=s.__s,s.__d=!1,xe&&xe(n),f=s.render(s.props,s.state,s.context),tn.push.apply(s.__h,s._sb),s._sb=[];else do s.__d=!1,xe&&xe(n),f=s.render(s.props,s.state,s.context),s.state=s.__s;while(s.__d&&++Mi<25);s.state=s.__s,s.getChildContext!=null&&(r=H(H({},r),s.getChildContext())),m&&!p&&s.getSnapshotBeforeUpdate!=null&&(g=s.getSnapshotBeforeUpdate(h,v)),He=f!=null&&f.type===j&&f.key==null?Pr(f.props.children):f,c=Lr(e,En(He)?He:[He],n,i,r,t,a,o,c,u,d),s.base=n.__e,n.__u&=-161,s.__h.length&&o.push(s),b&&(s.__E=s.__=null)}catch(se){if(n.__v=null,u||a!=null)if(se.then){for(n.__u|=u?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;a[a.indexOf(c)]=null,n.__e=c}else{for(Mn=a.length;Mn--;)mi(a[Mn]);Jn(n)}else n.__e=i.__e,n.__k=i.__k,se.then||Jn(n);k.__e(se,n,i)}else a==null&&n.__v==i.__v?(n.__k=i.__k,n.__e=i.__e):c=n.__e=Al(i.__e,n,i,r,t,a,o,u,d);return(f=k.diffed)&&f(n),128&n.__u?void 0:c}function Jn(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Jn))}function Rr(e,n,i){for(var r=0;r<i.length;r++)yi(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(a){a.call(t)})}catch(a){k.__e(a,t.__v)}})}function Pr(e){return typeof e!="object"||e==null||e.__b>0?e:En(e)?e.map(Pr):e.constructor!==void 0?null:H({},e)}function Al(e,n,i,r,t,a,o,c,u){var d,f,s,p,h,v,g,b=i.props||rn,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"),a!=null){for(d=0;d<a.length;d++)if((h=a[d])&&"setAttribute"in h==!!m&&(m?h.localName==m:h.nodeType==3)){e=h,a[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,a),c=!1),a=null}if(m==null)b===w||c&&e.data==w||(e.data=w);else{if(a=m=="textarea"&&w.defaultValue!=null?null:a&&Tn.call(e.childNodes),!c&&a!=null)for(b={},d=0;d<e.attributes.length;d++)b[(h=e.attributes[d]).name]=h.value;for(d in b)h=b[d],d=="dangerouslySetInnerHTML"?s=h:d=="children"||d in w||d=="value"&&"defaultValue"in w||d=="checked"&&"defaultChecked"in w||We(e,d,null,h,t);for(d in w)h=w[d],d=="children"?p=h:d=="dangerouslySetInnerHTML"?f=h:d=="value"?v=h:d=="checked"?g=h:c&&typeof h!="function"||b[d]===h||We(e,d,h,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=""),Lr(n.type=="template"?e.content:e,En(p)?p:[p],n,i,r,m=="foreignObject"?"http://www.w3.org/1999/xhtml":t,a,o,a?a[0]:i.__k&&ye(i,0),c,u),a!=null)for(d=a.length;d--;)mi(a[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])&&We(e,d,v,b[d],t),d="checked",g!=null&&g!=e[d]&&We(e,d,g,b[d],t))}return e}function yi(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 Mr(e,n,i){var r,t;if(k.unmount&&k.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||yi(r,null,n)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){k.__e(a,n)}r.base=r.__P=null}if(r=e.__k)for(t=0;t<r.length;t++)r[t]&&Mr(r[t],n,i||typeof e.type!="function");i||mi(e.__e),e.__c=e.__=e.__e=void 0}function Sl(e,n,i){return this.constructor(e,i)}function Tl(e,n,i){var r,t,a,o;n==document&&(n=document.documentElement),k.__&&k.__(e,n),t=(r=!1)?null:n.__k,a=[],o=[],gi(n,e=n.__k=wl(j,null,[e]),t||rn,rn,n.namespaceURI,t?null:n.firstChild?Tn.call(n.childNodes):null,a,t?t.__e:n.firstChild,r,o),Rr(a,e,o)}Tn=tn.slice,k={__e:function(e,n,i,r){for(var t,a,o;n=n.__;)if((t=n.__c)&&!t.__)try{if((a=t.constructor)&&a.getDerivedStateFromError!=null&&(t.setState(a.getDerivedStateFromError(e)),o=t.__d),t.componentDidCatch!=null&&(t.componentDidCatch(e,r||{}),o=t.__d),o)return t.__E=t}catch(c){e=c}throw e}},Sr=0,Tr=function(e){return e!=null&&e.constructor===void 0},Te.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),Di(this))},Te.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Di(this))},Te.prototype.render=j,q=[],Er=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Or=function(e,n){return e.__v.__b-n.__v.__b},ln.__r=0,$n=Math.random().toString(8),Ve="__d"+$n,Se="__a"+$n,Ir=/(PointerCapture)$|Capture$/i,_i=0,Gn=zi(!1),Vn=zi(!0);var El=0;function l(e,n,i,r,t,a){n||(n={});var o,c,u=n;if("ref"in u)for(c in u={},n)c=="ref"?o=n[c]:u[c]=n[c];var d={type:e,props:u,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--El,__i:-1,__u:0,__source:t,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(c in o)u[c]===void 0&&(u[c]=o[c]);return k.vnode&&k.vnode(d),d}var Pe,A,Dn,ji,Qn=0,$r=[],T=k,Ui=T.__b,Hi=T.__r,Wi=T.diffed,Yi=T.__c,Ki=T.unmount,qi=T.__;function bi(e,n){T.__h&&T.__h(A,e,Qn||n),Qn=0;var i=A.__H||(A.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({}),i.__[e]}function Dr(e){return Qn=1,Ol(jr,e)}function Ol(e,n,i){var r=bi(Pe++,2);if(r.t=e,!r.__c&&(r.__=[jr(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=A,!A.__f)){var t=function(c,u,d){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(p){return p.__c});if(f.every(function(p){return!p.__N}))return!a||a.call(this,c,u,d);var s=r.__c.props!==c;return f.some(function(p){if(p.__N){var h=p.__[0];p.__=p.__N,p.__N=void 0,h!==p.__[0]&&(s=!0)}}),a&&a.call(this,c,u,d)||s};A.__f=!0;var a=A.shouldComponentUpdate,o=A.componentWillUpdate;A.componentWillUpdate=function(c,u,d){if(this.__e){var f=a;a=void 0,t(c,u,d),a=f}o&&o.call(this,c,u,d)},A.shouldComponentUpdate=t}return r.__N||r.__}function On(e,n){var i=bi(Pe++,3);!T.__s&&zr(i.__H,n)&&(i.__=e,i.u=n,A.__H.__h.push(i))}function Br(e,n){var i=bi(Pe++,7);return zr(i.__H,n)&&(i.__=e(),i.__H=n,i.__h=e),i.__}function Il(){for(var e;e=$r.shift();){var n=e.__H;if(e.__P&&n)try{n.__h.some(Qe),n.__h.some(Zn),n.__h=[]}catch(i){n.__h=[],T.__e(i,e.__v)}}}T.__b=function(e){A=null,Ui&&Ui(e)},T.__=function(e,n){e&&n.__k&&n.__k.__m&&(e.__m=n.__k.__m),qi&&qi(e,n)},T.__r=function(e){Hi&&Hi(e),Pe=0;var n=(A=e.__c).__H;n&&(Dn===A?(n.__h=[],A.__h=[],n.__.some(function(i){i.__N&&(i.__=i.__N),i.u=i.__N=void 0})):(n.__h.some(Qe),n.__h.some(Zn),n.__h=[],Pe=0)),Dn=A},T.diffed=function(e){Wi&&Wi(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&($r.push(n)!==1&&ji===T.requestAnimationFrame||((ji=T.requestAnimationFrame)||Nl)(Il)),n.__H.__.some(function(i){i.u&&(i.__H=i.u),i.u=void 0})),Dn=A=null},T.__c=function(e,n){n.some(function(i){try{i.__h.some(Qe),i.__h=i.__h.filter(function(r){return!r.__||Zn(r)})}catch(r){n.some(function(t){t.__h&&(t.__h=[])}),n=[],T.__e(r,i.__v)}}),Yi&&Yi(e,n)},T.unmount=function(e){Ki&&Ki(e);var n,i=e.__c;i&&i.__H&&(i.__H.__.some(function(r){try{Qe(r)}catch(t){n=t}}),i.__H=void 0,n&&T.__e(n,i.__v))};var Gi=typeof requestAnimationFrame=="function";function Nl(e){var n,i=function(){clearTimeout(r),Gi&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(i,35);Gi&&(n=requestAnimationFrame(i))}function Qe(e){var n=A,i=e.__c;typeof i=="function"&&(e.__c=void 0,i()),A=n}function Zn(e){var n=A;e.__c=e.__(),A=n}function zr(e,n){return!e||e.length!==n.length||n.some(function(i,r){return i!==e[r]})}function jr(e,n){return typeof n=="function"?n(e):n}var Ll=Symbol.for("preact-signals");function In(){if(W>1)W--;else{var e,n=!1;for(function(){var t=on;for(on=void 0;t!==void 0;)t.S.v===t.v&&(t.S.i=t.i),t=t.o}();Ee!==void 0;){var i=Ee;for(Ee=void 0,an++;i!==void 0;){var r=i.u;if(i.u=void 0,i.f&=-3,!(8&i.f)&&Hr(i))try{i.c()}catch(t){n||(e=t,n=!0)}i=r}}if(an=0,W--,n)throw e}}function Fl(e){if(W>0)return e();Xn=++Rl,W++;try{return e()}finally{In()}}var C=void 0;function wi(e){var n=C;C=void 0;try{return e()}finally{C=n}}var Ee=void 0,W=0,an=0,Rl=0,Xn=0,on=void 0,cn=0;function Ur(e){if(C!==void 0){var n=e.n;if(n===void 0||n.t!==C)return n={i:0,S:e,p:C.s,n:void 0,t:C,e:void 0,x:void 0,r:n},C.s!==void 0&&(C.s.n=n),C.s=n,e.n=n,32&C.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=C.s,n.n=void 0,C.s.n=n,C.s=n),n}}function L(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}L.prototype.brand=Ll;L.prototype.h=function(){return!0};L.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:wi(function(){var r;(r=n.W)==null||r.call(n)}))};L.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&&wi(function(){var t;(t=n.Z)==null||t.call(n)}))}};L.prototype.subscribe=function(e){var n=this;return Ue(function(){var i=n.value,r=C;C=void 0;try{e(i)}finally{C=r}},{name:"sub"})};L.prototype.valueOf=function(){return this.value};L.prototype.toString=function(){return this.value+""};L.prototype.toJSON=function(){return this.value};L.prototype.peek=function(){var e=this;return wi(function(){return e.value})};Object.defineProperty(L.prototype,"value",{get:function(){var e=Ur(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(an>100)throw new Error("Cycle detected");(function(i){W!==0&&an===0&&i.l!==Xn&&(i.l=Xn,on={S:i,v:i.v,i:i.i,o:on})})(this),this.v=e,this.i++,cn++,W++;try{for(var n=this.t;n!==void 0;n=n.x)n.t.N()}finally{In()}}}});function _(e,n){return new L(e,n)}function Hr(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 Wr(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 Yr(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 oe(e,n){L.call(this,void 0),this.x=e,this.s=void 0,this.g=cn-1,this.f=4,this.W=n?.watched,this.Z=n?.unwatched,this.name=n?.name}oe.prototype=new L;oe.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===cn))return!0;if(this.g=cn,this.f|=1,this.i>0&&!Hr(this))return this.f&=-2,!0;var e=C;try{Wr(this),C=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 C=e,Yr(this),this.f&=-2,!0};oe.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)}L.prototype.S.call(this,e)};oe.prototype.U=function(e){if(this.t!==void 0&&(L.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)}};oe.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(oe.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Ur(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Vi(e,n){return new oe(e,n)}function Kr(e){var n=e.m;if(e.m=void 0,typeof n=="function"){W++;var i=C;C=void 0;try{n()}catch(r){throw e.f&=-2,e.f|=8,ki(e),r}finally{C=i,In()}}}function ki(e){for(var n=e.s;n!==void 0;n=n.n)n.S.U(n);e.x=void 0,e.s=void 0,Kr(e)}function Pl(e){if(C!==this)throw new Error("Out-of-order effect");Yr(this),C=e,this.f&=-2,8&this.f&&ki(this),In()}function we(e,n){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=n?.name}we.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()}};we.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Kr(this),Wr(this),W++;var e=C;return C=this,Pl.bind(this,e)};we.prototype.N=function(){2&this.f||(this.f|=2,this.u=Ee,Ee=this)};we.prototype.d=function(){this.f|=8,1&this.f||ki(this)};we.prototype.dispose=function(){this.d()};function Ue(e,n){var i=new we(e,n);try{i.c()}catch(t){throw i.d(),t}var r=i.d.bind(i);return r[Symbol.dispose]=r,r}var qr,Ye,Ml=typeof window<"u"&&!!window.__PREACT_SIGNALS_DEVTOOLS__,Gr=[];Ue(function(){qr=this.N})();function ke(e,n){k[e]=n.bind(null,k[e]||function(){})}function sn(e){if(Ye){var n=Ye;Ye=void 0,n()}Ye=e&&e.S()}function Vr(e){var n=this,i=e.data,r=Dl(i);r.value=i;var t=Br(function(){for(var c=n,u=n.__v;u=u.__;)if(u.__c){u.__c.__$f|=4;break}var d=Vi(function(){var h=r.value.value;return h===0?0:h===!0?"":h||""}),f=Vi(function(){return!Array.isArray(d.value)&&!Tr(d.value)}),s=Ue(function(){if(this.N=Jr,f.value){var h=d.value;c.__v&&c.__v.__e&&c.__v.__e.nodeType===3&&(c.__v.__e.data=h)}}),p=n.__$u.d;return n.__$u.d=function(){s(),p.call(this)},[f,d]},[]),a=t[0],o=t[1];return a.value?o.peek():o.value}Vr.displayName="ReactiveTextNode";Object.defineProperties(L.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Vr},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}});ke("__b",function(e,n){if(typeof n.type=="string"){var i,r=n.props;for(var t in r)if(t!=="children"){var a=r[t];a instanceof L&&(i||(n.__np=i={}),i[t]=a,r[t]=a.peek())}}e(n)});ke("__r",function(e,n){if(e(n),n.type!==j){sn();var i,r=n.__c;r&&(r.__$f&=-2,(i=r.__$u)===void 0&&(r.__$u=i=function(t,a){var o;return Ue(function(){o=this},{name:a}),o.c=t,o}(function(){var t;Ml&&((t=i.y)==null||t.call(i)),r.__$f|=1,r.setState({})},typeof n.type=="function"?n.type.displayName||n.type.name:""))),sn(i)}});ke("__e",function(e,n,i,r){sn(),e(n,i,r)});ke("diffed",function(e,n){sn();var i;if(typeof n.type=="string"&&(i=n.__e)){var r=n.__np,t=n.props;if(r){var a=i.U;if(a)for(var o in a){var c=a[o];c!==void 0&&!(o in r)&&(c.d(),a[o]=void 0)}else a={},i.U=a;for(var u in r){var d=a[u],f=r[u];d===void 0?(d=$l(i,u,f),a[u]=d):d.o(f,t)}for(var s in r)t[s]=r[s]}}e(n)});function $l(e,n,i,r){var t=n in e&&e.ownerSVGElement===void 0,a=_(i),o=i.peek();return{o:function(c,u){a.value=c,o=c.peek()},d:Ue(function(){this.N=Jr;var c=a.value.value;o!==c?(o=void 0,t?e[n]=c:c!=null&&(c!==!1||n[4]==="-")?e.setAttribute(n,c):e.removeAttribute(n)):o=void 0})}}ke("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 a=r[t];a&&a.d()}}}n.__np=void 0}else{var o=n.__c;if(o){var c=o.__$u;c&&(o.__$u=void 0,c.d())}}e(n)});ke("__h",function(e,n,i,r){(r<3||r===9)&&(n.__$f|=2),e(n,i,r)});Te.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 a=2&this.__$f;if(!(r||a||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var c in this.props)if(!(c in e))return!0;return!1};function Dl(e,n){return Br(function(){return _(e,n)},[])}var Bl=function(e){queueMicrotask(function(){queueMicrotask(e)})};function zl(){Fl(function(){for(var e;e=Gr.shift();)qr.call(e)})}function Jr(){Gr.push(this)===1&&(k.requestAnimationFrame||Bl)(zl)}function Qr(){const e=window.location.hash;return e===""||e==="#"?"/":e.startsWith("#")?e.slice(1):e}const he=_(Qr());function ei(e){const n=e.startsWith("/")?e:`/${e}`;`#${n}`!==window.location.hash&&(window.location.hash=n)}let Ji=!1;function jl(){Ji||(Ji=!0,window.addEventListener("hashchange",()=>{he.value=Qr()}))}let Me=null;function Ul(e){Me=e}class $ extends Error{status;body;constructor(n,i,r){super(r),this.status=n,this.body=i}}async function x(e,n={}){const i={Accept:"application/json",...n.headers??{}};Me!==null&&(i.Authorization=`Bearer ${Me}`);const{body:r,...t}=n,a={...t,headers:i};r!==void 0&&(a.body=JSON.stringify(r),i["Content-Type"]="application/json");const o=await fetch(e,a),c=await o.text(),u=c===""?{}:JSON.parse(c);if(!o.ok){const d=u.error?.message??`request failed (${o.status})`;throw new $(o.status,u,d)}return u}async function Hl(e,n,i,r={}){const t={Accept:"text/event-stream","Content-Type":"application/json",...r.headers??{}};Me!==null&&(t.Authorization=`Bearer ${Me}`);const a=await fetch(e,{...r,method:"POST",headers:t,body:JSON.stringify(n)});if(!a.ok||a.body===null){const f=await a.text().catch(()=>"");let s={};try{s=f===""?{}:JSON.parse(f)}catch{}throw new $(a.status,s,s.error?.message??`stream failed (${a.status})`)}const o=a.body.getReader(),c=new TextDecoder;let u="";const d=f=>{for(const s of f.split(`
|
|
2
|
-
`)){if(!s.startsWith("data:"))continue;const p=s.slice(5).trim();if(p!=="")try{i(JSON.parse(p))}catch{}}};for(;;){const{done:f,value:s}=await o.read();if(f)break;u+=c.decode(s,{stream:!0});let p=u.indexOf(`
|
|
3
|
-
|
|
4
|
-
`);for(;p!==-1;)d(u.slice(0,p)),u=u.slice(p+2),p=u.indexOf(`
|
|
5
|
-
|
|
6
|
-
`)}u.trim()!==""&&d(u)}const ae=_(null);async function Wl(){try{const e=await x("/api/v1/ping");ae.value={...e,projectScopeAvailable:e.projectScopeAvailable===!0}}catch{ae.value=null}}function Y(e){switch(e.code){case"VALIDATION":return"Some fields need attention before saving.";case"CONFLICT":return"This file changed on disk while you were editing. Review the latest version and re-save.";case"PRECONDITION_REQUIRED":return"Reload the page once — the optimistic-lock token is missing.";case"NOT_FOUND":return"The file does not exist yet. Use the wizard to create it.";case"ATOMIC_WRITE":return"Write failed mid-flight. The file was not partially modified.";case"YAML_PARSE":return"YAML parse error — fix the file by hand, then reload.";default:return e.message}}function Yl(e){return/expected (boolean|string|number)/i.test(e)?e.replace(/^expected/i,"Expected"):e}function Zr(e){const n={};for(const i of e.fields??[])n[i.path]=Yl(i.message);return n}function Kl({id:e,children:n}){return l("p",{class:"ac-field__description",id:e,children:n})}function ql({id:e,children:n}){return l("p",{class:"ac-field__error",id:e,role:"alert","aria-live":"polite",children:n})}function ce({id:e,label:n,description:i,error:r,children:t}){const a=i!==void 0?`${e}-desc`:void 0,o=r!==void 0?`${e}-err`:void 0;return l("div",{class:"ac-field","data-invalid":r!==void 0?"true":void 0,children:[l("label",{class:"ac-field__label",for:e,children:n}),i!==void 0?l(Kl,{id:a,children:i}):null,l("div",{class:"ac-field__control","aria-describedby":a,"aria-errormessage":o,children:t}),r!==void 0?l(ql,{id:o,children:r}):null]})}function Xr(e){return l(ce,{id:e.id,label:e.label,description:e.description,error:e.error,children:l("input",{class:"ac-input",type:"text",id:e.id,name:e.name,value:e.value,placeholder:e.placeholder,"aria-invalid":e.error!==void 0?"true":void 0,onInput:n=>e.onChange(n.currentTarget.value)})})}function Gl(e){const n=e.step??(e.integer===!0?1:"any");return l(ce,{id:e.id,label:e.label,description:e.description,error:e.error,children:l("input",{class:"ac-input",type:"number",id:e.id,name:e.name,value:Number.isFinite(e.value)?String(e.value):"0",min:e.min,max:e.max,step:n,"aria-invalid":e.error!==void 0?"true":void 0,onInput:i=>{const r=i.currentTarget.value,t=r===""?0:Number(r);e.onChange(Number.isFinite(t)?t:0)}})})}function Vl(e){return l(ce,{id:e.id,label:e.label,description:e.description,error:e.error,children:l("label",{class:"ac-toggle",children:[l("input",{type:"checkbox",id:e.id,name:e.name,checked:e.value,"aria-invalid":e.error!==void 0?"true":void 0,onChange:n=>e.onChange(n.currentTarget.checked)}),l("span",{class:"ac-toggle__track","aria-hidden":"true"}),l("span",{class:"ac-toggle__state",children:e.value?"On":"Off"})]})})}function et(e){const n=e.options.length>3;return l(ce,{id:e.id,label:e.label,description:e.description,error:e.error,children:n?l("select",{class:"ac-input",id:e.id,name:e.name,value:e.value,"aria-invalid":e.error!==void 0?"true":void 0,onChange:i=>e.onChange(i.currentTarget.value),children:e.options.map(i=>l("option",{value:i.value,children:i.label??(i.value===""?"(none)":i.value)},i.value))}):l("div",{class:"ac-radio-group",role:"radiogroup","aria-labelledby":`${e.id}-label`,children:e.options.map(i=>{const r=`${e.id}-${i.value||"none"}`;return l("label",{class:"ac-radio",for:r,children:[l("input",{type:"radio",id:r,name:e.name,value:i.value,checked:i.value===e.value,onChange:()=>e.onChange(i.value)}),l("span",{children:i.label??(i.value===""?"(none)":i.value)})]},i.value)})})})}function un(e){return l(ce,{id:e.id,label:e.label,description:e.description,error:e.error,children:l("textarea",{class:"ac-textarea",id:e.id,name:e.name,rows:e.rows??6,placeholder:e.placeholder,"aria-invalid":e.error!==void 0?"true":void 0,onInput:n=>e.onChange(n.currentTarget.value),children:e.value})})}function nt(e){return e.replace(/_/g," ").replace(/\./g," › ").replace(/\b\w/g,n=>n.toUpperCase())}function Jl(e){return e.enum!==void 0&&e.enum.length>0?"enum":e.type==="integer"?"integer":e.type==="number"?"number":e.type==="boolean"?"boolean":e.type==="string"?"string":e.type==="array"&&e.items?.type==="string"?"array-of-strings":"unsupported"}function Bn(e,n){const i=Jl(n);return{path:e,kind:i,label:nt(e[e.length-1]??""),description:n.description,options:n.enum,min:n.minimum,max:n.maximum}}function Ql(e){const n=[],i=e.properties??{};for(const[r,t]of Object.entries(i))if(t.type==="object"&&t.properties!==void 0){const a=[];for(const[o,c]of Object.entries(t.properties))if(c.type==="object"&&c.properties!==void 0)for(const[u,d]of Object.entries(c.properties))a.push(Bn([r,o,u],d));else a.push(Bn([r,o],c));n.push({path:[r],label:nt(r),description:t.description,fields:a})}else{const a=n.find(c=>c.path[0]==="__general"),o=Bn([r],t);a===void 0?n.unshift({path:["__general"],label:"General",fields:[o]}):a.fields.push(o)}return n}function Zl(e,n){let i=e;for(const r of n){if(i===null||typeof i!="object"||Array.isArray(i))return;i=i[r]}return i}function it(e,n,i){if(n.length===0)return e;const[r,...t]=n;if(r===void 0)return e;const a={...e};if(t.length===0)return a[r]=i,a;const o=a[r],c=o!==null&&typeof o=="object"&&!Array.isArray(o)?o:{};return a[r]=it(c,t,i),a}function Oe(e){return e.join(".")}function Xl(e,n,i,r){const t=Oe(e.path),a=t,o=Zl(n,e.path),c=i[t],u=d=>{r(it(n,e.path,d))};switch(e.kind){case"string":{const d=typeof o=="string"?o:"";return d.length>80?l(un,{id:t,name:a,label:e.label,description:e.description,error:c,value:d,onChange:u}):l(Xr,{id:t,name:a,label:e.label,description:e.description,error:c,value:d,onChange:u})}case"enum":{const d=typeof o=="string"||typeof o=="number"?String(o):"",f=(e.options??[]).map(s=>({value:String(s)}));return l(et,{id:t,name:a,label:e.label,description:e.description,error:c,value:d,options:f,onChange:u})}case"number":case"integer":{const d=typeof o=="number"?o:0;return l(Gl,{id:t,name:a,label:e.label,description:e.description,error:c,value:d,integer:e.kind==="integer",min:e.min,max:e.max,onChange:u})}case"boolean":{const d=typeof o=="boolean"?o:!1;return l(Vl,{id:t,name:a,label:e.label,description:e.description,error:c,value:d,onChange:u})}case"array-of-strings":{const f=(Array.isArray(o)?o.filter(s=>typeof s=="string"):[]).join(`
|
|
7
|
-
`);return l(un,{id:t,name:a,label:e.label,description:`${e.description??""} (one entry per line)`.trim(),error:c,value:f,onChange:s=>{const p=s.split(`
|
|
8
|
-
`).map(h=>h.trim()).filter(h=>h!=="");u(p)}})}default:return null}}function ea({section:e,values:n,errors:i,onChange:r}){return l("section",{class:"ac-section","aria-labelledby":`section-${Oe(e.path)}`,children:[l("h2",{class:"ac-section__title",id:`section-${Oe(e.path)}`,children:e.label}),e.description!==void 0?l("p",{class:"ac-section__description",children:e.description}):null,l("div",{class:"ac-section__fields",children:e.fields.map(t=>l("div",{children:Xl(t,n,i,r)},Oe(t.path)))})]})}function na(e){const n=Ql(e.schema),i=e.errors??{};return l("form",{class:"ac-form",onSubmit:r=>r.preventDefault(),children:[n.map(r=>l(ea,{section:r,values:e.values,errors:i,onChange:e.onChange},Oe(r.path))),e.actions!==void 0?l("div",{class:"ac-form__actions",children:e.actions}):null]})}function ia(e){const[n]=Dr(()=>`${e.id}-list`);return l(ce,{id:e.id,label:e.label,description:e.description,error:e.error,children:[l("input",{class:"ac-input",type:"text",id:e.id,name:e.name,value:e.value,placeholder:e.placeholder,list:n,"aria-invalid":e.error!==void 0?"true":void 0,onInput:i=>e.onChange(i.currentTarget.value)}),l("datalist",{id:n,children:e.suggestions.map(i=>l("option",{value:i},i))})]})}const ra=["developer","reviewer","designer","product-manager","ops","qa","maintainer"],ta=["de","en","en-US","en-GB","fr","es","it","nl","pt","pt-BR"];function Qi(){return new Date().toISOString().slice(0,10)}function ue(e,n){return e?.[n]}function la({value:e,onChange:n,errors:i,hideRole:r,hideIdentityBasics:t}){const[a,o]=Dr(""),c="umd-role-suggestions";function u(v){n({...e,...v,last_updated:Qi()})}const d=e.role.filter(v=>v.trim()!=="");function f(v){const g=v.trim();if(g===""||d.includes(g)){o("");return}u({role:[...d,g]}),o("")}function s(v){d.length<=1||u({role:d.filter(g=>g!==v)})}function p(v){const g={...e,last_updated:Qi()};v===""?delete g.notes:g.notes=v,n(g)}const h=ra.filter(v=>!d.includes(v));return l("div",{class:"ac-user-md-form",children:[t?null:l(Xr,{id:"umd-name",name:"identity.name",label:"Name",description:'How the agent addresses you in chat (e.g. "Matze", "Sarah"). Required.',value:e.identity.name,error:ue(i,"identity.name"),onChange:v=>u({identity:{...e.identity,name:v}})}),t?null:l(ia,{id:"umd-language",name:"language",label:"Language",description:"BCP-47 tag the agent mirrors in replies (e.g. 'de', 'en', 'en-US').",value:e.language,suggestions:ta,error:ue(i,"language"),onChange:v=>u({language:v})}),r?null:l(ce,{id:"umd-role-input",label:"Roles",description:"One or more roles. Seeded suggestions are non-binding — type anything and press Enter.",error:ue(i,"role"),children:[l("ul",{class:"ac-chip-list","data-testid":"umd-role-list",children:d.map(v=>l("li",{class:"ac-chip",children:[l("span",{children:v}),l("button",{type:"button",class:"ac-chip__remove","aria-label":`Remove ${v}`,disabled:d.length<=1,onClick:()=>s(v),children:"×"})]},v))}),l("div",{class:"ac-role-add",children:[l("input",{class:"ac-input",type:"text",id:"umd-role-input",name:"role-add",list:c,placeholder:"Add a role and press Enter",value:a,onInput:v=>o(v.currentTarget.value),onKeyDown:v=>{(v.key==="Enter"||v.key===",")&&(v.preventDefault(),f(a))}}),l("datalist",{id:c,children:h.map(v=>l("option",{value:v},v))}),l("button",{type:"button",class:"ac-button",onClick:()=>f(a),children:"Add role"})]})]}),l(et,{id:"umd-pace",name:"style.pace",label:"Pace",value:e.style.pace,error:ue(i,"style.pace"),options:[{value:"pragmatic",label:"Pragmatic"},{value:"thorough",label:"Thorough"},{value:"rapid",label:"Rapid"}],onChange:v=>u({style:{...e.style,pace:v}})}),l(un,{id:"umd-voice",name:"voice_sample",label:"Voice sample",description:"One to three sentences in your own style. The agent uses it as a tone anchor.",rows:4,value:e.voice_sample,error:ue(i,"voice_sample"),onChange:v=>u({voice_sample:v})}),l(un,{id:"umd-notes",name:"notes",label:"Notes",description:"Optional free-form prose the agent remembers across sessions.",rows:6,value:e.notes??"",error:ue(i,"notes"),onChange:p})]})}function rt(){return{version:1,identity:{name:""},language:"en",role:[""],style:{pace:"pragmatic"},voice_sample:"",last_updated:"1970-01-01"}}function Zi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ke(e,n){return typeof e=="string"?e:n}function aa(e){return e==="thorough"||e==="rapid"?e:"pragmatic"}function oa(e){if(!Array.isArray(e))return[""];const n=e.filter(i=>typeof i=="string");return n.length===0?[""]:n}function ca(e){if(typeof e=="string")return e===""?void 0:e}function Xi(e){const n=rt(),i=Zi(e.identity)?e.identity:{},r=Zi(e.style)?e.style:{},t=ca(e.notes),a={version:1,identity:{name:Ke(i.name,n.identity.name)},language:Ke(e.language,n.language),role:oa(e.role),style:{pace:aa(r.pace)},voice_sample:Ke(e.voice_sample,n.voice_sample),last_updated:Ke(e.last_updated,n.last_updated)};return t!==void 0&&(a.notes=t),a}/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function tt(e){return typeof e>"u"||e===null}function sa(e){return typeof e=="object"&&e!==null}function ua(e){return Array.isArray(e)?e:tt(e)?[]:[e]}function da(e,n){var i,r,t,a;if(n)for(a=Object.keys(n),i=0,r=a.length;i<r;i+=1)t=a[i],e[t]=n[t];return e}function fa(e,n){var i="",r;for(r=0;r<n;r+=1)i+=e;return i}function ha(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var pa=tt,va=sa,_a=ua,ma=fa,ga=ha,ya=da,I={isNothing:pa,isObject:va,toArray:_a,repeat:ma,isNegativeZero:ga,extend:ya};function lt(e,n){var i="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(i+=`
|
|
9
|
-
|
|
10
|
-
`+e.mark.snippet),r+" "+i):r}function $e(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=lt(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}$e.prototype=Object.create(Error.prototype);$e.prototype.constructor=$e;$e.prototype.toString=function(n){return this.name+": "+lt(this,n)};var R=$e;function zn(e,n,i,r,t){var a="",o="",c=Math.floor(t/2)-1;return r-n>c&&(a=" ... ",n=r-c+a.length),i-r>c&&(o=" ...",i=r+c-o.length),{str:a+e.slice(n,i).replace(/\t/g,"→")+o,pos:r-n+a.length}}function jn(e,n){return I.repeat(" ",n-e.length)+e}function ba(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i=/\r?\n|\r|\0/g,r=[0],t=[],a,o=-1;a=i.exec(e.buffer);)t.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var c="",u,d,f=Math.min(e.line+n.linesAfter,t.length).toString().length,s=n.maxLength-(n.indent+f+3);for(u=1;u<=n.linesBefore&&!(o-u<0);u++)d=zn(e.buffer,r[o-u],t[o-u],e.position-(r[o]-r[o-u]),s),c=I.repeat(" ",n.indent)+jn((e.line-u+1).toString(),f)+" | "+d.str+`
|
|
11
|
-
`+c;for(d=zn(e.buffer,r[o],t[o],e.position,s),c+=I.repeat(" ",n.indent)+jn((e.line+1).toString(),f)+" | "+d.str+`
|
|
12
|
-
`,c+=I.repeat("-",n.indent+f+3+d.pos)+`^
|
|
13
|
-
`,u=1;u<=n.linesAfter&&!(o+u>=t.length);u++)d=zn(e.buffer,r[o+u],t[o+u],e.position-(r[o]-r[o+u]),s),c+=I.repeat(" ",n.indent)+jn((e.line+u+1).toString(),f)+" | "+d.str+`
|
|
14
|
-
`;return c.replace(/\n$/,"")}var wa=ba,ka=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],xa=["scalar","sequence","mapping"];function Ca(e){var n={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(r){n[String(r)]=i})}),n}function Aa(e,n){if(n=n||{},Object.keys(n).forEach(function(i){if(ka.indexOf(i)===-1)throw new R('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=Ca(n.styleAliases||null),xa.indexOf(this.kind)===-1)throw new R('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var N=Aa;function er(e,n){var i=[];return e[n].forEach(function(r){var t=i.length;i.forEach(function(a,o){a.tag===r.tag&&a.kind===r.kind&&a.multi===r.multi&&(t=o)}),i[t]=r}),i}function Sa(){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 ni(e){return this.extend(e)}ni.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 R("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(a){if(!(a instanceof N))throw new R("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new R("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new R("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(a){if(!(a instanceof N))throw new R("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var t=Object.create(ni.prototype);return t.implicit=(this.implicit||[]).concat(i),t.explicit=(this.explicit||[]).concat(r),t.compiledImplicit=er(t,"implicit"),t.compiledExplicit=er(t,"explicit"),t.compiledTypeMap=Sa(t.compiledImplicit,t.compiledExplicit),t};var at=ni,ot=new N("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),ct=new N("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),st=new N("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),ut=new at({explicit:[ot,ct,st]});function Ta(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function Ea(){return null}function Oa(e){return e===null}var dt=new N("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ta,construct:Ea,predicate:Oa,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Ia(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 Na(e){return e==="true"||e==="True"||e==="TRUE"}function La(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var ft=new N("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ia,construct:Na,predicate:La,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 Fa(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Ra(e){return 48<=e&&e<=55}function Pa(e){return 48<=e&&e<=57}function Ma(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(!Fa(e.charCodeAt(i)))return!1;r=!0}return r&&t!=="_"}if(t==="o"){for(i++;i<n;i++)if(t=e[i],t!=="_"){if(!Ra(e.charCodeAt(i)))return!1;r=!0}return r&&t!=="_"}}if(t==="_")return!1;for(;i<n;i++)if(t=e[i],t!=="_"){if(!Pa(e.charCodeAt(i)))return!1;r=!0}return!(!r||t==="_")}function $a(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 Da(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!I.isNegativeZero(e)}var ht=new N("tag:yaml.org,2002:int",{kind:"scalar",resolve:Ma,construct:$a,predicate:Da,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"]}}),Ba=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function za(e){return!(e===null||!Ba.test(e)||e[e.length-1]==="_")}function ja(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 Ua=/^[-+]?[0-9]+e/;function Ha(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(I.isNegativeZero(e))return"-0.0";return i=e.toString(10),Ua.test(i)?i.replace("e",".e"):i}function Wa(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||I.isNegativeZero(e))}var pt=new N("tag:yaml.org,2002:float",{kind:"scalar",resolve:za,construct:ja,predicate:Wa,represent:Ha,defaultStyle:"lowercase"}),vt=ut.extend({implicit:[dt,ft,ht,pt]}),_t=vt,mt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),gt=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 Ya(e){return e===null?!1:mt.exec(e)!==null||gt.exec(e)!==null}function Ka(e){var n,i,r,t,a,o,c,u=0,d=null,f,s,p;if(n=mt.exec(e),n===null&&(n=gt.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(a=+n[4],o=+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)),p=new Date(Date.UTC(i,r,t,a,o,c,u)),d&&p.setTime(p.getTime()-d),p}function qa(e){return e.toISOString()}var yt=new N("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ya,construct:Ka,instanceOf:Date,represent:qa});function Ga(e){return e==="<<"||e===null}var bt=new N("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ga}),xi=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
15
|
-
\r`;function Va(e){if(e===null)return!1;var n,i,r=0,t=e.length,a=xi;for(i=0;i<t;i++)if(n=a.indexOf(e.charAt(i)),!(n>64)){if(n<0)return!1;r+=6}return r%8===0}function Ja(e){var n,i,r=e.replace(/[\r\n=]/g,""),t=r.length,a=xi,o=0,c=[];for(n=0;n<t;n++)n%4===0&&n&&(c.push(o>>16&255),c.push(o>>8&255),c.push(o&255)),o=o<<6|a.indexOf(r.charAt(n));return i=t%4*6,i===0?(c.push(o>>16&255),c.push(o>>8&255),c.push(o&255)):i===18?(c.push(o>>10&255),c.push(o>>2&255)):i===12&&c.push(o>>4&255),new Uint8Array(c)}function Qa(e){var n="",i=0,r,t,a=e.length,o=xi;for(r=0;r<a;r++)r%3===0&&r&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]),i=(i<<8)+e[r];return t=a%3,t===0?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]):t===2?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):t===1&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}function Za(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var wt=new N("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Va,construct:Ja,predicate:Za,represent:Qa}),Xa=Object.prototype.hasOwnProperty,eo=Object.prototype.toString;function no(e){if(e===null)return!0;var n=[],i,r,t,a,o,c=e;for(i=0,r=c.length;i<r;i+=1){if(t=c[i],o=!1,eo.call(t)!=="[object Object]")return!1;for(a in t)if(Xa.call(t,a))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(a)===-1)n.push(a);else return!1}return!0}function io(e){return e!==null?e:[]}var kt=new N("tag:yaml.org,2002:omap",{kind:"sequence",resolve:no,construct:io}),ro=Object.prototype.toString;function to(e){if(e===null)return!0;var n,i,r,t,a,o=e;for(a=new Array(o.length),n=0,i=o.length;n<i;n+=1){if(r=o[n],ro.call(r)!=="[object Object]"||(t=Object.keys(r),t.length!==1))return!1;a[n]=[t[0],r[t[0]]]}return!0}function lo(e){if(e===null)return[];var n,i,r,t,a,o=e;for(a=new Array(o.length),n=0,i=o.length;n<i;n+=1)r=o[n],t=Object.keys(r),a[n]=[t[0],r[t[0]]];return a}var xt=new N("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:to,construct:lo}),ao=Object.prototype.hasOwnProperty;function oo(e){if(e===null)return!0;var n,i=e;for(n in i)if(ao.call(i,n)&&i[n]!==null)return!1;return!0}function co(e){return e!==null?e:{}}var Ct=new N("tag:yaml.org,2002:set",{kind:"mapping",resolve:oo,construct:co}),Ci=_t.extend({implicit:[yt,bt],explicit:[wt,kt,xt,Ct]}),Q=Object.prototype.hasOwnProperty,dn=1,At=2,St=3,fn=4,Un=1,so=2,nr=3,uo=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,fo=/[\x85\u2028\u2029]/,ho=/[,\[\]\{\}]/,Tt=/^(?:!|!!|![a-z\-]+!)$/i,Et=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ir(e){return Object.prototype.toString.call(e)}function z(e){return e===10||e===13}function ie(e){return e===9||e===32}function P(e){return e===9||e===32||e===10||e===13}function pe(e){return e===44||e===91||e===93||e===123||e===125}function po(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function vo(e){return e===120?2:e===117?4:e===85?8:0}function _o(e){return 48<=e&&e<=57?e-48:-1}function rr(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 mo(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Ot(e,n,i){n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[n]=i}var It=new Array(256),Nt=new Array(256);for(var de=0;de<256;de++)It[de]=rr(de)?1:0,Nt[de]=rr(de);function go(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||Ci,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 Lt(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=wa(i),new R(n,i)}function y(e,n){throw Lt(e,n)}function hn(e,n){e.onWarning&&e.onWarning.call(null,Lt(e,n))}var tr={YAML:function(n,i,r){var t,a,o;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"),a=parseInt(t[1],10),o=parseInt(t[2],10),a!==1&&y(n,"unacceptable YAML version of the document"),n.version=r[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&hn(n,"unsupported YAML version of the document")},TAG:function(n,i,r){var t,a;r.length!==2&&y(n,"TAG directive accepts exactly two arguments"),t=r[0],a=r[1],Tt.test(t)||y(n,"ill-formed tag handle (first argument) of the TAG directive"),Q.call(n.tagMap,t)&&y(n,'there is a previously declared suffix for "'+t+'" tag handle'),Et.test(a)||y(n,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{y(n,"tag prefix is malformed: "+a)}n.tagMap[t]=a}};function V(e,n,i,r){var t,a,o,c;if(n<i){if(c=e.input.slice(n,i),r)for(t=0,a=c.length;t<a;t+=1)o=c.charCodeAt(t),o===9||32<=o&&o<=1114111||y(e,"expected valid JSON character");else uo.test(c)&&y(e,"the stream contains non-printable characters");e.result+=c}}function lr(e,n,i,r){var t,a,o,c;for(I.isObject(i)||y(e,"cannot merge mappings; the provided source object is unacceptable"),t=Object.keys(i),o=0,c=t.length;o<c;o+=1)a=t[o],Q.call(n,a)||(Ot(n,a,i[a]),r[a]=!0)}function ve(e,n,i,r,t,a,o,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"&&ir(t[d])==="[object Object]"&&(t[d]="[object Object]");if(typeof t=="object"&&ir(t)==="[object Object]"&&(t="[object Object]"),t=String(t),n===null&&(n={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(d=0,f=a.length;d<f;d+=1)lr(e,n,a[d],i);else lr(e,n,a,i);else!e.json&&!Q.call(i,t)&&Q.call(n,t)&&(e.line=o||e.line,e.lineStart=c||e.lineStart,e.position=u||e.position,y(e,"duplicated mapping key")),Ot(n,t,a),delete i[t];return n}function Ai(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 E(e,n,i){for(var r=0,t=e.input.charCodeAt(e.position);t!==0;){for(;ie(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(z(t))for(Ai(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&&hn(e,"deficient indentation"),r}function Nn(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||P(i)))}function Si(e,n){n===1?e.result+=" ":n>1&&(e.result+=I.repeat(`
|
|
17
|
-
`,n-1))}function yo(e,n,i){var r,t,a,o,c,u,d,f,s=e.kind,p=e.result,h;if(h=e.input.charCodeAt(e.position),P(h)||pe(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(t=e.input.charCodeAt(e.position+1),P(t)||i&&pe(t)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,c=!1;h!==0;){if(h===58){if(t=e.input.charCodeAt(e.position+1),P(t)||i&&pe(t))break}else if(h===35){if(r=e.input.charCodeAt(e.position-1),P(r))break}else{if(e.position===e.lineStart&&Nn(e)||i&&pe(h))break;if(z(h))if(u=e.line,d=e.lineStart,f=e.lineIndent,E(e,!1,-1),e.lineIndent>=n){c=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=u,e.lineStart=d,e.lineIndent=f;break}}c&&(V(e,a,o,!1),Si(e,e.line-u),a=o=e.position,c=!1),ie(h)||(o=e.position+1),h=e.input.charCodeAt(++e.position)}return V(e,a,o,!1),e.result?!0:(e.kind=s,e.result=p,!1)}function bo(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(V(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 z(i)?(V(e,r,t,!0),Si(e,E(e,!1,n)),r=t=e.position):e.position===e.lineStart&&Nn(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 wo(e,n){var i,r,t,a,o,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 V(e,i,e.position,!0),e.position++,!0;if(c===92){if(V(e,i,e.position,!0),c=e.input.charCodeAt(++e.position),z(c))E(e,!1,n);else if(c<256&&It[c])e.result+=Nt[c],e.position++;else if((o=vo(c))>0){for(t=o,a=0;t>0;t--)c=e.input.charCodeAt(++e.position),(o=po(c))>=0?a=(a<<4)+o:y(e,"expected hexadecimal character");e.result+=mo(a),e.position++}else y(e,"unknown escape sequence");i=r=e.position}else z(c)?(V(e,i,r,!0),Si(e,E(e,!1,n)),i=r=e.position):e.position===e.lineStart&&Nn(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 ko(e,n){var i=!0,r,t,a,o=e.tag,c,u=e.anchor,d,f,s,p,h,v=Object.create(null),g,b,w,m;if(m=e.input.charCodeAt(e.position),m===91)f=93,h=!1,c=[];else if(m===123)f=125,h=!0,c={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),m=e.input.charCodeAt(++e.position);m!==0;){if(E(e,!0,n),m=e.input.charCodeAt(e.position),m===f)return e.position++,e.tag=o,e.anchor=u,e.kind=h?"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=p=!1,m===63&&(d=e.input.charCodeAt(e.position+1),P(d)&&(s=p=!0,e.position++,E(e,!0,n))),r=e.line,t=e.lineStart,a=e.position,be(e,n,dn,!1,!0),b=e.tag,g=e.result,E(e,!0,n),m=e.input.charCodeAt(e.position),(p||e.line===r)&&m===58&&(s=!0,m=e.input.charCodeAt(++e.position),E(e,!0,n),be(e,n,dn,!1,!0),w=e.result),h?ve(e,c,v,b,g,w,r,t,a):s?c.push(ve(e,null,v,b,g,w,r,t,a)):c.push(g),E(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 xo(e,n){var i,r,t=Un,a=!1,o=!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)Un===t?t=s===43?nr:so:y(e,"repeat of a chomping mode identifier");else if((f=_o(s))>=0)f===0?y(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?y(e,"repeat of an indentation width identifier"):(c=n+f-1,o=!0);else break;if(ie(s)){do s=e.input.charCodeAt(++e.position);while(ie(s));if(s===35)do s=e.input.charCodeAt(++e.position);while(!z(s)&&s!==0)}for(;s!==0;){for(Ai(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!o||e.lineIndent<c)&&s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>c&&(c=e.lineIndent),z(s)){u++;continue}if(e.lineIndent<c){t===nr?e.result+=I.repeat(`
|
|
18
|
-
`,a?1+u:u):t===Un&&a&&(e.result+=`
|
|
19
|
-
`);break}for(r?ie(s)?(d=!0,e.result+=I.repeat(`
|
|
20
|
-
`,a?1+u:u)):d?(d=!1,e.result+=I.repeat(`
|
|
21
|
-
`,u+1)):u===0?a&&(e.result+=" "):e.result+=I.repeat(`
|
|
22
|
-
`,u):e.result+=I.repeat(`
|
|
23
|
-
`,a?1+u:u),a=!0,o=!0,u=0,i=e.position;!z(s)&&s!==0;)s=e.input.charCodeAt(++e.position);V(e,i,e.position,!1)}return!0}function ar(e,n){var i,r=e.tag,t=e.anchor,a=[],o,c=!1,u;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),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||(o=e.input.charCodeAt(e.position+1),!P(o))));){if(c=!0,e.position++,E(e,!0,-1)&&e.lineIndent<=n){a.push(null),u=e.input.charCodeAt(e.position);continue}if(i=e.line,be(e,n,St,!1,!0),a.push(e.result),E(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=a,!0):!1}function Co(e,n,i){var r,t,a,o,c,u,d=e.tag,f=e.anchor,s={},p=Object.create(null),h=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),a=e.line,(m===63||m===58)&&P(r))m===63?(b&&(ve(e,s,p,h,v,null,o,c,u),h=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(o=e.line,c=e.lineStart,u=e.position,!be(e,i,At,!1,!0))break;if(e.line===a){for(m=e.input.charCodeAt(e.position);ie(m);)m=e.input.charCodeAt(++e.position);if(m===58)m=e.input.charCodeAt(++e.position),P(m)||y(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(ve(e,s,p,h,v,null,o,c,u),h=v=g=null),w=!0,b=!1,t=!1,h=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===a||e.lineIndent>n)&&(b&&(o=e.line,c=e.lineStart,u=e.position),be(e,n,fn,!0,t)&&(b?v=e.result:g=e.result),b||(ve(e,s,p,h,v,g,o,c,u),h=v=g=null),E(e,!0,-1),m=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>n)&&m!==0)y(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return b&&ve(e,s,p,h,v,null,o,c,u),w&&(e.tag=d,e.anchor=f,e.kind="mapping",e.result=s),w}function Ao(e){var n,i=!1,r=!1,t,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&y(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(i=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,t="!!",o=e.input.charCodeAt(++e.position)):t="!",n=e.position,i){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):y(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!P(o);)o===33&&(r?y(e,"tag suffix cannot contain exclamation marks"):(t=e.input.slice(n-1,e.position+1),Tt.test(t)||y(e,"named tag handle cannot contain such characters"),r=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(n,e.position),ho.test(a)&&y(e,"tag suffix cannot contain flow indicator characters")}a&&!Et.test(a)&&y(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{y(e,"tag name is malformed: "+a)}return i?e.tag=a:Q.call(e.tagMap,t)?e.tag=e.tagMap[t]+a:t==="!"?e.tag="!"+a:t==="!!"?e.tag="tag:yaml.org,2002:"+a:y(e,'undeclared tag handle "'+t+'"'),!0}function So(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&&!P(i)&&!pe(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 To(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&&!P(r)&&!pe(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),Q.call(e.anchorMap,i)||y(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],E(e,!0,-1),!0}function be(e,n,i,r,t){var a,o,c,u=1,d=!1,f=!1,s,p,h,v,g,b;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=c=fn===i||St===i,r&&E(e,!0,-1)&&(d=!0,e.lineIndent>n?u=1:e.lineIndent===n?u=0:e.lineIndent<n&&(u=-1)),u===1)for(;Ao(e)||So(e);)E(e,!0,-1)?(d=!0,c=a,e.lineIndent>n?u=1:e.lineIndent===n?u=0:e.lineIndent<n&&(u=-1)):c=!1;if(c&&(c=d||t),(u===1||fn===i)&&(dn===i||At===i?g=n:g=n+1,b=e.position-e.lineStart,u===1?c&&(ar(e,b)||Co(e,b,g))||ko(e,g)?f=!0:(o&&xo(e,g)||bo(e,g)||wo(e,g)?f=!0:To(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&y(e,"alias node should not have any properties")):yo(e,g,dn===i)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):u===0&&(f=c&&ar(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,p=e.implicitTypes.length;s<p;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(Q.call(e.typeMap[e.kind||"fallback"],e.tag))v=e.typeMap[e.kind||"fallback"][e.tag];else for(v=null,h=e.typeMap.multi[e.kind||"fallback"],s=0,p=h.length;s<p;s+=1)if(e.tag.slice(0,h[s].tag.length)===h[s].tag){v=h[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 Eo(e){var n=e.position,i,r,t,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(E(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),i=e.position;o!==0&&!P(o);)o=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");o!==0;){for(;ie(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!z(o));break}if(z(o))break;for(i=e.position;o!==0&&!P(o);)o=e.input.charCodeAt(++e.position);t.push(e.input.slice(i,e.position))}o!==0&&Ai(e),Q.call(tr,r)?tr[r](e,r,t):hn(e,'unknown document directive "'+r+'"')}if(E(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,E(e,!0,-1)):a&&y(e,"directives end mark is expected"),be(e,e.lineIndent-1,fn,!1,!0),E(e,!0,-1),e.checkLineBreaks&&fo.test(e.input.slice(n,e.position))&&hn(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Nn(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,E(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 Ft(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
24
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new go(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;)Eo(i);return i.documents}function Oo(e,n,i){n!==null&&typeof n=="object"&&typeof i>"u"&&(i=n,n=null);var r=Ft(e,i);if(typeof n!="function")return r;for(var t=0,a=r.length;t<a;t+=1)n(r[t])}function Io(e,n){var i=Ft(e,n);if(i.length!==0){if(i.length===1)return i[0];throw new R("expected a single document in the stream, but found more")}}var No=Oo,Lo=Io,Rt={loadAll:No,load:Lo},Pt=Object.prototype.toString,Mt=Object.prototype.hasOwnProperty,Ti=65279,Fo=9,De=10,Ro=13,Po=32,Mo=33,$o=34,ii=35,Do=37,Bo=38,zo=39,jo=42,$t=44,Uo=45,pn=58,Ho=61,Wo=62,Yo=63,Ko=64,Dt=91,Bt=93,qo=96,zt=123,Go=124,jt=125,F={};F[0]="\\0";F[7]="\\a";F[8]="\\b";F[9]="\\t";F[10]="\\n";F[11]="\\v";F[12]="\\f";F[13]="\\r";F[27]="\\e";F[34]='\\"';F[92]="\\\\";F[133]="\\N";F[160]="\\_";F[8232]="\\L";F[8233]="\\P";var Vo=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Jo=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Qo(e,n){var i,r,t,a,o,c,u;if(n===null)return{};for(i={},r=Object.keys(n),t=0,a=r.length;t<a;t+=1)o=r[t],c=String(n[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),u=e.compiledTypeMap.fallback[o],u&&Mt.call(u.styleAliases,c)&&(c=u.styleAliases[c]),i[o]=c;return i}function Zo(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 R("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+I.repeat("0",r-n.length)+n}var Xo=1,Be=2;function ec(e){this.schema=e.schema||Ci,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=I.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Qo(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==='"'?Be:Xo,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 or(e,n){for(var i=I.repeat(" ",n),r=0,t=-1,a="",o,c=e.length;r<c;)t=e.indexOf(`
|
|
25
|
-
`,r),t===-1?(o=e.slice(r),r=c):(o=e.slice(r,t+1),r=t+1),o.length&&o!==`
|
|
26
|
-
`&&(a+=i),a+=o;return a}function ri(e,n){return`
|
|
27
|
-
`+I.repeat(" ",e.indent*n)}function nc(e,n){var i,r,t;for(i=0,r=e.implicitTypes.length;i<r;i+=1)if(t=e.implicitTypes[i],t.resolve(n))return!0;return!1}function vn(e){return e===Po||e===Fo}function ze(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ti||65536<=e&&e<=1114111}function cr(e){return ze(e)&&e!==Ti&&e!==Ro&&e!==De}function sr(e,n,i){var r=cr(e),t=r&&!vn(e);return(i?r:r&&e!==$t&&e!==Dt&&e!==Bt&&e!==zt&&e!==jt)&&e!==ii&&!(n===pn&&!t)||cr(n)&&!vn(n)&&e===ii||n===pn&&t}function ic(e){return ze(e)&&e!==Ti&&!vn(e)&&e!==Uo&&e!==Yo&&e!==pn&&e!==$t&&e!==Dt&&e!==Bt&&e!==zt&&e!==jt&&e!==ii&&e!==Bo&&e!==jo&&e!==Mo&&e!==Go&&e!==Ho&&e!==Wo&&e!==zo&&e!==$o&&e!==Do&&e!==Ko&&e!==qo}function rc(e){return!vn(e)&&e!==pn}function Ce(e,n){var i=e.charCodeAt(n),r;return i>=55296&&i<=56319&&n+1<e.length&&(r=e.charCodeAt(n+1),r>=56320&&r<=57343)?(i-55296)*1024+r-56320+65536:i}function Ut(e){var n=/^\n* /;return n.test(e)}var Ht=1,ti=2,Wt=3,Yt=4,fe=5;function tc(e,n,i,r,t,a,o,c){var u,d=0,f=null,s=!1,p=!1,h=r!==-1,v=-1,g=ic(Ce(e,0))&&rc(Ce(e,e.length-1));if(n||o)for(u=0;u<e.length;d>=65536?u+=2:u++){if(d=Ce(e,u),!ze(d))return fe;g=g&&sr(d,f,c),f=d}else{for(u=0;u<e.length;d>=65536?u+=2:u++){if(d=Ce(e,u),d===De)s=!0,h&&(p=p||u-v-1>r&&e[v+1]!==" ",v=u);else if(!ze(d))return fe;g=g&&sr(d,f,c),f=d}p=p||h&&u-v-1>r&&e[v+1]!==" "}return!s&&!p?g&&!o&&!t(e)?Ht:a===Be?fe:ti:i>9&&Ut(e)?fe:o?a===Be?fe:ti:p?Yt:Wt}function lc(e,n,i,r,t){e.dump=function(){if(n.length===0)return e.quotingType===Be?'""':"''";if(!e.noCompatMode&&(Vo.indexOf(n)!==-1||Jo.test(n)))return e.quotingType===Be?'"'+n+'"':"'"+n+"'";var a=e.indent*Math.max(1,i),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=r||e.flowLevel>-1&&i>=e.flowLevel;function u(d){return nc(e,d)}switch(tc(n,c,e.indent,o,u,e.quotingType,e.forceQuotes&&!r,t)){case Ht:return n;case ti:return"'"+n.replace(/'/g,"''")+"'";case Wt:return"|"+ur(n,e.indent)+dr(or(n,a));case Yt:return">"+ur(n,e.indent)+dr(or(ac(n,o),a));case fe:return'"'+oc(n)+'"';default:throw new R("impossible error: invalid scalar style")}}()}function ur(e,n){var i=Ut(e)?String(n):"",r=e[e.length-1]===`
|
|
28
|
-
`,t=r&&(e[e.length-2]===`
|
|
29
|
-
`||e===`
|
|
30
|
-
`),a=t?"+":r?"":"-";return i+a+`
|
|
31
|
-
`}function dr(e){return e[e.length-1]===`
|
|
32
|
-
`?e.slice(0,-1):e}function ac(e,n){for(var i=/(\n+)([^\n]*)/g,r=function(){var d=e.indexOf(`
|
|
33
|
-
`);return d=d!==-1?d:e.length,i.lastIndex=d,fr(e.slice(0,d),n)}(),t=e[0]===`
|
|
34
|
-
`||e[0]===" ",a,o;o=i.exec(e);){var c=o[1],u=o[2];a=u[0]===" ",r+=c+(!t&&!a&&u!==""?`
|
|
35
|
-
`:"")+fr(u,n),t=a}return r}function fr(e,n){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,r,t=0,a,o=0,c=0,u="";r=i.exec(e);)c=r.index,c-t>n&&(a=o>t?o:c,u+=`
|
|
36
|
-
`+e.slice(t,a),t=a+1),o=c;return u+=`
|
|
37
|
-
`,e.length-t>n&&o>t?u+=e.slice(t,o)+`
|
|
38
|
-
`+e.slice(o+1):u+=e.slice(t),u.slice(1)}function oc(e){for(var n="",i=0,r,t=0;t<e.length;i>=65536?t+=2:t++)i=Ce(e,t),r=F[i],!r&&ze(i)?(n+=e[t],i>=65536&&(n+=e[t+1])):n+=r||Zo(i);return n}function cc(e,n,i){var r="",t=e.tag,a,o,c;for(a=0,o=i.length;a<o;a+=1)c=i[a],e.replacer&&(c=e.replacer.call(i,String(a),c)),(K(e,n,c,!1,!1)||typeof c>"u"&&K(e,n,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=t,e.dump="["+r+"]"}function hr(e,n,i,r){var t="",a=e.tag,o,c,u;for(o=0,c=i.length;o<c;o+=1)u=i[o],e.replacer&&(u=e.replacer.call(i,String(o),u)),(K(e,n+1,u,!0,!0,!1,!0)||typeof u>"u"&&K(e,n+1,null,!0,!0,!1,!0))&&((!r||t!=="")&&(t+=ri(e,n)),e.dump&&De===e.dump.charCodeAt(0)?t+="-":t+="- ",t+=e.dump);e.tag=a,e.dump=t||"[]"}function sc(e,n,i){var r="",t=e.tag,a=Object.keys(i),o,c,u,d,f;for(o=0,c=a.length;o<c;o+=1)f="",r!==""&&(f+=", "),e.condenseFlow&&(f+='"'),u=a[o],d=i[u],e.replacer&&(d=e.replacer.call(i,u,d)),K(e,n,u,!1,!1)&&(e.dump.length>1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),K(e,n,d,!1,!1)&&(f+=e.dump,r+=f));e.tag=t,e.dump="{"+r+"}"}function uc(e,n,i,r){var t="",a=e.tag,o=Object.keys(i),c,u,d,f,s,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new R("sortKeys must be a boolean or a function");for(c=0,u=o.length;c<u;c+=1)p="",(!r||t!=="")&&(p+=ri(e,n)),d=o[c],f=i[d],e.replacer&&(f=e.replacer.call(i,d,f)),K(e,n+1,d,!0,!0,!0)&&(s=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,s&&(e.dump&&De===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,s&&(p+=ri(e,n)),K(e,n+1,f,!0,s)&&(e.dump&&De===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,t+=p));e.tag=a,e.dump=t||"{}"}function pr(e,n,i){var r,t,a,o,c,u;for(t=i?e.explicitTypes:e.implicitTypes,a=0,o=t.length;a<o;a+=1)if(c=t[a],(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,Pt.call(c.represent)==="[object Function]")r=c.represent(n,u);else if(Mt.call(c.represent,u))r=c.represent[u](n,u);else throw new R("!<"+c.tag+'> tag resolver accepts not "'+u+'" style');e.dump=r}return!0}return!1}function K(e,n,i,r,t,a,o){e.tag=null,e.dump=i,pr(e,i,!1)||pr(e,i,!0);var c=Pt.call(e.dump),u=r,d;r&&(r=e.flowLevel<0||e.flowLevel>n);var f=c==="[object Object]"||c==="[object Array]",s,p;if(f&&(s=e.duplicates.indexOf(i),p=s!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&n>0)&&(t=!1),p&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(f&&p&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),c==="[object Object]")r&&Object.keys(e.dump).length!==0?(uc(e,n,e.dump,t),p&&(e.dump="&ref_"+s+e.dump)):(sc(e,n,e.dump),p&&(e.dump="&ref_"+s+" "+e.dump));else if(c==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?hr(e,n-1,e.dump,t):hr(e,n,e.dump,t),p&&(e.dump="&ref_"+s+e.dump)):(cc(e,n,e.dump),p&&(e.dump="&ref_"+s+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&lc(e,e.dump,n,a,u);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new R("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 dc(e,n){var i=[],r=[],t,a;for(li(e,i,r),t=0,a=r.length;t<a;t+=1)n.duplicates.push(i[r[t]]);n.usedDuplicates=new Array(a)}function li(e,n,i){var r,t,a;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,a=e.length;t<a;t+=1)li(e[t],n,i);else for(r=Object.keys(e),t=0,a=r.length;t<a;t+=1)li(e[r[t]],n,i)}function fc(e,n){n=n||{};var i=new ec(n);i.noRefs||dc(e,i);var r=e;return i.replacer&&(r=i.replacer.call({"":r},"",r)),K(i,0,r,!0,!0)?i.dump+`
|
|
39
|
-
`:""}var hc=fc,pc={dump:hc};function Ei(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 vc=N,_c=at,mc=ut,gc=vt,yc=_t,bc=Ci,wc=Rt.load,kc=Rt.loadAll,xc=pc.dump,Cc=R,Ac={binary:wt,float:pt,map:st,null:dt,pairs:xt,set:Ct,timestamp:yt,bool:ft,int:ht,merge:bt,omap:kt,seq:ct,str:ot},Sc=Ei("safeLoad","load"),Tc=Ei("safeLoadAll","loadAll"),Ec=Ei("safeDump","dump"),Oc={Type:vc,Schema:_c,FAILSAFE_SCHEMA:mc,JSON_SCHEMA:gc,CORE_SCHEMA:yc,DEFAULT_SCHEMA:bc,load:wc,loadAll:kc,dump:xc,YAMLException:Cc,types:Ac,safeLoad:Sc,safeLoadAll:Tc,safeDump:Ec};function Ic(e){if(e.trim()==="")return{};const i=Oc.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 vr={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"},Nc=[{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"},{id:"modules",title:"Module roots for this project",navLabel:"Modules",subtitle:"Auto-detected source roots from the project. Pick which ones the agent should treat as modules, or skip to leave .agent-project-settings.yml as-is.",kind:"modules"}],_r=[{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:"ai-council",title:"AI Council",navLabel:"AI Council",subtitle:"External second-opinion network. Enable members, pick transport + rounds + budget + impact routing, add provider keys. Writes .ai-council.yml.",kind:"aiCouncil"},{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 Kt(e={}){return e.extended===!0?[vr,...Nc,..._r]:[vr,..._r]}function Ln(e,n={}){const i=Kt(n),r=Math.max(0,Math.min(i.length-1,e));return i[r]}function Lc(e,n){const i={type:"object",properties:{},...e.description!==void 0?{description:e.description}:{}},r=i.properties,t=e.properties??{};for(const a of n){const o=a.split(".").filter(D=>D.length>0);if(o.length===0)continue;const[c,u,d]=o;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 h=r[c]??{type:"object",properties:{},...f.description!==void 0?{description:f.description}:{}},v=h.properties??={};if(d===void 0){v[u]=s,r[c]=h;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]=h}return i}function Fc({current:e,total:n}){const i=Math.max(1,n),r=Math.max(0,Math.min(i-1,e)),t=Array.from({length:i},(o,c)=>c<=r),a=Math.round((r+1)/i*100);return l("div",{class:"ac-wizard__progress",role:"progressbar","aria-valuenow":r+1,"aria-valuemin":1,"aria-valuemax":i,"aria-valuetext":`Step ${r+1} of ${i} (${a}%)`,children:t.map((o,c)=>l("span",{class:`ac-wizard__progress-segment${o?" ac-wizard__progress-segment--filled":""}`,"aria-hidden":"true"},c))})}function Rc({step:e,index:n,total:i}){return l("header",{class:"ac-page__header ac-wizard__header",children:[l("p",{class:"ac-wizard__step-count",children:["Step ",n+1," of ",i]}),l("div",{class:"ac-wizard__header-text",children:[l("h1",{children:e.title}),l("p",{class:"ac-wizard__subtitle",children:e.subtitle})]}),l(Fc,{current:n,total:i})]})}function Pc(e){const n=e.canFinish??!0,i=e.completed??!1;return l("div",{class:"ac-form__actions ac-wizard__nav",children:[l("button",{type:"button",class:"ac-button",disabled:!e.canGoPrev||e.busy,onClick:e.onPrev,children:"Back"}),e.canSkip&&e.onSkip!==void 0?l("button",{type:"button",class:"ac-button ac-wizard__skip",disabled:e.busy,onClick:e.onSkip,children:e.skipLabel??"Skip"}):null,e.isLast?i?null:l("button",{type:"button",class:"ac-button ac-button--primary",disabled:e.busy||!n,onClick:e.onFinish,children:e.busy?"Saving…":"Finish & save"}):l("button",{type:"button",class:"ac-button ac-button--primary",disabled:!e.canGoNext||e.busy,onClick:e.onNext,children:e.nextLabel??"Next"})]})}const qt=_(!1),Ie=_(null),M=_(null),_n=_(!1),mn=_(!1),J=_(0),Oi=_(null),U=_({}),Gt=_({}),Vt=_(0),me=_({}),O=_(null),re=_(null),Ii=_(!1),ai=_(!1),Fn=_(!1),Jt=_({}),Rn=_([]),gn=_("global"),Ni=_(!1),S=_(!1),oi=_(!1),Ze=_(!1),Ne=_(null),Li=_([]),yn=_({}),bn=_(!0),wn=_(""),kn=_("agents"),_e=_(!1),Qt=_(null),Mc=[{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"}],mr=_(!1),Le=_(!1),te=_(null),Fi=_([]),Ri=_([]),Pn=_([]),le=_({}),gr=_(!1),Hn=_(!1),Zt=_({}),yr=_(!1),Xt=_(null),el=_(null),nl=_("https://github.com/event4u-app/rtk"),br=_(!1),ee=_(null),il=_([]),rl=_({}),tl=_({}),Z=_({}),G=_({}),ci=_(!1),wr=_(!1),$c=5,Wn=_({}),kr=_(null),ge=_(null),si=_(!1),Xe=_(null),xn=_(null),ll=_(!1),ui=_(null),di=_(!1),fi=_(!1),hi=_(null),Fe=_(null),en=_(!1);function al(){return Kt({extended:S.value})}function je(){return al().length}function Dc(e){return e??new Date().toISOString()}function Pi(e){return Math.max(0,Math.min(je()-1,e))}const Bc={skip:"Skip",overwrite:"Overwrite",merge:"Merge"};function zc(e,n,i){const r=n[e.path];return r!==void 0?r:i==="overwrite-all"?"overwrite":i==="merge-json"&&e.mergeable?"merge":"skip"}function xr(e){return e===null?"—":e.slice(0,8)}function jc(e){if(e.conflicts.length===0)return null;const n=e.conflicts.length>=$c;return l("section",{class:"ac-wizard__conflicts","aria-live":"polite",children:[l("h3",{class:"ac-wizard__conflicts-title",children:[e.conflicts.length," file",e.conflicts.length===1?"":"s"," already exist"]}),l("p",{class:"ac-wizard__conflicts-hint",children:"These files are not from a previous install and the planned content differs. Pick how to handle them — unresolved entries are skipped."}),n?l(Uc,{choice:e.batchChoice,onChoice:e.onBatchChoice}):null,l(Hc,{conflicts:e.conflicts,resolutions:e.resolutions,batchChoice:e.batchChoice,onResolutionChange:e.onResolutionChange})]})}function Uc(e){return l("div",{class:"ac-wizard__conflicts-batch",role:"group","aria-label":"Batch resolution",children:[{id:"skip-all",label:"Skip all"},{id:"overwrite-all",label:"Overwrite all"},{id:"merge-json",label:"Merge JSON, skip rest"}].map(i=>{const r=e.choice===i.id;return l("button",{type:"button",class:`ac-wizard__conflicts-batch-btn${r?" ac-wizard__conflicts-batch-btn--active":""}`,"aria-pressed":r,onClick:()=>{e.onChoice(r?null:i.id)},children:i.label},i.id)})})}function Hc(e){return l("ul",{class:"ac-wizard__conflicts-list",children:e.conflicts.map(n=>{const i=zc(n,e.resolutions,e.batchChoice),r=n.mergeable?["skip","overwrite","merge"]:["skip","overwrite"];return l("li",{class:"ac-wizard__conflicts-row",children:[l("span",{class:"ac-wizard__conflicts-path",title:n.path,children:n.path}),l("span",{class:"ac-wizard__conflicts-sha",children:["planned ",xr(n.plannedSha256)," · on disk ",xr(n.existingSha256)]}),l("span",{class:"ac-wizard__conflicts-actions",role:"radiogroup","aria-label":`Resolution for ${n.path}`,children:r.map(t=>l("label",{class:`ac-wizard__conflicts-option${i===t?" ac-wizard__conflicts-option--active":""}`,children:[l("input",{type:"radio",name:`ac-conflict-${n.path}`,checked:i===t,onChange:()=>{e.onResolutionChange(n.path,t)}}),l("span",{children:Bc[t]})]},t))})]},n.path)})})}function ol(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."):ol(e,n)}function Yc(e,n){for(const i of Object.keys(n.errors))if(Wc(e,i))return!0;return!1}function Kc(e,n){if(Yc(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=>ol(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 qc(e){const n=e.steps.filter((i,r)=>r!==e.currentIndex);return l(j,{children:[l("nav",{class:"ac-wizard__review-nav","aria-label":"Jump back to a step",children:[l("p",{class:"ac-wizard__review-nav-label",children:"Jump back to a step:"}),l("ul",{class:"ac-wizard__review-nav-list",children:n.map(i=>{const r=e.steps.indexOf(i),t=Kc(i,e),a=t.tone==="error"?"ac-wizard__review-nav-button ac-wizard__review-nav-button--error":"ac-wizard__review-nav-button";return l("li",{children:l("button",{type:"button",class:a,onClick:()=>{e.onJump(r)},children:[l("span",{class:"ac-wizard__review-nav-index",children:r+1}),l("span",{class:"ac-wizard__review-nav-text",children:i.navLabel}),t.label!==""?l("span",{class:`ac-wizard__review-nav-status ac-wizard__review-nav-status--${t.tone}`,children:t.label}):null]})},i.id)})})]}),e.scopeAvailable?l("fieldset",{class:"ac-wizard__scope",children:[l("legend",{class:"ac-wizard__scope-legend",children:"Where should these settings be written?"}),l("label",{class:"ac-wizard__scope-option",children:[l("input",{type:"radio",name:"ac-wizard-scope",value:"global",checked:e.scope==="global",onChange:()=>{e.onScopeChange("global")}}),l("span",{class:"ac-wizard__scope-option-text",children:[l("strong",{children:"Global"})," — write to ",l("code",{children:"~/.event4u/agent-config/"})," so every project picks them up."]})]}),l("label",{class:"ac-wizard__scope-option",children:[l("input",{type:"radio",name:"ac-wizard-scope",value:"project",checked:e.scope==="project",onChange:()=>{e.onScopeChange("project")}}),l("span",{class:"ac-wizard__scope-option-text",children:[l("strong",{children:"This project only"})," — write to ",l("code",{children:"settings/"})," under the current repo (overrides the global layer)."]})]})]}):null,e.installPlanByTool!==void 0?l(Gc,{byTool:e.installPlanByTool,ready:e.installPlanReady===!0,error:e.installPlanError??null}):null,e.conflicts!==void 0&&e.conflictResolutions!==void 0&&e.onConflictResolutionChange!==void 0&&e.onConflictBatchChoice!==void 0?l(jc,{conflicts:e.conflicts,resolutions:e.conflictResolutions,batchChoice:e.conflictBatchChoice??null,onResolutionChange:e.onConflictResolutionChange,onBatchChoice:e.onConflictBatchChoice}):null]})}function Gc(e){if(!e.ready&&e.error===null)return l("section",{class:"ac-wizard__install-plan","aria-live":"polite",children:[l("h3",{class:"ac-wizard__install-plan-title",children:"Install plan"}),l("p",{class:"ac-wizard__install-plan-status",children:"Calculating install plan…"})]});if(e.error!==null)return l("section",{class:"ac-wizard__install-plan ac-wizard__install-plan--error","aria-live":"polite",children:[l("h3",{class:"ac-wizard__install-plan-title",children:"Install plan"}),l("p",{class:"ac-wizard__install-plan-status",children:e.error})]});const n=Object.entries(e.byTool).filter(([,r])=>r>0);if(n.length===0)return l("section",{class:"ac-wizard__install-plan","aria-live":"polite",children:[l("h3",{class:"ac-wizard__install-plan-title",children:"Install plan"}),l("p",{class:"ac-wizard__install-plan-status",children:"Nothing to install — no files match the selected tools."})]});const i=n.reduce((r,[,t])=>r+t,0);return l("section",{class:"ac-wizard__install-plan","aria-live":"polite",children:[l("h3",{class:"ac-wizard__install-plan-title",children:"Install plan"}),l("p",{class:"ac-wizard__install-plan-status",children:[i," file",i===1?"":"s"," across ",n.length," tool",n.length===1?"":"s","."]}),l("ul",{class:"ac-wizard__install-plan-list",children:n.map(([r,t])=>l("li",{class:"ac-wizard__install-plan-row",children:[l("span",{class:"ac-wizard__install-plan-tool",children:r}),l("span",{class:"ac-wizard__install-plan-count",children:[t," file",t===1?"":"s"]})]},r))})]})}function Vc(e){const n=e.abortedAt??"unknown time",i=e.abortNote??"no further detail recorded",r=e.writesSinceRollback;return l("aside",{class:"ac-banner ac-banner--recovery",role:"alert",children:[l("strong",{children:"Previous install was interrupted."}),l("p",{children:["Aborted at ",l("code",{children:n})," — ",i,". ",r," write",r===1?"":"s"," landed before the abort marker."]}),l("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."}),l("div",{class:"ac-banner__actions",children:[l("button",{type:"button",disabled:e.busy,onClick:()=>e.onResume(),children:"Resume install"}),l("button",{type:"button",disabled:e.busy,onClick:()=>e.onRollback(),children:"Rollback"}),l("button",{type:"button",disabled:e.busy,onClick:()=>e.onIgnore(),children:"Ignore"})]})]})}function Jc(){return l("section",{class:"ac-continue-screen","aria-labelledby":"ac-continue-title",children:[l("h2",{id:"ac-continue-title",children:"Install complete — continue with setup?"}),l("p",{children:"The three install steps (AI tools, capability packs, module roots) are captured. Use the footer to continue:"}),l("ul",{children:[l("li",{children:[l("strong",{children:"Next"})," — go through the remaining personalisation steps: editor + tooling, personality, cost profile, roadmap & quality, memory, your",l("code",{children:" .agent-user.yml"}),"."]}),l("li",{children:[l("strong",{children:"Finish install here"})," — skip the rest and write ",l("code",{children:".agent-settings.yml"})," with the install-only selections. You can re-run ",l("code",{children:"agent-config setup"}),"later to pick up the personalisation steps."]})]})]})}function Qc(e){const n=e.version??"unknown";return l("section",{class:"ac-backup-screen","aria-labelledby":"ac-backup-title",children:[l("h2",{id:"ac-backup-title",children:"Existing v3 install detected"}),l("p",{children:["Found a v3.x install at ",l("code",{children:e.sourcePath})," ","(VERSION: ",l("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?l("p",{class:"ac-banner ac-banner--error",children:["Backup failed: ",e.error]}):null,l("ul",{children:[l("li",{children:[l("strong",{children:"Backup v3 and proceed"})," — copies the tree to ",l("code",{children:e.backupTarget}),", then runs the v4 install. Restore later with",l("code",{children:[" mv ",e.backupTarget," ",e.sourcePath]}),"."]}),l("li",{children:[l("strong",{children:"Abort, uninstall v3 first"})," — closes the wizard. You decide what to keep."]})]}),l("div",{class:"ac-backup-screen__actions",children:[l("button",{type:"button",class:"ac-button ac-button--primary",disabled:e.busy,onClick:()=>e.onBackupAndProceed(),children:e.busy?"Backing up…":"Backup v3 and proceed"}),l("button",{type:"button",class:"ac-button",disabled:e.busy,onClick:()=>e.onAbort(),children:"Abort, uninstall v3 first"})]})]})}function Zc(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 Xc(){try{return await x("/api/v1/settings")}catch(e){if(e instanceof $&&e.status===404&&e.body.error?.code==="NOT_FOUND"){const n=await x("/api/v1/schema");return{values:{},lastModified:0,path:".agent-settings.yml",schema:n.settings}}throw e}}async function es(){try{const e=await x("/api/v1/install/recovery");xn.value=e.incomplete?e:null}catch{xn.value=null}}async function ns(){try{const e=await x("/api/v1/install/legacy-v3");ui.value=e.present?e:null}catch{ui.value=null}}async function is(){fi.value=!0,hi.value=null;try{await x("/api/v1/install/backup-v3",{method:"POST"}),di.value=!0}catch(e){hi.value=e instanceof $?Y(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e)}finally{fi.value=!1}}async function Yn(e){try{await x("/api/v1/install/recovery/dismiss",{method:"POST",body:{reason:e}})}catch(n){M.value={message:n instanceof Error?n.message:String(n),tone:"error"};return}xn.value=null,ll.value=!0}async function rs(){Ie.value=null;try{es(),ns();const[e,n]=await Promise.all([x("/api/v1/wizard/state"),Xc()]);Oi.value=Zc(n.schema),Vt.value=n.lastModified,Gt.value=n.values,Jt.value=n.legacyHints??{},S.value=e.extendedSteps===!0,Fe.value=e.wizardMode??null;const i=Object.keys(e.partial??{});U.value=i.length>0?{...n.values,...e.partial}:n.values,J.value=Pi(e.step),Ni.value=!1,qt.value=!0;const r=Ln(J.value,{extended:S.value});(r.kind==="welcome"||r.kind==="userMd"||r.kind==="review")&&cl(),r.kind==="modules"&&sl(),(r.kind==="roles"||r.kind==="aiTools"||r.kind==="packs")&&ul(),r.kind==="aiTools"&&dl(),r.id==="identity"&&fl(),r.kind==="aiCouncil"&&hl(),r.kind==="review"&&(pl(),vl())}catch(e){e instanceof $?Ie.value=Y(e.body.error??{code:"UNKNOWN",message:e.message}):Ie.value=e instanceof Error?e.message:String(e)}}function ts(e,n){return e.identity.name.trim()!==""?e:{...e,identity:{...e.identity,name:n}}}async function cl(){if(!ai.value)try{const e=await x("/api/v1/user-md");if(Ii.value=e.exists,e.exists&&e.identity!==null){const n=Xi(e.identity);re.value=n,O.value=n}else{let n;try{const r=await x("/api/v1/user-md/template");n=Xi(Ic(r.body))}catch{n=rt()}const i=Jt.value.user_name;typeof i=="string"&&i.trim()!==""&&(n=ts(n,i)),re.value=n,O.value=n}}catch(e){M.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{ai.value=!0}}async function sl(){if(!(oi.value||Ze.value)){Ze.value=!0,Ne.value=null;try{const e=await x("/api/v1/modules/detect");Li.value=e.candidates,Qt.value=e.project_root;const n={};for(const i of e.candidates)n[i.path]=!0;yn.value=n,bn.value=e.proposed_block.enabled,wn.value=e.proposed_block.namespace_template??"",kn.value=e.proposed_block.agent_folder??"agents"}catch(e){e instanceof $?Ne.value=Y(e.body.error??{code:"UNKNOWN",message:e.message}):Ne.value=e instanceof Error?e.message:String(e)}finally{Ze.value=!1,oi.value=!0}}}const ls=new Set(["python"]);async function ul(){if(!(mr.value||Le.value)){Le.value=!0,te.value=null;try{const[e,n]=await Promise.all([x("/api/v1/wizard/manifest"),x("/api/v1/wizard/auto-detect")]),i=(e.packs??[]).map(a=>({id:a.id,label:a.label??a.id,description:a.description??"",requires_hint:a.requires_hint,cluster:a.cluster??void 0,workspaces:a.workspaces}));Fi.value=i,Pn.value=(e.workspaces??[]).filter(a=>a.id!=="agent-config-maintainer").map(a=>({id:a.id,label:a.label??a.id,description:a.description??"",default_packs:a.default_packs??[],optional_packs:a.optional_packs??[],...a.example_roles!==void 0?{example_roles:a.example_roles}:{}}));const r=new Set(i.map(a=>a.id)),t=n.signals.map(a=>a.id.startsWith("pack-")?a.id.slice(5):a.id).filter(a=>r.has(a)).filter(a=>!ls.has(a));Ri.value=t}catch(e){e instanceof $?te.value=Y(e.body.error??{code:"UNKNOWN",message:e.message}):te.value=e instanceof Error?e.message:String(e)}finally{Le.value=!1,mr.value=!0}}}async function dl(){if(!(gr.value||Hn.value)){Hn.value=!0;try{const e=await x("/api/v1/wizard/detect-tools"),n=e.tools??{},i=e.configured??[];if(Zt.value=n,Object.keys(Z.value).length===0){const r={};if(i.length>0)for(const t of i)r[t]=!0;else for(const[t,a]of Object.entries(n))a&&(r[t]=!0);Z.value=r}}catch{}finally{Hn.value=!1,gr.value=!0}}}async function fl(){if(!yr.value){yr.value=!0;try{const e=await x("/api/v1/wizard/detect-rtk"),n=e.installed===!0;Xt.value=n,el.value=e.installCommand??null,typeof e.repo=="string"&&(nl.value=e.repo),U.value={...U.value,"personal.rtk_installed":n}}catch{}}}async function hl(){if(!br.value){br.value=!0;try{const e=await x("/api/v1/wizard/ai-council");ee.value=e.config,il.value=e.providers??[],rl.value=e.keyPresence??{},tl.value=e.keyInstall??{}}catch{}}}async function as(e,n){try{await x("/api/v1/wizard/state",{method:"POST",body:{step:e,totalSteps:je(),partial:n,startedAt:Dc(null)}})}catch(i){M.value={message:i instanceof Error?i.message:String(i),tone:"error"}}}async function pl(){mn.value=!0;try{const e=await x("/api/v1/settings/diff",{method:"POST",body:{values:U.value,ifUnmodifiedSince:Vt.value}});Rn.value=e.changes,me.value={}}catch(e){e instanceof $?(me.value=Zr(e.body.error??{message:e.message}),M.value={message:Y(e.body.error??{code:"UNKNOWN",message:e.message}),tone:"error"}):M.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{mn.value=!1}}async function vl(){const e=Object.entries(Z.value).filter(([,n])=>n===!0).map(([n])=>n);if(e.length===0){ge.value=null,Xe.value=null;return}si.value=!0,Xe.value=null;try{const n=await x("/api/v1/install/plan",{method:"POST",body:{target:"global",root:"~",toolIds:e,policy:{force:!1,interactive:!0,knownPaths:[],knownPointers:[],defaultStrategy:"surface-to-ui"}}});ge.value=n}catch(n){ge.value=null;const i=n instanceof $?Y(n.body.error??{code:"UNKNOWN",message:n.message}):n instanceof Error?n.message:String(n);Xe.value=i}finally{si.value=!1}}function Cn(){return Fn.value?!1:O.value===null||re.value===null?O.value!==re.value:JSON.stringify(O.value)!==JSON.stringify(re.value)}async function Ae(e){const n=Pi(e);await as(n,U.value),J.value=n,M.value=null;const i=Ln(n,{extended:S.value});(i.kind==="welcome"||i.kind==="userMd")&&cl(),i.kind==="modules"&&sl(),(i.kind==="roles"||i.kind==="aiTools"||i.kind==="packs")&&ul(),i.kind==="packs"&&ml(),i.kind==="aiTools"&&dl(),i.id==="identity"&&fl(),i.kind==="aiCouncil"&&hl(),i.kind==="review"&&(pl(),vl())}function _l(){const e=G.value,n=new Map(Fi.value.map(a=>[a.id,a])),i=Object.entries(e).filter(([,a])=>a===!0).map(([a])=>a).filter(a=>{const o=n.get(a)?.cluster;return o===void 0||e[o]===!0}),r=new Set,t=a=>{if(!r.has(a)){r.add(a);for(const o of n.get(a)?.requires_hint??[])t(o)}};for(const a of i)t(a);return[...r].sort()}function ml(){if(ci.value)return;const e=Object.entries(le.value).filter(([,r])=>r===!0).map(([r])=>r),n=new Map(Pn.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 Ri.value)i[r]=!0;G.value=i}function os(){const e=Object.entries(Z.value).filter(([,r])=>r===!0).map(([r])=>r);if(e.length===0)return null;const n=_l(),i={schema_version:"wizard-v2",tools:e,packs:n,settings:U.value};return ae.value?.projectScopeAvailable===!0&&gn.value==="project"&&(i.scope_to_project_only=!0),i}async function cs(){_n.value=!0,M.value=null;try{const e={settings:U.value},n=Object.entries(le.value).filter(([,f])=>f===!0).map(([f])=>f),i=O.value!==null&&typeof O.value.identity?.name=="string"&&O.value.identity.name.trim().length>0;O.value!==null&&i&&(Cn()||n.length>0)&&(e.identity=n.length>0?{...O.value,role:n}:O.value),ae.value?.projectScopeAvailable===!0&&(e.scope=gn.value);const r=us();r!==null&&(e.modulesConfig=r);const t=await x("/api/v1/wizard/finish",{method:"POST",body:e}),a="You can close this browser window now.",o=t.dryRun===!0?"Dry-run complete — no files written. Settings would be saved.":Array.isArray(t.writtenPaths)?`Saved (${t.writtenPaths.join(", ")}). Wizard complete.`:"Wizard complete.",c=S.value?os():null;let u="";if(c!==null)try{let f=null;await Hl("/api/v1/wizard/apply",c,h=>{h.type==="error"&&(f=typeof h.message=="string"?h.message:"install failed")});const s=c.tools.length,p=c.packs.length;u=f!==null?` Installer failed: ${f}. Settings were saved; re-run the wizard to retry.`:` Installer applied ${s} tool${s===1?"":"s"}`+(p>0?` and ${p} pack${p===1?"":"s"}.`:".")}catch(f){u=` Installer bridge failed: ${f instanceof $?Y(f.body.error??{code:"UNKNOWN",message:f.message}):f instanceof Error?f.message:String(f)}. Settings were saved; re-run the wizard to retry the install plan.`}let d="";if(S.value&&ee.value!==null)try{await x("/api/v1/wizard/ai-council",{method:"POST",body:ee.value}),d=" AI Council saved."}catch(f){d=` AI Council save failed: ${f instanceof $?Y(f.body.error??{code:"UNKNOWN",message:f.message}):f instanceof Error?f.message:String(f)}.`}M.value={message:`${o}${u}${d} ${a}`,tone:"success"},J.value=Pi(je()-1),Gt.value=U.value,re.value=Cn()?O.value:re.value,Rn.value=[],Ni.value=!0}catch(e){e instanceof $?(me.value=Zr(e.body.error??{message:e.message}),M.value={message:Y(e.body.error??{code:"UNKNOWN",message:e.message}),tone:"error"}):M.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{_n.value=!1}}function ss(){if(Ze.value)return l("p",{children:"Detecting module roots…"});if(Ne.value!==null)return l("div",{class:"ac-wizard-step-stub",children:[l("p",{class:"ac-banner ac-banner--error",children:["Module detection failed: ",Ne.value]}),l("p",{children:"You can skip this step — `.agent-project-settings.yml` will be left as-is. Re-run the wizard after fixing the underlying bridge to populate `modules:` automatically."})]});const e=Li.value,n=yn.value,i=Qt.value;return l("div",{class:"ac-wizard-step-stub",children:[i!==null?l("p",{children:["Scanning ",l("code",{children:i}),". Pick which detected roots the agent should treat as modules. Skip leaves",l("code",{children:" .agent-project-settings.yml"})," untouched."]}):null,l("label",{children:[l("input",{type:"checkbox",checked:bn.value,onChange:r=>{bn.value=r.currentTarget.checked,_e.value=!1}})," ","Enable module discovery (writes ",l("code",{children:"modules.enabled"}),")"]}),e.length===0?l("p",{children:[l("em",{children:"No module roots detected."})," The wizard found no common module layouts (Laravel ",l("code",{children:"app/Modules/"}),", Symfony ",l("code",{children:"src/Module/"}),", Node ",l("code",{children:"packages/"}),", Python ",l("code",{children:"src/"}),", Go ",l("code",{children:"internal/"}),"). Skip to leave ",l("code",{children:"modules:"})," blank."]}):l("ul",{style:"list-style: none; padding-left: 0;",children:e.map(r=>l("li",{children:l("label",{children:[l("input",{type:"checkbox",checked:n[r.path]??!1,onChange:t=>{const a=t.currentTarget.checked;yn.value={...n,[r.path]:a},_e.value=!1}})," ",l("code",{children:r.path})," — ",r.stack," ",l("small",{children:["(",r.confidence," confidence)"]})]})},r.path))}),l("div",{class:"ac-wizard__module-fields",children:[l("div",{class:"ac-field",children:[l("label",{class:"ac-field__label",for:"ac-modules-namespace",children:"Namespace template"}),l("input",{id:"ac-modules-namespace",class:"ac-input",type:"text",value:wn.value,placeholder:"e.g. App\\\\Modules\\\\{ModuleName}\\\\App",onInput:r=>{wn.value=r.currentTarget.value,_e.value=!1}}),l("span",{class:"ac-field__description",children:"How a module path maps to its namespace. Leave blank to skip namespacing."})]}),l("div",{class:"ac-field",children:[l("label",{class:"ac-field__label",for:"ac-modules-agent-folder",children:"Agent folder"}),l("input",{id:"ac-modules-agent-folder",class:"ac-input",type:"text",value:kn.value,placeholder:"agents",onInput:r=>{kn.value=r.currentTarget.value,_e.value=!1}}),l("span",{class:"ac-field__description",children:["Folder name that holds per-module agent docs (default ",l("code",{children:"agents"}),")."]})]})]})]})}function us(){if(_e.value||!oi.value)return null;const e=new Set(Li.value.map(r=>r.path)),n=yn.value,i=Object.keys(n).filter(r=>n[r]===!0&&e.has(r));return{enabled:bn.value,root_paths:i,namespace_template:wn.value,agent_folder:kn.value||"agents"}}const ds=["de","en","en-US","en-GB","fr","es","it","nl","pt","pt-BR"];function fs(){if(wr.value)return;const e=O.value;if(e===null)return;wr.value=!0;let n=e;if(e.identity.name.trim()===""){const i=ae.value?.systemUser;i!==void 0&&i.trim()!==""&&(n={...n,identity:{...n.identity,name:i}})}if(!Ii.value&&typeof navigator<"u"){const i=(navigator.language||"").split("-")[0];i.length>=2&&(n={...n,language:i})}n!==e&&(O.value=n)}function hs(){const e=O.value;if(On(()=>{fs()},[e]),e===null)return l("p",{children:"Loading…"});const n=i=>{O.value={...i,last_updated:new Date().toISOString().slice(0,10)},Fn.value=!1};return l("div",{class:"ac-wizard-step-stub ac-wizard__module-fields",children:[l("p",{children:["Tell the agent who you are. We pre-filled what we could detect — adjust freely. Stored in ",l("code",{children:".agent-user.yml"}),"."]}),l("div",{class:"ac-field",children:[l("label",{class:"ac-field__label",for:"welcome-name",children:"Name"}),l("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}})})]}),l("div",{class:"ac-field",children:[l("label",{class:"ac-field__label",for:"welcome-lang",children:"Language"}),l("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})}),l("datalist",{id:"welcome-lang-list",children:ds.map(i=>l("option",{value:i},i))})]})]})}function ps(){const e=Z.value,n=Zt.value;return l("div",{class:"ac-wizard-step-stub",children:[l("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."}),l("ul",{class:"ac-wizard__tool-list",children:Mc.map(i=>{const r=n[i.id]===!0;return l("li",{class:"ac-wizard__tool-row",children:[l("label",{class:"ac-wizard__tool-label",children:[l("input",{type:"checkbox",checked:e[i.id]??!1,onChange:t=>{const a=t.currentTarget.checked;Z.value={...e,[i.id]:a}}})," ",i.label]}),l("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 vs(){if(Le.value)return l("p",{children:"Loading roles…"});if(te.value!==null)return l("div",{class:"ac-wizard-step-stub",children:l("p",{class:"ac-banner ac-banner--error",children:["Discovery failed: ",te.value]})});const e=le.value,n=Pn.value,i=(r,t)=>{le.value={...le.value,[r]:t},ml()};return l("div",{class:"ac-wizard-step-stub",children:[l("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",l("code",{children:" .agent-user.yml"}),"."]}),n.length===0?l("p",{children:l("em",{children:"No roles available in the manifest."})}):l("div",{class:"ac-wizard__pack-grid",children:n.map(r=>l("section",{class:"ac-pack-tile",children:[l("label",{class:"ac-pack-tile__head",children:[l("input",{type:"checkbox",checked:e[r.id]??!1,onChange:t=>{i(r.id,t.currentTarget.checked)}}),l("span",{class:"ac-pack-tile__title",children:r.label})]}),(r.example_roles??[]).length>0?l("p",{class:"ac-pack-tile__role",children:["e.g. ",(r.example_roles??[]).join(", ")]}):null,r.description!==""?l("p",{class:"ac-pack-tile__desc",children:r.description}):null]},r.id))})]})}function _s(){if(Le.value)return l("p",{children:"Loading discovery manifest…"});if(te.value!==null)return l("div",{class:"ac-wizard-step-stub",children:[l("p",{class:"ac-banner ac-banner--error",children:["Discovery failed: ",te.value]}),l("p",{children:"The manifest endpoint is gated on extended-mode. Re-run the server with extended steps enabled to populate this list."})]});const e=G.value,n=new Set(Ri.value),i=new Map(Pn.value.map(s=>[s.id,s.label])),r=le.value,t=s=>{const p=(s??[]).filter(h=>h!=="agent-config-maintainer");return p.length===0?null:l("span",{class:"ac-pack-tile__ws",children:p.map(h=>l("span",{class:`ac-badge ac-badge--ws${r[h]===!0?" ac-badge--ws-active":""}`,title:r[h]===!0?"Matches a role you picked":"Workspace / area",children:i.get(h)??h},h))})},a=Fi.value.filter(s=>s.id!=="engineering-base"),o=new Map;for(const s of a)if(s.cluster!==void 0){const p=o.get(s.cluster)??[];p.push(s),o.set(s.cluster,p)}const c=new Set(a.filter(s=>s.cluster!==void 0).map(s=>s.id)),u=a.filter(s=>!c.has(s.id)),d=(s,p)=>{ci.value=!0,G.value={...G.value,[s]:p}},f=(s,p)=>{ci.value=!0;const h={...G.value,[s]:p};if(p)for(const v of o.get(s)??[])h[v.id]===void 0&&(h[v.id]=!0);G.value=h};return l("div",{class:"ac-wizard-step-stub",children:[l("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?l("p",{children:l("em",{children:"No packs available in the manifest."})}):l("div",{class:"ac-wizard__pack-grid",children:u.map(s=>{const p=o.get(s.id)??[],h=p.length>0,v=e[s.id]??!1;return l("section",{class:"ac-pack-tile",children:[l("label",{class:"ac-pack-tile__head",children:[l("input",{type:"checkbox",checked:v,onChange:g=>{const b=g.currentTarget.checked;h?f(s.id,b):d(s.id,b)}}),l("span",{class:"ac-pack-tile__title",children:s.label}),n.has(s.id)?l("span",{class:"ac-badge ac-badge--installed",children:"auto-detected"}):null]}),t(s.workspaces),s.description!==""?l("p",{class:"ac-pack-tile__desc",children:s.description}):null,h?l("fieldset",{class:"ac-pack-tile__children",disabled:!v,children:p.map(g=>l("label",{class:"ac-pack-tile__child",children:[l("input",{type:"checkbox",checked:e[g.id]??!1,disabled:!v,onChange:b=>{d(g.id,b.currentTarget.checked)}}),l("span",{children:g.label})]},g.id))}):null]},s.id)})})]})}function ms(){const e=Xt.value,n=el.value;return l("div",{class:"ac-rtk-row",children:[l("div",{class:"ac-rtk-row__head",children:[l("span",{class:"ac-rtk-row__label",children:["rtk ",l("small",{children:"(Rust Token Killer)"})]}),e===null?l("span",{class:"ac-badge ac-badge--missing",children:"detecting…"}):e?l("span",{class:"ac-badge ac-badge--installed",children:"installed"}):l("span",{class:"ac-badge ac-badge--missing",children:"not installed"})]}),e===!1?l("div",{class:"ac-rtk-row__install",children:[l("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?l("code",{class:"ac-rtk-row__cmd",children:n}):null,l("a",{class:"ac-button",href:nl.value,target:"_blank",rel:"noreferrer noopener",children:"Open rtk repo"})]}):null]})}function gs(){const e=ee.value;if(e===null)return l("div",{class:"ac-wizard-step-stub",children:l("p",{class:"ac-banner",children:["AI Council config is unavailable (extended-mode only, or",l("code",{children:" .ai-council.yml "})," could not be read). Configure it later by editing ",l("code",{children:"agents/settings/.ai-council.yml"}),"."]})});const n=il.value,i=rl.value,r=tl.value,t=o=>{ee.value={...e,...o}},a=(o,c)=>{const u=e.members[o]??{enabled:!1,participateLowImpact:!1};ee.value={...e,members:{...e.members,[o]:{...u,...c}}}};return l("div",{class:"ac-wizard-step-stub ac-council",children:[l("label",{class:"ac-council__master",children:[l("input",{type:"checkbox",checked:e.enabled,onChange:o=>{t({enabled:o.currentTarget.checked})}})," ","Enable the AI Council (external second-opinion network)"]}),l("fieldset",{class:"ac-council__section",disabled:!e.enabled,children:[l("div",{class:"ac-field",children:[l("label",{class:"ac-field__label",children:"Transport mode (default for all members)"}),l("select",{class:"ac-input",value:e.defaultMode,onChange:o=>{t({defaultMode:o.currentTarget.value})},children:[l("option",{value:"manual",children:"manual — copy & paste (free, no key)"}),l("option",{value:"api",children:"api — stored key, per-token billing"}),l("option",{value:"cli",children:"cli — subscription auth (flat-rate)"})]})]}),l("div",{class:"ac-field",children:[l("label",{class:"ac-field__label",children:"Debate rounds (minimum)"}),l("input",{class:"ac-input",type:"number",min:"1",value:e.minRounds,onInput:o=>{t({minRounds:Math.max(1,Number.parseInt(o.currentTarget.value,10)||1)})}})]}),l("div",{class:"ac-field",children:[l("label",{class:"ac-field__label",children:"Cost budget — max total USD per invocation"}),l("input",{class:"ac-input",type:"number",min:"0",step:"0.5",value:e.maxTotalUsd,onInput:o=>{t({maxTotalUsd:Math.max(0,Number.parseFloat(o.currentTarget.value)||0)})}})]}),l("h3",{class:"ac-council__h",children:"Members"}),l("ul",{class:"ac-wizard__tool-list",children:n.map(o=>{const c=e.members[o]??{enabled:!1,participateLowImpact:!1},u=i[o]===!0,d=r[o];return l("li",{class:"ac-pack-tile",children:[l("div",{class:"ac-pack-tile__head",children:[l("label",{class:"ac-pack-tile__head",style:"flex:1;",children:[l("input",{type:"checkbox",checked:c.enabled,onChange:f=>{a(o,{enabled:f.currentTarget.checked})}}),l("span",{class:"ac-pack-tile__title",children:o})]}),l("span",{class:`ac-badge ${u?"ac-badge--installed":"ac-badge--missing"}`,children:u?"key present":"no key"})]}),l("label",{class:"ac-pack-tile__child",children:[l("input",{type:"checkbox",checked:c.participateLowImpact,disabled:!c.enabled,onChange:f=>{a(o,{participateLowImpact:f.currentTarget.checked})}}),l("span",{children:"low-impact fast-path"})]}),u?null:l("p",{class:"ac-field__description",children:d!==void 0?l(j,{children:["Add a key — run in a terminal: ",l("code",{children:d})]}):l(j,{children:["No installer; set ",l("code",{children:["api_key_ref: env:",o.toUpperCase(),"_API_KEY"]})," and export that variable."]})})]},o)})}),l("h3",{class:"ac-council__h",children:"Impact routing"}),["trivial","low_impact","medium_impact"].map(o=>l("div",{class:"ac-field",children:[l("label",{class:"ac-field__label",children:o}),l("select",{class:"ac-input",value:e.decision[o]??"agent",onChange:c=>{const u=c.currentTarget.value;ee.value={...e,decision:{...e.decision,[o]:u}}},children:[l("option",{value:"agent",children:"agent — the agent decides"}),l("option",{value:"council",children:"council — poll the council"}),l("option",{value:"user",children:"user — always ask you"})]})]},o)),l("p",{class:"ac-field__description",children:[l("code",{children:"high_impact"})," and ",l("code",{children:"user_required"})," are locked to “user” (Iron Law) and not editable here."]})]})]})}function ys(){const e=Ln(J.value,{extended:S.value});if(S.value&&Fe.value==="install"&&J.value===5&&!en.value)return l(Jc,{});if(e.kind==="form"){const i=Lc(Oi.value,e.paths??[]);return l(j,{children:[e.id==="identity"?l(ms,{}):null,l(na,{schema:i,values:U.value,errors:me.value,onChange:r=>{U.value=r}})]})}return e.kind==="userMd"?!ai.value||O.value===null?l("p",{children:"Loading .agent-user.yml…"}):l(la,{value:O.value,errors:me.value,hideRole:S.value&&Fe.value==="install",hideIdentityBasics:S.value&&Fe.value==="install",onChange:i=>{O.value=i,Fn.value=!1}}):e.kind==="welcome"?l(hs,{}):e.kind==="aiTools"?l(ps,{}):e.kind==="roles"?l(vs,{}):e.kind==="packs"?l(_s,{}):e.kind==="modules"?l(ss,{}):e.kind==="aiCouncil"?l(gs,{}):l(qc,{steps:al(),currentIndex:J.value,changes:Rn.value,errors:me.value,userMdChanged:Cn(),userMdAction:Ii.value?"replace":"create",loading:mn.value,onJump:i=>{Ae(i)},scope:gn.value,scopeAvailable:ae.value?.projectScopeAvailable===!0,onScopeChange:i=>{gn.value=i},selectedToolsCount:Object.values(Z.value).filter(Boolean).length,selectedPacksCount:Object.values(G.value).filter(Boolean).length,installPlanByTool:S.value?bs():void 0,installPlanReady:S.value?ge.value!==null:void 0,installPlanError:S.value&&!si.value?Xe.value:null,conflicts:S.value?ge.value?.conflicts??[]:void 0,conflictResolutions:S.value?Wn.value:void 0,conflictBatchChoice:S.value?kr.value:void 0,onConflictResolutionChange:S.value?(i,r)=>{Wn.value={...Wn.value,[i]:r}}:void 0,onConflictBatchChoice:S.value?i=>{kr.value=i}:void 0})}function bs(){const e=ge.value;if(e===null)return{};const n={};for(const[i,r]of Object.entries(e.filesByTool))n[i]=r.length;return n}function Kn({path:e}){if(On(()=>{rs()},[]),!qt.value||Oi.value===null)return l("div",{class:"ac-page",children:[l("h1",{children:"Setup wizard"}),Ie.value!==null?l("p",{class:"ac-banner ac-banner--error",children:Ie.value}):l("p",{children:"Loading…"})]});const n=J.value,i=je(),r=Ln(n,{extended:S.value}),t=n===i-1,a=r.kind==="aiTools"&&Object.values(Z.value).filter(Boolean).length===0||r.kind==="roles"&&Object.values(le.value).filter(Boolean).length===0||r.kind==="packs"&&_l().length===0,o=S.value&&Fe.value==="install"&&n===5&&!en.value,c=xn.value,u=c!==null&&!ll.value,d=ui.value;return d!==null&&d.present&&!di.value?l("div",{class:"ac-page",children:l(Qc,{sourcePath:d.path,backupTarget:d.backupTarget,version:d.version,busy:fi.value,error:hi.value,onBackupAndProceed:()=>{is()},onAbort:()=>{M.value={tone:"info",message:"Aborted. Uninstall v3 manually, then re-run `agent-config install`."},di.value=!0}})}):l("div",{class:"ac-page",children:[l(Rc,{step:r,index:n,total:i}),u?l(Vc,{abortedAt:c.abortedAt,abortNote:c.abortNote,writesSinceRollback:c.writesSinceRollback,busy:_n.value,onResume:()=>{Yn("resume")},onRollback:()=>{Yn("rollback")},onIgnore:()=>{Yn("ignore")}}):null,M.value!==null?l("p",{class:`ac-banner${M.value.tone==="error"?" ac-banner--error":""}`,children:M.value.message}):null,l("div",{class:"ac-wizard__step",children:l(ys,{})}),a?l("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,l(Pc,{canGoPrev:n>0,canGoNext:!t&&!a,canSkip:o||r.kind==="userMd"||r.kind==="modules",skipLabel:o?"Finish install here":"Skip",isLast:t,busy:_n.value||mn.value,canFinish:Rn.value.length>0||Cn(),completed:Ni.value,onPrev:()=>{Ae(n-1)},onNext:()=>{if(o){en.value=!0;return}Ae(n+1)},onSkip:()=>{if(o){en.value=!0,Ae(je()-1);return}r.kind==="modules"?_e.value=!0:Fn.value=!0,Ae(n+1)},onFinish:()=>{cs()}})]})}const nn=_([]),An=_([]),pi=_([]),vi=_([]),Sn=_(null),gl=_(!1),Re=_(null),ne=_(null),qn=_("plain");async function ws(){Re.value=null;try{const[e,n,i,r]=await Promise.all([x("/api/v1/workspace/roles"),x("/api/v1/workspace/sessions?limit=20"),x("/api/v1/workspace/knowledge?limit=20"),x("/api/v1/workspace/documents?limit=20")]);nn.value=e.roles,An.value=n.sessions,pi.value=i.chunks,vi.value=r.documents,gl.value=!0}catch(e){e instanceof $?Re.value=e.body?.error?.message??e.message:Re.value=e instanceof Error?e.message:String(e)}}async function ks(e,n){ne.value=null;try{const i=await x("/api/v1/workspace/launch",{method:"POST",body:{role:e,task:n,host:"local"}});ne.value=`Started session ${i.id} (${i.role} · ${i.task}).`;const r=await x("/api/v1/workspace/sessions?limit=20");An.value=r.sessions}catch(i){i instanceof $?ne.value=i.body?.error?.message??i.message:ne.value=i instanceof Error?i.message:String(i)}}function xs({role:e}){const n=Sn.value===e.slug;return l("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:()=>{Sn.value=e.slug,ne.value=null},children:[l("span",{class:"ac-workspace__role-name",children:e.display_name}),l("span",{class:"ac-workspace__role-status","data-status":e.status,children:e.status}),l("span",{class:"ac-workspace__role-tagline",children:e.tagline})]})}function Cs({role:e}){return l("section",{class:"ac-workspace__tasks","aria-labelledby":"task-heading",children:[l("h2",{id:"task-heading",class:"ac-workspace__heading",children:["First tasks · ",e.display_name]}),e.first_tasks.length===0?l("p",{class:"ac-workspace__empty",children:"No tasks scaffolded yet for this role."}):l("ul",{class:"ac-workspace__task-list",children:e.first_tasks.map(n=>l("li",{class:"ac-workspace__task",children:[l("div",{class:"ac-workspace__task-head",children:[l("span",{class:"ac-workspace__task-name",children:n.name}),l("button",{type:"button",class:"ac-button ac-button--primary",onClick:()=>{ks(e.slug,n.name)},children:"Start session"})]}),l("p",{class:"ac-workspace__task-intent",children:n.intent}),n.prompt!==""?l("code",{class:"ac-workspace__task-prompt",children:["prompts/",n.prompt]}):null]},n.name))}),e.skills.length>0?l("details",{class:"ac-workspace__skills",children:[l("summary",{children:["Skill shortlist (",e.skills.length,")"]}),l("ul",{class:"ac-workspace__skill-list",children:[e.skills.slice(0,5).map(n=>l("li",{class:"ac-workspace__skill",children:[l("code",{children:n.id})," — ",n.why]},n.id)),e.skills.length>5?l("li",{class:"ac-workspace__skill-more",children:["+ ",e.skills.length-5," more"]}):null]})]}):null]})}function As(){return l("section",{class:"ac-workspace__sessions","aria-labelledby":"sessions-heading",children:[l("h2",{id:"sessions-heading",class:"ac-workspace__heading",children:"Recent sessions"}),An.value.length===0?l("p",{class:"ac-workspace__empty",children:"No sessions yet — pick a role and start one."}):l("ul",{class:"ac-workspace__session-list",children:An.value.map(e=>l("li",{class:"ac-workspace__session",children:[l("span",{class:"ac-workspace__session-id",children:e.id.slice(0,16)}),l("span",{class:"ac-workspace__session-role",children:e.role}),l("span",{class:"ac-workspace__session-task",children:e.task})]},e.id))})]})}function Ss(){return l("section",{class:"ac-workspace__knowledge","aria-labelledby":"knowledge-heading",children:[l("h2",{id:"knowledge-heading",class:"ac-workspace__heading",children:"Knowledge sources"}),pi.value.length===0?l("p",{class:"ac-workspace__empty",children:["No sources yet. Run ",l("code",{children:"/knowledge:ingest <path>"})," to add documents."]}):l("ol",{class:"ac-workspace__citation-list",children:pi.value.map((e,n)=>l("li",{class:"ac-workspace__citation",children:[l("span",{class:"ac-workspace__citation-marker","aria-label":`Citation ${n+1}`,children:["[",n+1,"]"]}),l("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?l("span",{class:"ac-workspace__citation-pin","aria-label":"pinned",children:"★"}):null,l("p",{class:"ac-workspace__citation-excerpt",children:[e.excerpt.slice(0,200),e.excerpt.length>200?"…":""]})]},e.id))})]})}function Ts(){return l("section",{class:"ac-workspace__recent","aria-labelledby":"recent-heading",children:[l("h2",{id:"recent-heading",class:"ac-workspace__heading",children:"Recent documents"}),vi.value.length===0?l("p",{class:"ac-workspace__empty",children:"No documents yet. Saved drafts land here."}):l("ul",{class:"ac-workspace__doc-list",children:vi.value.map(e=>l("li",{class:"ac-workspace__doc",children:[l("span",{class:"ac-workspace__doc-type","data-type":e.type,children:e.type}),l("span",{class:"ac-workspace__doc-title",children:e.title}),l("time",{class:"ac-workspace__doc-time",dateTime:e.updated_at,children:e.updated_at.slice(0,10)})]},`${e.type}/${e.slug}`))})]})}function Es(){const e=qn.value;return l("fieldset",{class:"ac-workspace__explain",children:[l("legend",{class:"ac-workspace__heading",children:"Explanation style"}),l("label",{class:"ac-workspace__explain-option",children:[l("input",{type:"radio",name:"explain-mode",value:"plain",checked:e==="plain",onChange:()=>{qn.value="plain"},"aria-label":"Plain language"}),l("span",{children:"Plain language"})]}),l("label",{class:"ac-workspace__explain-option",children:[l("input",{type:"radio",name:"explain-mode",value:"technical",checked:e==="technical",onChange:()=>{qn.value="technical"},"aria-label":"Technical detail"}),l("span",{children:"Technical detail"})]}),l("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 Os(){if(On(()=>{ws()},[]),Re.value!==null)return l("div",{class:"ac-page ac-page--error",children:[l("h1",{children:"Workspace"}),l("p",{class:"ac-banner ac-banner--error",children:Re.value})]});if(!gl.value)return l("div",{class:"ac-page",children:[l("h1",{children:"Workspace"}),l("p",{children:"Loading…"})]});const e=Sn.value!==null?nn.value.find(n=>n.slug===Sn.value)??null:null;return l("div",{class:"ac-page ac-workspace",children:[l("header",{class:"ac-page__header",children:[l("h1",{children:"Workspace"}),l("p",{class:"ac-page__subtitle",children:"Pick a role, pick a first task, run it."})]}),ne.value!==null?l("p",{class:"ac-banner",role:"status",children:ne.value}):null,l("div",{class:"ac-workspace__grid",children:[l("section",{class:"ac-workspace__roles","aria-labelledby":"roles-heading",children:[l("h2",{id:"roles-heading",class:"ac-workspace__heading",children:"Roles"}),nn.value.length===0?l("p",{class:"ac-workspace__empty",children:"No roles installed."}):l("div",{class:"ac-workspace__role-grid",children:nn.value.map(n=>l(xs,{role:n},n.slug))})]}),l("main",{class:"ac-workspace__main","aria-label":"Tasks and sessions",children:[e!==null?l(Cs,{role:e}):l("p",{class:"ac-workspace__empty",children:"Pick a role on the left to see its first tasks."}),l(As,{})]}),l("aside",{class:"ac-workspace__rail","aria-label":"Knowledge and documents",children:[l(Ss,{}),l(Ts,{}),l(Es,{})]})]})]})}const yl=[{id:"setup",label:"Setup",hashPath:"/setup",matches:["/setup","/wizard"]},{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 Is(e){for(const n of yl)for(const i of n.matches)if(e===i||e.startsWith(`${i}/`))return n.id;return null}function Ns(){const e=he.value,n=Is(e);return l("header",{class:"ac-topnav",children:l("div",{class:"ac-topnav__inner",children:[l("div",{class:"ac-topnav__brand",children:[l("h1",{class:"ac-topnav__title",children:"@event4u/agent-config"}),l("p",{class:"ac-topnav__subtitle",children:"Browser Wizard"})]}),l("nav",{class:"ac-topnav__tabs","aria-label":"Surfaces",children:yl.map(i=>l("button",{type:"button",class:`ac-topnav__tab${n===i.id?" ac-topnav__tab--active":""}`,"aria-current":n===i.id?"page":void 0,onClick:()=>ei(i.hashPath),children:i.label},i.id))})]})})}function qe({name:e}){return l("div",{class:"ac-page",children:[l("header",{class:"ac-page__header",children:l("h1",{children:e})}),l("section",{class:"ac-section",children:[l("p",{class:"ac-section__description",children:["The ",l("strong",{children:e})," surface is currently served by the legacy installer GUI on port ",l("code",{children:"41100"}),". It is being ported to the modern shell in a follow-up phase (road-to-unified-setup § Phase 5)."]}),l("p",{class:"ac-section__description",children:["For now the legacy surface remains reachable via"," ",l("code",{children:"installer gui"}),"."]})]})]})}function Ls({path:e}){return l("div",{class:"ac-page ac-page--error",children:[l("h1",{children:"Page not found"}),l("p",{children:["Nothing routed to ",l("code",{children:e}),". Try ",l("a",{href:"#/setup",children:"Setup"}),"."]})]})}function Fs(){const e=ae.value;return e===null||e.dryRun!==!0?null:l("div",{class:"ac-dryrun-banner",role:"status","aria-live":"polite",children:[l("strong",{children:"DRY RUN"}),l("span",{children:" · no files will be written. Validation + rendering run normally; commits return a preview."})]})}function Rs(e){return e==="/"||e==="/setup"||e.startsWith("/setup/")?l(Kn,{path:e}):e.startsWith("/wizard")?l(Kn,{path:e}):e==="/settings"||e.startsWith("/settings/")?l(Kn,{path:"/setup"}):e==="/tasks"?l(qe,{name:"Tasks"}):e==="/council"?l(qe,{name:"Council"}):e==="/memory"?l(qe,{name:"Memory"}):e==="/explain"?l(qe,{name:"Explain"}):e==="/workspace"?l(Os,{}):l(Ls,{path:e})}function Ps(){return On(()=>{jl(),(he.value==="/"||he.value==="/settings"||he.value.startsWith("/settings/"))&&ei("/setup"),Wl()},[]),l(j,{children:[l(Fs,{}),l(Ns,{}),Rs(he.value)]})}const Ms=3e4,$s=30*6e4;let Ge=null,Cr=!1;function Ar(e){if(!Cr&&(Cr=!0,!(typeof navigator>"u"||typeof navigator.sendBeacon!="function")))try{navigator.sendBeacon(`/api/v1/shutdown?token=${encodeURIComponent(e)}`)}catch{}}function Ds(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 a=()=>{Ge!==null&&clearInterval(Ge),Ge=null;for(const c of r)window.removeEventListener(c,i);document.removeEventListener("visibilitychange",t),window.removeEventListener("pagehide",o)};Ge=setInterval(()=>{if(!document.hidden){if(Date.now()-n>$s){Ar(e),a();return}x("/api/v1/ping").catch(()=>{})}},Ms);function o(){Ar(e)}return window.addEventListener("pagehide",o),a}function Bs(){return new URLSearchParams(window.location.search).get("token")}function zs(){const e=document.getElementById("app");if(e===null)return;const n=Bs();if(n===null){e.textContent="agent-config UI · missing token — re-open via `agent-config ui:serve`.";return}Ul(n),Ds(n),e.textContent="",Tl(l(Ps,{}),e)}zs();
|
|
40
|
-
//# sourceMappingURL=index-J0-0d7RC.js.map
|