@band-app/server 0.54.1 → 0.54.3
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/dist/client/_shell.html +0 -0
- package/dist/client/assets/{TerminalPanel-CfzL015Z.js → TerminalPanel-Xl6oGaup.js} +1 -1
- package/dist/client/assets/{_basePickBy-DCBI2ZYZ.js → _basePickBy-CPkUkuQZ.js} +1 -1
- package/dist/client/assets/{_baseUniq-DcG-qGfl.js → _baseUniq-Cwz3JodT.js} +1 -1
- package/dist/client/assets/{arc-Dtd3NOeG.js → arc-DwsdIXPp.js} +1 -1
- package/dist/client/assets/{architectureDiagram-VXUJARFQ-_4wJCo66.js → architectureDiagram-VXUJARFQ-SXYkL9tA.js} +1 -1
- package/dist/client/assets/{blockDiagram-VD42YOAC-BLg8A5DO.js → blockDiagram-VD42YOAC-BJA-EF6e.js} +1 -1
- package/dist/client/assets/{c4Diagram-YG6GDRKO-1o6lovC1.js → c4Diagram-YG6GDRKO-Dx-xhS0w.js} +1 -1
- package/dist/client/assets/channel-2mY-lkL6.js +1 -0
- package/dist/client/assets/{chunk-4BX2VUAB-pUhlexDl.js → chunk-4BX2VUAB-hIHAP7Cm.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-DIOOkGXI.js → chunk-55IACEB6-B819cB7q.js} +1 -1
- package/dist/client/assets/{chunk-B4BG7PRW-betJcaMy.js → chunk-B4BG7PRW-B1YMhrD2.js} +1 -1
- package/dist/client/assets/{chunk-DI55MBZ5-Du6zLzqO.js → chunk-DI55MBZ5-B6E7V5JJ.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-jlnPGz3-.js → chunk-FMBD7UC4-Cto0C9v0.js} +1 -1
- package/dist/client/assets/{chunk-QN33PNHL-BtZcZKWT.js → chunk-QN33PNHL-FlpvaPrY.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-CCXlh8PQ.js → chunk-QZHKN3VN-hfVUofCn.js} +1 -1
- package/dist/client/assets/{chunk-TZMSLE5B-EGqxu3bA.js → chunk-TZMSLE5B-B6Uwm_RZ.js} +1 -1
- package/dist/client/assets/classDiagram-2ON5EDUG-CxKjlsUh.js +1 -0
- package/dist/client/assets/classDiagram-v2-WZHVMYZB-CxKjlsUh.js +1 -0
- package/dist/client/assets/clone-CTVr6Med.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-CiQDuqKy.js → cose-bilkent-S5V4N54A-N9jnwEcj.js} +1 -1
- package/dist/client/assets/{dagre-6UL2VRFP-BV1RIA6i.js → dagre-6UL2VRFP-Ckg49tw0.js} +1 -1
- package/dist/client/assets/{diagram-PSM6KHXK-oZBpmBZ4.js → diagram-PSM6KHXK-Dgp_MGHT.js} +1 -1
- package/dist/client/assets/{diagram-QEK2KX5R-BvBvt_5J.js → diagram-QEK2KX5R-HqtNbPpi.js} +1 -1
- package/dist/client/assets/{diagram-S2PKOQOG-sjeU7pbV.js → diagram-S2PKOQOG-B9kmoM2C.js} +1 -1
- package/dist/client/assets/{erDiagram-Q2GNP2WA-DnmU3JYj.js → erDiagram-Q2GNP2WA-CX0bAjbe.js} +1 -1
- package/dist/client/assets/{flowDiagram-NV44I4VS-vWTy8wO1.js → flowDiagram-NV44I4VS-BlNstfD-.js} +1 -1
- package/dist/client/assets/{ganttDiagram-JELNMOA3-C8UgEfn6.js → ganttDiagram-JELNMOA3-Bngv2UfV.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-D4Y2-pQd.js → gitGraphDiagram-V2S2FVAM-DaVgpKKU.js} +1 -1
- package/dist/client/assets/{graph-wAJZ-snQ.js → graph-DJibyMhY.js} +1 -1
- package/dist/client/assets/{highlighted-body-B3W2YXNL-BS1x7lkZ.js → highlighted-body-B3W2YXNL-8sRLcOTz.js} +1 -1
- package/dist/client/assets/{index-ZYHE2FSs.js → index-BWbHkoFf.js} +1 -1
- package/dist/client/assets/{index-21p4gEDF.js → index-BYWdCHQD.js} +1 -1
- package/dist/client/assets/{index-ClYtumza.js → index-BdPmfxoL.js} +1 -1
- package/dist/client/assets/{index-BULPK8ND.js → index-BsY88S9G.js} +1 -1
- package/dist/client/assets/{index-DRo8uUPl.js → index-C8jptsrq.js} +1 -1
- package/dist/client/assets/{index-DvCvhnCb.js → index-CSlSUYm9.js} +1 -1
- package/dist/client/assets/{index-Hh-Dy8VL.js → index-CZkHIWnu.js} +1 -1
- package/dist/client/assets/{index-g0Sr5h74.js → index-D_Hnyp0H.js} +1 -1
- package/dist/client/assets/{index-B52rCane.js → index-QiwXMA-_.js} +1 -1
- package/dist/client/assets/{index-BMcO1RPX.js → index-ROMcQtWt.js} +1 -1
- package/dist/client/assets/{index-CDRJgI3A.js → index-SOcZR9zA.js} +1 -1
- package/dist/client/assets/{index-DIelkckr.js → index-Y9ds9lfC.js} +1 -1
- package/dist/client/assets/{index-CxNXgFPY.js → index-hBffkV04.js} +1 -1
- package/dist/client/assets/{infoDiagram-HS3SLOUP-CmZ04ZX2.js → infoDiagram-HS3SLOUP-BaXQhmZS.js} +1 -1
- package/dist/client/assets/{journeyDiagram-XKPGCS4Q-CyBTVa_6.js → journeyDiagram-XKPGCS4Q-Bn4XhLKd.js} +1 -1
- package/dist/client/assets/{kanban-definition-3W4ZIXB7-C6sCohDW.js → kanban-definition-3W4ZIXB7-Dbz9IJS9.js} +1 -1
- package/dist/client/assets/{layout-DbAdffkE.js → layout-KhM6N15I.js} +1 -1
- package/dist/client/assets/{main-DfjP5I-Q.js → main-CqSslSJI.js} +204 -204
- package/dist/client/assets/{mindmap-definition-VGOIOE7T-D4byQ-t_.js → mindmap-definition-VGOIOE7T-G-zFfV9G.js} +1 -1
- package/dist/client/assets/{pieDiagram-ADFJNKIX-SdHTH4tD.js → pieDiagram-ADFJNKIX-BhPxI2x7.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-AYHSOK5B-CctaxdVX.js → quadrantDiagram-AYHSOK5B-B-GNhRJU.js} +1 -1
- package/dist/client/assets/{requirementDiagram-UZGBJVZJ-BiuKR3TQ.js → requirementDiagram-UZGBJVZJ-DQJdQFIw.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-TZEHDZUN-BTpPs36c.js → sankeyDiagram-TZEHDZUN-DrPdLIfN.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-WL72ISMW-BRAorH_1.js → sequenceDiagram-WL72ISMW-0iaye3zO.js} +1 -1
- package/dist/client/assets/{stateDiagram-FKZM4ZOC-BtHKF925.js → stateDiagram-FKZM4ZOC-B2-QB2W0.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-4FDKWEC3-pfnkktuh.js +1 -0
- package/dist/client/assets/{timeline-definition-IT6M3QCI-BxQS_MT5.js → timeline-definition-IT6M3QCI-M883VntJ.js} +1 -1
- package/dist/client/assets/{treemap-GDKQZRPO-DdrDkT5H.js → treemap-GDKQZRPO-NQBhY7Vk.js} +1 -1
- package/dist/client/assets/{worktree._worktreeId-CVx6cyp5.js → worktree._worktreeId-D-GKIuuU.js} +1 -1
- package/dist/client/assets/{worktree._worktreeId-C2psBRXR.js → worktree._worktreeId-D3DbNkyK.js} +1 -1
- package/dist/client/assets/{xychartDiagram-PRI3JC2R-R2Q9xRsW.js → xychartDiagram-PRI3JC2R-l_IPT77x.js} +1 -1
- package/dist/openapi.json +16 -0
- package/dist/start-server.mjs +116 -17
- package/package.json +5 -5
- package/dist/client/assets/channel-CXnvJLnE.js +0 -1
- package/dist/client/assets/classDiagram-2ON5EDUG-Dp5-cWrq.js +0 -1
- package/dist/client/assets/classDiagram-v2-WZHVMYZB-Dp5-cWrq.js +0 -1
- package/dist/client/assets/clone-D5FdW0HP.js +0 -1
- package/dist/client/assets/stateDiagram-v2-4FDKWEC3-B40ZaZyn.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cQ as Oh,cR as xh,cf as bd,cA as Dh,cj as Mh,cg as je,b0 as Fh,b1 as bl,cq as Gh,ct as _d,cu as Id,cr as Uh,cF as _l,b3 as Yn,b4 as ae,ch as qh,cb as jh,cS as zh,cT as En}from"./main-DfjP5I-Q.js";import{k as qr,j as tl,g as Hr,S as Bh,w as Wh,x as Vh,c as Pd,v as $e,y as $d,l as Kh,z as Hh,A as Yh,B as Xh,C as Jh,a as Ld,d as q,i as tn,r as Je,f as ht,D as Fe}from"./_baseUniq-DcG-qGfl.js";import{j as nl,m as M,d as Qh,f as yt,g as jr,h as z,i as rl,l as jn,e as Zh}from"./_basePickBy-DCBI2ZYZ.js";import{c as Be}from"./clone-D5FdW0HP.js";var ep=Object.prototype,tp=ep.hasOwnProperty,ft=Oh(function(t,e){if(xh(e)||bd(e)){Dh(e,qr(e),t);return}for(var n in e)tp.call(e,n)&&Mh(t,n,e[n])});function Od(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function ns(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}function np(t,e,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;){var a=t[i];e(r,a,n(a),t)}return r}function rp(t,e,n,r){return tl(t,function(i,s,a){e(r,i,n(i),a)}),r}function ip(t,e){return function(n,r){var i=je(n)?np:rp,s=e?e():{};return i(n,t,Hr(r),s)}}var sp=200;function ap(t,e,n,r){var i=-1,s=Wh,a=!0,o=t.length,c=[],l=e.length;if(!o)return c;e.length>=sp&&(s=Vh,a=!1,e=new Bh(e));e:for(;++i<o;){var u=t[i],f=u;if(u=u!==0?u:0,a&&f===f){for(var m=l;m--;)if(e[m]===f)continue e;c.push(u)}else s(e,f,r)||c.push(u)}return c}var _a=Fh(function(t,e){return bl(t)?ap(t,Pd(e,1,bl,!0)):[]});function Ge(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:nl(e),Od(t,e<0?0:e,r)):[]}function zi(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:nl(e),e=r-e,Od(t,0,e<0?0:e)):[]}function op(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function cp(t,e){var n=!0;return tl(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function kt(t,e,n){var r=je(t)?op:cp;return r(t,Hr(e))}function wt(t){return t&&t.length?t[0]:void 0}function dt(t,e){return Pd(M(t,e))}var lp=Object.prototype,up=lp.hasOwnProperty,dp=ip(function(t,e,n){up.call(t,n)?t[n].push(e):Gh(t,n,[e])}),fp="[object String]";function nt(t){return typeof t=="string"||!je(t)&&_d(t)&&Id(t)==fp}var hp=Math.max;function et(t,e,n,r){t=bd(t)?t:$e(t),n=n?nl(n):0;var i=t.length;return n<0&&(n=hp(i+n,0)),nt(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&$d(t,e,n)>-1}function Il(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return $d(t,e,i)}var pp="[object RegExp]";function mp(t){return _d(t)&&Id(t)==pp}var Pl=_l&&_l.isRegExp,nn=Pl?Uh(Pl):mp,gp="Expected a function";function yp(t){if(typeof t!="function")throw new TypeError(gp);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Nt(t,e){if(t==null)return{};var n=Kh(Hh(t),function(r){return[r]});return e=Hr(e),Qh(t,n,function(r,i){return e(r,i[0])})}function Ia(t,e){var n=je(t)?Yh:Xh;return n(t,yp(Hr(e)))}function Tp(t,e){var n;return tl(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function xd(t,e,n){var r=je(t)?Jh:Tp;return r(t,Hr(e))}function il(t){return t&&t.length?Ld(t):[]}function Rp(t,e){return t&&t.length?Ld(t,Hr(e)):[]}function We(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function St(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function un(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function vp(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function fi(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Dd{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=n.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const n=this.types[e];return n||{name:e,properties:{},superTypes:[]}}isInstance(e,n){return We(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.types[e],a=s?s.superTypes.some(o=>this.isSubtype(o,n)):!1;return r[n]=a,a}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Bi(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Md(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Fd(t){return Bi(t)&&typeof t.fullText=="string"}class Ue{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new Ue(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return lt})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=Ep(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new Ue(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?lt:{done:!1,value:e(i)}})}filter(e){return new Ue(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return lt})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new Ue(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(aa(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return lt})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new Ue(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(aa(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return lt})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new Ue(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new Ue(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?lt:this.nextFn(n.state)))}distinct(e){return new Ue(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return lt})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function Ep(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function aa(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Gd=new Ue(()=>{},()=>lt),lt=Object.freeze({done:!0,value:void 0});function me(...t){if(t.length===1){const e=t[0];if(e instanceof Ue)return e;if(aa(e))return new Ue(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new Ue(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:lt)}return t.length>1?new Ue(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const n=t[e.collIndex++];aa(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return lt}):Gd}class sl extends Ue{constructor(e,n,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return lt})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var To;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})(To||(To={}));function Ro(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{We(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Ro(i,e))}):We(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Ro(r,e)))}function Pa(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function Qt(t){const n=Ws(t).$document;if(!n)throw new Error("AST node has no document.");return n}function Ws(t){for(;t.$container;)t=t.$container;return t}function $l(t){return St(t)?t.ref?[t.ref]:[]:un(t)?t.items.map(e=>e.ref):[]}function al(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e?.range;return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(We(s)){if(r.keyIndex++,Ll(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const a=r.arrayIndex++,o=s[a];if(We(o)&&Ll(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return lt})}function rs(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new sl(t,n=>al(n,e))}function Zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new sl(t,n=>al(n,e),{includeRoot:!0})}function Ll(t,e){if(!e)return!0;const n=t.$cstNode?.range;return n?Bp(n,e):!1}function oa(t){return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if(St(r)||un(r))return e.keyIndex++,{done:!1,value:{reference:r,container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if(St(s)||un(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return lt})}function Ap(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.name]=Ud(i.defaultValue))}function Ud(t){return Array.isArray(t)?[...t.map(Ud)]:t}const ct={$type:"AbstractElement",cardinality:"cardinality"};function Sp(t){return ee.isInstance(t,ct.$type)}const Vs={$type:"AbstractParserRule"};function is(t){return ee.isInstance(t,Vs.$type)}const Is={$type:"AbstractRule"},Et={$type:"AbstractType"},On={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function $a(t){return ee.isInstance(t,On.$type)}const Ks={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function qd(t){return ee.isInstance(t,Ks.$type)}const Ol={$type:"ArrayLiteral",elements:"elements"},xl={$type:"ArrayType",elementType:"elementType"},xn={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function zn(t){return ee.isInstance(t,xn.$type)}const vo={$type:"BooleanLiteral",true:"true"};function kp(t){return ee.isInstance(t,vo.$type)}const Dn={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Cp(t){return ee.isInstance(t,Dn.$type)}const nr={$type:"Condition"},Hs={$type:"Conjunction",left:"left",right:"right"};function wp(t){return ee.isInstance(t,Hs.$type)}const Mn={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function La(t){return ee.isInstance(t,Mn.$type)}const Ys={$type:"Disjunction",left:"left",right:"right"};function Np(t){return ee.isInstance(t,Ys.$type)}const Eo={$type:"EndOfFile",cardinality:"cardinality"};function bp(t){return ee.isInstance(t,Eo.$type)}const An={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Dl={$type:"GrammarImport",path:"path"},cr={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function ol(t){return ee.isInstance(t,cr.$type)}const Ao={$type:"InferredType",name:"name"};function jd(t){return ee.isInstance(t,Ao.$type)}const Vt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function ca(t){return ee.isInstance(t,Vt.$type)}const Ka={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},Ml={$type:"InfixRuleOperators",precedences:"precedences"},Li={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function _p(t){return ee.isInstance(t,Li.$type)}const Oi={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Bn(t){return ee.isInstance(t,Oi.$type)}const Ps={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},lr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Ip(t){return ee.isInstance(t,lr.$type)}const So={$type:"Negation",value:"value"};function Pp(t){return ee.isInstance(t,So.$type)}const Fl={$type:"NumberLiteral",value:"value"},$s={$type:"Parameter",name:"name"},ko={$type:"ParameterReference",parameter:"parameter"};function $p(t){return ee.isInstance(t,ko.$type)}const Pt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function sn(t){return ee.isInstance(t,Pt.$type)}const Ha={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},ur={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Lp(t){return ee.isInstance(t,ur.$type)}const Co={$type:"ReturnType",name:"name"};function Op(t){return ee.isInstance(t,Co.$type)}const dr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Wn(t){return ee.isInstance(t,dr.$type)}const xi={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function xp(t){return ee.isInstance(t,xi.$type)}const Gl={$type:"StringLiteral",value:"value"},fr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Dp(t){return ee.isInstance(t,fr.$type)}const gt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},hr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Mp(t){return ee.isInstance(t,hr.$type)}const ln={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function an(t){return ee.isInstance(t,ln.$type)}const pr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Fp(t){return ee.isInstance(t,pr.$type)}const Xs={$type:"Type",name:"name",type:"type"};function Gp(t){return ee.isInstance(t,Xs.$type)}const hi={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},pi={$type:"TypeDefinition"},Ul={$type:"UnionType",types:"types"},Js={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function zd(t){return ee.isInstance(t,Js.$type)}const mr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Up(t){return ee.isInstance(t,mr.$type)}const mi={$type:"ValueLiteral"},Di={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function qp(t){return ee.isInstance(t,Di.$type)}class Bd extends Dd{constructor(){super(...arguments),this.types={AbstractElement:{name:ct.$type,properties:{cardinality:{name:ct.cardinality}},superTypes:[]},AbstractParserRule:{name:Vs.$type,properties:{},superTypes:[Is.$type,Et.$type]},AbstractRule:{name:Is.$type,properties:{},superTypes:[]},AbstractType:{name:Et.$type,properties:{},superTypes:[]},Action:{name:On.$type,properties:{cardinality:{name:On.cardinality},feature:{name:On.feature},inferredType:{name:On.inferredType},operator:{name:On.operator},type:{name:On.type,referenceType:Et.$type}},superTypes:[ct.$type]},Alternatives:{name:Ks.$type,properties:{cardinality:{name:Ks.cardinality},elements:{name:Ks.elements,defaultValue:[]}},superTypes:[ct.$type]},ArrayLiteral:{name:Ol.$type,properties:{elements:{name:Ol.elements,defaultValue:[]}},superTypes:[mi.$type]},ArrayType:{name:xl.$type,properties:{elementType:{name:xl.elementType}},superTypes:[pi.$type]},Assignment:{name:xn.$type,properties:{cardinality:{name:xn.cardinality},feature:{name:xn.feature},operator:{name:xn.operator},predicate:{name:xn.predicate},terminal:{name:xn.terminal}},superTypes:[ct.$type]},BooleanLiteral:{name:vo.$type,properties:{true:{name:vo.true,defaultValue:!1}},superTypes:[nr.$type,mi.$type]},CharacterRange:{name:Dn.$type,properties:{cardinality:{name:Dn.cardinality},left:{name:Dn.left},lookahead:{name:Dn.lookahead},parenthesized:{name:Dn.parenthesized,defaultValue:!1},right:{name:Dn.right}},superTypes:[gt.$type]},Condition:{name:nr.$type,properties:{},superTypes:[]},Conjunction:{name:Hs.$type,properties:{left:{name:Hs.left},right:{name:Hs.right}},superTypes:[nr.$type]},CrossReference:{name:Mn.$type,properties:{cardinality:{name:Mn.cardinality},deprecatedSyntax:{name:Mn.deprecatedSyntax,defaultValue:!1},isMulti:{name:Mn.isMulti,defaultValue:!1},terminal:{name:Mn.terminal},type:{name:Mn.type,referenceType:Et.$type}},superTypes:[ct.$type]},Disjunction:{name:Ys.$type,properties:{left:{name:Ys.left},right:{name:Ys.right}},superTypes:[nr.$type]},EndOfFile:{name:Eo.$type,properties:{cardinality:{name:Eo.cardinality}},superTypes:[ct.$type]},Grammar:{name:An.$type,properties:{imports:{name:An.imports,defaultValue:[]},interfaces:{name:An.interfaces,defaultValue:[]},isDeclared:{name:An.isDeclared,defaultValue:!1},name:{name:An.name},rules:{name:An.rules,defaultValue:[]},types:{name:An.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Dl.$type,properties:{path:{name:Dl.path}},superTypes:[]},Group:{name:cr.$type,properties:{cardinality:{name:cr.cardinality},elements:{name:cr.elements,defaultValue:[]},guardCondition:{name:cr.guardCondition},predicate:{name:cr.predicate}},superTypes:[ct.$type]},InferredType:{name:Ao.$type,properties:{name:{name:Ao.name}},superTypes:[Et.$type]},InfixRule:{name:Vt.$type,properties:{call:{name:Vt.call},dataType:{name:Vt.dataType},inferredType:{name:Vt.inferredType},name:{name:Vt.name},operators:{name:Vt.operators},parameters:{name:Vt.parameters,defaultValue:[]},returnType:{name:Vt.returnType,referenceType:Et.$type}},superTypes:[Vs.$type]},InfixRuleOperatorList:{name:Ka.$type,properties:{associativity:{name:Ka.associativity},operators:{name:Ka.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ml.$type,properties:{precedences:{name:Ml.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Li.$type,properties:{attributes:{name:Li.attributes,defaultValue:[]},name:{name:Li.name},superTypes:{name:Li.superTypes,defaultValue:[],referenceType:Et.$type}},superTypes:[Et.$type]},Keyword:{name:Oi.$type,properties:{cardinality:{name:Oi.cardinality},predicate:{name:Oi.predicate},value:{name:Oi.value}},superTypes:[ct.$type]},NamedArgument:{name:Ps.$type,properties:{calledByName:{name:Ps.calledByName,defaultValue:!1},parameter:{name:Ps.parameter,referenceType:$s.$type},value:{name:Ps.value}},superTypes:[]},NegatedToken:{name:lr.$type,properties:{cardinality:{name:lr.cardinality},lookahead:{name:lr.lookahead},parenthesized:{name:lr.parenthesized,defaultValue:!1},terminal:{name:lr.terminal}},superTypes:[gt.$type]},Negation:{name:So.$type,properties:{value:{name:So.value}},superTypes:[nr.$type]},NumberLiteral:{name:Fl.$type,properties:{value:{name:Fl.value}},superTypes:[mi.$type]},Parameter:{name:$s.$type,properties:{name:{name:$s.name}},superTypes:[]},ParameterReference:{name:ko.$type,properties:{parameter:{name:ko.parameter,referenceType:$s.$type}},superTypes:[nr.$type]},ParserRule:{name:Pt.$type,properties:{dataType:{name:Pt.dataType},definition:{name:Pt.definition},entry:{name:Pt.entry,defaultValue:!1},fragment:{name:Pt.fragment,defaultValue:!1},inferredType:{name:Pt.inferredType},name:{name:Pt.name},parameters:{name:Pt.parameters,defaultValue:[]},returnType:{name:Pt.returnType,referenceType:Et.$type}},superTypes:[Vs.$type]},ReferenceType:{name:Ha.$type,properties:{isMulti:{name:Ha.isMulti,defaultValue:!1},referenceType:{name:Ha.referenceType}},superTypes:[pi.$type]},RegexToken:{name:ur.$type,properties:{cardinality:{name:ur.cardinality},lookahead:{name:ur.lookahead},parenthesized:{name:ur.parenthesized,defaultValue:!1},regex:{name:ur.regex}},superTypes:[gt.$type]},ReturnType:{name:Co.$type,properties:{name:{name:Co.name}},superTypes:[]},RuleCall:{name:dr.$type,properties:{arguments:{name:dr.arguments,defaultValue:[]},cardinality:{name:dr.cardinality},predicate:{name:dr.predicate},rule:{name:dr.rule,referenceType:Is.$type}},superTypes:[ct.$type]},SimpleType:{name:xi.$type,properties:{primitiveType:{name:xi.primitiveType},stringType:{name:xi.stringType},typeRef:{name:xi.typeRef,referenceType:Et.$type}},superTypes:[pi.$type]},StringLiteral:{name:Gl.$type,properties:{value:{name:Gl.value}},superTypes:[mi.$type]},TerminalAlternatives:{name:fr.$type,properties:{cardinality:{name:fr.cardinality},elements:{name:fr.elements,defaultValue:[]},lookahead:{name:fr.lookahead},parenthesized:{name:fr.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalElement:{name:gt.$type,properties:{cardinality:{name:gt.cardinality},lookahead:{name:gt.lookahead},parenthesized:{name:gt.parenthesized,defaultValue:!1}},superTypes:[ct.$type]},TerminalGroup:{name:hr.$type,properties:{cardinality:{name:hr.cardinality},elements:{name:hr.elements,defaultValue:[]},lookahead:{name:hr.lookahead},parenthesized:{name:hr.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalRule:{name:ln.$type,properties:{definition:{name:ln.definition},fragment:{name:ln.fragment,defaultValue:!1},hidden:{name:ln.hidden,defaultValue:!1},name:{name:ln.name},type:{name:ln.type}},superTypes:[Is.$type]},TerminalRuleCall:{name:pr.$type,properties:{cardinality:{name:pr.cardinality},lookahead:{name:pr.lookahead},parenthesized:{name:pr.parenthesized,defaultValue:!1},rule:{name:pr.rule,referenceType:ln.$type}},superTypes:[gt.$type]},Type:{name:Xs.$type,properties:{name:{name:Xs.name},type:{name:Xs.type}},superTypes:[Et.$type]},TypeAttribute:{name:hi.$type,properties:{defaultValue:{name:hi.defaultValue},isOptional:{name:hi.isOptional,defaultValue:!1},name:{name:hi.name},type:{name:hi.type}},superTypes:[]},TypeDefinition:{name:pi.$type,properties:{},superTypes:[]},UnionType:{name:Ul.$type,properties:{types:{name:Ul.types,defaultValue:[]}},superTypes:[pi.$type]},UnorderedGroup:{name:Js.$type,properties:{cardinality:{name:Js.cardinality},elements:{name:Js.elements,defaultValue:[]}},superTypes:[ct.$type]},UntilToken:{name:mr.$type,properties:{cardinality:{name:mr.cardinality},lookahead:{name:mr.lookahead},parenthesized:{name:mr.parenthesized,defaultValue:!1},terminal:{name:mr.terminal}},superTypes:[gt.$type]},ValueLiteral:{name:mi.$type,properties:{},superTypes:[]},Wildcard:{name:Di.$type,properties:{cardinality:{name:Di.cardinality},lookahead:{name:Di.lookahead},parenthesized:{name:Di.parenthesized,defaultValue:!1}},superTypes:[gt.$type]}}}}const ee=new Bd;function wo(t){return new sl(t,e=>Bi(e)?e.content:[],{includeRoot:!0})}function jp(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function No(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function la(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var Xt;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(Xt||(Xt={}));function zp(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Xt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Xt.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?Xt.Inside:n?Xt.OverlapBack:r?Xt.OverlapFront:Xt.Outside}function Bp(t,e){return zp(t,e)>Xt.After}const Wp=/^[\w\p{L}]$/u;function Vp(t,e){if(t){const n=Kp(t,!0);if(n&&ql(n,e))return n;if(Fd(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(ql(s,e))return s}}}}function ql(t,e){return Md(t)&&e.includes(t.tokenType.name)}function Kp(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class Wd extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function ss(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function Ya(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function gi(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function rr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Hp(){throw Error("Internal Error - Should never get here!")}function jl(t){return t.type==="Character"}const ua=[];for(let t=W("0");t<=W("9");t++)ua.push(t);const da=[W("_")].concat(ua);for(let t=W("a");t<=W("z");t++)da.push(t);for(let t=W("A");t<=W("Z");t++)da.push(t);const zl=[W(" "),W("\f"),W(`
|
|
1
|
+
import{cQ as Oh,cR as xh,cf as bd,cA as Dh,cj as Mh,cg as je,b0 as Fh,b1 as bl,cq as Gh,ct as _d,cu as Id,cr as Uh,cF as _l,b3 as Yn,b4 as ae,ch as qh,cb as jh,cS as zh,cT as En}from"./main-CqSslSJI.js";import{k as qr,j as tl,g as Hr,S as Bh,w as Wh,x as Vh,c as Pd,v as $e,y as $d,l as Kh,z as Hh,A as Yh,B as Xh,C as Jh,a as Ld,d as q,i as tn,r as Je,f as ht,D as Fe}from"./_baseUniq-Cwz3JodT.js";import{j as nl,m as M,d as Qh,f as yt,g as jr,h as z,i as rl,l as jn,e as Zh}from"./_basePickBy-CPkUkuQZ.js";import{c as Be}from"./clone-CTVr6Med.js";var ep=Object.prototype,tp=ep.hasOwnProperty,ft=Oh(function(t,e){if(xh(e)||bd(e)){Dh(e,qr(e),t);return}for(var n in e)tp.call(e,n)&&Mh(t,n,e[n])});function Od(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function ns(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}function np(t,e,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;){var a=t[i];e(r,a,n(a),t)}return r}function rp(t,e,n,r){return tl(t,function(i,s,a){e(r,i,n(i),a)}),r}function ip(t,e){return function(n,r){var i=je(n)?np:rp,s=e?e():{};return i(n,t,Hr(r),s)}}var sp=200;function ap(t,e,n,r){var i=-1,s=Wh,a=!0,o=t.length,c=[],l=e.length;if(!o)return c;e.length>=sp&&(s=Vh,a=!1,e=new Bh(e));e:for(;++i<o;){var u=t[i],f=u;if(u=u!==0?u:0,a&&f===f){for(var m=l;m--;)if(e[m]===f)continue e;c.push(u)}else s(e,f,r)||c.push(u)}return c}var _a=Fh(function(t,e){return bl(t)?ap(t,Pd(e,1,bl,!0)):[]});function Ge(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:nl(e),Od(t,e<0?0:e,r)):[]}function zi(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:nl(e),e=r-e,Od(t,0,e<0?0:e)):[]}function op(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function cp(t,e){var n=!0;return tl(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function kt(t,e,n){var r=je(t)?op:cp;return r(t,Hr(e))}function wt(t){return t&&t.length?t[0]:void 0}function dt(t,e){return Pd(M(t,e))}var lp=Object.prototype,up=lp.hasOwnProperty,dp=ip(function(t,e,n){up.call(t,n)?t[n].push(e):Gh(t,n,[e])}),fp="[object String]";function nt(t){return typeof t=="string"||!je(t)&&_d(t)&&Id(t)==fp}var hp=Math.max;function et(t,e,n,r){t=bd(t)?t:$e(t),n=n?nl(n):0;var i=t.length;return n<0&&(n=hp(i+n,0)),nt(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&$d(t,e,n)>-1}function Il(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return $d(t,e,i)}var pp="[object RegExp]";function mp(t){return _d(t)&&Id(t)==pp}var Pl=_l&&_l.isRegExp,nn=Pl?Uh(Pl):mp,gp="Expected a function";function yp(t){if(typeof t!="function")throw new TypeError(gp);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Nt(t,e){if(t==null)return{};var n=Kh(Hh(t),function(r){return[r]});return e=Hr(e),Qh(t,n,function(r,i){return e(r,i[0])})}function Ia(t,e){var n=je(t)?Yh:Xh;return n(t,yp(Hr(e)))}function Tp(t,e){var n;return tl(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function xd(t,e,n){var r=je(t)?Jh:Tp;return r(t,Hr(e))}function il(t){return t&&t.length?Ld(t):[]}function Rp(t,e){return t&&t.length?Ld(t,Hr(e)):[]}function We(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function St(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function un(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function vp(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function fi(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Dd{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=n.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const n=this.types[e];return n||{name:e,properties:{},superTypes:[]}}isInstance(e,n){return We(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.types[e],a=s?s.superTypes.some(o=>this.isSubtype(o,n)):!1;return r[n]=a,a}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Bi(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Md(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Fd(t){return Bi(t)&&typeof t.fullText=="string"}class Ue{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new Ue(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return lt})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=Ep(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new Ue(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?lt:{done:!1,value:e(i)}})}filter(e){return new Ue(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return lt})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new Ue(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(aa(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return lt})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new Ue(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(aa(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return lt})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new Ue(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new Ue(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?lt:this.nextFn(n.state)))}distinct(e){return new Ue(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return lt})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function Ep(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function aa(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Gd=new Ue(()=>{},()=>lt),lt=Object.freeze({done:!0,value:void 0});function me(...t){if(t.length===1){const e=t[0];if(e instanceof Ue)return e;if(aa(e))return new Ue(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new Ue(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:lt)}return t.length>1?new Ue(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const n=t[e.collIndex++];aa(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return lt}):Gd}class sl extends Ue{constructor(e,n,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return lt})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var To;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})(To||(To={}));function Ro(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{We(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Ro(i,e))}):We(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Ro(r,e)))}function Pa(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function Qt(t){const n=Ws(t).$document;if(!n)throw new Error("AST node has no document.");return n}function Ws(t){for(;t.$container;)t=t.$container;return t}function $l(t){return St(t)?t.ref?[t.ref]:[]:un(t)?t.items.map(e=>e.ref):[]}function al(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e?.range;return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(We(s)){if(r.keyIndex++,Ll(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const a=r.arrayIndex++,o=s[a];if(We(o)&&Ll(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return lt})}function rs(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new sl(t,n=>al(n,e))}function Zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new sl(t,n=>al(n,e),{includeRoot:!0})}function Ll(t,e){if(!e)return!0;const n=t.$cstNode?.range;return n?Bp(n,e):!1}function oa(t){return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if(St(r)||un(r))return e.keyIndex++,{done:!1,value:{reference:r,container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if(St(s)||un(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return lt})}function Ap(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.name]=Ud(i.defaultValue))}function Ud(t){return Array.isArray(t)?[...t.map(Ud)]:t}const ct={$type:"AbstractElement",cardinality:"cardinality"};function Sp(t){return ee.isInstance(t,ct.$type)}const Vs={$type:"AbstractParserRule"};function is(t){return ee.isInstance(t,Vs.$type)}const Is={$type:"AbstractRule"},Et={$type:"AbstractType"},On={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function $a(t){return ee.isInstance(t,On.$type)}const Ks={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function qd(t){return ee.isInstance(t,Ks.$type)}const Ol={$type:"ArrayLiteral",elements:"elements"},xl={$type:"ArrayType",elementType:"elementType"},xn={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function zn(t){return ee.isInstance(t,xn.$type)}const vo={$type:"BooleanLiteral",true:"true"};function kp(t){return ee.isInstance(t,vo.$type)}const Dn={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Cp(t){return ee.isInstance(t,Dn.$type)}const nr={$type:"Condition"},Hs={$type:"Conjunction",left:"left",right:"right"};function wp(t){return ee.isInstance(t,Hs.$type)}const Mn={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function La(t){return ee.isInstance(t,Mn.$type)}const Ys={$type:"Disjunction",left:"left",right:"right"};function Np(t){return ee.isInstance(t,Ys.$type)}const Eo={$type:"EndOfFile",cardinality:"cardinality"};function bp(t){return ee.isInstance(t,Eo.$type)}const An={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Dl={$type:"GrammarImport",path:"path"},cr={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function ol(t){return ee.isInstance(t,cr.$type)}const Ao={$type:"InferredType",name:"name"};function jd(t){return ee.isInstance(t,Ao.$type)}const Vt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function ca(t){return ee.isInstance(t,Vt.$type)}const Ka={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},Ml={$type:"InfixRuleOperators",precedences:"precedences"},Li={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function _p(t){return ee.isInstance(t,Li.$type)}const Oi={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Bn(t){return ee.isInstance(t,Oi.$type)}const Ps={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},lr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Ip(t){return ee.isInstance(t,lr.$type)}const So={$type:"Negation",value:"value"};function Pp(t){return ee.isInstance(t,So.$type)}const Fl={$type:"NumberLiteral",value:"value"},$s={$type:"Parameter",name:"name"},ko={$type:"ParameterReference",parameter:"parameter"};function $p(t){return ee.isInstance(t,ko.$type)}const Pt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function sn(t){return ee.isInstance(t,Pt.$type)}const Ha={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},ur={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Lp(t){return ee.isInstance(t,ur.$type)}const Co={$type:"ReturnType",name:"name"};function Op(t){return ee.isInstance(t,Co.$type)}const dr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Wn(t){return ee.isInstance(t,dr.$type)}const xi={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function xp(t){return ee.isInstance(t,xi.$type)}const Gl={$type:"StringLiteral",value:"value"},fr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Dp(t){return ee.isInstance(t,fr.$type)}const gt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},hr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Mp(t){return ee.isInstance(t,hr.$type)}const ln={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function an(t){return ee.isInstance(t,ln.$type)}const pr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Fp(t){return ee.isInstance(t,pr.$type)}const Xs={$type:"Type",name:"name",type:"type"};function Gp(t){return ee.isInstance(t,Xs.$type)}const hi={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},pi={$type:"TypeDefinition"},Ul={$type:"UnionType",types:"types"},Js={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function zd(t){return ee.isInstance(t,Js.$type)}const mr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Up(t){return ee.isInstance(t,mr.$type)}const mi={$type:"ValueLiteral"},Di={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function qp(t){return ee.isInstance(t,Di.$type)}class Bd extends Dd{constructor(){super(...arguments),this.types={AbstractElement:{name:ct.$type,properties:{cardinality:{name:ct.cardinality}},superTypes:[]},AbstractParserRule:{name:Vs.$type,properties:{},superTypes:[Is.$type,Et.$type]},AbstractRule:{name:Is.$type,properties:{},superTypes:[]},AbstractType:{name:Et.$type,properties:{},superTypes:[]},Action:{name:On.$type,properties:{cardinality:{name:On.cardinality},feature:{name:On.feature},inferredType:{name:On.inferredType},operator:{name:On.operator},type:{name:On.type,referenceType:Et.$type}},superTypes:[ct.$type]},Alternatives:{name:Ks.$type,properties:{cardinality:{name:Ks.cardinality},elements:{name:Ks.elements,defaultValue:[]}},superTypes:[ct.$type]},ArrayLiteral:{name:Ol.$type,properties:{elements:{name:Ol.elements,defaultValue:[]}},superTypes:[mi.$type]},ArrayType:{name:xl.$type,properties:{elementType:{name:xl.elementType}},superTypes:[pi.$type]},Assignment:{name:xn.$type,properties:{cardinality:{name:xn.cardinality},feature:{name:xn.feature},operator:{name:xn.operator},predicate:{name:xn.predicate},terminal:{name:xn.terminal}},superTypes:[ct.$type]},BooleanLiteral:{name:vo.$type,properties:{true:{name:vo.true,defaultValue:!1}},superTypes:[nr.$type,mi.$type]},CharacterRange:{name:Dn.$type,properties:{cardinality:{name:Dn.cardinality},left:{name:Dn.left},lookahead:{name:Dn.lookahead},parenthesized:{name:Dn.parenthesized,defaultValue:!1},right:{name:Dn.right}},superTypes:[gt.$type]},Condition:{name:nr.$type,properties:{},superTypes:[]},Conjunction:{name:Hs.$type,properties:{left:{name:Hs.left},right:{name:Hs.right}},superTypes:[nr.$type]},CrossReference:{name:Mn.$type,properties:{cardinality:{name:Mn.cardinality},deprecatedSyntax:{name:Mn.deprecatedSyntax,defaultValue:!1},isMulti:{name:Mn.isMulti,defaultValue:!1},terminal:{name:Mn.terminal},type:{name:Mn.type,referenceType:Et.$type}},superTypes:[ct.$type]},Disjunction:{name:Ys.$type,properties:{left:{name:Ys.left},right:{name:Ys.right}},superTypes:[nr.$type]},EndOfFile:{name:Eo.$type,properties:{cardinality:{name:Eo.cardinality}},superTypes:[ct.$type]},Grammar:{name:An.$type,properties:{imports:{name:An.imports,defaultValue:[]},interfaces:{name:An.interfaces,defaultValue:[]},isDeclared:{name:An.isDeclared,defaultValue:!1},name:{name:An.name},rules:{name:An.rules,defaultValue:[]},types:{name:An.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Dl.$type,properties:{path:{name:Dl.path}},superTypes:[]},Group:{name:cr.$type,properties:{cardinality:{name:cr.cardinality},elements:{name:cr.elements,defaultValue:[]},guardCondition:{name:cr.guardCondition},predicate:{name:cr.predicate}},superTypes:[ct.$type]},InferredType:{name:Ao.$type,properties:{name:{name:Ao.name}},superTypes:[Et.$type]},InfixRule:{name:Vt.$type,properties:{call:{name:Vt.call},dataType:{name:Vt.dataType},inferredType:{name:Vt.inferredType},name:{name:Vt.name},operators:{name:Vt.operators},parameters:{name:Vt.parameters,defaultValue:[]},returnType:{name:Vt.returnType,referenceType:Et.$type}},superTypes:[Vs.$type]},InfixRuleOperatorList:{name:Ka.$type,properties:{associativity:{name:Ka.associativity},operators:{name:Ka.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ml.$type,properties:{precedences:{name:Ml.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Li.$type,properties:{attributes:{name:Li.attributes,defaultValue:[]},name:{name:Li.name},superTypes:{name:Li.superTypes,defaultValue:[],referenceType:Et.$type}},superTypes:[Et.$type]},Keyword:{name:Oi.$type,properties:{cardinality:{name:Oi.cardinality},predicate:{name:Oi.predicate},value:{name:Oi.value}},superTypes:[ct.$type]},NamedArgument:{name:Ps.$type,properties:{calledByName:{name:Ps.calledByName,defaultValue:!1},parameter:{name:Ps.parameter,referenceType:$s.$type},value:{name:Ps.value}},superTypes:[]},NegatedToken:{name:lr.$type,properties:{cardinality:{name:lr.cardinality},lookahead:{name:lr.lookahead},parenthesized:{name:lr.parenthesized,defaultValue:!1},terminal:{name:lr.terminal}},superTypes:[gt.$type]},Negation:{name:So.$type,properties:{value:{name:So.value}},superTypes:[nr.$type]},NumberLiteral:{name:Fl.$type,properties:{value:{name:Fl.value}},superTypes:[mi.$type]},Parameter:{name:$s.$type,properties:{name:{name:$s.name}},superTypes:[]},ParameterReference:{name:ko.$type,properties:{parameter:{name:ko.parameter,referenceType:$s.$type}},superTypes:[nr.$type]},ParserRule:{name:Pt.$type,properties:{dataType:{name:Pt.dataType},definition:{name:Pt.definition},entry:{name:Pt.entry,defaultValue:!1},fragment:{name:Pt.fragment,defaultValue:!1},inferredType:{name:Pt.inferredType},name:{name:Pt.name},parameters:{name:Pt.parameters,defaultValue:[]},returnType:{name:Pt.returnType,referenceType:Et.$type}},superTypes:[Vs.$type]},ReferenceType:{name:Ha.$type,properties:{isMulti:{name:Ha.isMulti,defaultValue:!1},referenceType:{name:Ha.referenceType}},superTypes:[pi.$type]},RegexToken:{name:ur.$type,properties:{cardinality:{name:ur.cardinality},lookahead:{name:ur.lookahead},parenthesized:{name:ur.parenthesized,defaultValue:!1},regex:{name:ur.regex}},superTypes:[gt.$type]},ReturnType:{name:Co.$type,properties:{name:{name:Co.name}},superTypes:[]},RuleCall:{name:dr.$type,properties:{arguments:{name:dr.arguments,defaultValue:[]},cardinality:{name:dr.cardinality},predicate:{name:dr.predicate},rule:{name:dr.rule,referenceType:Is.$type}},superTypes:[ct.$type]},SimpleType:{name:xi.$type,properties:{primitiveType:{name:xi.primitiveType},stringType:{name:xi.stringType},typeRef:{name:xi.typeRef,referenceType:Et.$type}},superTypes:[pi.$type]},StringLiteral:{name:Gl.$type,properties:{value:{name:Gl.value}},superTypes:[mi.$type]},TerminalAlternatives:{name:fr.$type,properties:{cardinality:{name:fr.cardinality},elements:{name:fr.elements,defaultValue:[]},lookahead:{name:fr.lookahead},parenthesized:{name:fr.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalElement:{name:gt.$type,properties:{cardinality:{name:gt.cardinality},lookahead:{name:gt.lookahead},parenthesized:{name:gt.parenthesized,defaultValue:!1}},superTypes:[ct.$type]},TerminalGroup:{name:hr.$type,properties:{cardinality:{name:hr.cardinality},elements:{name:hr.elements,defaultValue:[]},lookahead:{name:hr.lookahead},parenthesized:{name:hr.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalRule:{name:ln.$type,properties:{definition:{name:ln.definition},fragment:{name:ln.fragment,defaultValue:!1},hidden:{name:ln.hidden,defaultValue:!1},name:{name:ln.name},type:{name:ln.type}},superTypes:[Is.$type]},TerminalRuleCall:{name:pr.$type,properties:{cardinality:{name:pr.cardinality},lookahead:{name:pr.lookahead},parenthesized:{name:pr.parenthesized,defaultValue:!1},rule:{name:pr.rule,referenceType:ln.$type}},superTypes:[gt.$type]},Type:{name:Xs.$type,properties:{name:{name:Xs.name},type:{name:Xs.type}},superTypes:[Et.$type]},TypeAttribute:{name:hi.$type,properties:{defaultValue:{name:hi.defaultValue},isOptional:{name:hi.isOptional,defaultValue:!1},name:{name:hi.name},type:{name:hi.type}},superTypes:[]},TypeDefinition:{name:pi.$type,properties:{},superTypes:[]},UnionType:{name:Ul.$type,properties:{types:{name:Ul.types,defaultValue:[]}},superTypes:[pi.$type]},UnorderedGroup:{name:Js.$type,properties:{cardinality:{name:Js.cardinality},elements:{name:Js.elements,defaultValue:[]}},superTypes:[ct.$type]},UntilToken:{name:mr.$type,properties:{cardinality:{name:mr.cardinality},lookahead:{name:mr.lookahead},parenthesized:{name:mr.parenthesized,defaultValue:!1},terminal:{name:mr.terminal}},superTypes:[gt.$type]},ValueLiteral:{name:mi.$type,properties:{},superTypes:[]},Wildcard:{name:Di.$type,properties:{cardinality:{name:Di.cardinality},lookahead:{name:Di.lookahead},parenthesized:{name:Di.parenthesized,defaultValue:!1}},superTypes:[gt.$type]}}}}const ee=new Bd;function wo(t){return new sl(t,e=>Bi(e)?e.content:[],{includeRoot:!0})}function jp(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function No(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function la(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var Xt;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(Xt||(Xt={}));function zp(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Xt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Xt.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?Xt.Inside:n?Xt.OverlapBack:r?Xt.OverlapFront:Xt.Outside}function Bp(t,e){return zp(t,e)>Xt.After}const Wp=/^[\w\p{L}]$/u;function Vp(t,e){if(t){const n=Kp(t,!0);if(n&&ql(n,e))return n;if(Fd(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(ql(s,e))return s}}}}function ql(t,e){return Md(t)&&e.includes(t.tokenType.name)}function Kp(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class Wd extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function ss(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function Ya(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function gi(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function rr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Hp(){throw Error("Internal Error - Should never get here!")}function jl(t){return t.type==="Character"}const ua=[];for(let t=W("0");t<=W("9");t++)ua.push(t);const da=[W("_")].concat(ua);for(let t=W("a");t<=W("z");t++)da.push(t);for(let t=W("A");t<=W("Z");t++)da.push(t);const zl=[W(" "),W("\f"),W(`
|
|
2
2
|
`),W("\r"),W(" "),W("\v"),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W("\u2028"),W("\u2029"),W(" "),W(" "),W(" "),W("\uFEFF")],Yp=/[0-9a-fA-F]/,Ls=/[0-9]/,Xp=/[1-9]/;class Vd{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const n=this.disjunction();this.consumeChar("/");const r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":gi(r,"global");break;case"i":gi(r,"ignoreCase");break;case"m":gi(r,"multiLine");break;case"u":gi(r,"unicode");break;case"y":gi(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:n,loc:this.loc(0)}}disjunction(){const e=[],n=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(n)}}alternative(){const e=[],n=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(n)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let n;switch(this.popChar()){case"=":n="Lookahead";break;case"!":n="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":n="Lookbehind";break;case"!":n="NegativeLookbehind"}break}}rr(n);const r=this.disjunction();return this.consumeChar(")"),{type:n,value:r,loc:this.loc(e)}}return Hp()}quantifier(e=!1){let n;const r=this.idx;switch(this.popChar()){case"*":n={atLeast:0,atMost:1/0};break;case"+":n={atLeast:1,atMost:1/0};break;case"?":n={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":n={atLeast:i,atMost:i};break;case",":let s;this.isDigit()?(s=this.integerIncludingZero(),n={atLeast:i,atMost:s}):n={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&n===void 0)return;rr(n);break}if(!(e===!0&&n===void 0)&&rr(n))return this.peekChar(0)==="?"?(this.consumeChar("?"),n.greedy=!1):n.greedy=!0,n.type="Quantifier",n.loc=this.loc(r),n}atom(){let e;const n=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),rr(e))return e.loc=this.loc(n),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[W(`
|
|
3
3
|
`),W("\r"),W("\u2028"),W("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,n=!1;switch(this.popChar()){case"d":e=ua;break;case"D":e=ua,n=!0;break;case"s":e=zl;break;case"S":e=zl,n=!0;break;case"w":e=da;break;case"W":e=da,n=!0;break}if(rr(e))return{type:"Set",value:e,complement:n}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=W("\f");break;case"n":e=W(`
|
|
4
4
|
`);break;case"r":e=W("\r");break;case"t":e=W(" ");break;case"v":e=W("\v");break}if(rr(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:W("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:W(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
package/dist/client/assets/{worktree._worktreeId-CVx6cyp5.js → worktree._worktreeId-D-GKIuuU.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aP as s,r as i,R as a}from"./main-
|
|
1
|
+
import{aP as s,r as i,R as a}from"./main-CqSslSJI.js";function u(t){const r=s(e=>e.setActiveWorktree);i.useEffect(()=>{t&&r(t)},[t,r]);const n=s(e=>e.refreshBranchStatus);i.useEffect(()=>{if(!t)return;n(t);const e=()=>{document.visibilityState==="visible"&&n(t)};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[t,n]);const o=s(e=>e.clearNeedsAttention);i.useEffect(()=>{t&&o(t)},[t,o])}function f(){const{worktreeId:t}=a.useParams(),r=decodeURIComponent(t);return u(r),null}export{f as component};
|
package/dist/client/assets/{worktree._worktreeId-C2psBRXR.js → worktree._worktreeId-D3DbNkyK.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as r,j as t,N as o}from"./main-
|
|
1
|
+
import{R as r,j as t,N as o}from"./main-CqSslSJI.js";function s(){const{worktreeId:e}=r.useParams();return t.jsx(o,{to:"/worktree/$worktreeId",params:{worktreeId:e},replace:!0})}export{s as notFoundComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as gi,n as xi,O as Xt,M as di,o as pi,p as fi,_ as n,v as Nt,a5 as yi,w as mi,V as bi,a3 as Ct,z as Ai,a1 as Yt,a2 as wi,an as Ci,ao as Bt,ap as Si,am as Wt,aq as zt}from"./main-
|
|
1
|
+
import{m as gi,n as xi,O as Xt,M as di,o as pi,p as fi,_ as n,v as Nt,a5 as yi,w as mi,V as bi,a3 as Ct,z as Ai,a1 as Yt,a2 as wi,an as Ci,ao as Bt,ap as Si,am as Wt,aq as zt}from"./main-CqSslSJI.js";var mt=(function(){var s=n(function(W,r,u,g){for(u=u||{},g=W.length;g--;u[W[g]]=r);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],e=[1,3],a=[1,5],c=[1,6],d=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],b=[1,25],P=[1,26],I=[1,28],R=[1,29],L=[1,30],z=[1,31],F=[1,32],D=[1,33],V=[1,34],f=[1,35],C=[1,36],l=[1,37],M=[1,43],B=[1,42],U=[1,47],X=[1,50],h=[1,10,12,14,16,18,19,21,23,34,35,36],k=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],w=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],S=[1,64],$={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(r,u,g,x,A,o,nt){var p=o.length-1;switch(A){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:this.$=[Number(o[p-2]),...o[p]];break;case 21:this.$=[Number(o[p])];break;case 22:x.setXAxisTitle(o[p]);break;case 23:x.setXAxisTitle(o[p-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(o[p]);break;case 26:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 27:this.$=o[p-1];break;case 28:this.$=[o[p-2],...o[p]];break;case 29:this.$=[o[p]];break;case 30:x.setYAxisTitle(o[p]);break;case 31:x.setYAxisTitle(o[p-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 37:this.$={text:o[p],type:"text"};break;case 38:this.$={text:o[p],type:"text"};break;case 39:this.$={text:o[p],type:"markdown"};break;case 40:this.$=o[p];break;case 41:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[s(t,i,{3:1,4:2,7:4,5:e,34:a,35:c,36:d}),{1:[3]},s(t,i,{4:2,7:4,3:8,5:e,34:a,35:c,36:d}),s(t,i,{4:2,7:4,6:9,3:10,5:e,8:[1,11],34:a,35:c,36:d}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},s(m,[2,34]),s(m,[2,35]),s(m,[2,36]),{1:[2,1]},s(t,i,{4:2,7:4,3:21,5:e,34:a,35:c,36:d}),{1:[2,3]},s(m,[2,5]),s(t,[2,7],{4:22,34:a,35:c,36:d}),{11:23,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:39,13:38,24:M,27:B,29:40,30:41,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:45,15:44,27:U,33:46,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:49,17:48,24:X,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:52,17:51,24:X,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{20:[1,53]},{22:[1,54]},s(h,[2,18]),{1:[2,2]},s(h,[2,8]),s(h,[2,9]),s(k,[2,37],{40:55,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l}),s(k,[2,38]),s(k,[2,39]),s(w,[2,40]),s(w,[2,42]),s(w,[2,43]),s(w,[2,44]),s(w,[2,45]),s(w,[2,46]),s(w,[2,47]),s(w,[2,48]),s(w,[2,49]),s(w,[2,50]),s(w,[2,51]),s(h,[2,10]),s(h,[2,22],{30:41,29:56,24:M,27:B}),s(h,[2,24]),s(h,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},s(h,[2,11]),s(h,[2,30],{33:60,27:U}),s(h,[2,32]),{31:[1,61]},s(h,[2,12]),{17:62,24:X},{25:63,27:S},s(h,[2,14]),{17:65,24:X},s(h,[2,16]),s(h,[2,17]),s(w,[2,41]),s(h,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},s(h,[2,31]),{27:[1,69]},s(h,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},s(h,[2,15]),s(h,[2,26]),s(h,[2,27]),{11:59,32:72,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},s(h,[2,33]),s(h,[2,19]),{25:73,27:S},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(r,u){if(u.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=u,g}},"parseError"),parse:n(function(r){var u=this,g=[0],x=[],A=[null],o=[],nt=this.table,p="",lt=0,Et=0,hi=2,It=1,li=o.slice.call(arguments,1),_=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);_.setInput(r,Y.yy),Y.yy.lexer=_,Y.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var pt=_.yylloc;o.push(pt);var ci=_.options&&_.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(v){g.length=g.length-2*v,A.length=A.length-v,o.length=o.length-v}n(ui,"popStack");function Vt(){var v;return v=x.pop()||_.lex()||It,typeof v!="number"&&(v instanceof Array&&(x=v,v=x.pop()),v=u.symbols_[v]||v),v}n(Vt,"lex");for(var T,H,E,ft,q={},ct,O,Mt,ut;;){if(H=g[g.length-1],this.defaultActions[H]?E=this.defaultActions[H]:((T===null||typeof T>"u")&&(T=Vt()),E=nt[H]&&nt[H][T]),typeof E>"u"||!E.length||!E[0]){var yt="";ut=[];for(ct in nt[H])this.terminals_[ct]&&ct>hi&&ut.push("'"+this.terminals_[ct]+"'");_.showPosition?yt="Parse error on line "+(lt+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+ut.join(", ")+", got '"+(this.terminals_[T]||T)+"'":yt="Parse error on line "+(lt+1)+": Unexpected "+(T==It?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(yt,{text:_.match,token:this.terminals_[T]||T,line:_.yylineno,loc:pt,expected:ut})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+T);switch(E[0]){case 1:g.push(T),A.push(_.yytext),o.push(_.yylloc),g.push(E[1]),T=null,Et=_.yyleng,p=_.yytext,lt=_.yylineno,pt=_.yylloc;break;case 2:if(O=this.productions_[E[1]][1],q.$=A[A.length-O],q._$={first_line:o[o.length-(O||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(O||1)].first_column,last_column:o[o.length-1].last_column},ci&&(q._$.range=[o[o.length-(O||1)].range[0],o[o.length-1].range[1]]),ft=this.performAction.apply(q,[p,Et,lt,Y.yy,E[1],A,o].concat(li)),typeof ft<"u")return ft;O&&(g=g.slice(0,-1*O*2),A=A.slice(0,-1*O),o=o.slice(0,-1*O)),g.push(this.productions_[E[1]][0]),A.push(q.$),o.push(q._$),Mt=nt[g[g.length-2]][g[g.length-1]],g.push(Mt);break;case 3:return!0}}return!0},"parse")},Lt=(function(){var W={EOF:1,parseError:n(function(u,g){if(this.yy.parser)this.yy.parser.parseError(u,g);else throw new Error(u)},"parseError"),setInput:n(function(r,u){return this.yy=u||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var u=r.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var u=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),u=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
package/dist/openapi.json
CHANGED
|
@@ -777,6 +777,13 @@
|
|
|
777
777
|
"type": "boolean",
|
|
778
778
|
"description": "True when the Update button works: the worker is online, supervised and not current."
|
|
779
779
|
},
|
|
780
|
+
"updateBlockedReason": {
|
|
781
|
+
"type": [
|
|
782
|
+
"string",
|
|
783
|
+
"null"
|
|
784
|
+
],
|
|
785
|
+
"description": "Why a supervised worker cannot be updated with one click, or null."
|
|
786
|
+
},
|
|
780
787
|
"manualCommand": {
|
|
781
788
|
"type": [
|
|
782
789
|
"string",
|
|
@@ -915,6 +922,7 @@
|
|
|
915
922
|
"serviceManager",
|
|
916
923
|
"updateTarget",
|
|
917
924
|
"canUpdate",
|
|
925
|
+
"updateBlockedReason",
|
|
918
926
|
"manualCommand",
|
|
919
927
|
"sleepError",
|
|
920
928
|
"id",
|
|
@@ -1873,6 +1881,13 @@
|
|
|
1873
1881
|
"type": "boolean",
|
|
1874
1882
|
"description": "True when the Update button works: the worker is online, supervised and not current."
|
|
1875
1883
|
},
|
|
1884
|
+
"updateBlockedReason": {
|
|
1885
|
+
"type": [
|
|
1886
|
+
"string",
|
|
1887
|
+
"null"
|
|
1888
|
+
],
|
|
1889
|
+
"description": "Why a supervised worker cannot be updated with one click, or null."
|
|
1890
|
+
},
|
|
1876
1891
|
"manualCommand": {
|
|
1877
1892
|
"type": [
|
|
1878
1893
|
"string",
|
|
@@ -2011,6 +2026,7 @@
|
|
|
2011
2026
|
"serviceManager",
|
|
2012
2027
|
"updateTarget",
|
|
2013
2028
|
"canUpdate",
|
|
2029
|
+
"updateBlockedReason",
|
|
2014
2030
|
"manualCommand",
|
|
2015
2031
|
"sleepError",
|
|
2016
2032
|
"id",
|
package/dist/start-server.mjs
CHANGED
|
@@ -61443,7 +61443,19 @@ function reconcileKindForRepo(repo) {
|
|
|
61443
61443
|
if (detectedKind === repo.kind) return false;
|
|
61444
61444
|
repo.kind = detectedKind;
|
|
61445
61445
|
if (detectedKind === "plain") {
|
|
61446
|
-
|
|
61446
|
+
const main2 = repo.worktrees.find(
|
|
61447
|
+
(wt) => wt.name === "main" && (wt.hostId ?? "local") === "local"
|
|
61448
|
+
);
|
|
61449
|
+
repo.worktrees = [
|
|
61450
|
+
{
|
|
61451
|
+
name: "main",
|
|
61452
|
+
branch: "main",
|
|
61453
|
+
path: repo.path,
|
|
61454
|
+
pinned: false,
|
|
61455
|
+
...main2?.origin ? { origin: main2.origin } : {},
|
|
61456
|
+
...main2?.groupId ? { groupId: main2.groupId } : {}
|
|
61457
|
+
}
|
|
61458
|
+
];
|
|
61447
61459
|
}
|
|
61448
61460
|
return true;
|
|
61449
61461
|
}
|
|
@@ -68350,6 +68362,9 @@ function validateHello(h) {
|
|
|
68350
68362
|
if (h.serviceManager !== void 0 && h.serviceManager !== "launchd" && h.serviceManager !== "systemd") {
|
|
68351
68363
|
return "serviceManager must be launchd or systemd";
|
|
68352
68364
|
}
|
|
68365
|
+
if (h.updateBlocked !== void 0 && (typeof h.updateBlocked !== "string" || h.updateBlocked.length > 300)) {
|
|
68366
|
+
return "updateBlocked must be a short string";
|
|
68367
|
+
}
|
|
68353
68368
|
if (h.tools !== void 0) {
|
|
68354
68369
|
const tools = h.tools;
|
|
68355
68370
|
if (typeof tools !== "object" || tools === null || Array.isArray(tools) || !Object.values(tools).every((v2) => typeof v2 === "string")) {
|
|
@@ -68472,6 +68487,8 @@ var init_channel = __esm({
|
|
|
68472
68487
|
reportedBytes = 0;
|
|
68473
68488
|
remoteEnded = false;
|
|
68474
68489
|
readWaiter = null;
|
|
68490
|
+
/** The reader left its loop early. Later data is consumed on arrival, so the channel can finish. */
|
|
68491
|
+
discarding = false;
|
|
68475
68492
|
failure = null;
|
|
68476
68493
|
host;
|
|
68477
68494
|
window;
|
|
@@ -68546,6 +68563,16 @@ var init_channel = __esm({
|
|
|
68546
68563
|
this.fail(new Error(`channel ${this.id} reset: ${reason}`));
|
|
68547
68564
|
}
|
|
68548
68565
|
// ---- session hooks -----------------------------------------------------
|
|
68566
|
+
/**
|
|
68567
|
+
* For a channel nobody on this side reads any more: one this side only writes to, or a reader
|
|
68568
|
+
* that left its loop for good. The peer's frames, including its end marker, are consumed on
|
|
68569
|
+
* arrival. Without that the end is never acknowledged and the channel stays in both
|
|
68570
|
+
* sessions' maps. Do not call it while a reader may still come back to the channel.
|
|
68571
|
+
*/
|
|
68572
|
+
discardIncoming() {
|
|
68573
|
+
this.discarding = true;
|
|
68574
|
+
this.discardInbox();
|
|
68575
|
+
}
|
|
68549
68576
|
/** After a (re)attach: restart transmission from the first frame the peer lacks. */
|
|
68550
68577
|
resumeSend(peerLastSeq) {
|
|
68551
68578
|
this.retained = this.retained.filter((f2) => f2.frame.seq > peerLastSeq);
|
|
@@ -68583,6 +68610,7 @@ var init_channel = __esm({
|
|
|
68583
68610
|
} else {
|
|
68584
68611
|
this.inbox.push({ seq: frame.seq, data: frame.payload });
|
|
68585
68612
|
}
|
|
68613
|
+
if (this.discarding) this.discardInbox();
|
|
68586
68614
|
this.wakeReader();
|
|
68587
68615
|
return;
|
|
68588
68616
|
}
|
|
@@ -68637,6 +68665,7 @@ var init_channel = __esm({
|
|
|
68637
68665
|
return { value: item.data, done: false };
|
|
68638
68666
|
}
|
|
68639
68667
|
if (this.failure) throw this.failure;
|
|
68668
|
+
if (this.discarding && this.remoteEnded) return { value: void 0, done: true };
|
|
68640
68669
|
await new Promise((resolve15) => {
|
|
68641
68670
|
this.readWaiter = resolve15;
|
|
68642
68671
|
});
|
|
@@ -68684,6 +68713,19 @@ var init_channel = __esm({
|
|
|
68684
68713
|
this.readWaiter = null;
|
|
68685
68714
|
w2?.();
|
|
68686
68715
|
}
|
|
68716
|
+
/** Consumes everything queued without delivering it, and reports the credit. */
|
|
68717
|
+
discardInbox() {
|
|
68718
|
+
while (this.inbox.length > 0) {
|
|
68719
|
+
const item = this.inbox.shift();
|
|
68720
|
+
this.consumedSeq = item.seq;
|
|
68721
|
+
if (item.data) {
|
|
68722
|
+
this.inboxBytes -= item.data.length;
|
|
68723
|
+
this.consumedBytes += item.data.length;
|
|
68724
|
+
}
|
|
68725
|
+
}
|
|
68726
|
+
this.sendCredit(true);
|
|
68727
|
+
this.maybeDone();
|
|
68728
|
+
}
|
|
68687
68729
|
maybeDone() {
|
|
68688
68730
|
if (this.localEndAcked && this.remoteEnded && this.inbox.length === 0)
|
|
68689
68731
|
this.host.channelDone(this.id);
|
|
@@ -68817,6 +68859,15 @@ var init_session3 = __esm({
|
|
|
68817
68859
|
getChannel(id) {
|
|
68818
68860
|
return this.channels.get(id);
|
|
68819
68861
|
}
|
|
68862
|
+
/** How many channels are open, by name. Largest first. */
|
|
68863
|
+
channelCounts() {
|
|
68864
|
+
const counts = /* @__PURE__ */ new Map();
|
|
68865
|
+
for (const ch of this.channels.values()) counts.set(ch.name, (counts.get(ch.name) ?? 0) + 1);
|
|
68866
|
+
return [...counts].map(([name5, count3]) => ({ name: name5, count: count3 })).sort((a, b2) => b2.count - a.count);
|
|
68867
|
+
}
|
|
68868
|
+
get openChannelCount() {
|
|
68869
|
+
return this.channels.size;
|
|
68870
|
+
}
|
|
68820
68871
|
/** Highest received sequence per channel, for `hello.resume` and `ready.resume`. */
|
|
68821
68872
|
resumeMap() {
|
|
68822
68873
|
const out = {};
|
|
@@ -68995,7 +69046,8 @@ var init_session3 = __esm({
|
|
|
68995
69046
|
}
|
|
68996
69047
|
if (this.channels.has(p2.chan) || this.tombstones.has(p2.chan)) return;
|
|
68997
69048
|
if (this.channels.size >= MAX_CHANNELS) {
|
|
68998
|
-
this.
|
|
69049
|
+
const held = this.channelCounts().slice(0, 5).map((c) => `${c.name}=${c.count}`).join(", ");
|
|
69050
|
+
this.emit("fault", `refused channel ${p2.chan}: too many channels (open: ${held})`);
|
|
68999
69051
|
this.writeBinary(
|
|
69000
69052
|
encodeFrame({
|
|
69001
69053
|
chan: p2.chan,
|
|
@@ -69134,6 +69186,7 @@ function sendPayload(session, value) {
|
|
|
69134
69186
|
const text4 = JSON.stringify(value ?? null);
|
|
69135
69187
|
if (Buffer.byteLength(text4) <= PAYLOAD_INLINE_LIMIT) return { json: value ?? null };
|
|
69136
69188
|
const ch = session.openChannel("payload");
|
|
69189
|
+
ch.discardIncoming();
|
|
69137
69190
|
ch.send(Buffer.from(text4)).then(
|
|
69138
69191
|
() => ch.end(),
|
|
69139
69192
|
() => void 0
|
|
@@ -70339,7 +70392,7 @@ function toTaskInfo(task) {
|
|
|
70339
70392
|
}
|
|
70340
70393
|
async function promptBlocks(task, firstTurn, sharedDir) {
|
|
70341
70394
|
const caps = agentSessionService.promptCapabilities(task.chatId);
|
|
70342
|
-
const blocks = [{ type: "text", text: task.prompt }];
|
|
70395
|
+
const blocks = task.prompt.trim() ? [{ type: "text", text: task.prompt }] : [];
|
|
70343
70396
|
for (const file3 of task.attachments) {
|
|
70344
70397
|
const name5 = file3.filename ?? file3.path.split("/").pop() ?? file3.path;
|
|
70345
70398
|
if (caps.image && file3.mediaType.startsWith("image/")) {
|
|
@@ -70784,10 +70837,15 @@ async function buildSnapshot(host, cwd, wipDir, worktreeId4, label2, seedIndex =
|
|
|
70784
70837
|
await host.fs.mkdir(wipDir, { recursive: true });
|
|
70785
70838
|
const baseSha = await git2(["rev-parse", "HEAD"]);
|
|
70786
70839
|
const branch = await git2(["rev-parse", "--abbrev-ref", "HEAD"]);
|
|
70787
|
-
const
|
|
70840
|
+
const slotKey = `${wipDir}\0${worktreeId4}`;
|
|
70841
|
+
const slot = takeIndexSlot(slotKey);
|
|
70842
|
+
const indexFile = posix3.join(
|
|
70843
|
+
wipDir,
|
|
70844
|
+
slot === 0 ? `${worktreeId4}.index` : `${worktreeId4}.${slot}.index`
|
|
70845
|
+
);
|
|
70788
70846
|
const env = { ...SNAPSHOT_BOT, GIT_INDEX_FILE: indexFile };
|
|
70789
|
-
await host.fs.rm(indexFile, { force: true });
|
|
70790
70847
|
try {
|
|
70848
|
+
await host.fs.rm(indexFile, { force: true });
|
|
70791
70849
|
let treeSha;
|
|
70792
70850
|
if (seedIndex) {
|
|
70793
70851
|
try {
|
|
@@ -70809,7 +70867,24 @@ async function buildSnapshot(host, cwd, wipDir, worktreeId4, label2, seedIndex =
|
|
|
70809
70867
|
return { baseSha, branch: branch === "HEAD" ? "" : branch, snapshotSha, treeSha };
|
|
70810
70868
|
} finally {
|
|
70811
70869
|
await host.fs.rm(indexFile, { force: true }).catch(() => void 0);
|
|
70870
|
+
releaseIndexSlot(slotKey, slot);
|
|
70871
|
+
}
|
|
70872
|
+
}
|
|
70873
|
+
function takeIndexSlot(key2) {
|
|
70874
|
+
let used = indexSlots.get(key2);
|
|
70875
|
+
if (!used) {
|
|
70876
|
+
used = /* @__PURE__ */ new Set();
|
|
70877
|
+
indexSlots.set(key2, used);
|
|
70812
70878
|
}
|
|
70879
|
+
let slot = 0;
|
|
70880
|
+
while (used.has(slot)) slot++;
|
|
70881
|
+
used.add(slot);
|
|
70882
|
+
return slot;
|
|
70883
|
+
}
|
|
70884
|
+
function releaseIndexSlot(key2, slot) {
|
|
70885
|
+
const used = indexSlots.get(key2);
|
|
70886
|
+
used?.delete(slot);
|
|
70887
|
+
if (used?.size === 0) indexSlots.delete(key2);
|
|
70813
70888
|
}
|
|
70814
70889
|
async function checkoutSnapshot(host, repoPath, worktreePath, snapshot, options = {}) {
|
|
70815
70890
|
const git2 = gitIn(host, repoPath);
|
|
@@ -70856,7 +70931,7 @@ async function resetCheckoutToSnapshot(host, path2, snapshot) {
|
|
|
70856
70931
|
await git2(["reset", "-q"]);
|
|
70857
70932
|
}
|
|
70858
70933
|
}
|
|
70859
|
-
var WIP_DIR, SNAPSHOT_BOT;
|
|
70934
|
+
var WIP_DIR, SNAPSHOT_BOT, indexSlots;
|
|
70860
70935
|
var init_snapshot_git = __esm({
|
|
70861
70936
|
"../../packages/host-api/src/snapshot-git.ts"() {
|
|
70862
70937
|
"use strict";
|
|
@@ -70867,6 +70942,7 @@ var init_snapshot_git = __esm({
|
|
|
70867
70942
|
GIT_COMMITTER_NAME: "Band",
|
|
70868
70943
|
GIT_COMMITTER_EMAIL: "band@localhost"
|
|
70869
70944
|
};
|
|
70945
|
+
indexSlots = /* @__PURE__ */ new Map();
|
|
70870
70946
|
}
|
|
70871
70947
|
});
|
|
70872
70948
|
|
|
@@ -70993,6 +71069,7 @@ var init_pty2 = __esm({
|
|
|
70993
71069
|
this.done = true;
|
|
70994
71070
|
this.release();
|
|
70995
71071
|
this.channel.end();
|
|
71072
|
+
this.channel.discardIncoming();
|
|
70996
71073
|
}
|
|
70997
71074
|
release() {
|
|
70998
71075
|
const resume = this.resume;
|
|
@@ -71153,6 +71230,7 @@ function duplexOf(ch) {
|
|
|
71153
71230
|
close: () => {
|
|
71154
71231
|
closed = true;
|
|
71155
71232
|
ch.end();
|
|
71233
|
+
ch.discardIncoming();
|
|
71156
71234
|
}
|
|
71157
71235
|
};
|
|
71158
71236
|
}
|
|
@@ -71276,6 +71354,7 @@ var init_remote_host = __esm({
|
|
|
71276
71354
|
});
|
|
71277
71355
|
}
|
|
71278
71356
|
const ch = this.rpc.session().openChannel("speech.audio", {});
|
|
71357
|
+
ch.discardIncoming();
|
|
71279
71358
|
const done = this.rpc.call("speech.transcribe", {
|
|
71280
71359
|
...rest,
|
|
71281
71360
|
audio: { chan: ch.id }
|
|
@@ -71407,6 +71486,7 @@ var init_remote_host = __esm({
|
|
|
71407
71486
|
return;
|
|
71408
71487
|
}
|
|
71409
71488
|
const ch = this.rpc.session().openChannel("fs.write", { path: path2 });
|
|
71489
|
+
ch.discardIncoming();
|
|
71410
71490
|
const done = this.rpc.call("fs.writeFile", { ...base, data: { chan: ch.id } });
|
|
71411
71491
|
done.catch(() => void 0);
|
|
71412
71492
|
try {
|
|
@@ -71449,8 +71529,14 @@ var init_remote_host = __esm({
|
|
|
71449
71529
|
const reply = await this.rpc.request("acp.spawn", { ...launch, cwd });
|
|
71450
71530
|
const stdio = this.rpc.channel(reply.stdio);
|
|
71451
71531
|
const stderr = this.rpc.channel(reply.stderr);
|
|
71452
|
-
const exit = new Promise((resolve15) => this.agents.set(reply.agentId, resolve15));
|
|
71453
71532
|
let closed = false;
|
|
71533
|
+
const exit = new Promise(
|
|
71534
|
+
(resolve15) => this.agents.set(reply.agentId, (result) => {
|
|
71535
|
+
resolve15(result);
|
|
71536
|
+
closed = true;
|
|
71537
|
+
stdio.end();
|
|
71538
|
+
})
|
|
71539
|
+
);
|
|
71454
71540
|
return {
|
|
71455
71541
|
pid: reply.pid ?? void 0,
|
|
71456
71542
|
stdin: {
|
|
@@ -95413,6 +95499,11 @@ var CheckpointService = class {
|
|
|
95413
95499
|
log55.warn({ worktreeId: worktreeId4, trigger, err: errorText3(err) }, "could not take a checkpoint");
|
|
95414
95500
|
}
|
|
95415
95501
|
}
|
|
95502
|
+
/** Refuses when a restore or move holds any of the worktrees. */
|
|
95503
|
+
assertNotBusy(...worktreeIds) {
|
|
95504
|
+
const held = worktreeIds.find((id) => this.busy.has(id));
|
|
95505
|
+
if (held) throw new CheckpointError("conflict", `${held} is being restored or moved.`);
|
|
95506
|
+
}
|
|
95416
95507
|
/** Why no automatic checkpoint is taken for the worktree, or null when one may be. */
|
|
95417
95508
|
ineligible(worktreeId4) {
|
|
95418
95509
|
const found = worktreeService.resolve(worktreeId4);
|
|
@@ -95482,6 +95573,7 @@ var CheckpointService = class {
|
|
|
95482
95573
|
"Checkpoints are for worktrees on a worker, not on the hub's own machine."
|
|
95483
95574
|
);
|
|
95484
95575
|
}
|
|
95576
|
+
this.assertNotBusy(worktreeId4);
|
|
95485
95577
|
if (!opts.ignoreSetting && !checkpointsEnabledFor(found.repo.checkpointsEnabled, found.repo.allowedHostIds)) {
|
|
95486
95578
|
throw new CheckpointError("disabled", `Checkpoints are off for ${found.repo.name}.`);
|
|
95487
95579
|
}
|
|
@@ -95914,9 +96006,8 @@ ${diff}`).digest("hex");
|
|
|
95914
96006
|
`${worktreeId4} was already restored as ${worktree.supersededBy}.`
|
|
95915
96007
|
);
|
|
95916
96008
|
}
|
|
95917
|
-
|
|
95918
|
-
|
|
95919
|
-
}
|
|
96009
|
+
const targetId = toWorktreeId(repo.name, worktree.name, toHostId);
|
|
96010
|
+
this.assertNotBusy(worktreeId4, targetId);
|
|
95920
96011
|
const row = this.pick(worktreeId4, input2.checkpointId);
|
|
95921
96012
|
const sourceUp = this.sessions.get(fromHostId)?.attached === true;
|
|
95922
96013
|
const leaseLeft = sourceUp ? 0 : workerLeaseService.remainingMs(fromHostId);
|
|
@@ -95947,7 +96038,6 @@ ${diff}`).digest("hex");
|
|
|
95947
96038
|
(w2) => w2.name === worktree.name && (w2.hostId ?? LOCAL_HOST_ID8) === toHostId
|
|
95948
96039
|
);
|
|
95949
96040
|
if (onTarget && !onTarget.supersededBy && isRoot) {
|
|
95950
|
-
const targetId = toWorktreeId(repo.name, worktree.name, toHostId);
|
|
95951
96041
|
const busy = chatService.list(targetId).some(
|
|
95952
96042
|
(chat) => hasRunningTask(chat.id) || agentSessionService.isActive(chat.id) || hasQueuedMessages(chat.id)
|
|
95953
96043
|
) || (await terminalService.list(targetId).catch(() => [])).length > 0;
|
|
@@ -95964,6 +96054,7 @@ ${diff}`).digest("hex");
|
|
|
95964
96054
|
`Worker ${toHostId} already has a worktree ${worktree.name} of ${repo.name}. Remove it first.`
|
|
95965
96055
|
);
|
|
95966
96056
|
}
|
|
96057
|
+
this.assertNotBusy(worktreeId4, targetId);
|
|
95967
96058
|
const previousAllowed = repo.allowedHostIds ? [...repo.allowedHostIds] : null;
|
|
95968
96059
|
let widened = false;
|
|
95969
96060
|
let restored = false;
|
|
@@ -95974,7 +96065,9 @@ ${diff}`).digest("hex");
|
|
|
95974
96065
|
widened = true;
|
|
95975
96066
|
}
|
|
95976
96067
|
this.busy.add(worktreeId4);
|
|
96068
|
+
this.busy.add(targetId);
|
|
95977
96069
|
try {
|
|
96070
|
+
await this.inflight.get(targetId)?.catch(() => void 0);
|
|
95978
96071
|
const host = hostRegistry.hostById(toHostId);
|
|
95979
96072
|
const rpc = new RemoteRpc(toHostId, () => target);
|
|
95980
96073
|
const [root] = (await host.info()).roots;
|
|
@@ -95991,7 +96084,7 @@ ${diff}`).digest("hex");
|
|
|
95991
96084
|
input2.hostRepoPath
|
|
95992
96085
|
);
|
|
95993
96086
|
const git2 = gitIn(host, repoPath);
|
|
95994
|
-
const newId =
|
|
96087
|
+
const newId = targetId;
|
|
95995
96088
|
const worktreePath = isRoot ? repoPath : posix8.join(root, ".band-worktrees", repo.name, worktree.name);
|
|
95996
96089
|
const backups = [];
|
|
95997
96090
|
const backupStamp = Date.now();
|
|
@@ -96163,6 +96256,7 @@ ${diff}`).digest("hex");
|
|
|
96163
96256
|
}
|
|
96164
96257
|
}
|
|
96165
96258
|
this.busy.delete(worktreeId4);
|
|
96259
|
+
this.busy.delete(targetId);
|
|
96166
96260
|
}
|
|
96167
96261
|
}
|
|
96168
96262
|
async restoreSessions(host, rpc, row, wipDir, fromCwd, toCwd) {
|
|
@@ -97324,8 +97418,9 @@ async function handleChatSubmit(req, res, chatId) {
|
|
|
97324
97418
|
}
|
|
97325
97419
|
const { text: text4, sessionId, mode, model, codingAgentId, files } = body;
|
|
97326
97420
|
let { worktreeId: worktreeId4 } = body;
|
|
97327
|
-
|
|
97328
|
-
|
|
97421
|
+
const hasFiles = Array.isArray(files) && files.length > 0;
|
|
97422
|
+
if (!worktreeId4 || !text4?.trim() && !hasFiles) {
|
|
97423
|
+
sendJson2(res, 400, { error: "worktreeId and text or files are required" });
|
|
97329
97424
|
return;
|
|
97330
97425
|
}
|
|
97331
97426
|
if (sessionId !== void 0 && !SESSION_ID_PATTERN2.test(sessionId)) {
|
|
@@ -97369,7 +97464,7 @@ async function handleChatSubmit(req, res, chatId) {
|
|
|
97369
97464
|
const result = taskService.submitOrQueueTask({
|
|
97370
97465
|
worktreeId: worktreeId4,
|
|
97371
97466
|
chatId,
|
|
97372
|
-
prompt: text4,
|
|
97467
|
+
prompt: text4 ?? "",
|
|
97373
97468
|
sessionId,
|
|
97374
97469
|
attachments,
|
|
97375
97470
|
mode,
|
|
@@ -111703,7 +111798,7 @@ init_registry();
|
|
|
111703
111798
|
// package.json
|
|
111704
111799
|
var package_default = {
|
|
111705
111800
|
name: "@band-app/server",
|
|
111706
|
-
version: "0.54.
|
|
111801
|
+
version: "0.54.3",
|
|
111707
111802
|
type: "module",
|
|
111708
111803
|
types: "src/index.ts",
|
|
111709
111804
|
exports: {
|
|
@@ -111819,6 +111914,7 @@ function describeHostVersion(host, hubVersion, latest) {
|
|
|
111819
111914
|
serviceManager: null,
|
|
111820
111915
|
updateTarget: null,
|
|
111821
111916
|
canUpdate: false,
|
|
111917
|
+
updateBlockedReason: null,
|
|
111822
111918
|
manualCommand: null
|
|
111823
111919
|
};
|
|
111824
111920
|
}
|
|
@@ -111837,6 +111933,7 @@ function describeHostVersion(host, hubVersion, latest) {
|
|
|
111837
111933
|
serviceManager,
|
|
111838
111934
|
updateTarget,
|
|
111839
111935
|
canUpdate: host.status === "online" && serviceManager !== null && updateTarget !== null,
|
|
111936
|
+
updateBlockedReason: typeof host.info?.updateBlocked === "string" ? host.info.updateBlocked : null,
|
|
111840
111937
|
manualCommand: updateTarget ? workerUpdateCommand(updateTarget) : null
|
|
111841
111938
|
};
|
|
111842
111939
|
}
|
|
@@ -112932,6 +113029,7 @@ var WorkerRelayService = class {
|
|
|
112932
113029
|
/** A short JSON answer, sent the same way as any other. */
|
|
112933
113030
|
answer(session, status, body) {
|
|
112934
113031
|
const ch = session.openChannel("relay.body");
|
|
113032
|
+
ch.discardIncoming();
|
|
112935
113033
|
ch.send(Buffer.from(JSON.stringify(body))).then(() => ch.end()).catch(() => void 0);
|
|
112936
113034
|
return { status, headers: { "content-type": "application/json" }, chan: ch.id };
|
|
112937
113035
|
}
|
|
@@ -113145,7 +113243,8 @@ var WorkerLinkService = class {
|
|
|
113145
113243
|
agents: hello.agents,
|
|
113146
113244
|
tools: info?.tools ?? hello.tools ?? {},
|
|
113147
113245
|
mode: hello.mode,
|
|
113148
|
-
...hello.serviceManager ? { serviceManager: hello.serviceManager } : {}
|
|
113246
|
+
...hello.serviceManager ? { serviceManager: hello.serviceManager } : {},
|
|
113247
|
+
...hello.updateBlocked ? { updateBlocked: hello.updateBlocked } : {}
|
|
113149
113248
|
};
|
|
113150
113249
|
const version3 = workerVersionOf(hello);
|
|
113151
113250
|
this.queries.markHostOnline(workerId, at, { info: stored, version: version3 ?? hello.buildId });
|