@volter/teams 0.1.79 → 0.1.80

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/teams",
3
- "version": "0.1.79",
3
+ "version": "0.1.80",
4
4
  "type": "module",
5
5
  "description": "Volter Teams, the neutral team plane: machine identity and daemon core, the local door and server link, admission from machine grants, product doors, and the Teams server's neutral routes (company RFC 0008).",
6
6
  "license": "MIT",
@@ -26,8 +26,7 @@ var Qa=Object.defineProperty;var $t=(e,t)=>{for(var n in t)Qa(e,n,{get:t[n],enum
26
26
  `,i.map=[t,e.line],!0}function vr(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>i)return!1;let a=e.src.charCodeAt(s);if(a!==126&&a!==96)return!1;let o=s;s=e.skipChars(s,a);let u=s-o;if(u<3)return!1;let c=e.src.slice(o,s),d=e.src.slice(s,i);if(a===96&&d.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let h=t,f=!1;for(;h++,!(h>=n||(s=o=e.bMarks[h]+e.tShift[h],i=e.eMarks[h],s<i&&e.sCount[h]<e.blkIndent));)if(e.src.charCodeAt(s)===a&&!(e.sCount[h]-e.blkIndent>=4)&&(s=e.skipChars(s,a),!(s-o<u)&&(s=e.skipSpaces(s),!(s<i)))){f=!0;break}u=e.sCount[t],e.line=h+(f?1:0);let m=e.push("fence","code",0);return m.info=d,m.content=e.getLines(t+1,h,u,!0),m.markup=c,m.map=[t,e.line],!0}function _r(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(s)!==62)return!1;if(r)return!0;let o=[],u=[],c=[],d=[],h=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let m=!1,p;for(p=t;p<n;p++){let y=e.sCount[p]<e.blkIndent;if(s=e.bMarks[p]+e.tShift[p],i=e.eMarks[p],s>=i)break;if(e.src.charCodeAt(s++)===62&&!y){let x=e.sCount[p]+1,S,A;e.src.charCodeAt(s)===32?(s++,x++,A=!1,S=!0):e.src.charCodeAt(s)===9?(S=!0,(e.bsCount[p]+x)%4===3?(s++,x++,A=!1):A=!0):S=!1;let M=x;for(o.push(e.bMarks[p]),e.bMarks[p]=s;s<i;){let I=e.src.charCodeAt(s);if(L(I))I===9?M+=4-(M+e.bsCount[p]+(A?1:0))%4:M++;else break;s++}m=s>=i,u.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(S?1:0),c.push(e.sCount[p]),e.sCount[p]=M-x,d.push(e.tShift[p]),e.tShift[p]=s-e.bMarks[p];continue}if(m)break;let C=!1;for(let x=0,S=h.length;x<S;x++)if(h[x](e,p,n,!0)){C=!0;break}if(C){e.lineMax=p,e.blkIndent!==0&&(o.push(e.bMarks[p]),u.push(e.bsCount[p]),d.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}o.push(e.bMarks[p]),u.push(e.bsCount[p]),d.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]=-1}let g=e.blkIndent;e.blkIndent=0;let v=e.push("blockquote_open","blockquote",1);v.markup=">";let _=[t,0];v.map=_,e.md.block.tokenize(e,t,p);let b=e.push("blockquote_close","blockquote",-1);b.markup=">",e.lineMax=a,e.parentType=f,_[1]=e.line;for(let y=0;y<d.length;y++)e.bMarks[y+t]=o[y],e.tShift[y+t]=d[y],e.sCount[y+t]=c[y],e.bsCount[y+t]=u[y];return e.blkIndent=g,!0}function xr(e,t,n,r){let s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t],a=e.src.charCodeAt(i++);if(a!==42&&a!==45&&a!==95)return!1;let o=1;for(;i<s;){let c=e.src.charCodeAt(i++);if(c!==a&&!L(c))return!1;c===a&&o++}if(o<3)return!1;if(r)return!0;e.line=t+1;let u=e.push("hr","hr",0);return u.map=[t,e.line],u.markup=Array(o+1).join(String.fromCharCode(a)),!0}function Ii(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(r++);if(s!==42&&s!==45&&s!==43)return-1;if(r<n){let i=e.src.charCodeAt(r);if(!L(i))return-1}return r}function Di(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],s=n;if(s+1>=r)return-1;let i=e.src.charCodeAt(s++);if(i<48||i>57)return-1;for(;;){if(s>=r)return-1;if(i=e.src.charCodeAt(s++),i>=48&&i<=57){if(s-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return s<r&&(i=e.src.charCodeAt(s),!L(i))?-1:s}function zu(e,t){let n=e.level+2;for(let r=t+2,s=e.tokens.length-2;r<s;r++)e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function kr(e,t,n,r){let s,i,a,o,u=t,c=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let d=!1;r&&e.parentType==="paragraph"&&e.sCount[u]>=e.blkIndent&&(d=!0);let h,f,m;if((m=Di(e,u))>=0){if(h=!0,a=e.bMarks[u]+e.tShift[u],f=Number(e.src.slice(a,m-1)),d&&f!==1)return!1}else if((m=Ii(e,u))>=0)h=!1;else return!1;if(d&&e.skipSpaces(m)>=e.eMarks[u])return!1;if(r)return!0;let p=e.src.charCodeAt(m-1),g=e.tokens.length;h?(o=e.push("ordered_list_open","ol",1),f!==1&&(o.attrs=[["start",f]])):o=e.push("bullet_list_open","ul",1);let v=[u,0];o.map=v,o.markup=String.fromCharCode(p);let _=!1,b=e.md.block.ruler.getRules("list"),y=e.parentType;for(e.parentType="list";u<n;){i=m,s=e.eMarks[u];let C=e.sCount[u]+m-(e.bMarks[u]+e.tShift[u]),x=C;for(;i<s;){let G=e.src.charCodeAt(i);if(G===9)x+=4-(x+e.bsCount[u])%4;else if(G===32)x++;else break;i++}let S=i,A;S>=s?A=1:A=x-C,A>4&&(A=1);let M=C+A;o=e.push("list_item_open","li",1),o.markup=String.fromCharCode(p);let I=[u,0];o.map=I,h&&(o.info=e.src.slice(a,m-1));let B=e.tight,F=e.tShift[u],V=e.sCount[u],ce=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[u]=S-e.bMarks[u],e.sCount[u]=x,S>=s&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||_)&&(c=!1),_=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ce,e.tShift[u]=F,e.sCount[u]=V,e.tight=B,o=e.push("list_item_close","li",-1),o.markup=String.fromCharCode(p),u=e.line,I[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let se=!1;for(let G=0,ee=b.length;G<ee;G++)if(b[G](e,u,n,!0)){se=!0;break}if(se)break;if(h){if(m=Di(e,u),m<0)break;a=e.bMarks[u]+e.tShift[u]}else if(m=Ii(e,u),m<0)break;if(p!==e.src.charCodeAt(m-1))break}return h?o=e.push("ordered_list_close","ol",-1):o=e.push("bullet_list_close","ul",-1),o.markup=String.fromCharCode(p),v[1]=u,e.line=u,e.parentType=y,c&&zu(e,g),!0}function wr(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(s)!==91)return!1;function o(b){let y=e.lineMax;if(b>=y||e.isEmpty(b))return null;let C=!1;if(e.sCount[b]-e.blkIndent>3&&(C=!0),e.sCount[b]<0&&(C=!0),!C){let A=e.md.block.ruler.getRules("reference"),M=e.parentType;e.parentType="reference";let I=!1;for(let B=0,F=A.length;B<F;B++)if(A[B](e,b,y,!0)){I=!0;break}if(e.parentType=M,I)return null}let x=e.bMarks[b]+e.tShift[b],S=e.eMarks[b];return e.src.slice(x,S+1)}let u=e.src.slice(s,i+1);i=u.length;let c=-1;for(s=1;s<i;s++){let b=u.charCodeAt(s);if(b===91)return!1;if(b===93){c=s;break}else if(b===10){let y=o(a);y!==null&&(u+=y,i=u.length,a++)}else if(b===92&&(s++,s<i&&u.charCodeAt(s)===10)){let y=o(a);y!==null&&(u+=y,i=u.length,a++)}}if(c<0||u.charCodeAt(c+1)!==58)return!1;for(s=c+2;s<i;s++){let b=u.charCodeAt(s);if(b===10){let y=o(a);y!==null&&(u+=y,i=u.length,a++)}else if(!L(b))break}let d=e.md.helpers.parseLinkDestination(u,s,i);if(!d.ok)return!1;let h=e.md.normalizeLink(d.str);if(!e.md.validateLink(h))return!1;s=d.pos;let f=s,m=a,p=s;for(;s<i;s++){let b=u.charCodeAt(s);if(b===10){let y=o(a);y!==null&&(u+=y,i=u.length,a++)}else if(!L(b))break}let g=e.md.helpers.parseLinkTitle(u,s,i);for(;g.can_continue;){let b=o(a);if(b===null)break;u+=b,s=i,i=u.length,a++,g=e.md.helpers.parseLinkTitle(u,s,i,g)}let v;for(s<i&&p!==s&&g.ok?(v=g.str,s=g.pos):(v="",s=f,a=m);s<i;){let b=u.charCodeAt(s);if(!L(b))break;s++}if(s<i&&u.charCodeAt(s)!==10&&v)for(v="",s=f,a=m;s<i;){let b=u.charCodeAt(s);if(!L(b))break;s++}if(s<i&&u.charCodeAt(s)!==10)return!1;let _=Ye(u.slice(1,c));return _?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[_]>"u"&&(e.env.references[_]={title:v,href:h}),e.line=a),!0):!1}var Mi=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"];var $u="[a-zA-Z_:][a-zA-Z0-9:._-]*",Hu="[^\"'=<>`\\x00-\\x20]+",ju="'[^']*'",Uu='"[^"]*"',Vu="(?:"+Hu+"|"+ju+"|"+Uu+")",Wu="(?:\\s+"+$u+"(?:\\s*=\\s*"+Vu+")?)",Fi="<[A-Za-z][A-Za-z0-9\\-]*"+Wu+"*\\s*\\/?>",Ri="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ku="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Gu="<[?][\\s\\S]*?[?]>",Ju="<![A-Za-z][^>]*>",Zu="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Li=new RegExp("^(?:"+Fi+"|"+Ri+"|"+Ku+"|"+Gu+"|"+Ju+"|"+Zu+")"),Pi=new RegExp("^(?:"+Fi+"|"+Ri+")");var tt=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Mi.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Pi.source+"\\s*$"),/^$/,!1]];function Cr(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(s)!==60)return!1;let a=e.src.slice(s,i),o=0;for(;o<tt.length&&!tt[o][0].test(a);o++);if(o===tt.length)return!1;if(r)return tt[o][2];let u=t+1,c=tt[o][1].test("");if(!tt[o][1].test(a)){for(;u<n&&!(e.sCount[u]<e.blkIndent&&(c||!e.isEmpty(u)));u++)if(s=e.bMarks[u]+e.tShift[u],i=e.eMarks[u],a=e.src.slice(s,i),tt[o][1].test(a)){a.length!==0&&u++;break}}e.line=u;let d=e.push("html_block","",0);return d.map=[t,u],d.content=e.getLines(t,u,e.blkIndent,!0),!0}function Sr(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(s);if(a!==35||s>=i)return!1;let o=1;for(a=e.src.charCodeAt(++s);a===35&&s<i&&o<=6;)o++,a=e.src.charCodeAt(++s);if(o>6||s<i&&!L(a))return!1;if(r)return!0;i=e.skipSpacesBack(i,s);let u=e.skipCharsBack(i,35,s);u>s&&L(e.src.charCodeAt(u-1))&&(i=u),e.line=t+1;let c=e.push("heading_open","h"+String(o),1);c.markup="########".slice(0,o),c.map=[t,e.line];let d=e.push("inline","",0);d.content=Qe(e.src.slice(s,i)),d.map=[t,e.line],d.children=[];let h=e.push("heading_close","h"+String(o),-1);return h.markup="########".slice(0,o),!0}function Ar(e,t,n){let r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.parentType;e.parentType="paragraph";let i=0,a,o=t+1;for(;o<n&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3)continue;if(e.sCount[o]>=e.blkIndent){let m=e.bMarks[o]+e.tShift[o],p=e.eMarks[o];if(m<p&&(a=e.src.charCodeAt(m),(a===45||a===61)&&(m=e.skipChars(m,a),m=e.skipSpaces(m),m>=p))){i=a===61?1:2;break}}if(e.sCount[o]<0)continue;let f=!1;for(let m=0,p=r.length;m<p;m++)if(r[m](e,o,n,!0)){f=!0;break}if(f)break}if(!i)return e.parentType=s,!1;let u=Qe(e.getLines(t,o,e.blkIndent,!1));e.line=o+1;let c=e.push("heading_open","h"+String(i),1);c.markup=String.fromCharCode(a),c.map=[t,e.line];let d=e.push("inline","",0);d.content=u,d.map=[t,e.line-1],d.children=[];let h=e.push("heading_close","h"+String(i),-1);return h.markup=String.fromCharCode(a),e.parentType=s,!0}function Nr(e,t,n){let r=e.md.block.ruler.getRules("paragraph"),s=e.parentType,i=t+1;for(e.parentType="paragraph";i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3||e.sCount[i]<0)continue;let c=!1;for(let d=0,h=r.length;d<h;d++)if(r[d](e,i,n,!0)){c=!0;break}if(c)break}let a=Qe(e.getLines(t,i,e.blkIndent,!1));e.line=i;let o=e.push("paragraph_open","p",1);o.map=[t,e.line];let u=e.push("inline","",0);return u.content=a,u.map=[t,e.line],u.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}var _n=[["table",br,["paragraph","reference"]],["code",yr],["fence",vr,["paragraph","reference","blockquote","list"]],["blockquote",_r,["paragraph","reference","blockquote","list"]],["hr",xr,["paragraph","reference","blockquote","list"]],["list",kr,["paragraph","reference","blockquote"]],["reference",wr],["html_block",Cr,["paragraph","reference","blockquote"]],["heading",Sr,["paragraph","reference","blockquote"]],["lheading",Ar],["paragraph",Nr]];function xn(){this.ruler=new et;for(let e=0;e<_n.length;e++)this.ruler.push(_n[e][0],_n[e][1],{alt:(_n[e][2]||[]).slice()})}xn.prototype.tokenize=function(e,t,n){let r=this.ruler.getRules(""),s=r.length,i=e.md.options.maxNesting,a=t,o=!1;for(;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n||e.sCount[a]<e.blkIndent));){if(e.level>=i){e.line=n;break}let u=e.line,c=!1;for(let d=0;d<s;d++)if(c=r[d](e,a,n,!1),c){if(u>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!o,e.isEmpty(e.line-1)&&(o=!0),a=e.line,a<n&&e.isEmpty(a)&&(o=!0,a++,e.line=a)}};xn.prototype.parse=function(e,t,n,r){if(!e)return;let s=new this.State(e,t,n,r);this.tokenize(s,s.line,s.lineMax)};xn.prototype.State=Ei;var Oi=xn;function Ft(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Ft.prototype.pushPending=function(){let e=new Pe("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};Ft.prototype.push=function(e,t,n){this.pending&&this.pushPending();let r=new Pe(e,t,n),s=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(s),r};Ft.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),s;if(e===0)s=32;else if(e===1)s=this.src.charCodeAt(0),(s&63488)===55296&&(s=65533);else if(s=this.src.charCodeAt(e-1),(s&64512)===56320){let v=this.src.charCodeAt(e-2);s=(v&64512)===55296?65536+(v-55296<<10)+(s-56320):65533}else(s&64512)===55296&&(s=65533);let i=e;for(;i<n&&this.src.charCodeAt(i)===r;)i++;let a=i-e,o=i<n?this.src.charCodeAt(i):32;if((o&64512)===55296){let v=this.src.charCodeAt(i+1);o=(v&64512)===56320?65536+(o-55296<<10)+(v-56320):65533}else(o&64512)===56320&&(o=65533);let u=Xe(s)||Ze(s),c=Xe(o)||Ze(o),d=Je(s),h=Je(o),f=!h&&(!c||d||u),m=!d&&(!u||h||c);return{can_open:f&&(t||!m||u),can_close:m&&(t||!f||c),length:a}};Ft.prototype.Token=Pe;var qi=Ft;function Xu(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Er(e,t){let n=e.pos;for(;n<e.posMax&&!Xu(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}function Yu(e){return e>=65&&e<=90||e>=97&&e<=122}function Qu(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===45||e===46}function Tr(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let s=n-Math.min(10,e.pending.length,n),i=n;for(;i>s&&Qu(e.src.charCodeAt(i-1));)i--;if(i===n||!Yu(e.src.charCodeAt(i)))return!1;let a=n-i,o=e.md.linkify.matchAtStart(e.src.slice(i));if(!o)return!1;let u=o.url;if(u.length<=a)return!1;let c=u.length;for(;c>0&&u.charCodeAt(c-1)===42;)c--;c!==u.length&&(u=u.slice(0,c));let d=e.md.normalizeLink(u);if(!e.md.validateLink(d))return!1;if(!t){e.pending=e.pending.slice(0,-a);let h=e.push("link_open","a",1);h.attrs=[["href",d]],h.markup="linkify",h.info="auto";let f=e.push("text","",0);f.content=e.md.normalizeLinkText(u);let m=e.push("link_close","a",-1);m.markup="linkify",m.info="auto"}return e.pos+=u.length-a,!0}function Ir(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,s=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<s&&L(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var Dr=[];for(let e=0;e<256;e++)Dr.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Dr[e.charCodeAt(0)]=1});function Mr(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let s=e.src.charCodeAt(n);if(s===10){for(t||e.push("hardbreak","br",0),n++;n<r&&(s=e.src.charCodeAt(n),!!L(s));)n++;return e.pos=n,!0}if(s===32){if(!t){let o=e.push("text_special","",0);o.content="\\",o.markup="\\",o.info="escape"}return e.pos=n,!0}let i=e.src[n];if(s>=55296&&s<=56319&&n+1<r){let o=e.src.charCodeAt(n+1);o>=56320&&o<=57343&&(i+=e.src[n+1],n++)}let a="\\"+i;if(!t){let o=e.push("text_special","",0);s<256&&Dr[s]!==0?o.content=i:o.content=a,o.markup=a,o.info="escape"}return e.pos=n+1,!0}function Fr(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let s=n;n++;let i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;let a=e.src.slice(s,n),o=a.length;if(e.backticksScanned&&(e.backticks[o]||0)<=s)return t||(e.pending+=a),e.pos+=o,!0;let u=n,c;for(;(c=e.src.indexOf("`",u))!==-1;){for(u=c+1;u<i&&e.src.charCodeAt(u)===96;)u++;let d=u-c;if(d===o){if(!t){let h=e.push("code_inline","code",0);h.markup=a,h.content=e.src.slice(n,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=u,!0}e.backticks[d]=c}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=o,!0}function ec(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;let s=e.scanDelims(e.pos,!0),i=s.length,a=String.fromCharCode(r);if(i<2)return!1;let o;i%2&&(o=e.push("text","",0),o.content=a,i--);for(let u=0;u<i;u+=2)o=e.push("text","",0),o.content=a+a,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0}function Bi(e,t){let n,r=[],s=t.length;for(let i=0;i<s;i++){let a=t[i];if(a.marker!==126||a.end===-1)continue;let o=t[a.end];n=e.tokens[a.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[o.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[o.token-1].type==="text"&&e.tokens[o.token-1].content==="~"&&r.push(o.token-1)}for(;r.length;){let i=r.pop(),a=i+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,i!==a&&(n=e.tokens[a],e.tokens[a]=e.tokens[i],e.tokens[i]=n)}}function tc(e){let t=e.tokens_meta,n=e.tokens_meta.length;Bi(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Bi(e,t[r].delimiters)}var Rr={tokenize:ec,postProcess:tc};function nc(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;let s=e.scanDelims(e.pos,r===42);for(let i=0;i<s.length;i++){let a=e.push("text","",0);a.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:s.length,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close})}return e.pos+=s.length,!0}function zi(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let s=t[r];if(s.marker!==95&&s.marker!==42||s.end===-1)continue;let i=t[s.end],a=r>0&&t[r-1].end===s.end+1&&t[r-1].marker===s.marker&&t[r-1].token===s.token-1&&t[s.end+1].token===i.token+1,o=String.fromCharCode(s.marker),u=e.tokens[s.token];u.type=a?"strong_open":"em_open",u.tag=a?"strong":"em",u.nesting=1,u.markup=a?o+o:o,u.content="";let c=e.tokens[i.token];c.type=a?"strong_close":"em_close",c.tag=a?"strong":"em",c.nesting=-1,c.markup=a?o+o:o,c.content="",a&&(e.tokens[t[r-1].token].content="",e.tokens[t[s.end+1].token].content="",r--)}}function rc(e){let t=e.tokens_meta,n=e.tokens_meta.length;zi(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&zi(e,t[r].delimiters)}var Lr={tokenize:nc,postProcess:rc};function Pr(e,t){let n,r,s,i,a="",o="",u=e.pos,c=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let d=e.pos,h=e.posMax,f=e.pos+1,m=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(m<0)return!1;let p=m+1;if(p<h&&e.src.charCodeAt(p)===40){for(c=!1,p++;p<h&&(n=e.src.charCodeAt(p),!(!L(n)&&n!==10));p++);if(p>=h)return!1;if(u=p,s=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),s.ok){for(a=e.md.normalizeLink(s.str),e.md.validateLink(a)?p=s.pos:a="",u=p;p<h&&(n=e.src.charCodeAt(p),!(!L(n)&&n!==10));p++);if(s=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<h&&u!==p&&s.ok)for(o=s.str,p=s.pos;p<h&&(n=e.src.charCodeAt(p),!(!L(n)&&n!==10));p++);}(p>=h||e.src.charCodeAt(p)!==41)&&(c=!0),p++}if(c){if(typeof e.env.references>"u")return!1;if(p<h&&e.src.charCodeAt(p)===91?(u=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?r=e.src.slice(u,p++):p=m+1):p=m+1,r||(r=e.src.slice(f,m)),i=e.env.references[Ye(r)],!i)return e.pos=d,!1;a=i.href,o=i.title}if(!t){e.pos=f,e.posMax=m;let g=e.push("link_open","a",1),v=[["href",a]];g.attrs=v,o&&v.push(["title",o]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=h,!0}function Or(e,t){let n,r,s,i,a,o,u,c,d="",h=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let m=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(i=p+1,i<f&&e.src.charCodeAt(i)===40){for(i++;i<f&&(n=e.src.charCodeAt(i),!(!L(n)&&n!==10));i++);if(i>=f)return!1;for(c=i,o=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),o.ok&&(d=e.md.normalizeLink(o.str),e.md.validateLink(d)?i=o.pos:d=""),c=i;i<f&&(n=e.src.charCodeAt(i),!(!L(n)&&n!==10));i++);if(o=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<f&&c!==i&&o.ok)for(u=o.str,i=o.pos;i<f&&(n=e.src.charCodeAt(i),!(!L(n)&&n!==10));i++);else u="";if(i>=f||e.src.charCodeAt(i)!==41)return e.pos=h,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<f&&e.src.charCodeAt(i)===91?(c=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?s=e.src.slice(c,i++):i=p+1):i=p+1,s||(s=e.src.slice(m,p)),a=e.env.references[Ye(s)],!a)return e.pos=h,!1;d=a.href,u=a.title}if(!t){r=e.src.slice(m,p);let g=[];e.md.inline.parse(r,e.md,e.env,g);let v=e.push("image","img",0),_=[["src",d],["alt",""]];v.attrs=_,v.children=g,v.content=r,u&&_.push(["title",u])}return e.pos=i,e.posMax=f,!0}var sc=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,ic=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function qr(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,s=e.posMax;for(;;){if(++n>=s)return!1;let a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}let i=e.src.slice(r+1,n);if(ic.test(i)){let a=e.md.normalizeLink(i);if(!e.md.validateLink(a))return!1;if(!t){let o=e.push("link_open","a",1);o.attrs=[["href",a]],o.markup="autolink",o.info="auto";let u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);let c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}if(sc.test(i)){let a=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(a))return!1;if(!t){let o=e.push("link_open","a",1);o.attrs=[["href",a]],o.markup="autolink",o.info="auto";let u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);let c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}return!1}function ac(e){return/^<a[>\s]/i.test(e)}function oc(e){return/^<\/a\s*>/i.test(e)}function uc(e){let t=e|32;return t>=97&&t<=122}function Br(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let s=e.src.charCodeAt(r+1);if(s!==33&&s!==63&&s!==47&&!uc(s))return!1;let i=e.src.slice(r).match(Li);if(!i)return!1;if(!t){let a=e.push("html_inline","",0);a.content=i[0],ac(a.content)&&e.linkLevel++,oc(a.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}var cc=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,lc=/^&([a-z][a-z0-9]{1,31});/i;function zr(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let i=e.src.slice(n).match(cc);if(i){if(!t){let a=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),o=e.push("text_special","",0);o.content=yn(a)?mt(a):mt(65533),o.markup=i[0],o.info="entity"}return e.pos+=i[0].length,!0}}else{let i=e.src.slice(n).match(lc);if(i){let a=Mt(i[0]);if(a!==i[0]){if(!t){let o=e.push("text_special","",0);o.content=a,o.markup=i[0],o.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function $i(e){let t={},n=e.length;if(!n)return;let r=0,s=-2,i=[];for(let a=0;a<n;a++){let o=e[a];if(i.push(0),(e[r].marker!==o.marker||s!==o.token-1)&&(r=a),s=o.token,o.length=o.length||0,!o.close)continue;t.hasOwnProperty(o.marker)||(t[o.marker]=[-1,-1,-1,-1,-1,-1]);let u=t[o.marker][(o.open?3:0)+o.length%3],c=r-i[r]-1,d=c;for(;c>u;c-=i[c]+1){let h=e[c];if(h.marker===o.marker&&h.open&&h.end<0){let f=!1;if((h.close||o.open)&&(h.length+o.length)%3===0&&(h.length%3!==0||o.length%3!==0)&&(f=!0),!f){let m=c>0&&!e[c-1].open?i[c-1]+1:0;i[a]=a-c+m,i[c]=m,o.open=!1,h.end=a,h.close=!1,d=-1,s=-2;break}}}d!==-1&&(t[o.marker][(o.open?3:0)+(o.length||0)%3]=d)}}function $r(e){let t=e.tokens_meta,n=e.tokens_meta.length;$i(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&$i(t[r].delimiters)}function Hr(e){let t,n,r=0,s=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++)s[t].nesting<0&&r--,s[t].level=r,s[t].nesting>0&&r++,s[t].type==="text"&&t+1<i&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}var jr=[["text",Er],["linkify",Tr],["newline",Ir],["escape",Mr],["backticks",Fr],["strikethrough",Rr.tokenize],["emphasis",Lr.tokenize],["link",Pr],["image",Or],["autolink",qr],["html_inline",Br],["entity",zr]],Ur=[["balance_pairs",$r],["strikethrough",Rr.postProcess],["emphasis",Lr.postProcess],["fragments_join",Hr]];function Rt(){this.ruler=new et;for(let e=0;e<jr.length;e++)this.ruler.push(jr[e][0],jr[e][1]);this.ruler2=new et;for(let e=0;e<Ur.length;e++)this.ruler2.push(Ur[e][0],Ur[e][1])}Rt.prototype.skipToken=function(e){let t=e.pos,n=this.ruler.getRules(""),r=n.length,s=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let a=!1;if(e.level<s){for(let o=0;o<r;o++)if(e.level++,a=n[o](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,i[t]=e.pos};Rt.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,r=e.posMax,s=e.md.options.maxNesting;for(;e.pos<r;){let i=e.pos,a=!1;if(e.level<s){for(let o=0;o<n;o++)if(a=t[o](e,!1),a){if(i>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Rt.prototype.parse=function(e,t,n,r){let s=new this.State(e,t,n,r);this.tokenize(s);let i=this.ruler2.getRules(""),a=i.length;for(let o=0;o<a;o++)i[o](s)};Rt.prototype.State=qi;var Hi=Rt;function ji(e){let t={};e=e||{},t.src_Any=dn.source,t.src_Cc=fn.source,t.src_Z=pn.source,t.src_P=ft.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");let n="[><\uFF5C]";return t.src_pseudo_letter=`(?:(?!${n}|${t.src_ZPCc})${t.src_Any})`,t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth=`(?:(?:(?!${t.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator=`(?=$|${n}|${t.src_ZPCc})(?!${e["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${t.src_ZPCc}))`,t.src_path=`(?:[/?#](?:(?!${t.src_ZCc}|${n}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${t.src_ZCc}|\\]).)*\\]|\\((?:(?!${t.src_ZCc}|[)]).)*\\)|\\{(?:(?!${t.src_ZCc}|[}]).)*\\}|\\"(?:(?!${t.src_ZCc}|["]).)+\\"|\\'(?:(?!${t.src_ZCc}|[']).)+\\'|\\'(?=${t.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${t.src_ZCc}|[.]|$)|`+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${t.src_ZCc}|$)|;(?!${t.src_ZCc}|$)|\\!+(?!${t.src_ZCc}|[!]|$)|\\?(?!${t.src_ZCc}|[?]|$))+|\\/)?`,t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+`|${t.src_pseudo_letter}{1,63})`,t.src_domain="(?:"+t.src_xn+`|(?:${t.src_pseudo_letter})|(?:${t.src_pseudo_letter}(?:-|${t.src_pseudo_letter}){0,61}${t.src_pseudo_letter}))`,t.src_host=`(?:(?:(?:(?:${t.src_domain})\\.)*${t.src_domain}))`,t.tpl_host_fuzzy="(?:"+t.src_ip4+`|(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${t.src_ZPCc}|>|$))`,t.tpl_email_fuzzy=`(^|${n}|"|\\(|${t.src_ZCc})(${t.src_email_name}@${t.tpl_host_fuzzy_strict})`,t.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uFF5C]|${t.src_ZPCc}))((?![$+<=>^\`|\uFF5C])${t.tpl_host_port_fuzzy_strict}${t.src_path})`,t.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uFF5C]|${t.src_ZPCc}))((?![$+<=>^\`|\uFF5C])${t.tpl_host_port_no_ip_fuzzy_strict}${t.src_path})`,t}function Vr(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function wn(e){return Object.prototype.toString.call(e)}function dc(e){return wn(e)==="[object String]"}function fc(e){return wn(e)==="[object Object]"}function hc(e){return wn(e)==="[object RegExp]"}function Ui(e){return wn(e)==="[object Function]"}function pc(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var Wi={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function mc(e){return Object.keys(e||{}).reduce(function(t,n){return t||Wi.hasOwnProperty(n)},!1)}var gc={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=new RegExp(`^\\/\\/${n.re.src_auth}${n.re.src_host_port_strict}${n.re.src_path}`,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+`(?:localhost|(?:(?:${n.re.src_domain})\\.)+${n.re.src_domain_root})`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp(`^${n.re.src_email_name}@${n.re.src_host_strict}`,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},bc="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",yc="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function vc(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function Vi(){return function(e,t){t.normalize(e)}}function kn(e){let t=e.re=ji(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(bc),n.push(t.src_xn),t.src_tlds=n.join("|");function r(o){return o.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(r(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(r(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(r(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");let s=[];e.__compiled__={};function i(o,u){throw new Error(`(LinkifyIt) Invalid schema "${o}": ${u}`)}Object.keys(e.__schemas__).forEach(function(o){let u=e.__schemas__[o];if(u===null)return;let c={validate:null,link:null};if(e.__compiled__[o]=c,fc(u)){hc(u.validate)?c.validate=vc(u.validate):Ui(u.validate)?c.validate=u.validate:i(o,u),Ui(u.normalize)?c.normalize=u.normalize:u.normalize?i(o,u):c.normalize=Vi();return}if(dc(u)){s.push(o);return}i(o,u)}),s.forEach(function(o){e.__compiled__[e.__schemas__[o]]&&(e.__compiled__[o].validate=e.__compiled__[e.__schemas__[o]].validate,e.__compiled__[o].normalize=e.__compiled__[e.__schemas__[o]].normalize)}),e.__compiled__[""]={validate:null,normalize:Vi()};let a=Object.keys(e.__compiled__).filter(function(o){return o.length>0&&e.__compiled__[o]}).map(pc).join("|");e.re.schema_test=RegExp(`(^|(?!_)(?:[><\uFF5C]|${t.src_ZPCc}))(${a})`,"i"),e.re.schema_search=RegExp(`(^|(?!_)(?:[><\uFF5C]|${t.src_ZPCc}))(${a})`,"ig"),e.re.schema_at_start=RegExp(`^${e.re.schema_search.source}`,"i"),e.re.pretest=RegExp(`(${e.re.schema_test.source})|(${e.re.host_fuzzy_test.source})|@`,"i")}function Ki(e,t,n,r){let s=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=s,this.text=s,this.url=s}function ye(e,t){if(!(this instanceof ye))return new ye(e,t);t||mc(e)&&(t=e,e={}),this.__opts__=Vr({},Wi,t),this.__schemas__=Vr({},gc,e),this.__compiled__={},this.__tlds__=yc,this.__tlds_replaced__=!1,this.re={},kn(this)}ye.prototype.add=function(t,n){return this.__schemas__[t]=n,kn(this),this};ye.prototype.set=function(t){return this.__opts__=Vr(this.__opts__,t),this};ye.prototype.test=function(t){if(!t.length)return!1;let n,r;if(this.re.schema_test.test(t)){for(r=this.re.schema_search,r.lastIndex=0;(n=r.exec(t))!==null;)if(this.testSchemaAt(t,n[2],r.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};ye.prototype.pretest=function(t){return this.re.pretest.test(t)};ye.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};ye.prototype.match=function(t){let n=[],r=[],s=[],i=[],a,o,u;function c(f,m){return f?m?f.index!==m.index?f.index<m.index?f:m:f.lastIndex>=m.lastIndex?f:m:f:m}if(!t.length)return null;if(this.re.schema_test.test(t))for(u=this.re.schema_search,u.lastIndex=0;(a=u.exec(t))!==null;)o=this.testSchemaAt(t,a[2],u.lastIndex),o&&r.push({schema:a[2],index:a.index+a[1].length,lastIndex:a.index+a[0].length+o});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(u=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,u.lastIndex=0;(a=u.exec(t))!==null;)s.push({schema:"",index:a.index+a[1].length,lastIndex:a.index+a[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(u=this.re.email_fuzzy_global,u.lastIndex=0;(a=u.exec(t))!==null;)i.push({schema:"mailto:",index:a.index+a[1].length,lastIndex:a.index+a[0].length});let d=[0,0,0],h=0;for(;;){let f=[r[d[0]],i[d[1]],s[d[2]]],m=c(c(f[0],f[1]),f[2]);if(!m)break;if(m===f[0]?d[0]++:m===f[1]?d[1]++:d[2]++,m.index<h)continue;let p=new Ki(t,m.schema,m.index,m.lastIndex);this.__compiled__[p.schema].normalize(p,this),n.push(p),h=m.lastIndex}return n.length?n:null};ye.prototype.matchAtStart=function(t){if(!t.length)return null;let n=this.re.schema_at_start.exec(t);if(!n)return null;let r=this.testSchemaAt(t,n[2],n[0].length);if(!r)return null;let s=new Ki(t,n[2],n.index+n[1].length,n.index+n[0].length+r);return this.__compiled__[s.schema].normalize(s,this),s};ye.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,s,i){return r!==i[s-1]}).reverse(),kn(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,kn(this),this)};ye.prototype.normalize=function(t){t.schema||(t.url=`http://${t.url}`),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url=`mailto:${t.url}`)};ye.prototype.onCompile=function(){};var Gi=ye;var _c=/^xn--/,xc=/[^\0-\x7F]/,kc=/[\x2E\u3002\uFF0E\uFF61]/g,wc={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Wr=35,Me=Math.floor,Kr=String.fromCharCode;function je(e){throw new RangeError(wc[e])}function Cc(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Zi(e,t){let n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(kc,".");let s=e.split("."),i=Cc(s,t).join(".");return r+i}function Xi(e){let t=[],n=0,r=e.length;for(;n<r;){let s=e.charCodeAt(n++);if(s>=55296&&s<=56319&&n<r){let i=e.charCodeAt(n++);(i&64512)==56320?t.push(((s&1023)<<10)+(i&1023)+65536):(t.push(s),n--)}else t.push(s)}return t}var Sc=e=>String.fromCodePoint(...e),Ac=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},Ji=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Yi=function(e,t,n){let r=0;for(e=n?Me(e/700):e>>1,e+=Me(e/t);e>Wr*26>>1;r+=36)e=Me(e/Wr);return Me(r+(Wr+1)*e/(e+38))},Qi=function(e){let t=[],n=e.length,r=0,s=128,i=72,a=e.lastIndexOf("-");a<0&&(a=0);for(let o=0;o<a;++o)e.charCodeAt(o)>=128&&je("not-basic"),t.push(e.charCodeAt(o));for(let o=a>0?a+1:0;o<n;){let u=r;for(let d=1,h=36;;h+=36){o>=n&&je("invalid-input");let f=Ac(e.charCodeAt(o++));f>=36&&je("invalid-input"),f>Me((2147483647-r)/d)&&je("overflow"),r+=f*d;let m=h<=i?1:h>=i+26?26:h-i;if(f<m)break;let p=36-m;d>Me(2147483647/p)&&je("overflow"),d*=p}let c=t.length+1;i=Yi(r-u,c,u==0),Me(r/c)>2147483647-s&&je("overflow"),s+=Me(r/c),r%=c,t.splice(r++,0,s)}return String.fromCodePoint(...t)},ea=function(e){let t=[];e=Xi(e);let n=e.length,r=128,s=0,i=72;for(let u of e)u<128&&t.push(Kr(u));let a=t.length,o=a;for(a&&t.push("-");o<n;){let u=2147483647;for(let d of e)d>=r&&d<u&&(u=d);let c=o+1;u-r>Me((2147483647-s)/c)&&je("overflow"),s+=(u-r)*c,r=u;for(let d of e)if(d<r&&++s>2147483647&&je("overflow"),d===r){let h=s;for(let f=36;;f+=36){let m=f<=i?1:f>=i+26?26:f-i;if(h<m)break;let p=h-m,g=36-m;t.push(Kr(Ji(m+p%g,0))),h=Me(p/g)}t.push(Kr(Ji(h,0))),i=Yi(s,c,o===a),s=0,++o}++s,++r}return t.join("")},Nc=function(e){return Zi(e,function(t){return _c.test(t)?Qi(t.slice(4).toLowerCase()):t})},Ec=function(e){return Zi(e,function(t){return xc.test(t)?"xn--"+ea(t):t})},Tc={version:"2.3.1",ucs2:{decode:Xi,encode:Sc},decode:Qi,encode:ea,toASCII:Ec,toUnicode:Nc};var Gr=Tc;var ta={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}};var na={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}};var ra={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}};var Ic={default:ta,zero:na,commonmark:ra},Dc=/^(vbscript|javascript|file|data):/,Mc=/^data:image\/(gif|png|jpeg|webp);/;function Fc(e){let t=e.trim().toLowerCase();return Dc.test(t)?Mc.test(t):!0}var sa=["http:","https:","mailto:"];function Rc(e){let t=Dt(e,!0);if(t.hostname&&(!t.protocol||sa.indexOf(t.protocol)>=0))try{t.hostname=Gr.toASCII(t.hostname)}catch{}return un(dt(t))}function Lc(e){let t=Dt(e,!0);if(t.hostname&&(!t.protocol||sa.indexOf(t.protocol)>=0))try{t.hostname=Gr.toUnicode(t.hostname)}catch{}return It(dt(t),It.defaultChars+"%")}function xe(e,t){if(!(this instanceof xe))return new xe(e,t);t||bn(e)||(t=e||{},e="default"),this.inline=new Hi,this.block=new Oi,this.core=new Ni,this.renderer=new xi,this.linkify=new Gi,this.validateLink=Fc,this.normalizeLink=Rc,this.normalizeLinkText=Lc,this.utils=nr,this.helpers=pt({},ar),this.options={},this.configure(e),t&&this.set(t)}xe.prototype.set=function(e){return pt(this.options,e),this};xe.prototype.configure=function(e){let t=this;if(bn(e)){let n=e;if(e=Ic[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};xe.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(s){n=n.concat(this[s].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(s){return n.indexOf(s)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};xe.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(s){n=n.concat(this[s].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(s){return n.indexOf(s)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};xe.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};xe.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};xe.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};xe.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};xe.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Jr=xe;var ve=new Jr({html:!1,linkify:!0,breaks:!1}),Pc='<rect x="5" y="5" width="8" height="8" rx="1.5"></rect><path d="M3 10.5V4.25C3 3.56 3.56 3 4.25 3h6.25"></path>';function yt(e,t){return ve.utils.escapeHtml(E(e?.classNames,t))}function ca(e,t,n){let r=e.level===0?E(t?.classNames,"markdown-block"):"";return[n?E(t?.classNames,n):"",r].filter(Boolean).join(" ")}function Oc(e,t){let n=e.trim().split(/\s+/,1)[0]?.toLocaleLowerCase()??"";return n?t[`language:${n}`]??n.toLocaleUpperCase():t.codeLanguage}function qc(e,t,n,r,s,i){let a=s?.labels??Z,o=ve.utils.escapeHtml,u=Oc(t[n]?.info??"",a),c=o(u),d=o(a.copyCode),h=e(t,n,r,s,i).replace(/^<pre><code(?: class="([^"]*)")?/,(p,g)=>`<pre class="${yt(s,"markdown-pre")}" tabindex="0" role="region" aria-label="${o(U(a.codeRegion,{language:u}))}"><code class="${yt(s,"markdown-pre-code")}${g?` ${g}`:""}"`),f=ve.utils.escapeHtml(ca(t[n],s,"code-block")),m=`<svg class="${yt(s,"code-copy-icon")}" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${Pc}</svg>`;return`<div class="${f}"><div class="${yt(s,"code-head")}"><span class="${yt(s,"code-label")}">${c}</span><button class="${yt(s,"code-copy")}" type="button" aria-label="${d}" title="${d}">${m}<span>${o(a.copy)}</span></button></div>${h}</div>`}for(let e of["fence","code_block"]){let t=ve.renderer.rules[e];ve.renderer.rules[e]=(n,r,s,i,a)=>qc(t,n,r,s,i,a)}var Bc={paragraph_open:()=>"markdown-p",heading_open:e=>["h1","h2","h3"].includes(e.tag)?`markdown-${e.tag}`:"",bullet_list_open:()=>"markdown-list",ordered_list_open:()=>"markdown-list",blockquote_open:()=>"markdown-blockquote",table_open:()=>"markdown-table",hr:()=>""};for(let[e,t]of Object.entries(Bc)){let n=ve.renderer.rules[e];ve.renderer.rules[e]=(r,s,i,a,o)=>{let u=r[s],c=ca(u,a,t(u));return c&&u.attrJoin("class",c),n?n(r,s,i,a,o):o.renderToken(r,s,i)}}for(let e of["th_open","td_open"])ve.renderer.rules[e]=(t,n,r,s,i)=>(t[n].attrJoin("class",E(s?.classNames,"markdown-cell")),i.renderToken(t,n,r));var zc=ve.renderer.rules.code_inline;ve.renderer.rules.code_inline=(e,t,n,r,s)=>(e[t].attrJoin("class",E(r?.classNames,"markdown-code")),zc(e,t,n,r,s));var ia=ve.renderer.rules.link_open;ve.renderer.rules.link_open=(e,t,n,r,s)=>(e[t]?.attrSet("target","_blank"),e[t]?.attrSet("rel","noreferrer noopener"),e[t]?.attrJoin("class",E(r?.classNames,"markdown-link")),ia?ia(e,t,n,r,s):s.renderToken(e,t,n));function Zr(e,t,n){let r={idle:[n.copyCode,n.copy],copied:[n.codeCopied,n.copied],failed:[n.copyFailed,n.retry]},[s,i]=r[t];e.dataset.status=t,e.setAttribute("aria-label",s),e.setAttribute("title",s);let a=e.querySelector("span");a&&(a.textContent=i)}function vt({value:e,copyText:t,className:n,style:r,classNames:s,labels:i}){let a=D(s),[o]=Q(Z,i),u=de(()=>ve.render(e,{classNames:a,labels:o}),[e,a,o]),c=de(()=>({__html:u}),[u]),d=W(new Map);K(()=>()=>{for(let f of d.current.values())clearTimeout(f);d.current.clear()},[]);let h=async f=>{let m=f.target.closest?.(".scui-code-copy");if(!m||!f.currentTarget.contains(m)||!t)return;let p=m.closest(".scui-code-block")?.querySelector("pre code");if(!p)return;m.disabled=!0;try{await t(p.textContent??""),Zr(m,"copied",o)}catch{Zr(m,"failed",o)}finally{m.disabled=!1}clearTimeout(d.current.get(m));let g=setTimeout(()=>{m.isConnected&&Zr(m,"idle",o),d.current.delete(m)},1500);d.current.set(m,g)};return l("div",{className:E(a,"markdown",n),style:r,"data-copyable":!!t,onClick:h,dangerouslySetInnerHTML:c})}function Y(e){let[t,n]=Q(Z,e);return{t,host:n,f:(r,s)=>U(t[r],s)}}function $c(e,t){return String(e??"").split(/\{(\w+)\}/).map((n,r)=>r%2?n in t?t[n]:`{${n}}`:n)}function Yr({state:e,compact:t=!1,className:n,style:r,classNames:s,labels:i}){let a=D(s),o=(f,...m)=>E(a,f,...m),{t:u,f:c}=Y(i),d=fe(e.harness),h={connecting:[u.loadingConnecting,u.loadingConnectingDetail,0],starting:[d?c("loadingStarting",{harness:d}):u.loadingStartingAgent,u.loadingStartingDetail,1],discovering:[u.loadingDiscovering,u.loadingDiscoveringDetail,2],ready:[u.loadingReady,u.loadingReadyDetail,3]}[e.startup];return l("div",{className:o("loading",n),style:r,"data-compact":t||void 0,role:"status","aria-busy":e.startup!=="ready",children:[l("span",{className:o("orbit"),"aria-hidden":"true",children:l("i",{className:o("orbit-ring")})}),l("span",{className:o("loading-copy"),children:[l("strong",{className:o("loading-title"),children:h[0]}),l("small",{className:o("loading-detail"),children:h[1]})]}),l("span",{className:o("progress"),"aria-hidden":"true",children:[1,2,3].map(f=>l("i",{className:o("progress-step"),"data-progress":f<=h[2]?"done":f===h[2]+1?"current":"waiting"},f))})]})}function la({entry:e,adapter:t,canRespond:n,className:r,style:s,classNames:i,labels:a}){let o=D(i),u=(p,...g)=>E(o,p,...g),{t:c,f:d,host:h}=Y(a),f=e.request;if(!f)return null;if(f.status==="responded")return l("div",{className:u("request-done",r),style:s,children:d("requestAnswered",{name:f.resolution?.name??f.requestKind})});let m=f.options.find(p=>p.kind?.startsWith("allow"));return l(ae,{value:o,children:l(_e,{value:h,children:l("section",{className:u("request",r),style:s,role:"alert","aria-label":d("requestNeedsInput",{kind:f.requestKind}),children:[l("strong",{children:c.agentNeedsInput}),l(vt,{value:f.payloadText||e.text,copyText:t?.copyText}),l("div",{className:u("request-actions"),children:[f.options.map(p=>l("button",{className:u("request-option",u("button")),type:"button","data-kind":p.kind,"data-first-allow":p===m||void 0,disabled:!n,onClick:()=>t.onIntent({action:"respond",requestId:f.requestId,optionId:p.optionId}),children:p.name},p.optionId)),f.cancellable?l("button",{className:u("request-option",u("button")),type:"button",disabled:!n,onClick:()=>t.onIntent({action:"respond",requestId:f.requestId,optionId:null}),children:c.cancel}):null]})]})})})}function Qr({context:e}){let t=D(),n=(s,...i)=>E(t,s,...i),{f:r}=Y();return e?.length?l("details",{className:n("context"),children:[l("summary",{className:n("context-summary"),children:r("contextCount",{count:e.length})}),l("div",{className:n("context-items"),children:e.map((s,i)=>l("p",{className:n("context-item"),children:[l("strong",{className:n("context-label"),children:s.label}),l("span",{children:s.detail})]},s.id??i))})]}):null}function Hc({entry:e}){let t=D(),n=(a,...o)=>E(t,a,...o),{t:r}=Y(),s=e.ts===null||e.ts===void 0?null:new Date(e.ts),i=s&&Number.isFinite(s.valueOf())?s:null;return l("header",{className:n("message-actor"),"aria-hidden":"true",children:[i?l("time",{className:n("message-actor-time"),dateTime:i.toISOString(),children:e.actor?.timeLabel??i.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}):null,e.actor?.anonymous?l("span",{className:n("message-actor-anonymous")}):e.actor?.image?l("img",{className:n("message-actor-image"),src:e.actor.image,alt:"",width:18,height:18}):null,l("span",{className:n("message-actor-name"),"data-role":e.role,children:[e.actor?.name??r[`actor:${e.role}`]??e.role,e.actor?.source&&l("small",{className:n("message-actor-source"),children:e.actor.source})]})]})}function jc({entry:e,adapter:t}){let n=D(),r=(f,...m)=>E(n,f,...m),{t:s}=Y(),[i,a]=j("idle"),o=W(null);K(()=>()=>clearTimeout(o.current),[]);let u=e.ts===null?null:new Date(e.ts),c=u&&Number.isFinite(u.valueOf())?u:null;if(!c&&(!t?.copyText||!e.text))return null;let d=async()=>{try{await t.copyText(e.text),a("copied")}catch{a("failed")}clearTimeout(o.current),o.current=setTimeout(()=>a("idle"),1500)},h=i==="copied"?s.messageCopied:i==="failed"?s.copyFailed:s.copyMessage;return l("footer",{className:r("message-meta"),children:[c?l("time",{className:r("message-meta-time"),dateTime:c.toISOString(),title:c.toLocaleString(),children:c.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}):null,t?.copyText&&e.text?l("button",{className:r("message-meta-copy",r("icon-button")),type:"button","aria-label":h,title:h,onClick:d,"data-status":i,children:l(P,{name:"copy",size:13,className:r("message-meta-icon")})}):null]})}var aa={read:()=>l(R,{children:[l("path",{d:"M5 2.75h7.25L15 5.5v7.75A1.75 1.75 0 0 1 13.25 15h-8.5A1.75 1.75 0 0 1 3 13.25v-8.5A2 2 0 0 1 5 2.75Z"}),l("path",{d:"M12 2.9v3h2.85M6 9h6M6 12h4"})]}),search:()=>l(R,{children:[l("circle",{cx:"8",cy:"8",r:"4.5"}),l("path",{d:"m11.5 11.5 3 3"})]}),edit:()=>l(R,{children:[l("path",{d:"m11.75 3.25 3 3-8.5 8.5-3.75.75.75-3.75 8.5-8.5Z"}),l("path",{d:"m10 5 3 3"})]}),command:()=>l(R,{children:l("path",{d:"m3 5 3 3-3 3M8 12h6"})}),test:()=>l(R,{children:[l("path",{d:"M6 2.5v3L3 12a2 2 0 0 0 1.8 3h8.4a2 2 0 0 0 1.8-3l-3-6.5v-3M5 9h8"}),l("path",{d:"M5 2.5h8"})]}),web:()=>l(R,{children:[l("circle",{cx:"9",cy:"9",r:"6.5"}),l("path",{d:"M2.75 9h12.5M9 2.5c2 1.8 3 4 3 6.5s-1 4.7-3 6.5c-2-1.8-3-4-3-6.5s1-4.7 3-6.5Z"})]}),agent:()=>l(R,{children:[l("circle",{cx:"9",cy:"6",r:"2.5"}),l("path",{d:"M4 15c.4-3 2-4.5 5-4.5s4.6 1.5 5 4.5"})]}),plan:()=>l(R,{children:l("path",{d:"m3 5 1 1 2-2M3 9l1 1 2-2M3 13l1 1 2-2M8 5h7M8 9h7M8 13h7"})}),other:()=>l(R,{children:[l("path",{d:"M9 2.5v3M9 12.5v3M2.5 9h3M12.5 9h3"}),l("circle",{cx:"9",cy:"9",r:"3.5"})]})};function Uc({category:e}){let t=D(),n=aa[e]??aa.other;return l("svg",{className:E(t,"tool-icon"),viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:l(n,{})})}function Vc(e,t,n,r){if(n?.action)return r[`action:${n.action}`]??n.action;let s=e.status??"completed",i=s==="pending"?"toolRunning":s==="error"?"toolFailed":"toolDone";if(r[`${i}:${t}`]!==void 0)return r[`${i}:${t}`];let a=e.label?.split(/__|\//).at(-1)?.replaceAll(/[_-]+/g," ")||r.toolFallback;return s==="error"?U(r.toolNamedFailed,{label:a}):a}function Wc(e,t){return t[`argument:${e}`]??e.replaceAll(/[_-]+/g," ").replace(/^./,n=>n.toLocaleUpperCase())}function Kc(e,t){return e[`toolStatus:${t}`]??t}function Gc(e,t){if(!e)return[];try{let n=JSON.parse(e);if(n&&typeof n=="object"&&!Array.isArray(n))return Object.entries(n).map(([r,s])=>({key:r,label:Wc(r,t),value:typeof s=="string"?s:JSON.stringify(s,null,2)}))}catch{}return[{key:"arguments",label:t.argumentDetails,value:e}]}function _t(e){return e?.replaceAll(/[\u001B\u009B][[\]()#;?]*(?:(?:(?:[a-zA-Z\d]*(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*)?\u0007)|(?:(?:\d{1,4}(?:[;:]\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))/g,"")??""}function da(e,t){return e===null?"":e<1e3?U(t.durationMs,{value:Math.round(e)}):U(t.durationSeconds,{value:(e/1e3).toFixed(e<1e4?1:0)})}function Jc({presentation:e}){let t=D(),{t:n,f:r}=Y(),s=[e.matches===null?"":r(e.matches===1?"metricMatch":"metricMatches",{count:e.matches}),e.additions===null?"":`+${e.additions}`,e.deletions===null?"":`\u2212${e.deletions}`,e.exitCode===null?"":r("metricExit",{code:e.exitCode}),da(e.durationMs,n)].filter(Boolean);return s.length?l("div",{className:E(t,"tool-metrics"),children:s.map(i=>l("span",{className:E(t,"tool-metric"),children:i},i))}):null}function Zc({now:e}){let t=D(),{t:n}=Y(),r=e??Date.now,s=W(r()),[i,a]=j(0);return K(()=>{let o=setInterval(()=>a(Math.max(0,r()-s.current)),1e3);return()=>clearInterval(o)},[r]),l("small",{className:E(t,"tool-elapsed"),children:i<1e3?n.elapsedNow:da(i,n)})}function oa({value:e,kind:t}){let n=D(),r=(i,...a)=>E(n,i,...a),{t:s}=Y();return e?l("ol",{className:r("code-preview"),"data-kind":t,tabIndex:0,"aria-label":t==="diff"?s.diffPreview:s.filePreview,children:_t(e).split(`
27
27
  `).map((i,a)=>{let o=t==="diff"?i.startsWith("+")&&!i.startsWith("+++")?"add":i.startsWith("-")&&!i.startsWith("---")?"remove":i.startsWith("@@")?"hunk":"plain":"plain";return l("li",{className:r("code-preview-line"),"data-tone":o,children:[l("span",{className:r("code-preview-number"),children:a+1}),l("code",{className:r("code-preview-text"),children:i||" "})]},a)})}):null}function Xc({presentation:e,pending:t,failed:n}){let r=D(),s=(a,...o)=>E(r,a,...o),{t:i}=Y();return l("section",{className:s("terminal"),children:[l("header",{className:s("terminal-head"),children:[l("span",{className:s("terminal-lights"),"aria-hidden":"true",children:[l("i",{className:s("terminal-light")}),l("i",{className:s("terminal-light")}),l("i",{className:s("terminal-light")})]}),l("code",{className:s("terminal-command"),children:e.command?`$ ${e.command}`:i.terminal})]}),e.preview?l("pre",{className:s("terminal-output"),"data-error":n,children:_t(e.preview)}):t?l("div",{className:s("terminal-wait"),children:[l("i",{className:s("terminal-wait-dot")})," ",i.waitingOutput]}):l("div",{className:s("terminal-empty"),children:i.noOutput})]})}function Yc({presentation:e}){let t=D(),n=(i,...a)=>E(t,i,...a),{t:r}=Y(),s=_t(e.preview).split(`
28
28
  `).filter(Boolean);return l("section",{className:n("search-preview"),children:[e.query?l("header",{className:n("search-preview-head"),children:[l("span",{className:n("search-preview-label"),children:r.searchLabel}),l("code",{className:n("search-preview-query"),children:e.query})]}):null,s.length?l("ol",{className:n("search-preview-results"),children:s.map((i,a)=>{let o=/^(.*?):(\d+)(?::(\d+))?:(.*)$/.exec(i);return l("li",{className:n("search-preview-result"),children:o?l(R,{children:[l("code",{className:n("search-preview-file"),children:o[1]}),l("small",{className:n("search-preview-line"),children:[o[2],o[3]?`:${o[3]}`:""]}),l("span",{className:n("search-preview-text"),children:o[4]})]}):l("span",{className:n("search-preview-text"),children:i})},a)})}):l("p",{className:n("search-preview-empty"),children:r.noTextResults})]})}function Qc({presentation:e,entry:t}){let n=D(),r=(o,...u)=>E(n,o,...u),{t:s}=Y(),i=t.status==="pending",a=t.status==="error";return e.detail==="terminal"?l(Xc,{presentation:e,pending:i,failed:a}):e.detail==="diff"?e.preview?l(oa,{value:e.preview,kind:"diff"}):l("div",{className:r("tool-empty"),children:s.noDiff}):e.detail==="file"?e.preview?l(oa,{value:e.preview,kind:"file"}):l("div",{className:r("tool-empty"),children:s.noFileContents}):e.detail==="matches"?l(Yc,{presentation:e}):e.detail==="web"?l("section",{className:r("web-preview"),children:[e.url?l("code",{className:r("web-preview-url"),children:e.url}):null,e.preview?l("p",{className:r("web-preview-text"),children:_t(e.preview)}):l("small",{className:r("web-preview-note"),children:i?s.waitingPage:s.noPageSummary})]}):e.detail==="agent"?l("section",{className:r("agent-preview"),children:e.items?.length?l("ol",{className:r("agent-roster"),children:e.items.map((o,u)=>l("li",{className:r("agent-roster-item"),children:[l("strong",{className:r("agent-roster-label"),children:o.label}),l("small",{className:r("agent-roster-status"),children:o.status})]},`${o.label}:${u}`))}):e.preview?l("pre",{className:r("agent-preview-output"),children:_t(e.preview)}):l("small",{className:r("agent-preview-note"),children:i?s.agentWorking:s.noHandoff})}):e.detail==="plan"?l("ol",{className:r("plan-preview"),children:e.items?.map((o,u)=>l("li",{className:r("plan-preview-item"),"data-status":o.status,children:[l("i",{className:r("plan-preview-mark"),"aria-hidden":"true"}),l("span",{children:o.label})]},`${o.label}:${u}`))}):e.preview?l("pre",{className:r("tool-output"),"data-error":a,children:_t(e.preview)}):null}function el({presentation:e,adapter:t}){let n=D(),{t:r}=Y(),[s,i]=j(!1),a=W(null);if(K(()=>()=>clearTimeout(a.current),[]),!t?.copyText)return null;let o=e.command?[r.copyCommand,e.command]:e.path?[r.copyPath,e.path]:e.url?[r.copyUrl,e.url]:e.query?[r.copyQuery,e.query]:null,u=async()=>{await t.copyText(o[1]),i(!0),clearTimeout(a.current),a.current=setTimeout(()=>i(!1),1500)};return o?l("div",{className:E(n,"tool-actions"),children:l("button",{className:E(n,"tool-copy",E(n,"button")),"data-variant":"quiet",type:"button",onClick:u,"aria-label":s?r.copied:o[0],title:s?r.copied:o[0],children:l(P,{name:s?"check":"copy",size:14})})}):null}function tl({tools:e}){let t=D(),{t:n}=Y();return e.length<2?null:l("div",{className:E(t,"tool-stack"),"aria-label":n.coordinatedTools,children:e.map(r=>l("span",{className:E(t,"tool-stack-item"),children:r.replaceAll("__"," \xB7 ").replaceAll("_"," ")},r))})}function nl({entry:e}){let t=D(),n=(s,...i)=>E(t,s,...i),{t:r}=Y();return!e.arguments&&!e.resultText?null:l("details",{className:n("tool-technical"),children:[l("summary",{className:n("tool-technical-summary",n("tool-summary")),children:r.technicalDetails}),l("div",{className:n("tool-technical-body"),children:[e.arguments?l("section",{className:n("tool-technical-section"),children:[l("strong",{className:n("tool-technical-heading"),children:r.nativeArguments}),l("dl",{className:n("tool-technical-list"),children:Gc(e.arguments,r).map(s=>l("div",{className:n("tool-technical-row"),children:[l("dt",{className:n("tool-technical-label"),children:s.label}),l("dd",{className:n("tool-technical-value"),children:l("pre",{className:n("tool-technical-pre"),children:s.value})})]},s.key))})]}):null,e.resultText?l("section",{className:n("tool-technical-section"),children:[l("strong",{className:n("tool-technical-heading"),children:r.nativeResult}),l("pre",{className:n("tool-technical-pre"),"data-error":e.status==="error",children:[e.resultText,e.truncated?`
29
- ${r.truncatedMarker}`:""]})]}):null]})]})}function rl({entry:e,adapter:t,className:n,style:r}){let s=D(),i=(u,...c)=>E(s,u,...c),[a,o]=j(!1);return l("details",{className:i("mail",n),style:r,onToggle:u=>{u.target===u.currentTarget&&o(u.currentTarget.open)},children:[l("summary",{className:i("mail-summary"),children:[l("span",{className:i("mail-heading"),children:[e.mail.image&&l("img",{className:i("mail-avatar"),src:e.mail.image,alt:""}),l("strong",{className:i("mail-name"),title:e.mail.from,children:e.mail.from}),l("span",{className:i("mail-kind"),children:e.mail.via==="voice"?"Your voice interface":e.mail.direction==="out"?`Mail to ${e.mail.to}`:"Mail"}),Number.isFinite(e.ts)&&l("time",{className:i("mail-time"),dateTime:new Date(e.ts).toISOString(),children:new Date(e.ts).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})})]}),l("span",{className:i("mail-subject"),children:e.mail.subject||e.text.replace(/^\[Board notice[^\]]*\]\s*/,"").trimStart().split(`
30
- `,1)[0]?.slice(0,160)||"No subject"})]}),a&&l("div",{className:i("mail-body"),children:[e.mail.inReplyTo&&l("small",{children:["Reply to ",e.mail.inReplyTo.slice(0,10)]}),l(vt,{value:e.text,copyText:t?.copyText}),l(Qr,{context:e.context})]})]})}function fa({entry:e,state:t,adapter:n,className:r,style:s,classNames:i,labels:a}){let o=D(i),u=(f,...m)=>E(o,f,...m),{t:c,host:d}=Y(a),h;if(e.mail)h=l(rl,{entry:e,adapter:n,className:r,style:s},e.mail.id??e.id);else if(e.role==="opaque")h=l("article",{className:u("message",r),style:s,"data-role":"opaque","data-kind":e.kind,"aria-label":c.unrecognizedEntry,children:[l("div",{className:u("notice"),"data-code":"opaque-entry",children:$c(c.opaqueNotice,{kind:l("code",{children:e.kind})})}),e.text?l(vt,{value:e.text,copyText:n?.copyText}):null,e.raw?l("details",{className:u("tool-technical"),children:[l("summary",{className:u("tool-technical-summary"),children:c.technicalDetails}),l("div",{className:u("tool-technical-body"),children:l("section",{className:u("tool-technical-section"),children:[l("strong",{className:u("tool-technical-heading"),children:c.rawEntry}),l("pre",{className:u("tool-technical-pre"),tabIndex:0,"aria-label":c.rawEntry,children:[e.raw,e.truncated?`
29
+ ${r.truncatedMarker}`:""]})]}):null]})]})}function rl({entry:e,adapter:t,className:n,style:r}){let s=D(),i=(u,...c)=>E(s,u,...c),[a,o]=j(!1);return l("details",{className:i("mail",n),style:r,onToggle:u=>{u.target===u.currentTarget&&o(u.currentTarget.open)},children:[l("summary",{className:i("mail-summary"),children:[l("span",{className:i("mail-heading"),children:[e.mail.image&&l("img",{className:i("mail-avatar"),src:e.mail.image,alt:""}),l("strong",{className:i("mail-name"),title:e.mail.from,children:e.mail.from}),l("span",{className:i("mail-kind"),children:e.mail.via==="voice"?"Your voice interface":e.mail.direction==="out"?`Mail to ${e.mail.to}`:"Mail"}),Number.isFinite(e.ts)&&l("time",{className:i("mail-time"),dateTime:new Date(e.ts).toISOString(),children:new Date(e.ts).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})})]}),l("span",{className:i("mail-subject"),children:e.mail.subject||"No subject"})]}),a&&l("div",{className:i("mail-body"),children:[e.mail.inReplyTo&&l("small",{children:["Reply to ",e.mail.inReplyTo.slice(0,10)]}),l(vt,{value:e.text,copyText:t?.copyText}),l(Qr,{context:e.context})]})]})}function fa({entry:e,state:t,adapter:n,className:r,style:s,classNames:i,labels:a}){let o=D(i),u=(f,...m)=>E(o,f,...m),{t:c,host:d}=Y(a),h;if(e.mail)h=l(rl,{entry:e,adapter:n,className:r,style:s},e.mail.id??e.id);else if(e.role==="opaque")h=l("article",{className:u("message",r),style:s,"data-role":"opaque","data-kind":e.kind,"aria-label":c.unrecognizedEntry,children:[l("div",{className:u("notice"),"data-code":"opaque-entry",children:$c(c.opaqueNotice,{kind:l("code",{children:e.kind})})}),e.text?l(vt,{value:e.text,copyText:n?.copyText}):null,e.raw?l("details",{className:u("tool-technical"),children:[l("summary",{className:u("tool-technical-summary"),children:c.technicalDetails}),l("div",{className:u("tool-technical-body"),children:l("section",{className:u("tool-technical-section"),children:[l("strong",{className:u("tool-technical-heading"),children:c.rawEntry}),l("pre",{className:u("tool-technical-pre"),tabIndex:0,"aria-label":c.rawEntry,children:[e.raw,e.truncated?`
31
30
  ${c.truncatedMarker}`:""]})]})})]}):null]});else if(e.role==="request")h=l(la,{entry:e,adapter:n,canRespond:t.canRespond,className:r,style:s});else if(e.role==="reasoning")h=l("details",{className:u("reasoning",r),style:s,open:e.streaming,children:[l("summary",{className:u("reasoning-summary"),children:e.streaming?c.reasoningStreaming:c.reasoning}),l(vt,{value:e.text,copyText:n?.copyText})]});else if((e.role==="notice"||e.role==="system")&&(e.label==="error"||e.code==="error")){let f=Hn(e.text,void 0,c);h=l("div",{className:u("notice",r),style:s,"data-code":"error",children:[l("strong",{children:f.title}),l("p",{children:f.summary}),f.details?l("details",{className:u("tool-technical"),children:[l("summary",{className:u("tool-technical-summary"),children:c.technicalDetails}),l("div",{className:u("tool-technical-body"),children:l("pre",{className:u("tool-technical-pre"),children:f.details})})]}):null]})}else e.role==="notice"||e.role==="system"?h=l("div",{className:u("notice",r),style:s,"data-code":e.code,children:e.text}):h=l("article",{className:u("message",r),style:s,"data-role":e.role,"data-actor-kind":e.actor?.kind,"data-continued":e.actor?.continued?"true":void 0,"aria-label":e.role==="user"?c.yourMessage:c.assistantMessage,children:[l(Hc,{entry:e}),l(sn,{items:e.images,adapter:n}),l(vt,{value:e.text,copyText:n?.copyText}),l(Qr,{context:e.context}),e.truncated?l("small",{className:u("truncated"),children:c.entryTruncated}):null,l(jc,{entry:e,adapter:n})]});return l(ae,{value:o,children:l(_e,{value:d,children:h})})}function Xr({entry:e,workspace:t,open:n=!1,adapter:r,className:s,style:i,classNames:a,labels:o}){let u=D(a),c=(A,...M)=>E(u,A,...M),{t:d,host:h}=Y(o),f=e.presentation??Ks(e),[m,p]=j(n),g=W(!1);K(()=>{g.current||p(n)},[n]);let v=Js(f.target,t),_=!!(e.arguments||e.resultText||f.preview||f.fields.length),b=f.category??nn(e),y=e.ts===null||e.ts===void 0?null:new Date(e.ts),C=y&&Number.isFinite(y.valueOf())?y.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}):null,x=l("span",{className:c("tool-actor"),"aria-hidden":"true",children:[C?l("time",{className:c("message-actor-time"),children:C}):l("span",{}),l("span",{className:c("message-actor-name"),"data-role":"tool",children:U(d["actor:tool"],{name:e.label||b})})]}),S=l(R,{children:[x,l(Uc,{category:b}),l("strong",{className:c("tool-title"),children:Vc(e,b,f,d)}),v?l("code",{className:c("tool-target"),title:f.target,children:v}):null,l("span",{className:c("spacer")}),e.status==="pending"?l(Zc,{now:r?.now}):null,l("span",{className:c("tool-status"),role:"status","data-status":e.status??"completed","aria-label":Kc(d,e.status??"completed"),children:e.status==="pending"?l("i",{className:c("tool-status-spinner")}):l(P,{name:e.status==="error"?"close":"check",size:12})}),_?l(P,{name:"chevron",size:14,className:c("tool-chevron")}):null]});return _?l(ae,{value:u,children:l(_e,{value:h,children:l("details",{className:c("tool",s),style:i,"data-status":e.status??"completed","data-category":b,open:m,onToggle:A=>{A.currentTarget.open!==m&&(g.current=!0),p(A.currentTarget.open)},children:[l("summary",{className:c("tool-head",c("tool-summary")),children:S}),m&&l("div",{className:c("tool-detail"),children:[l(el,{presentation:f,adapter:r}),l(Jc,{presentation:f}),l(tl,{tools:f.tools??[]}),l(Qc,{presentation:f,entry:e}),f.fields.length?l("dl",{className:c("tool-fields"),children:f.fields.map(A=>l("div",{className:c("tool-field"),children:[l("dt",{className:c("tool-field-label"),children:A.label}),l("dd",{className:c("tool-field-value"),children:A.value})]},A.label))}):null,l(nl,{entry:e})]})]})})}):l(ae,{value:u,children:l(_e,{value:h,children:l("div",{className:c("tool",s),style:i,"data-status":e.status??"completed","data-category":b,children:l("div",{className:c("tool-head"),children:S})})})})}function ha({entries:e,state:t,adapter:n,expandTools:r=!1,className:s,style:i,classNames:a,labels:o}){let u=D(a),c=(_,...b)=>E(u,_,...b),{t:d,host:h}=Y(o),f=e.some(_=>_.status==="pending"),[m,p]=j(f),g=W(!1),v=Ge();return K(()=>{f?p(!0):g.current||p(!1)},[f]),e.length===1?l(ae,{value:u,children:l(_e,{value:h,children:l("section",{className:c("activity",s),style:i,"data-single":"true",children:l(Xr,{open:r,entry:e[0],workspace:t.workspace,adapter:n})})})}):l(ae,{value:u,children:l(_e,{value:h,children:l("section",{className:c("activity",s),style:i,children:[l("button",{className:c("activity-head"),type:"button","aria-expanded":m,"aria-controls":v,onClick:()=>{g.current=!0,p(_=>!_)},children:[l("span",{className:c("fold"),"data-open":m,children:l(P,{name:"chevron",size:14})}),l("strong",{className:c("activity-summary"),children:Zs(e,d)}),l("span",{className:c("spacer")}),l("small",{className:c("activity-count"),children:[e.filter(_=>_.status!=="pending").length,"/",e.length]})]}),m?l("div",{id:v,className:c("activity-items"),children:e.map(_=>l(Xr,{open:r,entry:_,workspace:t.workspace,adapter:n},_.key??_.id))}):null]})})})}function pa({plan:e,className:t,style:n,classNames:r,labels:s}){let i=D(r),a=(c,...d)=>E(i,c,...d),{t:o}=Y(s);if(!e.items.length)return null;let u=e.items.filter(c=>c.status==="completed"||c.status==="cancelled").length;return l("details",{className:a("plan",t),style:n,children:[l("summary",{className:a("plan-summary"),children:[l("span",{children:o.plan}),l("small",{children:[u,"/",e.items.length]})]}),l("ol",{className:a("plan-steps"),tabIndex:0,"aria-label":o.planSteps,children:e.items.map(c=>l("li",{className:a("plan-step"),"data-status":c.status,children:[l("i",{"aria-hidden":"true"})," ",l("span",{children:c.title})]},c.id))})]})}function ma({semantics:e,className:t,style:n,classNames:r,labels:s}){let i=D(r),a=(c,...d)=>E(i,c,...d),{t:o,f:u}=Y(s);return!e.fidelity&&!e.residueCount&&!e.parseErrors&&!e.subagents.length?null:l("details",{className:a("details",t),style:n,children:[l("summary",{className:a("details-summary"),children:o.sessionDetails}),l("div",{className:a("details-items"),children:[e.fidelity?l("p",{className:a("details-item"),children:[l("strong",{className:a("details-label"),children:o.fidelity}),l("span",{children:e.fidelity.replaceAll("_"," ")})]}):null,l("p",{className:a("details-item"),children:[l("strong",{className:a("details-label"),children:o.nativeRecords}),l("span",{children:e.rawRecords})]}),e.residueCount?l("p",{className:a("details-item"),children:[l("strong",{className:a("details-label"),children:o.residue}),l("span",{children:u("residueRetained",{count:e.residueCount})})]}):null,e.parseErrors?l("p",{className:a("details-item"),children:[l("strong",{className:a("details-label"),children:o.parseDiagnostics}),l("span",{children:e.parseErrors})]}):null,e.subagents.map(c=>l("p",{className:a("details-item"),children:[l("strong",{className:a("details-label"),children:u("subagentSource",{source:c.source})}),l("span",{children:u("subagentDetail",{messages:c.messages,fidelity:c.fidelity.replaceAll("_"," ")})})]},c.id))]})]})}var ua=Ee();function sl({state:e}){let{t,f:n}=Y(),r=W(e.busy),[s,i]=j("");return K(()=>{if(r.current&&!e.busy&&!e.error){let a=fe(e.harness);i(a?n("finishedWorking",{harness:a}):t.finishedWorkingAgent)}r.current=e.busy},[e.busy,e.error,e.harness]),l("span",{className:"scui-sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:s})}function Lt({state:e,adapter:t,components:n={},slots:r={},memoryKey:s=e.attached?.key||`${e.harness}:${e.workspace}`,pending:i=null,unreadAfterMessages:a=null,groupTools:o=!0,expandTools:u=!1,className:c,style:d,classNames:h,labels:f}){let m=D(h),p=(O,...z)=>E(m,O,...z),{t:g,f:v,host:_}=Y(f),b=W(null),y=ua.get(s)??{top:null,atBottom:!0},[C,x]=j(y.atBottom),S=W(null),A=W(!1),M=Gs(e.transcript,{groupTools:o}),I=W(Number.isSafeInteger(a)&&a>=0?a:null),B=I.current===null?-1:M.findIndex(O=>(O.kind==="activity"?O.entries:[O.entry]).some(pe=>Number.isSafeInteger(pe.messageIndex)&&pe.messageIndex>I.current)),F=n.TranscriptEntry??fa,V=n.ActivityGroup??ha,ce=n.TaskPlan??pa,se=n.PendingMessage??null,G=r.beforeConversation,ee=r.afterConversation,Ae=r.emptyConversation,Ne=O=>ct(ua,s,O),ie=typeof i=="string"?{text:i,status:"sending"}:i,Ue=()=>{b.current&&(b.current.scrollTop=b.current.scrollHeight,x(!0),Ne({top:b.current.scrollTop,atBottom:!0}))};return Ct(()=>{let O=b.current;if(!O)return;let z=S.current;if(z){if(e.operation==="loadEarlier"&&(z.seenOperation=!0),e.transcript.length>z.entries&&e.transcript[0]?.id!==z.firstId){O.scrollTop=z.top+(O.scrollHeight-z.height),S.current=null,Ne({top:O.scrollTop,atBottom:!1});return}(e.error||z.seenOperation&&e.operation!=="loadEarlier")&&(S.current=null)}A.current?C&&Ue():(A.current=!0,y.top!==null&&!y.atBottom?O.scrollTop=y.top:Ue())},[s,e.transcript,e.busy,e.operation,e.error,ie?.text,ie?.status]),l(ae,{value:m,children:l(_e,{value:_,children:l("div",{className:p("conversation-wrap",c),style:d,children:[l(sl,{state:e}),l("div",{className:p("conversation"),ref:b,tabIndex:0,"aria-label":g.conversation,onScroll:O=>{let z=O.currentTarget,pe=z.scrollHeight-z.scrollTop-z.clientHeight<=64;x(pe),Ne({top:z.scrollTop,atBottom:pe})},children:l("div",{className:p("conversation-content"),children:[G?l(G,{state:e,adapter:t,value:null}):null,l(ce,{plan:e.taskPlan,value:e.taskPlan,state:e,adapter:t}),l(ma,{semantics:e.semantics}),e.history.hasEarlier?l("button",{className:p("load"),type:"button",disabled:!!e.operation,onClick:()=>{let O=b.current;O&&(S.current={height:O.scrollHeight,top:O.scrollTop,entries:e.transcript.length,firstId:e.transcript[0]?.id,seenOperation:!1}),x(!1),t.onIntent({action:"loadEarlier"})},children:g.loadEarlier}):null,!M.length&&e.startup!=="ready"?l(Yr,{state:e}):null,!M.length&&e.startup==="ready"?Ae?l(Ae,{state:e,adapter:t,value:null}):l("div",{className:p("empty"),children:e.error??(e.harness?v("listening",{harness:fe(e.harness)}):g.noTranscript)}):null,M.map((O,z)=>l(R,{children:[z===B?l("div",{className:p("unread-divider"),role:"separator","aria-label":g.newMessages,children:l("span",{className:p("unread-divider-label"),children:g.newDivider})}):null,O.kind==="activity"?l(V,{value:O.entries,entries:O.entries,state:e,adapter:t,expandTools:u}):l(F,{value:O.entry,entry:O.entry,state:e,adapter:t})]},O.id)),ie?se?l(se,{pending:ie,adapter:t,state:e}):l("article",{className:p("message"),"data-role":"user","data-pending":"true","data-status":ie.status,"aria-label":g.pendingMessage,children:[l(sn,{items:ie.images,adapter:t}),l(vt,{value:ie.text,copyText:t?.copyText}),l(Qr,{context:ie.context}),l("footer",{className:p("pending-footer"),children:[l("small",{className:p("pending-status"),children:ie.status==="failed"?g.notSent:g.sending}),ie.status==="failed"&&(ie.onRetry||ie.onEdit||ie.onDiscard)?l("span",{className:p("pending-actions"),children:[["onRetry",g.retry],["onEdit",g.edit],["onDiscard",g.discard]].filter(([O])=>ie[O]).map(([O,z])=>l("button",{className:p("pending-action",p("button")),type:"button","data-action":O.slice(2).toLowerCase(),onClick:ie[O],children:z},O))}):null]})]}):null,e.busy?l("div",{className:p("working"),role:"status",children:[l("span",{className:p("working-mark"),"aria-hidden":"true",children:"\u2726"}),l("i",{className:p("working-dot")}),l("i",{className:p("working-dot")}),l("i",{className:p("working-dot")}),l("small",{children:v("harnessWorking",{harness:fe(e.harness)})})]}):null,ee?l(ee,{state:e,adapter:t,value:null}):null]})}),C?null:l("button",{className:p("latest",p("button")),type:"button",onClick:Ue,children:[l(P,{name:"down",size:13})," ",g.latest]})]})})})}var es={unknownUser:"Unknown user",harnessSession:"{harness} session",pane:"Pane",ageNow:"now",ageMinutes:"{count}m ago",ageHours:"{count}h ago",ageDays:"{count}d ago",ageWeeks:"{count}w ago",signInTitle:"Open a team",signInNote:"Connect to a Teams server with your own access token. It stays in this tab and is sent only to that server.",server:"Server",serverPlaceholder:"https://teams.example.com",accessToken:"Access token",connecting:"Connecting\u2026",connect:"Connect",teamSessions:"Team sessions",searchTeamSessions:"Search team sessions",searchSessionsPlaceholder:"Search sessions\u2026",filterByUser:"Filter by user",everyone:"Everyone",me:"Me",filterByHarness:"Filter by harness",anyHarness:"Any harness",filterByMachine:"Filter by machine",anyMachine:"Any machine",searching:"Searching\u2026",loadingSessions:"Loading sessions\u2026",sessionsError:"Sessions could not be loaded.",tryAgain:"Try again",noSessionMatch:"No sessions match.",noSessions:"No sessions have been shared with this team yet.",sessionLabel:"Session {title}",backToSessions:"Back to sessions",readOnly:"Read-only",live:"Live",snapshot:"Snapshot",latestMessages:"Showing the latest {returned} of {total} messages. ",partialCapture:"Part of this session was not captured.",sessionReadError:"This session could not be read.",teamMachines:"Team machines",machinesOnline:"{online} of {total} online",loadingMachines:"Loading machines\u2026",machinesError:"Machines could not be loaded.",noMachines:"No machine is enrolled in this team.",unknownCustodian:"Unknown custodian",executionContained:"Runs jobs, each contained",executionProcessGroup:"Runs jobs as process groups",executionNone:"Runs no remote jobs",online:"Online",offline:"Offline",offlineSeen:"Offline \xB7 seen {age}",offlineNeverSeen:"Offline \xB7 never seen",watch:"Watch",control:"Control",access:"Access",loadingGrants:"Loading grants\u2026",noGrants:"Only you can reach this machine's panes.",canControl:"Can control",canWatch:"Can watch",grantUntil:"until {time}",revoke:"Revoke",grantPaneAccess:"Grant pane access",member:"Member",noOtherMembers:"No other members",paneField:"Pane",noPanes:"No panes",can:"Can",grantFor:"For",ttl1h:"1 hour",ttl8h:"8 hours",ttl7d:"7 days",saving:"Saving\u2026",grant:"Grant",machineLabel:"Machine {name}",backToMachines:"Back to machines",yourMachine:"Your machine",custodianMachine:"{name}'s machine",panes:"Panes",machineOffline:"This machine is offline. Its panes open when it reconnects.",machineOfflineSeen:"This machine is offline; last seen {age}. Its panes open when it reconnects.",reachingMachine:"Reaching the machine\u2026",machineUnreachable:"This machine could not be reached.",noVisiblePanes:"No pane you can see is running.",terminalLabel:"Terminal {title}",detach:"Detach",watchingReadOnly:"Watching \xB7 read-only",terminalMode:"Terminal mode",noTerminal:"This host has no terminal renderer; pass components.Terminal.",team:"Team",teamViews:"Team views",sessions:"Sessions",machines:"Machines",signOut:"Sign out",chooseSession:"Choose a session to read it.",chooseMachine:"Choose a machine to see its panes."},Zp=[{id:"1h",label:"ttl1h",ms:36e5},{id:"8h",label:"ttl8h",ms:8*36e5},{id:"7d",label:"ttl7d",ms:7*864e5}];function al(e,t,n){let r=D(e),[s,i]=Q(es,t),a=St(n);return{p:(o,...u)=>E(r,o,...u),t:s,f:(o,u)=>U(s[o],u),slots:a,scope:o=>l(At,{classNames:r,labels:i,slots:a,children:o})}}var ba=e=>e?{...es,...e}:es;function ga(e){return e?typeof e=="string"?e:e.message||String(e):null}function ol(e){let t=String(e??"").replace(/\/+$/,"");return t.slice(t.lastIndexOf("/")+1)||t}function ul(e,t){return t?e?.find(n=>n.principal?.id===t)?.principal.display_name??null:null}function cl(e,t,n=void 0){let r=e?.user;return ul(t,r?.principal_id)??r?.reported_user??ba(n).unknownUser}function ll(e,t=void 0){return e?.title?e.title:e?.repository?.path?ol(e.repository.path):U(ba(t).harnessSession,{harness:fe(e?.harness??"")})}function dl(e,t){return(e?.machine_ids??[]).map(n=>t?.find(r=>r.id===n)?.name??n)}function fl({kind:e="status",children:t}){let n=D();return l("p",{className:E(n,"team-status"),"data-kind":e,role:e==="error"?"alert":"status",children:t})}function ya({session:e,transcript:t=[],members:n=[],machines:r=[],status:s="ready",error:i=null,live:a=!1,display:o=null,pending:u=null,onBack:c,adapter:d,components:h=void 0,groupTools:f=void 0,expandTools:m=void 0,unreadAfterMessages:p=void 0,className:g,style:v,classNames:_,labels:b=void 0,slots:y=void 0}){let{p:C,t:x,f:S,slots:A,scope:M}=al(_,b,y),I=de(()=>({...zn,startup:s==="loading"&&!t.length?"discovering":"ready",transcript:t,harness:e?.harness??"",mode:"mirror",error:s==="error"?ga(i):null,history:{...zn.history,hasEarlier:!1}}),[e?.harness,t,s,i]),B=de(()=>d??{onIntent(){},copyText:G=>globalThis.navigator?.clipboard?.writeText(G)},[d]);if(!e)return null;let F=dl(e,r),V=e.coverage?.completeness==="partial",ce=e.title?null:t.find(G=>G.role==="user"&&G.text)?.text.replace(/\s+/g," ").trim(),se=ce?ce.length>90?`${ce.slice(0,89)}\u2026`:ce:ll(e,x);return M(l("section",{className:C("team-transcript",g),style:v,"aria-label":S("sessionLabel",{title:se}),children:[l("header",{className:C("head"),children:[c?l("button",{className:C("head-action",C("icon-button")),type:"button","aria-label":x.backToSessions,onClick:c,children:l(P,{name:"back",size:17})}):null,l(Be,{className:C("head-logo"),id:e.harness,size:24}),l("span",{className:C("head-copy"),children:[l("strong",{className:C("head-title"),children:se}),l("small",{className:C("head-subtitle"),children:[cl(e,n,x),fe(e.harness),...F,x.readOnly].join(" \xB7 ")})]}),l(tn,{slots:A,name:"transcriptHeaderActions",value:e}),l("span",{className:C("team-live"),"data-live":a,children:a?x.live:x.snapshot})]}),V||o&&o.returned<o.total?l("p",{className:C("team-coverage"),children:[o&&o.returned<o.total?S("latestMessages",{returned:o.returned,total:o.total}):"",V?x.partialCapture:""]}):null,s==="error"&&!t.length?l(fl,{kind:"error",children:ga(i)??x.sessionReadError}):l(Lt,{state:I,adapter:B,memoryKey:`team:${e.id}`,pending:u,components:h,slots:y,groupTools:f,expandTools:m,unreadAfterMessages:p,classNames:_,labels:b})]}))}function _a(e,t){Ct(()=>{let n=e.current;if(!n)return;n.style.height="auto";let r=Number.parseFloat(getComputedStyle(n).maxHeight)||150,s=Math.min(n.scrollHeight,r);n.style.height=`${s}px`,n.style.overflowY=n.scrollHeight>r?"auto":"hidden"},[e,t])}var va=Ee();var hl=20;function pl({id:e,className:t,list:n,onChoose:r,component:s}){let i=D(),a=(o,...u)=>E(i,o,...u);return l("ul",{id:e,className:a("suggestions",t),role:"listbox","data-trigger":n.trigger,children:n.items.map((o,u)=>l("li",{className:a("suggestion"),role:"option","aria-selected":u===n.active,"data-active":u===n.active?"true":void 0,onMouseDown:c=>{c.preventDefault(),r(o)},children:s?l(s,{suggestion:o,active:u===n.active,trigger:n.trigger}):l(R,{children:[o.image?l("img",{className:a("suggestion-image"),src:o.image,alt:""}):null,l("span",{className:a("suggestion-label"),children:o.label}),o.detail?l("small",{className:a("suggestion-detail"),children:o.detail}):null]})},o.id??`${u}:${o.label}`))})}function Pt({state:e,adapter:t,labels:n,memoryKey:r=e.attached?.key||`${e.harness}:${e.workspace}`,pendingStatus:s=null,restoreDraft:i=null,command:a=null,contextCandidates:o=[],components:u={},onPending:c,onDraftRestored:d,className:h,style:f,classNames:m}){let p=D(m),g=(w,...T)=>E(p,w,...T),[v]=Q(Z,n),_=(w,T)=>U(v[w],T),b=g("compose-item"),y=de(()=>`scui-suggestions-${Math.random().toString(36).slice(2,10)}`,[]),C=va.get(r)??{draft:e.savedDraft,context:[],images:[],queue:[]},[x,S]=j(C.draft),[A,M]=j(C.context??[]),[I,B]=j(C.images??[]),[F,V]=j((C.queue??[]).map(w=>({...w,context:w.context??[],images:w.images??[]}))),[ce,se]=j(!1),[G,ee]=j(!1),[Ae,Ne]=j(!1),[ie,Ue]=j(!1),[O,z]=j(null),pe=W(null),us=W(null),[me,Ve]=j(null),it=W(0);_a(pe,x);let le=(w,T,q,$)=>ct(va,r,{draft:w,context:T,images:q,queue:$});K(()=>{le(x,A,I,F)},[x,A,I,r,F]);let cs=w=>V(T=>{let q=w(T);return le(x,A,I,q),q}),An=e.busy||s!==null||ce||G,xt=e.busy||s==="sending"||s==="failed"||ce||G,ls=e.busy&&e.canSteer&&!G&&s===null,Bt=ls&&!!x.trim()&&A.length===0&&I.length===0;K(()=>{if(!An&&e.canSend&&F.length){let[w,...T]=F;se(!0),V(T),le(x,A,I,T),c?.(w.text,w.context,w.images),t.onIntent({action:"send",text:w.text,...w.context.length?{context:w.context}:{},...w.images.length?{images:w.images}:{}})}},[t,x,r,c,F,An,e.canSend]),K(()=>{(s!==null||e.busy)&&se(!1)},[s,e.busy]),K(()=>{pe.current?.focus({preventScroll:!0})},[r]),K(()=>{if(!i)return;S(i.text);let w=Un(i.context),T=Vn(i.images);M(w),B(T),le(i.text,w,T,F),pe.current?.focus({preventScroll:!0}),d?.(i.id)},[d,i?.id]),K(()=>{if(!(!a||a.id===us.current)){if(us.current=a.id,a.action==="attach")try{let w=Tt(a.attachments,v);if(A.length+w.context.length>Te)throw new Error(_("attachMaxText",{max:Te}));if(I.length+w.images.length>be)throw new Error(_("attachMaxImages",{max:be}));let T=Et(A,w.context),q=lt(I,w.images);M(T),B(q),z(null),le(x,T,q,F)}catch(w){z(w instanceof Error?w.message:v.attachFailed)}pe.current?.focus({preventScroll:!0})}},[a?.id]),K(()=>{let w=setTimeout(()=>t.onIntent({action:"draft",text:x}),250);return()=>clearTimeout(w)},[t,x]);let Ka=()=>{!t.pickContext||e.mode!=="control"||Ae||A.length>=Te&&I.length>=be||(Ne(!0),z(null),Promise.resolve().then(()=>t.pickContext()).then(w=>{let T=Tt(w,v);if(A.length+T.context.length>Te)throw new Error(_("attachMaxText",{max:Te}));if(I.length+T.images.length>be)throw new Error(_("attachMaxImages",{max:be}));M(q=>{let $=Et(q,T.context);return le(x,$,I,F),$}),B(q=>{let $=lt(q,T.images);return le(x,A,$,F),$})}).catch(w=>z(w instanceof Error?w.message:v.attachFailed)).finally(()=>Ne(!1)))},Ga=w=>{let T=Tt(w,v),q=Et(A,T.context),$=lt(I,T.images);M(q),B($),le(x,q,$,F)},ds=(w,T)=>{let q=Array.from(w??[]);if(!q.length)return!1;let $=q.filter(oe=>oe.type.startsWith("image/"));return $.length!==q.length?(z(v.imagesOnly),!0):I.length+$.length>be?(z(_("attachMaxImages",{max:be})),!0):(Ne(!0),z(null),Wn($,v).then(oe=>B(zt=>{let kt=lt(zt,oe);return le(x,A,kt,F),kt}),oe=>z(oe instanceof Error?oe.message:T==="paste"?v.imagePasteFailed:v.imageDropFailed)).finally(()=>Ne(!1)),!0)},Ja=w=>{ds(w.clipboardData?.files,"paste")&&w.preventDefault()},Za=w=>{Ue(!1),ds(w.dataTransfer?.files,"drop")&&w.preventDefault()},Xa=(w,T)=>{if(!t.suggest)return;let q=++it.current,$=/(^|\s)([@/])([^\s@/]*)$/.exec(w.slice(0,T));if(!$){Ve(null);return}let oe={trigger:$[2],query:$[3],start:T-$[3].length-1,end:T};Promise.resolve(t.suggest({trigger:oe.trigger,query:oe.query,draft:w,caret:T})).then(zt=>{if(q!==it.current)return;let kt=Array.isArray(zt)?zt.slice(0,hl):[];Ve(kt.length?{...oe,items:kt,active:0}:null)},()=>{q===it.current&&Ve(null)})},fs=w=>{if(!me)return;let T=`${w.insert??w.label} `,q=x.slice(0,me.start)+T+x.slice(me.end);it.current+=1,Ve(null),S(q),le(q,A,I,F);let $=me.start+T.length;requestAnimationFrame(()=>{pe.current?.focus(),pe.current?.setSelectionRange($,$)})},Ya=w=>{if(!me)return!1;let T=me.items.length;return w.key==="ArrowDown"||w.key==="ArrowUp"?(w.preventDefault(),Ve({...me,active:(me.active+(w.key==="ArrowDown"?1:T-1))%T}),!0):w.key==="Enter"&&!w.shiftKey||w.key==="Tab"?(w.preventDefault(),fs(me.items[me.active]),!0):w.key==="Escape"?(w.preventDefault(),it.current+=1,Ve(null),!0):!1},Nn=(w=!1)=>{let T=x.trim();if(!T&&!I.length)return;if(z(null),Bt&&!w){ee(!0),Promise.resolve(t.onIntent({action:"steer",text:T})).then(()=>{S(""),le("",A,I,F)},$=>z($ instanceof Error?$.message:v.steerFailed)).finally(()=>ee(!1));return}let q={text:T,context:A,images:I};if(xt)cs($=>[...$,q]);else if(e.canSend)c&&se(!0),c?.(T,A,I),t.onIntent({action:"send",text:T,...A.length?{context:A}:{},...I.length?{images:I}:{}});else return;S(""),M([]),B([]),le("",[],[],xt?[...F,q]:F)};return l(ae,{value:p,children:l("div",{className:g("compose",h),style:f,children:[F.length?l("div",{className:g("queue",b),children:[l("strong",{children:_("queued",{count:F.length})}),F.map((w,T)=>l("span",{className:g("queue-item"),children:[l("span",{className:g("queue-text"),children:[w.text||v.imageAttachment,w.context.length+w.images.length?l("small",{className:g("queue-meta"),children:_("attachedCount",{count:w.context.length+w.images.length})}):null]}),l("button",{className:g("queue-remove"),type:"button","aria-label":_("removeQueued",{index:T+1}),onClick:()=>cs(q=>q.filter(($,oe)=>oe!==T)),children:l(P,{name:"close",size:13})})]},`${T}:${w.text}`))]}):null,me?l(pl,{id:y,className:b,list:me,onChoose:fs,component:u.Suggestion}):null,l(rn,{className:b,items:o,context:A,images:I,state:e,adapter:t,onAttach:Ga,component:u.ContextCandidate}),l(Gn,{className:b,items:I,onRemove:w=>B(T=>{let q=T.filter(($,oe)=>oe!==w);return le(x,A,q,F),q})}),l(Kn,{className:b,items:A,onRemove:w=>M(T=>{let q=T.filter(($,oe)=>oe!==w);return le(x,q,I,F),q})}),O?l("small",{className:g("context-error",b),role:"alert",children:O}):null,l("div",{className:g("envelope",b),"data-dropping":ie?"true":void 0,onDragEnter:w=>{Array.from(w.dataTransfer?.types??[]).includes("Files")&&(w.preventDefault(),Ue(!0))},onDragOver:w=>{Array.from(w.dataTransfer?.types??[]).includes("Files")&&w.preventDefault()},onDragLeave:w=>{w.currentTarget.contains(w.relatedTarget)||Ue(!1)},onDrop:Za,children:[t.pickContext&&e.mode==="control"?l("button",{className:g("attach",g("icon-button")),type:"button","aria-label":v.attachContext,disabled:Ae||A.length>=Te&&I.length>=be,onClick:Ka,children:Ae?l("i",{className:g("control-spinner")}):l(P,{name:"attach",size:17})}):null,l("textarea",{className:g("envelope-input"),ref:pe,rows:1,"aria-label":fe(e.harness)?_("messageHarness",{harness:fe(e.harness)}):v.messageAgent,placeholder:e.startup!=="ready"?v.composerConnecting:s==="failed"?v.composerFailed:s==="editing"?v.composerEditing:ls&&A.length===0&&I.length===0?v.composerSteer:An?v.composerQueue:v.askAgent,value:x,disabled:e.mode!=="control"&&!e.canSend,onPaste:Ja,onInput:w=>{let T=w.currentTarget.value;S(T),le(T,A,I,F),Xa(T,w.currentTarget.selectionStart??T.length)},onBlur:()=>{it.current+=1,Ve(null)},onKeyDown:w=>{Ya(w)||$n(w)&&(w.preventDefault(),Nn())},"aria-autocomplete":t.suggest?"list":void 0,"aria-expanded":me?"true":void 0,"aria-controls":me?y:void 0}),l("span",{className:g("envelope-actions"),children:[e.busy?l("button",{className:g("stop"),type:"button","aria-label":v.stopAgent,disabled:!e.canInterrupt,onClick:()=>t.onIntent({action:"interrupt"}),children:l(P,{name:"stop",size:15})}):null,Bt?l("button",{className:g("queue-send",g("icon-button")),type:"button","aria-label":v.queueInstead,onClick:()=>Nn(!0),children:l(P,{name:"plus",size:15})}):null,l("button",{className:g("send"),type:"button","aria-label":Bt?v.steerTurn:xt?v.queueMessage:v.sendMessage,disabled:G||!x.trim()&&!I.length||!xt&&!e.canSend,onClick:()=>Nn(),children:G?l("i",{className:g("control-spinner")}):l(P,{name:Bt?"send":xt?"plus":"send",size:17})})]})]})]})})}var ml=Object.freeze({"claude-code":"Claude Code",codex:"Codex",gemini:"Gemini CLI",goose:"Goose",opencode:"OpenCode",pi:"Pi",grok:"Grok"}),hm=Object.freeze({chats:"Chats",newChat:"New chat",searchChats:"Search chats",askAgent:"Ask your agent\u2026",starterMark:"\u2726",starterTitle:"What should the agent build or fix?",starterHint:"Choose a coding harness and send the first message.",startPlaceholder:"What should the agent do?",attachContext:"Attach files or images",continueHere:"Continue here",continueWithTerminal:"Continue with terminal",joinLive:"Join live",forkHere:"Fork here",close:"Close",back:"Back",retry:"Retry",edit:"Edit",discard:"Discard",cancel:"Cancel",copy:"Copy",copied:"Copied",copyPath:"Copy path",copyCommand:"Copy command",copyUrl:"Copy URL",copyQuery:"Copy query",conversationActions:"Conversation actions",technicalDetails:"Technical details",messengerLabel:"Volter Harness messenger",backToChats:"Back to chats",agentChat:"Agent chat",chatFallback:"Chat",openingChat:"Opening {name}",openingDetail:"Loading the latest transcript window\u2026",statusConnecting:"Connecting",statusUnavailable:"Unavailable",statusNeedsInput:"Needs input",statusSendFailed:"Send failed",statusWorking:"Working",statusSending:"Sending",statusEditing:"Editing message",statusLive:"Live",statusReadOnly:"Read-only",statusReady:"Ready",menuSession:"Session",menuLowerCost:"Lower-cost continuation",menuIndependent:"Independent continuation",detachReadOnly:"Detach to read-only",prepareTerminal:"Prepare terminal handoff",exportBack:"Export back to {harness}",interopSettings:"Interoperability settings",keyboardShortcuts:"Keyboard shortcuts",reduceContinue:"Reduce and continue in {harness}",reduceSwitch:"Reduce and switch to {harness}",forkIn:"Fork in {harness}",continueWith:"Continue with {harness}",participantForeign:"This is {subject} conversation.",participantForeignVia:"This is {subject} conversation via {origin}.",participantSomeoneElse:"someone else's",participantUnknown:"Unknown participant \u2014 this conversation was not started here.",mirrorNotice:"{kind} of a {harness} session \u2014 the canonical record lives in its own store{truncated}.",mirrorBounded:"Bounded mirror",mirrorPlain:"Mirror",mirrorTruncated:" (truncated here)",openCanonical:"Open canonical session",heldBy:"Held by {surface} right now.",unheld:"No surface holds this session right now.",takeOver:"Take over",reducedVerified:"Reduced and verified",reductionDetail:"{source} \u2192 {reduced} tokens \xB7 {ratio}\xD7 \xB7 reversible",exportReady:"{fidelity} export ready \xB7 {harness}",exportDetail:"{path} \xB7 {files} files \xB7 {residue} residue items","fidelity:byte_lossless":"Byte-lossless","fidelity:value_lossless":"Value-lossless","fidelity:semantic":"Semantic",terminalReady:"Terminal handoff ready",newChatHint:"No session is created until you send",openingTerminal:"Opening terminal\u2026",messageCodingAgent:"Message coding agent",noHarness:"No coding harness is available",startTerminal:"Start terminal session",startHeadless:"Start headless session",terminalTextOnly:"Terminal starts currently accept text only. Choose Headless to attach context or images.",terminalRemoveAttachments:"Terminal starts currently accept text only. Remove attachments or choose Headless.",attachMaxText:"Attach at most {max} text items.",attachMaxImages:"Attach at most {max} images.",attachFailed:"Could not attach context.",imagesOnly:"Drop or paste PNG, JPEG, GIF, or WebP images.",imagePasteFailed:"Could not paste image.",imageDropFailed:"Could not drop image.",startFailed:"Could not start the conversation. Your draft is kept.",runIn:"Run in",modeTitle:"{label}: {mode}","mode:terminal":"Terminal","mode:headless":"Headless",activeElsewhere:"Active elsewhere",readOnly:"Read-only",cannotContinue:"This session cannot be continued by an available harness.",joinDetail:"Join the proven live runtime without taking it over.",resumeDetail:"Resume this {harness} session here.",branchDetail:"Start an independent continuation.",queued:"{count} queued",imageAttachment:"Image attachment",attachedCount:"{count} attached",removeQueued:"Remove queued message {index}",messageHarness:"Message {harness}",messageAgent:"Message agent",composerConnecting:"Connecting\u2026",composerFailed:"Retry or edit the unsent message\u2026",composerEditing:"Edit and resend\u2026",composerSteer:"Redirect the current turn\u2026",composerQueue:"Queue a follow-up\u2026",stopAgent:"Stop agent",queueInstead:"Queue follow-up instead",steerTurn:"Steer current turn",queueMessage:"Queue message",sendMessage:"Send message",steerFailed:"Could not steer the active turn.",ageNow:"now",ageMinutes:"{count}m ago",ageHours:"{count}h ago",ageDays:"{count}d ago",ageWeeks:"{count}w ago",noStartableHarness:"No connected harness can start a chat.",searchDescription:"Search recent conversations.",closeSearch:"Close search",searchConversations:"Search conversations",searchConversationsPlaceholder:"Search conversations\u2026",searching:"Searching\u2026",searchRetry:"Try search again",noSearchMatch:"No conversations match your search.",recentConversations:"{count} recent conversations",noChatMatch:"No chats match your search.",noChats:"No coding chats found.",loadingOlderChats:"Loading older chats\u2026",loadOlderChats:"Load older chats",rowReadOnly:"Read-only",rowWorking:"Working",rowUnread:"{count} unread",workingPreview:"Working\u2026",agentSessions:"{count} agent sessions",openAgentSessions:"Open {count} agent sessions in {title}",agentSessionsUnavailable:"{count} agent sessions \xB7 inspection unavailable",unreadMessages:"{count} unread messages",elsewhere:"elsewhere",participantVia:"{name} via {origin}",participantSomeone:"someone else",participantUnknownShort:"unknown participant",mirrorOf:"mirror of {harness}",channelFallback:"channel",loadingConnecting:"Connecting to coding agents",loadingConnectingDetail:"Checking installed harnesses and capabilities.",loadingStarting:"Starting {harness}",loadingStartingAgent:"Starting coding agent",loadingStartingDetail:"Opening a controlled session in this workspace.",loadingDiscovering:"Loading recent sessions",loadingDiscoveringDetail:"Scanning native session stores without loading full transcripts.",loadingReady:"Ready",loadingReadyDetail:"Coding sessions are up to date.",requestAnswered:"\u2713 Request answered \xB7 {name}",requestNeedsInput:"{kind} needs input",agentNeedsInput:"Agent needs input",contextCount:"Context \xB7 {count}",messageCopied:"Message copied",copyFailed:"Copy failed \xB7 retry",copyMessage:"Copy message",unrecognizedEntry:"Unrecognized entry",opaqueNotice:"Unrecognized entry kind {kind} \u2014 kept as-is, nothing dropped",rawEntry:"Raw entry",reasoning:"Reasoning",reasoningStreaming:"Reasoning\u2026",yourMessage:"Your message",assistantMessage:"Assistant message",entryTruncated:"Entry truncated by host \xB7 load native session for the complete value",truncatedMarker:"[truncated]",toolFallback:"Tool",toolNamedFailed:"{label} failed","toolRunning:read":"Reading","toolDone:read":"Read","toolFailed:read":"Read failed","toolRunning:search":"Searching","toolDone:search":"Searched","toolFailed:search":"Search failed","toolRunning:edit":"Editing","toolDone:edit":"Edited","toolFailed:edit":"Edit failed","toolRunning:command":"Running command","toolDone:command":"Ran command","toolFailed:command":"Command failed","toolRunning:test":"Running tests","toolDone:test":"Ran tests","toolFailed:test":"Tests failed","toolRunning:web":"Browsing","toolDone:web":"Browsed","toolFailed:web":"Browser action failed","toolRunning:agent":"Starting agent","toolDone:agent":"Started agent","toolFailed:agent":"Agent failed","toolRunning:plan":"Updating plan","toolDone:plan":"Updated plan","toolFailed:plan":"Plan update failed","argument:cmd":"Command","argument:command":"Command","argument:cwd":"Working directory","argument:file_path":"File","argument:target_file":"File","argument:path":"Path","argument:query":"Query","argument:pattern":"Pattern","argument:url":"URL",argumentDetails:"Details",durationMs:"{value}ms",durationSeconds:"{value}s",elapsedNow:"now",metricMatch:"{count} match",metricMatches:"{count} matches",metricExit:"exit {code}",diffPreview:"Diff preview",filePreview:"File preview",terminal:"Terminal",waitingOutput:"Waiting for output",noOutput:"No output",searchLabel:"Search",noTextResults:"No textual results",noDiff:"Edit completed without a textual diff",noFileContents:"File contents were not included in this event",waitingPage:"Waiting for the page",noPageSummary:"No page summary returned",agentWorking:"Agent is working",noHandoff:"No textual handoff returned",coordinatedTools:"Coordinated tools",nativeArguments:"Native arguments",nativeResult:"Native result",activityPending:"{count} actions in progress",activityFailed:"{count} actions \xB7 {failed} failed",activityExploredOne:"Explored {count} item",activityExplored:"Explored {count} items","activityOne:read":"{count} read","activityMany:read":"{count} reads","activityOne:search":"{count} search","activityMany:search":"{count} searches","activityOne:edit":"{count} edit","activityMany:edit":"{count} edits","activityOne:command":"{count} command","activityMany:command":"{count} commands","activityOne:test":"{count} test run","activityMany:test":"{count} test runs","activityOne:web":"{count} web action","activityMany:web":"{count} web actions","activityOne:agent":"{count} agent action","activityMany:agent":"{count} agent actions","activityOne:plan":"{count} plan update","activityMany:plan":"{count} plan updates","activityOne:other":"{count} action","activityMany:other":"{count} actions",plan:"Plan",planSteps:"Task plan steps",sessionDetails:"Session details",fidelity:"Fidelity",nativeRecords:"Native records",residue:"Residue",residueRetained:"{count} retained",parseDiagnostics:"Parse diagnostics",subagentSource:"{source} subagent",subagentDetail:"{messages} messages \xB7 {fidelity}",finishedWorking:"{harness} finished working",finishedWorkingAgent:"Coding agent finished working",conversation:"Conversation",loadEarlier:"Load earlier messages",listening:"{harness} is listening. Say something.",noTranscript:"No transcript yet.",newMessages:"New messages",newDivider:"New",pendingMessage:"Your pending message",notSent:"Not sent",sending:"Sending\u2026",harnessWorking:"{harness} is working",latest:"Latest",codeLanguage:"Code",codeRegion:"{language} code",copyCode:"Copy code",codeCopied:"Code copied","language:bash":"Shell","language:css":"CSS","language:html":"HTML","language:js":"JavaScript","language:javascript":"JavaScript","language:jsx":"JSX","language:md":"Markdown","language:markdown":"Markdown","language:py":"Python","language:python":"Python","language:rs":"Rust","language:rust":"Rust","language:sh":"Shell","language:shell":"Shell","language:ts":"TypeScript","language:tsx":"TSX","language:yaml":"YAML","language:yml":"YAML","language:json":"JSON","language:jsonc":"JSONC","language:sql":"SQL","language:xml":"XML",attachCandidate:"Attach {label}",attachedCandidate:"Attached {label}",candidateImage:"Image",candidateContext:"Context",availableContext:"Available context",attachedContext:"Attached context",attachedImages:"Attached images",removeContext:"Remove context {label}",removeImage:"Remove image {label}",imagePreview:"Image preview: {label}",imageCount:"{index} of {total}",imageActions:"Image actions",imageLinkCopied:"Image link copied",imageLinkFailed:"Could not copy image link",copyImageLink:"Copy image link",openOriginalImage:"Open original image",downloadImage:"Download image",closeImagePreview:"Close image preview",imageLoadFailed:"Could not load image",loadingImage:"Loading image\u2026",imageOutOfPayload:"The original stays out of the transcript payload.",previousImage:"Previous image",nextImage:"Next image",messageImages:"Message images",viewImage:"View image {label}",loadImage:"Load image {label}",loadPreview:"Load preview",previewUnavailable:"Preview unavailable",invalidHostImage:"The host returned an invalid image.",imageTooLargePreview:"This image is too large to preview safely.",imageLoadError:"Could not load this image.",tooManyImages:"Attach at most {max} images at a time.",imageBadType:"{name} is not PNG, JPEG, GIF, or WebP.",imageTooLarge:"{name} is larger than 5 MB.",imageReadFailed:"Could not read {name}.",thatImage:"That image",imageNoun:"image",pastedImage:"Pasted image",invalidAttachment:"The attachment picker returned an invalid item.",errorTitle:"Error",errorNoProvider:"Hermes has no model provider configured. Select a provider with hermes model, or run hermes setup for first-time configuration.",errorSeeDetails:"The request failed. Open Technical details for the reported error.",untitledChat:"Untitled chat","actor:user":"You","actor:assistant":"Agent","actor:tool":"Tool \xB7 {name}"}),Sn=Object.freeze({pill:Object.freeze({tone:"off",label:"connecting\u2026"}),startup:"connecting",transcript:Object.freeze([]),busy:!1,operation:null,needsInput:!1,harness:"",mode:"none",strategy:null,participant:Object.freeze({kind:"local-user",label:null,origin:null}),workspaceRef:Object.freeze({kind:"none",value:null}),mirror:null,holder:null,canSend:!1,canSteer:!1,canResume:!1,supportsResume:!1,continuationModes:Object.freeze([]),canBranch:!1,supportsBranch:!1,canAttach:!1,supportsAttach:!1,canDetach:!1,canOpenTerminal:!1,canExport:!1,canReduce:!1,canInterrupt:!1,canRespond:!1,canConfigureSettings:!1,messaging:null,workspace:"",taskPlan:Object.freeze({source:"none",items:Object.freeze([]),residueCount:0,observedAt:null}),semantics:Object.freeze({fidelity:null,residue:Object.freeze([]),residueCount:0,parseErrors:0,rawRecords:0,subagents:Object.freeze([])}),terminalHandoff:null,exportBackTarget:null,exportReceipt:null,reductionReceipt:null,interopSettings:null,interopSettingsError:null,harnessAuthentication:null,error:null,recoverable:!1,harnesses:Object.freeze([]),history:Object.freeze({sessionLimit:0,hasMoreSessions:!1,transcriptLimit:120,hasEarlier:!1}),savedDraft:"",attention:Object.freeze([]),sessions:Object.freeze([]),subagentInspector:null,attached:null,owned:null,attachError:null,agentPackage:null,contributions:Object.freeze([]),agentPackageError:null,agentPackageCapabilityState:null,agentPackageCapabilityError:null}),gl=new Set(["system","user","assistant","tool","reasoning","request","notice"]),bl=new Set(["none","control","mirror"]),yl=new Set(["start","resume","attach","branch","reduce"]),vl=new Set(["connecting","starting","discovering","ready"]),wa=new Set(["byte_lossless","value_lossless","semantic"]),_l=new Set(["read","search","edit","command","test","web","agent","plan","other"]),xl=new Set(["file","matches","diff","terminal","web","agent","plan","fields"]),kl=new Set(["idle","checking","required","configured","unavailable","launching","awaiting_user","verifying","authenticated","failed","cancelled"]),Ta=8,ke=800,Ia=4e3,wl=64,Cl=12,Ca=100,Sl=16e3;function N(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function Al(e){let t=N(e);if(t?.schema!=="supercode.harness-authentication-flow.v1"||!kl.has(t.phase))return null;let n=N(t.plan),r=N(t.error);return{schema:"supercode.harness-authentication-flow.v1",revision:Number.isSafeInteger(t.revision)?Math.max(0,t.revision):0,phase:t.phase,harness:typeof t.harness=="string"?k(t.harness,100):null,plan:n?{method:n.method==="device_code"?"device_code":"browser",interaction:n.interaction==="device_code"?"device_code":"browser",browserBehavior:n.browserBehavior==="none"?"none":"native_auto",headless:n.headless===!0,instructions:k(n.instructions,2e3)}:null,error:r&&typeof r.message=="string"?{code:k(r.code,100),message:k(r.message,2e3)}:null}}function re(e,t=""){return typeof e=="string"?e:t}function rt(e,t=0){return typeof e=="number"&&Number.isFinite(e)?e:t}function Se(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function Da(e){return typeof e!="string"||e.startsWith("/")||/^[a-z]:[\\/]/i.test(e)||e.replaceAll("\\","/").split("/").some(t=>t==="..")?null:k(e,1e3)}function Cn(e,t=0,n=new WeakSet){if(e===null||typeof e=="boolean"||typeof e=="string")return typeof e=="string"?k(e,Sl):e;if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(t>=Cl||!e||typeof e!="object"||n.has(e))return;if(n.add(e),Array.isArray(e)){let i=[];for(let a of e.slice(0,Ca)){let o=Cn(a,t+1,n);o!==void 0&&i.push(o)}return n.delete(e),i}let r=N(e);if(!r)return;let s={};for(let[i,a]of Object.entries(r).slice(0,Ca)){let o=Cn(a,t+1,n);o!==void 0&&(s[k(i,200)]=o)}return n.delete(e),s}function Nl(e){return Array.isArray(e)?e.slice(0,wl).flatMap(t=>{let n=N(t),r=N(n?.placement),s=Da(n?.source);if(n?.schema!=="supercode/contribution-v1"||typeof n.id!="string"||!n.id.trim()||typeof n.kind!="string"||!n.kind.trim()||s===null)return[];let i=Cn(n.data);return i===void 0?[]:[{schema:"supercode/contribution-v1",id:k(n.id,200),kind:k(n.kind,100),...typeof n.title=="string"?{title:k(n.title,500)}:{},...r?{placement:{...typeof r.surface=="string"?{surface:k(r.surface,100)}:{},...typeof r.region=="string"?{region:k(r.region,100)}:{}}}:{},data:i,source:s}]}):[]}function El(e){let t=N(e),n=N(t?.capabilities),r=N(t?.storage),s=Da(r?.relativePath);if(t?.schemaVersion!==1||typeof t.id!="string"||typeof t.name!="string"||typeof t.version!="string"||!n||!Array.isArray(n.required)||!Array.isArray(n.optional)||!r||s===null)return null;let i=N(t.resources);return{id:k(t.id,200),name:k(t.name,500),version:k(t.version,100),description:typeof t.description=="string"?k(t.description,2e3):null,capabilities:{required:n.required.filter(a=>typeof a=="string").slice(0,100).map(a=>k(a,200)),optional:n.optional.filter(a=>typeof a=="string").slice(0,100).map(a=>k(a,200))},storage:{relativePath:s},resources:i?Object.fromEntries(Object.entries(i).flatMap(([a,o])=>{let u=N(o);if(u?.schema!=="supercode/package-resource-state-v1")return[];if(u.status==="absent"&&typeof u.contributionId=="string")return[[k(a,200),{schema:"supercode/package-resource-state-v1",status:"absent",contributionId:k(u.contributionId,200)}]];if(u.status==="error"&&typeof u.contributionId=="string"&&typeof u.message=="string")return[[k(a,200),{schema:"supercode/package-resource-state-v1",status:"error",contributionId:k(u.contributionId,200),message:k(u.message)}]];let c=N(u?.resource),d=Cn(c?.data);return u?.status!=="ready"||c?.schema!=="supercode/package-resource-v1"||typeof c.contributionId!="string"||!["json","text"].includes(c.format)||typeof c.mediaType!="string"||d===void 0?[]:[[k(a,200),{schema:"supercode/package-resource-state-v1",status:"ready",resource:{schema:"supercode/package-resource-v1",contributionId:k(c.contributionId,200),format:c.format,mediaType:k(c.mediaType,200),data:d}}]]})):{}}}function Tl(e){let t=N(e);if(!t)return null;let n=["availableRequired","missingRequired","enabledOptional","unavailableOptional"];return n.every(r=>Array.isArray(t[r]))?{ready:t.ready===!0,...Object.fromEntries(n.map(r=>[r,t[r].filter(s=>typeof s=="string").slice(0,100).map(s=>k(s,200))]))}:null}function k(e,t=2e3){return typeof e!="string"?"":e.length<=t?e:`${e.slice(0,t)}\u2026`}function Il(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function he(e,t){for(let n of t)if(typeof e?.[n]=="string"&&e[n].trim())return e[n].trim();return""}function Ma(e){if(!e)return"";if(e.startsWith('"'))try{return JSON.parse(e)}catch{return""}return e.slice(1,-1).replaceAll("\\n",`
32
31
  `).replaceAll("\\t"," ").replaceAll("\\r","\r").replaceAll("\\`","`").replaceAll("\\'","'").replaceAll("\\\\","\\")}function nt(e,t){if(!e)return"";let n=t.join("|"),r=new RegExp(`(?:^|[,{\\s])["']?(?:${n})["']?\\s*:\\s*("(?:\\\\.|[^"\\\\])*"|'(?:\\\\.|[^'\\\\])*'|\`(?:\\\\.|[^\`\\\\])*\`)`).exec(e);return Ma(r?.[1])}function Dl(e,t){if(!e)return"";let n=t.join("|"),r=new RegExp(`\\b(?:${n})\\s*=\\s*("(?:\\\\.|[^"\\\\])*"|'(?:\\\\.|[^'\\\\])*'|\`(?:\\\\.|[^\`\\\\])*\`)`).exec(e);return Ma(r?.[1])}function Ml(e,t){let n=1,r="",s=!1,i=!1,a=!1;for(let o=t+1;o<e.length;o+=1){let u=e[o],c=e[o+1];if(i){u===`
33
32
  `&&(i=!1);continue}if(a){u==="*"&&c==="/"&&(a=!1,o+=1);continue}if(r){s?s=!1:u==="\\"?s=!0:u===r&&(r="");continue}if(u==="/"&&c==="/"){i=!0,o+=1;continue}if(u==="/"&&c==="*"){a=!0,o+=1;continue}if(u==='"'||u==="'"||u==="`"){r=u;continue}if(u==="(")n+=1;else if(u===")"&&(n-=1)===0)return e.slice(t+1,o)}return e.slice(t+1)}function Fl(e){let t=[],n="",r=!1,s=!1,i=!1;for(let a=0;a<e.length&&t.length<8;a+=1){let o=e[a],u=e[a+1];if(s){o===`