@nowline/embed 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/README.md +118 -0
- package/dist/auto-scan.d.ts +23 -0
- package/dist/auto-scan.d.ts.map +1 -0
- package/dist/auto-scan.js +71 -0
- package/dist/auto-scan.js.map +1 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +119 -0
- package/dist/index.js.map +1 -0
- package/dist/meta.json +10226 -0
- package/dist/no-op-include-resolver.d.ts +4 -0
- package/dist/no-op-include-resolver.d.ts.map +1 -0
- package/dist/no-op-include-resolver.js +18 -0
- package/dist/no-op-include-resolver.js.map +1 -0
- package/dist/nowline.esm.js +38295 -0
- package/dist/nowline.esm.js.map +7 -0
- package/dist/nowline.min.js +2663 -0
- package/dist/nowline.min.js.map +7 -0
- package/dist/pipeline.d.ts +28 -0
- package/dist/pipeline.d.ts.map +1 -0
- package/dist/pipeline.js +94 -0
- package/dist/pipeline.js.map +1 -0
- package/dist/theme.d.ts +5 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +32 -0
- package/dist/theme.js.map +1 -0
- package/package.json +59 -0
- package/src/auto-scan.ts +107 -0
- package/src/index.ts +176 -0
- package/src/no-op-include-resolver.ts +22 -0
- package/src/pipeline.ts +143 -0
- package/src/theme.ts +33 -0
|
@@ -0,0 +1,2663 @@
|
|
|
1
|
+
"use strict";var nowline=(()=>{var QN=Object.create;var sc=Object.defineProperty;var eC=Object.getOwnPropertyDescriptor;var tC=Object.getOwnPropertyNames;var rC=Object.getPrototypeOf,nC=Object.prototype.hasOwnProperty;var iC=(t,e,r)=>e in t?sc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var e_=(t,e)=>()=>(t&&(e=t(t=0)),e);var ue=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Zr=(t,e)=>{for(var r in e)sc(t,r,{get:e[r],enumerable:!0})},Mu=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of tC(e))!nC.call(t,i)&&i!==r&&sc(t,i,{get:()=>e[i],enumerable:!(n=eC(e,i))||n.enumerable});return t},Ae=(t,e,r)=>(Mu(t,e,"default"),r&&Mu(r,e,"default")),qh=(t,e,r)=>(r=t!=null?QN(rC(t)):{},Mu(e||!t||!t.__esModule?sc(r,"default",{value:t,enumerable:!0}):r,t)),Fu=t=>Mu(sc({},"__esModule",{value:!0}),t);var se=(t,e,r)=>iC(t,typeof e!="symbol"?e+"":e,r);var Id={};Zr(Id,{AnnotatedTextEdit:()=>Mn,ChangeAnnotation:()=>go,ChangeAnnotationIdentifier:()=>Pt,CodeAction:()=>ny,CodeActionContext:()=>ry,CodeActionKind:()=>ty,CodeActionTriggerKind:()=>nl,CodeDescription:()=>Pg,CodeLens:()=>iy,Color:()=>Ed,ColorInformation:()=>Sg,ColorPresentation:()=>Ig,Command:()=>yo,CompletionItem:()=>Hg,CompletionItemKind:()=>Mg,CompletionItemLabelDetails:()=>Gg,CompletionItemTag:()=>Ug,CompletionList:()=>jg,CreateFile:()=>Hs,DeleteFile:()=>qs,Diagnostic:()=>Qc,DiagnosticRelatedInformation:()=>_d,DiagnosticSeverity:()=>Ng,DiagnosticTag:()=>Cg,DocumentHighlight:()=>Kg,DocumentHighlightKind:()=>Vg,DocumentLink:()=>sy,DocumentSymbol:()=>ey,DocumentUri:()=>bg,EOL:()=>p1,FoldingRange:()=>kg,FoldingRangeKind:()=>vg,FormattingOptions:()=>oy,Hover:()=>qg,InlayHint:()=>my,InlayHintKind:()=>Ad,InlayHintLabelPart:()=>Sd,InlineCompletionContext:()=>_y,InlineCompletionItem:()=>yy,InlineCompletionList:()=>xy,InlineCompletionTriggerKind:()=>Ty,InlineValueContext:()=>hy,InlineValueEvaluatableExpression:()=>py,InlineValueText:()=>fy,InlineValueVariableLookup:()=>dy,InsertReplaceEdit:()=>Bg,InsertTextFormat:()=>Fg,InsertTextMode:()=>Xg,Location:()=>Jc,LocationLink:()=>Ag,MarkedString:()=>rl,MarkupContent:()=>Ws,MarkupKind:()=>wd,OptionalVersionedTextDocumentIdentifier:()=>tl,ParameterInformation:()=>Wg,Position:()=>ve,Range:()=>Te,RenameFile:()=>js,SelectedCompletionInfo:()=>Ey,SelectionRange:()=>ay,SemanticTokenModifiers:()=>ly,SemanticTokenTypes:()=>cy,SemanticTokens:()=>uy,SignatureInformation:()=>zg,StringValue:()=>gy,SymbolInformation:()=>Jg,SymbolKind:()=>Yg,SymbolTag:()=>Zg,TextDocument:()=>by,TextDocumentEdit:()=>el,TextDocumentIdentifier:()=>Lg,TextDocumentItem:()=>Dg,TextEdit:()=>sn,URI:()=>Td,VersionedTextDocumentIdentifier:()=>$g,WorkspaceChange:()=>Og,WorkspaceEdit:()=>Rd,WorkspaceFolder:()=>Ry,WorkspaceSymbol:()=>Qg,integer:()=>wg,uinteger:()=>Zc});var bg,Td,wg,Zc,ve,Te,Jc,Ag,Ed,Sg,Ig,vg,kg,_d,Ng,Cg,Pg,Qc,yo,sn,go,Pt,Mn,el,Hs,js,qs,Rd,Gs,bd,Og,Lg,$g,tl,Dg,wd,Ws,Mg,Fg,Ug,Bg,Xg,Gg,Hg,jg,rl,qg,Wg,zg,Vg,Kg,Yg,Zg,Jg,Qg,ey,ty,nl,ry,ny,iy,oy,sy,ay,cy,ly,uy,fy,dy,py,hy,Ad,Sd,my,gy,yy,xy,Ty,Ey,_y,Ry,p1,by,wy,b,zs=e_(()=>{"use strict";(function(t){function e(r){return typeof r=="string"}t.is=e})(bg||(bg={}));(function(t){function e(r){return typeof r=="string"}t.is=e})(Td||(Td={}));(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(wg||(wg={}));(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(Zc||(Zc={}));(function(t){function e(n,i){return n===Number.MAX_VALUE&&(n=Zc.MAX_VALUE),i===Number.MAX_VALUE&&(i=Zc.MAX_VALUE),{line:n,character:i}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&b.uinteger(i.line)&&b.uinteger(i.character)}t.is=r})(ve||(ve={}));(function(t){function e(n,i,o,s){if(b.uinteger(n)&&b.uinteger(i)&&b.uinteger(o)&&b.uinteger(s))return{start:ve.create(n,i),end:ve.create(o,s)};if(ve.is(n)&&ve.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${o}, ${s}]`)}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&ve.is(i.start)&&ve.is(i.end)}t.is=r})(Te||(Te={}));(function(t){function e(n,i){return{uri:n,range:i}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&Te.is(i.range)&&(b.string(i.uri)||b.undefined(i.uri))}t.is=r})(Jc||(Jc={}));(function(t){function e(n,i,o,s){return{targetUri:n,targetRange:i,targetSelectionRange:o,originSelectionRange:s}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&Te.is(i.targetRange)&&b.string(i.targetUri)&&Te.is(i.targetSelectionRange)&&(Te.is(i.originSelectionRange)||b.undefined(i.originSelectionRange))}t.is=r})(Ag||(Ag={}));(function(t){function e(n,i,o,s){return{red:n,green:i,blue:o,alpha:s}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&b.numberRange(i.red,0,1)&&b.numberRange(i.green,0,1)&&b.numberRange(i.blue,0,1)&&b.numberRange(i.alpha,0,1)}t.is=r})(Ed||(Ed={}));(function(t){function e(n,i){return{range:n,color:i}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&Te.is(i.range)&&Ed.is(i.color)}t.is=r})(Sg||(Sg={}));(function(t){function e(n,i,o){return{label:n,textEdit:i,additionalTextEdits:o}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&b.string(i.label)&&(b.undefined(i.textEdit)||sn.is(i))&&(b.undefined(i.additionalTextEdits)||b.typedArray(i.additionalTextEdits,sn.is))}t.is=r})(Ig||(Ig={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(vg||(vg={}));(function(t){function e(n,i,o,s,a,c){let l={startLine:n,endLine:i};return b.defined(o)&&(l.startCharacter=o),b.defined(s)&&(l.endCharacter=s),b.defined(a)&&(l.kind=a),b.defined(c)&&(l.collapsedText=c),l}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&b.uinteger(i.startLine)&&b.uinteger(i.startLine)&&(b.undefined(i.startCharacter)||b.uinteger(i.startCharacter))&&(b.undefined(i.endCharacter)||b.uinteger(i.endCharacter))&&(b.undefined(i.kind)||b.string(i.kind))}t.is=r})(kg||(kg={}));(function(t){function e(n,i){return{location:n,message:i}}t.create=e;function r(n){let i=n;return b.defined(i)&&Jc.is(i.location)&&b.string(i.message)}t.is=r})(_d||(_d={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Ng||(Ng={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(Cg||(Cg={}));(function(t){function e(r){let n=r;return b.objectLiteral(n)&&b.string(n.href)}t.is=e})(Pg||(Pg={}));(function(t){function e(n,i,o,s,a,c){let l={range:n,message:i};return b.defined(o)&&(l.severity=o),b.defined(s)&&(l.code=s),b.defined(a)&&(l.source=a),b.defined(c)&&(l.relatedInformation=c),l}t.create=e;function r(n){var i;let o=n;return b.defined(o)&&Te.is(o.range)&&b.string(o.message)&&(b.number(o.severity)||b.undefined(o.severity))&&(b.integer(o.code)||b.string(o.code)||b.undefined(o.code))&&(b.undefined(o.codeDescription)||b.string((i=o.codeDescription)===null||i===void 0?void 0:i.href))&&(b.string(o.source)||b.undefined(o.source))&&(b.undefined(o.relatedInformation)||b.typedArray(o.relatedInformation,_d.is))}t.is=r})(Qc||(Qc={}));(function(t){function e(n,i,...o){let s={title:n,command:i};return b.defined(o)&&o.length>0&&(s.arguments=o),s}t.create=e;function r(n){let i=n;return b.defined(i)&&b.string(i.title)&&b.string(i.command)}t.is=r})(yo||(yo={}));(function(t){function e(o,s){return{range:o,newText:s}}t.replace=e;function r(o,s){return{range:{start:o,end:o},newText:s}}t.insert=r;function n(o){return{range:o,newText:""}}t.del=n;function i(o){let s=o;return b.objectLiteral(s)&&b.string(s.newText)&&Te.is(s.range)}t.is=i})(sn||(sn={}));(function(t){function e(n,i,o){let s={label:n};return i!==void 0&&(s.needsConfirmation=i),o!==void 0&&(s.description=o),s}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&b.string(i.label)&&(b.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(b.string(i.description)||i.description===void 0)}t.is=r})(go||(go={}));(function(t){function e(r){let n=r;return b.string(n)}t.is=e})(Pt||(Pt={}));(function(t){function e(o,s,a){return{range:o,newText:s,annotationId:a}}t.replace=e;function r(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}t.insert=r;function n(o,s){return{range:o,newText:"",annotationId:s}}t.del=n;function i(o){let s=o;return sn.is(s)&&(go.is(s.annotationId)||Pt.is(s.annotationId))}t.is=i})(Mn||(Mn={}));(function(t){function e(n,i){return{textDocument:n,edits:i}}t.create=e;function r(n){let i=n;return b.defined(i)&&tl.is(i.textDocument)&&Array.isArray(i.edits)}t.is=r})(el||(el={}));(function(t){function e(n,i,o){let s={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}t.create=e;function r(n){let i=n;return i&&i.kind==="create"&&b.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||b.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||b.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Pt.is(i.annotationId))}t.is=r})(Hs||(Hs={}));(function(t){function e(n,i,o,s){let a={kind:"rename",oldUri:n,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}t.create=e;function r(n){let i=n;return i&&i.kind==="rename"&&b.string(i.oldUri)&&b.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||b.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||b.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Pt.is(i.annotationId))}t.is=r})(js||(js={}));(function(t){function e(n,i,o){let s={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}t.create=e;function r(n){let i=n;return i&&i.kind==="delete"&&b.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||b.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||b.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Pt.is(i.annotationId))}t.is=r})(qs||(qs={}));(function(t){function e(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>b.string(i.kind)?Hs.is(i)||js.is(i)||qs.is(i):el.is(i)))}t.is=e})(Rd||(Rd={}));Gs=class{constructor(e,r){this.edits=e,this.changeAnnotations=r}insert(e,r,n){let i,o;if(n===void 0?i=sn.insert(e,r):Pt.is(n)?(o=n,i=Mn.insert(e,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=Mn.insert(e,r,o)),this.edits.push(i),o!==void 0)return o}replace(e,r,n){let i,o;if(n===void 0?i=sn.replace(e,r):Pt.is(n)?(o=n,i=Mn.replace(e,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=Mn.replace(e,r,o)),this.edits.push(i),o!==void 0)return o}delete(e,r){let n,i;if(r===void 0?n=sn.del(e):Pt.is(r)?(i=r,n=Mn.del(e,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=Mn.del(e,i)),this.edits.push(n),i!==void 0)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},bd=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,r){let n;if(Pt.is(e)?n=e:(n=this.nextId(),r=e),this._annotations[n]!==void 0)throw new Error(`Id ${n} is already in use.`);if(r===void 0)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=r,this._size++,n}nextId(){return this._counter++,this._counter.toString()}},Og=class{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new bd(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(r=>{if(el.is(r)){let n=new Gs(r.edits,this._changeAnnotations);this._textEditChanges[r.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach(r=>{let n=new Gs(e.changes[r]);this._textEditChanges[r]=n})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(tl.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let r={uri:e.uri,version:e.version},n=this._textEditChanges[r.uri];if(!n){let i=[],o={textDocument:r,edits:i};this._workspaceEdit.documentChanges.push(o),n=new Gs(i,this._changeAnnotations),this._textEditChanges[r.uri]=n}return n}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let r=this._textEditChanges[e];if(!r){let n=[];this._workspaceEdit.changes[e]=n,r=new Gs(n),this._textEditChanges[e]=r}return r}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new bd,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;go.is(r)||Pt.is(r)?i=r:n=r;let o,s;if(i===void 0?o=Hs.create(e,n):(s=Pt.is(i)?i:this._changeAnnotations.manage(i),o=Hs.create(e,n,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}renameFile(e,r,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;go.is(n)||Pt.is(n)?o=n:i=n;let s,a;if(o===void 0?s=js.create(e,r,i):(a=Pt.is(o)?o:this._changeAnnotations.manage(o),s=js.create(e,r,i,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(e,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;go.is(r)||Pt.is(r)?i=r:n=r;let o,s;if(i===void 0?o=qs.create(e,n):(s=Pt.is(i)?i:this._changeAnnotations.manage(i),o=qs.create(e,n,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}};(function(t){function e(n){return{uri:n}}t.create=e;function r(n){let i=n;return b.defined(i)&&b.string(i.uri)}t.is=r})(Lg||(Lg={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return b.defined(i)&&b.string(i.uri)&&b.integer(i.version)}t.is=r})($g||($g={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return b.defined(i)&&b.string(i.uri)&&(i.version===null||b.integer(i.version))}t.is=r})(tl||(tl={}));(function(t){function e(n,i,o,s){return{uri:n,languageId:i,version:o,text:s}}t.create=e;function r(n){let i=n;return b.defined(i)&&b.string(i.uri)&&b.string(i.languageId)&&b.integer(i.version)&&b.string(i.text)}t.is=r})(Dg||(Dg={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let n=r;return n===t.PlainText||n===t.Markdown}t.is=e})(wd||(wd={}));(function(t){function e(r){let n=r;return b.objectLiteral(r)&&wd.is(n.kind)&&b.string(n.value)}t.is=e})(Ws||(Ws={}));(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Mg||(Mg={}));(function(t){t.PlainText=1,t.Snippet=2})(Fg||(Fg={}));(function(t){t.Deprecated=1})(Ug||(Ug={}));(function(t){function e(n,i,o){return{newText:n,insert:i,replace:o}}t.create=e;function r(n){let i=n;return i&&b.string(i.newText)&&Te.is(i.insert)&&Te.is(i.replace)}t.is=r})(Bg||(Bg={}));(function(t){t.asIs=1,t.adjustIndentation=2})(Xg||(Xg={}));(function(t){function e(r){let n=r;return n&&(b.string(n.detail)||n.detail===void 0)&&(b.string(n.description)||n.description===void 0)}t.is=e})(Gg||(Gg={}));(function(t){function e(r){return{label:r}}t.create=e})(Hg||(Hg={}));(function(t){function e(r,n){return{items:r||[],isIncomplete:!!n}}t.create=e})(jg||(jg={}));(function(t){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function r(n){let i=n;return b.string(i)||b.objectLiteral(i)&&b.string(i.language)&&b.string(i.value)}t.is=r})(rl||(rl={}));(function(t){function e(r){let n=r;return!!n&&b.objectLiteral(n)&&(Ws.is(n.contents)||rl.is(n.contents)||b.typedArray(n.contents,rl.is))&&(r.range===void 0||Te.is(r.range))}t.is=e})(qg||(qg={}));(function(t){function e(r,n){return n?{label:r,documentation:n}:{label:r}}t.create=e})(Wg||(Wg={}));(function(t){function e(r,n,...i){let o={label:r};return b.defined(n)&&(o.documentation=n),b.defined(i)?o.parameters=i:o.parameters=[],o}t.create=e})(zg||(zg={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(Vg||(Vg={}));(function(t){function e(r,n){let i={range:r};return b.number(n)&&(i.kind=n),i}t.create=e})(Kg||(Kg={}));(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Yg||(Yg={}));(function(t){t.Deprecated=1})(Zg||(Zg={}));(function(t){function e(r,n,i,o,s){let a={name:r,kind:n,location:{uri:o,range:i}};return s&&(a.containerName=s),a}t.create=e})(Jg||(Jg={}));(function(t){function e(r,n,i,o){return o!==void 0?{name:r,kind:n,location:{uri:i,range:o}}:{name:r,kind:n,location:{uri:i}}}t.create=e})(Qg||(Qg={}));(function(t){function e(n,i,o,s,a,c){let l={name:n,detail:i,kind:o,range:s,selectionRange:a};return c!==void 0&&(l.children=c),l}t.create=e;function r(n){let i=n;return i&&b.string(i.name)&&b.number(i.kind)&&Te.is(i.range)&&Te.is(i.selectionRange)&&(i.detail===void 0||b.string(i.detail))&&(i.deprecated===void 0||b.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=r})(ey||(ey={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(ty||(ty={}));(function(t){t.Invoked=1,t.Automatic=2})(nl||(nl={}));(function(t){function e(n,i,o){let s={diagnostics:n};return i!=null&&(s.only=i),o!=null&&(s.triggerKind=o),s}t.create=e;function r(n){let i=n;return b.defined(i)&&b.typedArray(i.diagnostics,Qc.is)&&(i.only===void 0||b.typedArray(i.only,b.string))&&(i.triggerKind===void 0||i.triggerKind===nl.Invoked||i.triggerKind===nl.Automatic)}t.is=r})(ry||(ry={}));(function(t){function e(n,i,o){let s={title:n},a=!0;return typeof i=="string"?(a=!1,s.kind=i):yo.is(i)?s.command=i:s.edit=i,a&&o!==void 0&&(s.kind=o),s}t.create=e;function r(n){let i=n;return i&&b.string(i.title)&&(i.diagnostics===void 0||b.typedArray(i.diagnostics,Qc.is))&&(i.kind===void 0||b.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||yo.is(i.command))&&(i.isPreferred===void 0||b.boolean(i.isPreferred))&&(i.edit===void 0||Rd.is(i.edit))}t.is=r})(ny||(ny={}));(function(t){function e(n,i){let o={range:n};return b.defined(i)&&(o.data=i),o}t.create=e;function r(n){let i=n;return b.defined(i)&&Te.is(i.range)&&(b.undefined(i.command)||yo.is(i.command))}t.is=r})(iy||(iy={}));(function(t){function e(n,i){return{tabSize:n,insertSpaces:i}}t.create=e;function r(n){let i=n;return b.defined(i)&&b.uinteger(i.tabSize)&&b.boolean(i.insertSpaces)}t.is=r})(oy||(oy={}));(function(t){function e(n,i,o){return{range:n,target:i,data:o}}t.create=e;function r(n){let i=n;return b.defined(i)&&Te.is(i.range)&&(b.undefined(i.target)||b.string(i.target))}t.is=r})(sy||(sy={}));(function(t){function e(n,i){return{range:n,parent:i}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&Te.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=r})(ay||(ay={}));(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(cy||(cy={}));(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(ly||(ly={}));(function(t){function e(r){let n=r;return b.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}t.is=e})(uy||(uy={}));(function(t){function e(n,i){return{range:n,text:i}}t.create=e;function r(n){let i=n;return i!=null&&Te.is(i.range)&&b.string(i.text)}t.is=r})(fy||(fy={}));(function(t){function e(n,i,o){return{range:n,variableName:i,caseSensitiveLookup:o}}t.create=e;function r(n){let i=n;return i!=null&&Te.is(i.range)&&b.boolean(i.caseSensitiveLookup)&&(b.string(i.variableName)||i.variableName===void 0)}t.is=r})(dy||(dy={}));(function(t){function e(n,i){return{range:n,expression:i}}t.create=e;function r(n){let i=n;return i!=null&&Te.is(i.range)&&(b.string(i.expression)||i.expression===void 0)}t.is=r})(py||(py={}));(function(t){function e(n,i){return{frameId:n,stoppedLocation:i}}t.create=e;function r(n){let i=n;return b.defined(i)&&Te.is(n.stoppedLocation)}t.is=r})(hy||(hy={}));(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}t.is=e})(Ad||(Ad={}));(function(t){function e(n){return{value:n}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&(i.tooltip===void 0||b.string(i.tooltip)||Ws.is(i.tooltip))&&(i.location===void 0||Jc.is(i.location))&&(i.command===void 0||yo.is(i.command))}t.is=r})(Sd||(Sd={}));(function(t){function e(n,i,o){let s={position:n,label:i};return o!==void 0&&(s.kind=o),s}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&ve.is(i.position)&&(b.string(i.label)||b.typedArray(i.label,Sd.is))&&(i.kind===void 0||Ad.is(i.kind))&&i.textEdits===void 0||b.typedArray(i.textEdits,sn.is)&&(i.tooltip===void 0||b.string(i.tooltip)||Ws.is(i.tooltip))&&(i.paddingLeft===void 0||b.boolean(i.paddingLeft))&&(i.paddingRight===void 0||b.boolean(i.paddingRight))}t.is=r})(my||(my={}));(function(t){function e(r){return{kind:"snippet",value:r}}t.createSnippet=e})(gy||(gy={}));(function(t){function e(r,n,i,o){return{insertText:r,filterText:n,range:i,command:o}}t.create=e})(yy||(yy={}));(function(t){function e(r){return{items:r}}t.create=e})(xy||(xy={}));(function(t){t.Invoked=0,t.Automatic=1})(Ty||(Ty={}));(function(t){function e(r,n){return{range:r,text:n}}t.create=e})(Ey||(Ey={}));(function(t){function e(r,n){return{triggerKind:r,selectedCompletionInfo:n}}t.create=e})(_y||(_y={}));(function(t){function e(r){let n=r;return b.objectLiteral(n)&&Td.is(n.uri)&&b.string(n.name)}t.is=e})(Ry||(Ry={}));p1=[`
|
|
2
|
+
`,`\r
|
|
3
|
+
`,"\r"];(function(t){function e(o,s,a,c){return new wy(o,s,a,c)}t.create=e;function r(o){let s=o;return!!(b.defined(s)&&b.string(s.uri)&&(b.undefined(s.languageId)||b.string(s.languageId))&&b.uinteger(s.lineCount)&&b.func(s.getText)&&b.func(s.positionAt)&&b.func(s.offsetAt))}t.is=r;function n(o,s){let a=o.getText(),c=i(s,(u,f)=>{let d=u.range.start.line-f.range.start.line;return d===0?u.range.start.character-f.range.start.character:d}),l=a.length;for(let u=c.length-1;u>=0;u--){let f=c[u],d=o.offsetAt(f.range.start),p=o.offsetAt(f.range.end);if(p<=l)a=a.substring(0,d)+f.newText+a.substring(p,a.length);else throw new Error("Overlapping edit");l=d}return a}t.applyEdits=n;function i(o,s){if(o.length<=1)return o;let a=o.length/2|0,c=o.slice(0,a),l=o.slice(a);i(c,s),i(l,s);let u=0,f=0,d=0;for(;u<c.length&&f<l.length;)s(c[u],l[f])<=0?o[d++]=c[u++]:o[d++]=l[f++];for(;u<c.length;)o[d++]=c[u++];for(;f<l.length;)o[d++]=l[f++];return o}})(by||(by={}));wy=class{constructor(e,r,n,i){this._uri=e,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,n=!0;for(let i=0;i<r.length;i++){n&&(e.push(i),n=!1);let o=r.charAt(i);n=o==="\r"||o===`
|
|
4
|
+
`,o==="\r"&&i+1<r.length&&r.charAt(i+1)===`
|
|
5
|
+
`&&i++}n&&r.length>0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return ve.create(0,e);for(;n<i;){let s=Math.floor((n+i)/2);r[s]>e?i=s:n=s+1}let o=n-1;return ve.create(o,e-r[o])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line],i=e.line+1<r.length?r[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)}get lineCount(){return this.getLineOffsets().length}};(function(t){let e=Object.prototype.toString;function r(p){return typeof p<"u"}t.defined=r;function n(p){return typeof p>"u"}t.undefined=n;function i(p){return p===!0||p===!1}t.boolean=i;function o(p){return e.call(p)==="[object String]"}t.string=o;function s(p){return e.call(p)==="[object Number]"}t.number=s;function a(p,g,y){return e.call(p)==="[object Number]"&&g<=p&&p<=y}t.numberRange=a;function c(p){return e.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}t.integer=c;function l(p){return e.call(p)==="[object Number]"&&0<=p&&p<=2147483647}t.uinteger=l;function u(p){return e.call(p)==="[object Function]"}t.func=u;function f(p){return p!==null&&typeof p=="object"}t.objectLiteral=f;function d(p,g){return Array.isArray(p)&&p.every(g)}t.typedArray=d})(b||(b={}))});var xi=ue(Ly=>{"use strict";Object.defineProperty(Ly,"__esModule",{value:!0});var Py;function Oy(){if(Py===void 0)throw new Error("No runtime abstraction layer installed");return Py}(function(t){function e(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");Py=r}t.install=e})(Oy||(Oy={}));Ly.default=Oy});var Ys=ue(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.stringArray=Ft.array=Ft.func=Ft.error=Ft.number=Ft.string=Ft.boolean=void 0;function A1(t){return t===!0||t===!1}Ft.boolean=A1;function Kw(t){return typeof t=="string"||t instanceof String}Ft.string=Kw;function S1(t){return typeof t=="number"||t instanceof Number}Ft.number=S1;function I1(t){return t instanceof Error}Ft.error=I1;function v1(t){return typeof t=="function"}Ft.func=v1;function Yw(t){return Array.isArray(t)}Ft.array=Yw;function k1(t){return Yw(t)&&t.every(e=>Kw(e))}Ft.stringArray=k1});var bo=ue(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.Emitter=Zs.Event=void 0;var N1=xi(),Zw;(function(t){let e={dispose(){}};t.None=function(){return e}})(Zw||(Zs.Event=Zw={}));var $y=class{add(e,r=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(r),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,r)})}remove(e,r=null){if(!this._callbacks)return;let n=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===r){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else n=!0;if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let r=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=n.length;o<s;o++)try{r.push(n[o].apply(i[o],e))}catch(a){(0,N1.default)().console.error(a)}return r}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Pd=class t{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,r,n)=>{this._callbacks||(this._callbacks=new $y),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,r);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,r),i.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};Zs.Emitter=Pd;Pd._noop=function(){}});var ul=ue(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.CancellationTokenSource=Js.CancellationToken=void 0;var C1=xi(),P1=Ys(),Dy=bo(),Od;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Dy.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Dy.Event.None});function e(r){let n=r;return n&&(n===t.None||n===t.Cancelled||P1.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}t.is=e})(Od||(Js.CancellationToken=Od={}));var O1=Object.freeze(function(t,e){let r=(0,C1.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),Ld=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?O1:(this._emitter||(this._emitter=new Dy.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},My=class{get token(){return this._token||(this._token=new Ld),this._token}cancel(){this._token?this._token.cancel():this._token=Od.Cancelled}dispose(){this._token?this._token instanceof Ld&&this._token.dispose():this._token=Od.None}};Js.CancellationTokenSource=My});var dx=ue(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.Message=Q.NotificationType9=Q.NotificationType8=Q.NotificationType7=Q.NotificationType6=Q.NotificationType5=Q.NotificationType4=Q.NotificationType3=Q.NotificationType2=Q.NotificationType1=Q.NotificationType0=Q.NotificationType=Q.RequestType9=Q.RequestType8=Q.RequestType7=Q.RequestType6=Q.RequestType5=Q.RequestType4=Q.RequestType3=Q.RequestType2=Q.RequestType1=Q.RequestType=Q.RequestType0=Q.AbstractMessageSignature=Q.ParameterStructures=Q.ResponseError=Q.ErrorCodes=void 0;var vo=Ys(),Gy;(function(t){t.ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3})(Gy||(Q.ErrorCodes=Gy={}));var Hy=class t extends Error{constructor(e,r,n){super(r),this.code=vo.number(e)?e:Gy.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,t.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};Q.ResponseError=Hy;var Qt=class t{constructor(e){this.kind=e}static is(e){return e===t.auto||e===t.byName||e===t.byPosition}toString(){return this.kind}};Q.ParameterStructures=Qt;Qt.auto=new Qt("auto");Qt.byPosition=new Qt("byPosition");Qt.byName=new Qt("byName");var nt=class{constructor(e,r){this.method=e,this.numberOfParams=r}get parameterStructures(){return Qt.auto}};Q.AbstractMessageSignature=nt;var jy=class extends nt{constructor(e){super(e,0)}};Q.RequestType0=jy;var qy=class extends nt{constructor(e,r=Qt.auto){super(e,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};Q.RequestType=qy;var Wy=class extends nt{constructor(e,r=Qt.auto){super(e,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};Q.RequestType1=Wy;var zy=class extends nt{constructor(e){super(e,2)}};Q.RequestType2=zy;var Vy=class extends nt{constructor(e){super(e,3)}};Q.RequestType3=Vy;var Ky=class extends nt{constructor(e){super(e,4)}};Q.RequestType4=Ky;var Yy=class extends nt{constructor(e){super(e,5)}};Q.RequestType5=Yy;var Zy=class extends nt{constructor(e){super(e,6)}};Q.RequestType6=Zy;var Jy=class extends nt{constructor(e){super(e,7)}};Q.RequestType7=Jy;var Qy=class extends nt{constructor(e){super(e,8)}};Q.RequestType8=Qy;var ex=class extends nt{constructor(e){super(e,9)}};Q.RequestType9=ex;var tx=class extends nt{constructor(e,r=Qt.auto){super(e,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};Q.NotificationType=tx;var rx=class extends nt{constructor(e){super(e,0)}};Q.NotificationType0=rx;var nx=class extends nt{constructor(e,r=Qt.auto){super(e,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};Q.NotificationType1=nx;var ix=class extends nt{constructor(e){super(e,2)}};Q.NotificationType2=ix;var ox=class extends nt{constructor(e){super(e,3)}};Q.NotificationType3=ox;var sx=class extends nt{constructor(e){super(e,4)}};Q.NotificationType4=sx;var ax=class extends nt{constructor(e){super(e,5)}};Q.NotificationType5=ax;var cx=class extends nt{constructor(e){super(e,6)}};Q.NotificationType6=cx;var lx=class extends nt{constructor(e){super(e,7)}};Q.NotificationType7=lx;var ux=class extends nt{constructor(e){super(e,8)}};Q.NotificationType8=ux;var fx=class extends nt{constructor(e){super(e,9)}};Q.NotificationType9=fx;var lA;(function(t){function e(i){let o=i;return o&&vo.string(o.method)&&(vo.string(o.id)||vo.number(o.id))}t.isRequest=e;function r(i){let o=i;return o&&vo.string(o.method)&&i.id===void 0}t.isNotification=r;function n(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(vo.string(o.id)||vo.number(o.id)||o.id===null)}t.isResponse=n})(lA||(Q.Message=lA={}))});var hx=ue(Ti=>{"use strict";var uA;Object.defineProperty(Ti,"__esModule",{value:!0});Ti.LRUCache=Ti.LinkedMap=Ti.Touch=void 0;var Bt;(function(t){t.None=0,t.First=1,t.AsOld=t.First,t.Last=2,t.AsNew=t.Last})(Bt||(Ti.Touch=Bt={}));var Xd=class{constructor(){this[uA]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,r=Bt.None){let n=this._map.get(e);if(n)return r!==Bt.None&&this.touch(n,r),n.value}set(e,r,n=Bt.None){let i=this._map.get(e);if(i)i.value=r,n!==Bt.None&&this.touch(i,n);else{switch(i={key:e,value:r,next:void 0,previous:void 0},n){case Bt.None:this.addItemLast(i);break;case Bt.First:this.addItemFirst(i);break;case Bt.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let r=this._map.get(e);if(r)return this._map.delete(e),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,r){let n=this._state,i=this._head;for(;i;){if(r?e.bind(r)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,r=this._head,n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(r){let i={value:r.key,done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return n}values(){let e=this._state,r=this._head,n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(r){let i={value:r.value,done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return n}entries(){let e=this._state,r=this._head,n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(r){let i={value:[r.key,r.value],done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return n}[(uA=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let r=this._head,n=this.size;for(;r&&n>e;)this._map.delete(r.key),r=r.next,n--;this._head=r,this._size=n,r&&(r.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let r=e.next,n=e.previous;if(!r||!n)throw new Error("Invalid list");r.previous=n,n.next=r}e.next=void 0,e.previous=void 0,this._state++}touch(e,r){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(r!==Bt.First&&r!==Bt.Last)){if(r===Bt.First){if(e===this._head)return;let n=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(r===Bt.Last){if(e===this._tail)return;let n=e.next,i=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((r,n)=>{e.push([n,r])}),e}fromJSON(e){this.clear();for(let[r,n]of e)this.set(r,n)}};Ti.LinkedMap=Xd;var px=class extends Xd{constructor(e,r=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,r=Bt.AsNew){return super.get(e,r)}peek(e){return super.get(e,Bt.None)}set(e,r){return super.set(e,r,Bt.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Ti.LRUCache=px});var dA=ue(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});Gd.Disposable=void 0;var fA;(function(t){function e(r){return{dispose:r}}t.create=e})(fA||(Gd.Disposable=fA={}))});var pA=ue(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.SharedArrayReceiverStrategy=oa.SharedArraySenderStrategy=void 0;var D1=ul(),vl;(function(t){t.Continue=0,t.Cancelled=1})(vl||(vl={}));var mx=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let r=new SharedArrayBuffer(4),n=new Int32Array(r,0,1);n[0]=vl.Continue,this.buffers.set(e.id,r),e.$cancellationData=r}async sendCancellation(e,r){let n=this.buffers.get(r);if(n===void 0)return;let i=new Int32Array(n,0,1);Atomics.store(i,0,vl.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};oa.SharedArraySenderStrategy=mx;var gx=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===vl.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},yx=class{constructor(e){this.token=new gx(e)}cancel(){}dispose(){}},xx=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let r=e.$cancellationData;return r===void 0?new D1.CancellationTokenSource:new yx(r)}};oa.SharedArrayReceiverStrategy=xx});var Ex=ue(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});Hd.Semaphore=void 0;var M1=xi(),Tx=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((r,n)=>{this._waiting.push({thunk:e,resolve:r,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,M1.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let r=e.thunk();r instanceof Promise?r.then(n=>{this._active--,e.resolve(n),this.runNext()},n=>{this._active--,e.reject(n),this.runNext()}):(this._active--,e.resolve(r),this.runNext())}catch(r){this._active--,e.reject(r),this.runNext()}}};Hd.Semaphore=Tx});var mA=ue(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.ReadableStreamMessageReader=Ei.AbstractMessageReader=Ei.MessageReader=void 0;var Rx=xi(),sa=Ys(),_x=bo(),F1=Ex(),hA;(function(t){function e(r){let n=r;return n&&sa.func(n.listen)&&sa.func(n.dispose)&&sa.func(n.onError)&&sa.func(n.onClose)&&sa.func(n.onPartialMessage)}t.is=e})(hA||(Ei.MessageReader=hA={}));var jd=class{constructor(){this.errorEmitter=new _x.Emitter,this.closeEmitter=new _x.Emitter,this.partialMessageEmitter=new _x.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${sa.string(e.message)?e.message:"unknown"}`)}};Ei.AbstractMessageReader=jd;var bx;(function(t){function e(r){let n,i,o,s=new Map,a,c=new Map;if(r===void 0||typeof r=="string")n=r??"utf-8";else{if(n=r.charset??"utf-8",r.contentDecoder!==void 0&&(o=r.contentDecoder,s.set(o.name,o)),r.contentDecoders!==void 0)for(let l of r.contentDecoders)s.set(l.name,l);if(r.contentTypeDecoder!==void 0&&(a=r.contentTypeDecoder,c.set(a.name,a)),r.contentTypeDecoders!==void 0)for(let l of r.contentTypeDecoders)c.set(l.name,l)}return a===void 0&&(a=(0,Rx.default)().applicationJson.decoder,c.set(a.name,a)),{charset:n,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:c}}t.fromOptions=e})(bx||(bx={}));var wx=class extends jd{constructor(e,r){super(),this.readable=e,this.options=bx.fromOptions(r),this.buffer=(0,Rx.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new F1.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let r=this.readable.onData(n=>{this.onData(n)});return this.readable.onError(n=>this.fireError(n)),this.readable.onClose(()=>this.fireClose()),r}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let n=this.buffer.tryReadHeaders(!0);if(!n)return;let i=n.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property.
|
|
6
|
+
${JSON.stringify(Object.fromEntries(n))}`));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=o}let r=this.buffer.tryReadBody(this.nextMessageLength);if(r===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let n=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(r):r,i=await this.options.contentTypeDecoder.decode(n,this.options);this.callback(i)}).catch(n=>{this.fireError(n)})}}catch(r){this.fireError(r)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Rx.default)().timer.setTimeout((e,r)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:r}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Ei.ReadableStreamMessageReader=wx});var EA=ue(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.WriteableStreamMessageWriter=_i.AbstractMessageWriter=_i.MessageWriter=void 0;var gA=xi(),kl=Ys(),U1=Ex(),yA=bo(),B1="Content-Length: ",xA=`\r
|
|
7
|
+
`,TA;(function(t){function e(r){let n=r;return n&&kl.func(n.dispose)&&kl.func(n.onClose)&&kl.func(n.onError)&&kl.func(n.write)}t.is=e})(TA||(_i.MessageWriter=TA={}));var qd=class{constructor(){this.errorEmitter=new yA.Emitter,this.closeEmitter=new yA.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,r,n){this.errorEmitter.fire([this.asError(e),r,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${kl.string(e.message)?e.message:"unknown"}`)}};_i.AbstractMessageWriter=qd;var Ax;(function(t){function e(r){return r===void 0||typeof r=="string"?{charset:r??"utf-8",contentTypeEncoder:(0,gA.default)().applicationJson.encoder}:{charset:r.charset??"utf-8",contentEncoder:r.contentEncoder,contentTypeEncoder:r.contentTypeEncoder??(0,gA.default)().applicationJson.encoder}}t.fromOptions=e})(Ax||(Ax={}));var Sx=class extends qd{constructor(e,r){super(),this.writable=e,this.options=Ax.fromOptions(r),this.errorCount=0,this.writeSemaphore=new U1.Semaphore(1),this.writable.onError(n=>this.fireError(n)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(n=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(n):n).then(n=>{let i=[];return i.push(B1,n.byteLength.toString(),xA),i.push(xA),this.doWrite(e,i,n)},n=>{throw this.fireError(n),n}))}async doWrite(e,r,n){try{return await this.writable.write(r.join(""),"ascii"),this.writable.write(n)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,r){this.errorCount++,this.fireError(e,r,this.errorCount)}end(){this.writable.end()}};_i.WriteableStreamMessageWriter=Sx});var _A=ue(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});Wd.AbstractMessageBuffer=void 0;var X1=13,G1=10,H1=`\r
|
|
8
|
+
`,Ix=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let r=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(r),this._totalLength+=r.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let r=0,n=0,i=0,o=0;e:for(;n<this._chunks.length;){let l=this._chunks[n];for(i=0;i<l.length;){switch(l[i]){case X1:switch(r){case 0:r=1;break;case 2:r=3;break;default:r=0}break;case G1:switch(r){case 1:r=2;break;case 3:r=4,i++;break e;default:r=0}break;default:r=0}i++}o+=l.byteLength,n++}if(r!==4)return;let s=this._read(o+i),a=new Map,c=this.toString(s,"ascii").split(H1);if(c.length<2)return a;for(let l=0;l<c.length-2;l++){let u=c[l],f=u.indexOf(":");if(f===-1)throw new Error(`Message header must separate key and value using ':'
|
|
9
|
+
${u}`);let d=u.substr(0,f),p=u.substr(f+1).trim();a.set(e?d.toLowerCase():d,p)}return a}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(o)}if(this._chunks[0].byteLength>e){let o=this._chunks[0],s=this.asNative(o,e);return this._chunks[0]=o.slice(e),this._totalLength-=e,s}let r=this.allocNative(e),n=0,i=0;for(;e>0;){let o=this._chunks[i];if(o.byteLength>e){let s=o.slice(0,e);r.set(s,n),n+=e,this._chunks[i]=o.slice(e),this._totalLength-=e,e-=e}else r.set(o,n),n+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return r}};Wd.AbstractMessageBuffer=Ix});var SA=ue(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.createMessageConnection=fe.ConnectionOptions=fe.MessageStrategy=fe.CancellationStrategy=fe.CancellationSenderStrategy=fe.CancellationReceiverStrategy=fe.RequestCancellationReceiverStrategy=fe.IdCancellationReceiverStrategy=fe.ConnectionStrategy=fe.ConnectionError=fe.ConnectionErrors=fe.LogTraceNotification=fe.SetTraceNotification=fe.TraceFormat=fe.TraceValues=fe.Trace=fe.NullLogger=fe.ProgressType=fe.ProgressToken=void 0;var RA=xi(),mt=Ys(),oe=dx(),bA=hx(),Nl=bo(),vx=ul(),Ol;(function(t){t.type=new oe.NotificationType("$/cancelRequest")})(Ol||(Ol={}));var kx;(function(t){function e(r){return typeof r=="string"||typeof r=="number"}t.is=e})(kx||(fe.ProgressToken=kx={}));var Cl;(function(t){t.type=new oe.NotificationType("$/progress")})(Cl||(Cl={}));var Nx=class{constructor(){}};fe.ProgressType=Nx;var Cx;(function(t){function e(r){return mt.func(r)}t.is=e})(Cx||(Cx={}));fe.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var Le;(function(t){t[t.Off=0]="Off",t[t.Messages=1]="Messages",t[t.Compact=2]="Compact",t[t.Verbose=3]="Verbose"})(Le||(fe.Trace=Le={}));var wA;(function(t){t.Off="off",t.Messages="messages",t.Compact="compact",t.Verbose="verbose"})(wA||(fe.TraceValues=wA={}));(function(t){function e(n){if(!mt.string(n))return t.Off;switch(n=n.toLowerCase(),n){case"off":return t.Off;case"messages":return t.Messages;case"compact":return t.Compact;case"verbose":return t.Verbose;default:return t.Off}}t.fromString=e;function r(n){switch(n){case t.Off:return"off";case t.Messages:return"messages";case t.Compact:return"compact";case t.Verbose:return"verbose";default:return"off"}}t.toString=r})(Le||(fe.Trace=Le={}));var dr;(function(t){t.Text="text",t.JSON="json"})(dr||(fe.TraceFormat=dr={}));(function(t){function e(r){return mt.string(r)?(r=r.toLowerCase(),r==="json"?t.JSON:t.Text):t.Text}t.fromString=e})(dr||(fe.TraceFormat=dr={}));var Px;(function(t){t.type=new oe.NotificationType("$/setTrace")})(Px||(fe.SetTraceNotification=Px={}));var zd;(function(t){t.type=new oe.NotificationType("$/logTrace")})(zd||(fe.LogTraceNotification=zd={}));var Pl;(function(t){t[t.Closed=1]="Closed",t[t.Disposed=2]="Disposed",t[t.AlreadyListening=3]="AlreadyListening"})(Pl||(fe.ConnectionErrors=Pl={}));var aa=class t extends Error{constructor(e,r){super(r),this.code=e,Object.setPrototypeOf(this,t.prototype)}};fe.ConnectionError=aa;var Ox;(function(t){function e(r){let n=r;return n&&mt.func(n.cancelUndispatched)}t.is=e})(Ox||(fe.ConnectionStrategy=Ox={}));var Vd;(function(t){function e(r){let n=r;return n&&(n.kind===void 0||n.kind==="id")&&mt.func(n.createCancellationTokenSource)&&(n.dispose===void 0||mt.func(n.dispose))}t.is=e})(Vd||(fe.IdCancellationReceiverStrategy=Vd={}));var Lx;(function(t){function e(r){let n=r;return n&&n.kind==="request"&&mt.func(n.createCancellationTokenSource)&&(n.dispose===void 0||mt.func(n.dispose))}t.is=e})(Lx||(fe.RequestCancellationReceiverStrategy=Lx={}));var Kd;(function(t){t.Message=Object.freeze({createCancellationTokenSource(r){return new vx.CancellationTokenSource}});function e(r){return Vd.is(r)||Lx.is(r)}t.is=e})(Kd||(fe.CancellationReceiverStrategy=Kd={}));var Yd;(function(t){t.Message=Object.freeze({sendCancellation(r,n){return r.sendNotification(Ol.type,{id:n})},cleanup(r){}});function e(r){let n=r;return n&&mt.func(n.sendCancellation)&&mt.func(n.cleanup)}t.is=e})(Yd||(fe.CancellationSenderStrategy=Yd={}));var Zd;(function(t){t.Message=Object.freeze({receiver:Kd.Message,sender:Yd.Message});function e(r){let n=r;return n&&Kd.is(n.receiver)&&Yd.is(n.sender)}t.is=e})(Zd||(fe.CancellationStrategy=Zd={}));var Jd;(function(t){function e(r){let n=r;return n&&mt.func(n.handleMessage)}t.is=e})(Jd||(fe.MessageStrategy=Jd={}));var AA;(function(t){function e(r){let n=r;return n&&(Zd.is(n.cancellationStrategy)||Ox.is(n.connectionStrategy)||Jd.is(n.messageStrategy))}t.is=e})(AA||(fe.ConnectionOptions=AA={}));var Ur;(function(t){t[t.New=1]="New",t[t.Listening=2]="Listening",t[t.Closed=3]="Closed",t[t.Disposed=4]="Disposed"})(Ur||(Ur={}));function j1(t,e,r,n){let i=r!==void 0?r:fe.NullLogger,o=0,s=0,a=0,c="2.0",l,u=new Map,f,d=new Map,p=new Map,g,y=new bA.LinkedMap,_=new Map,T=new Set,R=new Map,E=Le.Off,k=dr.Text,D,P=Ur.New,j=new Nl.Emitter,q=new Nl.Emitter,le=new Nl.Emitter,Ee=new Nl.Emitter,O=new Nl.Emitter,w=n&&n.cancellationStrategy?n.cancellationStrategy:Zd.Message;function L(x){if(x===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+x.toString()}function M(x){return x===null?"res-unknown-"+(++a).toString():"res-"+x.toString()}function A(){return"not-"+(++s).toString()}function S(x,N){oe.Message.isRequest(N)?x.set(L(N.id),N):oe.Message.isResponse(N)?x.set(M(N.id),N):x.set(A(),N)}function v(x){}function B(){return P===Ur.Listening}function H(){return P===Ur.Closed}function $(){return P===Ur.Disposed}function J(){(P===Ur.New||P===Ur.Listening)&&(P=Ur.Closed,q.fire(void 0))}function K(x){j.fire([x,void 0,void 0])}function _e(x){j.fire(x)}t.onClose(J),t.onError(K),e.onClose(J),e.onError(_e);function V(){g||y.size===0||(g=(0,RA.default)().timer.setImmediate(()=>{g=void 0,it()}))}function he(x){oe.Message.isRequest(x)?qe(x):oe.Message.isNotification(x)?Z(x):oe.Message.isResponse(x)?G(x):ee(x)}function it(){if(y.size===0)return;let x=y.shift();try{let N=n?.messageStrategy;Jd.is(N)?N.handleMessage(x,he):he(x)}finally{V()}}let je=x=>{try{if(oe.Message.isNotification(x)&&x.method===Ol.type.method){let N=x.params.id,X=L(N),z=y.get(X);if(oe.Message.isRequest(z)){let Se=n?.connectionStrategy,Oe=Se&&Se.cancelUndispatched?Se.cancelUndispatched(z,v):void 0;if(Oe&&(Oe.error!==void 0||Oe.result!==void 0)){y.delete(X),R.delete(N),Oe.id=z.id,Fe(Oe,x.method,Date.now()),e.write(Oe).catch(()=>i.error("Sending response for canceled message failed."));return}}let Ue=R.get(N);if(Ue!==void 0){Ue.cancel(),U(x);return}else T.add(N)}S(y,x)}finally{V()}};function qe(x){if($())return;function N(ye,Be,Ie){let ft={jsonrpc:c,id:x.id};ye instanceof oe.ResponseError?ft.error=ye.toJson():ft.result=ye===void 0?null:ye,Fe(ft,Be,Ie),e.write(ft).catch(()=>i.error("Sending response failed."))}function X(ye,Be,Ie){let ft={jsonrpc:c,id:x.id,error:ye.toJson()};Fe(ft,Be,Ie),e.write(ft).catch(()=>i.error("Sending response failed."))}function z(ye,Be,Ie){ye===void 0&&(ye=null);let ft={jsonrpc:c,id:x.id,result:ye};Fe(ft,Be,Ie),e.write(ft).catch(()=>i.error("Sending response failed."))}ut(x);let Ue=u.get(x.method),Se,Oe;Ue&&(Se=Ue.type,Oe=Ue.handler);let He=Date.now();if(Oe||l){let ye=x.id??String(Date.now()),Be=Vd.is(w.receiver)?w.receiver.createCancellationTokenSource(ye):w.receiver.createCancellationTokenSource(x);x.id!==null&&T.has(x.id)&&Be.cancel(),x.id!==null&&R.set(ye,Be);try{let Ie;if(Oe)if(x.params===void 0){if(Se!==void 0&&Se.numberOfParams!==0){X(new oe.ResponseError(oe.ErrorCodes.InvalidParams,`Request ${x.method} defines ${Se.numberOfParams} params but received none.`),x.method,He);return}Ie=Oe(Be.token)}else if(Array.isArray(x.params)){if(Se!==void 0&&Se.parameterStructures===oe.ParameterStructures.byName){X(new oe.ResponseError(oe.ErrorCodes.InvalidParams,`Request ${x.method} defines parameters by name but received parameters by position`),x.method,He);return}Ie=Oe(...x.params,Be.token)}else{if(Se!==void 0&&Se.parameterStructures===oe.ParameterStructures.byPosition){X(new oe.ResponseError(oe.ErrorCodes.InvalidParams,`Request ${x.method} defines parameters by position but received parameters by name`),x.method,He);return}Ie=Oe(x.params,Be.token)}else l&&(Ie=l(x.method,x.params,Be.token));let ft=Ie;Ie?ft.then?ft.then(Qe=>{R.delete(ye),N(Qe,x.method,He)},Qe=>{R.delete(ye),Qe instanceof oe.ResponseError?X(Qe,x.method,He):Qe&&mt.string(Qe.message)?X(new oe.ResponseError(oe.ErrorCodes.InternalError,`Request ${x.method} failed with message: ${Qe.message}`),x.method,He):X(new oe.ResponseError(oe.ErrorCodes.InternalError,`Request ${x.method} failed unexpectedly without providing any details.`),x.method,He)}):(R.delete(ye),N(Ie,x.method,He)):(R.delete(ye),z(Ie,x.method,He))}catch(Ie){R.delete(ye),Ie instanceof oe.ResponseError?N(Ie,x.method,He):Ie&&mt.string(Ie.message)?X(new oe.ResponseError(oe.ErrorCodes.InternalError,`Request ${x.method} failed with message: ${Ie.message}`),x.method,He):X(new oe.ResponseError(oe.ErrorCodes.InternalError,`Request ${x.method} failed unexpectedly without providing any details.`),x.method,He)}}else X(new oe.ResponseError(oe.ErrorCodes.MethodNotFound,`Unhandled method ${x.method}`),x.method,He)}function G(x){if(!$())if(x.id===null)x.error?i.error(`Received response message without id: Error is:
|
|
10
|
+
${JSON.stringify(x.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let N=x.id,X=_.get(N);if(Ir(x,X),X!==void 0){_.delete(N);try{if(x.error){let z=x.error;X.reject(new oe.ResponseError(z.code,z.message,z.data))}else if(x.result!==void 0)X.resolve(x.result);else throw new Error("Should never happen.")}catch(z){z.message?i.error(`Response handler '${X.method}' failed with message: ${z.message}`):i.error(`Response handler '${X.method}' failed unexpectedly.`)}}}}function Z(x){if($())return;let N,X;if(x.method===Ol.type.method){let z=x.params.id;T.delete(z),U(x);return}else{let z=d.get(x.method);z&&(X=z.handler,N=z.type)}if(X||f)try{if(U(x),X)if(x.params===void 0)N!==void 0&&N.numberOfParams!==0&&N.parameterStructures!==oe.ParameterStructures.byName&&i.error(`Notification ${x.method} defines ${N.numberOfParams} params but received none.`),X();else if(Array.isArray(x.params)){let z=x.params;x.method===Cl.type.method&&z.length===2&&kx.is(z[0])?X({token:z[0],value:z[1]}):(N!==void 0&&(N.parameterStructures===oe.ParameterStructures.byName&&i.error(`Notification ${x.method} defines parameters by name but received parameters by position`),N.numberOfParams!==x.params.length&&i.error(`Notification ${x.method} defines ${N.numberOfParams} params but received ${z.length} arguments`)),X(...z))}else N!==void 0&&N.parameterStructures===oe.ParameterStructures.byPosition&&i.error(`Notification ${x.method} defines parameters by position but received parameters by name`),X(x.params);else f&&f(x.method,x.params)}catch(z){z.message?i.error(`Notification handler '${x.method}' failed with message: ${z.message}`):i.error(`Notification handler '${x.method}' failed unexpectedly.`)}else le.fire(x)}function ee(x){if(!x){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
|
|
11
|
+
${JSON.stringify(x,null,4)}`);let N=x;if(mt.string(N.id)||mt.number(N.id)){let X=N.id,z=_.get(X);z&&z.reject(new Error("The received response has neither a result nor an error property."))}}function C(x){if(x!=null)switch(E){case Le.Verbose:return JSON.stringify(x,null,4);case Le.Compact:return JSON.stringify(x);default:return}}function xe(x){if(!(E===Le.Off||!D))if(k===dr.Text){let N;(E===Le.Verbose||E===Le.Compact)&&x.params&&(N=`Params: ${C(x.params)}
|
|
12
|
+
|
|
13
|
+
`),D.log(`Sending request '${x.method} - (${x.id})'.`,N)}else vr("send-request",x)}function Re(x){if(!(E===Le.Off||!D))if(k===dr.Text){let N;(E===Le.Verbose||E===Le.Compact)&&(x.params?N=`Params: ${C(x.params)}
|
|
14
|
+
|
|
15
|
+
`:N=`No parameters provided.
|
|
16
|
+
|
|
17
|
+
`),D.log(`Sending notification '${x.method}'.`,N)}else vr("send-notification",x)}function Fe(x,N,X){if(!(E===Le.Off||!D))if(k===dr.Text){let z;(E===Le.Verbose||E===Le.Compact)&&(x.error&&x.error.data?z=`Error data: ${C(x.error.data)}
|
|
18
|
+
|
|
19
|
+
`:x.result?z=`Result: ${C(x.result)}
|
|
20
|
+
|
|
21
|
+
`:x.error===void 0&&(z=`No result returned.
|
|
22
|
+
|
|
23
|
+
`)),D.log(`Sending response '${N} - (${x.id})'. Processing request took ${Date.now()-X}ms`,z)}else vr("send-response",x)}function ut(x){if(!(E===Le.Off||!D))if(k===dr.Text){let N;(E===Le.Verbose||E===Le.Compact)&&x.params&&(N=`Params: ${C(x.params)}
|
|
24
|
+
|
|
25
|
+
`),D.log(`Received request '${x.method} - (${x.id})'.`,N)}else vr("receive-request",x)}function U(x){if(!(E===Le.Off||!D||x.method===zd.type.method))if(k===dr.Text){let N;(E===Le.Verbose||E===Le.Compact)&&(x.params?N=`Params: ${C(x.params)}
|
|
26
|
+
|
|
27
|
+
`:N=`No parameters provided.
|
|
28
|
+
|
|
29
|
+
`),D.log(`Received notification '${x.method}'.`,N)}else vr("receive-notification",x)}function Ir(x,N){if(!(E===Le.Off||!D))if(k===dr.Text){let X;if((E===Le.Verbose||E===Le.Compact)&&(x.error&&x.error.data?X=`Error data: ${C(x.error.data)}
|
|
30
|
+
|
|
31
|
+
`:x.result?X=`Result: ${C(x.result)}
|
|
32
|
+
|
|
33
|
+
`:x.error===void 0&&(X=`No result returned.
|
|
34
|
+
|
|
35
|
+
`)),N){let z=x.error?` Request failed: ${x.error.message} (${x.error.code}).`:"";D.log(`Received response '${N.method} - (${x.id})' in ${Date.now()-N.timerStart}ms.${z}`,X)}else D.log(`Received response ${x.id} without active response promise.`,X)}else vr("receive-response",x)}function vr(x,N){if(!D||E===Le.Off)return;let X={isLSPMessage:!0,type:x,message:N,timestamp:Date.now()};D.log(X)}function de(){if(H())throw new aa(Pl.Closed,"Connection is closed.");if($())throw new aa(Pl.Disposed,"Connection is disposed.")}function Ui(){if(B())throw new aa(Pl.AlreadyListening,"Connection is already listening")}function Bi(){if(!B())throw new Error("Call listen() first.")}function kr(x){return x===void 0?null:x}function Ko(x){if(x!==null)return x}function gr(x){return x!=null&&!Array.isArray(x)&&typeof x=="object"}function Ct(x,N){switch(x){case oe.ParameterStructures.auto:return gr(N)?Ko(N):[kr(N)];case oe.ParameterStructures.byName:if(!gr(N))throw new Error("Received parameters by name but param is not an object literal.");return Ko(N);case oe.ParameterStructures.byPosition:return[kr(N)];default:throw new Error(`Unknown parameter structure ${x.toString()}`)}}function Kr(x,N){let X,z=x.numberOfParams;switch(z){case 0:X=void 0;break;case 1:X=Ct(x.parameterStructures,N[0]);break;default:X=[];for(let Ue=0;Ue<N.length&&Ue<z;Ue++)X.push(kr(N[Ue]));if(N.length<z)for(let Ue=N.length;Ue<z;Ue++)X.push(null);break}return X}let Gt={sendNotification:(x,...N)=>{de();let X,z;if(mt.string(x)){X=x;let Se=N[0],Oe=0,He=oe.ParameterStructures.auto;oe.ParameterStructures.is(Se)&&(Oe=1,He=Se);let ye=N.length,Be=ye-Oe;switch(Be){case 0:z=void 0;break;case 1:z=Ct(He,N[Oe]);break;default:if(He===oe.ParameterStructures.byName)throw new Error(`Received ${Be} parameters for 'by Name' notification parameter structure.`);z=N.slice(Oe,ye).map(Ie=>kr(Ie));break}}else{let Se=N;X=x.method,z=Kr(x,Se)}let Ue={jsonrpc:c,method:X,params:z};return Re(Ue),e.write(Ue).catch(Se=>{throw i.error("Sending notification failed."),Se})},onNotification:(x,N)=>{de();let X;return mt.func(x)?f=x:N&&(mt.string(x)?(X=x,d.set(x,{type:void 0,handler:N})):(X=x.method,d.set(x.method,{type:x,handler:N}))),{dispose:()=>{X!==void 0?d.delete(X):f=void 0}}},onProgress:(x,N,X)=>{if(p.has(N))throw new Error(`Progress handler for token ${N} already registered`);return p.set(N,X),{dispose:()=>{p.delete(N)}}},sendProgress:(x,N,X)=>Gt.sendNotification(Cl.type,{token:N,value:X}),onUnhandledProgress:Ee.event,sendRequest:(x,...N)=>{de(),Bi();let X,z,Ue;if(mt.string(x)){X=x;let ye=N[0],Be=N[N.length-1],Ie=0,ft=oe.ParameterStructures.auto;oe.ParameterStructures.is(ye)&&(Ie=1,ft=ye);let Qe=N.length;vx.CancellationToken.is(Be)&&(Qe=Qe-1,Ue=Be);let or=Qe-Ie;switch(or){case 0:z=void 0;break;case 1:z=Ct(ft,N[Ie]);break;default:if(ft===oe.ParameterStructures.byName)throw new Error(`Received ${or} parameters for 'by Name' request parameter structure.`);z=N.slice(Ie,Qe).map($t=>kr($t));break}}else{let ye=N;X=x.method,z=Kr(x,ye);let Be=x.numberOfParams;Ue=vx.CancellationToken.is(ye[Be])?ye[Be]:void 0}let Se=o++,Oe;Ue&&(Oe=Ue.onCancellationRequested(()=>{let ye=w.sender.sendCancellation(Gt,Se);return ye===void 0?(i.log(`Received no promise from cancellation strategy when cancelling id ${Se}`),Promise.resolve()):ye.catch(()=>{i.log(`Sending cancellation messages for id ${Se} failed`)})}));let He={jsonrpc:c,id:Se,method:X,params:z};return xe(He),typeof w.sender.enableCancellation=="function"&&w.sender.enableCancellation(He),new Promise(async(ye,Be)=>{let Ie=or=>{ye(or),w.sender.cleanup(Se),Oe?.dispose()},ft=or=>{Be(or),w.sender.cleanup(Se),Oe?.dispose()},Qe={method:X,timerStart:Date.now(),resolve:Ie,reject:ft};try{await e.write(He),_.set(Se,Qe)}catch(or){throw i.error("Sending request failed."),Qe.reject(new oe.ResponseError(oe.ErrorCodes.MessageWriteError,or.message?or.message:"Unknown reason")),or}})},onRequest:(x,N)=>{de();let X=null;return Cx.is(x)?(X=void 0,l=x):mt.string(x)?(X=null,N!==void 0&&(X=x,u.set(x,{handler:N,type:void 0}))):N!==void 0&&(X=x.method,u.set(x.method,{type:x,handler:N})),{dispose:()=>{X!==null&&(X!==void 0?u.delete(X):l=void 0)}}},hasPendingResponse:()=>_.size>0,trace:async(x,N,X)=>{let z=!1,Ue=dr.Text;X!==void 0&&(mt.boolean(X)?z=X:(z=X.sendNotification||!1,Ue=X.traceFormat||dr.Text)),E=x,k=Ue,E===Le.Off?D=void 0:D=N,z&&!H()&&!$()&&await Gt.sendNotification(Px.type,{value:Le.toString(x)})},onError:j.event,onClose:q.event,onUnhandledNotification:le.event,onDispose:O.event,end:()=>{e.end()},dispose:()=>{if($())return;P=Ur.Disposed,O.fire(void 0);let x=new oe.ResponseError(oe.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let N of _.values())N.reject(x);_=new Map,R=new Map,T=new Set,y=new bA.LinkedMap,mt.func(e.dispose)&&e.dispose(),mt.func(t.dispose)&&t.dispose()},listen:()=>{de(),Ui(),P=Ur.Listening,t.listen(je)},inspect:()=>{(0,RA.default)().console.log("inspect")}};return Gt.onNotification(zd.type,x=>{if(E===Le.Off||!D)return;let N=E===Le.Verbose||E===Le.Compact;D.log(x.message,N?x.verbose:void 0)}),Gt.onNotification(Cl.type,x=>{let N=p.get(x.token);N?N(x.value):Ee.fire(x)}),Gt}fe.createMessageConnection=j1});var Qd=ue(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.ProgressType=I.ProgressToken=I.createMessageConnection=I.NullLogger=I.ConnectionOptions=I.ConnectionStrategy=I.AbstractMessageBuffer=I.WriteableStreamMessageWriter=I.AbstractMessageWriter=I.MessageWriter=I.ReadableStreamMessageReader=I.AbstractMessageReader=I.MessageReader=I.SharedArrayReceiverStrategy=I.SharedArraySenderStrategy=I.CancellationToken=I.CancellationTokenSource=I.Emitter=I.Event=I.Disposable=I.LRUCache=I.Touch=I.LinkedMap=I.ParameterStructures=I.NotificationType9=I.NotificationType8=I.NotificationType7=I.NotificationType6=I.NotificationType5=I.NotificationType4=I.NotificationType3=I.NotificationType2=I.NotificationType1=I.NotificationType0=I.NotificationType=I.ErrorCodes=I.ResponseError=I.RequestType9=I.RequestType8=I.RequestType7=I.RequestType6=I.RequestType5=I.RequestType4=I.RequestType3=I.RequestType2=I.RequestType1=I.RequestType0=I.RequestType=I.Message=I.RAL=void 0;I.MessageStrategy=I.CancellationStrategy=I.CancellationSenderStrategy=I.CancellationReceiverStrategy=I.ConnectionError=I.ConnectionErrors=I.LogTraceNotification=I.SetTraceNotification=I.TraceFormat=I.TraceValues=I.Trace=void 0;var Je=dx();Object.defineProperty(I,"Message",{enumerable:!0,get:function(){return Je.Message}});Object.defineProperty(I,"RequestType",{enumerable:!0,get:function(){return Je.RequestType}});Object.defineProperty(I,"RequestType0",{enumerable:!0,get:function(){return Je.RequestType0}});Object.defineProperty(I,"RequestType1",{enumerable:!0,get:function(){return Je.RequestType1}});Object.defineProperty(I,"RequestType2",{enumerable:!0,get:function(){return Je.RequestType2}});Object.defineProperty(I,"RequestType3",{enumerable:!0,get:function(){return Je.RequestType3}});Object.defineProperty(I,"RequestType4",{enumerable:!0,get:function(){return Je.RequestType4}});Object.defineProperty(I,"RequestType5",{enumerable:!0,get:function(){return Je.RequestType5}});Object.defineProperty(I,"RequestType6",{enumerable:!0,get:function(){return Je.RequestType6}});Object.defineProperty(I,"RequestType7",{enumerable:!0,get:function(){return Je.RequestType7}});Object.defineProperty(I,"RequestType8",{enumerable:!0,get:function(){return Je.RequestType8}});Object.defineProperty(I,"RequestType9",{enumerable:!0,get:function(){return Je.RequestType9}});Object.defineProperty(I,"ResponseError",{enumerable:!0,get:function(){return Je.ResponseError}});Object.defineProperty(I,"ErrorCodes",{enumerable:!0,get:function(){return Je.ErrorCodes}});Object.defineProperty(I,"NotificationType",{enumerable:!0,get:function(){return Je.NotificationType}});Object.defineProperty(I,"NotificationType0",{enumerable:!0,get:function(){return Je.NotificationType0}});Object.defineProperty(I,"NotificationType1",{enumerable:!0,get:function(){return Je.NotificationType1}});Object.defineProperty(I,"NotificationType2",{enumerable:!0,get:function(){return Je.NotificationType2}});Object.defineProperty(I,"NotificationType3",{enumerable:!0,get:function(){return Je.NotificationType3}});Object.defineProperty(I,"NotificationType4",{enumerable:!0,get:function(){return Je.NotificationType4}});Object.defineProperty(I,"NotificationType5",{enumerable:!0,get:function(){return Je.NotificationType5}});Object.defineProperty(I,"NotificationType6",{enumerable:!0,get:function(){return Je.NotificationType6}});Object.defineProperty(I,"NotificationType7",{enumerable:!0,get:function(){return Je.NotificationType7}});Object.defineProperty(I,"NotificationType8",{enumerable:!0,get:function(){return Je.NotificationType8}});Object.defineProperty(I,"NotificationType9",{enumerable:!0,get:function(){return Je.NotificationType9}});Object.defineProperty(I,"ParameterStructures",{enumerable:!0,get:function(){return Je.ParameterStructures}});var $x=hx();Object.defineProperty(I,"LinkedMap",{enumerable:!0,get:function(){return $x.LinkedMap}});Object.defineProperty(I,"LRUCache",{enumerable:!0,get:function(){return $x.LRUCache}});Object.defineProperty(I,"Touch",{enumerable:!0,get:function(){return $x.Touch}});var q1=dA();Object.defineProperty(I,"Disposable",{enumerable:!0,get:function(){return q1.Disposable}});var IA=bo();Object.defineProperty(I,"Event",{enumerable:!0,get:function(){return IA.Event}});Object.defineProperty(I,"Emitter",{enumerable:!0,get:function(){return IA.Emitter}});var vA=ul();Object.defineProperty(I,"CancellationTokenSource",{enumerable:!0,get:function(){return vA.CancellationTokenSource}});Object.defineProperty(I,"CancellationToken",{enumerable:!0,get:function(){return vA.CancellationToken}});var kA=pA();Object.defineProperty(I,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return kA.SharedArraySenderStrategy}});Object.defineProperty(I,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return kA.SharedArrayReceiverStrategy}});var Dx=mA();Object.defineProperty(I,"MessageReader",{enumerable:!0,get:function(){return Dx.MessageReader}});Object.defineProperty(I,"AbstractMessageReader",{enumerable:!0,get:function(){return Dx.AbstractMessageReader}});Object.defineProperty(I,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Dx.ReadableStreamMessageReader}});var Mx=EA();Object.defineProperty(I,"MessageWriter",{enumerable:!0,get:function(){return Mx.MessageWriter}});Object.defineProperty(I,"AbstractMessageWriter",{enumerable:!0,get:function(){return Mx.AbstractMessageWriter}});Object.defineProperty(I,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Mx.WriteableStreamMessageWriter}});var W1=_A();Object.defineProperty(I,"AbstractMessageBuffer",{enumerable:!0,get:function(){return W1.AbstractMessageBuffer}});var Ot=SA();Object.defineProperty(I,"ConnectionStrategy",{enumerable:!0,get:function(){return Ot.ConnectionStrategy}});Object.defineProperty(I,"ConnectionOptions",{enumerable:!0,get:function(){return Ot.ConnectionOptions}});Object.defineProperty(I,"NullLogger",{enumerable:!0,get:function(){return Ot.NullLogger}});Object.defineProperty(I,"createMessageConnection",{enumerable:!0,get:function(){return Ot.createMessageConnection}});Object.defineProperty(I,"ProgressToken",{enumerable:!0,get:function(){return Ot.ProgressToken}});Object.defineProperty(I,"ProgressType",{enumerable:!0,get:function(){return Ot.ProgressType}});Object.defineProperty(I,"Trace",{enumerable:!0,get:function(){return Ot.Trace}});Object.defineProperty(I,"TraceValues",{enumerable:!0,get:function(){return Ot.TraceValues}});Object.defineProperty(I,"TraceFormat",{enumerable:!0,get:function(){return Ot.TraceFormat}});Object.defineProperty(I,"SetTraceNotification",{enumerable:!0,get:function(){return Ot.SetTraceNotification}});Object.defineProperty(I,"LogTraceNotification",{enumerable:!0,get:function(){return Ot.LogTraceNotification}});Object.defineProperty(I,"ConnectionErrors",{enumerable:!0,get:function(){return Ot.ConnectionErrors}});Object.defineProperty(I,"ConnectionError",{enumerable:!0,get:function(){return Ot.ConnectionError}});Object.defineProperty(I,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return Ot.CancellationReceiverStrategy}});Object.defineProperty(I,"CancellationSenderStrategy",{enumerable:!0,get:function(){return Ot.CancellationSenderStrategy}});Object.defineProperty(I,"CancellationStrategy",{enumerable:!0,get:function(){return Ot.CancellationStrategy}});Object.defineProperty(I,"MessageStrategy",{enumerable:!0,get:function(){return Ot.MessageStrategy}});var z1=xi();I.RAL=z1.default});var CA=ue(Xx=>{"use strict";Object.defineProperty(Xx,"__esModule",{value:!0});var un=Qd(),ep=class t extends un.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return t.emptyBuffer}fromString(e,r){return new TextEncoder().encode(e)}toString(e,r){return r==="ascii"?this.asciiDecoder.decode(e):new TextDecoder(r).decode(e)}asNative(e,r){return r===void 0?e:e.slice(0,r)}allocNative(e){return new Uint8Array(e)}};ep.emptyBuffer=new Uint8Array(0);var Fx=class{constructor(e){this.socket=e,this._onData=new un.Emitter,this._messageListener=r=>{r.data.arrayBuffer().then(i=>{this._onData.fire(new Uint8Array(i))},()=>{(0,un.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),un.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),un.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),un.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}},Ux=class{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),un.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),un.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),un.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,r){if(typeof e=="string"){if(r!==void 0&&r!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${r}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},V1=new TextEncoder,NA=Object.freeze({messageBuffer:Object.freeze({create:t=>new ep(t)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(t,e)=>{if(e.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${e.charset}`);return Promise.resolve(V1.encode(JSON.stringify(t,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(t,e)=>{if(!(t instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(e.charset).decode(t)))}})}),stream:Object.freeze({asReadableStream:t=>new Fx(t),asWritableStream:t=>new Ux(t)}),console,timer:Object.freeze({setTimeout(t,e,...r){let n=setTimeout(t,e,...r);return{dispose:()=>clearTimeout(n)}},setImmediate(t,...e){let r=setTimeout(t,0,...e);return{dispose:()=>clearTimeout(r)}},setInterval(t,e,...r){let n=setInterval(t,e,...r);return{dispose:()=>clearInterval(n)}}})});function Bx(){return NA}(function(t){function e(){un.RAL.install(NA)}t.install=e})(Bx||(Bx={}));Xx.default=Bx});var ko=ue(pr=>{"use strict";var K1=pr&&pr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Y1=pr&&pr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&K1(e,t,r)};Object.defineProperty(pr,"__esModule",{value:!0});pr.createMessageConnection=pr.BrowserMessageWriter=pr.BrowserMessageReader=void 0;var Z1=CA();Z1.default.install();var ca=Qd();Y1(Qd(),pr);var Gx=class extends ca.AbstractMessageReader{constructor(e){super(),this._onData=new ca.Emitter,this._messageListener=r=>{this._onData.fire(r.data)},e.addEventListener("error",r=>this.fireError(r)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}};pr.BrowserMessageReader=Gx;var Hx=class extends ca.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",r=>this.fireError(r))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(r){return this.handleError(r,e),Promise.reject(r)}}handleError(e,r){this.errorCount++,this.fireError(e,r,this.errorCount)}end(){}};pr.BrowserMessageWriter=Hx;function J1(t,e,r,n){return r===void 0&&(r=ca.NullLogger),ca.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,ca.createMessageConnection)(t,e,r,n)}pr.createMessageConnection=J1});var jx=ue((U6,PA)=>{"use strict";PA.exports=ko()});var lt=ue(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.ProtocolNotificationType=er.ProtocolNotificationType0=er.ProtocolRequestType=er.ProtocolRequestType0=er.RegistrationType=er.MessageDirection=void 0;var la=ko(),OA;(function(t){t.clientToServer="clientToServer",t.serverToClient="serverToClient",t.both="both"})(OA||(er.MessageDirection=OA={}));var qx=class{constructor(e){this.method=e}};er.RegistrationType=qx;var Wx=class extends la.RequestType0{constructor(e){super(e)}};er.ProtocolRequestType0=Wx;var zx=class extends la.RequestType{constructor(e){super(e,la.ParameterStructures.byName)}};er.ProtocolRequestType=zx;var Vx=class extends la.NotificationType0{constructor(e){super(e)}};er.ProtocolNotificationType0=Vx;var Kx=class extends la.NotificationType{constructor(e){super(e,la.ParameterStructures.byName)}};er.ProtocolNotificationType=Kx});var tp=ue(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.objectLiteral=Et.typedArray=Et.stringArray=Et.array=Et.func=Et.error=Et.number=Et.string=Et.boolean=void 0;function Q1(t){return t===!0||t===!1}Et.boolean=Q1;function LA(t){return typeof t=="string"||t instanceof String}Et.string=LA;function eF(t){return typeof t=="number"||t instanceof Number}Et.number=eF;function tF(t){return t instanceof Error}Et.error=tF;function rF(t){return typeof t=="function"}Et.func=rF;function $A(t){return Array.isArray(t)}Et.array=$A;function nF(t){return $A(t)&&t.every(e=>LA(e))}Et.stringArray=nF;function iF(t,e){return Array.isArray(t)&&t.every(e)}Et.typedArray=iF;function oF(t){return t!==null&&typeof t=="object"}Et.objectLiteral=oF});var FA=ue(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});rp.ImplementationRequest=void 0;var DA=lt(),MA;(function(t){t.method="textDocument/implementation",t.messageDirection=DA.MessageDirection.clientToServer,t.type=new DA.ProtocolRequestType(t.method)})(MA||(rp.ImplementationRequest=MA={}))});var XA=ue(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});np.TypeDefinitionRequest=void 0;var UA=lt(),BA;(function(t){t.method="textDocument/typeDefinition",t.messageDirection=UA.MessageDirection.clientToServer,t.type=new UA.ProtocolRequestType(t.method)})(BA||(np.TypeDefinitionRequest=BA={}))});var jA=ue(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.DidChangeWorkspaceFoldersNotification=ua.WorkspaceFoldersRequest=void 0;var ip=lt(),GA;(function(t){t.method="workspace/workspaceFolders",t.messageDirection=ip.MessageDirection.serverToClient,t.type=new ip.ProtocolRequestType0(t.method)})(GA||(ua.WorkspaceFoldersRequest=GA={}));var HA;(function(t){t.method="workspace/didChangeWorkspaceFolders",t.messageDirection=ip.MessageDirection.clientToServer,t.type=new ip.ProtocolNotificationType(t.method)})(HA||(ua.DidChangeWorkspaceFoldersNotification=HA={}))});var zA=ue(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});op.ConfigurationRequest=void 0;var qA=lt(),WA;(function(t){t.method="workspace/configuration",t.messageDirection=qA.MessageDirection.serverToClient,t.type=new qA.ProtocolRequestType(t.method)})(WA||(op.ConfigurationRequest=WA={}))});var YA=ue(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.ColorPresentationRequest=fa.DocumentColorRequest=void 0;var sp=lt(),VA;(function(t){t.method="textDocument/documentColor",t.messageDirection=sp.MessageDirection.clientToServer,t.type=new sp.ProtocolRequestType(t.method)})(VA||(fa.DocumentColorRequest=VA={}));var KA;(function(t){t.method="textDocument/colorPresentation",t.messageDirection=sp.MessageDirection.clientToServer,t.type=new sp.ProtocolRequestType(t.method)})(KA||(fa.ColorPresentationRequest=KA={}))});var QA=ue(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.FoldingRangeRefreshRequest=da.FoldingRangeRequest=void 0;var ap=lt(),ZA;(function(t){t.method="textDocument/foldingRange",t.messageDirection=ap.MessageDirection.clientToServer,t.type=new ap.ProtocolRequestType(t.method)})(ZA||(da.FoldingRangeRequest=ZA={}));var JA;(function(t){t.method="workspace/foldingRange/refresh",t.messageDirection=ap.MessageDirection.serverToClient,t.type=new ap.ProtocolRequestType0(t.method)})(JA||(da.FoldingRangeRefreshRequest=JA={}))});var r0=ue(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});cp.DeclarationRequest=void 0;var e0=lt(),t0;(function(t){t.method="textDocument/declaration",t.messageDirection=e0.MessageDirection.clientToServer,t.type=new e0.ProtocolRequestType(t.method)})(t0||(cp.DeclarationRequest=t0={}))});var o0=ue(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});lp.SelectionRangeRequest=void 0;var n0=lt(),i0;(function(t){t.method="textDocument/selectionRange",t.messageDirection=n0.MessageDirection.clientToServer,t.type=new n0.ProtocolRequestType(t.method)})(i0||(lp.SelectionRangeRequest=i0={}))});var l0=ue(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.WorkDoneProgressCancelNotification=Ri.WorkDoneProgressCreateRequest=Ri.WorkDoneProgress=void 0;var sF=ko(),up=lt(),s0;(function(t){t.type=new sF.ProgressType;function e(r){return r===t.type}t.is=e})(s0||(Ri.WorkDoneProgress=s0={}));var a0;(function(t){t.method="window/workDoneProgress/create",t.messageDirection=up.MessageDirection.serverToClient,t.type=new up.ProtocolRequestType(t.method)})(a0||(Ri.WorkDoneProgressCreateRequest=a0={}));var c0;(function(t){t.method="window/workDoneProgress/cancel",t.messageDirection=up.MessageDirection.clientToServer,t.type=new up.ProtocolNotificationType(t.method)})(c0||(Ri.WorkDoneProgressCancelNotification=c0={}))});var p0=ue(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.CallHierarchyOutgoingCallsRequest=bi.CallHierarchyIncomingCallsRequest=bi.CallHierarchyPrepareRequest=void 0;var pa=lt(),u0;(function(t){t.method="textDocument/prepareCallHierarchy",t.messageDirection=pa.MessageDirection.clientToServer,t.type=new pa.ProtocolRequestType(t.method)})(u0||(bi.CallHierarchyPrepareRequest=u0={}));var f0;(function(t){t.method="callHierarchy/incomingCalls",t.messageDirection=pa.MessageDirection.clientToServer,t.type=new pa.ProtocolRequestType(t.method)})(f0||(bi.CallHierarchyIncomingCallsRequest=f0={}));var d0;(function(t){t.method="callHierarchy/outgoingCalls",t.messageDirection=pa.MessageDirection.clientToServer,t.type=new pa.ProtocolRequestType(t.method)})(d0||(bi.CallHierarchyOutgoingCallsRequest=d0={}))});var T0=ue(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.SemanticTokensRefreshRequest=tr.SemanticTokensRangeRequest=tr.SemanticTokensDeltaRequest=tr.SemanticTokensRequest=tr.SemanticTokensRegistrationType=tr.TokenFormat=void 0;var Fn=lt(),h0;(function(t){t.Relative="relative"})(h0||(tr.TokenFormat=h0={}));var Ll;(function(t){t.method="textDocument/semanticTokens",t.type=new Fn.RegistrationType(t.method)})(Ll||(tr.SemanticTokensRegistrationType=Ll={}));var m0;(function(t){t.method="textDocument/semanticTokens/full",t.messageDirection=Fn.MessageDirection.clientToServer,t.type=new Fn.ProtocolRequestType(t.method),t.registrationMethod=Ll.method})(m0||(tr.SemanticTokensRequest=m0={}));var g0;(function(t){t.method="textDocument/semanticTokens/full/delta",t.messageDirection=Fn.MessageDirection.clientToServer,t.type=new Fn.ProtocolRequestType(t.method),t.registrationMethod=Ll.method})(g0||(tr.SemanticTokensDeltaRequest=g0={}));var y0;(function(t){t.method="textDocument/semanticTokens/range",t.messageDirection=Fn.MessageDirection.clientToServer,t.type=new Fn.ProtocolRequestType(t.method),t.registrationMethod=Ll.method})(y0||(tr.SemanticTokensRangeRequest=y0={}));var x0;(function(t){t.method="workspace/semanticTokens/refresh",t.messageDirection=Fn.MessageDirection.serverToClient,t.type=new Fn.ProtocolRequestType0(t.method)})(x0||(tr.SemanticTokensRefreshRequest=x0={}))});var R0=ue(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});fp.ShowDocumentRequest=void 0;var E0=lt(),_0;(function(t){t.method="window/showDocument",t.messageDirection=E0.MessageDirection.serverToClient,t.type=new E0.ProtocolRequestType(t.method)})(_0||(fp.ShowDocumentRequest=_0={}))});var A0=ue(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});dp.LinkedEditingRangeRequest=void 0;var b0=lt(),w0;(function(t){t.method="textDocument/linkedEditingRange",t.messageDirection=b0.MessageDirection.clientToServer,t.type=new b0.ProtocolRequestType(t.method)})(w0||(dp.LinkedEditingRangeRequest=w0={}))});var O0=ue(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.WillDeleteFilesRequest=Xt.DidDeleteFilesNotification=Xt.DidRenameFilesNotification=Xt.WillRenameFilesRequest=Xt.DidCreateFilesNotification=Xt.WillCreateFilesRequest=Xt.FileOperationPatternKind=void 0;var Rr=lt(),S0;(function(t){t.file="file",t.folder="folder"})(S0||(Xt.FileOperationPatternKind=S0={}));var I0;(function(t){t.method="workspace/willCreateFiles",t.messageDirection=Rr.MessageDirection.clientToServer,t.type=new Rr.ProtocolRequestType(t.method)})(I0||(Xt.WillCreateFilesRequest=I0={}));var v0;(function(t){t.method="workspace/didCreateFiles",t.messageDirection=Rr.MessageDirection.clientToServer,t.type=new Rr.ProtocolNotificationType(t.method)})(v0||(Xt.DidCreateFilesNotification=v0={}));var k0;(function(t){t.method="workspace/willRenameFiles",t.messageDirection=Rr.MessageDirection.clientToServer,t.type=new Rr.ProtocolRequestType(t.method)})(k0||(Xt.WillRenameFilesRequest=k0={}));var N0;(function(t){t.method="workspace/didRenameFiles",t.messageDirection=Rr.MessageDirection.clientToServer,t.type=new Rr.ProtocolNotificationType(t.method)})(N0||(Xt.DidRenameFilesNotification=N0={}));var C0;(function(t){t.method="workspace/didDeleteFiles",t.messageDirection=Rr.MessageDirection.clientToServer,t.type=new Rr.ProtocolNotificationType(t.method)})(C0||(Xt.DidDeleteFilesNotification=C0={}));var P0;(function(t){t.method="workspace/willDeleteFiles",t.messageDirection=Rr.MessageDirection.clientToServer,t.type=new Rr.ProtocolRequestType(t.method)})(P0||(Xt.WillDeleteFilesRequest=P0={}))});var F0=ue(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.MonikerRequest=wi.MonikerKind=wi.UniquenessLevel=void 0;var L0=lt(),$0;(function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"})($0||(wi.UniquenessLevel=$0={}));var D0;(function(t){t.$import="import",t.$export="export",t.local="local"})(D0||(wi.MonikerKind=D0={}));var M0;(function(t){t.method="textDocument/moniker",t.messageDirection=L0.MessageDirection.clientToServer,t.type=new L0.ProtocolRequestType(t.method)})(M0||(wi.MonikerRequest=M0={}))});var G0=ue(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.TypeHierarchySubtypesRequest=Ai.TypeHierarchySupertypesRequest=Ai.TypeHierarchyPrepareRequest=void 0;var ha=lt(),U0;(function(t){t.method="textDocument/prepareTypeHierarchy",t.messageDirection=ha.MessageDirection.clientToServer,t.type=new ha.ProtocolRequestType(t.method)})(U0||(Ai.TypeHierarchyPrepareRequest=U0={}));var B0;(function(t){t.method="typeHierarchy/supertypes",t.messageDirection=ha.MessageDirection.clientToServer,t.type=new ha.ProtocolRequestType(t.method)})(B0||(Ai.TypeHierarchySupertypesRequest=B0={}));var X0;(function(t){t.method="typeHierarchy/subtypes",t.messageDirection=ha.MessageDirection.clientToServer,t.type=new ha.ProtocolRequestType(t.method)})(X0||(Ai.TypeHierarchySubtypesRequest=X0={}))});var q0=ue(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.InlineValueRefreshRequest=ma.InlineValueRequest=void 0;var pp=lt(),H0;(function(t){t.method="textDocument/inlineValue",t.messageDirection=pp.MessageDirection.clientToServer,t.type=new pp.ProtocolRequestType(t.method)})(H0||(ma.InlineValueRequest=H0={}));var j0;(function(t){t.method="workspace/inlineValue/refresh",t.messageDirection=pp.MessageDirection.serverToClient,t.type=new pp.ProtocolRequestType0(t.method)})(j0||(ma.InlineValueRefreshRequest=j0={}))});var K0=ue(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.InlayHintRefreshRequest=Si.InlayHintResolveRequest=Si.InlayHintRequest=void 0;var ga=lt(),W0;(function(t){t.method="textDocument/inlayHint",t.messageDirection=ga.MessageDirection.clientToServer,t.type=new ga.ProtocolRequestType(t.method)})(W0||(Si.InlayHintRequest=W0={}));var z0;(function(t){t.method="inlayHint/resolve",t.messageDirection=ga.MessageDirection.clientToServer,t.type=new ga.ProtocolRequestType(t.method)})(z0||(Si.InlayHintResolveRequest=z0={}));var V0;(function(t){t.method="workspace/inlayHint/refresh",t.messageDirection=ga.MessageDirection.serverToClient,t.type=new ga.ProtocolRequestType0(t.method)})(V0||(Si.InlayHintRefreshRequest=V0={}))});var rS=ue(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.DiagnosticRefreshRequest=br.WorkspaceDiagnosticRequest=br.DocumentDiagnosticRequest=br.DocumentDiagnosticReportKind=br.DiagnosticServerCancellationData=void 0;var tS=ko(),aF=tp(),ya=lt(),Y0;(function(t){function e(r){let n=r;return n&&aF.boolean(n.retriggerRequest)}t.is=e})(Y0||(br.DiagnosticServerCancellationData=Y0={}));var Z0;(function(t){t.Full="full",t.Unchanged="unchanged"})(Z0||(br.DocumentDiagnosticReportKind=Z0={}));var J0;(function(t){t.method="textDocument/diagnostic",t.messageDirection=ya.MessageDirection.clientToServer,t.type=new ya.ProtocolRequestType(t.method),t.partialResult=new tS.ProgressType})(J0||(br.DocumentDiagnosticRequest=J0={}));var Q0;(function(t){t.method="workspace/diagnostic",t.messageDirection=ya.MessageDirection.clientToServer,t.type=new ya.ProtocolRequestType(t.method),t.partialResult=new tS.ProgressType})(Q0||(br.WorkspaceDiagnosticRequest=Q0={}));var eS;(function(t){t.method="workspace/diagnostic/refresh",t.messageDirection=ya.MessageDirection.serverToClient,t.type=new ya.ProtocolRequestType0(t.method)})(eS||(br.DiagnosticRefreshRequest=eS={}))});var lS=ue(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.DidCloseNotebookDocumentNotification=yt.DidSaveNotebookDocumentNotification=yt.DidChangeNotebookDocumentNotification=yt.NotebookCellArrayChange=yt.DidOpenNotebookDocumentNotification=yt.NotebookDocumentSyncRegistrationType=yt.NotebookDocument=yt.NotebookCell=yt.ExecutionSummary=yt.NotebookCellKind=void 0;var $l=(zs(),Fu(Id)),Br=tp(),fn=lt(),Yx;(function(t){t.Markup=1,t.Code=2;function e(r){return r===1||r===2}t.is=e})(Yx||(yt.NotebookCellKind=Yx={}));var Zx;(function(t){function e(i,o){let s={executionOrder:i};return(o===!0||o===!1)&&(s.success=o),s}t.create=e;function r(i){let o=i;return Br.objectLiteral(o)&&$l.uinteger.is(o.executionOrder)&&(o.success===void 0||Br.boolean(o.success))}t.is=r;function n(i,o){return i===o?!0:i==null||o===null||o===void 0?!1:i.executionOrder===o.executionOrder&&i.success===o.success}t.equals=n})(Zx||(yt.ExecutionSummary=Zx={}));var hp;(function(t){function e(o,s){return{kind:o,document:s}}t.create=e;function r(o){let s=o;return Br.objectLiteral(s)&&Yx.is(s.kind)&&$l.DocumentUri.is(s.document)&&(s.metadata===void 0||Br.objectLiteral(s.metadata))}t.is=r;function n(o,s){let a=new Set;return o.document!==s.document&&a.add("document"),o.kind!==s.kind&&a.add("kind"),o.executionSummary!==s.executionSummary&&a.add("executionSummary"),(o.metadata!==void 0||s.metadata!==void 0)&&!i(o.metadata,s.metadata)&&a.add("metadata"),(o.executionSummary!==void 0||s.executionSummary!==void 0)&&!Zx.equals(o.executionSummary,s.executionSummary)&&a.add("executionSummary"),a}t.diff=n;function i(o,s){if(o===s)return!0;if(o==null||s===null||s===void 0||typeof o!=typeof s||typeof o!="object")return!1;let a=Array.isArray(o),c=Array.isArray(s);if(a!==c)return!1;if(a&&c){if(o.length!==s.length)return!1;for(let l=0;l<o.length;l++)if(!i(o[l],s[l]))return!1}if(Br.objectLiteral(o)&&Br.objectLiteral(s)){let l=Object.keys(o),u=Object.keys(s);if(l.length!==u.length||(l.sort(),u.sort(),!i(l,u)))return!1;for(let f=0;f<l.length;f++){let d=l[f];if(!i(o[d],s[d]))return!1}}return!0}})(hp||(yt.NotebookCell=hp={}));var nS;(function(t){function e(n,i,o,s){return{uri:n,notebookType:i,version:o,cells:s}}t.create=e;function r(n){let i=n;return Br.objectLiteral(i)&&Br.string(i.uri)&&$l.integer.is(i.version)&&Br.typedArray(i.cells,hp.is)}t.is=r})(nS||(yt.NotebookDocument=nS={}));var xa;(function(t){t.method="notebookDocument/sync",t.messageDirection=fn.MessageDirection.clientToServer,t.type=new fn.RegistrationType(t.method)})(xa||(yt.NotebookDocumentSyncRegistrationType=xa={}));var iS;(function(t){t.method="notebookDocument/didOpen",t.messageDirection=fn.MessageDirection.clientToServer,t.type=new fn.ProtocolNotificationType(t.method),t.registrationMethod=xa.method})(iS||(yt.DidOpenNotebookDocumentNotification=iS={}));var oS;(function(t){function e(n){let i=n;return Br.objectLiteral(i)&&$l.uinteger.is(i.start)&&$l.uinteger.is(i.deleteCount)&&(i.cells===void 0||Br.typedArray(i.cells,hp.is))}t.is=e;function r(n,i,o){let s={start:n,deleteCount:i};return o!==void 0&&(s.cells=o),s}t.create=r})(oS||(yt.NotebookCellArrayChange=oS={}));var sS;(function(t){t.method="notebookDocument/didChange",t.messageDirection=fn.MessageDirection.clientToServer,t.type=new fn.ProtocolNotificationType(t.method),t.registrationMethod=xa.method})(sS||(yt.DidChangeNotebookDocumentNotification=sS={}));var aS;(function(t){t.method="notebookDocument/didSave",t.messageDirection=fn.MessageDirection.clientToServer,t.type=new fn.ProtocolNotificationType(t.method),t.registrationMethod=xa.method})(aS||(yt.DidSaveNotebookDocumentNotification=aS={}));var cS;(function(t){t.method="notebookDocument/didClose",t.messageDirection=fn.MessageDirection.clientToServer,t.type=new fn.ProtocolNotificationType(t.method),t.registrationMethod=xa.method})(cS||(yt.DidCloseNotebookDocumentNotification=cS={}))});var dS=ue(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});mp.InlineCompletionRequest=void 0;var uS=lt(),fS;(function(t){t.method="textDocument/inlineCompletion",t.messageDirection=uS.MessageDirection.clientToServer,t.type=new uS.ProtocolRequestType(t.method)})(fS||(mp.InlineCompletionRequest=fS={}))});var AI=ue(m=>{"use strict";Object.defineProperty(m,"__esModule",{value:!0});m.WorkspaceSymbolRequest=m.CodeActionResolveRequest=m.CodeActionRequest=m.DocumentSymbolRequest=m.DocumentHighlightRequest=m.ReferencesRequest=m.DefinitionRequest=m.SignatureHelpRequest=m.SignatureHelpTriggerKind=m.HoverRequest=m.CompletionResolveRequest=m.CompletionRequest=m.CompletionTriggerKind=m.PublishDiagnosticsNotification=m.WatchKind=m.RelativePattern=m.FileChangeType=m.DidChangeWatchedFilesNotification=m.WillSaveTextDocumentWaitUntilRequest=m.WillSaveTextDocumentNotification=m.TextDocumentSaveReason=m.DidSaveTextDocumentNotification=m.DidCloseTextDocumentNotification=m.DidChangeTextDocumentNotification=m.TextDocumentContentChangeEvent=m.DidOpenTextDocumentNotification=m.TextDocumentSyncKind=m.TelemetryEventNotification=m.LogMessageNotification=m.ShowMessageRequest=m.ShowMessageNotification=m.MessageType=m.DidChangeConfigurationNotification=m.ExitNotification=m.ShutdownRequest=m.InitializedNotification=m.InitializeErrorCodes=m.InitializeRequest=m.WorkDoneProgressOptions=m.TextDocumentRegistrationOptions=m.StaticRegistrationOptions=m.PositionEncodingKind=m.FailureHandlingKind=m.ResourceOperationKind=m.UnregistrationRequest=m.RegistrationRequest=m.DocumentSelector=m.NotebookCellTextDocumentFilter=m.NotebookDocumentFilter=m.TextDocumentFilter=void 0;m.MonikerRequest=m.MonikerKind=m.UniquenessLevel=m.WillDeleteFilesRequest=m.DidDeleteFilesNotification=m.WillRenameFilesRequest=m.DidRenameFilesNotification=m.WillCreateFilesRequest=m.DidCreateFilesNotification=m.FileOperationPatternKind=m.LinkedEditingRangeRequest=m.ShowDocumentRequest=m.SemanticTokensRegistrationType=m.SemanticTokensRefreshRequest=m.SemanticTokensRangeRequest=m.SemanticTokensDeltaRequest=m.SemanticTokensRequest=m.TokenFormat=m.CallHierarchyPrepareRequest=m.CallHierarchyOutgoingCallsRequest=m.CallHierarchyIncomingCallsRequest=m.WorkDoneProgressCancelNotification=m.WorkDoneProgressCreateRequest=m.WorkDoneProgress=m.SelectionRangeRequest=m.DeclarationRequest=m.FoldingRangeRefreshRequest=m.FoldingRangeRequest=m.ColorPresentationRequest=m.DocumentColorRequest=m.ConfigurationRequest=m.DidChangeWorkspaceFoldersNotification=m.WorkspaceFoldersRequest=m.TypeDefinitionRequest=m.ImplementationRequest=m.ApplyWorkspaceEditRequest=m.ExecuteCommandRequest=m.PrepareRenameRequest=m.RenameRequest=m.PrepareSupportDefaultBehavior=m.DocumentOnTypeFormattingRequest=m.DocumentRangesFormattingRequest=m.DocumentRangeFormattingRequest=m.DocumentFormattingRequest=m.DocumentLinkResolveRequest=m.DocumentLinkRequest=m.CodeLensRefreshRequest=m.CodeLensResolveRequest=m.CodeLensRequest=m.WorkspaceSymbolResolveRequest=void 0;m.InlineCompletionRequest=m.DidCloseNotebookDocumentNotification=m.DidSaveNotebookDocumentNotification=m.DidChangeNotebookDocumentNotification=m.NotebookCellArrayChange=m.DidOpenNotebookDocumentNotification=m.NotebookDocumentSyncRegistrationType=m.NotebookDocument=m.NotebookCell=m.ExecutionSummary=m.NotebookCellKind=m.DiagnosticRefreshRequest=m.WorkspaceDiagnosticRequest=m.DocumentDiagnosticRequest=m.DocumentDiagnosticReportKind=m.DiagnosticServerCancellationData=m.InlayHintRefreshRequest=m.InlayHintResolveRequest=m.InlayHintRequest=m.InlineValueRefreshRequest=m.InlineValueRequest=m.TypeHierarchySupertypesRequest=m.TypeHierarchySubtypesRequest=m.TypeHierarchyPrepareRequest=void 0;var F=lt(),pS=(zs(),Fu(Id)),vt=tp(),cF=FA();Object.defineProperty(m,"ImplementationRequest",{enumerable:!0,get:function(){return cF.ImplementationRequest}});var lF=XA();Object.defineProperty(m,"TypeDefinitionRequest",{enumerable:!0,get:function(){return lF.TypeDefinitionRequest}});var _I=jA();Object.defineProperty(m,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return _I.WorkspaceFoldersRequest}});Object.defineProperty(m,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return _I.DidChangeWorkspaceFoldersNotification}});var uF=zA();Object.defineProperty(m,"ConfigurationRequest",{enumerable:!0,get:function(){return uF.ConfigurationRequest}});var RI=YA();Object.defineProperty(m,"DocumentColorRequest",{enumerable:!0,get:function(){return RI.DocumentColorRequest}});Object.defineProperty(m,"ColorPresentationRequest",{enumerable:!0,get:function(){return RI.ColorPresentationRequest}});var bI=QA();Object.defineProperty(m,"FoldingRangeRequest",{enumerable:!0,get:function(){return bI.FoldingRangeRequest}});Object.defineProperty(m,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return bI.FoldingRangeRefreshRequest}});var fF=r0();Object.defineProperty(m,"DeclarationRequest",{enumerable:!0,get:function(){return fF.DeclarationRequest}});var dF=o0();Object.defineProperty(m,"SelectionRangeRequest",{enumerable:!0,get:function(){return dF.SelectionRangeRequest}});var rT=l0();Object.defineProperty(m,"WorkDoneProgress",{enumerable:!0,get:function(){return rT.WorkDoneProgress}});Object.defineProperty(m,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return rT.WorkDoneProgressCreateRequest}});Object.defineProperty(m,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return rT.WorkDoneProgressCancelNotification}});var nT=p0();Object.defineProperty(m,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return nT.CallHierarchyIncomingCallsRequest}});Object.defineProperty(m,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return nT.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(m,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return nT.CallHierarchyPrepareRequest}});var Ta=T0();Object.defineProperty(m,"TokenFormat",{enumerable:!0,get:function(){return Ta.TokenFormat}});Object.defineProperty(m,"SemanticTokensRequest",{enumerable:!0,get:function(){return Ta.SemanticTokensRequest}});Object.defineProperty(m,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return Ta.SemanticTokensDeltaRequest}});Object.defineProperty(m,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return Ta.SemanticTokensRangeRequest}});Object.defineProperty(m,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return Ta.SemanticTokensRefreshRequest}});Object.defineProperty(m,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return Ta.SemanticTokensRegistrationType}});var pF=R0();Object.defineProperty(m,"ShowDocumentRequest",{enumerable:!0,get:function(){return pF.ShowDocumentRequest}});var hF=A0();Object.defineProperty(m,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return hF.LinkedEditingRangeRequest}});var No=O0();Object.defineProperty(m,"FileOperationPatternKind",{enumerable:!0,get:function(){return No.FileOperationPatternKind}});Object.defineProperty(m,"DidCreateFilesNotification",{enumerable:!0,get:function(){return No.DidCreateFilesNotification}});Object.defineProperty(m,"WillCreateFilesRequest",{enumerable:!0,get:function(){return No.WillCreateFilesRequest}});Object.defineProperty(m,"DidRenameFilesNotification",{enumerable:!0,get:function(){return No.DidRenameFilesNotification}});Object.defineProperty(m,"WillRenameFilesRequest",{enumerable:!0,get:function(){return No.WillRenameFilesRequest}});Object.defineProperty(m,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return No.DidDeleteFilesNotification}});Object.defineProperty(m,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return No.WillDeleteFilesRequest}});var iT=F0();Object.defineProperty(m,"UniquenessLevel",{enumerable:!0,get:function(){return iT.UniquenessLevel}});Object.defineProperty(m,"MonikerKind",{enumerable:!0,get:function(){return iT.MonikerKind}});Object.defineProperty(m,"MonikerRequest",{enumerable:!0,get:function(){return iT.MonikerRequest}});var oT=G0();Object.defineProperty(m,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return oT.TypeHierarchyPrepareRequest}});Object.defineProperty(m,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return oT.TypeHierarchySubtypesRequest}});Object.defineProperty(m,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return oT.TypeHierarchySupertypesRequest}});var wI=q0();Object.defineProperty(m,"InlineValueRequest",{enumerable:!0,get:function(){return wI.InlineValueRequest}});Object.defineProperty(m,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return wI.InlineValueRefreshRequest}});var sT=K0();Object.defineProperty(m,"InlayHintRequest",{enumerable:!0,get:function(){return sT.InlayHintRequest}});Object.defineProperty(m,"InlayHintResolveRequest",{enumerable:!0,get:function(){return sT.InlayHintResolveRequest}});Object.defineProperty(m,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return sT.InlayHintRefreshRequest}});var Dl=rS();Object.defineProperty(m,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return Dl.DiagnosticServerCancellationData}});Object.defineProperty(m,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return Dl.DocumentDiagnosticReportKind}});Object.defineProperty(m,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return Dl.DocumentDiagnosticRequest}});Object.defineProperty(m,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return Dl.WorkspaceDiagnosticRequest}});Object.defineProperty(m,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return Dl.DiagnosticRefreshRequest}});var dn=lS();Object.defineProperty(m,"NotebookCellKind",{enumerable:!0,get:function(){return dn.NotebookCellKind}});Object.defineProperty(m,"ExecutionSummary",{enumerable:!0,get:function(){return dn.ExecutionSummary}});Object.defineProperty(m,"NotebookCell",{enumerable:!0,get:function(){return dn.NotebookCell}});Object.defineProperty(m,"NotebookDocument",{enumerable:!0,get:function(){return dn.NotebookDocument}});Object.defineProperty(m,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return dn.NotebookDocumentSyncRegistrationType}});Object.defineProperty(m,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return dn.DidOpenNotebookDocumentNotification}});Object.defineProperty(m,"NotebookCellArrayChange",{enumerable:!0,get:function(){return dn.NotebookCellArrayChange}});Object.defineProperty(m,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return dn.DidChangeNotebookDocumentNotification}});Object.defineProperty(m,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return dn.DidSaveNotebookDocumentNotification}});Object.defineProperty(m,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return dn.DidCloseNotebookDocumentNotification}});var mF=dS();Object.defineProperty(m,"InlineCompletionRequest",{enumerable:!0,get:function(){return mF.InlineCompletionRequest}});var Jx;(function(t){function e(r){let n=r;return vt.string(n)||vt.string(n.language)||vt.string(n.scheme)||vt.string(n.pattern)}t.is=e})(Jx||(m.TextDocumentFilter=Jx={}));var Qx;(function(t){function e(r){let n=r;return vt.objectLiteral(n)&&(vt.string(n.notebookType)||vt.string(n.scheme)||vt.string(n.pattern))}t.is=e})(Qx||(m.NotebookDocumentFilter=Qx={}));var eT;(function(t){function e(r){let n=r;return vt.objectLiteral(n)&&(vt.string(n.notebook)||Qx.is(n.notebook))&&(n.language===void 0||vt.string(n.language))}t.is=e})(eT||(m.NotebookCellTextDocumentFilter=eT={}));var tT;(function(t){function e(r){if(!Array.isArray(r))return!1;for(let n of r)if(!vt.string(n)&&!Jx.is(n)&&!eT.is(n))return!1;return!0}t.is=e})(tT||(m.DocumentSelector=tT={}));var hS;(function(t){t.method="client/registerCapability",t.messageDirection=F.MessageDirection.serverToClient,t.type=new F.ProtocolRequestType(t.method)})(hS||(m.RegistrationRequest=hS={}));var mS;(function(t){t.method="client/unregisterCapability",t.messageDirection=F.MessageDirection.serverToClient,t.type=new F.ProtocolRequestType(t.method)})(mS||(m.UnregistrationRequest=mS={}));var gS;(function(t){t.Create="create",t.Rename="rename",t.Delete="delete"})(gS||(m.ResourceOperationKind=gS={}));var yS;(function(t){t.Abort="abort",t.Transactional="transactional",t.TextOnlyTransactional="textOnlyTransactional",t.Undo="undo"})(yS||(m.FailureHandlingKind=yS={}));var xS;(function(t){t.UTF8="utf-8",t.UTF16="utf-16",t.UTF32="utf-32"})(xS||(m.PositionEncodingKind=xS={}));var TS;(function(t){function e(r){let n=r;return n&&vt.string(n.id)&&n.id.length>0}t.hasId=e})(TS||(m.StaticRegistrationOptions=TS={}));var ES;(function(t){function e(r){let n=r;return n&&(n.documentSelector===null||tT.is(n.documentSelector))}t.is=e})(ES||(m.TextDocumentRegistrationOptions=ES={}));var _S;(function(t){function e(n){let i=n;return vt.objectLiteral(i)&&(i.workDoneProgress===void 0||vt.boolean(i.workDoneProgress))}t.is=e;function r(n){let i=n;return i&&vt.boolean(i.workDoneProgress)}t.hasWorkDoneProgress=r})(_S||(m.WorkDoneProgressOptions=_S={}));var RS;(function(t){t.method="initialize",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(RS||(m.InitializeRequest=RS={}));var bS;(function(t){t.unknownProtocolVersion=1})(bS||(m.InitializeErrorCodes=bS={}));var wS;(function(t){t.method="initialized",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolNotificationType(t.method)})(wS||(m.InitializedNotification=wS={}));var AS;(function(t){t.method="shutdown",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType0(t.method)})(AS||(m.ShutdownRequest=AS={}));var SS;(function(t){t.method="exit",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolNotificationType0(t.method)})(SS||(m.ExitNotification=SS={}));var IS;(function(t){t.method="workspace/didChangeConfiguration",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolNotificationType(t.method)})(IS||(m.DidChangeConfigurationNotification=IS={}));var vS;(function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4,t.Debug=5})(vS||(m.MessageType=vS={}));var kS;(function(t){t.method="window/showMessage",t.messageDirection=F.MessageDirection.serverToClient,t.type=new F.ProtocolNotificationType(t.method)})(kS||(m.ShowMessageNotification=kS={}));var NS;(function(t){t.method="window/showMessageRequest",t.messageDirection=F.MessageDirection.serverToClient,t.type=new F.ProtocolRequestType(t.method)})(NS||(m.ShowMessageRequest=NS={}));var CS;(function(t){t.method="window/logMessage",t.messageDirection=F.MessageDirection.serverToClient,t.type=new F.ProtocolNotificationType(t.method)})(CS||(m.LogMessageNotification=CS={}));var PS;(function(t){t.method="telemetry/event",t.messageDirection=F.MessageDirection.serverToClient,t.type=new F.ProtocolNotificationType(t.method)})(PS||(m.TelemetryEventNotification=PS={}));var OS;(function(t){t.None=0,t.Full=1,t.Incremental=2})(OS||(m.TextDocumentSyncKind=OS={}));var LS;(function(t){t.method="textDocument/didOpen",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolNotificationType(t.method)})(LS||(m.DidOpenTextDocumentNotification=LS={}));var $S;(function(t){function e(n){let i=n;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}t.isIncremental=e;function r(n){let i=n;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}t.isFull=r})($S||(m.TextDocumentContentChangeEvent=$S={}));var DS;(function(t){t.method="textDocument/didChange",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolNotificationType(t.method)})(DS||(m.DidChangeTextDocumentNotification=DS={}));var MS;(function(t){t.method="textDocument/didClose",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolNotificationType(t.method)})(MS||(m.DidCloseTextDocumentNotification=MS={}));var FS;(function(t){t.method="textDocument/didSave",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolNotificationType(t.method)})(FS||(m.DidSaveTextDocumentNotification=FS={}));var US;(function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3})(US||(m.TextDocumentSaveReason=US={}));var BS;(function(t){t.method="textDocument/willSave",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolNotificationType(t.method)})(BS||(m.WillSaveTextDocumentNotification=BS={}));var XS;(function(t){t.method="textDocument/willSaveWaitUntil",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(XS||(m.WillSaveTextDocumentWaitUntilRequest=XS={}));var GS;(function(t){t.method="workspace/didChangeWatchedFiles",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolNotificationType(t.method)})(GS||(m.DidChangeWatchedFilesNotification=GS={}));var HS;(function(t){t.Created=1,t.Changed=2,t.Deleted=3})(HS||(m.FileChangeType=HS={}));var jS;(function(t){function e(r){let n=r;return vt.objectLiteral(n)&&(pS.URI.is(n.baseUri)||pS.WorkspaceFolder.is(n.baseUri))&&vt.string(n.pattern)}t.is=e})(jS||(m.RelativePattern=jS={}));var qS;(function(t){t.Create=1,t.Change=2,t.Delete=4})(qS||(m.WatchKind=qS={}));var WS;(function(t){t.method="textDocument/publishDiagnostics",t.messageDirection=F.MessageDirection.serverToClient,t.type=new F.ProtocolNotificationType(t.method)})(WS||(m.PublishDiagnosticsNotification=WS={}));var zS;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3})(zS||(m.CompletionTriggerKind=zS={}));var VS;(function(t){t.method="textDocument/completion",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(VS||(m.CompletionRequest=VS={}));var KS;(function(t){t.method="completionItem/resolve",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(KS||(m.CompletionResolveRequest=KS={}));var YS;(function(t){t.method="textDocument/hover",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(YS||(m.HoverRequest=YS={}));var ZS;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3})(ZS||(m.SignatureHelpTriggerKind=ZS={}));var JS;(function(t){t.method="textDocument/signatureHelp",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(JS||(m.SignatureHelpRequest=JS={}));var QS;(function(t){t.method="textDocument/definition",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(QS||(m.DefinitionRequest=QS={}));var eI;(function(t){t.method="textDocument/references",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(eI||(m.ReferencesRequest=eI={}));var tI;(function(t){t.method="textDocument/documentHighlight",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(tI||(m.DocumentHighlightRequest=tI={}));var rI;(function(t){t.method="textDocument/documentSymbol",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(rI||(m.DocumentSymbolRequest=rI={}));var nI;(function(t){t.method="textDocument/codeAction",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(nI||(m.CodeActionRequest=nI={}));var iI;(function(t){t.method="codeAction/resolve",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(iI||(m.CodeActionResolveRequest=iI={}));var oI;(function(t){t.method="workspace/symbol",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(oI||(m.WorkspaceSymbolRequest=oI={}));var sI;(function(t){t.method="workspaceSymbol/resolve",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(sI||(m.WorkspaceSymbolResolveRequest=sI={}));var aI;(function(t){t.method="textDocument/codeLens",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(aI||(m.CodeLensRequest=aI={}));var cI;(function(t){t.method="codeLens/resolve",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(cI||(m.CodeLensResolveRequest=cI={}));var lI;(function(t){t.method="workspace/codeLens/refresh",t.messageDirection=F.MessageDirection.serverToClient,t.type=new F.ProtocolRequestType0(t.method)})(lI||(m.CodeLensRefreshRequest=lI={}));var uI;(function(t){t.method="textDocument/documentLink",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(uI||(m.DocumentLinkRequest=uI={}));var fI;(function(t){t.method="documentLink/resolve",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(fI||(m.DocumentLinkResolveRequest=fI={}));var dI;(function(t){t.method="textDocument/formatting",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(dI||(m.DocumentFormattingRequest=dI={}));var pI;(function(t){t.method="textDocument/rangeFormatting",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(pI||(m.DocumentRangeFormattingRequest=pI={}));var hI;(function(t){t.method="textDocument/rangesFormatting",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(hI||(m.DocumentRangesFormattingRequest=hI={}));var mI;(function(t){t.method="textDocument/onTypeFormatting",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(mI||(m.DocumentOnTypeFormattingRequest=mI={}));var gI;(function(t){t.Identifier=1})(gI||(m.PrepareSupportDefaultBehavior=gI={}));var yI;(function(t){t.method="textDocument/rename",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(yI||(m.RenameRequest=yI={}));var xI;(function(t){t.method="textDocument/prepareRename",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(xI||(m.PrepareRenameRequest=xI={}));var TI;(function(t){t.method="workspace/executeCommand",t.messageDirection=F.MessageDirection.clientToServer,t.type=new F.ProtocolRequestType(t.method)})(TI||(m.ExecuteCommandRequest=TI={}));var EI;(function(t){t.method="workspace/applyEdit",t.messageDirection=F.MessageDirection.serverToClient,t.type=new F.ProtocolRequestType("workspace/applyEdit")})(EI||(m.ApplyWorkspaceEditRequest=EI={}))});var II=ue(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});gp.createProtocolConnection=void 0;var SI=ko();function gF(t,e,r,n){return SI.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,SI.createMessageConnection)(t,e,r,n)}gp.createProtocolConnection=gF});var kI=ue(rr=>{"use strict";var yF=rr&&rr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),yp=rr&&rr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&yF(e,t,r)};Object.defineProperty(rr,"__esModule",{value:!0});rr.LSPErrorCodes=rr.createProtocolConnection=void 0;yp(ko(),rr);yp((zs(),Fu(Id)),rr);yp(lt(),rr);yp(AI(),rr);var xF=II();Object.defineProperty(rr,"createProtocolConnection",{enumerable:!0,get:function(){return xF.createProtocolConnection}});var vI;(function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800})(vI||(rr.LSPErrorCodes=vI={}))});var CI=ue(pn=>{"use strict";var TF=pn&&pn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),NI=pn&&pn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&TF(e,t,r)};Object.defineProperty(pn,"__esModule",{value:!0});pn.createProtocolConnection=void 0;var EF=jx();NI(jx(),pn);NI(kI(),pn);function _F(t,e,r,n){return(0,EF.createMessageConnection)(t,e,r,n)}pn.createProtocolConnection=_F});var ov={};Zr(ov,{nodeReadFile:()=>HF});async function HF(){throw new Error("nowline: filesystem readers are unavailable in the browser embed")}var sv=e_(()=>{});var GG={};Zr(GG,{EmbedRenderError:()=>ic,__resetForTests:()=>XG,init:()=>JE,initialize:()=>MG,parse:()=>UG,render:()=>FG,run:()=>BG});var ct={};Zr(ct,{AbstractAstReflection:()=>Xi,AbstractCstNode:()=>ol,AbstractLangiumParser:()=>sl,AbstractParserErrorMessageProvider:()=>kd,AbstractThreadedAsyncParser:()=>hT,AstUtils:()=>Xu,BiMap:()=>Ao,Cancellation:()=>re,CompositeCstNodeImpl:()=>To,ContextCache:()=>So,CstNodeBuilder:()=>il,CstUtils:()=>cf,DEFAULT_TOKENIZE_OPTIONS:()=>xp,DONE_RESULT:()=>Dt,DatatypeSymbol:()=>vd,DefaultAstNodeDescriptionProvider:()=>wl,DefaultAstNodeLocator:()=>Sl,DefaultAsyncParser:()=>ql,DefaultCommentProvider:()=>jl,DefaultConfigurationProvider:()=>Il,DefaultDocumentBuilder:()=>Ml,DefaultDocumentValidator:()=>bl,DefaultHydrator:()=>zl,DefaultIndexManager:()=>Fl,DefaultJsonSerializer:()=>El,DefaultLangiumDocumentFactory:()=>fl,DefaultLangiumDocuments:()=>dl,DefaultLangiumProfiler:()=>xT,DefaultLexer:()=>Co,DefaultLexerErrorMessageProvider:()=>Bl,DefaultLinker:()=>pl,DefaultNameProvider:()=>hl,DefaultReferenceDescriptionProvider:()=>Al,DefaultReferences:()=>ml,DefaultScopeComputation:()=>gl,DefaultScopeProvider:()=>Tl,DefaultServiceRegistry:()=>_l,DefaultTokenBuilder:()=>_o,DefaultValueConverter:()=>Ro,DefaultWorkspaceLock:()=>Wl,DefaultWorkspaceManager:()=>Ul,Deferred:()=>Kt,Disposable:()=>Ii,DisposableCache:()=>na,DocumentCache:()=>Fd,DocumentState:()=>pe,DocumentValidator:()=>_r,EMPTY_SCOPE:()=>$1,EMPTY_STREAM:()=>Wn,EmptyFileSystem:()=>Jl,EmptyFileSystemProvider:()=>Rp,ErrorWithLocation:()=>ro,GrammarAST:()=>Tc,GrammarUtils:()=>ds,IndentationAwareLexer:()=>Zl,IndentationAwareTokenBuilder:()=>_a,JSDocDocumentationProvider:()=>Hl,LangiumCompletionParser:()=>cl,LangiumParser:()=>al,LangiumParserErrorMessageProvider:()=>Ks,LeafCstNodeImpl:()=>xo,LexingMode:()=>Oo,MapScope:()=>By,Module:()=>gT,MultiMap:()=>Ut,MultiMapScope:()=>yl,OperationCancelled:()=>Er,ParserWorker:()=>mT,ProfilingTask:()=>wp,Reduction:()=>Zo,RefResolving:()=>wo,RegExpUtils:()=>ff,RootCstNodeImpl:()=>Vs,SimpleCache:()=>xl,StreamImpl:()=>ar,StreamScope:()=>ra,TextDocument:()=>Qs,TreeStreamImpl:()=>Jr,URI:()=>ht,UriTrie:()=>ta,UriUtils:()=>xt,VALIDATE_EACH_NODE:()=>sA,ValidationCategory:()=>Ud,ValidationRegistry:()=>Rl,ValueConverter:()=>cn,WorkspaceCache:()=>ia,assertCondition:()=>a_,assertUnreachable:()=>tn,createCompletionParser:()=>Ny,createDefaultCoreModule:()=>Vl,createDefaultSharedCoreModule:()=>Kl,createGrammarConfig:()=>Dm,createLangiumParser:()=>Cy,createParser:()=>ll,delayNextTick:()=>Fy,diagnosticData:()=>Io,eagerLoad:()=>XI,getDiagnosticRange:()=>aA,indentationBuilderDefaultOptions:()=>yT,inject:()=>Po,interruptAndCheck:()=>pt,isAstNode:()=>dt,isAstNodeDescription:()=>Wh,isAstNodeWithComment:()=>Xy,isCompositeCstNode:()=>Nr,isIMultiModeLexerDefinition:()=>cT,isJSDoc:()=>dT,isLeafCstNode:()=>qn,isLinkingError:()=>Gi,isMultiReference:()=>sr,isNamed:()=>iA,isOperationCancelled:()=>ln,isReference:()=>Rt,isRootCstNode:()=>ac,isTokenTypeArray:()=>Tp,isTokenTypeDictionary:()=>aT,loadGrammarFromJson:()=>bp,parseJSDoc:()=>fT,prepareLangiumParser:()=>Vw,setInterruptionPeriod:()=>Qw,startCancelableOperation:()=>Dd,stream:()=>me,toDiagnosticData:()=>cA,toDiagnosticSeverity:()=>Bd});var cf={};Zr(cf,{DefaultNameRegexp:()=>af,RangeComparison:()=>en,compareRange:()=>n_,findCommentNode:()=>ym,findDeclarationNodeAtOffset:()=>IC,findLeafNodeAtOffset:()=>xm,findLeafNodeBeforeOffset:()=>i_,flattenCst:()=>SC,getDatatypeNode:()=>AC,getInteriorNodes:()=>NC,getNextNode:()=>vC,getPreviousNode:()=>s_,getStartlineNode:()=>kC,inRange:()=>Yh,isChildNode:()=>gm,isCommentNode:()=>mm,streamCst:()=>eo,toDocumentSegment:()=>to,tokenToRange:()=>cs});function dt(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function Rt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function sr(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function Wh(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function Gi(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}var Xi=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);let n=r.properties[e.property]?.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){let r=this.types[e];return r||{name:e,properties:{},superTypes:[]}}isInstance(e,r){return dt(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});let i=n[r];if(i!==void 0)return i;{let o=this.types[e],s=o?o.superTypes.some(a=>this.isSubtype(a,r)):!1;return n[r]=s,s}}getAllSubTypes(e){let r=this.allSubtypes[e];if(r)return r;{let n=this.getAllTypes(),i=[];for(let o of n)this.isSubtype(o,e)&&i.push(o);return this.allSubtypes[e]=i,i}}};function Nr(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function qn(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function ac(t){return Nr(t)&&typeof t.fullText=="string"}var ar=class t{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){let 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(){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){let e=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){let n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){return new t(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return Dt})}join(e=","){let r=this.iterator(),n="",i,o=!1;do i=r.next(),i.done||(o&&(n+=e),n+=sC(i.value)),o=!0;while(!i.done);return n}indexOf(e,r=0){let n=this.iterator(),i=0,o=n.next();for(;!o.done;){if(i>=r&&o.value===e)return i;o=n.next(),i++}return-1}every(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new t(this.startFn,r=>{let{done:n,value:i}=this.nextFn(r);return n?Dt:{done:!1,value:e(i)}})}filter(e){return new t(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return Dt})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){let n=this.iterator(),i=r,o=n.next();for(;!o.done;)i===void 0?i=o.value:i=e(i,o.value),o=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){let i=e.next();if(i.done)return n;let o=this.recursiveReduce(e,r,n);return o===void 0?i.value:r(o,i.value)}find(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new t(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let o=r.iterator.next();if(o.done)r.iterator=void 0;else return o}let{done:n,value:i}=this.nextFn(r.this);if(!n){let o=e(i);if(Uu(o))r.iterator=o[Symbol.iterator]();else return{done:!1,value:o}}}while(r.iterator);return Dt})}flat(e){if(e===void 0&&(e=1),e<=0)return this;let r=e>1?this.flat(e-1):this;return new t(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}let{done:i,value:o}=r.nextFn(n.this);if(!i)if(Uu(o))n.iterator=o[Symbol.iterator]();else return{done:!1,value:o}}while(n.iterator);return Dt})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new t(()=>{let r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new t(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?Dt:this.nextFn(r.state)))}distinct(e){return new t(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){let i=e?e(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return Dt})}exclude(e,r){let n=new Set;for(let i of e){let o=r?r(i):i;n.add(o)}return this.filter(i=>{let o=r?r(i):i;return!n.has(o)})}};function sC(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Uu(t){return!!t&&typeof t[Symbol.iterator]=="function"}var Wn=new ar(()=>{},()=>Dt),Dt=Object.freeze({done:!0,value:void 0});function me(...t){if(t.length===1){let e=t[0];if(e instanceof ar)return e;if(Uu(e))return new ar(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new ar(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:Dt)}return t.length>1?new ar(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){let r=e.iterator.next();if(!r.done)return r;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){let r=t[e.collIndex++];Uu(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return Dt}):Wn}var Jr=class extends ar{constructor(e,r,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){let s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return Dt})}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}},Zo;(function(t){function e(o){return o.reduce((s,a)=>s+a,0)}t.sum=e;function r(o){return o.reduce((s,a)=>s*a,0)}t.product=r;function n(o){return o.reduce((s,a)=>Math.min(s,a))}t.min=n;function i(o){return o.reduce((s,a)=>Math.max(s,a))}t.max=i})(Zo||(Zo={}));var Xu={};Zr(Xu,{assignMandatoryProperties:()=>Kh,copyAstNode:()=>Vh,findRootNode:()=>Qo,getContainerOfType:()=>_n,getDocument:()=>Mt,getReferenceNodes:()=>Bu,hasContainerOfType:()=>aC,linkContentToContainer:()=>Jo,streamAllContents:()=>Cr,streamAst:()=>Ht,streamContents:()=>cc,streamReferences:()=>zn});function Jo(t,e={}){for(let[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((i,o)=>{dt(i)&&(i.$container=t,i.$containerProperty=r,i.$containerIndex=o,e.deep&&Jo(i,e))}):dt(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&Jo(n,e)))}function _n(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function aC(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function Mt(t){let r=Qo(t).$document;if(!r)throw new Error("AST node has no document.");return r}function Qo(t){for(;t.$container;)t=t.$container;return t}function Bu(t){return Rt(t)?t.ref?[t.ref]:[]:sr(t)?t.items.map(e=>e.ref):[]}function cc(t,e){if(!t)throw new Error("Node must be an AstNode.");let r=e?.range;return new ar(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){let i=n.keys[n.keyIndex];if(!i.startsWith("$")){let o=t[i];if(dt(o)){if(n.keyIndex++,zh(o,r))return{done:!1,value:o}}else if(Array.isArray(o)){for(;n.arrayIndex<o.length;){let s=n.arrayIndex++,a=o[s];if(dt(a)&&zh(a,r))return{done:!1,value:a}}n.arrayIndex=0}}n.keyIndex++}return Dt})}function Cr(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Jr(t,r=>cc(r,e))}function Ht(t,e){if(t){if(e?.range&&!zh(t,e.range))return new Jr(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new Jr(t,r=>cc(r,e),{includeRoot:!0})}function zh(t,e){if(!e)return!0;let r=t.$cstNode?.range;return r?Yh(r,e):!1}function zn(t){return new ar(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){let r=e.keys[e.keyIndex];if(!r.startsWith("$")){let n=t[r];if(Rt(n)||sr(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){let i=e.arrayIndex++,o=n[i];if(Rt(o)||sr(n))return{done:!1,value:{reference:o,container:t,property:r,index:i}}}e.arrayIndex=0}}e.keyIndex++}return Dt})}function Kh(t,e){let r=t.getTypeMetaData(e.$type),n=e;for(let i of Object.values(r.properties))i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=t_(i.defaultValue))}function t_(t){return Array.isArray(t)?[...t.map(t_)]:t}function Vh(t,e,r){let n={$type:t.$type};r&&(r.set(t,n),r.set(n,t));for(let[i,o]of Object.entries(t))if(!i.startsWith("$"))if(dt(o))n[i]=Vh(o,e,r);else if(Rt(o))n[i]=e(n,i,o.$refNode,o.$refText,o);else if(Array.isArray(o)){let s=[];for(let a of o)dt(a)?s.push(Vh(a,e,r)):Rt(a)?s.push(e(n,i,a.$refNode,a.$refText,a)):s.push(a);n[i]=s}else n[i]=o;return Jo(n,{deep:!0}),n}var Tc={};Zr(Tc,{AbstractElement:()=>Yt,AbstractParserRule:()=>lc,AbstractRule:()=>es,AbstractType:()=>cr,Action:()=>Vn,Alternatives:()=>uc,ArrayLiteral:()=>Gu,ArrayType:()=>Hu,Assignment:()=>Kn,BooleanLiteral:()=>ju,CharacterRange:()=>Yn,Condition:()=>Zn,Conjunction:()=>fc,CrossReference:()=>Jn,Disjunction:()=>dc,EndOfFile:()=>qu,Grammar:()=>Rn,GrammarImport:()=>Wu,Group:()=>Hi,InferredType:()=>zu,InfixRule:()=>Qr,InfixRuleOperatorList:()=>pc,InfixRuleOperators:()=>Vu,Interface:()=>ts,Keyword:()=>rs,LangiumGrammarAstReflection:()=>as,LangiumGrammarTerminals:()=>cC,NamedArgument:()=>ns,NegatedToken:()=>ji,Negation:()=>Ku,NumberLiteral:()=>Yu,Parameter:()=>is,ParameterReference:()=>Zu,ParserRule:()=>Pr,ReferenceType:()=>hc,RegexToken:()=>qi,ReturnType:()=>Ju,RuleCall:()=>Wi,SimpleType:()=>os,StringLiteral:()=>Qu,TerminalAlternatives:()=>zi,TerminalElement:()=>Zt,TerminalGroup:()=>Vi,TerminalRule:()=>bn,TerminalRuleCall:()=>Ki,Type:()=>mc,TypeAttribute:()=>Yi,TypeDefinition:()=>Zi,UnionType:()=>ef,UnorderedGroup:()=>gc,UntilToken:()=>Ji,ValueLiteral:()=>Qi,Wildcard:()=>ss,isAbstractElement:()=>yc,isAbstractParserRule:()=>wn,isAbstractRule:()=>lC,isAbstractType:()=>uC,isAction:()=>An,isAlternatives:()=>tf,isArrayLiteral:()=>fC,isArrayType:()=>Zh,isAssignment:()=>Or,isBooleanLiteral:()=>Jh,isCharacterRange:()=>Qh,isCondition:()=>dC,isConjunction:()=>em,isCrossReference:()=>Lr,isDisjunction:()=>tm,isEndOfFile:()=>rm,isGrammar:()=>pC,isGrammarImport:()=>hC,isGroup:()=>Qn,isInferredType:()=>xc,isInfixRule:()=>ei,isInfixRuleOperatorList:()=>mC,isInfixRuleOperators:()=>gC,isInterface:()=>nm,isKeyword:()=>xr,isNamedArgument:()=>yC,isNegatedToken:()=>im,isNegation:()=>om,isNumberLiteral:()=>xC,isParameter:()=>TC,isParameterReference:()=>sm,isParserRule:()=>At,isReferenceType:()=>am,isRegexToken:()=>cm,isReturnType:()=>lm,isRuleCall:()=>$r,isSimpleType:()=>rf,isStringLiteral:()=>EC,isTerminalAlternatives:()=>um,isTerminalElement:()=>_C,isTerminalGroup:()=>fm,isTerminalRule:()=>jt,isTerminalRuleCall:()=>nf,isType:()=>of,isTypeAttribute:()=>RC,isTypeDefinition:()=>bC,isUnionType:()=>dm,isUnorderedGroup:()=>sf,isUntilToken:()=>pm,isValueLiteral:()=>wC,isWildcard:()=>hm,reflection:()=>te});var cC={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},Yt={$type:"AbstractElement",cardinality:"cardinality"};function yc(t){return te.isInstance(t,Yt.$type)}var lc={$type:"AbstractParserRule"};function wn(t){return te.isInstance(t,lc.$type)}var es={$type:"AbstractRule"};function lC(t){return te.isInstance(t,es.$type)}var cr={$type:"AbstractType"};function uC(t){return te.isInstance(t,cr.$type)}var Vn={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function An(t){return te.isInstance(t,Vn.$type)}var uc={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function tf(t){return te.isInstance(t,uc.$type)}var Gu={$type:"ArrayLiteral",elements:"elements"};function fC(t){return te.isInstance(t,Gu.$type)}var Hu={$type:"ArrayType",elementType:"elementType"};function Zh(t){return te.isInstance(t,Hu.$type)}var Kn={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Or(t){return te.isInstance(t,Kn.$type)}var ju={$type:"BooleanLiteral",true:"true"};function Jh(t){return te.isInstance(t,ju.$type)}var Yn={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Qh(t){return te.isInstance(t,Yn.$type)}var Zn={$type:"Condition"};function dC(t){return te.isInstance(t,Zn.$type)}var fc={$type:"Conjunction",left:"left",right:"right"};function em(t){return te.isInstance(t,fc.$type)}var Jn={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Lr(t){return te.isInstance(t,Jn.$type)}var dc={$type:"Disjunction",left:"left",right:"right"};function tm(t){return te.isInstance(t,dc.$type)}var qu={$type:"EndOfFile",cardinality:"cardinality"};function rm(t){return te.isInstance(t,qu.$type)}var Rn={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function pC(t){return te.isInstance(t,Rn.$type)}var Wu={$type:"GrammarImport",path:"path"};function hC(t){return te.isInstance(t,Wu.$type)}var Hi={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Qn(t){return te.isInstance(t,Hi.$type)}var zu={$type:"InferredType",name:"name"};function xc(t){return te.isInstance(t,zu.$type)}var Qr={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function ei(t){return te.isInstance(t,Qr.$type)}var pc={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function mC(t){return te.isInstance(t,pc.$type)}var Vu={$type:"InfixRuleOperators",precedences:"precedences"};function gC(t){return te.isInstance(t,Vu.$type)}var ts={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function nm(t){return te.isInstance(t,ts.$type)}var rs={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function xr(t){return te.isInstance(t,rs.$type)}var ns={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function yC(t){return te.isInstance(t,ns.$type)}var ji={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function im(t){return te.isInstance(t,ji.$type)}var Ku={$type:"Negation",value:"value"};function om(t){return te.isInstance(t,Ku.$type)}var Yu={$type:"NumberLiteral",value:"value"};function xC(t){return te.isInstance(t,Yu.$type)}var is={$type:"Parameter",name:"name"};function TC(t){return te.isInstance(t,is.$type)}var Zu={$type:"ParameterReference",parameter:"parameter"};function sm(t){return te.isInstance(t,Zu.$type)}var Pr={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function At(t){return te.isInstance(t,Pr.$type)}var hc={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function am(t){return te.isInstance(t,hc.$type)}var qi={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function cm(t){return te.isInstance(t,qi.$type)}var Ju={$type:"ReturnType",name:"name"};function lm(t){return te.isInstance(t,Ju.$type)}var Wi={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function $r(t){return te.isInstance(t,Wi.$type)}var os={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function rf(t){return te.isInstance(t,os.$type)}var Qu={$type:"StringLiteral",value:"value"};function EC(t){return te.isInstance(t,Qu.$type)}var zi={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function um(t){return te.isInstance(t,zi.$type)}var Zt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function _C(t){return te.isInstance(t,Zt.$type)}var Vi={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function fm(t){return te.isInstance(t,Vi.$type)}var bn={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function jt(t){return te.isInstance(t,bn.$type)}var Ki={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function nf(t){return te.isInstance(t,Ki.$type)}var mc={$type:"Type",name:"name",type:"type"};function of(t){return te.isInstance(t,mc.$type)}var Yi={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function RC(t){return te.isInstance(t,Yi.$type)}var Zi={$type:"TypeDefinition"};function bC(t){return te.isInstance(t,Zi.$type)}var ef={$type:"UnionType",types:"types"};function dm(t){return te.isInstance(t,ef.$type)}var gc={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function sf(t){return te.isInstance(t,gc.$type)}var Ji={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function pm(t){return te.isInstance(t,Ji.$type)}var Qi={$type:"ValueLiteral"};function wC(t){return te.isInstance(t,Qi.$type)}var ss={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function hm(t){return te.isInstance(t,ss.$type)}var as=class extends Xi{constructor(){super(...arguments),this.types={AbstractElement:{name:Yt.$type,properties:{cardinality:{name:Yt.cardinality}},superTypes:[]},AbstractParserRule:{name:lc.$type,properties:{},superTypes:[es.$type,cr.$type]},AbstractRule:{name:es.$type,properties:{},superTypes:[]},AbstractType:{name:cr.$type,properties:{},superTypes:[]},Action:{name:Vn.$type,properties:{cardinality:{name:Vn.cardinality},feature:{name:Vn.feature},inferredType:{name:Vn.inferredType},operator:{name:Vn.operator},type:{name:Vn.type,referenceType:cr.$type}},superTypes:[Yt.$type]},Alternatives:{name:uc.$type,properties:{cardinality:{name:uc.cardinality},elements:{name:uc.elements,defaultValue:[]}},superTypes:[Yt.$type]},ArrayLiteral:{name:Gu.$type,properties:{elements:{name:Gu.elements,defaultValue:[]}},superTypes:[Qi.$type]},ArrayType:{name:Hu.$type,properties:{elementType:{name:Hu.elementType}},superTypes:[Zi.$type]},Assignment:{name:Kn.$type,properties:{cardinality:{name:Kn.cardinality},feature:{name:Kn.feature},operator:{name:Kn.operator},predicate:{name:Kn.predicate},terminal:{name:Kn.terminal}},superTypes:[Yt.$type]},BooleanLiteral:{name:ju.$type,properties:{true:{name:ju.true,defaultValue:!1}},superTypes:[Zn.$type,Qi.$type]},CharacterRange:{name:Yn.$type,properties:{cardinality:{name:Yn.cardinality},left:{name:Yn.left},lookahead:{name:Yn.lookahead},parenthesized:{name:Yn.parenthesized,defaultValue:!1},right:{name:Yn.right}},superTypes:[Zt.$type]},Condition:{name:Zn.$type,properties:{},superTypes:[]},Conjunction:{name:fc.$type,properties:{left:{name:fc.left},right:{name:fc.right}},superTypes:[Zn.$type]},CrossReference:{name:Jn.$type,properties:{cardinality:{name:Jn.cardinality},deprecatedSyntax:{name:Jn.deprecatedSyntax,defaultValue:!1},isMulti:{name:Jn.isMulti,defaultValue:!1},terminal:{name:Jn.terminal},type:{name:Jn.type,referenceType:cr.$type}},superTypes:[Yt.$type]},Disjunction:{name:dc.$type,properties:{left:{name:dc.left},right:{name:dc.right}},superTypes:[Zn.$type]},EndOfFile:{name:qu.$type,properties:{cardinality:{name:qu.cardinality}},superTypes:[Yt.$type]},Grammar:{name:Rn.$type,properties:{imports:{name:Rn.imports,defaultValue:[]},interfaces:{name:Rn.interfaces,defaultValue:[]},isDeclared:{name:Rn.isDeclared,defaultValue:!1},name:{name:Rn.name},rules:{name:Rn.rules,defaultValue:[]},types:{name:Rn.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Wu.$type,properties:{path:{name:Wu.path}},superTypes:[]},Group:{name:Hi.$type,properties:{cardinality:{name:Hi.cardinality},elements:{name:Hi.elements,defaultValue:[]},guardCondition:{name:Hi.guardCondition},predicate:{name:Hi.predicate}},superTypes:[Yt.$type]},InferredType:{name:zu.$type,properties:{name:{name:zu.name}},superTypes:[cr.$type]},InfixRule:{name:Qr.$type,properties:{call:{name:Qr.call},dataType:{name:Qr.dataType},inferredType:{name:Qr.inferredType},name:{name:Qr.name},operators:{name:Qr.operators},parameters:{name:Qr.parameters,defaultValue:[]},returnType:{name:Qr.returnType,referenceType:cr.$type}},superTypes:[lc.$type]},InfixRuleOperatorList:{name:pc.$type,properties:{associativity:{name:pc.associativity},operators:{name:pc.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Vu.$type,properties:{precedences:{name:Vu.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:ts.$type,properties:{attributes:{name:ts.attributes,defaultValue:[]},name:{name:ts.name},superTypes:{name:ts.superTypes,defaultValue:[],referenceType:cr.$type}},superTypes:[cr.$type]},Keyword:{name:rs.$type,properties:{cardinality:{name:rs.cardinality},predicate:{name:rs.predicate},value:{name:rs.value}},superTypes:[Yt.$type]},NamedArgument:{name:ns.$type,properties:{calledByName:{name:ns.calledByName,defaultValue:!1},parameter:{name:ns.parameter,referenceType:is.$type},value:{name:ns.value}},superTypes:[]},NegatedToken:{name:ji.$type,properties:{cardinality:{name:ji.cardinality},lookahead:{name:ji.lookahead},parenthesized:{name:ji.parenthesized,defaultValue:!1},terminal:{name:ji.terminal}},superTypes:[Zt.$type]},Negation:{name:Ku.$type,properties:{value:{name:Ku.value}},superTypes:[Zn.$type]},NumberLiteral:{name:Yu.$type,properties:{value:{name:Yu.value}},superTypes:[Qi.$type]},Parameter:{name:is.$type,properties:{name:{name:is.name}},superTypes:[]},ParameterReference:{name:Zu.$type,properties:{parameter:{name:Zu.parameter,referenceType:is.$type}},superTypes:[Zn.$type]},ParserRule:{name:Pr.$type,properties:{dataType:{name:Pr.dataType},definition:{name:Pr.definition},entry:{name:Pr.entry,defaultValue:!1},fragment:{name:Pr.fragment,defaultValue:!1},inferredType:{name:Pr.inferredType},name:{name:Pr.name},parameters:{name:Pr.parameters,defaultValue:[]},returnType:{name:Pr.returnType,referenceType:cr.$type}},superTypes:[lc.$type]},ReferenceType:{name:hc.$type,properties:{isMulti:{name:hc.isMulti,defaultValue:!1},referenceType:{name:hc.referenceType}},superTypes:[Zi.$type]},RegexToken:{name:qi.$type,properties:{cardinality:{name:qi.cardinality},lookahead:{name:qi.lookahead},parenthesized:{name:qi.parenthesized,defaultValue:!1},regex:{name:qi.regex}},superTypes:[Zt.$type]},ReturnType:{name:Ju.$type,properties:{name:{name:Ju.name}},superTypes:[]},RuleCall:{name:Wi.$type,properties:{arguments:{name:Wi.arguments,defaultValue:[]},cardinality:{name:Wi.cardinality},predicate:{name:Wi.predicate},rule:{name:Wi.rule,referenceType:es.$type}},superTypes:[Yt.$type]},SimpleType:{name:os.$type,properties:{primitiveType:{name:os.primitiveType},stringType:{name:os.stringType},typeRef:{name:os.typeRef,referenceType:cr.$type}},superTypes:[Zi.$type]},StringLiteral:{name:Qu.$type,properties:{value:{name:Qu.value}},superTypes:[Qi.$type]},TerminalAlternatives:{name:zi.$type,properties:{cardinality:{name:zi.cardinality},elements:{name:zi.elements,defaultValue:[]},lookahead:{name:zi.lookahead},parenthesized:{name:zi.parenthesized,defaultValue:!1}},superTypes:[Zt.$type]},TerminalElement:{name:Zt.$type,properties:{cardinality:{name:Zt.cardinality},lookahead:{name:Zt.lookahead},parenthesized:{name:Zt.parenthesized,defaultValue:!1}},superTypes:[Yt.$type]},TerminalGroup:{name:Vi.$type,properties:{cardinality:{name:Vi.cardinality},elements:{name:Vi.elements,defaultValue:[]},lookahead:{name:Vi.lookahead},parenthesized:{name:Vi.parenthesized,defaultValue:!1}},superTypes:[Zt.$type]},TerminalRule:{name:bn.$type,properties:{definition:{name:bn.definition},fragment:{name:bn.fragment,defaultValue:!1},hidden:{name:bn.hidden,defaultValue:!1},name:{name:bn.name},type:{name:bn.type}},superTypes:[es.$type]},TerminalRuleCall:{name:Ki.$type,properties:{cardinality:{name:Ki.cardinality},lookahead:{name:Ki.lookahead},parenthesized:{name:Ki.parenthesized,defaultValue:!1},rule:{name:Ki.rule,referenceType:bn.$type}},superTypes:[Zt.$type]},Type:{name:mc.$type,properties:{name:{name:mc.name},type:{name:mc.type}},superTypes:[cr.$type]},TypeAttribute:{name:Yi.$type,properties:{defaultValue:{name:Yi.defaultValue},isOptional:{name:Yi.isOptional,defaultValue:!1},name:{name:Yi.name},type:{name:Yi.type}},superTypes:[]},TypeDefinition:{name:Zi.$type,properties:{},superTypes:[]},UnionType:{name:ef.$type,properties:{types:{name:ef.types,defaultValue:[]}},superTypes:[Zi.$type]},UnorderedGroup:{name:gc.$type,properties:{cardinality:{name:gc.cardinality},elements:{name:gc.elements,defaultValue:[]}},superTypes:[Yt.$type]},UntilToken:{name:Ji.$type,properties:{cardinality:{name:Ji.cardinality},lookahead:{name:Ji.lookahead},parenthesized:{name:Ji.parenthesized,defaultValue:!1},terminal:{name:Ji.terminal}},superTypes:[Zt.$type]},ValueLiteral:{name:Qi.$type,properties:{},superTypes:[]},Wildcard:{name:ss.$type,properties:{cardinality:{name:ss.cardinality},lookahead:{name:ss.lookahead},parenthesized:{name:ss.parenthesized,defaultValue:!1}},superTypes:[Zt.$type]}}}},te=new as;function AC(t){let e=t,r=!1;for(;e;){let n=_n(e.grammarSource,At);if(n&&n.dataType)e=e.container,r=!0;else return r?e:void 0}}function eo(t){return new Jr(t,e=>Nr(e)?e.content:[],{includeRoot:!0})}function SC(t){return eo(t).filter(qn)}function gm(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function cs(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function to(t){if(!t)return;let{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}var en;(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"})(en||(en={}));function n_(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return en.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return en.After;let r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?en.Inside:r?en.OverlapBack:n?en.OverlapFront:en.Outside}function Yh(t,e){return n_(t,e)>en.After}var af=/^[\w\p{L}]$/u;function IC(t,e,r=af){if(t){if(e>0){let n=e-t.offset,i=t.text.charAt(n);r.test(i)||e--}return xm(t,e)}}function ym(t,e){if(t){let r=s_(t,!0);if(r&&mm(r,e))return r;if(ac(t)){let n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){let o=t.content[i];if(mm(o,e))return o}}}}function mm(t,e){return qn(t)&&e.includes(t.tokenType.name)}function xm(t,e){if(qn(t))return t;if(Nr(t)){let r=o_(t,e,!1);if(r)return xm(r,e)}}function i_(t,e){if(qn(t))return t;if(Nr(t)){let r=o_(t,e,!0);if(r)return i_(r,e)}}function o_(t,e,r){let n=0,i=t.content.length-1,o;for(;n<=i;){let s=Math.floor((n+i)/2),a=t.content[s];if(a.offset<=e&&a.end>e)return a;a.end<=e?(o=r?a:void 0,n=s+1):i=s-1}return o}function s_(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t);for(;n>0;){n--;let i=r.content[n];if(e||!i.hidden)return i}t=r}}function vC(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t),i=r.content.length-1;for(;n<i;){n++;let o=r.content[n];if(e||!o.hidden)return o}t=r}}function kC(t){if(t.range.start.character===0)return t;let e=t.range.start.line,r=t,n;for(;t.container;){let i=t.container,o=n??i.content.indexOf(t);if(o===0?(t=i,n=void 0):(n=o-1,t=i.content[n]),t.range.start.line!==e)break;r=t}return r}function NC(t,e){let r=CC(t,e);return r?r.parent.content.slice(r.a+1,r.b):[]}function CC(t,e){let r=r_(t),n=r_(e),i;for(let o=0;o<r.length&&o<n.length;o++){let s=r[o],a=n[o];if(s.parent===a.parent)i={parent:s.parent,a:s.index,b:a.index};else break}return i}function r_(t){let e=[];for(;t.container;){let r=t.container,n=r.content.indexOf(t);e.push({parent:r,index:n}),t=r}return e.reverse()}var ds={};Zr(ds,{findAssignment:()=>Om,findNameAssignment:()=>df,findNodeForKeyword:()=>Cm,findNodeForProperty:()=>Ac,findNodesForKeyword:()=>DC,findNodesForKeywordInternal:()=>Pm,findNodesForProperty:()=>km,getActionAtElement:()=>m_,getActionType:()=>y_,getAllReachableRules:()=>wc,getAllRulesUsedForCrossReferences:()=>$C,getCrossReferenceTerminal:()=>Im,getEntryRule:()=>f_,getExplicitRuleType:()=>pf,getHiddenRules:()=>d_,getRuleType:()=>Lm,getRuleTypeName:()=>XC,getTypeName:()=>ri,isArrayCardinality:()=>FC,isArrayOperator:()=>UC,isCommentTerminal:()=>vm,isDataType:()=>BC,isDataTypeRule:()=>Sc,isOptionalCardinality:()=>MC,terminalRegex:()=>us});var ro=class extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}};function tn(t,e="Error: Got unexpected value."){throw new Error(e)}function a_(t,e="Error: Condition is violated."){if(!t)throw new Error(e)}var ff={};Zr(ff,{NEWLINE_REGEXP:()=>Rm,escapeRegExp:()=>ti,getTerminalParts:()=>LC,isMultilineComment:()=>bm,isWhitespace:()=>bc,partialMatches:()=>wm,partialRegExp:()=>u_,whitespaceCharacters:()=>l_});function ie(t){return t.charCodeAt(0)}function lf(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function ls(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0}function no(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Ec(){throw Error("Internal Error - Should never get here!")}function Tm(t){return t.type==="Character"}var _c=[];for(let t=ie("0");t<=ie("9");t++)_c.push(t);var Rc=[ie("_")].concat(_c);for(let t=ie("a");t<=ie("z");t++)Rc.push(t);for(let t=ie("A");t<=ie("Z");t++)Rc.push(t);var Em=[ie(" "),ie("\f"),ie(`
|
|
36
|
+
`),ie("\r"),ie(" "),ie("\v"),ie(" "),ie("\xA0"),ie("\u1680"),ie("\u2000"),ie("\u2001"),ie("\u2002"),ie("\u2003"),ie("\u2004"),ie("\u2005"),ie("\u2006"),ie("\u2007"),ie("\u2008"),ie("\u2009"),ie("\u200A"),ie("\u2028"),ie("\u2029"),ie("\u202F"),ie("\u205F"),ie("\u3000"),ie("\uFEFF")];var PC=/[0-9a-fA-F]/,uf=/[0-9]/,OC=/[1-9]/,io=class{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("/");let r=this.disjunction();this.consumeChar("/");let n={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":ls(n,"global");break;case"i":ls(n,"ignoreCase");break;case"m":ls(n,"multiLine");break;case"u":ls(n,"unicode");break;case"y":ls(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){let e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let 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 r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":r="Lookbehind";break;case"!":r="NegativeLookbehind"}break}}no(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return Ec()}quantifier(e=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let o;this.isDigit()?(o=this.integerIncludingZero(),r={atLeast:i,atMost:o}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;no(r);break}if(!(e===!0&&r===void 0)&&no(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e,r=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}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),no(e)?(e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Ec()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[ie(`
|
|
37
|
+
`),ie("\r"),ie("\u2028"),ie("\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,r=!1;switch(this.popChar()){case"d":e=_c;break;case"D":e=_c,r=!0;break;case"s":e=Em;break;case"S":e=Em,r=!0;break;case"w":e=Rc;break;case"W":e=Rc,r=!0;break}return no(e)?{type:"Set",value:e,complement:r}:Ec()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=ie("\f");break;case"n":e=ie(`
|
|
38
|
+
`);break;case"r":e=ie("\r");break;case"t":e=ie(" ");break;case"v":e=ie("\v");break}return no(e)?{type:"Character",value:e}:Ec()}controlLetterEscapeAtom(){this.consumeChar("c");let 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:ie("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:ie(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
39
|
+
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:ie(e)}}}characterClass(){let e=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(Tm(n)&&this.isRangeDash()){this.consumeChar("-");let o=this.classAtom(),s=o.type==="Character";if(Tm(o)){if(o.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:o.value})}else lf(n.value,e),e.push(ie("-")),lf(o.value,e)}else lf(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:r,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
|
|
40
|
+
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:ie("\b")};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()}}group(){let e=!0;this.consumeChar("("),this.peekChar(0)==="?"?(this.consumeChar("?"),this.consumeChar(":"),e=!1):this.groupIdx++;let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:e,value:r};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(OC.test(e)===!1)throw Error("Expecting a positive integer");for(;uf.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(uf.test(e)===!1)throw Error("Expecting an integer");for(;uf.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case`
|
|
41
|
+
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:ie(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return uf.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
|
|
42
|
+
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!"||this.peekChar(2)==="<"&&(this.peekChar(3)==="="||this.peekChar(3)==="!"));default:return!1}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
|
|
43
|
+
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let i=0;i<e;i++){let o=this.popChar();if(PC.test(o)===!1)throw Error("Expecting a HexDecimal digits");r+=o}return{type:"Character",value:parseInt(r,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}};var rn=class{visitChildren(e){for(let r in e){let n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}};var Rm=/\r?\n/gm,c_=new io,_m=class extends rn{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let r=String.fromCharCode(e.value);if(!this.multiline&&r===`
|
|
44
|
+
`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let n=ti(r);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitSet(e){if(!this.multiline){let r=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(r);this.multiline=!!`
|
|
45
|
+
`.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},oo=new _m;function LC(t){try{typeof t!="string"&&(t=t.source),t=`/${t}/`;let e=c_.pattern(t),r=[];for(let n of e.value.value)oo.reset(t),oo.visit(n),r.push({start:oo.startRegexp,end:oo.endRegex});return r}catch{return[]}}function bm(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),oo.reset(t),oo.visit(c_.pattern(t)),oo.multiline}catch{return!1}}var l_=`\f
|
|
46
|
+
\r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("");function bc(t){let e=typeof t=="string"?new RegExp(t):t;return l_.some(r=>e.test(r))}function ti(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wm(t,e){let r=u_(t),n=e.match(r);return!!n&&n[0].length>0}function u_(t){typeof t=="string"&&(t=new RegExp(t));let e=t,r=t.source,n=0;function i(){let o="",s;function a(l){o+=r.substr(n,l),n+=l}function c(l){o+="(?:"+r.substr(n,l)+"|$)",n+=l}for(;n<r.length;)switch(r[n]){case"\\":switch(r[n+1]){case"c":c(3);break;case"x":c(4);break;case"u":e.unicode?r[n+2]==="{"?c(r.indexOf("}",n)-n+1):c(6):c(2);break;case"p":case"P":e.unicode?c(r.indexOf("}",n)-n+1):c(2);break;case"k":c(r.indexOf(">",n)-n+1);break;default:c(2);break}break;case"[":s=/\[(?:\\.|.)*?\]/g,s.lastIndex=n,s=s.exec(r)||[],c(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":a(1);break;case"{":s=/\{\d+,?\d*\}/g,s.lastIndex=n,s=s.exec(r),s?a(s[0].length):c(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":o+="(?:",n+=3,o+=i()+"|$)";break;case"=":o+="(?=",n+=3,o+=i()+")";break;case"!":s=n,n+=3,i(),o+=r.substr(s,n-s);break;case"<":switch(r[n+3]){case"=":case"!":s=n,n+=4,i(),o+=r.substr(s,n-s);break;default:a(r.indexOf(">",n)-n+1),o+=i()+"|$)";break}break}else a(1),o+=i()+"|$)";break;case")":return++n,o;default:c(1);break}return o}return new RegExp(i(),t.flags)}function f_(t){return t.rules.find(e=>At(e)&&e.entry)}function d_(t){return t.rules.filter(e=>jt(e)&&e.hidden)}function wc(t,e){let r=new Set,n=f_(t);if(!n)return new Set(t.rules);let i=[n].concat(d_(t));for(let s of i)p_(s,r,e);let o=new Set;for(let s of t.rules)(r.has(s.name)||jt(s)&&s.hidden)&&o.add(s);return o}function p_(t,e,r){e.add(t.name),Cr(t).forEach(n=>{if($r(n)||r&&nf(n)){let i=n.rule.ref;i&&!e.has(i.name)&&p_(i,e,r)}})}function $C(t){let e=new Set;return Cr(t).forEach(r=>{Lr(r)&&(At(r.type.ref)&&e.add(r.type.ref),xc(r.type.ref)&&At(r.type.ref.$container)&&e.add(r.type.ref.$container))}),e}function Im(t){if(t.terminal)return t.terminal;if(t.type.ref)return df(t.type.ref)?.terminal}function vm(t){return t.hidden&&!bc(us(t))}function km(t,e){return!t||!e?[]:Nm(t,e,t.astNode,!0)}function Ac(t,e,r){if(!t||!e)return;let n=Nm(t,e,t.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function Nm(t,e,r,n){if(!n){let i=_n(t.grammarSource,Or);if(i&&i.feature===e)return[t]}return Nr(t)&&t.astNode===r?t.content.flatMap(i=>Nm(i,e,r,!1)):[]}function DC(t,e){return t?Pm(t,e,t?.astNode):[]}function Cm(t,e,r){if(!t)return;let n=Pm(t,e,t?.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function Pm(t,e,r){if(t.astNode!==r)return[];if(xr(t.grammarSource)&&t.grammarSource.value===e)return[t];let n=eo(t).iterator(),i,o=[];do if(i=n.next(),!i.done){let s=i.value;s.astNode===r?xr(s.grammarSource)&&s.grammarSource.value===e&&o.push(s):n.prune()}while(!i.done);return o}function Om(t){let e=t.astNode;for(;e===t.container?.astNode;){let r=_n(t.grammarSource,Or);if(r)return r;t=t.container}}function df(t){let e=t;return xc(e)&&(An(e.$container)?e=e.$container.$container:wn(e.$container)?e=e.$container:tn(e.$container)),h_(t,e,new Map)}function h_(t,e,r){function n(i,o){let s;return _n(i,Or)||(s=h_(o,o,r)),r.set(t,s),s}if(r.has(t))return r.get(t);r.set(t,void 0);for(let i of Cr(e)){if(Or(i)&&i.feature.toLowerCase()==="name")return r.set(t,i),i;if($r(i)&&At(i.rule.ref))return n(i,i.rule.ref);if(rf(i)&&i.typeRef?.ref)return n(i,i.typeRef.ref)}}function m_(t){let e=t.$container;if(Qn(e)){let r=e.elements,n=r.indexOf(t);for(let i=n-1;i>=0;i--){let o=r[i];if(An(o))return o;{let s=Cr(r[i]).find(An);if(s)return s}}}if(yc(e))return m_(e)}function MC(t,e){return t==="?"||t==="*"||Qn(e)&&!!e.guardCondition}function FC(t){return t==="*"||t==="+"}function UC(t){return t==="+="}function Sc(t){return g_(t,new Set)}function g_(t,e){if(e.has(t))return!0;e.add(t);for(let r of Cr(t))if($r(r)){if(!r.rule.ref||At(r.rule.ref)&&!g_(r.rule.ref,e)||ei(r.rule.ref))return!1}else{if(Or(r))return!1;if(An(r))return!1}return!!t.definition}function BC(t){return Sm(t.type,new Set)}function Sm(t,e){if(e.has(t))return!0;if(e.add(t),Zh(t))return!1;if(am(t))return!1;if(dm(t))return t.types.every(r=>Sm(r,e));if(rf(t)){if(t.primitiveType!==void 0)return!0;if(t.stringType!==void 0)return!0;if(t.typeRef!==void 0){let r=t.typeRef.ref;return of(r)?Sm(r.type,e):!1}else return!1}else return!1}function pf(t){if(!jt(t)){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){let e=t.returnType.ref;if(e)return e.name}}}function ri(t){if(wn(t))return At(t)&&Sc(t)?t.name:pf(t)??t.name;if(nm(t)||of(t)||lm(t))return t.name;if(An(t)){let e=y_(t);if(e)return e}else if(xc(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function y_(t){if(t.inferredType)return t.inferredType.name;if(t.type?.ref)return ri(t.type.ref)}function XC(t){return jt(t)?t.type?.name??"string":At(t)&&Sc(t)?t.name:pf(t)??t.name}function Lm(t){return jt(t)?t.type?.name??"string":pf(t)??t.name}function us(t){let e={s:!1,i:!1,u:!1},r=fs(t.definition,e),n=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(r,n)}var $m=/[\s\S]/.source;function fs(t,e){if(um(t))return GC(t);if(fm(t))return HC(t);if(Qh(t))return WC(t);if(nf(t)){let r=t.rule.ref;if(!r)throw new Error("Missing rule reference.");return Sn(fs(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}else{if(im(t))return qC(t);if(pm(t))return jC(t);if(cm(t)){let r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),i=t.regex.substring(r+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),Sn(n,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}else{if(hm(t))return Sn($m,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized});throw new Error(`Invalid terminal element: ${t?.$type}, ${t?.$cstNode?.text}`)}}}function GC(t){return Sn(t.elements.map(e=>fs(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function HC(t){return Sn(t.elements.map(e=>fs(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function jC(t){return Sn(`${$m}*?${fs(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}function qC(t){return Sn(`(?!${fs(t.terminal)})${$m}*?`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}function WC(t){return t.right?Sn(`[${Am(t.left)}-${Am(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1}):Sn(Am(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function Am(t){return ti(t.value)}function Sn(t,e){return(e.parenthesized||e.lookahead||e.wrap!==!1)&&(t=`(${e.lookahead??(e.parenthesized?"":"?:")}${t})`),e.cardinality?`${t}${e.cardinality}`:t}function Dm(t){let e=[],r=t.Grammar;for(let n of r.rules)jt(n)&&vm(n)&&bm(us(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:af}}function ps(t){console&&console.error&&console.error(`Error: ${t}`)}function Ic(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function vc(t){let e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}function kc(t){function e(){}e.prototype=t;let r=new e;function n(){return typeof r.bar}return n(),n(),t;(0,eval)(t)}function zC(t){return VC(t)?t.LABEL:t.name}function VC(t){return typeof t.LABEL=="string"&&t.LABEL!==""}var lr=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(r=>{r.accept(e)})}},De=class extends lr{constructor(e){super([]),this.idx=1,Object.assign(this,nn(e))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},qt=class extends lr{constructor(e){super(e.definition),this.orgText="",Object.assign(this,nn(e))}},Ke=class extends lr{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,nn(e))}},Me=class extends lr{constructor(e){super(e.definition),this.idx=1,Object.assign(this,nn(e))}},Ye=class extends lr{constructor(e){super(e.definition),this.idx=1,Object.assign(this,nn(e))}},Ze=class extends lr{constructor(e){super(e.definition),this.idx=1,Object.assign(this,nn(e))}},we=class extends lr{constructor(e){super(e.definition),this.idx=1,Object.assign(this,nn(e))}},We=class extends lr{constructor(e){super(e.definition),this.idx=1,Object.assign(this,nn(e))}},ze=class extends lr{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,nn(e))}},ge=class{constructor(e){this.idx=1,Object.assign(this,nn(e))}accept(e){e.visit(this)}};function hf(t){return t.map(hs)}function hs(t){function e(r){return r.map(hs)}if(t instanceof De){let r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return typeof t.label=="string"&&(r.label=t.label),r}else{if(t instanceof Ke)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Me)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Ye)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Ze)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:hs(new ge({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof We)return{type:"RepetitionWithSeparator",idx:t.idx,separator:hs(new ge({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof we)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof ze)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof ge){let r={type:"Terminal",name:t.terminalType.name,label:zC(t.terminalType),idx:t.idx};typeof t.label=="string"&&(r.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=n instanceof RegExp?n.source:n),r}else{if(t instanceof qt)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}function nn(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}var Wt=class{visit(e){let r=e;switch(r.constructor){case De:return this.visitNonTerminal(r);case Ke:return this.visitAlternative(r);case Me:return this.visitOption(r);case Ye:return this.visitRepetitionMandatory(r);case Ze:return this.visitRepetitionMandatoryWithSeparator(r);case We:return this.visitRepetitionWithSeparator(r);case we:return this.visitRepetition(r);case ze:return this.visitAlternation(r);case ge:return this.visitTerminal(r);case qt:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function Mm(t){return t instanceof Ke||t instanceof Me||t instanceof we||t instanceof Ye||t instanceof Ze||t instanceof We||t instanceof ge||t instanceof qt}function so(t,e=[]){return t instanceof Me||t instanceof we||t instanceof We?!0:t instanceof ze?t.definition.some(n=>so(n,e)):t instanceof De&&e.includes(t)?!1:t instanceof lr?(t instanceof De&&e.push(t),t.definition.every(n=>so(n,e))):!1}function Fm(t){return t instanceof ze}function Jt(t){if(t instanceof De)return"SUBRULE";if(t instanceof Me)return"OPTION";if(t instanceof ze)return"OR";if(t instanceof Ye)return"AT_LEAST_ONE";if(t instanceof Ze)return"AT_LEAST_ONE_SEP";if(t instanceof We)return"MANY_SEP";if(t instanceof we)return"MANY";if(t instanceof ge)return"CONSUME";throw Error("non exhaustive match")}var In=class{walk(e,r=[]){e.definition.forEach((n,i)=>{let o=e.definition.slice(i+1);if(n instanceof De)this.walkProdRef(n,o,r);else if(n instanceof ge)this.walkTerminal(n,o,r);else if(n instanceof Ke)this.walkFlat(n,o,r);else if(n instanceof Me)this.walkOption(n,o,r);else if(n instanceof Ye)this.walkAtLeastOne(n,o,r);else if(n instanceof Ze)this.walkAtLeastOneSep(n,o,r);else if(n instanceof We)this.walkManySep(n,o,r);else if(n instanceof we)this.walkMany(n,o,r);else if(n instanceof ze)this.walkOr(n,o,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){let i=r.concat(n);this.walk(e,i)}walkOption(e,r,n){let i=r.concat(n);this.walk(e,i)}walkAtLeastOne(e,r,n){let i=[new Me({definition:e.definition})].concat(r,n);this.walk(e,i)}walkAtLeastOneSep(e,r,n){let i=x_(e,r,n);this.walk(e,i)}walkMany(e,r,n){let i=[new Me({definition:e.definition})].concat(r,n);this.walk(e,i)}walkManySep(e,r,n){let i=x_(e,r,n);this.walk(e,i)}walkOr(e,r,n){let i=r.concat(n);e.definition.forEach(o=>{let s=new Ke({definition:[o]});this.walk(s,i)})}};function x_(t,e,r){return[new Me({definition:[new ge({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}function ao(t){if(t instanceof De)return ao(t.referencedRule);if(t instanceof ge)return ZC(t);if(Mm(t))return KC(t);if(Fm(t))return YC(t);throw Error("non exhaustive match")}function KC(t){let e=[],r=t.definition,n=0,i=r.length>n,o,s=!0;for(;i&&s;)o=r[n],s=so(o),e=e.concat(ao(o)),n=n+1,i=r.length>n;return[...new Set(e)]}function YC(t){let e=t.definition.map(r=>ao(r));return[...new Set(e.flat())]}function ZC(t){return[t.terminalType]}var mf="_~IN~_";var Um=class extends In{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){let i=JC(e.referencedRule,e.idx)+this.topProd.name,o=r.concat(n),s=new Ke({definition:o}),a=ao(s);this.follows[i]=a}};function T_(t){let e={};return t.forEach(r=>{let n=new Um(r).startWalking();Object.assign(e,n)}),e}function JC(t,e){return t.name+e+mf}var gf={},QC=new io;function ms(t){let e=t.toString();if(gf.hasOwnProperty(e))return gf[e];{let r=QC.pattern(e);return gf[e]=r,r}}function E_(){gf={}}var R_="Complement Sets are not supported for first char optimization",Nc=`Unable to use "first char" lexer optimizations:
|
|
47
|
+
`;function b_(t,e=!1){try{let r=ms(t);return Bm(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===R_)e&&Ic(`${Nc} Unable to optimize: < ${t.toString()} >
|
|
48
|
+
Complement Sets cannot be automatically optimized.
|
|
49
|
+
This will disable the lexer's first char optimizations.
|
|
50
|
+
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";e&&(n=`
|
|
51
|
+
This will disable the lexer's first char optimizations.
|
|
52
|
+
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),ps(`${Nc}
|
|
53
|
+
Failed parsing: < ${t.toString()} >
|
|
54
|
+
Using the @chevrotain/regexp-to-ast library
|
|
55
|
+
Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Bm(t,e,r){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)Bm(t.value[i],e,r);break;case"Alternative":let n=t.value;for(let i=0;i<n.length;i++){let o=n[i];switch(o.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}let s=o;switch(s.type){case"Character":yf(s.value,e,r);break;case"Set":if(s.complement===!0)throw Error(R_);s.value.forEach(c=>{if(typeof c=="number")yf(c,e,r);else{let l=c;if(r===!0)for(let u=l.from;u<=l.to;u++)yf(u,e,r);else{for(let u=l.from;u<=l.to&&u<gs;u++)yf(u,e,r);if(l.to>=gs){let u=l.from>=gs?l.from:gs,f=l.to,d=on(u),p=on(f);for(let g=d;g<=p;g++)e[g]=g}}}});break;case"Group":Bm(s.value,e,r);break;default:throw Error("Non Exhaustive Match")}let a=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&Xm(s)===!1||s.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return Object.values(e)}function yf(t,e,r){let n=on(t);e[n]=n,r===!0&&eP(t,e)}function eP(t,e){let r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){let i=on(n.charCodeAt(0));e[i]=i}else{let i=r.toLowerCase();if(i!==r){let o=on(i.charCodeAt(0));e[o]=o}}}function __(t,e){return t.value.find(r=>{if(typeof r=="number")return e.includes(r);{let n=r;return e.find(i=>n.from<=i&&i<=n.to)!==void 0}})}function Xm(t){let e=t.quantifier;return e&&e.atLeast===0?!0:t.value?Array.isArray(t.value)?t.value.every(Xm):Xm(t.value):!1}var Gm=class extends rn{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return;case"Lookbehind":this.visitLookbehind(e);return;case"NegativeLookbehind":this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){this.targetCharCodes.includes(e.value)&&(this.found=!0)}visitSet(e){e.complement?__(e,this.targetCharCodes)===void 0&&(this.found=!0):__(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function xf(t,e){if(e instanceof RegExp){let r=ms(e),n=new Gm(t);return n.visit(r),n.found}else{for(let r of e){let n=r.charCodeAt(0);if(t.includes(n))return!0}return!1}}var co="PATTERN",ys="defaultMode",Tf="modes";function A_(t,e){e=Object.assign({safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
|
|
56
|
+
`],tracer:(R,E)=>E()},e);let r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{TP()});let n;r("Reject Lexer.NA",()=>{n=t.filter(R=>R[co]!==st.NA)});let i=!1,o;r("Transform Patterns",()=>{i=!1,o=n.map(R=>{let E=R[co];if(E instanceof RegExp){let k=E.source;return k.length===1&&k!=="^"&&k!=="$"&&k!=="."&&!E.ignoreCase?k:k.length===2&&k[0]==="\\"&&!["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"].includes(k[1])?k[1]:w_(E)}else{if(typeof E=="function")return i=!0,{exec:E};if(typeof E=="object")return i=!0,E;if(typeof E=="string"){if(E.length===1)return E;{let k=E.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),D=new RegExp(k);return w_(D)}}else throw Error("non exhaustive match")}})});let s,a,c,l,u;r("misc mapping",()=>{s=n.map(R=>R.tokenTypeIdx),a=n.map(R=>{let E=R.GROUP;if(E!==st.SKIPPED){if(typeof E=="string")return E;if(E===void 0)return!1;throw Error("non exhaustive match")}}),c=n.map(R=>{let E=R.LONGER_ALT;if(E)return Array.isArray(E)?E.map(D=>n.indexOf(D)):[n.indexOf(E)]}),l=n.map(R=>R.PUSH_MODE),u=n.map(R=>Object.hasOwn(R,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let R=O_(e.lineTerminatorCharacters);f=n.map(E=>!1),e.positionTracking!=="onlyOffset"&&(f=n.map(E=>Object.hasOwn(E,"LINE_BREAKS")?!!E.LINE_BREAKS:P_(E,R)===!1&&xf(R,E.PATTERN)))});let d,p,g,y;r("Misc Mapping #2",()=>{d=n.map(N_),p=o.map(yP),g=n.reduce((R,E)=>{let k=E.GROUP;return typeof k=="string"&&k!==st.SKIPPED&&(R[k]=[]),R},{}),y=o.map((R,E)=>({pattern:o[E],longerAlt:c[E],canLineTerminator:f[E],isCustom:d[E],short:p[E],group:a[E],push:l[E],pop:u[E],tokenTypeIdx:s[E],tokenType:n[E]}))});let _=!0,T=[];return e.safeMode||r("First Char Optimization",()=>{T=n.reduce((R,E,k)=>{if(typeof E.PATTERN=="string"){let D=E.PATTERN.charCodeAt(0),P=on(D);Hm(R,P,y[k])}else if(Array.isArray(E.START_CHARS_HINT)){let D;E.START_CHARS_HINT.forEach(P=>{let j=typeof P=="string"?P.charCodeAt(0):P,q=on(j);D!==q&&(D=q,Hm(R,q,y[k]))})}else if(E.PATTERN instanceof RegExp)if(E.PATTERN.unicode)_=!1,e.ensureOptimizations&&ps(`${Nc} Unable to analyze < ${E.PATTERN.toString()} > pattern.
|
|
57
|
+
The regexp unicode flag is not currently supported by the regexp-to-ast library.
|
|
58
|
+
This will disable the lexer's first char optimizations.
|
|
59
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let D=b_(E.PATTERN,e.ensureOptimizations);D.length===0&&(_=!1),D.forEach(P=>{Hm(R,P,y[k])})}else e.ensureOptimizations&&ps(`${Nc} TokenType: <${E.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
|
|
60
|
+
This will disable the lexer's first char optimizations.
|
|
61
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),_=!1;return R},[])}),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:T,hasCustom:i,canBeOptimized:_}}function S_(t,e){let r=[],n=rP(t);r=r.concat(n.errors);let i=nP(n.valid),o=i.valid;return r=r.concat(i.errors),r=r.concat(tP(o)),r=r.concat(fP(o)),r=r.concat(dP(o,e)),r=r.concat(pP(o)),r}function tP(t){let e=[],r=t.filter(n=>n[co]instanceof RegExp);return e=e.concat(oP(r)),e=e.concat(cP(r)),e=e.concat(lP(r)),e=e.concat(uP(r)),e=e.concat(sP(r)),e}function rP(t){let e=t.filter(i=>!Object.hasOwn(i,co)),r=e.map(i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:ot.MISSING_PATTERN,tokenTypes:[i]})),n=t.filter(i=>!e.includes(i));return{errors:r,valid:n}}function nP(t){let e=t.filter(i=>{let o=i[co];return!(o instanceof RegExp)&&typeof o!="function"&&!Object.hasOwn(o,"exec")&&typeof o!="string"}),r=e.map(i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:ot.INVALID_PATTERN,tokenTypes:[i]})),n=t.filter(i=>!e.includes(i));return{errors:r,valid:n}}var iP=/[^\\][$]/;function oP(t){class e extends rn{constructor(){super(...arguments),this.found=!1}visitEndAnchor(o){this.found=!0}}return t.filter(i=>{let o=i.PATTERN;try{let s=ms(o),a=new e;return a.visit(s),a.found}catch{return iP.test(o.source)}}).map(i=>({message:`Unexpected RegExp Anchor Error:
|
|
62
|
+
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
|
|
63
|
+
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ot.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function sP(t){return t.filter(n=>n.PATTERN.test("")).map(n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:ot.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}var aP=/[^\\[][\^]|^\^/;function cP(t){class e extends rn{constructor(){super(...arguments),this.found=!1}visitStartAnchor(o){this.found=!0}}return t.filter(i=>{let o=i.PATTERN;try{let s=ms(o),a=new e;return a.visit(s),a.found}catch{return aP.test(o.source)}}).map(i=>({message:`Unexpected RegExp Anchor Error:
|
|
64
|
+
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
|
|
65
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ot.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function lP(t){return t.filter(n=>{let i=n[co];return i instanceof RegExp&&(i.multiline||i.global)}).map(n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ot.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function uP(t){let e=[],r=t.map(o=>t.reduce((s,a)=>(o.PATTERN.source===a.PATTERN.source&&!e.includes(a)&&a.PATTERN!==st.NA&&(e.push(a),s.push(a)),s),[]));return r=r.filter(Boolean),r.filter(o=>o.length>1).map(o=>{let s=o.map(c=>c.name);return{message:`The same RegExp pattern ->${o[0].PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:ot.DUPLICATE_PATTERNS_FOUND,tokenTypes:o}})}function fP(t){return t.filter(n=>{if(!Object.hasOwn(n,"GROUP"))return!1;let i=n.GROUP;return i!==st.SKIPPED&&i!==st.NA&&typeof i!="string"}).map(n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:ot.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function dP(t,e){return t.filter(i=>i.PUSH_MODE!==void 0&&!e.includes(i.PUSH_MODE)).map(i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:ot.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function pP(t){let e=[],r=t.reduce((n,i,o)=>{let s=i.PATTERN;return s===st.NA||(typeof s=="string"?n.push({str:s,idx:o,tokenType:i}):s instanceof RegExp&&mP(s)&&n.push({str:s.source,idx:o,tokenType:i})),n},[]);return t.forEach((n,i)=>{r.forEach(({str:o,idx:s,tokenType:a})=>{if(i<s&&hP(o,n.PATTERN)){let c=`Token: ->${a.name}<- can never be matched.
|
|
66
|
+
Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
|
|
67
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:ot.UNREACHABLE_PATTERN,tokenTypes:[n,a]})}})}),e}function hP(t,e){if(e instanceof RegExp){if(gP(e))return!1;let r=e.exec(t);return r!==null&&r.index===0}else{if(typeof e=="function")return e(t,0,[],{});if(Object.hasOwn(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function mP(t){return[".","\\","[","]","|","^","$","(",")","?","*","+","{"].find(r=>t.source.indexOf(r)!==-1)===void 0}function gP(t){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(t.source)}function w_(t){let e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function I_(t,e,r){let n=[];return Object.hasOwn(t,ys)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+ys+`> property in its definition
|
|
68
|
+
`,type:ot.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object.hasOwn(t,Tf)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Tf+`> property in its definition
|
|
69
|
+
`,type:ot.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object.hasOwn(t,Tf)&&Object.hasOwn(t,ys)&&!Object.hasOwn(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${ys}: <${t.defaultMode}>which does not exist
|
|
70
|
+
`,type:ot.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object.hasOwn(t,Tf)&&Object.keys(t.modes).forEach(i=>{let o=t.modes[i];o.forEach((s,a)=>{s===void 0?n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${a}>
|
|
71
|
+
`,type:ot.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):Object.hasOwn(s,"LONGER_ALT")&&(Array.isArray(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT]).forEach(l=>{l!==void 0&&!o.includes(l)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${l.name}> on token <${s.name}> outside of mode <${i}>
|
|
72
|
+
`,type:ot.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),n}function v_(t,e,r){let n=[],i=!1,s=Object.values(t.modes||{}).flat().filter(Boolean).filter(c=>c[co]!==st.NA),a=O_(r);return e&&s.forEach(c=>{let l=P_(c,a);if(l!==!1){let f={message:xP(c,l),type:l.issue,tokenType:c};n.push(f)}else Object.hasOwn(c,"LINE_BREAKS")?c.LINE_BREAKS===!0&&(i=!0):xf(a,c.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found.
|
|
73
|
+
This Lexer has been defined to track line and column information,
|
|
74
|
+
But none of the Token Types can be identified as matching a line terminator.
|
|
75
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
|
|
76
|
+
for details.`,type:ot.NO_LINE_BREAKS_FLAGS}),n}function k_(t){let e={};return Object.keys(t).forEach(n=>{let i=t[n];if(Array.isArray(i))e[n]=[];else throw Error("non exhaustive match")}),e}function N_(t){let e=t.PATTERN;if(e instanceof RegExp)return!1;if(typeof e=="function")return!0;if(Object.hasOwn(e,"exec"))return!0;if(typeof e=="string")return!1;throw Error("non exhaustive match")}function yP(t){return typeof t=="string"&&t.length===1?t.charCodeAt(0):!1}var C_={test:function(t){let e=t.length;for(let r=this.lastIndex;r<e;r++){let n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function P_(t,e){if(Object.hasOwn(t,"LINE_BREAKS"))return!1;if(t.PATTERN instanceof RegExp){try{xf(e,t.PATTERN)}catch(r){return{issue:ot.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(typeof t.PATTERN=="string")return!1;if(N_(t))return{issue:ot.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function xP(t,e){if(e.issue===ot.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
|
|
77
|
+
The problem is in the <${t.name}> Token Type
|
|
78
|
+
Root cause: ${e.errMsg}.
|
|
79
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===ot.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
|
|
80
|
+
The problem is in the <${t.name}> Token Type
|
|
81
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function O_(t){return t.map(r=>typeof r=="string"?r.charCodeAt(0):r)}function Hm(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}var gs=256,Ef=[];function on(t){return t<gs?t:Ef[t]}function TP(){if(Ef.length===0){Ef=new Array(65536);for(let t=0;t<65536;t++)Ef[t]=t>255?255+~~(t/255):t}}function vn(t,e){let r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0}function xs(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}var L_=1,D_={};function kn(t){let e=EP(t);_P(e),bP(e),RP(e),e.forEach(r=>{r.isParent=r.categoryMatches.length>0})}function EP(t){let e=[...t],r=t,n=!0;for(;n;){r=r.map(o=>o.CATEGORIES).flat().filter(Boolean);let i=r.filter(o=>!e.includes(o));e=e.concat(i),i.length===0?n=!1:r=i}return e}function _P(t){t.forEach(e=>{jm(e)||(D_[L_]=e,e.tokenTypeIdx=L_++),$_(e)&&!Array.isArray(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),$_(e)||(e.CATEGORIES=[]),wP(e)||(e.categoryMatches=[]),AP(e)||(e.categoryMatchesMap={})})}function RP(t){t.forEach(e=>{e.categoryMatches=[],Object.keys(e.categoryMatchesMap).forEach(r=>{e.categoryMatches.push(D_[r].tokenTypeIdx)})})}function bP(t){t.forEach(e=>{M_([],e)})}function M_(t,e){t.forEach(r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),e.CATEGORIES.forEach(r=>{let n=t.concat(e);n.includes(r)||M_(n,r)})}function jm(t){return Object.hasOwn(t??{},"tokenTypeIdx")}function $_(t){return Object.hasOwn(t??{},"CATEGORIES")}function wP(t){return Object.hasOwn(t??{},"categoryMatches")}function AP(t){return Object.hasOwn(t??{},"categoryMatchesMap")}function F_(t){return Object.hasOwn(t??{},"tokenTypeIdx")}var Ts={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i,o){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}};var ot;(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(ot||(ot={}));var Cc={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
|
82
|
+
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Ts,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Cc);var st=class{constructor(e,r=Cc){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,o)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${s}--> <${i}>`);let{time:a,value:c}=vc(o),l=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&l(`${s}<-- <${i}> time: ${a}ms`),this.traceInitIndent--,c}else return o()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
|
|
83
|
+
a boolean 2nd argument is no longer supported`);this.config=Object.assign({},Cc,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,o=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Cc.lineTerminatorsPattern)this.config.lineTerminatorsPattern=C_;else if(this.config.lineTerminatorCharacters===Cc.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
|
|
84
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Array.isArray(e)?i={modes:{defaultMode:[...e]},defaultMode:ys}:(o=!1,i=Object.assign({},e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(I_(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(v_(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},Object.entries(i.modes).forEach(([a,c])=>{i.modes[a]=c.filter(l=>l!==void 0)});let s=Object.keys(i.modes);if(Object.entries(i.modes).forEach(([a,c])=>{this.TRACE_INIT(`Mode: <${a}> processing`,()=>{if(this.modes.push(a),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(S_(c,s))}),this.lexerDefinitionErrors.length===0){kn(c);let l;this.TRACE_INIT("analyzeTokenTypes",()=>{l=A_(c,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[a]=l.patternIdxToConfig,this.charCodeToPatternIdxToConfig[a]=l.charCodeToPatternIdxToConfig,this.emptyGroups=Object.assign({},this.emptyGroups,l.emptyGroups),this.hasCustom=l.hasCustom||this.hasCustom,this.canModeBeOptimized[a]=l.canBeOptimized}})}),this.defaultMode=i.defaultMode,this.lexerDefinitionErrors.length>0&&!this.config.deferDefinitionErrorsHandling){let c=this.lexerDefinitionErrors.map(l=>l.message).join(`-----------------------
|
|
85
|
+
`);throw new Error(`Errors detected in definition of Lexer:
|
|
86
|
+
`+c)}this.lexerDefinitionWarning.forEach(a=>{Ic(a.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(o&&(this.handleModes=()=>{}),this.trackStartLines===!1&&(this.computeNewColumn=a=>a),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=()=>{}),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let a=Object.entries(this.canModeBeOptimized).reduce((c,[l,u])=>(u===!1&&c.push(l),c),[]);if(r.ensureOptimizations&&a.length>0)throw Error(`Lexer Modes: < ${a.join(", ")} > cannot be optimized.
|
|
87
|
+
Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
|
|
88
|
+
Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{E_()}),this.TRACE_INIT("toFastProperties",()=>{kc(this)})})}tokenize(e,r=this.defaultMode){if(this.lexerDefinitionErrors.length>0){let i=this.lexerDefinitionErrors.map(o=>o.message).join(`-----------------------
|
|
89
|
+
`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
|
|
90
|
+
`+i)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,i,o,s,a,c,l,u,f,d,p,g,y,_,T,R=e,E=R.length,k=0,D=0,P=this.hasCustom?0:Math.floor(e.length/10),j=new Array(P),q=[],le=this.trackStartLines?1:void 0,Ee=this.trackStartLines?1:void 0,O=k_(this.emptyGroups),w=this.trackStartLines,L=this.config.lineTerminatorsPattern,M=0,A=[],S=[],v=[],B=[];Object.freeze(B);let H=!1,$=V=>{if(v.length===1&&V.tokenType.PUSH_MODE===void 0){let he=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(V);q.push({offset:V.startOffset,line:V.startLine,column:V.startColumn,length:V.image.length,message:he})}else{v.pop();let he=v.at(-1);A=this.patternIdxToConfig[he],S=this.charCodeToPatternIdxToConfig[he],M=A.length;let it=this.canModeBeOptimized[he]&&this.config.safeMode===!1;S&&it?H=!0:H=!1}};function J(V){v.push(V),S=this.charCodeToPatternIdxToConfig[V],A=this.patternIdxToConfig[V],M=A.length,M=A.length;let he=this.canModeBeOptimized[V]&&this.config.safeMode===!1;S&&he?H=!0:H=!1}J.call(this,r);let K,_e=this.config.recoveryEnabled;for(;k<E;){c=null,f=-1;let V=R.charCodeAt(k),he;if(H){let je=on(V),qe=S[je];he=qe!==void 0?qe:B}else he=A;let it=he.length;for(n=0;n<it;n++){K=he[n];let je=K.pattern;l=null;let qe=K.short;if(qe!==!1?V===qe&&(f=1,c=je):K.isCustom===!0?(T=je.exec(R,k,j,O),T!==null?(c=T[0],f=c.length,T.payload!==void 0&&(l=T.payload)):c=null):(je.lastIndex=k,f=this.matchLength(je,e,k)),f!==-1){if(a=K.longerAlt,a!==void 0){c=e.substring(k,k+f);let G=a.length;for(o=0;o<G;o++){let Z=A[a[o]],ee=Z.pattern;if(u=null,Z.isCustom===!0?(T=ee.exec(R,k,j,O),T!==null?(s=T[0],T.payload!==void 0&&(u=T.payload)):s=null):(ee.lastIndex=k,s=this.match(ee,e,k)),s&&s.length>c.length){c=s,f=s.length,l=u,K=Z;break}}}break}}if(f!==-1){if(d=K.group,d!==void 0&&(c=c!==null?c:e.substring(k,k+f),p=K.tokenTypeIdx,g=this.createTokenInstance(c,k,p,K.tokenType,le,Ee,f),this.handlePayload(g,l),d===!1?D=this.addToken(j,D,g):O[d].push(g)),w===!0&&K.canLineTerminator===!0){let je=0,qe,G;L.lastIndex=0;do c=c!==null?c:e.substring(k,k+f),qe=L.test(c),qe===!0&&(G=L.lastIndex-1,je++);while(qe===!0);je!==0?(le=le+je,Ee=f-G,this.updateTokenEndLineColumnLocation(g,d,G,je,le,Ee,f)):Ee=this.computeNewColumn(Ee,f)}else Ee=this.computeNewColumn(Ee,f);k=k+f,this.handleModes(K,$,J,g)}else{let je=k,qe=le,G=Ee,Z=_e===!1;for(;Z===!1&&k<E;)for(k++,i=0;i<M;i++){let ee=A[i],C=ee.pattern,xe=ee.short;if(xe!==!1?R.charCodeAt(k)===xe&&(Z=!0):ee.isCustom===!0?Z=C.exec(R,k,j,O)!==null:(C.lastIndex=k,Z=C.exec(e)!==null),Z===!0)break}if(y=k-je,Ee=this.computeNewColumn(Ee,y),_=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(R,je,y,qe,G,v.at(-1)),q.push({offset:je,line:qe,column:G,length:y,message:_}),_e===!1)break}}return this.hasCustom||(j.length=D),{tokens:j,groups:O,errors:q}}handleModes(e,r,n,i){if(e.pop===!0){let o=e.push;r(i),o!==void 0&&n.call(this,o)}else e.push!==void 0&&n.call(this,e.push)}updateTokenEndLineColumnLocation(e,r,n,i,o,s,a){let c,l;r!==void 0&&(c=n===a-1,l=c?-1:0,i===1&&c===!0||(e.endLine=o+l,e.endColumn=s-1+-l))}computeNewColumn(e,r){return e+r}createOffsetOnlyToken(e,r,n,i){return{image:e,startOffset:r,tokenTypeIdx:n,tokenType:i}}createStartOnlyToken(e,r,n,i,o,s){return{image:e,startOffset:r,startLine:o,startColumn:s,tokenTypeIdx:n,tokenType:i}}createFullToken(e,r,n,i,o,s,a){return{image:e,startOffset:r,endOffset:r+a-1,startLine:o,endLine:o,startColumn:s,endColumn:s+a-1,tokenTypeIdx:n,tokenType:i}}addTokenUsingPush(e,r,n){return e.push(n),r}addTokenUsingMemberAccess(e,r,n){return e[r]=n,r++,r}handlePayloadNoCustom(e,r){}handlePayloadWithCustom(e,r){r!==null&&(e.payload=r)}match(e,r,n){return e.test(r)===!0?r.substring(n,e.lastIndex):null}matchLength(e,r,n){return e.test(r)===!0?e.lastIndex-n:-1}};st.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";st.NA=/NOT_APPLICABLE/;function Nn(t){return qm(t)?t.LABEL:t.name}function qm(t){return typeof t.LABEL=="string"&&t.LABEL!==""}var SP="parent",U_="categories",B_="label",X_="group",G_="push_mode",H_="pop_mode",j_="longer_alt",q_="line_breaks",W_="start_chars_hint";function ni(t){return IP(t)}function IP(t){let e=t.pattern,r={};if(r.name=t.name,e!==void 0&&(r.PATTERN=e),Object.hasOwn(t,SP))throw`The parent property is no longer supported.
|
|
91
|
+
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Object.hasOwn(t,U_)&&(r.CATEGORIES=t[U_]),kn([r]),Object.hasOwn(t,B_)&&(r.LABEL=t[B_]),Object.hasOwn(t,X_)&&(r.GROUP=t[X_]),Object.hasOwn(t,H_)&&(r.POP_MODE=t[H_]),Object.hasOwn(t,G_)&&(r.PUSH_MODE=t[G_]),Object.hasOwn(t,j_)&&(r.LONGER_ALT=t[j_]),Object.hasOwn(t,q_)&&(r.LINE_BREAKS=t[q_]),Object.hasOwn(t,W_)&&(r.START_CHARS_HINT=t[W_]),r}var ur=ni({name:"EOF",pattern:st.NA});kn([ur]);function Cn(t,e,r,n,i,o,s,a){return{image:e,startOffset:r,endOffset:n,startLine:i,endLine:o,startColumn:s,endColumn:a,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function Pc(t,e){return vn(t,e)}var Pn={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${qm(t)?`--> ${Nn(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:i}){let o="Expecting: ",a=`
|
|
92
|
+
but found: '`+e[0].image+"'";if(n)return o+n+a;{let f=`one of these possible Token sequences:
|
|
93
|
+
${t.reduce((d,p)=>d.concat(p),[]).map(d=>`[${d.map(p=>Nn(p)).join(", ")}]`).map((d,p)=>` ${p+1}. ${d}`).join(`
|
|
94
|
+
`)}`;return o+f+a}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){let i="Expecting: ",s=`
|
|
95
|
+
but found: '`+e[0].image+"'";if(r)return i+r+s;{let c=`expecting at least one iteration which starts with one of these possible Token sequences::
|
|
96
|
+
<${t.map(l=>`[${l.map(u=>Nn(u)).join(",")}]`).join(" ,")}>`;return i+c+s}}};Object.freeze(Pn);var z_={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
|
|
97
|
+
inside top level rule: ->`+t.name+"<-"}},Dr={buildDuplicateFoundError(t,e){function r(u){return u instanceof ge?u.terminalType.name:u instanceof De?u.nonTerminalName:""}let n=t.name,i=e[0],o=i.idx,s=Jt(i),a=r(i),c=o>0,l=`->${s}${c?o:""}<- ${a?`with argument: ->${a}<-`:""}
|
|
98
|
+
appears more than once (${e.length} times) in the top level rule: ->${n}<-.
|
|
99
|
+
For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
|
|
100
|
+
`;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,`
|
|
101
|
+
`),l},buildNamespaceConflictError(t){return`Namespace conflict found in grammar.
|
|
102
|
+
The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.
|
|
103
|
+
To resolve this make sure each Terminal and Non-Terminal names are unique
|
|
104
|
+
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
|
|
105
|
+
and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){let e=t.prefixPath.map(i=>Nn(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix
|
|
106
|
+
in <OR${r}> inside <${t.topLevelRule.name}> Rule,
|
|
107
|
+
<${e}> may appears as a prefix path in all these alternatives.
|
|
108
|
+
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
|
|
109
|
+
For Further details.`},buildAlternationAmbiguityError(t){let e=t.alternation.idx===0?"":t.alternation.idx,r=t.prefixPath.length===0,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${e}> inside <${t.topLevelRule.name}> Rule,
|
|
110
|
+
`;if(r)n+=`These alternatives are all empty (match no tokens), making them indistinguishable.
|
|
111
|
+
Only the last alternative may be empty.
|
|
112
|
+
`;else{let i=t.prefixPath.map(o=>Nn(o)).join(", ");n+=`<${i}> may appears as a prefix path in all these alternatives.
|
|
113
|
+
`}return n+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
114
|
+
For Further details.`,n},buildEmptyRepetitionError(t){let e=Jt(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.
|
|
115
|
+
This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
|
|
116
|
+
Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives:
|
|
117
|
+
<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
|
|
118
|
+
has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){let e=t.topLevelRule.name,r=t.leftRecursionPath.map(o=>o.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar.
|
|
119
|
+
rule: <${e}> can be invoked from itself (directly or indirectly)
|
|
120
|
+
without consuming any Tokens. The grammar path that causes this is:
|
|
121
|
+
${n}
|
|
122
|
+
To fix this refactor your grammar to remove the left recursion.
|
|
123
|
+
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof qt?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function V_(t,e){let r=new Wm(t,e);return r.resolveRefs(),r.errors}var Wm=class extends Wt{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){Object.values(this.nameToTopRule).forEach(e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:bt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}};var zm=class extends In{constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=[...this.path.ruleStack].reverse(),this.occurrenceStack=[...this.path.occurrenceStack].reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){this.ruleStack.length===0?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},_f=class extends zm{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),o=new Ke({definition:i});this.possibleTokTypes=ao(o),this.found=!0}}},Es=class extends In{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},Rf=class extends Es{walkMany(e,r,n){if(e.idx===this.occurrence){let i=r.concat(n)[0];this.result.isEndOfRule=i===void 0,i instanceof ge&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,r,n)}},Oc=class extends Es{walkManySep(e,r,n){if(e.idx===this.occurrence){let i=r.concat(n)[0];this.result.isEndOfRule=i===void 0,i instanceof ge&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,r,n)}},bf=class extends Es{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){let i=r.concat(n)[0];this.result.isEndOfRule=i===void 0,i instanceof ge&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,r,n)}},Lc=class extends Es{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){let i=r.concat(n)[0];this.result.isEndOfRule=i===void 0,i instanceof ge&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,r,n)}};function wf(t,e,r=[]){r=[...r];let n=[],i=0;function o(a){return a.concat(t.slice(i+1))}function s(a){let c=wf(o(a),e,r);return n.concat(c)}for(;r.length<e&&i<t.length;){let a=t[i];if(a instanceof Ke)return s(a.definition);if(a instanceof De)return s(a.definition);if(a instanceof Me)n=s(a.definition);else if(a instanceof Ye){let c=a.definition.concat([new we({definition:a.definition})]);return s(c)}else if(a instanceof Ze){let c=[new Ke({definition:a.definition}),new we({definition:[new ge({terminalType:a.separator})].concat(a.definition)})];return s(c)}else if(a instanceof We){let c=a.definition.concat([new we({definition:[new ge({terminalType:a.separator})].concat(a.definition)})]);n=s(c)}else if(a instanceof we){let c=a.definition.concat([new we({definition:a.definition})]);n=s(c)}else{if(a instanceof ze)return a.definition.forEach(c=>{c.definition.length!==0&&(n=s(c.definition))}),n;if(a instanceof ge)r.push(a.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:t.slice(i)}),n}function K_(t,e,r,n){let i="EXIT_NONE_TERMINAL",o=[i],s="EXIT_ALTERNATIVE",a=!1,c=e.length,l=c-n-1,u=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});f.length!==0;){let d=f.pop();if(d===s){a&&f.at(-1).idx<=l&&f.pop();continue}let p=d.def,g=d.idx,y=d.ruleStack,_=d.occurrenceStack;if(p.length===0)continue;let T=p[0];if(T===i){let R={idx:g,def:p.slice(1),ruleStack:y.slice(0,-1),occurrenceStack:_.slice(0,-1)};f.push(R)}else if(T instanceof ge)if(g<c-1){let R=g+1,E=e[R];if(r(E,T.terminalType)){let k={idx:R,def:p.slice(1),ruleStack:y,occurrenceStack:_};f.push(k)}}else if(g===c-1)u.push({nextTokenType:T.terminalType,nextTokenOccurrence:T.idx,ruleStack:y,occurrenceStack:_}),a=!0;else throw Error("non exhaustive match");else if(T instanceof De){let R=[...y];R.push(T.nonTerminalName);let E=[..._];E.push(T.idx);let k={idx:g,def:T.definition.concat(o,p.slice(1)),ruleStack:R,occurrenceStack:E};f.push(k)}else if(T instanceof Me){let R={idx:g,def:p.slice(1),ruleStack:y,occurrenceStack:_};f.push(R),f.push(s);let E={idx:g,def:T.definition.concat(p.slice(1)),ruleStack:y,occurrenceStack:_};f.push(E)}else if(T instanceof Ye){let R=new we({definition:T.definition,idx:T.idx}),E=T.definition.concat([R],p.slice(1)),k={idx:g,def:E,ruleStack:y,occurrenceStack:_};f.push(k)}else if(T instanceof Ze){let R=new ge({terminalType:T.separator}),E=new we({definition:[R].concat(T.definition),idx:T.idx}),k=T.definition.concat([E],p.slice(1)),D={idx:g,def:k,ruleStack:y,occurrenceStack:_};f.push(D)}else if(T instanceof We){let R={idx:g,def:p.slice(1),ruleStack:y,occurrenceStack:_};f.push(R),f.push(s);let E=new ge({terminalType:T.separator}),k=new we({definition:[E].concat(T.definition),idx:T.idx}),D=T.definition.concat([k],p.slice(1)),P={idx:g,def:D,ruleStack:y,occurrenceStack:_};f.push(P)}else if(T instanceof we){let R={idx:g,def:p.slice(1),ruleStack:y,occurrenceStack:_};f.push(R),f.push(s);let E=new we({definition:T.definition,idx:T.idx}),k=T.definition.concat([E],p.slice(1)),D={idx:g,def:k,ruleStack:y,occurrenceStack:_};f.push(D)}else if(T instanceof ze)for(let R=T.definition.length-1;R>=0;R--){let E=T.definition[R],k={idx:g,def:E.definition.concat(p.slice(1)),ruleStack:y,occurrenceStack:_};f.push(k),f.push(s)}else if(T instanceof Ke)f.push({idx:g,def:T.definition.concat(p.slice(1)),ruleStack:y,occurrenceStack:_});else if(T instanceof qt)f.push(vP(T,g,y,_));else throw Error("non exhaustive match")}return u}function vP(t,e,r,n){let i=[...r];i.push(t.name);let o=[...n];return o.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:o}}var at;(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(at||(at={}));function $c(t){if(t instanceof Me||t==="Option")return at.OPTION;if(t instanceof we||t==="Repetition")return at.REPETITION;if(t instanceof Ye||t==="RepetitionMandatory")return at.REPETITION_MANDATORY;if(t instanceof Ze||t==="RepetitionMandatoryWithSeparator")return at.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof We||t==="RepetitionWithSeparator")return at.REPETITION_WITH_SEPARATOR;if(t instanceof ze||t==="Alternation")return at.ALTERNATION;throw Error("non exhaustive match")}function Sf(t){let{occurrence:e,rule:r,prodType:n,maxLookahead:i}=t,o=$c(n);return o===at.ALTERNATION?_s(e,r,i):Rs(e,r,o,i)}function Z_(t,e,r,n,i,o){let s=_s(t,e,r),a=nR(s)?xs:vn;return o(s,n,a,i)}function J_(t,e,r,n,i,o){let s=Rs(t,e,i,r),a=nR(s)?xs:vn;return o(s[0],a,n)}function Q_(t,e,r,n){let i=t.length,o=t.every(s=>s.every(a=>a.length===1));if(e)return function(s){let a=s.map(c=>c.GATE);for(let c=0;c<i;c++){let l=t[c],u=l.length,f=a[c];if(!(f!==void 0&&f.call(this)===!1))e:for(let d=0;d<u;d++){let p=l[d],g=p.length;for(let y=0;y<g;y++){let _=this.LA_FAST(y+1);if(r(_,p[y])===!1)continue e}return c}}};if(o&&!n){let a=t.map(c=>c.flat()).reduce((c,l,u)=>(l.forEach(f=>{f.tokenTypeIdx in c||(c[f.tokenTypeIdx]=u),f.categoryMatches.forEach(d=>{Object.hasOwn(c,d)||(c[d]=u)})}),c),{});return function(){let c=this.LA_FAST(1);return a[c.tokenTypeIdx]}}else return function(){for(let s=0;s<i;s++){let a=t[s],c=a.length;e:for(let l=0;l<c;l++){let u=a[l],f=u.length;for(let d=0;d<f;d++){let p=this.LA_FAST(d+1);if(r(p,u[d])===!1)continue e}return s}}}}function eR(t,e,r){let n=t.every(o=>o.length===1),i=t.length;if(n&&!r){let o=t.flat();if(o.length===1&&o[0].categoryMatches.length===0){let a=o[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===a}}else{let s=o.reduce((a,c,l)=>(a[c.tokenTypeIdx]=!0,c.categoryMatches.forEach(u=>{a[u]=!0}),a),[]);return function(){let a=this.LA_FAST(1);return s[a.tokenTypeIdx]===!0}}}else return function(){e:for(let o=0;o<i;o++){let s=t[o],a=s.length;for(let c=0;c<a;c++){let l=this.LA_FAST(c+1);if(e(l,s[c])===!1)continue e}return!0}return!1}}var Km=class extends In{constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,i){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,at.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,at.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,at.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,at.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,at.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},Af=class extends Wt{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,at.OPTION)}visitRepetition(e){this.checkIsTarget(e,at.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,at.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,at.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,at.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,at.ALTERNATION)}};function Y_(t){let e=new Array(t);for(let r=0;r<t;r++)e[r]=[];return e}function Vm(t){let e=[""];for(let r=0;r<t.length;r++){let n=t[r],i=[];for(let o=0;o<e.length;o++){let s=e[o];i.push(s+"_"+n.tokenTypeIdx);for(let a=0;a<n.categoryMatches.length;a++){let c="_"+n.categoryMatches[a];i.push(s+c)}}e=i}return e}function kP(t,e,r){for(let n=0;n<t.length;n++){if(n===r)continue;let i=t[n];for(let o=0;o<e.length;o++){let s=e[o];if(i[s]===!0)return!1}}return!0}function tR(t,e){let r=t.map(s=>wf([s],1)),n=Y_(r.length),i=r.map(s=>{let a={};return s.forEach(c=>{Vm(c.partialPath).forEach(u=>{a[u]=!0})}),a}),o=r;for(let s=1;s<=e;s++){let a=o;o=Y_(a.length);for(let c=0;c<a.length;c++){let l=a[c];for(let u=0;u<l.length;u++){let f=l[u].partialPath,d=l[u].suffixDef,p=Vm(f);if(kP(i,p,c)||d.length===0||f.length===e){let y=n[c];if(If(y,f)===!1){y.push(f);for(let _=0;_<p.length;_++){let T=p[_];i[c][T]=!0}}}else{let y=wf(d,s+1,f);o[c]=o[c].concat(y),y.forEach(_=>{Vm(_.partialPath).forEach(R=>{i[c][R]=!0})})}}}}return n}function _s(t,e,r,n){let i=new Af(t,at.ALTERNATION,n);return e.accept(i),tR(i.result,r)}function Rs(t,e,r,n){let i=new Af(t,r);e.accept(i);let o=i.result,a=new Km(e,t,r).startWalking(),c=new Ke({definition:o}),l=new Ke({definition:a});return tR([c,l],n)}function If(t,e){e:for(let r=0;r<t.length;r++){let n=t[r];if(n.length===e.length){for(let i=0;i<n.length;i++){let o=e[i],s=n[i];if((o===s||s.categoryMatchesMap[o.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function rR(t,e){return t.length<e.length&&t.every((r,n)=>{let i=e[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function nR(t){return t.every(e=>e.every(r=>r.every(n=>n.categoryMatches.length===0)))}function iR(t){return t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName}).map(r=>Object.assign({type:bt.CUSTOM_LOOKAHEAD_VALIDATION},r))}function oR(t,e,r,n){let i=t.flatMap(c=>NP(c,r)),o=DP(t,e,r),s=t.flatMap(c=>OP(c,r)),a=t.flatMap(c=>PP(c,t,n,r));return i.concat(o,s,a)}function NP(t,e){let r=new Ym;t.accept(r);let n=r.allProductions,i=Object.groupBy(n,CP),o=Object.fromEntries(Object.entries(i).filter(([a,c])=>c.length>1));return Object.values(o).map(a=>{let c=a[0],l=e.buildDuplicateFoundError(t,a),u=Jt(c),f={message:l,type:bt.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:u,occurrence:c.idx},d=sR(c);return d&&(f.parameter=d),f})}function CP(t){return`${Jt(t)}_#_${t.idx}_#_${sR(t)}`}function sR(t){return t instanceof ge?t.terminalType.name:t instanceof De?t.nonTerminalName:""}var Ym=class extends Wt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function PP(t,e,r,n){let i=[];if(e.reduce((s,a)=>a.name===t.name?s+1:s,0)>1){let s=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:s,type:bt.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function aR(t,e,r){let n=[],i;return e.includes(t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:bt.INVALID_RULE_OVERRIDE,ruleName:t})),n}function Jm(t,e,r,n=[]){let i=[],o=vf(e.definition);if(o.length===0)return[];{let s=t.name;o.includes(t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:bt.LEFT_RECURSION,ruleName:s});let c=n.concat([t]),u=o.filter(f=>!c.includes(f)).flatMap(f=>{let d=[...n];return d.push(f),Jm(t,f,r,d)});return i.concat(u)}}function vf(t){let e=[];if(t.length===0)return e;let r=t[0];if(r instanceof De)e.push(r.referencedRule);else if(r instanceof Ke||r instanceof Me||r instanceof Ye||r instanceof Ze||r instanceof We||r instanceof we)e=e.concat(vf(r.definition));else if(r instanceof ze)e=r.definition.map(o=>vf(o.definition)).flat();else if(!(r instanceof ge))throw Error("non exhaustive match");let n=so(r),i=t.length>1;if(n&&i){let o=t.slice(1);return e.concat(vf(o))}else return e}var Dc=class extends Wt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function cR(t,e){let r=new Dc;return t.accept(r),r.alternations.flatMap(o=>o.definition.slice(0,-1).flatMap((a,c)=>K_([a],[],vn,1).length===0?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:o,emptyChoiceIdx:c}),type:bt.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:o.idx,alternative:c+1}]:[]))}function lR(t,e,r){let n=new Dc;t.accept(n);let i=n.alternations;return i=i.filter(s=>s.ignoreAmbiguities!==!0),i.flatMap(s=>{let a=s.idx,c=s.maxLookahead||e,l=_s(a,t,c,s),u=LP(l,s,t,r),f=$P(l,s,t,r);return u.concat(f)})}var Zm=class extends Wt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function OP(t,e){let r=new Dc;return t.accept(r),r.alternations.flatMap(o=>o.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:o}),type:bt.TOO_MANY_ALTS,ruleName:t.name,occurrence:o.idx}]:[])}function uR(t,e,r){let n=[];return t.forEach(i=>{let o=new Zm;i.accept(o),o.allProductions.forEach(a=>{let c=$c(a),l=a.maxLookahead||e,u=a.idx;if(Rs(u,i,c,l)[0].flat().length===0){let p=r.buildEmptyRepetitionError({topLevelRule:i,repetition:a});n.push({message:p,type:bt.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function LP(t,e,r,n){let i=[];return t.reduce((a,c,l)=>(e.definition[l].ignoreAmbiguities===!0||c.forEach(u=>{let f=[l];t.forEach((d,p)=>{l!==p&&If(d,u)&&e.definition[p].ignoreAmbiguities!==!0&&f.push(p)}),f.length>1&&!If(i,u)&&(i.push(u),a.push({alts:f,path:u}))}),a),[]).map(a=>{let c=a.alts.map(u=>u+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:c,prefixPath:a.path}),type:bt.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:a.alts}})}function $P(t,e,r,n){let i=t.reduce((s,a,c)=>{let l=a.map(u=>({idx:c,path:u}));return s.concat(l)},[]);return i.flatMap(s=>{if(e.definition[s.idx].ignoreAmbiguities===!0)return[];let c=s.idx,l=s.path;return i.filter(d=>e.definition[d.idx].ignoreAmbiguities!==!0&&d.idx<c&&rR(d.path,l)).map(d=>{let p=[d.idx+1,c+1],g=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:p,prefixPath:d.path}),type:bt.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:p}})})}function DP(t,e,r){let n=[],i=e.map(o=>o.name);return t.forEach(o=>{let s=o.name;if(i.includes(s)){let a=r.buildNamespaceConflictError(o);n.push({message:a,type:bt.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),n}function fR(t){let e=Object.assign({errMsgProvider:z_},t),r={};return t.rules.forEach(n=>{r[n.name]=n}),V_(r,e.errMsgProvider)}function dR(t){var e;let r=(e=t.errMsgProvider)!==null&&e!==void 0?e:Dr;return oR(t.rules,t.tokenTypes,r,t.grammarName)}var pR="MismatchedTokenException",hR="NoViableAltException",mR="EarlyExitException",gR="NotAllInputParsedException",yR=[pR,hR,mR,gR];Object.freeze(yR);function ii(t){return yR.includes(t.name)}var bs=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},lo=class extends bs{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=pR}},Mc=class extends bs{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=hR}},Fc=class extends bs{constructor(e,r){super(e,r),this.name=gR}},Uc=class extends bs{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=mR}};var Qm={},tg="InRuleRecoveryException",eg=class extends Error{constructor(e){super(e),this.name=tg}},kf=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object.hasOwn(e,"recoveryEnabled")?e.recoveryEnabled:zt.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=MP)}getTokenToInsert(e){let r=Cn(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,i){let o=this.findReSyncTokenType(),s=this.exportLexerState(),a=[],c=!1,l=this.LA_FAST(1),u=this.LA_FAST(1),f=()=>{let d=this.LA(0),p=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:d,ruleName:this.getCurrRuleFullName()}),g=new lo(p,l,this.LA(0));g.resyncedTokens=a.slice(0,-1),this.SAVE_ERROR(g)};for(;!c;)if(this.tokenMatcher(u,i)){f();return}else if(n.call(this)){f(),e.apply(this,r);return}else this.tokenMatcher(u,o)?c=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,a));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA_FAST(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getNextPossibleTokenTypes(e){let r=e.ruleStack[0],i=this.getGAstProductions()[r];return new _f(i,e).startWalking()}getFollowsForInRuleRecovery(e,r){let n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new eg("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||r.length===0)return!1;let n=this.LA_FAST(1);return r.find(o=>this.tokenMatcher(n,o))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let r=this.getCurrFollowKey();return this.getFollowSetFromFollowKey(r).includes(e)}findReSyncTokenType(){let e=this.flattenFollowSet(),r=this.LA_FAST(1),n=2;for(;;){let i=e.find(o=>Pc(r,o));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK_IDX===0)return Qm;let e=this.currRuleShortName,r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK,n=this.RULE_STACK_IDX+1,i=new Array(n);for(let o=0;o<n;o++)o===0?i[o]=Qm:i[o]={ruleName:this.shortRuleNameToFullName(e[o]),idxInCallingRule:r[o],inRule:this.shortRuleNameToFullName(e[o-1])};return i}flattenFollowSet(){return this.buildFullFollowKeyStack().map(r=>this.getFollowSetFromFollowKey(r)).flat()}getFollowSetFromFollowKey(e){if(e===Qm)return[ur];let r=e.ruleName+e.idxInCallingRule+mf+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,ur)||r.push(e),r}reSyncTo(e){let r=[],n=this.LA_FAST(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return r.slice(0,-1)}attemptInRepetitionRecovery(e,r,n,i,o,s,a){}getCurrentGrammarPath(e,r){let n=this.getHumanReadableRuleStack(),i=this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1);return{ruleStack:n,occurrenceStack:i,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){let e=this.RULE_STACK_IDX+1,r=new Array(e);for(let n=0;n<e;n++)r[n]=this.shortRuleNameToFullName(this.RULE_STACK[n]);return r}};function MP(t,e,r,n,i,o,s){let a=this.getKeyForAutomaticLookahead(n,i),c=this.firstAfterRepMap[a];if(c===void 0){let d=this.getCurrRuleFullName(),p=this.getGAstProductions()[d];c=new o(p,i).startWalking(),this.firstAfterRepMap[a]=c}let l=c.token,u=c.occurrence,f=c.isEndOfRule;this.RULE_STACK_IDX===0&&f&&l===void 0&&(l=ur,u=1),!(l===void 0||u===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,u,s)&&this.tryInRepetitionRecovery(t,e,r,l)}function Nf(t,e,r){return r|e|t}var On=class{constructor(e){var r;this.maxLookahead=(r=e?.maxLookahead)!==null&&r!==void 0?r:zt.maxLookahead}validate(e){let r=this.validateNoLeftRecursion(e.rules);if(r.length===0){let n=this.validateEmptyOrAlternatives(e.rules),i=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),o=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...i,...o]}return r}validateNoLeftRecursion(e){return e.flatMap(r=>Jm(r,r,Dr))}validateEmptyOrAlternatives(e){return e.flatMap(r=>cR(r,Dr))}validateAmbiguousAlternationAlternatives(e,r){return e.flatMap(n=>lR(n,r,Dr))}validateSomeNonEmptyLookaheadPath(e,r){return uR(e,r,Dr)}buildLookaheadForAlternation(e){return Z_(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Q_)}buildLookaheadForOptional(e){return J_(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,$c(e.prodType),eR)}};var Pf=class{initLooksAhead(e){this.dynamicTokensEnabled=Object.hasOwn(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:zt.dynamicTokensEnabled,this.maxLookahead=Object.hasOwn(e,"maxLookahead")?e.maxLookahead:zt.maxLookahead,this.lookaheadStrategy=Object.hasOwn(e,"lookaheadStrategy")?e.lookaheadStrategy:new On({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){e.forEach(r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:o,repetitionMandatory:s,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:c}=FP(r);n.forEach(l=>{let u=l.idx===0?"":l.idx;this.TRACE_INIT(`${Jt(l)}${u}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:r,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),d=Nf(this.fullRuleNameToShort[r.name],256,l.idx);this.setLaFuncCache(d,f)})}),i.forEach(l=>{this.computeLookaheadFunc(r,l.idx,768,"Repetition",l.maxLookahead,Jt(l))}),o.forEach(l=>{this.computeLookaheadFunc(r,l.idx,512,"Option",l.maxLookahead,Jt(l))}),s.forEach(l=>{this.computeLookaheadFunc(r,l.idx,1024,"RepetitionMandatory",l.maxLookahead,Jt(l))}),a.forEach(l=>{this.computeLookaheadFunc(r,l.idx,1536,"RepetitionMandatoryWithSeparator",l.maxLookahead,Jt(l))}),c.forEach(l=>{this.computeLookaheadFunc(r,l.idx,1280,"RepetitionWithSeparator",l.maxLookahead,Jt(l))})})})}computeLookaheadFunc(e,r,n,i,o,s){this.TRACE_INIT(`${s}${r===0?"":r}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:o||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),c=Nf(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(c,a)})}getKeyForAutomaticLookahead(e,r){return Nf(this.currRuleShortName,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},rg=class extends Wt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},Cf=new rg;function FP(t){Cf.reset(),t.accept(Cf);let e=Cf.dslMethods;return Cf.reset(),e}function og(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function sg(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function xR(t,e,r){t.children[r]===void 0?t.children[r]=[e]:t.children[r].push(e)}function TR(t,e,r){t.children[e]===void 0?t.children[e]=[r]:t.children[e].push(r)}var UP="name";function ag(t,e){Object.defineProperty(t,UP,{enumerable:!1,configurable:!0,writable:!1,value:e})}function BP(t,e){let r=Object.keys(t),n=r.length;for(let i=0;i<n;i++){let o=r[i],s=t[o],a=s.length;for(let c=0;c<a;c++){let l=s[c];l.tokenTypeIdx===void 0&&this[l.name](l.children,e)}}}function ER(t,e){let r=function(){};ag(r,t+"BaseSemantics");let n={visit:function(i,o){if(Array.isArray(i)&&(i=i[0]),i!==void 0)return this[i.name](i.children,o)},validateVisitor:function(){let i=XP(this,e);if(i.length!==0){let o=i.map(s=>s.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
|
|
124
|
+
${o.join(`
|
|
125
|
+
|
|
126
|
+
`).replace(/\n/g,`
|
|
127
|
+
`)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}function _R(t,e,r){let n=function(){};ag(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return e.forEach(o=>{i[o]=BP}),n.prototype=i,n.prototype.constructor=n,n}var cg;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(cg||(cg={}));function XP(t,e){return GP(t,e)}function GP(t,e){return e.filter(i=>typeof t[i]!="function").map(i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:cg.MISSING_METHOD,methodName:i})).filter(Boolean)}var Df=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Object.hasOwn(e,"nodeLocationTracking")?e.nodeLocationTracking:zt.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=()=>{},this.cstFinallyStateUpdate=()=>{},this.cstPostTerminal=()=>{},this.cstPostNonTerminal=()=>{},this.cstPostRule=()=>{};else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=sg,this.setNodeLocationFromNode=sg,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=og,this.setNodeLocationFromNode=og,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=()=>{},this.setInitialNodeLocation=()=>{};else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA_FAST(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let r=this.LA_FAST(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];xR(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];TR(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(this.baseCstVisitorConstructor===void 0){let e=ER(this.className,Object.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(this.baseCstVisitorWithDefaultsConstructor===void 0){let e=_R(this.className,Object.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getPreviousExplicitRuleShortName(){return this.RULE_STACK[this.RULE_STACK_IDX-1]}getLastExplicitRuleOccurrenceIndex(){return this.RULE_OCCURRENCE_STACK[this.RULE_OCCURRENCE_STACK_IDX]}};var Mf=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVectorLength-2?(this.consumeToken(),this.LA_FAST(1)):Ln}LA_FAST(e){let r=this.currIdx+e;return this.tokVector[r]}LA(e){let r=this.currIdx+e;return r<0||this.tokVectorLength<=r?Ln:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVectorLength-1}getLexerPosition(){return this.exportLexerState()}};var Ff=class{ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=ws){if(this.definedRulesNames.includes(e)){let s={message:Dr.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:bt.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);let i=this.defineRule(e,r,n);return this[e]=i,i}OVERRIDE_RULE(e,r,n=ws){let i=aR(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let o=this.defineRule(e,r,n);return this[e]=o,o}BACKTRACK(e,r){var n;let i=(n=e.coreRule)!==null&&n!==void 0?n:e;return function(){this.isBackTrackingStack.push(1);let o=this.saveRecogState();try{return i.apply(this,r),!0}catch(s){if(ii(s))return!1;throw s}finally{this.reloadRecogState(o),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return hf(Object.values(this.gastProductionsCache))}};var Uf=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=xs,this.subruleIdx=0,this.currRuleShortName=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK=[],this.RULE_OCCURRENCE_STACK_IDX=-1,this.gastProductionsCache={},Object.hasOwn(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
|
|
128
|
+
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
|
|
129
|
+
For Further details.`);if(Array.isArray(e)){if(e.length===0)throw Error(`A Token Vocabulary cannot be empty.
|
|
130
|
+
Note that the first argument for the parser constructor
|
|
131
|
+
is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
|
|
132
|
+
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
|
|
133
|
+
For Further details.`)}if(Array.isArray(e))this.tokensMap=e.reduce((o,s)=>(o[s.name]=s,o),{});else if(Object.hasOwn(e,"modes")&&Object.values(e.modes).flat().every(F_)){let o=Object.values(e.modes).flat(),s=[...new Set(o)];this.tokensMap=s.reduce((a,c)=>(a[c.name]=c,a),{})}else if(typeof e=="object"&&e!==null)this.tokensMap=Object.assign({},e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=ur;let i=(Object.hasOwn(e,"modes")?Object.values(e.modes).flat():Object.values(e)).every(o=>{var s;return((s=o.categoryMatches)===null||s===void 0?void 0:s.length)==0});this.tokenMatcher=i?xs:vn,kn(Object.values(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
|
|
134
|
+
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=Object.hasOwn(n,"resyncEnabled")?n.resyncEnabled:ws.resyncEnabled,o=Object.hasOwn(n,"recoveryValueFunc")?n.recoveryValueFunc:ws.recoveryValueFunc,s=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let a;return this.outputCst===!0?a=function(...f){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,f);let d=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(d),d}catch(d){return this.invokeRuleCatch(d,i,o)}finally{this.ruleFinallyStateUpdate()}}:a=function(...f){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,f)}catch(d){return this.invokeRuleCatch(d,i,o)}finally{this.ruleFinallyStateUpdate()}},Object.assign(function(...f){this.onBeforeParse(e);try{return a.apply(this,f)}finally{this.onAfterParse(e)}},{ruleName:e,originalGrammarAction:r,coreRule:a})}invokeRuleCatch(e,r,n){let i=this.RULE_STACK_IDX===0,o=r&&!this.isBackTracking()&&this.recoveryEnabled;if(ii(e)){let s=e;if(o){let a=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(a))if(s.resyncedTokens=this.reSyncTo(a),this.outputCst){let c=this.CST_STACK[this.CST_STACK.length-1];return c.recoveredNode=!0,c}else return n(e);else{if(this.outputCst){let c=this.CST_STACK[this.CST_STACK.length-1];c.recoveredNode=!0,s.partialCstResult=c}throw s}}else{if(i)return this.moveToTerminatedState(),n(e);throw s}}else throw e}optionInternal(e,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(e,r,n)}optionInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof e!="function"){o=e.DEF;let s=e.GATE;if(s!==void 0){let a=i;i=()=>s.call(this)&&a.call(this)}}else o=e;if(i.call(this)===!0)return o.call(this)}atLeastOneInternal(e,r){let n=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let s=r.GATE;if(s!==void 0){let a=i;i=()=>s.call(this)&&a.call(this)}}else o=r;if(i.call(this)===!0){let s=this.doSingleRepetition(o);for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(o)}else throw this.raiseEarlyExitException(e,at.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,bf)}atLeastOneSepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let a=()=>this.tokenMatcher(this.LA_FAST(1),o);for(;this.tokenMatcher(this.LA_FAST(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,o,a,i,Lc],a,1536,e,Lc)}else throw this.raiseEarlyExitException(e,at.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;let a=r.GATE;if(a!==void 0){let c=i;i=()=>a.call(this)&&c.call(this)}}else o=r;let s=!0;for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(o);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,Rf,s)}manySepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){let i=r.DEF,o=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let a=()=>this.tokenMatcher(this.LA_FAST(1),o);for(;this.tokenMatcher(this.LA_FAST(1),o)===!0;)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,o,a,i,Oc],a,1280,e,Oc)}}repetitionSepSecondInternal(e,r,n,i,o){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,i,o],n,1536,e,o)}doSingleRepetition(e){let r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){let n=this.getKeyForAutomaticLookahead(256,r),i=Array.isArray(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,i);if(s!==void 0)return i[s].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){this.RULE_STACK_IDX--,this.RULE_OCCURRENCE_STACK_IDX--,this.RULE_STACK_IDX>=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX]),this.cstFinallyStateUpdate()}subruleInternal(e,r,n){let i;try{let o=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=e.coreRule.apply(this,o),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),i}catch(o){throw this.subruleInternalError(o,n,e.ruleName)}}subruleInternalError(e,r,n){throw ii(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let i;try{let o=this.LA_FAST(1);this.tokenMatcher(o,e)===!0?(this.consumeToken(),i=o):this.consumeInternalError(e,o,n)}catch(o){i=this.consumeInternalRecovery(e,r,o)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,i),i}consumeInternalError(e,r,n){let i,o=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:o,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new lo(i,r,o))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,i)}catch(o){throw o.name===tg?n:o}}else throw n}saveRecogState(){let e=this.errors,r=this.RULE_STACK.slice(0,this.RULE_STACK_IDX+1);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState);let r=e.RULE_STACK;for(let n=0;n<r.length;n++)this.RULE_STACK[n]=r[n];this.RULE_STACK_IDX=r.length-1,this.RULE_STACK_IDX>=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX])}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK[++this.RULE_OCCURRENCE_STACK_IDX]=n,this.RULE_STACK[++this.RULE_STACK_IDX]=e,this.currRuleShortName=e,this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.currRuleShortName;return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),ur)}reset(){this.resetLexerState(),this.subruleIdx=0,this.currRuleShortName=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK_IDX=-1,this.CST_STACK=[]}onBeforeParse(e){for(let r=0;r<this.maxLookahead+1;r++)this.tokVector.push(Ln)}onAfterParse(e){if(this.isAtEndOfInput()===!1){let r=this.LA(1),n=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:r,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Fc(n,r))}for(;this.tokVector.at(-1)===Ln;)this.tokVector.pop()}};var Bf=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Object.hasOwn(e,"errorMessageProvider")?e.errorMessageProvider:zt.errorMessageProvider}SAVE_ERROR(e){if(ii(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return[...this._errors]}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){let i=this.getCurrRuleFullName(),o=this.getGAstProductions()[i],a=Rs(e,o,r,this.maxLookahead)[0],c=[];for(let u=1;u<=this.maxLookahead;u++)c.push(this.LA(u));let l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:c,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new Uc(l,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],o=_s(e,i,this.maxLookahead),s=[];for(let l=1;l<=this.maxLookahead;l++)s.push(this.LA(l));let a=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:o,actual:s,previous:a,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Mc(c,this.LA(1),a))}};var Hf={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Hf);var RR=!0,bR=Math.pow(2,8)-1,AR=ni({name:"RECORDING_PHASE_TOKEN",pattern:st.NA});kn([AR]);var SR=Cn(AR,`This IToken indicates the Parser is in Recording Phase
|
|
135
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(SR);var jP={name:`This CSTNode indicates the Parser is in Recording Phase
|
|
136
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Xf=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let r=e>0?e:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,e,i)},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,e,i)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return Ln}topLevelRuleRecord(e,r){try{let n=new qt({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`
|
|
137
|
+
This error was thrown during the "grammar recording phase" For more info see:
|
|
138
|
+
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,r){return Xc.call(this,Me,e,r)}atLeastOneInternalRecord(e,r){Xc.call(this,Ye,r,e)}atLeastOneSepFirstInternalRecord(e,r){Xc.call(this,Ze,r,e,RR)}manyInternalRecord(e,r){Xc.call(this,we,r,e)}manySepFirstInternalRecord(e,r){Xc.call(this,We,r,e,RR)}orInternalRecord(e,r){return qP.call(this,e,r)}subruleInternalRecord(e,r,n){if(Gf(r),!e||!Object.hasOwn(e,"ruleName")){let a=new Error(`<SUBRULE${wR(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
|
|
139
|
+
inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let i=this.recordingProdStack.at(-1),o=e.ruleName,s=new De({idx:r,nonTerminalName:o,label:n?.LABEL,referencedRule:void 0});return i.definition.push(s),this.outputCst?jP:Hf}consumeInternalRecord(e,r,n){if(Gf(r),!jm(e)){let s=new Error(`<CONSUME${wR(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
|
|
140
|
+
inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=this.recordingProdStack.at(-1),o=new ge({idx:r,terminalType:e,label:n?.LABEL});return i.definition.push(o),SR}};function Xc(t,e,r,n=!1){Gf(r);let i=this.recordingProdStack.at(-1),o=typeof e=="function"?e:e.DEF,s=new t({definition:[],idx:r});return n&&(s.separator=e.SEP),Object.hasOwn(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),o.call(this),i.definition.push(s),this.recordingProdStack.pop(),Hf}function qP(t,e){Gf(e);let r=this.recordingProdStack.at(-1),n=Array.isArray(t)===!1,i=n===!1?t:t.DEF,o=new ze({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});Object.hasOwn(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD);let s=i.some(a=>typeof a.GATE=="function");return o.hasPredicates=s,r.definition.push(o),i.forEach(a=>{let c=new Ke({definition:[]});o.definition.push(c),Object.hasOwn(a,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=a.IGNORE_AMBIGUITIES:Object.hasOwn(a,"GATE")&&(c.ignoreAmbiguities=!0),this.recordingProdStack.push(c),a.ALT.call(this),this.recordingProdStack.pop()}),Hf}function wR(t){return t===0?"":`${t}`}function Gf(t){if(t<0||t>bR){let e=new Error(`Invalid DSL Method idx value: <${t}>
|
|
141
|
+
Idx value must be a none negative value smaller than ${bR+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}var jf=class{initPerformanceTracer(e){if(Object.hasOwn(e,"traceInitPerf")){let r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=zt.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:i,value:o}=vc(r),s=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${e}> time: ${i}ms`),this.traceInitIndent--,o}else return r()}};function IR(t,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let o=Object.getOwnPropertyDescriptor(n,i);o&&(o.get||o.set)?Object.defineProperty(t.prototype,i,o):t.prototype[i]=r.prototype[i]})})}var Ln=Cn(ur,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Ln);var zt=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Pn,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),ws=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0}),bt;(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(bt||(bt={}));function qf(t=void 0){return function(){return t}}var Gc=class t{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{kc(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),this.definedRulesNames.forEach(i=>{let s=this[i].originalGrammarAction,a;this.TRACE_INIT(`${i} Rule`,()=>{a=this.topLevelRuleRecord(i,s)}),this.gastProductionsCache[i]=a})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=fR({rules:Object.values(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(n.length===0&&this.skipValidations===!1){let i=dR({rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),errMsgProvider:Dr,grammarName:r}),o=iR({lookaheadStrategy:this.lookaheadStrategy,rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,o)}}),this.definitionErrors.length===0&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=T_(Object.values(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,o;(o=(i=this.lookaheadStrategy).initialize)===null||o===void 0||o.call(i,{rules:Object.values(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Object.values(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&this.definitionErrors.length!==0)throw e=this.definitionErrors.map(i=>i.message),new Error(`Parser Definition Errors detected:
|
|
142
|
+
${e.join(`
|
|
143
|
+
-------------------------------
|
|
144
|
+
`)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initGastRecorder(r),n.initPerformanceTracer(r),Object.hasOwn(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
|
|
145
|
+
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
|
|
146
|
+
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
|
|
147
|
+
For further details.`);this.skipValidations=Object.hasOwn(r,"skipValidations")?r.skipValidations:zt.skipValidations}};Gc.DEFER_DEFINITION_ERRORS_HANDLING=!1;IR(Gc,[kf,Pf,Df,Mf,Uf,Ff,Bf,Xf,jf]);var Hc=class extends Gc{constructor(e,r=zt){let n=Object.assign({},r);n.outputCst=!1,super(e,n)}};function zP(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Wf=zP;function VP(){this.__data__=[],this.size=0}var vR=VP;function KP(t,e){return t===e||t!==t&&e!==e}var zf=KP;function YP(t,e){for(var r=t.length;r--;)if(zf(t[r][0],e))return r;return-1}var oi=YP;var ZP=Array.prototype,JP=ZP.splice;function QP(t){var e=this.__data__,r=oi(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():JP.call(e,r,1),--this.size,!0}var kR=QP;function eO(t){var e=this.__data__,r=oi(e,t);return r<0?void 0:e[r][1]}var NR=eO;function tO(t){return oi(this.__data__,t)>-1}var CR=tO;function rO(t,e){var r=this.__data__,n=oi(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var PR=rO;function As(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}As.prototype.clear=vR;As.prototype.delete=kR;As.prototype.get=NR;As.prototype.has=CR;As.prototype.set=PR;var si=As;function nO(){this.__data__=new si,this.size=0}var OR=nO;function iO(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var LR=iO;function oO(t){return this.__data__.get(t)}var $R=oO;function sO(t){return this.__data__.has(t)}var DR=sO;var aO=typeof global=="object"&&global&&global.Object===Object&&global,Vf=aO;var cO=typeof self=="object"&&self&&self.Object===Object&&self,lO=Vf||cO||Function("return this")(),St=lO;var uO=St.Symbol,Vt=uO;var MR=Object.prototype,fO=MR.hasOwnProperty,dO=MR.toString,jc=Vt?Vt.toStringTag:void 0;function pO(t){var e=fO.call(t,jc),r=t[jc];try{t[jc]=void 0;var n=!0}catch{}var i=dO.call(t);return n&&(e?t[jc]=r:delete t[jc]),i}var FR=pO;var hO=Object.prototype,mO=hO.toString;function gO(t){return mO.call(t)}var UR=gO;var yO="[object Null]",xO="[object Undefined]",BR=Vt?Vt.toStringTag:void 0;function TO(t){return t==null?t===void 0?xO:yO:BR&&BR in Object(t)?FR(t):UR(t)}var Mr=TO;function EO(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ss=EO;var _O="[object AsyncFunction]",RO="[object Function]",bO="[object GeneratorFunction]",wO="[object Proxy]";function AO(t){if(!Ss(t))return!1;var e=Mr(t);return e==RO||e==bO||e==_O||e==wO}var Kf=AO;var SO=St["__core-js_shared__"],Yf=SO;var XR=(function(){var t=/[^.]+$/.exec(Yf&&Yf.keys&&Yf.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function IO(t){return!!XR&&XR in t}var GR=IO;var vO=Function.prototype,kO=vO.toString;function NO(t){if(t!=null){try{return kO.call(t)}catch{}try{return t+""}catch{}}return""}var $n=NO;var CO=/[\\^$.*+?()[\]{}|]/g,PO=/^\[object .+?Constructor\]$/,OO=Function.prototype,LO=Object.prototype,$O=OO.toString,DO=LO.hasOwnProperty,MO=RegExp("^"+$O.call(DO).replace(CO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function FO(t){if(!Ss(t)||GR(t))return!1;var e=Kf(t)?MO:PO;return e.test($n(t))}var HR=FO;function UO(t,e){return t?.[e]}var jR=UO;function BO(t,e){var r=jR(t,e);return HR(r)?r:void 0}var Tr=BO;var XO=Tr(St,"Map"),ai=XO;var GO=Tr(Object,"create"),Dn=GO;function HO(){this.__data__=Dn?Dn(null):{},this.size=0}var qR=HO;function jO(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var WR=jO;var qO="__lodash_hash_undefined__",WO=Object.prototype,zO=WO.hasOwnProperty;function VO(t){var e=this.__data__;if(Dn){var r=e[t];return r===qO?void 0:r}return zO.call(e,t)?e[t]:void 0}var zR=VO;var KO=Object.prototype,YO=KO.hasOwnProperty;function ZO(t){var e=this.__data__;return Dn?e[t]!==void 0:YO.call(e,t)}var VR=ZO;var JO="__lodash_hash_undefined__";function QO(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Dn&&e===void 0?JO:e,this}var KR=QO;function Is(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Is.prototype.clear=qR;Is.prototype.delete=WR;Is.prototype.get=zR;Is.prototype.has=VR;Is.prototype.set=KR;var ug=Is;function eL(){this.size=0,this.__data__={hash:new ug,map:new(ai||si),string:new ug}}var YR=eL;function tL(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ZR=tL;function rL(t,e){var r=t.__data__;return ZR(e)?r[typeof e=="string"?"string":"hash"]:r.map}var ci=rL;function nL(t){var e=ci(this,t).delete(t);return this.size-=e?1:0,e}var JR=nL;function iL(t){return ci(this,t).get(t)}var QR=iL;function oL(t){return ci(this,t).has(t)}var eb=oL;function sL(t,e){var r=ci(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var tb=sL;function vs(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}vs.prototype.clear=YR;vs.prototype.delete=JR;vs.prototype.get=QR;vs.prototype.has=eb;vs.prototype.set=tb;var uo=vs;var aL=200;function cL(t,e){var r=this.__data__;if(r instanceof si){var n=r.__data__;if(!ai||n.length<aL-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new uo(n)}return r.set(t,e),this.size=r.size,this}var rb=cL;function ks(t){var e=this.__data__=new si(t);this.size=e.size}ks.prototype.clear=OR;ks.prototype.delete=LR;ks.prototype.get=$R;ks.prototype.has=DR;ks.prototype.set=rb;var Ns=ks;var lL="__lodash_hash_undefined__";function uL(t){return this.__data__.set(t,lL),this}var nb=uL;function fL(t){return this.__data__.has(t)}var ib=fL;function Zf(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new uo;++e<r;)this.add(t[e])}Zf.prototype.add=Zf.prototype.push=nb;Zf.prototype.has=ib;var Jf=Zf;function dL(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var ob=dL;function pL(t,e){return t.has(e)}var Qf=pL;var hL=1,mL=2;function gL(t,e,r,n,i,o){var s=r&hL,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var l=o.get(t),u=o.get(e);if(l&&u)return l==e&&u==t;var f=-1,d=!0,p=r&mL?new Jf:void 0;for(o.set(t,e),o.set(e,t);++f<a;){var g=t[f],y=e[f];if(n)var _=s?n(y,g,f,e,t,o):n(g,y,f,t,e,o);if(_!==void 0){if(_)continue;d=!1;break}if(p){if(!ob(e,function(T,R){if(!Qf(p,R)&&(g===T||i(g,T,r,n,o)))return p.push(R)})){d=!1;break}}else if(!(g===y||i(g,y,r,n,o))){d=!1;break}}return o.delete(t),o.delete(e),d}var ed=gL;var yL=St.Uint8Array,fg=yL;function xL(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var sb=xL;function TL(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Cs=TL;var EL=1,_L=2,RL="[object Boolean]",bL="[object Date]",wL="[object Error]",AL="[object Map]",SL="[object Number]",IL="[object RegExp]",vL="[object Set]",kL="[object String]",NL="[object Symbol]",CL="[object ArrayBuffer]",PL="[object DataView]",ab=Vt?Vt.prototype:void 0,dg=ab?ab.valueOf:void 0;function OL(t,e,r,n,i,o,s){switch(r){case PL:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case CL:return!(t.byteLength!=e.byteLength||!o(new fg(t),new fg(e)));case RL:case bL:case SL:return zf(+t,+e);case wL:return t.name==e.name&&t.message==e.message;case IL:case kL:return t==e+"";case AL:var a=sb;case vL:var c=n&EL;if(a||(a=Cs),t.size!=e.size&&!c)return!1;var l=s.get(t);if(l)return l==e;n|=_L,s.set(t,e);var u=ed(a(t),a(e),n,i,o,s);return s.delete(t),u;case NL:if(dg)return dg.call(t)==dg.call(e)}return!1}var cb=OL;function LL(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var td=LL;var $L=Array.isArray,Xe=$L;function DL(t,e,r){var n=e(t);return Xe(t)?n:td(n,r(t))}var lb=DL;function ML(t,e){for(var r=-1,n=t==null?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}var rd=ML;function FL(){return[]}var ub=FL;var UL=Object.prototype,BL=UL.propertyIsEnumerable,fb=Object.getOwnPropertySymbols,XL=fb?function(t){return t==null?[]:(t=Object(t),rd(fb(t),function(e){return BL.call(t,e)}))}:ub,db=XL;function GL(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var pb=GL;function HL(t){return t!=null&&typeof t=="object"}var Fr=HL;var jL="[object Arguments]";function qL(t){return Fr(t)&&Mr(t)==jL}var pg=qL;var hb=Object.prototype,WL=hb.hasOwnProperty,zL=hb.propertyIsEnumerable,VL=pg((function(){return arguments})())?pg:function(t){return Fr(t)&&WL.call(t,"callee")&&!zL.call(t,"callee")},li=VL;function KL(){return!1}var mb=KL;var xb=typeof exports=="object"&&exports&&!exports.nodeType&&exports,gb=xb&&typeof module=="object"&&module&&!module.nodeType&&module,YL=gb&&gb.exports===xb,yb=YL?St.Buffer:void 0,ZL=yb?yb.isBuffer:void 0,JL=ZL||mb,fo=JL;var QL=9007199254740991,e$=/^(?:0|[1-9]\d*)$/;function t$(t,e){var r=typeof t;return e=e??QL,!!e&&(r=="number"||r!="symbol"&&e$.test(t))&&t>-1&&t%1==0&&t<e}var nd=t$;var r$=9007199254740991;function n$(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=r$}var Ps=n$;var i$="[object Arguments]",o$="[object Array]",s$="[object Boolean]",a$="[object Date]",c$="[object Error]",l$="[object Function]",u$="[object Map]",f$="[object Number]",d$="[object Object]",p$="[object RegExp]",h$="[object Set]",m$="[object String]",g$="[object WeakMap]",y$="[object ArrayBuffer]",x$="[object DataView]",T$="[object Float32Array]",E$="[object Float64Array]",_$="[object Int8Array]",R$="[object Int16Array]",b$="[object Int32Array]",w$="[object Uint8Array]",A$="[object Uint8ClampedArray]",S$="[object Uint16Array]",I$="[object Uint32Array]",tt={};tt[T$]=tt[E$]=tt[_$]=tt[R$]=tt[b$]=tt[w$]=tt[A$]=tt[S$]=tt[I$]=!0;tt[i$]=tt[o$]=tt[y$]=tt[s$]=tt[x$]=tt[a$]=tt[c$]=tt[l$]=tt[u$]=tt[f$]=tt[d$]=tt[p$]=tt[h$]=tt[m$]=tt[g$]=!1;function v$(t){return Fr(t)&&Ps(t.length)&&!!tt[Mr(t)]}var Tb=v$;function k$(t){return function(e){return t(e)}}var Eb=k$;var _b=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qc=_b&&typeof module=="object"&&module&&!module.nodeType&&module,N$=qc&&qc.exports===_b,hg=N$&&Vf.process,C$=(function(){try{var t=qc&&qc.require&&qc.require("util").types;return t||hg&&hg.binding&&hg.binding("util")}catch{}})(),mg=C$;var Rb=mg&&mg.isTypedArray,P$=Rb?Eb(Rb):Tb,Os=P$;var O$=Object.prototype,L$=O$.hasOwnProperty;function $$(t,e){var r=Xe(t),n=!r&&li(t),i=!r&&!n&&fo(t),o=!r&&!n&&!i&&Os(t),s=r||n||i||o,a=s?pb(t.length,String):[],c=a.length;for(var l in t)(e||L$.call(t,l))&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||nd(l,c)))&&a.push(l);return a}var bb=$$;var D$=Object.prototype;function M$(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||D$;return t===r}var id=M$;function F$(t,e){return function(r){return t(e(r))}}var wb=F$;var U$=wb(Object.keys,Object),Ab=U$;var B$=Object.prototype,X$=B$.hasOwnProperty;function G$(t){if(!id(t))return Ab(t);var e=[];for(var r in Object(t))X$.call(t,r)&&r!="constructor"&&e.push(r);return e}var od=G$;function H$(t){return t!=null&&Ps(t.length)&&!Kf(t)}var ui=H$;function j$(t){return ui(t)?bb(t):od(t)}var Ls=j$;function q$(t){return lb(t,Ls,db)}var gg=q$;var W$=1,z$=Object.prototype,V$=z$.hasOwnProperty;function K$(t,e,r,n,i,o){var s=r&W$,a=gg(t),c=a.length,l=gg(e),u=l.length;if(c!=u&&!s)return!1;for(var f=c;f--;){var d=a[f];if(!(s?d in e:V$.call(e,d)))return!1}var p=o.get(t),g=o.get(e);if(p&&g)return p==e&&g==t;var y=!0;o.set(t,e),o.set(e,t);for(var _=s;++f<c;){d=a[f];var T=t[d],R=e[d];if(n)var E=s?n(R,T,d,e,t,o):n(T,R,d,t,e,o);if(!(E===void 0?T===R||i(T,R,r,n,o):E)){y=!1;break}_||(_=d=="constructor")}if(y&&!_){var k=t.constructor,D=e.constructor;k!=D&&"constructor"in t&&"constructor"in e&&!(typeof k=="function"&&k instanceof k&&typeof D=="function"&&D instanceof D)&&(y=!1)}return o.delete(t),o.delete(e),y}var Sb=K$;var Y$=Tr(St,"DataView"),sd=Y$;var Z$=Tr(St,"Promise"),ad=Z$;var J$=Tr(St,"Set"),fi=J$;var Q$=Tr(St,"WeakMap"),cd=Q$;var Ib="[object Map]",eD="[object Object]",vb="[object Promise]",kb="[object Set]",Nb="[object WeakMap]",Cb="[object DataView]",tD=$n(sd),rD=$n(ai),nD=$n(ad),iD=$n(fi),oD=$n(cd),po=Mr;(sd&&po(new sd(new ArrayBuffer(1)))!=Cb||ai&&po(new ai)!=Ib||ad&&po(ad.resolve())!=vb||fi&&po(new fi)!=kb||cd&&po(new cd)!=Nb)&&(po=function(t){var e=Mr(t),r=e==eD?t.constructor:void 0,n=r?$n(r):"";if(n)switch(n){case tD:return Cb;case rD:return Ib;case nD:return vb;case iD:return kb;case oD:return Nb}return e});var Wc=po;var sD=1,Pb="[object Arguments]",Ob="[object Array]",ld="[object Object]",aD=Object.prototype,Lb=aD.hasOwnProperty;function cD(t,e,r,n,i,o){var s=Xe(t),a=Xe(e),c=s?Ob:Wc(t),l=a?Ob:Wc(e);c=c==Pb?ld:c,l=l==Pb?ld:l;var u=c==ld,f=l==ld,d=c==l;if(d&&fo(t)){if(!fo(e))return!1;s=!0,u=!1}if(d&&!u)return o||(o=new Ns),s||Os(t)?ed(t,e,r,n,i,o):cb(t,e,c,r,n,i,o);if(!(r&sD)){var p=u&&Lb.call(t,"__wrapped__"),g=f&&Lb.call(e,"__wrapped__");if(p||g){var y=p?t.value():t,_=g?e.value():e;return o||(o=new Ns),i(y,_,r,n,o)}}return d?(o||(o=new Ns),Sb(t,e,r,n,i,o)):!1}var $b=cD;function Db(t,e,r,n,i){return t===e?!0:t==null||e==null||!Fr(t)&&!Fr(e)?t!==t&&e!==e:$b(t,e,r,n,Db,i)}var ud=Db;var lD=1,uD=2;function fD(t,e,r,n){var i=r.length,o=i,s=!n;if(t==null)return!o;for(t=Object(t);i--;){var a=r[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=r[i];var c=a[0],l=t[c],u=a[1];if(s&&a[2]){if(l===void 0&&!(c in t))return!1}else{var f=new Ns;if(n)var d=n(l,u,c,t,e,f);if(!(d===void 0?ud(u,l,lD|uD,n,f):d))return!1}}return!0}var Mb=fD;function dD(t){return t===t&&!Ss(t)}var fd=dD;function pD(t){for(var e=Ls(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,fd(i)]}return e}var Fb=pD;function hD(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var dd=hD;function mD(t){var e=Fb(t);return e.length==1&&e[0][2]?dd(e[0][0],e[0][1]):function(r){return r===t||Mb(r,t,e)}}var Ub=mD;var gD="[object Symbol]";function yD(t){return typeof t=="symbol"||Fr(t)&&Mr(t)==gD}var di=yD;var xD=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,TD=/^\w*$/;function ED(t,e){if(Xe(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||di(t)?!0:TD.test(t)||!xD.test(t)||e!=null&&t in Object(e)}var $s=ED;var _D="Expected a function";function yg(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(_D);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(yg.Cache||uo),r}yg.Cache=uo;var Bb=yg;var RD=500;function bD(t){var e=Bb(t,function(n){return r.size===RD&&r.clear(),n}),r=e.cache;return e}var Xb=bD;var wD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,AD=/\\(\\)?/g,SD=Xb(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(wD,function(r,n,i,o){e.push(i?o.replace(AD,"$1"):n||r)}),e}),Gb=SD;var ID=1/0,Hb=Vt?Vt.prototype:void 0,jb=Hb?Hb.toString:void 0;function qb(t){if(typeof t=="string")return t;if(Xe(t))return Wf(t,qb)+"";if(di(t))return jb?jb.call(t):"";var e=t+"";return e=="0"&&1/t==-ID?"-0":e}var Wb=qb;function vD(t){return t==null?"":Wb(t)}var zb=vD;function kD(t,e){return Xe(t)?t:$s(t,e)?[t]:Gb(zb(t))}var pd=kD;var ND=1/0;function CD(t){if(typeof t=="string"||di(t))return t;var e=t+"";return e=="0"&&1/t==-ND?"-0":e}var pi=CD;function PD(t,e){e=pd(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[pi(e[r++])];return r&&r==n?t:void 0}var hd=PD;function OD(t,e,r){var n=t==null?void 0:hd(t,e);return n===void 0?r:n}var Vb=OD;function LD(t,e){return t!=null&&e in Object(t)}var Kb=LD;function $D(t,e,r){e=pd(e,t);for(var n=-1,i=e.length,o=!1;++n<i;){var s=pi(e[n]);if(!(o=t!=null&&r(t,s)))break;t=t[s]}return o||++n!=i?o:(i=t==null?0:t.length,!!i&&Ps(i)&&nd(s,i)&&(Xe(t)||li(t)))}var Yb=$D;function DD(t,e){return t!=null&&Yb(t,e,Kb)}var Zb=DD;var MD=1,FD=2;function UD(t,e){return $s(t)&&fd(e)?dd(pi(t),e):function(r){var n=Vb(r,t);return n===void 0&&n===e?Zb(r,t):ud(e,n,MD|FD)}}var Jb=UD;function BD(t){return t}var Ds=BD;function XD(t){return function(e){return e?.[t]}}var Qb=XD;function GD(t){return function(e){return hd(e,t)}}var ew=GD;function HD(t){return $s(t)?Qb(pi(t)):ew(t)}var tw=HD;function jD(t){return typeof t=="function"?t:t==null?Ds:typeof t=="object"?Xe(t)?Jb(t[0],t[1]):Ub(t):tw(t)}var hi=jD;function qD(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),a=s.length;a--;){var c=s[t?a:++i];if(r(o[c],c,o)===!1)break}return e}}var rw=qD;var WD=rw(),nw=WD;function zD(t,e){return t&&nw(t,e,Ls)}var iw=zD;function VD(t,e){return function(r,n){if(r==null)return r;if(!ui(r))return t(r,n);for(var i=r.length,o=e?i:-1,s=Object(r);(e?o--:++o<i)&&n(s[o],o,s)!==!1;);return r}}var ow=VD;var KD=ow(iw),mi=KD;function YD(t,e){var r=-1,n=ui(t)?Array(t.length):[];return mi(t,function(i,o,s){n[++r]=e(i,o,s)}),n}var sw=YD;function ZD(t,e){var r=Xe(t)?Wf:sw;return r(t,hi(e,3))}var fr=ZD;function JD(t,e){var r=[];return mi(t,function(n,i,o){e(n,i,o)&&r.push(n)}),r}var aw=JD;function QD(t,e){var r=Xe(t)?rd:aw;return r(t,hi(e,3))}var cw=QD;function ho(t,e,r){return`${t.name}_${e}_${r}`}var gi=1,eM=2,lw=4,uw=5;var Us=7,tM=8,rM=9,nM=10,iM=11,fw=12,zc=class{constructor(e){this.target=e}isEpsilon(){return!1}},Ms=class extends zc{constructor(e,r){super(e),this.tokenType=r}},Vc=class extends zc{constructor(e){super(e)}isEpsilon(){return!0}},Fs=class extends zc{constructor(e,r,n){super(e),this.rule=r,this.followState=n}isEpsilon(){return!0}};function dw(t){let e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};oM(e,t);let r=t.length;for(let n=0;n<r;n++){let i=t[n],o=mo(e,i,i);o!==void 0&&gM(e,i,o)}return e}function oM(t,e){let r=e.length;for(let n=0;n<r;n++){let i=e[n],o=It(t,i,void 0,{type:eM}),s=It(t,i,void 0,{type:Us});o.stop=s,t.ruleToStartState.set(i,o),t.ruleToStopState.set(i,s)}}function pw(t,e,r){return r instanceof ge?xg(t,e,r.terminalType,r):r instanceof De?mM(t,e,r):r instanceof ze?uM(t,e,r):r instanceof Me?fM(t,e,r):r instanceof we?sM(t,e,r):r instanceof We?aM(t,e,r):r instanceof Ye?cM(t,e,r):r instanceof Ze?lM(t,e,r):mo(t,e,r)}function sM(t,e,r){let n=It(t,e,r,{type:uw});yi(t,n);let i=Bs(t,e,n,r,mo(t,e,r));return mw(t,e,r,i)}function aM(t,e,r){let n=It(t,e,r,{type:uw});yi(t,n);let i=Bs(t,e,n,r,mo(t,e,r)),o=xg(t,e,r.separator,r);return mw(t,e,r,i,o)}function cM(t,e,r){let n=It(t,e,r,{type:lw});yi(t,n);let i=Bs(t,e,n,r,mo(t,e,r));return hw(t,e,r,i)}function lM(t,e,r){let n=It(t,e,r,{type:lw});yi(t,n);let i=Bs(t,e,n,r,mo(t,e,r)),o=xg(t,e,r.separator,r);return hw(t,e,r,i,o)}function uM(t,e,r){let n=It(t,e,r,{type:gi});yi(t,n);let i=fr(r.definition,s=>pw(t,e,s));return Bs(t,e,n,r,...i)}function fM(t,e,r){let n=It(t,e,r,{type:gi});yi(t,n);let i=Bs(t,e,n,r,mo(t,e,r));return dM(t,e,r,i)}function mo(t,e,r){let n=cw(fr(r.definition,i=>pw(t,e,i)),i=>i!==void 0);return n.length===1?n[0]:n.length===0?void 0:hM(t,n)}function hw(t,e,r,n,i){let o=n.left,s=n.right,a=It(t,e,r,{type:iM});yi(t,a);let c=It(t,e,r,{type:fw});return o.loopback=a,c.loopback=a,t.decisionMap[ho(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=a,Tt(s,a),i===void 0?(Tt(a,o),Tt(a,c)):(Tt(a,c),Tt(a,i.left),Tt(i.right,o)),{left:o,right:c}}function mw(t,e,r,n,i){let o=n.left,s=n.right,a=It(t,e,r,{type:nM});yi(t,a);let c=It(t,e,r,{type:fw}),l=It(t,e,r,{type:rM});return a.loopback=l,c.loopback=l,Tt(a,o),Tt(a,c),Tt(s,l),i!==void 0?(Tt(l,c),Tt(l,i.left),Tt(i.right,o)):Tt(l,a),t.decisionMap[ho(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=a,{left:a,right:c}}function dM(t,e,r,n){let i=n.left,o=n.right;return Tt(i,o),t.decisionMap[ho(e,"Option",r.idx)]=i,n}function yi(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function Bs(t,e,r,n,...i){let o=It(t,e,n,{type:tM,start:r});r.end=o;for(let a of i)a!==void 0?(Tt(r,a.left),Tt(a.right,o)):Tt(r,o);let s={left:r,right:o};return t.decisionMap[ho(e,pM(n),n.idx)]=r,s}function pM(t){if(t instanceof ze)return"Alternation";if(t instanceof Me)return"Option";if(t instanceof we)return"Repetition";if(t instanceof We)return"RepetitionWithSeparator";if(t instanceof Ye)return"RepetitionMandatory";if(t instanceof Ze)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function hM(t,e){let r=e.length;for(let o=0;o<r-1;o++){let s=e[o],a;s.left.transitions.length===1&&(a=s.left.transitions[0]);let c=a instanceof Fs,l=a,u=e[o+1].left;s.left.type===gi&&s.right.type===gi&&a!==void 0&&(c&&l.followState===s.right||a.target===s.right)?(c?l.followState=u:a.target=u,yM(t,s.right)):Tt(s.right,u)}let n=e[0],i=e[r-1];return{left:n.left,right:i.right}}function xg(t,e,r,n){let i=It(t,e,n,{type:gi}),o=It(t,e,n,{type:gi});return Tg(i,new Ms(o,r)),{left:i,right:o}}function mM(t,e,r){let n=r.referencedRule,i=t.ruleToStartState.get(n),o=It(t,e,r,{type:gi}),s=It(t,e,r,{type:gi}),a=new Fs(i,n,s);return Tg(o,a),{left:o,right:s}}function gM(t,e,r){let n=t.ruleToStartState.get(e);Tt(n,r.left);let i=t.ruleToStopState.get(e);return Tt(r.right,i),{left:n,right:i}}function Tt(t,e){let r=new Vc(e);Tg(t,r)}function It(t,e,r,n){let i=Object.assign({atn:t,production:r,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},n);return t.states.push(i),i}function Tg(t,e){t.transitions.length===0&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}function yM(t,e){t.states.splice(t.states.indexOf(e),1)}var Kc={},Xs=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let r=Eg(e);r in this.map||(this.map[r]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return fr(this.configs,e=>e.alt)}get key(){let e="";for(let r in this.map)e+=r+":";return e}};function Eg(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(r=>r.stateNumber.toString()).join("_")}`}function xM(t,e,r){for(var n=-1,i=t.length;++n<i;){var o=t[n],s=e(o);if(s!=null&&(a===void 0?s===s&&!di(s):r(s,a)))var a=s,c=o}return c}var gw=xM;function TM(t,e){return t<e}var yw=TM;function EM(t){return t&&t.length?gw(t,Ds,yw):void 0}var xw=EM;var Tw=Vt?Vt.isConcatSpreadable:void 0;function _M(t){return Xe(t)||li(t)||!!(Tw&&t&&t[Tw])}var Ew=_M;function _w(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=Ew),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?_w(a,e-1,r,n,i):td(i,a):n||(i[i.length]=a)}return i}var md=_w;function RM(t,e){return md(fr(t,e),1)}var Rw=RM;function bM(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}var bw=bM;function wM(t){return t!==t}var ww=wM;function AM(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}var Aw=AM;function SM(t,e,r){return e===e?Aw(t,e,r):bw(t,ww,r)}var Sw=SM;function IM(t,e){var r=t==null?0:t.length;return!!r&&Sw(t,e,0)>-1}var Iw=IM;function vM(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}var vw=vM;function kM(){}var kw=kM;var NM=1/0,CM=fi&&1/Cs(new fi([,-0]))[1]==NM?function(t){return new fi(t)}:kw,Nw=CM;var PM=200;function OM(t,e,r){var n=-1,i=Iw,o=t.length,s=!0,a=[],c=a;if(r)s=!1,i=vw;else if(o>=PM){var l=e?null:Nw(t);if(l)return Cs(l);s=!1,i=Qf,c=new Jf}else c=e?[]:a;e:for(;++n<o;){var u=t[n],f=e?e(u):u;if(u=r||u!==0?u:0,s&&f===f){for(var d=c.length;d--;)if(c[d]===f)continue e;e&&c.push(f),a.push(u)}else i(c,f,r)||(c!==a&&c.push(f),a.push(u))}return a}var Cw=OM;function LM(t,e){return t&&t.length?Cw(t,hi(e,2)):[]}var Pw=LM;function $M(t){var e=t==null?0:t.length;return e?md(t,1):[]}var Ow=$M;function DM(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var Lw=DM;function MM(t){return typeof t=="function"?t:Ds}var $w=MM;function FM(t,e){var r=Xe(t)?Lw:mi;return r(t,$w(e))}var gd=FM;var UM="[object Map]",BM="[object Set]",XM=Object.prototype,GM=XM.hasOwnProperty;function HM(t){if(t==null)return!0;if(ui(t)&&(Xe(t)||typeof t=="string"||typeof t.splice=="function"||fo(t)||Os(t)||li(t)))return!t.length;var e=Wc(t);if(e==UM||e==BM)return!t.size;if(id(t))return!od(t).length;for(var r in t)if(GM.call(t,r))return!1;return!0}var Dw=HM;function jM(t,e,r,n){var i=-1,o=t==null?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}var Mw=jM;function qM(t,e,r,n,i){return i(t,function(o,s,a){r=n?(n=!1,o):e(r,o,s,a)}),r}var Fw=qM;function WM(t,e,r){var n=Xe(t)?Mw:Fw,i=arguments.length<3;return n(t,hi(e,4),r,i,mi)}var _g=WM;function zM(t,e){let r={};return n=>{let i=n.toString(),o=r[i];return o!==void 0||(o={atnStartState:t,decision:e,states:{}},r[i]=o),o}}var yd=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,r){this.predicates[e]=r}toString(){let e="",r=this.predicates.length;for(let n=0;n<r;n++)e+=this.predicates[n]===!0?"1":"0";return e}},Uw=new yd,Yc=class extends On{constructor(e){var r;super(),this.logging=(r=e?.logging)!==null&&r!==void 0?r:(n=>console.log(n))}initialize(e){this.atn=dw(e.rules),this.dfas=VM(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:r,rule:n,hasPredicates:i,dynamicTokensEnabled:o}=e,s=this.dfas,a=this.logging,c=ho(n,"Alternation",r),u=this.atn.decisionMap[c].decision,f=fr(Sf({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),d=>fr(d,p=>p[0]));if(Bw(f,!1)&&!o){let d=_g(f,(p,g,y)=>(gd(g,_=>{_&&(p[_.tokenTypeIdx]=y,gd(_.categoryMatches,T=>{p[T]=y}))}),p),{});return i?function(p){var g;let y=this.LA_FAST(1),_=d[y.tokenTypeIdx];if(p!==void 0&&_!==void 0){let T=(g=p[_])===null||g===void 0?void 0:g.GATE;if(T!==void 0&&T.call(this)===!1)return}return _}:function(){let p=this.LA_FAST(1);return d[p.tokenTypeIdx]}}else return i?function(d){let p=new yd,g=d===void 0?0:d.length;for(let _=0;_<g;_++){let T=d?.[_].GATE;p.set(_,T===void 0||T.call(this))}let y=Rg.call(this,s,u,p,a);return typeof y=="number"?y:void 0}:function(){let d=Rg.call(this,s,u,Uw,a);return typeof d=="number"?d:void 0}}buildLookaheadForOptional(e){let{prodOccurrence:r,rule:n,prodType:i,dynamicTokensEnabled:o}=e,s=this.dfas,a=this.logging,c=ho(n,i,r),u=this.atn.decisionMap[c].decision,f=fr(Sf({maxLookahead:1,occurrence:r,prodType:i,rule:n}),d=>fr(d,p=>p[0]));if(Bw(f)&&f[0][0]&&!o){let d=f[0],p=Ow(d);if(p.length===1&&Dw(p[0].categoryMatches)){let y=p[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===y}}else{let g=_g(p,(y,_)=>(_!==void 0&&(y[_.tokenTypeIdx]=!0,gd(_.categoryMatches,T=>{y[T]=!0})),y),{});return function(){let y=this.LA_FAST(1);return g[y.tokenTypeIdx]===!0}}}return function(){let d=Rg.call(this,s,u,Uw,a);return typeof d=="object"?!1:d===0}}};function Bw(t,e=!0){let r=new Set;for(let n of t){let i=new Set;for(let o of n){if(o===void 0){if(e)break;return!1}let s=[o.tokenTypeIdx].concat(o.categoryMatches);for(let a of s)if(r.has(a)){if(!i.has(a))return!1}else r.add(a),i.add(a)}}return!0}function VM(t){let e=t.decisionStates.length,r=Array(e);for(let n=0;n<e;n++)r[n]=zM(t.decisionStates[n],n);return r}function Rg(t,e,r,n){let i=t[e](r),o=i.start;if(o===void 0){let a=o1(i.atnStartState);o=Hw(i,Gw(a)),i.start=o}return KM.apply(this,[i,o,r,n])}function KM(t,e,r,n){let i=e,o=1,s=[],a=this.LA_FAST(o++);for(;;){let c=t1(i,a);if(c===void 0&&(c=YM.apply(this,[t,i,a,o,r,n])),c===Kc)return e1(s,i,a);if(c.isAcceptState===!0)return c.prediction;i=c,s.push(a),a=this.LA(o++)}}function YM(t,e,r,n,i,o){let s=r1(e.configs,r,i);if(s.size===0)return Xw(t,e,r,Kc),Kc;let a=Gw(s),c=i1(s,i);if(c!==void 0)a.isAcceptState=!0,a.prediction=c,a.configs.uniqueAlt=c;else if(l1(s)){let l=xw(s.alts);a.isAcceptState=!0,a.prediction=l,a.configs.uniqueAlt=l,ZM.apply(this,[t,n,s.alts,o])}return a=Xw(t,e,r,a),a}function ZM(t,e,r,n){let i=[];for(let l=1;l<=e;l++)i.push(this.LA(l).tokenType);let o=t.atnStartState,s=o.rule,a=o.production,c=JM({topLevelRule:s,ambiguityIndices:r,production:a,prefixPath:i});n(c)}function JM(t){let e=fr(t.prefixPath,i=>Nn(i)).join(", "),r=t.production.idx===0?"":t.production.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${QM(t.production)}${r}> inside <${t.topLevelRule.name}> Rule,
|
|
148
|
+
<${e}> may appears as a prefix path in all these alternatives.
|
|
149
|
+
`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
150
|
+
For Further details.`,n}function QM(t){if(t instanceof De)return"SUBRULE";if(t instanceof Me)return"OPTION";if(t instanceof ze)return"OR";if(t instanceof Ye)return"AT_LEAST_ONE";if(t instanceof Ze)return"AT_LEAST_ONE_SEP";if(t instanceof We)return"MANY_SEP";if(t instanceof we)return"MANY";if(t instanceof ge)return"CONSUME";throw Error("non exhaustive match")}function e1(t,e,r){let n=Rw(e.configs.elements,o=>o.state.transitions),i=Pw(n.filter(o=>o instanceof Ms).map(o=>o.tokenType),o=>o.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:t}}function t1(t,e){return t.edges[e.tokenTypeIdx]}function r1(t,e,r){let n=new Xs,i=[];for(let s of t.elements){if(r.is(s.alt)===!1)continue;if(s.state.type===Us){i.push(s);continue}let a=s.state.transitions.length;for(let c=0;c<a;c++){let l=s.state.transitions[c],u=n1(l,e);u!==void 0&&n.add({state:u,alt:s.alt,stack:s.stack})}}let o;if(i.length===0&&n.size===1&&(o=n),o===void 0){o=new Xs;for(let s of n.elements)xd(s,o)}if(i.length>0&&!a1(o))for(let s of i)o.add(s);return o}function n1(t,e){if(t instanceof Ms&&Pc(e,t.tokenType))return t.target}function i1(t,e){let r;for(let n of t.elements)if(e.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function Gw(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function Xw(t,e,r,n){return n=Hw(t,n),e.edges[r.tokenTypeIdx]=n,n}function Hw(t,e){if(e===Kc)return e;let r=e.configs.key,n=t.states[r];return n!==void 0?n:(e.configs.finalize(),t.states[r]=e,e)}function o1(t){let e=new Xs,r=t.transitions.length;for(let n=0;n<r;n++){let o={state:t.transitions[n].target,alt:n,stack:[]};xd(o,e)}return e}function xd(t,e){let r=t.state;if(r.type===Us){if(t.stack.length>0){let i=[...t.stack],s={state:i.pop(),alt:t.alt,stack:i};xd(s,e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);let n=r.transitions.length;for(let i=0;i<n;i++){let o=r.transitions[i],s=s1(t,o);s!==void 0&&xd(s,e)}}function s1(t,e){if(e instanceof Vc)return{state:e.target,alt:t.alt,stack:t.stack};if(e instanceof Fs){let r=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:r}}}function a1(t){for(let e of t.elements)if(e.state.type===Us)return!0;return!1}function c1(t){for(let e of t.elements)if(e.state.type!==Us)return!1;return!0}function l1(t){if(c1(t))return!0;let e=u1(t.elements);return f1(e)&&!d1(e)}function u1(t){let e=new Map;for(let r of t){let n=Eg(r,!1),i=e.get(n);i===void 0&&(i={},e.set(n,i)),i[r.alt]=!0}return e}function f1(t){for(let e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}function d1(t){for(let e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}zs();var il=class{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new Vs(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let r=new To;return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(e,r){let n=new xo(e.startOffset,e.image.length,cs(e),e.tokenType,!r);return n.grammarSource=r,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let r=e.container;if(r){let n=r.content.indexOf(e);n>=0&&r.content.splice(n,1)}}addHiddenNodes(e){let r=[];for(let o of e){let s=new xo(o.startOffset,o.image.length,cs(o),o.tokenType,!0);s.root=this.rootNode,r.push(s)}let n=this.current,i=!1;if(n.content.length>0){n.content.push(...r);return}for(;n.container;){let o=n.container.content.indexOf(n);if(o>0){n.container.content.splice(o,0,...r),i=!0;break}n=n.container}i||this.rootNode.content.unshift(...r)}construct(e){let r=this.current;typeof e.$type=="string"&&!e.$infixName&&(this.current.astNode=e),e.$cstNode=r;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}},ol=class{get hidden(){return!1}get astNode(){let e=typeof this._astNode?.$type=="string"?this._astNode:this.container?.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},xo=class extends ol{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,r,n,i,o=!1){super(),this._hidden=o,this._offset=e,this._tokenType=i,this._length=r,this._range=n}},To=class extends ol{constructor(){super(...arguments),this.content=new Ay(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let e=this.firstNonHiddenNode,r=this.lastNonHiddenNode;if(e&&r){if(this._rangeCache===void 0){let{range:n}=e,{range:i}=r;this._rangeCache={start:n.start,end:i.end.line<n.start.line?n.start:i.end}}return this._rangeCache}else return{start:ve.create(0,0),end:ve.create(0,0)}}get firstNonHiddenNode(){for(let e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){let r=this.content[e];if(!r.hidden)return r}return this.content[this.content.length-1]}},Ay=class t extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,r,...n){return this.addParents(n),super.splice(e,r,...n)}addParents(e){for(let r of e)r.container=this.parent}},Vs=class extends To{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}};var vd=Symbol("Datatype");function Sy(t){return t.$type===vd}var jw="\u200B",qw=t=>t.endsWith(jw)?t:t+jw,sl=class{constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let r=this.lexer.definition,n=e.LanguageMetaData.mode==="production";e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new Iy(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new Nd(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,r){this.wrapper.wrapOr(e,r)}optional(e,r){this.wrapper.wrapOption(e,r)}many(e,r){this.wrapper.wrapMany(e,r)}atLeastOne(e,r){this.wrapper.wrapAtLeastOne(e,r)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},al=class extends sl{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new il,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,r){let n=this.computeRuleType(e),i;ei(e)&&(i=e.name,this.registerPrecedenceMap(e));let o=this.wrapper.DEFINE_RULE(qw(e.name),this.startImplementation(n,i,r).bind(this));return this.allRules.set(e.name,o),At(e)&&e.entry&&(this.mainRule=o),o}registerPrecedenceMap(e){let r=e.name,n=new Map;for(let i=0;i<e.operators.precedences.length;i++){let o=e.operators.precedences[i];for(let s of o.operators)n.set(s.value,{precedence:i,rightAssoc:o.associativity==="right"})}this.operatorPrecedence.set(r,n)}computeRuleType(e){return ei(e)?ri(e):e.fragment?void 0:Sc(e)?vd:ri(e)}parse(e,r={}){this.nodeBuilder.buildRootNode(e);let n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;let i=r.rule?this.allRules.get(r.rule):this.mainRule;if(!i)throw new Error(r.rule?`No rule found with name '${r.rule}'`:"No main rule available.");let o=this.doParse(i);return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,Jo(o,{deep:!0}),{value:o,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}doParse(e){let r=this.wrapper.rule(e);if(this.stack.length>0&&(r=this.construct()),r===void 0)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return r}startImplementation(e,r,n){return i=>{let o=!this.isRecording()&&e!==void 0;if(o){let s={$type:e};this.stack.push(s),e===vd?s.value="":r!==void 0&&(s.$infixName=r)}return n(i),o?this.construct():void 0}}extractHiddenTokens(e){let r=this.lexerResult.hidden;if(!r.length)return[];let n=e.startOffset;for(let i=0;i<r.length;i++)if(r[i].startOffset>n)return r.splice(0,i);return r.splice(0,r.length)}consume(e,r,n){let i=this.wrapper.wrapConsume(e,r);if(!this.isRecording()&&this.isValidToken(i)){let o=this.extractHiddenTokens(i);this.nodeBuilder.addHiddenNodes(o);let s=this.nodeBuilder.buildLeafNode(i,n),{assignment:a,crossRef:c}=this.getAssignment(n),l=this.current;if(a){let u=xr(n)?i.image:this.converter.convert(i.image,s);this.assign(a.operator,a.feature,u,s,c)}else if(Sy(l)){let u=i.image;xr(n)||(u=this.converter.convert(u,s).toString()),l.value+=u}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,r,n,i,o){let s;!this.isRecording()&&!n&&(s=this.nodeBuilder.buildCompositeNode(i));let a;try{a=this.wrapper.wrapSubrule(e,r,o)}finally{this.isRecording()||(a===void 0&&!n&&(a=this.construct()),a!==void 0&&s&&s.length>0&&this.performSubruleAssignment(a,i,s))}}performSubruleAssignment(e,r,n){let{assignment:i,crossRef:o}=this.getAssignment(r);if(i)this.assign(i.operator,i.feature,e,n,o);else if(!i){let s=this.current;if(Sy(s))s.value+=e.toString();else if(typeof e=="object"&&e){let c=this.assignWithoutOverride(e,s);this.stack.pop(),this.stack.push(c)}}}action(e,r){if(!this.isRecording()){let n=this.current;if(r.feature&&r.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(n.$cstNode);let o={$type:e};this.stack.push(o),this.assign(r.operator,r.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;let e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):Sy(e)?this.converter.convert(e.value,e.$cstNode):(Kh(this.astReflection,e),e)}constructInfix(e,r){let n=e.parts;if(!Array.isArray(n)||n.length===0)return;let i=e.operators;if(!Array.isArray(i)||n.length<2)return n[0];let o=0,s=-1;for(let y=0;y<i.length;y++){let _=i[y],T=r.get(_)??{precedence:1/0,rightAssoc:!1};T.precedence>s?(s=T.precedence,o=y):T.precedence===s&&(T.rightAssoc||(o=y))}let a=i.slice(0,o),c=i.slice(o+1),l=n.slice(0,o+1),u=n.slice(o+1),f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:a},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:c},p=this.constructInfix(f,r),g=this.constructInfix(d,r);return{$type:e.$type,$cstNode:e.$cstNode,left:p,operator:i[o],right:g}}getAssignment(e){if(!this.assignmentMap.has(e)){let r=_n(e,Or);this.assignmentMap.set(e,{assignment:r,crossRef:r&&Lr(r.terminal)?r.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,r,n,i,o){let s=this.current,a;switch(o==="single"&&typeof n=="string"?a=this.linker.buildReference(s,r,i,n):o==="multi"&&typeof n=="string"?a=this.linker.buildMultiReference(s,r,i,n):a=n,e){case"=":{s[r]=a;break}case"?=":{s[r]=!0;break}case"+=":Array.isArray(s[r])||(s[r]=[]),s[r].push(a)}}assignWithoutOverride(e,r){for(let[i,o]of Object.entries(r)){let s=e[i];s===void 0?e[i]=o:Array.isArray(s)&&Array.isArray(o)&&(o.push(...s),e[i]=o)}let n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},kd=class{buildMismatchTokenMessage(e){return Pn.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Pn.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Pn.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Pn.buildEarlyExitMessage(e)}},Ks=class extends kd{buildMismatchTokenMessage({expected:e,actual:r}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${r.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},cl=class extends sl{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let r=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=r.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,r){let n=this.wrapper.DEFINE_RULE(qw(e.name),this.startImplementation(r).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return r=>{let n=this.keepStackSize();try{e(r)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,r,n){this.wrapper.wrapConsume(e,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,r,n,i,o){this.before(i),this.wrapper.wrapSubrule(e,r,o),this.after(i)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let r=this.elementStack.lastIndexOf(e);r>=0&&this.elementStack.splice(r)}}get currIdx(){return this.wrapper.currIdx}},h1={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Ks},Nd=class extends Hc{constructor(e,r){let n=r&&"maxLookahead"in r;super(e,{...h1,lookaheadStrategy:n?new On({maxLookahead:r.maxLookahead}):new Yc({logging:r.skipValidations?()=>{}:void 0}),...r})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,r,n){return this.RULE(e,r,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,r){return this.consume(e,r,void 0)}wrapSubrule(e,r,n){return this.subrule(e,r,{ARGS:[n]})}wrapOr(e,r){this.or(e,r)}wrapOption(e,r){this.option(e,r)}wrapMany(e,r){this.many(e,r)}wrapAtLeastOne(e,r){this.atLeastOne(e,r)}rule(e){return e.call(this,{})}},Iy=class extends Nd{constructor(e,r,n){super(e,r),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,r,n){this.task.startSubTask(this.ruleName(r));try{return super.subrule(e,r,n)}finally{this.task.stopSubTask(this.ruleName(r))}}};function ll(t,e,r){return m1({parser:e,tokens:r,ruleNames:new Map},t),e}function m1(t,e){let r=wc(e,!1),n=me(e.rules).filter(At).filter(o=>r.has(o));for(let o of n){let s={...t,consume:1,optional:1,subrule:1,many:1,or:1};t.parser.rule(o,Eo(s,o.definition))}let i=me(e.rules).filter(ei).filter(o=>r.has(o));for(let o of i)t.parser.rule(o,g1(t,o))}function g1(t,e){let r=e.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+e.call.rule.$refText);if(jt(r))throw new Error("Cannot use terminal rule in infix expression");let n=e.operators.precedences.flatMap(p=>p.operators),i={$type:"Group",elements:[]},o={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:e.call},s={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(o,s);let c={$container:s,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},l={...o,$container:s};s.elements.push(c,l);let f=n.map(p=>t.tokens[p.value]).map((p,g)=>({ALT:()=>t.parser.consume(g,p,c)})),d;return p=>{d??(d=ky(t,r)),t.parser.subrule(0,d,!1,o,p),t.parser.many(0,{DEF:()=>{t.parser.alternatives(0,f),t.parser.subrule(1,d,!1,l,p)}})}}function Eo(t,e,r=!1){let n;if(xr(e))n=b1(t,e);else if(An(e))n=y1(t,e);else if(Or(e))n=Eo(t,e.terminal);else if(Lr(e))n=Ww(t,e);else if($r(e))n=x1(t,e);else if(tf(e))n=E1(t,e);else if(sf(e))n=_1(t,e);else if(Qn(e))n=R1(t,e);else if(rm(e)){let i=t.consume++;n=()=>t.parser.consume(i,ur,e)}else throw new ro(e.$cstNode,`Unexpected element type: ${e.$type}`);return zw(t,r?void 0:Cd(e),n,e.cardinality)}function y1(t,e){let r=ri(e);return()=>t.parser.action(r,e)}function x1(t,e){let r=e.rule.ref;if(wn(r)){let n=t.subrule++,i=At(r)&&r.fragment,o=e.arguments.length>0?T1(r,e.arguments):()=>({}),s;return a=>{s??(s=ky(t,r)),t.parser.subrule(n,s,i,e,o(a))}}else if(jt(r)){let n=t.consume++,i=vy(t,r.name);return()=>t.parser.consume(n,i,e)}else if(r)tn(r);else throw new ro(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}function T1(t,e){if(e.some(n=>n.calledByName)){let n=e.map(i=>({parameterName:i.parameter?.ref?.name,predicate:an(i.value)}));return i=>{let o={};for(let{parameterName:s,predicate:a}of n)s&&(o[s]=a(i));return o}}else{let n=e.map(i=>an(i.value));return i=>{let o={};for(let s=0;s<n.length;s++)if(s<t.parameters.length){let a=t.parameters[s].name,c=n[s];o[a]=c(i)}return o}}}function an(t){if(tm(t)){let e=an(t.left),r=an(t.right);return n=>e(n)||r(n)}else if(em(t)){let e=an(t.left),r=an(t.right);return n=>e(n)&&r(n)}else if(om(t)){let e=an(t.value);return r=>!e(r)}else if(sm(t)){let e=t.parameter.ref.name;return r=>r!==void 0&&r[e]===!0}else if(Jh(t)){let e=!!t.true;return()=>e}tn(t)}function E1(t,e){if(e.elements.length===1)return Eo(t,e.elements[0]);{let r=[];for(let i of e.elements){let o={ALT:Eo(t,i,!0)},s=Cd(i);s&&(o.GATE=an(s)),r.push(o)}let n=t.or++;return i=>t.parser.alternatives(n,r.map(o=>{let s={ALT:()=>o.ALT(i)},a=o.GATE;return a&&(s.GATE=()=>a(i)),s}))}}function _1(t,e){if(e.elements.length===1)return Eo(t,e.elements[0]);let r=[];for(let a of e.elements){let c={ALT:Eo(t,a,!0)},l=Cd(a);l&&(c.GATE=an(l)),r.push(c)}let n=t.or++,i=(a,c)=>{let l=c.getRuleStack().join("-");return`uGroup_${a}_${l}`},o=a=>t.parser.alternatives(n,r.map((c,l)=>{let u={ALT:()=>!0},f=t.parser;u.ALT=()=>{if(c.ALT(a),!f.isRecording()){let p=i(n,f);f.unorderedGroups.get(p)||f.unorderedGroups.set(p,[]);let g=f.unorderedGroups.get(p);typeof g?.[l]>"u"&&(g[l]=!0)}};let d=c.GATE;return d?u.GATE=()=>d(a):u.GATE=()=>!f.unorderedGroups.get(i(n,f))?.[l],u})),s=zw(t,Cd(e),o,"*");return a=>{s(a),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(n,t.parser))}}function R1(t,e){let r=e.elements.map(n=>Eo(t,n));return n=>r.forEach(i=>i(n))}function Cd(t){if(Qn(t))return t.guardCondition}function Ww(t,e,r=e.terminal){if(r)if($r(r)&&At(r.rule.ref)){let n=r.rule.ref,i=t.subrule++,o;return s=>{o??(o=ky(t,n)),t.parser.subrule(i,o,!1,e,s)}}else if($r(r)&&jt(r.rule.ref)){let n=t.consume++,i=vy(t,r.rule.ref.name);return()=>t.parser.consume(n,i,e)}else if(xr(r)){let n=t.consume++,i=vy(t,r.value);return()=>t.parser.consume(n,i,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);let i=df(e.type.ref)?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+ri(e.type.ref));return Ww(t,e,i)}}function b1(t,e){let r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e)}function zw(t,e,r,n){let i=e&&an(e);if(!n)if(i){let o=t.or++;return s=>t.parser.alternatives(o,[{ALT:()=>r(s),GATE:()=>i(s)},{ALT:qf(),GATE:()=>!i(s)}])}else return r;if(n==="*"){let o=t.many++;return s=>t.parser.many(o,{DEF:()=>r(s),GATE:i?()=>i(s):void 0})}else if(n==="+"){let o=t.many++;if(i){let s=t.or++;return a=>t.parser.alternatives(s,[{ALT:()=>t.parser.atLeastOne(o,{DEF:()=>r(a)}),GATE:()=>i(a)},{ALT:qf(),GATE:()=>!i(a)}])}else return s=>t.parser.atLeastOne(o,{DEF:()=>r(s)})}else if(n==="?"){let o=t.optional++;return s=>t.parser.optional(o,{DEF:()=>r(s),GATE:i?()=>i(s):void 0})}else tn(n)}function ky(t,e){let r=w1(t,e),n=t.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function w1(t,e){if(wn(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,i=e.$type;for(;!At(n);)(Qn(n)||tf(n)||sf(n))&&(i=n.elements.indexOf(r).toString()+":"+i),r=n,n=n.$container;return i=n.name+":"+i,t.ruleNames.set(e,i),i}}function vy(t,e){let r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}function Ny(t){let e=t.Grammar,r=t.parser.Lexer,n=new cl(t);return ll(e,n,r.definition),n.finalize(),n}function Cy(t){let e=Vw(t);return e.finalize(),e}function Vw(t){let e=t.Grammar,r=t.parser.Lexer,n=new al(t);return ll(e,n,r.definition)}var _o=class{constructor(){this.diagnostics=[]}buildTokens(e,r){let n=me(wc(e,!1)),i=this.buildTerminalTokens(n),o=this.buildKeywordTokens(n,i,r);return o.push(...i),o}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(jt).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(e){let r=us(e),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,i={name:e.name,PATTERN:n};return typeof n=="function"&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=bc(r)?st.SKIPPED:"hidden"),i}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s"))}regexPatternFunction(e){let r=new RegExp(e,e.flags+"y");return(n,i)=>(r.lastIndex=i,r.exec(n))}buildKeywordTokens(e,r,n){return e.filter(wn).flatMap(i=>Cr(i).filter(xr)).distinct(i=>i.value).toArray().sort((i,o)=>o.value.length-i.value.length).map(i=>this.buildKeywordToken(i,r,!!n?.caseInsensitive))}buildKeywordToken(e,r,n){let i=this.buildKeywordPattern(e,n),o={name:e.value,PATTERN:i,LONGER_ALT:this.findLongerAlt(e,r)};return typeof i=="function"&&(o.LINE_BREAKS=!0),o}buildKeywordPattern(e,r){return r?new RegExp(ti(e.value),"i"):e.value}findLongerAlt(e,r){return r.reduce((n,i)=>{let o=i?.PATTERN;return o?.source&&wm("^"+o.source+"$",e.value)&&n.push(i),n},[])}};var Ro=class{convert(e,r){let n=r.grammarSource;if(Lr(n)&&(n=Im(n)),$r(n)){let i=n.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,r)}return e}runConverter(e,r,n){switch(e.name.toUpperCase()){case"INT":return cn.convertInt(r);case"STRING":return cn.convertString(r);case"ID":return cn.convertID(r)}switch(Lm(e)?.toLowerCase()){case"number":return cn.convertNumber(r);case"boolean":return cn.convertBoolean(r);case"bigint":return cn.convertBigint(r);case"date":return cn.convertDate(r);default:return r}}},cn;(function(t){function e(l){let u="";for(let f=1;f<l.length-1;f++){let d=l.charAt(f);if(d==="\\"){let p=l.charAt(++f);u+=r(p)}else u+=d}return u}t.convertString=e;function r(l){switch(l){case"b":return"\b";case"f":return"\f";case"n":return`
|
|
151
|
+
`;case"r":return"\r";case"t":return" ";case"v":return"\v";case"0":return"\0";default:return l}}function n(l){return l.charAt(0)==="^"?l.substring(1):l}t.convertID=n;function i(l){return parseInt(l)}t.convertInt=i;function o(l){return BigInt(l)}t.convertBigint=o;function s(l){return new Date(l)}t.convertDate=s;function a(l){return Number(l)}t.convertNumber=a;function c(l){return l.toLowerCase()==="true"}t.convertBoolean=c})(cn||(cn={}));var re={};Ae(re,qh(ul(),1));function Fy(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}var $d=0,Jw=10;function Dd(){return $d=performance.now(),new re.CancellationTokenSource}function Qw(t){Jw=t}var Er=Symbol("OperationCancelled");function ln(t){return t===Er}async function pt(t){if(t===re.CancellationToken.None)return;let e=performance.now();if(e-$d>=Jw&&($d=e,await Fy(),$d=performance.now()),t.isCancellationRequested)throw Er}var Kt=class{constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this)})}};var Md=class t{constructor(e,r,n,i){this._uri=e,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(let n of e)if(t.isIncremental(n)){let i=rA(n.range),o=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,o)+n.text+this._content.substring(s,this._content.length);let a=Math.max(i.start.line,0),c=Math.max(i.end.line,0),l=this._lineOffsets,u=eA(n.text,!1,o);if(c-a===u.length)for(let d=0,p=u.length;d<p;d++)l[d+a+1]=u[d];else u.length<1e4?l.splice(a+1,c-a,...u):this._lineOffsets=l=l.slice(0,a+1).concat(u,l.slice(c+1));let f=n.text.length-(s-o);if(f!==0)for(let d=a+1+u.length,p=l.length;d<p;d++)l[d]=l[d]+f}else if(t.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=eA(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return{line:0,character:e};for(;n<i;){let s=Math.floor((n+i)/2);r[s]>e?i=s:n=s+1}let o=n-1;return e=this.ensureBeforeEOL(e,r[o]),{line:o,character:e-r[o]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line];if(e.character<=0)return n;let i=e.line+1<r.length?r[e.line+1]:this._content.length,o=Math.min(n+e.character,i);return this.ensureBeforeEOL(o,n)}ensureBeforeEOL(e,r){for(;e>r&&tA(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}},Qs;(function(t){function e(i,o,s,a){return new Md(i,o,s,a)}t.create=e;function r(i,o,s){if(i instanceof Md)return i.update(o,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=r;function n(i,o){let s=i.getText(),a=Uy(o.map(L1),(u,f)=>{let d=u.range.start.line-f.range.start.line;return d===0?u.range.start.character-f.range.start.character:d}),c=0,l=[];for(let u of a){let f=i.offsetAt(u.range.start);if(f<c)throw new Error("Overlapping edit");f>c&&l.push(s.substring(c,f)),u.newText.length&&l.push(u.newText),c=i.offsetAt(u.range.end)}return l.push(s.substr(c)),l.join("")}t.applyEdits=n})(Qs||(Qs={}));function Uy(t,e){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),i=t.slice(r);Uy(n,e),Uy(i,e);let o=0,s=0,a=0;for(;o<n.length&&s<i.length;)e(n[o],i[s])<=0?t[a++]=n[o++]:t[a++]=i[s++];for(;o<n.length;)t[a++]=n[o++];for(;s<i.length;)t[a++]=i[s++];return t}function eA(t,e,r=0){let n=e?[r]:[];for(let i=0;i<t.length;i++){let o=t.charCodeAt(i);tA(o)&&(o===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,n.push(r+i+1))}return n}function tA(t){return t===13||t===10}function rA(t){let e=t.start,r=t.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function L1(t){let e=rA(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var nA;(()=>{"use strict";var t={975:O=>{function w(A){if(typeof A!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(A))}function L(A,S){for(var v,B="",H=0,$=-1,J=0,K=0;K<=A.length;++K){if(K<A.length)v=A.charCodeAt(K);else{if(v===47)break;v=47}if(v===47){if(!($===K-1||J===1))if($!==K-1&&J===2){if(B.length<2||H!==2||B.charCodeAt(B.length-1)!==46||B.charCodeAt(B.length-2)!==46){if(B.length>2){var _e=B.lastIndexOf("/");if(_e!==B.length-1){_e===-1?(B="",H=0):H=(B=B.slice(0,_e)).length-1-B.lastIndexOf("/"),$=K,J=0;continue}}else if(B.length===2||B.length===1){B="",H=0,$=K,J=0;continue}}S&&(B.length>0?B+="/..":B="..",H=2)}else B.length>0?B+="/"+A.slice($+1,K):B=A.slice($+1,K),H=K-$-1;$=K,J=0}else v===46&&J!==-1?++J:J=-1}return B}var M={resolve:function(){for(var A,S="",v=!1,B=arguments.length-1;B>=-1&&!v;B--){var H;B>=0?H=arguments[B]:(A===void 0&&(A=process.cwd()),H=A),w(H),H.length!==0&&(S=H+"/"+S,v=H.charCodeAt(0)===47)}return S=L(S,!v),v?S.length>0?"/"+S:"/":S.length>0?S:"."},normalize:function(A){if(w(A),A.length===0)return".";var S=A.charCodeAt(0)===47,v=A.charCodeAt(A.length-1)===47;return(A=L(A,!S)).length!==0||S||(A="."),A.length>0&&v&&(A+="/"),S?"/"+A:A},isAbsolute:function(A){return w(A),A.length>0&&A.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var A,S=0;S<arguments.length;++S){var v=arguments[S];w(v),v.length>0&&(A===void 0?A=v:A+="/"+v)}return A===void 0?".":M.normalize(A)},relative:function(A,S){if(w(A),w(S),A===S||(A=M.resolve(A))===(S=M.resolve(S)))return"";for(var v=1;v<A.length&&A.charCodeAt(v)===47;++v);for(var B=A.length,H=B-v,$=1;$<S.length&&S.charCodeAt($)===47;++$);for(var J=S.length-$,K=H<J?H:J,_e=-1,V=0;V<=K;++V){if(V===K){if(J>K){if(S.charCodeAt($+V)===47)return S.slice($+V+1);if(V===0)return S.slice($+V)}else H>K&&(A.charCodeAt(v+V)===47?_e=V:V===0&&(_e=0));break}var he=A.charCodeAt(v+V);if(he!==S.charCodeAt($+V))break;he===47&&(_e=V)}var it="";for(V=v+_e+1;V<=B;++V)V!==B&&A.charCodeAt(V)!==47||(it.length===0?it+="..":it+="/..");return it.length>0?it+S.slice($+_e):($+=_e,S.charCodeAt($)===47&&++$,S.slice($))},_makeLong:function(A){return A},dirname:function(A){if(w(A),A.length===0)return".";for(var S=A.charCodeAt(0),v=S===47,B=-1,H=!0,$=A.length-1;$>=1;--$)if((S=A.charCodeAt($))===47){if(!H){B=$;break}}else H=!1;return B===-1?v?"/":".":v&&B===1?"//":A.slice(0,B)},basename:function(A,S){if(S!==void 0&&typeof S!="string")throw new TypeError('"ext" argument must be a string');w(A);var v,B=0,H=-1,$=!0;if(S!==void 0&&S.length>0&&S.length<=A.length){if(S.length===A.length&&S===A)return"";var J=S.length-1,K=-1;for(v=A.length-1;v>=0;--v){var _e=A.charCodeAt(v);if(_e===47){if(!$){B=v+1;break}}else K===-1&&($=!1,K=v+1),J>=0&&(_e===S.charCodeAt(J)?--J==-1&&(H=v):(J=-1,H=K))}return B===H?H=K:H===-1&&(H=A.length),A.slice(B,H)}for(v=A.length-1;v>=0;--v)if(A.charCodeAt(v)===47){if(!$){B=v+1;break}}else H===-1&&($=!1,H=v+1);return H===-1?"":A.slice(B,H)},extname:function(A){w(A);for(var S=-1,v=0,B=-1,H=!0,$=0,J=A.length-1;J>=0;--J){var K=A.charCodeAt(J);if(K!==47)B===-1&&(H=!1,B=J+1),K===46?S===-1?S=J:$!==1&&($=1):S!==-1&&($=-1);else if(!H){v=J+1;break}}return S===-1||B===-1||$===0||$===1&&S===B-1&&S===v+1?"":A.slice(S,B)},format:function(A){if(A===null||typeof A!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof A);return(function(S,v){var B=v.dir||v.root,H=v.base||(v.name||"")+(v.ext||"");return B?B===v.root?B+H:B+"/"+H:H})(0,A)},parse:function(A){w(A);var S={root:"",dir:"",base:"",ext:"",name:""};if(A.length===0)return S;var v,B=A.charCodeAt(0),H=B===47;H?(S.root="/",v=1):v=0;for(var $=-1,J=0,K=-1,_e=!0,V=A.length-1,he=0;V>=v;--V)if((B=A.charCodeAt(V))!==47)K===-1&&(_e=!1,K=V+1),B===46?$===-1?$=V:he!==1&&(he=1):$!==-1&&(he=-1);else if(!_e){J=V+1;break}return $===-1||K===-1||he===0||he===1&&$===K-1&&$===J+1?K!==-1&&(S.base=S.name=J===0&&H?A.slice(1,K):A.slice(J,K)):(J===0&&H?(S.name=A.slice(1,$),S.base=A.slice(1,K)):(S.name=A.slice(J,$),S.base=A.slice(J,K)),S.ext=A.slice($,K)),J>0?S.dir=A.slice(0,J-1):H&&(S.dir="/"),S},sep:"/",delimiter:":",win32:null,posix:null};M.posix=M,O.exports=M}},e={};function r(O){var w=e[O];if(w!==void 0)return w.exports;var L=e[O]={exports:{}};return t[O](L,L.exports,r),L.exports}r.d=(O,w)=>{for(var L in w)r.o(w,L)&&!r.o(O,L)&&Object.defineProperty(O,L,{enumerable:!0,get:w[L]})},r.o=(O,w)=>Object.prototype.hasOwnProperty.call(O,w),r.r=O=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})};var n={};let i;r.r(n),r.d(n,{URI:()=>d,Utils:()=>Ee}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let o=/^\w[\w\d+.-]*$/,s=/^\//,a=/^\/\//;function c(O,w){if(!O.scheme&&w)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${O.authority}", path: "${O.path}", query: "${O.query}", fragment: "${O.fragment}"}`);if(O.scheme&&!o.test(O.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(O.path){if(O.authority){if(!s.test(O.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(O.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let l="",u="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{constructor(w,L,M,A,S,v=!1){se(this,"scheme");se(this,"authority");se(this,"path");se(this,"query");se(this,"fragment");typeof w=="object"?(this.scheme=w.scheme||l,this.authority=w.authority||l,this.path=w.path||l,this.query=w.query||l,this.fragment=w.fragment||l):(this.scheme=(function(B,H){return B||H?B:"file"})(w,v),this.authority=L||l,this.path=(function(B,H){switch(B){case"https":case"http":case"file":H?H[0]!==u&&(H=u+H):H=u}return H})(this.scheme,M||l),this.query=A||l,this.fragment=S||l,c(this,v))}static isUri(w){return w instanceof d||!!w&&typeof w.authority=="string"&&typeof w.fragment=="string"&&typeof w.path=="string"&&typeof w.query=="string"&&typeof w.scheme=="string"&&typeof w.fsPath=="string"&&typeof w.with=="function"&&typeof w.toString=="function"}get fsPath(){return R(this,!1)}with(w){if(!w)return this;let{scheme:L,authority:M,path:A,query:S,fragment:v}=w;return L===void 0?L=this.scheme:L===null&&(L=l),M===void 0?M=this.authority:M===null&&(M=l),A===void 0?A=this.path:A===null&&(A=l),S===void 0?S=this.query:S===null&&(S=l),v===void 0?v=this.fragment:v===null&&(v=l),L===this.scheme&&M===this.authority&&A===this.path&&S===this.query&&v===this.fragment?this:new g(L,M,A,S,v)}static parse(w,L=!1){let M=f.exec(w);return M?new g(M[2]||l,P(M[4]||l),P(M[5]||l),P(M[7]||l),P(M[9]||l),L):new g(l,l,l,l,l)}static file(w){let L=l;if(i&&(w=w.replace(/\\/g,u)),w[0]===u&&w[1]===u){let M=w.indexOf(u,2);M===-1?(L=w.substring(2),w=u):(L=w.substring(2,M),w=w.substring(M)||u)}return new g("file",L,w,l,l)}static from(w){let L=new g(w.scheme,w.authority,w.path,w.query,w.fragment);return c(L,!0),L}toString(w=!1){return E(this,w)}toJSON(){return this}static revive(w){if(w){if(w instanceof d)return w;{let L=new g(w);return L._formatted=w.external,L._fsPath=w._sep===p?w.fsPath:null,L}}return w}}let p=i?1:void 0;class g extends d{constructor(){super(...arguments);se(this,"_formatted",null);se(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=R(this,!1)),this._fsPath}toString(L=!1){return L?E(this,!0):(this._formatted||(this._formatted=E(this,!1)),this._formatted)}toJSON(){let L={$mid:1};return this._fsPath&&(L.fsPath=this._fsPath,L._sep=p),this._formatted&&(L.external=this._formatted),this.path&&(L.path=this.path),this.scheme&&(L.scheme=this.scheme),this.authority&&(L.authority=this.authority),this.query&&(L.query=this.query),this.fragment&&(L.fragment=this.fragment),L}}let y={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function _(O,w,L){let M,A=-1;for(let S=0;S<O.length;S++){let v=O.charCodeAt(S);if(v>=97&&v<=122||v>=65&&v<=90||v>=48&&v<=57||v===45||v===46||v===95||v===126||w&&v===47||L&&v===91||L&&v===93||L&&v===58)A!==-1&&(M+=encodeURIComponent(O.substring(A,S)),A=-1),M!==void 0&&(M+=O.charAt(S));else{M===void 0&&(M=O.substr(0,S));let B=y[v];B!==void 0?(A!==-1&&(M+=encodeURIComponent(O.substring(A,S)),A=-1),M+=B):A===-1&&(A=S)}}return A!==-1&&(M+=encodeURIComponent(O.substring(A))),M!==void 0?M:O}function T(O){let w;for(let L=0;L<O.length;L++){let M=O.charCodeAt(L);M===35||M===63?(w===void 0&&(w=O.substr(0,L)),w+=y[M]):w!==void 0&&(w+=O[L])}return w!==void 0?w:O}function R(O,w){let L;return L=O.authority&&O.path.length>1&&O.scheme==="file"?`//${O.authority}${O.path}`:O.path.charCodeAt(0)===47&&(O.path.charCodeAt(1)>=65&&O.path.charCodeAt(1)<=90||O.path.charCodeAt(1)>=97&&O.path.charCodeAt(1)<=122)&&O.path.charCodeAt(2)===58?w?O.path.substr(1):O.path[1].toLowerCase()+O.path.substr(2):O.path,i&&(L=L.replace(/\//g,"\\")),L}function E(O,w){let L=w?T:_,M="",{scheme:A,authority:S,path:v,query:B,fragment:H}=O;if(A&&(M+=A,M+=":"),(S||A==="file")&&(M+=u,M+=u),S){let $=S.indexOf("@");if($!==-1){let J=S.substr(0,$);S=S.substr($+1),$=J.lastIndexOf(":"),$===-1?M+=L(J,!1,!1):(M+=L(J.substr(0,$),!1,!1),M+=":",M+=L(J.substr($+1),!1,!0)),M+="@"}S=S.toLowerCase(),$=S.lastIndexOf(":"),$===-1?M+=L(S,!1,!0):(M+=L(S.substr(0,$),!1,!0),M+=S.substr($))}if(v){if(v.length>=3&&v.charCodeAt(0)===47&&v.charCodeAt(2)===58){let $=v.charCodeAt(1);$>=65&&$<=90&&(v=`/${String.fromCharCode($+32)}:${v.substr(3)}`)}else if(v.length>=2&&v.charCodeAt(1)===58){let $=v.charCodeAt(0);$>=65&&$<=90&&(v=`${String.fromCharCode($+32)}:${v.substr(2)}`)}M+=L(v,!0,!1)}return B&&(M+="?",M+=L(B,!1,!1)),H&&(M+="#",M+=w?H:_(H,!1,!1)),M}function k(O){try{return decodeURIComponent(O)}catch{return O.length>3?O.substr(0,3)+k(O.substr(3)):O}}let D=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function P(O){return O.match(D)?O.replace(D,(w=>k(w))):O}var j=r(975);let q=j.posix||j,le="/";var Ee;(function(O){O.joinPath=function(w,...L){return w.with({path:q.join(w.path,...L)})},O.resolvePath=function(w,...L){let M=w.path,A=!1;M[0]!==le&&(M=le+M,A=!0);let S=q.resolve(M,...L);return A&&S[0]===le&&!w.authority&&(S=S.substring(1)),w.with({path:S})},O.dirname=function(w){if(w.path.length===0||w.path===le)return w;let L=q.dirname(w.path);return L.length===1&&L.charCodeAt(0)===46&&(L=""),w.with({path:L})},O.basename=function(w){return q.basename(w.path)},O.extname=function(w){return q.extname(w.path)}})(Ee||(Ee={})),nA=n})();var{URI:ht,Utils:ea}=nA;var xt;(function(t){t.basename=ea.basename,t.dirname=ea.dirname,t.extname=ea.extname,t.joinPath=ea.joinPath,t.resolvePath=ea.resolvePath;let e=typeof process=="object"&&process?.platform==="win32";function r(s,a){return s?.toString()===a?.toString()}t.equals=r;function n(s,a){let c=typeof s=="string"?ht.parse(s).path:s.path,l=typeof a=="string"?ht.parse(a).path:a.path,u=c.split("/").filter(y=>y.length>0),f=l.split("/").filter(y=>y.length>0);if(e){let y=/^[A-Z]:$/;if(u[0]&&y.test(u[0])&&(u[0]=u[0].toLowerCase()),f[0]&&y.test(f[0])&&(f[0]=f[0].toLowerCase()),u[0]!==f[0])return l.substring(1)}let d=0;for(;d<u.length&&u[d]===f[d];d++);let p="../".repeat(u.length-d),g=f.slice(d).join("/");return p+g}t.relative=n;function i(s){return ht.parse(s.toString()).toString()}t.normalize=i;function o(s,a){let c=typeof s=="string"?s:s.path,l=typeof a=="string"?a:a.path;return l.charAt(l.length-1)==="/"&&(l=l.slice(0,-1)),c.charAt(c.length-1)==="/"&&(c=c.slice(0,-1)),l===c?!0:l.length<c.length||l.charAt(c.length)!=="/"?!1:l.startsWith(c)}t.contains=o})(xt||(xt={}));var ta=class{constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return xt.normalize(e)}clear(){this.root.children.clear()}insert(e,r){let n=this.getNode(this.normalizeUri(e),!0);n.element=r}delete(e){let r=this.getNode(this.normalizeUri(e),!1);r?.parent&&r.parent.children.delete(r.name)}has(e){return this.getNode(this.normalizeUri(e),!1)?.element!==void 0}hasNode(e){return this.getNode(this.normalizeUri(e),!1)!==void 0}find(e){return this.getNode(this.normalizeUri(e),!1)?.element}findNode(e){let r=this.normalizeUri(e),n=this.getNode(r,!1);if(n)return{name:n.name,uri:xt.joinPath(ht.parse(r),n.name).toString(),element:n.element}}findChildren(e){let r=this.normalizeUri(e),n=this.getNode(r,!1);return n?Array.from(n.children.values()).map(i=>({name:i.name,uri:xt.joinPath(ht.parse(r),i.name).toString(),element:i.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let r=this.getNode(xt.normalize(e),!1);return r?this.collectValues(r):[]}getNode(e,r){let n=e.split("/");e.charAt(e.length-1)==="/"&&n.pop();let i=this.root;for(let o of n){let s=i.children.get(o);if(!s)if(r)s={name:o,children:new Map,parent:i},i.children.set(o,s);else return;i=s}return i}collectValues(e){let r=[];e.element&&r.push(e.element);for(let n of e.children.values())r.push(...this.collectValues(n));return r}};var pe;(function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"})(pe||(pe={}));var fl=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,r=re.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,r)}fromTextDocument(e,r,n){return r=r??ht.parse(e.uri),re.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromString(e,r,n){return re.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromModel(e,r){return this.create(r,{$model:e})}create(e,r,n){if(typeof r=="string"){let i=this.parse(e,r,n);return this.createLangiumDocument(i,e,void 0,r)}else if("$model"in r){let i={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(i,e)}else{let i=this.parse(e,r.getText(),n);return this.createLangiumDocument(i,e,r)}}async createAsync(e,r,n){if(typeof r=="string"){let i=await this.parseAsync(e,r,n);return this.createLangiumDocument(i,e,void 0,r)}else{let i=await this.parseAsync(e,r.getText(),n);return this.createLangiumDocument(i,e,r)}}createLangiumDocument(e,r,n,i){let o;if(n)o={parseResult:e,uri:r,state:pe.Parsed,references:[],textDocument:n};else{let s=this.createTextDocumentGetter(r,i);o={parseResult:e,uri:r,state:pe.Parsed,references:[],get textDocument(){return s()}}}return e.value.$document=o,o}async update(e,r){let n=e.parseResult.value.$cstNode?.root.fullText,i=this.textDocuments?.get(e.uri.toString()),o=i?i.getText():await this.fileSystemProvider.readFile(e.uri);if(i)Object.defineProperty(e,"textDocument",{value:i});else{let s=this.createTextDocumentGetter(e.uri,o);Object.defineProperty(e,"textDocument",{get:s})}return n!==o&&(e.parseResult=await this.parseAsync(e.uri,o,r),e.parseResult.value.$document=e),e.state=pe.Parsed,e}parse(e,r,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(r,n)}parseAsync(e,r,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(r,n)}createTextDocumentGetter(e,r){let n=this.serviceRegistry,i;return()=>i??(i=Qs.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r??""))}},dl=class{constructor(e){this.documentTrie=new ta,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return me(this.documentTrie.all())}addDocument(e){let r=e.uri.toString();if(this.documentTrie.has(r))throw new Error(`A document with the URI '${r}' is already present.`);this.documentTrie.insert(r,e)}getDocument(e){let r=e.toString();return this.documentTrie.find(r)}getDocuments(e){let r=e.toString();return this.documentTrie.findAll(r)}async getOrCreateDocument(e,r){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,r),this.addDocument(n),n)}createDocument(e,r,n){if(n)return this.langiumDocumentFactory.fromString(r,e,n).then(i=>(this.addDocument(i),i));{let i=this.langiumDocumentFactory.fromString(r,e);return this.addDocument(i),i}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let r=e.toString(),n=this.documentTrie.find(r);return n&&this.documentBuilder().resetToState(n,pe.Changed),n}deleteDocument(e){let r=e.toString(),n=this.documentTrie.find(r);return n&&(n.state=pe.Changed,this.documentTrie.delete(r)),n}deleteDocuments(e){let r=e.toString(),n=this.documentTrie.findAll(r);for(let i of n)i.state=pe.Changed;return this.documentTrie.delete(r),n}};var wo=Symbol("RefResolving"),pl=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,r=re.CancellationToken.None){if(this.profiler?.isActive("linking")){let n=this.profiler.createTask("linking",this.languageId);n.start();try{for(let i of Ht(e.parseResult.value))await pt(r),zn(i).forEach(o=>{let s=`${i.$type}:${o.property}`;n.startSubTask(s);try{this.doLink(o,e)}finally{n.stopSubTask(s)}})}finally{n.stop()}}else for(let n of Ht(e.parseResult.value))await pt(r),zn(n).forEach(i=>this.doLink(i,e))}doLink(e,r){let n=e.reference;if("_ref"in n&&n._ref===void 0){n._ref=wo;try{let i=this.getCandidate(e);if(Gi(i))n._ref=i;else{n._nodeDescription=i;let o=this.loadAstNode(i);n._ref=o??this.createLinkingError(e,i)}}catch(i){console.error(`An error occurred while resolving reference to '${n.$refText}':`,i);let o=i.message??String(i);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${o}`}}r.references.push(n)}else if("_items"in n&&n._items===void 0){n._items=wo;try{let i=this.getCandidates(e),o=[];if(Gi(i))n._linkingError=i;else for(let s of i){let a=this.loadAstNode(s);a&&o.push({ref:a,$nodeDescription:s})}n._items=o}catch(i){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${i}`},n._items=[]}r.references.push(n)}}unlink(e){for(let r of e.references)"_ref"in r?(r._ref=void 0,delete r._nodeDescription):"_items"in r&&(r._items=void 0,delete r._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let n=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(i=>`${i.documentUri}#${i.path}`).toArray();return n.length>0?n:this.createLinkingError(e)}buildReference(e,r,n,i){let o=this,s={$refNode:n,$refText:i,_ref:void 0,get ref(){if(dt(this._ref))return this._ref;if(Wh(this._nodeDescription)){let a=o.loadAstNode(this._nodeDescription);this._ref=a??o.createLinkingError({reference:s,container:e,property:r},this._nodeDescription)}else if(this._ref===void 0){this._ref=wo;let a=Qo(e).$document,c=o.getLinkedNode({reference:s,container:e,property:r});if(c.error&&a&&a.state<pe.ComputedScopes)return this._ref=void 0;this._ref=c.node??c.error,this._nodeDescription=c.descr,a?.references.push(this)}else this._ref===wo&&o.throwCyclicReferenceError(e,r,i);return dt(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return Gi(this._ref)?this._ref:void 0}};return s}buildMultiReference(e,r,n,i){let o=this,s={$refNode:n,$refText:i,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(this._items===void 0){this._items=wo;let a=Qo(e).$document,c=o.getCandidates({reference:s,container:e,property:r}),l=[];if(Gi(c))this._linkingError=c;else for(let u of c){let f=o.loadAstNode(u);f&&l.push({ref:f,$nodeDescription:u})}this._items=l,a?.references.push(this)}else this._items===wo&&o.throwCyclicReferenceError(e,r,i);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;if(!(this.items.length>0))return this._linkingError=o.createLinkingError({reference:s,container:e,property:r})}};return s}throwCyclicReferenceError(e,r,n){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${r} (symbol '${n}')`)}getLinkedNode(e){try{let r=this.getCandidate(e);if(Gi(r))return{error:r};let n=this.loadAstNode(r);return n?{node:n,descr:r}:{descr:r,error:this.createLinkingError(e,r)}}catch(r){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,r);let n=r.message??String(r);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;let r=this.langiumDocuments().getDocument(e.documentUri);if(r)return this.astNodeLocator.getAstNode(r.parseResult.value,e.path)}createLinkingError(e,r){let n=Qo(e.container).$document;n&&n.state<pe.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`);let i=this.reflection.getReferenceType(e);return{info:e,message:`Could not resolve reference to ${i} named '${e.reference.$refText}'.`,targetDescription:r}}};function iA(t){return typeof t.name=="string"}var hl=class{getName(e){if(iA(e))return e.name}getNameNode(e){return Ac(e.$cstNode,"name")}};var ml=class{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=Ht(e.Grammar).some(r=>Lr(r)&&r.isMulti)}findDeclarations(e){if(e){let r=Om(e),n=e.astNode;if(r&&n){let i=n[r.feature];if(Rt(i)||sr(i))return Bu(i);if(Array.isArray(i)){for(let o of i)if((Rt(o)||sr(o))&&o.$refNode&&o.$refNode.offset<=e.offset&&o.$refNode.end>=e.end)return Bu(o)}}if(n){let i=this.nameProvider.getNameNode(n);if(i&&(i===e||gm(e,i)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(r.head());if(n){for(let i of zn(n))if(sr(i.reference)&&i.reference.items.some(o=>o.ref===e))return i.reference.items.map(o=>o.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;let r=this.documents.getDocument(e.sourceUri);if(r)return this.nodeLocator.getAstNode(r.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let r=this.findDeclarations(e),n=[];for(let i of r){let o=this.nameProvider.getNameNode(i)??i.$cstNode;o&&n.push(o)}return n}findReferences(e,r){let n=[];r.includeDeclaration&&n.push(...this.getSelfReferences(e));let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return r.documentUri&&(i=i.filter(o=>xt.equals(o.sourceUri,r.documentUri))),n.push(...i),me(n)}getSelfReferences(e){let r=this.getSelfNodes(e),n=[];for(let i of r){let o=this.nameProvider.getNameNode(i);if(o){let s=Mt(i),a=this.nodeLocator.getAstNodePath(i);n.push({sourceUri:s.uri,sourcePath:a,targetUri:s.uri,targetPath:a,segment:to(o),local:!0})}}return n}};var Ut=class{constructor(e){if(this.map=new Map,e)for(let[r,n]of e)this.add(r,n)}get size(){return Zo.sum(me(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,r){if(r===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let i=n.indexOf(r);if(i>=0)return n.length===1?this.map.delete(e):n.splice(i,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let r=this.map.get(e);return r?me(r):Wn}has(e,r){if(r===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(r)>=0:!1}}add(e,r){return this.map.has(e)?this.map.get(e).push(r):this.map.set(e,[r]),this}addAll(e,r){return this.map.has(e)?this.map.get(e).push(...r):this.map.set(e,Array.from(r)),this}forEach(e){this.map.forEach((r,n)=>r.forEach(i=>e(i,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return me(this.map.entries()).flatMap(([e,r])=>r.map(n=>[e,n]))}keys(){return me(this.map.keys())}values(){return me(this.map.values()).flat()}entriesGroupedByKey(){return me(this.map.entries())}},Ao=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[r,n]of e)this.set(r,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,r){return this.map.set(e,r),this.inverse.set(r,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let r=this.map.get(e);return r!==void 0?(this.map.delete(e),this.inverse.delete(r),!0):!1}};var gl=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,r=re.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,r)}async collectExportedSymbolsForNode(e,r,n=cc,i=re.CancellationToken.None){let o=[];this.addExportedSymbol(e,o,r);for(let s of n(e))await pt(i),this.addExportedSymbol(s,o,r);return o}addExportedSymbol(e,r,n){let i=this.nameProvider.getName(e);i&&r.push(this.descriptions.createDescription(e,i,n))}async collectLocalSymbols(e,r=re.CancellationToken.None){let n=e.parseResult.value,i=new Ut;for(let o of Cr(n))await pt(r),this.addLocalSymbol(o,e,i);return i}addLocalSymbol(e,r,n){let i=e.$container;if(i){let o=this.nameProvider.getName(e);o&&n.add(i,this.descriptions.createDescription(e,o,r))}}};var ra=class{constructor(e,r,n){this.elements=e,this.outerScope=r,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let r=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(i=>i.name.toLowerCase()===r):this.elements.find(i=>i.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let r=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(i=>i.name.toLowerCase()===r):this.elements.filter(i=>i.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}},By=class{constructor(e,r,n){this.elements=new Map,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let i of e){let o=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.set(o,i)}this.outerScope=r}getElement(e){let r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r),i=n?[n]:[];return(this.concatOuterScope||i.length>0)&&this.outerScope?me(i).concat(this.outerScope.getElements(e)):me(i)}getAllElements(){let e=me(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},yl=class{constructor(e,r,n){this.elements=new Ut,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let i of e){let o=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.add(o,i)}this.outerScope=r}getElement(e){let r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r)[0];if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);return(this.concatOuterScope||n.length===0)&&this.outerScope?me(n).concat(this.outerScope.getElements(e)):me(n)}getAllElements(){let e=me(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},$1={getElement(){},getElements(){return Wn},getAllElements(){return Wn}};var na=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},xl=class extends na{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,r){this.throwIfDisposed(),this.cache.set(e,r)}get(e,r){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(r){let n=r();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},So=class extends na{constructor(e){super(),this.cache=new Map,this.converter=e??(r=>r)}has(e,r){return this.throwIfDisposed(),this.cacheForContext(e).has(r)}set(e,r,n){this.throwIfDisposed(),this.cacheForContext(e).set(r,n)}get(e,r,n){this.throwIfDisposed();let i=this.cacheForContext(e);if(i.has(r))return i.get(r);if(n){let o=n();return i.set(r,o),o}else return}delete(e,r){return this.throwIfDisposed(),this.cacheForContext(e).delete(r)}clear(e){if(this.throwIfDisposed(),e){let r=this.converter(e);this.cache.delete(r)}else this.cache.clear()}cacheForContext(e){let r=this.converter(e),n=this.cache.get(r);return n||(n=new Map,this.cache.set(r,n)),n}},Fd=class extends So{constructor(e,r){super(n=>n.toString()),r?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(r,n=>{this.clear(n.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,i)=>{for(let o of i)this.clear(o)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,i)=>{let o=n.concat(i);for(let s of o)this.clear(s)}))}},ia=class extends xl{constructor(e,r){super(),r?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(r,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,i)=>{i.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}};var Tl=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new ia(e.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=Mt(e.container).localSymbols;if(i){let s=e.container;do i.has(s)&&r.push(i.getStream(s).filter(a=>this.reflection.isSubtype(a.type,n))),s=s.$container;while(s)}let o=this.getGlobalScope(n,e);for(let s=r.length-1;s>=0;s--)o=this.createScope(r[s],o);return o}createScope(e,r,n){return new ra(me(e),r,n)}createScopeForNodes(e,r,n){let i=me(e).map(o=>{let s=this.nameProvider.getName(o);if(s)return this.descriptions.createDescription(o,s)}).nonNullable();return new ra(i,r,n)}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new yl(this.indexManager.allElements(e)))}};function Xy(t){return typeof t.$comment=="string"}function oA(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}var El=class{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,r){let n=r??{},i=r?.replacer,o=(a,c)=>this.replacer(a,c,n),s=i?(a,c)=>i(a,c,o):o;try{return this.currentDocument=Mt(e),JSON.stringify(e,s,r?.space)}finally{this.currentDocument=void 0}}deserialize(e,r){let n=r??{},i=JSON.parse(e);return this.linkNode(i,i,n),i}replacer(e,r,{refText:n,sourceText:i,textRegions:o,comments:s,uriConverter:a}){if(!this.ignoreProperties.has(e))if(Rt(r)){let c=r.ref,l=n?r.$refText:void 0;if(c){let u=Mt(c),f="";this.currentDocument&&this.currentDocument!==u&&(a?f=a(u.uri,c):f=u.uri.toString());let d=this.astNodeLocator.getAstNodePath(c);return{$ref:`${f}#${d}`,$refText:l}}else return{$error:r.error?.message??"Could not resolve reference",$refText:l}}else if(sr(r)){let c=n?r.$refText:void 0,l=[];for(let u of r.items){let f=u.ref,d=Mt(u.ref),p="";this.currentDocument&&this.currentDocument!==d&&(a?p=a(d.uri,f):p=d.uri.toString());let g=this.astNodeLocator.getAstNodePath(f);l.push(`${p}#${g}`)}return{$refs:l,$refText:c}}else if(dt(r)){let c;if(o&&(c=this.addAstNodeRegionWithAssignmentsTo({...r}),(!e||r.$document)&&c?.$textRegion&&(c.$textRegion.documentURI=this.currentDocument?.uri.toString())),i&&!e&&(c??(c={...r}),c.$sourceText=r.$cstNode?.text),s){c??(c={...r});let l=this.commentProvider.getComment(r);l&&(c.$comment=l.replace(/\r/g,""))}return c??r}else return r}addAstNodeRegionWithAssignmentsTo(e){let r=n=>({offset:n.offset,end:n.end,length:n.length,range:n.range});if(e.$cstNode){let n=e.$textRegion=r(e.$cstNode),i=n.assignments={};return Object.keys(e).filter(o=>!o.startsWith("$")).forEach(o=>{let s=km(e.$cstNode,o).map(r);s.length!==0&&(i[o]=s)}),e}}linkNode(e,r,n,i,o,s){for(let[c,l]of Object.entries(e))if(Array.isArray(l))for(let u=0;u<l.length;u++){let f=l[u];oA(f)?l[u]=this.reviveReference(e,c,r,f,n):dt(f)&&this.linkNode(f,r,n,e,c,u)}else oA(l)?e[c]=this.reviveReference(e,c,r,l,n):dt(l)&&this.linkNode(l,r,n,e,c);let a=e;a.$container=i,a.$containerProperty=o,a.$containerIndex=s}reviveReference(e,r,n,i,o){let s=i.$refText,a=i.$error,c;if(i.$ref){let l=this.getRefNode(n,i.$ref,o.uriConverter);if(dt(l))return s||(s=this.nameProvider.getName(l)),{$refText:s??"",ref:l};a=l}else if(i.$refs){let l=[];for(let u of i.$refs){let f=this.getRefNode(n,u,o.uriConverter);dt(f)&&l.push({ref:f})}if(l.length===0)c={$refText:s??"",items:l},a??(a="Could not resolve multi-reference");else return{$refText:s??"",items:l}}if(a)return c??(c={$refText:s??"",ref:void 0}),c.error={info:{container:e,property:r,reference:c},message:a},c}getRefNode(e,r,n){try{let i=r.indexOf("#");if(i===0){let c=this.astNodeLocator.getAstNode(e,r.substring(1));return c||"Could not resolve path: "+r}if(i<0){let c=n?n(r):ht.parse(r),l=this.langiumDocuments.getDocument(c);return l?l.parseResult.value:"Could not find document for URI: "+r}let o=n?n(r.substring(0,i)):ht.parse(r.substring(0,i)),s=this.langiumDocuments.getDocument(o);if(!s)return"Could not find document for URI: "+r;if(i===r.length-1)return s.parseResult.value;let a=this.astNodeLocator.getAstNode(s.parseResult.value,r.substring(i+1));return a||"Could not resolve URI: "+r}catch(i){return String(i)}}};var _l=class{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){let r=e.LanguageMetaData;for(let n of r.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(n,e);if(r.fileNames)for(let n of r.fileNames)this.fileNameMap.has(n)&&console.warn(`The file name ${n} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileNameMap.set(n,e);this.languageIdMap.set(r.languageId,e)}getServices(e){if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");let r=this.textDocuments?.get(e)?.languageId;if(r!==void 0){let s=this.languageIdMap.get(r);if(s)return s}let n=xt.extname(e),i=xt.basename(e),o=this.fileNameMap.get(i)??this.fileExtensionMap.get(n);if(!o)throw r?new Error(`The service registry contains no services for the extension '${n}' for language '${r}'.`):new Error(`The service registry contains no services for the extension '${n}'.`);return o}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}};function Io(t){return{code:t}}var Ud;(function(t){t.defaults=["fast","slow","built-in"],t.all=t.defaults})(Ud||(Ud={}));var Rl=class{constructor(e){this.entries=new Ut,this.knownCategories=new Set(Ud.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,r=this,n="fast"){if(n==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(n);for(let[i,o]of Object.entries(e)){let s=o;if(Array.isArray(s))for(let a of s){let c={check:this.wrapValidationException(a,r),category:n};this.addEntry(i,c)}else if(typeof s=="function"){let a={check:this.wrapValidationException(s,r),category:n};this.addEntry(i,a)}else tn(s)}}wrapValidationException(e,r){return async(n,i,o)=>{await this.handleException(()=>e.call(r,n,i,o),"An error occurred during validation",i,n)}}async handleException(e,r,n,i){try{await e()}catch(o){if(ln(o))throw o;console.error(`${r}:`,o),o instanceof Error&&o.stack&&console.error(o.stack);let s=o instanceof Error?o.message:String(o);n("error",`${r}: ${s}`,{node:i})}}addEntry(e,r){if(e==="AstNode"){this.entries.add("AstNode",r);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,r)}getChecks(e,r){let n=me(this.entries.get(e)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(i=>r.includes(i.category))),n.map(i=>i.check)}registerBeforeDocument(e,r=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",r))}registerAfterDocument(e,r=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",r))}wrapPreparationException(e,r,n){return async(i,o,s,a)=>{await this.handleException(()=>e.call(n,i,o,s,a),r,o,i)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}};var sA=Object.freeze({validateNode:!0,validateChildren:!0}),bl=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,r={},n=re.CancellationToken.None){let i=e.parseResult,o=[];if(await pt(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(i,o,r),r.stopAfterLexingErrors&&o.some(s=>s.data?.code===_r.LexingError)||(this.processParsingErrors(i,o,r),r.stopAfterParsingErrors&&o.some(s=>s.data?.code===_r.ParsingError))||(this.processLinkingErrors(e,o,r),r.stopAfterLinkingErrors&&o.some(s=>s.data?.code===_r.LinkingError))))return o;try{o.push(...await this.validateAst(i.value,r,n))}catch(s){if(ln(s))throw s;console.error("An error occurred during validation:",s)}return await pt(n),o}processLexingErrors(e,r,n){let i=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let o of i){let s=o.severity??"error",a={severity:Bd(s),range:{start:{line:o.line-1,character:o.column-1},end:{line:o.line-1,character:o.column+o.length-1}},message:o.message,data:cA(s),source:this.getSource()};r.push(a)}}processParsingErrors(e,r,n){for(let i of e.parserErrors){let o;if(isNaN(i.token.startOffset)){if("previousToken"in i){let s=i.previousToken;if(isNaN(s.startOffset)){let a={line:0,character:0};o={start:a,end:a}}else{let a={line:s.endLine-1,character:s.endColumn};o={start:a,end:a}}}}else o=cs(i.token);if(o){let s={severity:Bd("error"),range:o,message:i.message,data:Io(_r.ParsingError),source:this.getSource()};r.push(s)}}}processLinkingErrors(e,r,n){for(let i of e.references){let o=i.error;if(o){let s={node:o.info.container,range:i.$refNode?.range,property:o.info.property,index:o.info.index,data:{code:_r.LinkingError,containerType:o.info.container.$type,property:o.info.property,refText:o.info.reference.$refText}};r.push(this.toDiagnostic("error",o.message,s))}}}async validateAst(e,r,n=re.CancellationToken.None){let i=[],o=(s,a,c)=>{i.push(this.toDiagnostic(s,a,c))};return await this.validateAstBefore(e,r,o,n),await this.validateAstNodes(e,r,o,n),await this.validateAstAfter(e,r,o,n),i}async validateAstBefore(e,r,n,i=re.CancellationToken.None){let o=this.validationRegistry.checksBefore;for(let s of o)await pt(i),await s(e,n,r.categories??[],i)}async validateAstNodes(e,r,n,i=re.CancellationToken.None){if(this.profiler?.isActive("validating")){let o=this.profiler.createTask("validating",this.languageId);o.start();try{let s=Ht(e).iterator();for(let a of s){o.startSubTask(a.$type);let c=this.validateSingleNodeOptions(a,r);if(c.validateNode)try{let l=this.validationRegistry.getChecks(a.$type,r.categories);for(let u of l)await u(a,n,i)}finally{o.stopSubTask(a.$type)}c.validateChildren||s.prune()}}finally{o.stop()}}else{let o=Ht(e).iterator();for(let s of o){await pt(i);let a=this.validateSingleNodeOptions(s,r);if(a.validateNode){let c=this.validationRegistry.getChecks(s.$type,r.categories);for(let l of c)await l(s,n,i)}a.validateChildren||o.prune()}}}validateSingleNodeOptions(e,r){return sA}async validateAstAfter(e,r,n,i=re.CancellationToken.None){let o=this.validationRegistry.checksAfter;for(let s of o)await pt(i),await s(e,n,r.categories??[],i)}toDiagnostic(e,r,n){return{message:r,range:aA(n),severity:Bd(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function aA(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=Ac(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=Cm(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Bd(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function cA(t){switch(t){case"error":return Io(_r.LexingError);case"warning":return Io(_r.LexingWarning);case"info":return Io(_r.LexingInfo);case"hint":return Io(_r.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var _r;(function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(_r||(_r={}));var wl=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,r,n){let i=n??Mt(e);r??(r=this.nameProvider.getName(e));let o=this.astNodeLocator.getAstNodePath(e);if(!r)throw new Error(`Node at path ${o} has no name.`);let s,a=()=>s??(s=to(this.nameProvider.getNameNode(e)??e.$cstNode));return{node:e,name:r,get nameSegment(){return a()},selectionSegment:to(e.$cstNode),type:e.$type,documentUri:i.uri,path:o}}},Al=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,r=re.CancellationToken.None){let n=[],i=e.parseResult.value;for(let o of Ht(i))await pt(r),zn(o).forEach(s=>{s.reference.error||n.push(...this.createInfoDescriptions(s))});return n}createInfoDescriptions(e){let r=e.reference;if(r.error||!r.$refNode)return[];let n=[];Rt(r)&&r.$nodeDescription?n=[r.$nodeDescription]:sr(r)&&(n=r.items.map(c=>c.$nodeDescription).filter(c=>c!==void 0));let i=Mt(e.container).uri,o=this.nodeLocator.getAstNodePath(e.container),s=[],a=to(r.$refNode);for(let c of n)s.push({sourceUri:i,sourcePath:o,targetUri:c.documentUri,targetPath:c.path,segment:a,local:xt.equals(c.documentUri,i)});return s}};var Sl=class{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){let r=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return r+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:r}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return r!==void 0?e+this.indexSeparator+r:e}getAstNode(e,r){return r.split(this.segmentSeparator).reduce((i,o)=>{if(!i||o.length===0)return i;let s=o.indexOf(this.indexSeparator);if(s>0){let a=o.substring(0,s),c=parseInt(o.substring(s+1));return i[a]?.[c]}return i[o]},e)}};var rt={};Ae(rt,qh(bo(),1));var Il=class{constructor(e){this._ready=new Kt,this.onConfigurationSectionUpdateEmitter=new rt.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let r=this.serviceRegistry.all;e.register({section:r.map(n=>this.toSectionName(n.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let r=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(r);r.forEach((i,o)=>{this.updateSectionConfiguration(i.section,n[o])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!="object"||e.settings===null||Object.entries(e.settings).forEach(([r,n])=>{this.updateSectionConfiguration(r,n),this.onConfigurationSectionUpdateEmitter.fire({section:r,configuration:n})})}updateSectionConfiguration(e,r){this.settings[e]=r}async getConfiguration(e,r){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][r]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}};var Ea=qh(CI(),1);var Ii;(function(t){function e(r){return{dispose:async()=>await r()}}t.create=e})(Ii||(Ii={}));var Ml=class{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Ut,this.documentPhaseListeners=new Ut,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=pe.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},n=re.CancellationToken.None){for(let i of e){let o=i.uri.toString();if(i.state===pe.Validated){if(typeof r.validation=="boolean"&&r.validation)this.resetToState(i,pe.IndexedReferences);else if(typeof r.validation=="object"){let s=this.findMissingValidationCategories(i,r);s.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:{categories:s}},result:this.buildState.get(o)?.result}),i.state=pe.IndexedReferences)}}else this.buildState.delete(o)}this.currentState=pe.Changed,await this.emitUpdate(e.map(i=>i.uri),[]),await this.buildDocuments(e,r,n)}async update(e,r,n=re.CancellationToken.None){this.currentState=pe.Changed;let i=[];for(let c of r){let l=this.langiumDocuments.deleteDocuments(c);for(let u of l)i.push(u.uri),this.cleanUpDeleted(u)}let o=(await Promise.all(e.map(c=>this.findChangedUris(c)))).flat();for(let c of o){let l=this.langiumDocuments.getDocument(c);l===void 0&&(l=this.langiumDocumentFactory.fromModel({$type:"INVALID"},c),l.state=pe.Changed,this.langiumDocuments.addDocument(l)),this.resetToState(l,pe.Changed)}let s=me(o).concat(i).map(c=>c.toString()).toSet();this.langiumDocuments.all.filter(c=>!s.has(c.uri.toString())&&this.shouldRelink(c,s)).forEach(c=>this.resetToState(c,pe.ComputedScopes)),await this.emitUpdate(o,i),await pt(n);let a=this.sortDocuments(this.langiumDocuments.all.filter(c=>c.state<pe.Validated||!this.buildState.get(c.uri.toString())?.completed||this.resultsAreIncomplete(c,this.updateBuildOptions)).toArray());await this.buildDocuments(a,this.updateBuildOptions,n)}resultsAreIncomplete(e,r){return this.findMissingValidationCategories(e,r).length>=1}findMissingValidationCategories(e,r){let n=this.buildState.get(e.uri.toString()),i=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),o=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?i:new Set,s=r===void 0||r.validation===!0?i:typeof r.validation=="object"?r.validation.categories??i:[];return me(s).filter(a=>!o.has(a)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let n=await this.fileSystemProvider.stat(e);if(n.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(n))return[e]}catch{}return[]}async emitUpdate(e,r){await Promise.all(this.updateListeners.map(n=>n(e,r)))}sortDocuments(e){let r=0,n=e.length-1;for(;r<n;){for(;r<e.length&&this.hasTextDocument(e[r]);)r++;for(;n>=0&&!this.hasTextDocument(e[n]);)n--;r<n&&([e[r],e[n]]=[e[n],e[r]])}return e}hasTextDocument(e){return!!this.textDocuments?.get(e.uri)}shouldRelink(e,r){return e.references.some(n=>n.error!==void 0)?!0:this.indexManager.isAffected(e,r)}onUpdate(e){return this.updateListeners.push(e),Ii.create(()=>{let r=this.updateListeners.indexOf(e);r>=0&&this.updateListeners.splice(r,1)})}resetToState(e,r){switch(r){case pe.Changed:case pe.Parsed:this.indexManager.removeContent(e.uri);case pe.IndexedContent:e.localSymbols=void 0;case pe.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case pe.Linked:this.indexManager.removeReferences(e.uri);case pe.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case pe.Validated:}e.state>r&&(e.state=r)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=pe.Changed}async buildDocuments(e,r,n){this.prepareBuild(e,r),await this.runCancelable(e,pe.Parsed,n,s=>this.langiumDocumentFactory.update(s,n)),await this.runCancelable(e,pe.IndexedContent,n,s=>this.indexManager.updateContent(s,n)),await this.runCancelable(e,pe.ComputedScopes,n,async s=>{let a=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.localSymbols=await a.collectLocalSymbols(s,n)});let i=e.filter(s=>this.shouldLink(s));await this.runCancelable(i,pe.Linked,n,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,n)),await this.runCancelable(i,pe.IndexedReferences,n,s=>this.indexManager.updateReferences(s,n));let o=e.filter(s=>this.shouldValidate(s)?!0:(this.markAsCompleted(s),!1));await this.runCancelable(o,pe.Validated,n,async s=>{await this.validate(s,n),this.markAsCompleted(s)})}markAsCompleted(e){let r=this.buildState.get(e.uri.toString());r&&(r.completed=!0)}prepareBuild(e,r){for(let n of e){let i=n.uri.toString(),o=this.buildState.get(i);(!o||o.completed)&&this.buildState.set(i,{completed:!1,options:r,result:o?.result})}}async runCancelable(e,r,n,i){for(let s of e)s.state<r&&(await pt(n),await i(s),s.state=r,await this.notifyDocumentPhase(s,r,n));let o=e.filter(s=>s.state===r);await this.notifyBuildPhase(o,r,n),this.currentState=r}onBuildPhase(e,r){return this.buildPhaseListeners.add(e,r),Ii.create(()=>{this.buildPhaseListeners.delete(e,r)})}onDocumentPhase(e,r){return this.documentPhaseListeners.add(e,r),Ii.create(()=>{this.documentPhaseListeners.delete(e,r)})}waitUntil(e,r,n){let i;return r&&"path"in r?i=r:n=r,n??(n=re.CancellationToken.None),i?this.awaitDocumentState(e,i,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,r,n){let i=this.langiumDocuments.getDocument(r);if(i){if(i.state>=e)return Promise.resolve(r);if(n.isCancellationRequested)return Promise.reject(Er);if(this.currentState>=e&&e>i.state)return Promise.reject(new Ea.ResponseError(Ea.LSPErrorCodes.RequestFailed,`Document state of ${r.toString()} is ${pe[i.state]}, requiring ${pe[e]}, but workspace state is already ${pe[this.currentState]}. Returning undefined.`))}else return Promise.reject(new Ea.ResponseError(Ea.LSPErrorCodes.ServerCancelled,`No document found for URI: ${r.toString()}`));return new Promise((o,s)=>{let a=this.onDocumentPhase(e,l=>{xt.equals(l.uri,r)&&(a.dispose(),c.dispose(),o(l.uri))}),c=n.onCancellationRequested(()=>{a.dispose(),c.dispose(),s(Er)})})}awaitBuilderState(e,r){return this.currentState>=e?Promise.resolve():r.isCancellationRequested?Promise.reject(Er):new Promise((n,i)=>{let o=this.onBuildPhase(e,()=>{o.dispose(),s.dispose(),n()}),s=r.onCancellationRequested(()=>{o.dispose(),s.dispose(),i(Er)})})}async notifyDocumentPhase(e,r,n){let o=this.documentPhaseListeners.get(r).slice();for(let s of o)try{await pt(n),await s(e,n)}catch(a){if(!ln(a))throw a}}async notifyBuildPhase(e,r,n){if(e.length===0)return;let o=this.buildPhaseListeners.get(r).slice();for(let s of o)await pt(n),await s(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,r){let n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,i=this.getBuildOptions(e),o=typeof i.validation=="object"?{...i.validation}:{};o.categories=this.findMissingValidationCategories(e,i);let s=await n.validateDocument(e,o,r);e.diagnostics?e.diagnostics.push(...s):e.diagnostics=s;let a=this.buildState.get(e.uri.toString());a&&(a.result??(a.result={}),a.result.validationChecks?a.result.validationChecks=me(a.result.validationChecks).concat(o.categories).distinct().toArray():a.result.validationChecks=[...o.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}};var Fl=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new So,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,r){let n=Mt(e).uri,i=[];return this.referenceIndex.forEach(o=>{o.forEach(s=>{xt.equals(s.targetUri,n)&&s.targetPath===r&&i.push(s)})}),me(i)}allElements(e,r){let n=me(this.symbolIndex.keys());return r&&(n=n.filter(i=>!r||r.has(i))),n.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,r){return r?this.symbolByTypeIndex.get(e,r,()=>(this.symbolIndex.get(e)??[]).filter(o=>this.astReflection.isSubtype(o.type,r))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let r=e.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r)}removeReferences(e){let r=e.toString();this.referenceIndex.delete(r)}async updateContent(e,r=re.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,r),o=e.uri.toString();this.symbolIndex.set(o,i),this.symbolByTypeIndex.clear(o)}async updateReferences(e,r=re.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,r);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,r){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(i=>!i.local&&r.has(i.targetUri.toString())):!1}};var Ul=class{constructor(e){this.initialBuildOptions={},this._ready=new Kt,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(r=>this.initializeWorkspace(this.folders??[],r))}async initializeWorkspace(e,r=re.CancellationToken.None){let n=await this.performStartup(e);await pt(r),await this.documentBuilder.build(n,this.initialBuildOptions,r)}async performStartup(e){let r=[],n=s=>{r.push(s),this.langiumDocuments.hasDocument(s.uri)||this.langiumDocuments.addDocument(s)};await this.loadAdditionalDocuments(e,n);let i=[];await Promise.all(e.map(s=>this.getRootFolder(s)).map(async s=>this.traverseFolder(s,i)));let o=me(i).distinct(s=>s.toString()).filter(s=>!this.langiumDocuments.hasDocument(s));return await this.loadWorkspaceDocuments(o,n),this._ready.resolve(),r}async loadWorkspaceDocuments(e,r){await Promise.all(e.map(async n=>{let i=await this.langiumDocuments.getOrCreateDocument(n);r(i)}))}loadAdditionalDocuments(e,r){return Promise.resolve()}getRootFolder(e){return ht.parse(e.uri)}async traverseFolder(e,r){try{let n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async i=>{this.shouldIncludeEntry(i)&&(i.isDirectory?await this.traverseFolder(i.uri,r):i.isFile&&r.push(i.uri))}))}catch(n){console.error("Failure to read directory content of "+e.toString(!0),n)}}async searchFolder(e){let r=[];return await this.traverseFolder(e,r),r}shouldIncludeEntry(e){let r=xt.basename(e.uri);return r.startsWith(".")?!1:e.isDirectory?r!=="node_modules"&&r!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}};var Bl=class{buildUnexpectedCharactersMessage(e,r,n,i,o){return Ts.buildUnexpectedCharactersMessage(e,r,n,i,o)}buildUnableToPopLexerModeMessage(e){return Ts.buildUnableToPopLexerModeMessage(e)}},xp={mode:"full"},Co=class{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let r=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);let n=aT(r)?Object.values(r):r,i=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new st(n,{positionTracking:"full",skipValidations:i,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,r=xp){let n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(aT(e))return e;let r=cT(e)?Object.values(e.modes).flat():e,n={};return r.forEach(i=>n[i.name]=i),n}};function Tp(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function cT(t){return t&&"modes"in t&&"defaultMode"in t}function aT(t){return!Tp(t)&&!cT(t)}zs();function fT(t,e,r){let n,i;typeof t=="string"?(i=e,n=r):(i=t.range.start,n=e),i||(i=ve.create(0,0));let o=LI(t),s=pT(n),a=bF({lines:o,position:i,options:s});return vF({index:0,tokens:a,position:i})}function dT(t,e){let r=pT(e),n=LI(t);if(n.length===0)return!1;let i=n[0],o=n[n.length-1],s=r.start,a=r.end;return!!s?.exec(i)&&!!a?.exec(o)}function LI(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(Rm)}var PI=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,RF=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function bF(t){let e=[],r=t.position.line,n=t.position.character;for(let i=0;i<t.lines.length;i++){let o=i===0,s=i===t.lines.length-1,a=t.lines[i],c=0;if(o&&t.options.start){let u=t.options.start?.exec(a);u&&(c=u.index+u[0].length)}else{let u=t.options.line?.exec(a);u&&(c=u.index+u[0].length)}if(s){let u=t.options.end?.exec(a);u&&(a=a.substring(0,u.index))}if(a=a.substring(0,IF(a)),uT(a,c)>=a.length){if(e.length>0){let u=ve.create(r,n);e.push({type:"break",content:"",range:Te.create(u,u)})}}else{PI.lastIndex=c;let u=PI.exec(a);if(u){let f=u[0],d=u[1],p=ve.create(r,n+c),g=ve.create(r,n+c+f.length);e.push({type:"tag",content:d,range:Te.create(p,g)}),c+=f.length,c=uT(a,c)}if(c<a.length){let f=a.substring(c),d=Array.from(f.matchAll(RF));e.push(...wF(d,f,r,n+c))}}r++,n=0}return e.length>0&&e[e.length-1].type==="break"?e.slice(0,-1):e}function wF(t,e,r,n){let i=[];if(t.length===0){let o=ve.create(r,n),s=ve.create(r,n+e.length);i.push({type:"text",content:e,range:Te.create(o,s)})}else{let o=0;for(let a of t){let c=a.index,l=e.substring(o,c);l.length>0&&i.push({type:"text",content:e.substring(o,c),range:Te.create(ve.create(r,o+n),ve.create(r,c+n))});let u=l.length+1,f=a[1];if(i.push({type:"inline-tag",content:f,range:Te.create(ve.create(r,o+u+n),ve.create(r,o+u+f.length+n))}),u+=f.length,a.length===4){u+=a[2].length;let d=a[3];i.push({type:"text",content:d,range:Te.create(ve.create(r,o+u+n),ve.create(r,o+u+d.length+n))})}else i.push({type:"text",content:"",range:Te.create(ve.create(r,o+u+n),ve.create(r,o+u+n))});o=c+a[0].length}let s=e.substring(o);s.length>0&&i.push({type:"text",content:s,range:Te.create(ve.create(r,o+n),ve.create(r,o+n+s.length))})}return i}var AF=/\S/,SF=/\s*$/;function uT(t,e){let r=t.substring(e).match(AF);return r?e+r.index:t.length}function IF(t){let e=t.match(SF);if(e&&typeof e.index=="number")return e.index}function vF(t){let e=ve.create(t.position.line,t.position.character);if(t.tokens.length===0)return new Ep([],Te.create(e,e));let r=[];for(;t.index<t.tokens.length;){let o=kF(t,r[r.length-1]);o&&r.push(o)}let n=r[0]?.range.start??e,i=r[r.length-1]?.range.end??e;return new Ep(r,Te.create(n,i))}function kF(t,e){let r=t.tokens[t.index];if(r.type==="tag")return DI(t,!1);if(r.type==="text"||r.type==="inline-tag")return $I(t);NF(r,e),t.index++}function NF(t,e){if(e){let r=new _p("",t.range);"inlines"in e?e.inlines.push(r):e.content.inlines.push(r)}}function $I(t){let e=t.tokens[t.index],r=e,n=e,i=[];for(;e&&e.type!=="break"&&e.type!=="tag";)i.push(CF(t)),n=e,e=t.tokens[t.index];return new Gl(i,Te.create(r.range.start,n.range.end))}function CF(t){return t.tokens[t.index].type==="inline-tag"?DI(t,!0):MI(t)}function DI(t,e){let r=t.tokens[t.index++],n=r.content.substring(1);if(t.tokens[t.index]?.type==="text")if(e){let o=MI(t);return new Xl(n,new Gl([o],o.range),e,Te.create(r.range.start,o.range.end))}else{let o=$I(t);return new Xl(n,o,e,Te.create(r.range.start,o.range.end))}else{let o=r.range;return new Xl(n,new Gl([],o),e,o)}}function MI(t){let e=t.tokens[t.index++];return new _p(e.content,e.range)}function pT(t){if(!t)return pT({start:"/**",end:"*/",line:"*"});let{start:e,end:r,line:n}=t;return{start:lT(e,!0),end:lT(r,!1),line:lT(n,!0)}}function lT(t,e){if(typeof t=="string"||typeof t=="object"){let r=typeof t=="string"?ti(t):t.source;return e?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`)}else return t}var Ep=class{constructor(e,r){this.elements=e,this.range=r}getTag(e){return this.getAllTags().find(r=>r.name===e)}getTags(e){return this.getAllTags().filter(r=>r.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(let r of this.elements)if(e.length===0)e=r.toString();else{let n=r.toString();e+=OI(e)+n}return e.trim()}toMarkdown(e){let r="";for(let n of this.elements)if(r.length===0)r=n.toMarkdown(e);else{let i=n.toMarkdown(e);r+=OI(r)+i}return r.trim()}},Xl=class{constructor(e,r,n,i){this.name=e,this.content=r,this.inline=n,this.range=i}toString(){let e=`@${this.name}`,r=this.content.toString();return this.content.inlines.length===1?e=`${e} ${r}`:this.content.inlines.length>1&&(e=`${e}
|
|
152
|
+
${r}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){let r=this.content.toMarkdown(e);if(this.inline){let o=PF(this.name,r,e??{});if(typeof o=="string")return o}let n="";e?.tag==="italic"||e?.tag===void 0?n="*":e?.tag==="bold"?n="**":e?.tag==="bold-italic"&&(n="***");let i=`${n}@${this.name}${n}`;return this.content.inlines.length===1?i=`${i} \u2014 ${r}`:this.content.inlines.length>1&&(i=`${i}
|
|
153
|
+
${r}`),this.inline?`{${i}}`:i}};function PF(t,e,r){if(t==="linkplain"||t==="linkcode"||t==="link"){let n=e.indexOf(" "),i=e;if(n>0){let s=uT(e,n);i=e.substring(s),e=e.substring(0,n)}return(t==="linkcode"||t==="link"&&r.link==="code")&&(i=`\`${i}\``),r.renderLink?.(e,i)??OF(e,i)}}function OF(t,e){try{return ht.parse(t,!0),`[${e}](${t})`}catch{return t}}var Gl=class{constructor(e,r){this.inlines=e,this.range=r}toString(){let e="";for(let r=0;r<this.inlines.length;r++){let n=this.inlines[r],i=this.inlines[r+1];e+=n.toString(),i&&i.range.start.line>n.range.start.line&&(e+=`
|
|
154
|
+
`)}return e}toMarkdown(e){let r="";for(let n=0;n<this.inlines.length;n++){let i=this.inlines[n],o=this.inlines[n+1];r+=i.toMarkdown(e),o&&o.range.start.line>i.range.start.line&&(r+=`
|
|
155
|
+
`)}return r}},_p=class{constructor(e,r){this.text=e,this.range=r}toString(){return this.text}toMarkdown(){return this.text}};function OI(t){return t.endsWith(`
|
|
156
|
+
`)?`
|
|
157
|
+
`:`
|
|
158
|
+
|
|
159
|
+
`}var Hl=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let r=this.commentProvider.getComment(e);if(r&&dT(r))return fT(r).toMarkdown({renderLink:(i,o)=>this.documentationLinkRenderer(e,i,o),renderTag:i=>this.documentationTagRenderer(e,i)})}documentationLinkRenderer(e,r,n){let i=this.findNameInLocalSymbols(e,r)??this.findNameInGlobalScope(e,r);if(i&&i.nameSegment){let o=i.nameSegment.range.start.line+1,s=i.nameSegment.range.start.character+1,a=i.documentUri.with({fragment:`L${o},${s}`});return`[${n}](${a.toString()})`}else return}documentationTagRenderer(e,r){}findNameInLocalSymbols(e,r){let i=Mt(e).localSymbols;if(!i)return;let o=e;do{let a=i.getStream(o).find(c=>c.name===r);if(a)return a;o=o.$container}while(o)}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(i=>i.name===r)}};var jl=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return Xy(e)?e.$comment:ym(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}};var ql=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,r){return Promise.resolve(this.syncParser.parse(e))}},hT=class{constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){let e=this.createWorker();e.onReady(()=>{if(this.queue.length>0){let r=this.queue.shift();r&&(e.lock(),r.resolve(e))}}),this.workerPool.push(e)}}async parse(e,r){let n=await this.acquireParserWorker(r),i=new Kt,o,s=r.onCancellationRequested(()=>{o=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(a=>{let c=this.hydrator.hydrate(a);i.resolve(c)}).catch(a=>{i.reject(a)}).finally(()=>{s.dispose(),clearTimeout(o)}),i.promise}terminateWorker(e){e.terminate();let r=this.workerPool.indexOf(e);r>=0&&this.workerPool.splice(r,1)}async acquireParserWorker(e){this.initializeWorkers();for(let n of this.workerPool)if(n.ready)return n.lock(),n;let r=new Kt;return e.onCancellationRequested(()=>{let n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject(Er)}),this.queue.push(r),r.promise}},mT=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,r,n,i){this.onReadyEmitter=new rt.Emitter,this.deferred=new Kt,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=i,r(o=>{let s=o;this.deferred.resolve(s),this.unlock()}),n(o=>{this.deferred.reject(o),this.unlock()})}terminate(){this.deferred.reject(Er),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Kt,this.sendMessage(e),this.deferred.promise}};var Wl=class{constructor(){this.previousTokenSource=new re.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let r=Dd();return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,r,n=re.CancellationToken.None){let i=new Kt,o={action:r,deferred:i,cancellationToken:n};return e.push(o),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:r,deferred:n,cancellationToken:i})=>{try{let o=await Promise.resolve().then(()=>r(i));n.resolve(o)}catch(o){ln(o)?n.resolve(void 0):n.reject(o)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}};var zl=class{constructor(e){this.grammarElementIdMap=new Ao,this.tokenTypeIdMap=new Ao,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(r=>({...r,message:r.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let r=new Map,n=new Map;for(let i of Ht(e))r.set(i,{});if(e.$cstNode)for(let i of eo(e.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,r));for(let[i,o]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(o)){let s=[];n[i]=s;for(let a of o)dt(a)?s.push(this.dehydrateAstNode(a,r)):Rt(a)?s.push(this.dehydrateReference(a,r)):s.push(a)}else dt(o)?n[i]=this.dehydrateAstNode(o,r):Rt(o)?n[i]=this.dehydrateReference(o,r):o!==void 0&&(n[i]=o);return n}dehydrateReference(e,r){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=r.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,r){let n=r.cstNodes.get(e);return ac(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=r.astNodes.get(e.astNode),Nr(e)?n.content=e.content.map(i=>this.dehydrateCstNode(i,r)):qn(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){let r=e.value,n=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(r,n)}}createHydrationContext(e){let r=new Map,n=new Map;for(let o of Ht(e))r.set(o,{});let i;if(e.$cstNode)for(let o of eo(e.$cstNode)){let s;"fullText"in o?(s=new Vs(o.fullText),i=s):"content"in o?s=new To:"tokenType"in o&&(s=this.hydrateCstLeafNode(o)),s&&(n.set(o,s),s.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=r.cstNodes.get(e.$cstNode));for(let[i,o]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(o)){let s=[];n[i]=s;for(let a of o)dt(a)?s.push(this.setParent(this.hydrateAstNode(a,r),n)):Rt(a)?s.push(this.hydrateReference(a,n,i,r)):s.push(a)}else dt(o)?n[i]=this.setParent(this.hydrateAstNode(o,r),n):Rt(o)?n[i]=this.hydrateReference(o,n,i,r):o!==void 0&&(n[i]=o);return n}setParent(e,r){return e.$container=r,e}hydrateReference(e,r,n,i){return this.linker.buildReference(r,n,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,r,n=0){let i=r.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=r.astNodes.get(e.astNode),Nr(i))for(let o of e.content){let s=this.hydrateCstNode(o,r,n++);i.content.push(s)}return i}hydrateCstLeafNode(e){let r=this.getTokenType(e.tokenType),n=e.offset,i=e.length,o=e.startLine,s=e.startColumn,a=e.endLine,c=e.endColumn,l=e.hidden;return new xo(n,i,{start:{line:o,character:s},end:{line:a,character:c}},r,l)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let r of Ht(this.grammar))yc(r)&&this.grammarElementIdMap.set(r,e++)}};function Vl(t){return{documentation:{CommentProvider:e=>new jl(e),DocumentationProvider:e=>new Hl(e)},parser:{AsyncParser:e=>new ql(e),GrammarConfig:e=>Dm(e),LangiumParser:e=>Cy(e),CompletionParser:e=>Ny(e),ValueConverter:()=>new Ro,TokenBuilder:()=>new _o,Lexer:e=>new Co(e),ParserErrorMessageProvider:()=>new Ks,LexerErrorMessageProvider:()=>new Bl},workspace:{AstNodeLocator:()=>new Sl,AstNodeDescriptionProvider:e=>new wl(e),ReferenceDescriptionProvider:e=>new Al(e)},references:{Linker:e=>new pl(e),NameProvider:()=>new hl,ScopeProvider:e=>new Tl(e),ScopeComputation:e=>new gl(e),References:e=>new ml(e)},serializer:{Hydrator:e=>new zl(e),JsonSerializer:e=>new El(e)},validation:{DocumentValidator:e=>new bl(e),ValidationRegistry:e=>new Rl(e)},shared:()=>t.shared}}function Kl(t){return{ServiceRegistry:e=>new _l(e),workspace:{LangiumDocuments:e=>new dl(e),LangiumDocumentFactory:e=>new fl(e),DocumentBuilder:e=>new Ml(e),IndexManager:e=>new Fl(e),WorkspaceManager:e=>new Ul(e),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new Wl,ConfigurationProvider:e=>new Il(e)},profilers:{}}}var gT;(function(t){t.merge=(e,r)=>Yl(Yl({},e),r)})(gT||(gT={}));function Po(t,e,r,n,i,o,s,a,c){let l=[t,e,r,n,i,o,s,a,c].reduce(Yl,{});return GI(l)}var BI=Symbol("isProxy");function XI(t){if(t&&t[BI])for(let e of Object.values(t))XI(e);return t}function GI(t,e){let r=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(n,i)=>i===BI?!0:UI(n,i,t,e||r),getOwnPropertyDescriptor:(n,i)=>(UI(n,i,t,e||r),Object.getOwnPropertyDescriptor(n,i)),has:(n,i)=>i in t,ownKeys:()=>[...Object.getOwnPropertyNames(t)]});return r}var FI=Symbol();function UI(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+t[e]);if(t[e]===FI)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in r){let i=r[e];t[e]=FI;try{t[e]=typeof i=="function"?i(n):GI(i,n)}catch(o){throw t[e]=o instanceof Error?o:void 0,o}return t[e]}else return}function Yl(t,e){if(e){for(let[r,n]of Object.entries(e))if(n!=null)if(typeof n=="object"){let i=t[r];typeof i=="object"&&i!==null?t[r]=Yl(i,n):t[r]=Yl({},n)}else t[r]=n}return t}var yT={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},Oo;(function(t){t.REGULAR="indentation-sensitive",t.IGNORE_INDENTATION="ignore-indentation"})(Oo||(Oo={}));var _a=class extends _o{constructor(e=yT){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...yT,...e},this.indentTokenType=ni({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=ni({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,r){let n=super.buildTokens(e,r);if(!Tp(n))throw new Error("Invalid tokens built by default builder");let{indentTokenName:i,dedentTokenName:o,whitespaceTokenName:s,ignoreIndentationDelimiters:a}=this.options,c,l,u,f=[];for(let d of n){for(let[p,g]of a)d.name===p?d.PUSH_MODE=Oo.IGNORE_INDENTATION:d.name===g&&(d.POP_MODE=!0);d.name===o?c=d:d.name===i?l=d:d.name===s?u=d:f.push(d)}if(!c||!l||!u)throw new Error("Some indentation/whitespace tokens not found!");return a.length>0?{modes:{[Oo.REGULAR]:[c,l,...f,u],[Oo.IGNORE_INDENTATION]:[...f,u]},defaultMode:Oo.REGULAR}:[c,l,u,...f]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,r){return r===0||`\r
|
|
160
|
+
`.includes(e[r-1])}matchWhitespace(e,r,n,i){this.whitespaceRegExp.lastIndex=r;let o=this.whitespaceRegExp.exec(e);return{currIndentLevel:o?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:o}}createIndentationTokenInstance(e,r,n,i){let o=this.getLineNumber(r,i);return Cn(e,n,i,i+n.length,o,o,1,n.length)}getLineNumber(e,r){return e.substring(0,r).split(/\r\n|\r|\n/).length}indentMatcher(e,r,n,i){if(!this.isStartOfLine(e,r))return null;let{currIndentLevel:o,prevIndentLevel:s,match:a}=this.matchWhitespace(e,r,n,i);return o<=s?null:(this.indentationStack.push(o),a)}dedentMatcher(e,r,n,i){if(!this.isStartOfLine(e,r))return null;let{currIndentLevel:o,prevIndentLevel:s,match:a}=this.matchWhitespace(e,r,n,i);if(o>=s)return null;let c=this.indentationStack.lastIndexOf(o);if(c===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${o} at offset: ${r}. Current indentation stack: ${this.indentationStack}`,offset:r,length:a?.[0]?.length??0,line:this.getLineNumber(e,r),column:1}),null;let l=this.indentationStack.length-c-1,u=e.substring(0,r).match(/[\r\n]+$/)?.[0].length??1;for(let f=0;f<l;f++){let d=this.createIndentationTokenInstance(this.dedentTokenType,e,"",r-(u-1));n.push(d),this.indentationStack.pop()}return null}buildTerminalToken(e){let r=super.buildTerminalToken(e),{indentTokenName:n,dedentTokenName:i,whitespaceTokenName:o}=this.options;return r.name===n?this.indentTokenType:r.name===i?this.dedentTokenType:r.name===o?ni({name:o,pattern:this.whitespaceRegExp,group:st.SKIPPED}):r}flushRemainingDedents(e){let r=[];for(;this.indentationStack.length>1;)r.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],r}},Zl=class extends Co{constructor(e){if(super(e),e.parser.TokenBuilder instanceof _a)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,r=xp){let n=super.tokenize(e),i=n.report;r?.mode==="full"&&n.tokens.push(...i.remainingDedents),i.remainingDedents=[];let{indentTokenType:o,dedentTokenType:s}=this.indentationTokenBuilder,a=o.tokenTypeIdx,c=s.tokenTypeIdx,l=[],u=n.tokens.length-1;for(let f=0;f<u;f++){let d=n.tokens[f],p=n.tokens[f+1];if(d.tokenTypeIdx===a&&p.tokenTypeIdx===c){f++;continue}l.push(d)}return u>=0&&l.push(n.tokens[u]),n.tokens=l,n}};var ke={};Zr(ke,{AstUtils:()=>Xu,BiMap:()=>Ao,Cancellation:()=>re,ContextCache:()=>So,CstUtils:()=>cf,DONE_RESULT:()=>Dt,Deferred:()=>Kt,Disposable:()=>Ii,DisposableCache:()=>na,DocumentCache:()=>Fd,EMPTY_STREAM:()=>Wn,ErrorWithLocation:()=>ro,GrammarUtils:()=>ds,MultiMap:()=>Ut,OperationCancelled:()=>Er,Reduction:()=>Zo,RegExpUtils:()=>ff,SimpleCache:()=>xl,StreamImpl:()=>ar,TreeStreamImpl:()=>Jr,URI:()=>ht,UriTrie:()=>ta,UriUtils:()=>xt,WorkspaceCache:()=>ia,assertCondition:()=>a_,assertUnreachable:()=>tn,delayNextTick:()=>Fy,interruptAndCheck:()=>pt,isOperationCancelled:()=>ln,loadGrammarFromJson:()=>bp,setInterruptionPeriod:()=>Qw,startCancelableOperation:()=>Dd,stream:()=>me});Ae(ke,rt);var Rp=class{stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},Jl={fileSystemProvider:()=>new Rp};var LF={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},$F={AstReflection:()=>new as};function DF(){let t=Po(Kl(Jl),$F),e=Po(Vl({shared:t}),LF);return t.ServiceRegistry.register(e),e}function bp(t){let e=DF(),r=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(r,ht.parse(`memory:/${r.name??"grammar"}.langium`)),r}Ae(ct,ke);var xT=class{constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new Ut}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(r=>this.activeCategories.add(r)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(r=>this.activeCategories.delete(r)):this.activeCategories.clear()}createTask(e,r){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${r}'.`),new wp(n=>this.records.add(e,this.dumpRecord(e,n)),r)}dumpRecord(e,r){console.info(`Task ${e}.${r.identifier} executed in ${r.duration.toFixed(2)}ms and ended at ${r.date.toISOString()}`);let n=[];for(let s of r.entries.keys()){let a=r.entries.get(s),c=a.reduce((l,u)=>l+u);n.push({name:`${r.identifier}.${s}`,count:a.length,duration:c})}let i=r.duration-n.map(s=>s.duration).reduce((s,a)=>s+a,0);n.push({name:r.identifier,count:1,duration:i}),n.sort((s,a)=>a.duration-s.duration);function o(s){return Math.round(100*s)/100}return console.table(n.map(s=>({Element:s.name,Count:s.count,"Self %":o(100*s.duration/r.duration),"Time (ms)":o(s.duration)}))),r}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(r=>e.some(n=>n===r[0])).flatMap(r=>r[1])}},wp=class{constructor(e,r){this.stack=[],this.entries=new Ut,this.addRecord=e,this.identifier=r}start(){if(this.startTime!==void 0)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw new Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(r=>r.id).join(", ")}.`);let e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){let r=this.stack.pop();if(!r)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(r.id!==e)throw new Error(`Sub-Task "${r.id}" is not already stopped.`);let n=performance.now()-r.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=n);let i=n-r.content;this.entries.add(e,i)}};var ba={$type:"AnchorDeclaration",description:"description",name:"name",properties:"properties",title:"title"};function Np(t){return wt.isInstance(t,ba.$type)}var TT={$type:"BlockProperty",key:"key",value:"value"};var wT={$type:"CalendarBlock",properties:"properties"};function Cp(t){return wt.isInstance(t,wT.$type)}var Ra={$type:"ConfigEntry"};var kp={$type:"DefaultDeclaration",entityType:"entityType",properties:"properties"};function vi(t){return wt.isInstance(t,kp.$type)}var AT={$type:"DescriptionDirective",text:"text"};function vT(t){return wt.isInstance(t,AT.$type)}var Ap={$type:"EntityProperty",key:"key",value:"value",values:"values"};var wa={$type:"FootnoteDeclaration",description:"description",name:"name",properties:"properties",title:"title"};function Pp(t){return wt.isInstance(t,wa.$type)}var Aa={$type:"GroupBlock",content:"content",name:"name",properties:"properties",title:"title"};function Un(t){return wt.isInstance(t,Aa.$type)}var Ql={$type:"GroupContent"};var ET={$type:"IncludeDeclaration",options:"options",path:"path"};var _T={$type:"IncludeOption",key:"key",value:"value"};var Sa={$type:"ItemDeclaration",description:"description",name:"name",properties:"properties",title:"title"};function wr(t){return wt.isInstance(t,Sa.$type)}var Ia={$type:"LabelDeclaration",description:"description",name:"name",properties:"properties",title:"title"};function Op(t){return wt.isInstance(t,Ia.$type)}var va={$type:"MilestoneDeclaration",description:"description",name:"name",properties:"properties",title:"title"};function Lp(t){return wt.isInstance(t,va.$type)}var RT={$type:"NowlineDirective",properties:"properties",version:"version"};var Lo={$type:"NowlineFile",configEntries:"configEntries",directive:"directive",hasConfig:"hasConfig",includes:"includes",roadmapDecl:"roadmapDecl",roadmapEntries:"roadmapEntries"};var ka={$type:"ParallelBlock",content:"content",name:"name",properties:"properties",title:"title"};function Bn(t){return wt.isInstance(t,ka.$type)}var Sp={$type:"ParallelContent"};var Na={$type:"PersonDeclaration",description:"description",name:"name",properties:"properties",title:"title"};function ki(t){return wt.isInstance(t,Na.$type)}var ST={$type:"PersonMemberRef",ref:"ref"};function HI(t){return wt.isInstance(t,ST.$type)}var Ip={$type:"RoadmapDeclaration",name:"name",properties:"properties",title:"title"};var hn={$type:"RoadmapEntry"};var IT={$type:"ScaleBlock",properties:"properties"};function jI(t){return wt.isInstance(t,IT.$type)}var Ca={$type:"SizeDeclaration",description:"description",name:"name",properties:"properties",title:"title"};function Da(t){return wt.isInstance(t,Ca.$type)}var Pa={$type:"StatusDeclaration",description:"description",name:"name",properties:"properties",title:"title"};function nu(t){return wt.isInstance(t,Pa.$type)}var tu={$type:"StyleDeclaration",name:"name",properties:"properties",title:"title"};function iu(t){return wt.isInstance(t,tu.$type)}var bT={$type:"StyleProperty",key:"key",value:"value"};var eu={$type:"SwimlaneContent"};var Oa={$type:"SwimlaneDeclaration",content:"content",name:"name",properties:"properties",title:"title"};function mn(t){return wt.isInstance(t,Oa.$type)}var La={$type:"SymbolDeclaration",description:"description",name:"name",properties:"properties",title:"title"};function ou(t){return wt.isInstance(t,La.$type)}var vp={$type:"TeamContent"};var $a={$type:"TeamDeclaration",content:"content",name:"name",properties:"properties",title:"title"};function Xr(t){return wt.isInstance(t,$a.$type)}var ru=class extends Xi{constructor(){super(...arguments);se(this,"types",{AnchorDeclaration:{name:ba.$type,properties:{description:{name:ba.description},name:{name:ba.name},properties:{name:ba.properties,defaultValue:[]},title:{name:ba.title}},superTypes:[hn.$type]},BlockProperty:{name:TT.$type,properties:{key:{name:TT.key},value:{name:TT.value}},superTypes:[]},CalendarBlock:{name:wT.$type,properties:{properties:{name:wT.properties,defaultValue:[]}},superTypes:[Ra.$type]},ConfigEntry:{name:Ra.$type,properties:{},superTypes:[]},DefaultDeclaration:{name:kp.$type,properties:{entityType:{name:kp.entityType},properties:{name:kp.properties,defaultValue:[]}},superTypes:[Ra.$type]},DescriptionDirective:{name:AT.$type,properties:{text:{name:AT.text}},superTypes:[Ql.$type,Sp.$type,eu.$type,vp.$type]},EntityProperty:{name:Ap.$type,properties:{key:{name:Ap.key},value:{name:Ap.value},values:{name:Ap.values,defaultValue:[]}},superTypes:[]},FootnoteDeclaration:{name:wa.$type,properties:{description:{name:wa.description},name:{name:wa.name},properties:{name:wa.properties,defaultValue:[]},title:{name:wa.title}},superTypes:[hn.$type]},GroupBlock:{name:Aa.$type,properties:{content:{name:Aa.content,defaultValue:[]},name:{name:Aa.name},properties:{name:Aa.properties,defaultValue:[]},title:{name:Aa.title}},superTypes:[Ql.$type,Sp.$type,eu.$type]},GroupContent:{name:Ql.$type,properties:{},superTypes:[]},IncludeDeclaration:{name:ET.$type,properties:{options:{name:ET.options,defaultValue:[]},path:{name:ET.path}},superTypes:[]},IncludeOption:{name:_T.$type,properties:{key:{name:_T.key},value:{name:_T.value}},superTypes:[]},ItemDeclaration:{name:Sa.$type,properties:{description:{name:Sa.description},name:{name:Sa.name},properties:{name:Sa.properties,defaultValue:[]},title:{name:Sa.title}},superTypes:[Ql.$type,Sp.$type,eu.$type]},LabelDeclaration:{name:Ia.$type,properties:{description:{name:Ia.description},name:{name:Ia.name},properties:{name:Ia.properties,defaultValue:[]},title:{name:Ia.title}},superTypes:[hn.$type]},MilestoneDeclaration:{name:va.$type,properties:{description:{name:va.description},name:{name:va.name},properties:{name:va.properties,defaultValue:[]},title:{name:va.title}},superTypes:[hn.$type]},NowlineDirective:{name:RT.$type,properties:{properties:{name:RT.properties,defaultValue:[]},version:{name:RT.version}},superTypes:[]},NowlineFile:{name:Lo.$type,properties:{configEntries:{name:Lo.configEntries,defaultValue:[]},directive:{name:Lo.directive},hasConfig:{name:Lo.hasConfig,defaultValue:!1},includes:{name:Lo.includes,defaultValue:[]},roadmapDecl:{name:Lo.roadmapDecl},roadmapEntries:{name:Lo.roadmapEntries,defaultValue:[]}},superTypes:[]},ParallelBlock:{name:ka.$type,properties:{content:{name:ka.content,defaultValue:[]},name:{name:ka.name},properties:{name:ka.properties,defaultValue:[]},title:{name:ka.title}},superTypes:[Ql.$type,eu.$type]},ParallelContent:{name:Sp.$type,properties:{},superTypes:[]},PersonDeclaration:{name:Na.$type,properties:{description:{name:Na.description},name:{name:Na.name},properties:{name:Na.properties,defaultValue:[]},title:{name:Na.title}},superTypes:[hn.$type]},PersonMemberRef:{name:ST.$type,properties:{ref:{name:ST.ref}},superTypes:[vp.$type]},RoadmapDeclaration:{name:Ip.$type,properties:{name:{name:Ip.name},properties:{name:Ip.properties,defaultValue:[]},title:{name:Ip.title}},superTypes:[]},RoadmapEntry:{name:hn.$type,properties:{},superTypes:[]},ScaleBlock:{name:IT.$type,properties:{properties:{name:IT.properties,defaultValue:[]}},superTypes:[Ra.$type]},SizeDeclaration:{name:Ca.$type,properties:{description:{name:Ca.description},name:{name:Ca.name},properties:{name:Ca.properties,defaultValue:[]},title:{name:Ca.title}},superTypes:[hn.$type]},StatusDeclaration:{name:Pa.$type,properties:{description:{name:Pa.description},name:{name:Pa.name},properties:{name:Pa.properties,defaultValue:[]},title:{name:Pa.title}},superTypes:[hn.$type]},StyleDeclaration:{name:tu.$type,properties:{name:{name:tu.name},properties:{name:tu.properties,defaultValue:[]},title:{name:tu.title}},superTypes:[Ra.$type]},StyleProperty:{name:bT.$type,properties:{key:{name:bT.key},value:{name:bT.value}},superTypes:[]},SwimlaneContent:{name:eu.$type,properties:{},superTypes:[]},SwimlaneDeclaration:{name:Oa.$type,properties:{content:{name:Oa.content,defaultValue:[]},name:{name:Oa.name},properties:{name:Oa.properties,defaultValue:[]},title:{name:Oa.title}},superTypes:[hn.$type]},SymbolDeclaration:{name:La.$type,properties:{description:{name:La.description},name:{name:La.name},properties:{name:La.properties,defaultValue:[]},title:{name:La.title}},superTypes:[Ra.$type]},TeamContent:{name:vp.$type,properties:{},superTypes:[]},TeamDeclaration:{name:$a.$type,properties:{content:{name:$a.content,defaultValue:[]},name:{name:$a.name},properties:{name:$a.properties,defaultValue:[]},title:{name:$a.title}},superTypes:[hn.$type,vp.$type]}})}},wt=new ru;var qI,WI=()=>qI??(qI=bp(`{
|
|
161
|
+
"$type": "Grammar",
|
|
162
|
+
"isDeclared": true,
|
|
163
|
+
"name": "Nowline",
|
|
164
|
+
"rules": [
|
|
165
|
+
{
|
|
166
|
+
"$type": "ParserRule",
|
|
167
|
+
"entry": true,
|
|
168
|
+
"name": "NowlineFile",
|
|
169
|
+
"definition": {
|
|
170
|
+
"$type": "Group",
|
|
171
|
+
"elements": [
|
|
172
|
+
{
|
|
173
|
+
"$type": "Assignment",
|
|
174
|
+
"feature": "directive",
|
|
175
|
+
"operator": "=",
|
|
176
|
+
"terminal": {
|
|
177
|
+
"$type": "RuleCall",
|
|
178
|
+
"rule": {
|
|
179
|
+
"$ref": "#/rules@1"
|
|
180
|
+
},
|
|
181
|
+
"arguments": []
|
|
182
|
+
},
|
|
183
|
+
"cardinality": "?"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"$type": "Assignment",
|
|
187
|
+
"feature": "includes",
|
|
188
|
+
"operator": "+=",
|
|
189
|
+
"terminal": {
|
|
190
|
+
"$type": "RuleCall",
|
|
191
|
+
"rule": {
|
|
192
|
+
"$ref": "#/rules@2"
|
|
193
|
+
},
|
|
194
|
+
"arguments": []
|
|
195
|
+
},
|
|
196
|
+
"cardinality": "*"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"$type": "Group",
|
|
200
|
+
"elements": [
|
|
201
|
+
{
|
|
202
|
+
"$type": "Assignment",
|
|
203
|
+
"feature": "hasConfig",
|
|
204
|
+
"operator": "?=",
|
|
205
|
+
"terminal": {
|
|
206
|
+
"$type": "Keyword",
|
|
207
|
+
"value": "config"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"$type": "Assignment",
|
|
212
|
+
"feature": "configEntries",
|
|
213
|
+
"operator": "+=",
|
|
214
|
+
"terminal": {
|
|
215
|
+
"$type": "RuleCall",
|
|
216
|
+
"rule": {
|
|
217
|
+
"$ref": "#/rules@4"
|
|
218
|
+
},
|
|
219
|
+
"arguments": []
|
|
220
|
+
},
|
|
221
|
+
"cardinality": "*"
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"cardinality": "?"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"$type": "Assignment",
|
|
228
|
+
"feature": "roadmapDecl",
|
|
229
|
+
"operator": "=",
|
|
230
|
+
"terminal": {
|
|
231
|
+
"$type": "RuleCall",
|
|
232
|
+
"rule": {
|
|
233
|
+
"$ref": "#/rules@13"
|
|
234
|
+
},
|
|
235
|
+
"arguments": []
|
|
236
|
+
},
|
|
237
|
+
"cardinality": "?"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"$type": "Assignment",
|
|
241
|
+
"feature": "roadmapEntries",
|
|
242
|
+
"operator": "+=",
|
|
243
|
+
"terminal": {
|
|
244
|
+
"$type": "RuleCall",
|
|
245
|
+
"rule": {
|
|
246
|
+
"$ref": "#/rules@14"
|
|
247
|
+
},
|
|
248
|
+
"arguments": []
|
|
249
|
+
},
|
|
250
|
+
"cardinality": "*"
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
"fragment": false,
|
|
255
|
+
"parameters": []
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"$type": "ParserRule",
|
|
259
|
+
"name": "NowlineDirective",
|
|
260
|
+
"definition": {
|
|
261
|
+
"$type": "Group",
|
|
262
|
+
"elements": [
|
|
263
|
+
{
|
|
264
|
+
"$type": "Keyword",
|
|
265
|
+
"value": "nowline"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"$type": "Assignment",
|
|
269
|
+
"feature": "version",
|
|
270
|
+
"operator": "=",
|
|
271
|
+
"terminal": {
|
|
272
|
+
"$type": "RuleCall",
|
|
273
|
+
"rule": {
|
|
274
|
+
"$ref": "#/rules@49"
|
|
275
|
+
},
|
|
276
|
+
"arguments": []
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"$type": "Assignment",
|
|
281
|
+
"feature": "properties",
|
|
282
|
+
"operator": "+=",
|
|
283
|
+
"terminal": {
|
|
284
|
+
"$type": "RuleCall",
|
|
285
|
+
"rule": {
|
|
286
|
+
"$ref": "#/rules@34"
|
|
287
|
+
},
|
|
288
|
+
"arguments": []
|
|
289
|
+
},
|
|
290
|
+
"cardinality": "*"
|
|
291
|
+
}
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
"entry": false,
|
|
295
|
+
"fragment": false,
|
|
296
|
+
"parameters": []
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"$type": "ParserRule",
|
|
300
|
+
"name": "IncludeDeclaration",
|
|
301
|
+
"definition": {
|
|
302
|
+
"$type": "Group",
|
|
303
|
+
"elements": [
|
|
304
|
+
{
|
|
305
|
+
"$type": "Keyword",
|
|
306
|
+
"value": "include"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"$type": "Assignment",
|
|
310
|
+
"feature": "path",
|
|
311
|
+
"operator": "=",
|
|
312
|
+
"terminal": {
|
|
313
|
+
"$type": "RuleCall",
|
|
314
|
+
"rule": {
|
|
315
|
+
"$ref": "#/rules@41"
|
|
316
|
+
},
|
|
317
|
+
"arguments": []
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"$type": "Assignment",
|
|
322
|
+
"feature": "options",
|
|
323
|
+
"operator": "+=",
|
|
324
|
+
"terminal": {
|
|
325
|
+
"$type": "RuleCall",
|
|
326
|
+
"rule": {
|
|
327
|
+
"$ref": "#/rules@3"
|
|
328
|
+
},
|
|
329
|
+
"arguments": []
|
|
330
|
+
},
|
|
331
|
+
"cardinality": "*"
|
|
332
|
+
}
|
|
333
|
+
]
|
|
334
|
+
},
|
|
335
|
+
"entry": false,
|
|
336
|
+
"fragment": false,
|
|
337
|
+
"parameters": []
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"$type": "ParserRule",
|
|
341
|
+
"name": "IncludeOption",
|
|
342
|
+
"definition": {
|
|
343
|
+
"$type": "Group",
|
|
344
|
+
"elements": [
|
|
345
|
+
{
|
|
346
|
+
"$type": "Assignment",
|
|
347
|
+
"feature": "key",
|
|
348
|
+
"operator": "=",
|
|
349
|
+
"terminal": {
|
|
350
|
+
"$type": "RuleCall",
|
|
351
|
+
"rule": {
|
|
352
|
+
"$ref": "#/rules@39"
|
|
353
|
+
},
|
|
354
|
+
"arguments": []
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"$type": "Assignment",
|
|
359
|
+
"feature": "value",
|
|
360
|
+
"operator": "=",
|
|
361
|
+
"terminal": {
|
|
362
|
+
"$type": "RuleCall",
|
|
363
|
+
"rule": {
|
|
364
|
+
"$ref": "#/rules@49"
|
|
365
|
+
},
|
|
366
|
+
"arguments": []
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
]
|
|
370
|
+
},
|
|
371
|
+
"entry": false,
|
|
372
|
+
"fragment": false,
|
|
373
|
+
"parameters": []
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"$type": "ParserRule",
|
|
377
|
+
"name": "ConfigEntry",
|
|
378
|
+
"definition": {
|
|
379
|
+
"$type": "Alternatives",
|
|
380
|
+
"elements": [
|
|
381
|
+
{
|
|
382
|
+
"$type": "RuleCall",
|
|
383
|
+
"rule": {
|
|
384
|
+
"$ref": "#/rules@5"
|
|
385
|
+
},
|
|
386
|
+
"arguments": []
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"$type": "RuleCall",
|
|
390
|
+
"rule": {
|
|
391
|
+
"$ref": "#/rules@6"
|
|
392
|
+
},
|
|
393
|
+
"arguments": []
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"$type": "RuleCall",
|
|
397
|
+
"rule": {
|
|
398
|
+
"$ref": "#/rules@8"
|
|
399
|
+
},
|
|
400
|
+
"arguments": []
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"$type": "RuleCall",
|
|
404
|
+
"rule": {
|
|
405
|
+
"$ref": "#/rules@9"
|
|
406
|
+
},
|
|
407
|
+
"arguments": []
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"$type": "RuleCall",
|
|
411
|
+
"rule": {
|
|
412
|
+
"$ref": "#/rules@11"
|
|
413
|
+
},
|
|
414
|
+
"arguments": []
|
|
415
|
+
}
|
|
416
|
+
]
|
|
417
|
+
},
|
|
418
|
+
"entry": false,
|
|
419
|
+
"fragment": false,
|
|
420
|
+
"parameters": []
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"$type": "ParserRule",
|
|
424
|
+
"name": "ScaleBlock",
|
|
425
|
+
"definition": {
|
|
426
|
+
"$type": "Group",
|
|
427
|
+
"elements": [
|
|
428
|
+
{
|
|
429
|
+
"$type": "Keyword",
|
|
430
|
+
"value": "scale"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"$type": "Group",
|
|
434
|
+
"elements": [
|
|
435
|
+
{
|
|
436
|
+
"$type": "RuleCall",
|
|
437
|
+
"rule": {
|
|
438
|
+
"$ref": "#/rules@37"
|
|
439
|
+
},
|
|
440
|
+
"arguments": []
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"$type": "Assignment",
|
|
444
|
+
"feature": "properties",
|
|
445
|
+
"operator": "+=",
|
|
446
|
+
"terminal": {
|
|
447
|
+
"$type": "RuleCall",
|
|
448
|
+
"rule": {
|
|
449
|
+
"$ref": "#/rules@34"
|
|
450
|
+
},
|
|
451
|
+
"arguments": []
|
|
452
|
+
},
|
|
453
|
+
"cardinality": "+"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"$type": "RuleCall",
|
|
457
|
+
"rule": {
|
|
458
|
+
"$ref": "#/rules@38"
|
|
459
|
+
},
|
|
460
|
+
"arguments": []
|
|
461
|
+
}
|
|
462
|
+
],
|
|
463
|
+
"cardinality": "?"
|
|
464
|
+
}
|
|
465
|
+
]
|
|
466
|
+
},
|
|
467
|
+
"entry": false,
|
|
468
|
+
"fragment": false,
|
|
469
|
+
"parameters": []
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"$type": "ParserRule",
|
|
473
|
+
"name": "CalendarBlock",
|
|
474
|
+
"definition": {
|
|
475
|
+
"$type": "Group",
|
|
476
|
+
"elements": [
|
|
477
|
+
{
|
|
478
|
+
"$type": "Keyword",
|
|
479
|
+
"value": "calendar"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"$type": "Group",
|
|
483
|
+
"elements": [
|
|
484
|
+
{
|
|
485
|
+
"$type": "RuleCall",
|
|
486
|
+
"rule": {
|
|
487
|
+
"$ref": "#/rules@37"
|
|
488
|
+
},
|
|
489
|
+
"arguments": []
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"$type": "Assignment",
|
|
493
|
+
"feature": "properties",
|
|
494
|
+
"operator": "+=",
|
|
495
|
+
"terminal": {
|
|
496
|
+
"$type": "RuleCall",
|
|
497
|
+
"rule": {
|
|
498
|
+
"$ref": "#/rules@34"
|
|
499
|
+
},
|
|
500
|
+
"arguments": []
|
|
501
|
+
},
|
|
502
|
+
"cardinality": "+"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"$type": "RuleCall",
|
|
506
|
+
"rule": {
|
|
507
|
+
"$ref": "#/rules@38"
|
|
508
|
+
},
|
|
509
|
+
"arguments": []
|
|
510
|
+
}
|
|
511
|
+
],
|
|
512
|
+
"cardinality": "?"
|
|
513
|
+
}
|
|
514
|
+
]
|
|
515
|
+
},
|
|
516
|
+
"entry": false,
|
|
517
|
+
"fragment": false,
|
|
518
|
+
"parameters": []
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"$type": "ParserRule",
|
|
522
|
+
"name": "BlockPropertyValue",
|
|
523
|
+
"dataType": "string",
|
|
524
|
+
"definition": {
|
|
525
|
+
"$type": "Alternatives",
|
|
526
|
+
"elements": [
|
|
527
|
+
{
|
|
528
|
+
"$type": "RuleCall",
|
|
529
|
+
"rule": {
|
|
530
|
+
"$ref": "#/rules@49"
|
|
531
|
+
},
|
|
532
|
+
"arguments": []
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"$type": "RuleCall",
|
|
536
|
+
"rule": {
|
|
537
|
+
"$ref": "#/rules@47"
|
|
538
|
+
},
|
|
539
|
+
"arguments": []
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"$type": "RuleCall",
|
|
543
|
+
"rule": {
|
|
544
|
+
"$ref": "#/rules@41"
|
|
545
|
+
},
|
|
546
|
+
"arguments": []
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"$type": "RuleCall",
|
|
550
|
+
"rule": {
|
|
551
|
+
"$ref": "#/rules@43"
|
|
552
|
+
},
|
|
553
|
+
"arguments": []
|
|
554
|
+
}
|
|
555
|
+
]
|
|
556
|
+
},
|
|
557
|
+
"entry": false,
|
|
558
|
+
"fragment": false,
|
|
559
|
+
"parameters": []
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"$type": "ParserRule",
|
|
563
|
+
"name": "StyleDeclaration",
|
|
564
|
+
"definition": {
|
|
565
|
+
"$type": "Group",
|
|
566
|
+
"elements": [
|
|
567
|
+
{
|
|
568
|
+
"$type": "Keyword",
|
|
569
|
+
"value": "style"
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
"$type": "Assignment",
|
|
573
|
+
"feature": "name",
|
|
574
|
+
"operator": "=",
|
|
575
|
+
"terminal": {
|
|
576
|
+
"$type": "RuleCall",
|
|
577
|
+
"rule": {
|
|
578
|
+
"$ref": "#/rules@49"
|
|
579
|
+
},
|
|
580
|
+
"arguments": []
|
|
581
|
+
},
|
|
582
|
+
"cardinality": "?"
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"$type": "Assignment",
|
|
586
|
+
"feature": "title",
|
|
587
|
+
"operator": "=",
|
|
588
|
+
"terminal": {
|
|
589
|
+
"$type": "RuleCall",
|
|
590
|
+
"rule": {
|
|
591
|
+
"$ref": "#/rules@41"
|
|
592
|
+
},
|
|
593
|
+
"arguments": []
|
|
594
|
+
},
|
|
595
|
+
"cardinality": "?"
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"$type": "Group",
|
|
599
|
+
"elements": [
|
|
600
|
+
{
|
|
601
|
+
"$type": "RuleCall",
|
|
602
|
+
"rule": {
|
|
603
|
+
"$ref": "#/rules@37"
|
|
604
|
+
},
|
|
605
|
+
"arguments": []
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"$type": "Assignment",
|
|
609
|
+
"feature": "properties",
|
|
610
|
+
"operator": "+=",
|
|
611
|
+
"terminal": {
|
|
612
|
+
"$type": "RuleCall",
|
|
613
|
+
"rule": {
|
|
614
|
+
"$ref": "#/rules@35"
|
|
615
|
+
},
|
|
616
|
+
"arguments": []
|
|
617
|
+
},
|
|
618
|
+
"cardinality": "+"
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"$type": "RuleCall",
|
|
622
|
+
"rule": {
|
|
623
|
+
"$ref": "#/rules@38"
|
|
624
|
+
},
|
|
625
|
+
"arguments": []
|
|
626
|
+
}
|
|
627
|
+
],
|
|
628
|
+
"cardinality": "?"
|
|
629
|
+
}
|
|
630
|
+
]
|
|
631
|
+
},
|
|
632
|
+
"entry": false,
|
|
633
|
+
"fragment": false,
|
|
634
|
+
"parameters": []
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"$type": "ParserRule",
|
|
638
|
+
"name": "SymbolDeclaration",
|
|
639
|
+
"definition": {
|
|
640
|
+
"$type": "Group",
|
|
641
|
+
"elements": [
|
|
642
|
+
{
|
|
643
|
+
"$type": "Keyword",
|
|
644
|
+
"value": "symbol"
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"$type": "Assignment",
|
|
648
|
+
"feature": "name",
|
|
649
|
+
"operator": "=",
|
|
650
|
+
"terminal": {
|
|
651
|
+
"$type": "RuleCall",
|
|
652
|
+
"rule": {
|
|
653
|
+
"$ref": "#/rules@49"
|
|
654
|
+
},
|
|
655
|
+
"arguments": []
|
|
656
|
+
},
|
|
657
|
+
"cardinality": "?"
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
"$type": "Assignment",
|
|
661
|
+
"feature": "title",
|
|
662
|
+
"operator": "=",
|
|
663
|
+
"terminal": {
|
|
664
|
+
"$type": "RuleCall",
|
|
665
|
+
"rule": {
|
|
666
|
+
"$ref": "#/rules@41"
|
|
667
|
+
},
|
|
668
|
+
"arguments": []
|
|
669
|
+
},
|
|
670
|
+
"cardinality": "?"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
"$type": "Assignment",
|
|
674
|
+
"feature": "properties",
|
|
675
|
+
"operator": "+=",
|
|
676
|
+
"terminal": {
|
|
677
|
+
"$type": "RuleCall",
|
|
678
|
+
"rule": {
|
|
679
|
+
"$ref": "#/rules@33"
|
|
680
|
+
},
|
|
681
|
+
"arguments": []
|
|
682
|
+
},
|
|
683
|
+
"cardinality": "*"
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"$type": "Group",
|
|
687
|
+
"elements": [
|
|
688
|
+
{
|
|
689
|
+
"$type": "RuleCall",
|
|
690
|
+
"rule": {
|
|
691
|
+
"$ref": "#/rules@37"
|
|
692
|
+
},
|
|
693
|
+
"arguments": []
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
"$type": "Assignment",
|
|
697
|
+
"feature": "description",
|
|
698
|
+
"operator": "=",
|
|
699
|
+
"terminal": {
|
|
700
|
+
"$type": "RuleCall",
|
|
701
|
+
"rule": {
|
|
702
|
+
"$ref": "#/rules@32"
|
|
703
|
+
},
|
|
704
|
+
"arguments": []
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"$type": "RuleCall",
|
|
709
|
+
"rule": {
|
|
710
|
+
"$ref": "#/rules@38"
|
|
711
|
+
},
|
|
712
|
+
"arguments": []
|
|
713
|
+
}
|
|
714
|
+
],
|
|
715
|
+
"cardinality": "?"
|
|
716
|
+
}
|
|
717
|
+
]
|
|
718
|
+
},
|
|
719
|
+
"entry": false,
|
|
720
|
+
"fragment": false,
|
|
721
|
+
"parameters": []
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"$type": "ParserRule",
|
|
725
|
+
"name": "StylePropertyValue",
|
|
726
|
+
"dataType": "string",
|
|
727
|
+
"definition": {
|
|
728
|
+
"$type": "Alternatives",
|
|
729
|
+
"elements": [
|
|
730
|
+
{
|
|
731
|
+
"$type": "RuleCall",
|
|
732
|
+
"rule": {
|
|
733
|
+
"$ref": "#/rules@49"
|
|
734
|
+
},
|
|
735
|
+
"arguments": []
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"$type": "RuleCall",
|
|
739
|
+
"rule": {
|
|
740
|
+
"$ref": "#/rules@45"
|
|
741
|
+
},
|
|
742
|
+
"arguments": []
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
"$type": "RuleCall",
|
|
746
|
+
"rule": {
|
|
747
|
+
"$ref": "#/rules@41"
|
|
748
|
+
},
|
|
749
|
+
"arguments": []
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"$type": "Keyword",
|
|
753
|
+
"value": "person"
|
|
754
|
+
}
|
|
755
|
+
]
|
|
756
|
+
},
|
|
757
|
+
"entry": false,
|
|
758
|
+
"fragment": false,
|
|
759
|
+
"parameters": []
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"$type": "ParserRule",
|
|
763
|
+
"name": "DefaultDeclaration",
|
|
764
|
+
"definition": {
|
|
765
|
+
"$type": "Group",
|
|
766
|
+
"elements": [
|
|
767
|
+
{
|
|
768
|
+
"$type": "Keyword",
|
|
769
|
+
"value": "default"
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
"$type": "Assignment",
|
|
773
|
+
"feature": "entityType",
|
|
774
|
+
"operator": "=",
|
|
775
|
+
"terminal": {
|
|
776
|
+
"$type": "RuleCall",
|
|
777
|
+
"rule": {
|
|
778
|
+
"$ref": "#/rules@12"
|
|
779
|
+
},
|
|
780
|
+
"arguments": []
|
|
781
|
+
}
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
"$type": "Assignment",
|
|
785
|
+
"feature": "properties",
|
|
786
|
+
"operator": "+=",
|
|
787
|
+
"terminal": {
|
|
788
|
+
"$type": "RuleCall",
|
|
789
|
+
"rule": {
|
|
790
|
+
"$ref": "#/rules@33"
|
|
791
|
+
},
|
|
792
|
+
"arguments": []
|
|
793
|
+
},
|
|
794
|
+
"cardinality": "*"
|
|
795
|
+
}
|
|
796
|
+
]
|
|
797
|
+
},
|
|
798
|
+
"entry": false,
|
|
799
|
+
"fragment": false,
|
|
800
|
+
"parameters": []
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"$type": "ParserRule",
|
|
804
|
+
"name": "DefaultEntityType",
|
|
805
|
+
"dataType": "string",
|
|
806
|
+
"definition": {
|
|
807
|
+
"$type": "Alternatives",
|
|
808
|
+
"elements": [
|
|
809
|
+
{
|
|
810
|
+
"$type": "Keyword",
|
|
811
|
+
"value": "item"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"$type": "Keyword",
|
|
815
|
+
"value": "label"
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
"$type": "Keyword",
|
|
819
|
+
"value": "swimlane"
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
"$type": "Keyword",
|
|
823
|
+
"value": "roadmap"
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"$type": "Keyword",
|
|
827
|
+
"value": "milestone"
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"$type": "Keyword",
|
|
831
|
+
"value": "footnote"
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"$type": "Keyword",
|
|
835
|
+
"value": "anchor"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"$type": "Keyword",
|
|
839
|
+
"value": "parallel"
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"$type": "Keyword",
|
|
843
|
+
"value": "group"
|
|
844
|
+
}
|
|
845
|
+
]
|
|
846
|
+
},
|
|
847
|
+
"entry": false,
|
|
848
|
+
"fragment": false,
|
|
849
|
+
"parameters": []
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
"$type": "ParserRule",
|
|
853
|
+
"name": "RoadmapDeclaration",
|
|
854
|
+
"definition": {
|
|
855
|
+
"$type": "Group",
|
|
856
|
+
"elements": [
|
|
857
|
+
{
|
|
858
|
+
"$type": "Keyword",
|
|
859
|
+
"value": "roadmap"
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"$type": "Assignment",
|
|
863
|
+
"feature": "name",
|
|
864
|
+
"operator": "=",
|
|
865
|
+
"terminal": {
|
|
866
|
+
"$type": "RuleCall",
|
|
867
|
+
"rule": {
|
|
868
|
+
"$ref": "#/rules@49"
|
|
869
|
+
},
|
|
870
|
+
"arguments": []
|
|
871
|
+
},
|
|
872
|
+
"cardinality": "?"
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"$type": "Assignment",
|
|
876
|
+
"feature": "title",
|
|
877
|
+
"operator": "=",
|
|
878
|
+
"terminal": {
|
|
879
|
+
"$type": "RuleCall",
|
|
880
|
+
"rule": {
|
|
881
|
+
"$ref": "#/rules@41"
|
|
882
|
+
},
|
|
883
|
+
"arguments": []
|
|
884
|
+
},
|
|
885
|
+
"cardinality": "?"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"$type": "Assignment",
|
|
889
|
+
"feature": "properties",
|
|
890
|
+
"operator": "+=",
|
|
891
|
+
"terminal": {
|
|
892
|
+
"$type": "RuleCall",
|
|
893
|
+
"rule": {
|
|
894
|
+
"$ref": "#/rules@33"
|
|
895
|
+
},
|
|
896
|
+
"arguments": []
|
|
897
|
+
},
|
|
898
|
+
"cardinality": "*"
|
|
899
|
+
}
|
|
900
|
+
]
|
|
901
|
+
},
|
|
902
|
+
"entry": false,
|
|
903
|
+
"fragment": false,
|
|
904
|
+
"parameters": []
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"$type": "ParserRule",
|
|
908
|
+
"name": "RoadmapEntry",
|
|
909
|
+
"definition": {
|
|
910
|
+
"$type": "Alternatives",
|
|
911
|
+
"elements": [
|
|
912
|
+
{
|
|
913
|
+
"$type": "RuleCall",
|
|
914
|
+
"rule": {
|
|
915
|
+
"$ref": "#/rules@15"
|
|
916
|
+
},
|
|
917
|
+
"arguments": []
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"$type": "RuleCall",
|
|
921
|
+
"rule": {
|
|
922
|
+
"$ref": "#/rules@16"
|
|
923
|
+
},
|
|
924
|
+
"arguments": []
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"$type": "RuleCall",
|
|
928
|
+
"rule": {
|
|
929
|
+
"$ref": "#/rules@19"
|
|
930
|
+
},
|
|
931
|
+
"arguments": []
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"$type": "RuleCall",
|
|
935
|
+
"rule": {
|
|
936
|
+
"$ref": "#/rules@20"
|
|
937
|
+
},
|
|
938
|
+
"arguments": []
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"$type": "RuleCall",
|
|
942
|
+
"rule": {
|
|
943
|
+
"$ref": "#/rules@21"
|
|
944
|
+
},
|
|
945
|
+
"arguments": []
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"$type": "RuleCall",
|
|
949
|
+
"rule": {
|
|
950
|
+
"$ref": "#/rules@22"
|
|
951
|
+
},
|
|
952
|
+
"arguments": []
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"$type": "RuleCall",
|
|
956
|
+
"rule": {
|
|
957
|
+
"$ref": "#/rules@23"
|
|
958
|
+
},
|
|
959
|
+
"arguments": []
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
"$type": "RuleCall",
|
|
963
|
+
"rule": {
|
|
964
|
+
"$ref": "#/rules@30"
|
|
965
|
+
},
|
|
966
|
+
"arguments": []
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"$type": "RuleCall",
|
|
970
|
+
"rule": {
|
|
971
|
+
"$ref": "#/rules@31"
|
|
972
|
+
},
|
|
973
|
+
"arguments": []
|
|
974
|
+
}
|
|
975
|
+
]
|
|
976
|
+
},
|
|
977
|
+
"entry": false,
|
|
978
|
+
"fragment": false,
|
|
979
|
+
"parameters": []
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"$type": "ParserRule",
|
|
983
|
+
"name": "PersonDeclaration",
|
|
984
|
+
"definition": {
|
|
985
|
+
"$type": "Group",
|
|
986
|
+
"elements": [
|
|
987
|
+
{
|
|
988
|
+
"$type": "Keyword",
|
|
989
|
+
"value": "person"
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
"$type": "Assignment",
|
|
993
|
+
"feature": "name",
|
|
994
|
+
"operator": "=",
|
|
995
|
+
"terminal": {
|
|
996
|
+
"$type": "RuleCall",
|
|
997
|
+
"rule": {
|
|
998
|
+
"$ref": "#/rules@49"
|
|
999
|
+
},
|
|
1000
|
+
"arguments": []
|
|
1001
|
+
},
|
|
1002
|
+
"cardinality": "?"
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"$type": "Assignment",
|
|
1006
|
+
"feature": "title",
|
|
1007
|
+
"operator": "=",
|
|
1008
|
+
"terminal": {
|
|
1009
|
+
"$type": "RuleCall",
|
|
1010
|
+
"rule": {
|
|
1011
|
+
"$ref": "#/rules@41"
|
|
1012
|
+
},
|
|
1013
|
+
"arguments": []
|
|
1014
|
+
},
|
|
1015
|
+
"cardinality": "?"
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
"$type": "Assignment",
|
|
1019
|
+
"feature": "properties",
|
|
1020
|
+
"operator": "+=",
|
|
1021
|
+
"terminal": {
|
|
1022
|
+
"$type": "RuleCall",
|
|
1023
|
+
"rule": {
|
|
1024
|
+
"$ref": "#/rules@33"
|
|
1025
|
+
},
|
|
1026
|
+
"arguments": []
|
|
1027
|
+
},
|
|
1028
|
+
"cardinality": "*"
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
"$type": "Group",
|
|
1032
|
+
"elements": [
|
|
1033
|
+
{
|
|
1034
|
+
"$type": "RuleCall",
|
|
1035
|
+
"rule": {
|
|
1036
|
+
"$ref": "#/rules@37"
|
|
1037
|
+
},
|
|
1038
|
+
"arguments": []
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"$type": "Assignment",
|
|
1042
|
+
"feature": "description",
|
|
1043
|
+
"operator": "=",
|
|
1044
|
+
"terminal": {
|
|
1045
|
+
"$type": "RuleCall",
|
|
1046
|
+
"rule": {
|
|
1047
|
+
"$ref": "#/rules@32"
|
|
1048
|
+
},
|
|
1049
|
+
"arguments": []
|
|
1050
|
+
}
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"$type": "RuleCall",
|
|
1054
|
+
"rule": {
|
|
1055
|
+
"$ref": "#/rules@38"
|
|
1056
|
+
},
|
|
1057
|
+
"arguments": []
|
|
1058
|
+
}
|
|
1059
|
+
],
|
|
1060
|
+
"cardinality": "?"
|
|
1061
|
+
}
|
|
1062
|
+
]
|
|
1063
|
+
},
|
|
1064
|
+
"entry": false,
|
|
1065
|
+
"fragment": false,
|
|
1066
|
+
"parameters": []
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
"$type": "ParserRule",
|
|
1070
|
+
"name": "TeamDeclaration",
|
|
1071
|
+
"definition": {
|
|
1072
|
+
"$type": "Group",
|
|
1073
|
+
"elements": [
|
|
1074
|
+
{
|
|
1075
|
+
"$type": "Keyword",
|
|
1076
|
+
"value": "team"
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
"$type": "Assignment",
|
|
1080
|
+
"feature": "name",
|
|
1081
|
+
"operator": "=",
|
|
1082
|
+
"terminal": {
|
|
1083
|
+
"$type": "RuleCall",
|
|
1084
|
+
"rule": {
|
|
1085
|
+
"$ref": "#/rules@49"
|
|
1086
|
+
},
|
|
1087
|
+
"arguments": []
|
|
1088
|
+
},
|
|
1089
|
+
"cardinality": "?"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"$type": "Assignment",
|
|
1093
|
+
"feature": "title",
|
|
1094
|
+
"operator": "=",
|
|
1095
|
+
"terminal": {
|
|
1096
|
+
"$type": "RuleCall",
|
|
1097
|
+
"rule": {
|
|
1098
|
+
"$ref": "#/rules@41"
|
|
1099
|
+
},
|
|
1100
|
+
"arguments": []
|
|
1101
|
+
},
|
|
1102
|
+
"cardinality": "?"
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
"$type": "Assignment",
|
|
1106
|
+
"feature": "properties",
|
|
1107
|
+
"operator": "+=",
|
|
1108
|
+
"terminal": {
|
|
1109
|
+
"$type": "RuleCall",
|
|
1110
|
+
"rule": {
|
|
1111
|
+
"$ref": "#/rules@33"
|
|
1112
|
+
},
|
|
1113
|
+
"arguments": []
|
|
1114
|
+
},
|
|
1115
|
+
"cardinality": "*"
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
"$type": "Group",
|
|
1119
|
+
"elements": [
|
|
1120
|
+
{
|
|
1121
|
+
"$type": "RuleCall",
|
|
1122
|
+
"rule": {
|
|
1123
|
+
"$ref": "#/rules@37"
|
|
1124
|
+
},
|
|
1125
|
+
"arguments": []
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
"$type": "Assignment",
|
|
1129
|
+
"feature": "content",
|
|
1130
|
+
"operator": "+=",
|
|
1131
|
+
"terminal": {
|
|
1132
|
+
"$type": "RuleCall",
|
|
1133
|
+
"rule": {
|
|
1134
|
+
"$ref": "#/rules@17"
|
|
1135
|
+
},
|
|
1136
|
+
"arguments": []
|
|
1137
|
+
},
|
|
1138
|
+
"cardinality": "+"
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
"$type": "RuleCall",
|
|
1142
|
+
"rule": {
|
|
1143
|
+
"$ref": "#/rules@38"
|
|
1144
|
+
},
|
|
1145
|
+
"arguments": []
|
|
1146
|
+
}
|
|
1147
|
+
],
|
|
1148
|
+
"cardinality": "?"
|
|
1149
|
+
}
|
|
1150
|
+
]
|
|
1151
|
+
},
|
|
1152
|
+
"entry": false,
|
|
1153
|
+
"fragment": false,
|
|
1154
|
+
"parameters": []
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
"$type": "ParserRule",
|
|
1158
|
+
"name": "TeamContent",
|
|
1159
|
+
"definition": {
|
|
1160
|
+
"$type": "Alternatives",
|
|
1161
|
+
"elements": [
|
|
1162
|
+
{
|
|
1163
|
+
"$type": "RuleCall",
|
|
1164
|
+
"rule": {
|
|
1165
|
+
"$ref": "#/rules@32"
|
|
1166
|
+
},
|
|
1167
|
+
"arguments": []
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"$type": "RuleCall",
|
|
1171
|
+
"rule": {
|
|
1172
|
+
"$ref": "#/rules@18"
|
|
1173
|
+
},
|
|
1174
|
+
"arguments": []
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
"$type": "RuleCall",
|
|
1178
|
+
"rule": {
|
|
1179
|
+
"$ref": "#/rules@16"
|
|
1180
|
+
},
|
|
1181
|
+
"arguments": []
|
|
1182
|
+
}
|
|
1183
|
+
]
|
|
1184
|
+
},
|
|
1185
|
+
"entry": false,
|
|
1186
|
+
"fragment": false,
|
|
1187
|
+
"parameters": []
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
"$type": "ParserRule",
|
|
1191
|
+
"name": "PersonMemberRef",
|
|
1192
|
+
"definition": {
|
|
1193
|
+
"$type": "Group",
|
|
1194
|
+
"elements": [
|
|
1195
|
+
{
|
|
1196
|
+
"$type": "Keyword",
|
|
1197
|
+
"value": "person"
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
"$type": "Assignment",
|
|
1201
|
+
"feature": "ref",
|
|
1202
|
+
"operator": "=",
|
|
1203
|
+
"terminal": {
|
|
1204
|
+
"$type": "RuleCall",
|
|
1205
|
+
"rule": {
|
|
1206
|
+
"$ref": "#/rules@49"
|
|
1207
|
+
},
|
|
1208
|
+
"arguments": []
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
]
|
|
1212
|
+
},
|
|
1213
|
+
"entry": false,
|
|
1214
|
+
"fragment": false,
|
|
1215
|
+
"parameters": []
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
"$type": "ParserRule",
|
|
1219
|
+
"name": "AnchorDeclaration",
|
|
1220
|
+
"definition": {
|
|
1221
|
+
"$type": "Group",
|
|
1222
|
+
"elements": [
|
|
1223
|
+
{
|
|
1224
|
+
"$type": "Keyword",
|
|
1225
|
+
"value": "anchor"
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
"$type": "Assignment",
|
|
1229
|
+
"feature": "name",
|
|
1230
|
+
"operator": "=",
|
|
1231
|
+
"terminal": {
|
|
1232
|
+
"$type": "RuleCall",
|
|
1233
|
+
"rule": {
|
|
1234
|
+
"$ref": "#/rules@49"
|
|
1235
|
+
},
|
|
1236
|
+
"arguments": []
|
|
1237
|
+
},
|
|
1238
|
+
"cardinality": "?"
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
"$type": "Assignment",
|
|
1242
|
+
"feature": "title",
|
|
1243
|
+
"operator": "=",
|
|
1244
|
+
"terminal": {
|
|
1245
|
+
"$type": "RuleCall",
|
|
1246
|
+
"rule": {
|
|
1247
|
+
"$ref": "#/rules@41"
|
|
1248
|
+
},
|
|
1249
|
+
"arguments": []
|
|
1250
|
+
},
|
|
1251
|
+
"cardinality": "?"
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
"$type": "Assignment",
|
|
1255
|
+
"feature": "properties",
|
|
1256
|
+
"operator": "+=",
|
|
1257
|
+
"terminal": {
|
|
1258
|
+
"$type": "RuleCall",
|
|
1259
|
+
"rule": {
|
|
1260
|
+
"$ref": "#/rules@33"
|
|
1261
|
+
},
|
|
1262
|
+
"arguments": []
|
|
1263
|
+
},
|
|
1264
|
+
"cardinality": "*"
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
"$type": "Group",
|
|
1268
|
+
"elements": [
|
|
1269
|
+
{
|
|
1270
|
+
"$type": "RuleCall",
|
|
1271
|
+
"rule": {
|
|
1272
|
+
"$ref": "#/rules@37"
|
|
1273
|
+
},
|
|
1274
|
+
"arguments": []
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
"$type": "Assignment",
|
|
1278
|
+
"feature": "description",
|
|
1279
|
+
"operator": "=",
|
|
1280
|
+
"terminal": {
|
|
1281
|
+
"$type": "RuleCall",
|
|
1282
|
+
"rule": {
|
|
1283
|
+
"$ref": "#/rules@32"
|
|
1284
|
+
},
|
|
1285
|
+
"arguments": []
|
|
1286
|
+
}
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
"$type": "RuleCall",
|
|
1290
|
+
"rule": {
|
|
1291
|
+
"$ref": "#/rules@38"
|
|
1292
|
+
},
|
|
1293
|
+
"arguments": []
|
|
1294
|
+
}
|
|
1295
|
+
],
|
|
1296
|
+
"cardinality": "?"
|
|
1297
|
+
}
|
|
1298
|
+
]
|
|
1299
|
+
},
|
|
1300
|
+
"entry": false,
|
|
1301
|
+
"fragment": false,
|
|
1302
|
+
"parameters": []
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"$type": "ParserRule",
|
|
1306
|
+
"name": "LabelDeclaration",
|
|
1307
|
+
"definition": {
|
|
1308
|
+
"$type": "Group",
|
|
1309
|
+
"elements": [
|
|
1310
|
+
{
|
|
1311
|
+
"$type": "Keyword",
|
|
1312
|
+
"value": "label"
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
"$type": "Assignment",
|
|
1316
|
+
"feature": "name",
|
|
1317
|
+
"operator": "=",
|
|
1318
|
+
"terminal": {
|
|
1319
|
+
"$type": "RuleCall",
|
|
1320
|
+
"rule": {
|
|
1321
|
+
"$ref": "#/rules@49"
|
|
1322
|
+
},
|
|
1323
|
+
"arguments": []
|
|
1324
|
+
},
|
|
1325
|
+
"cardinality": "?"
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
"$type": "Assignment",
|
|
1329
|
+
"feature": "title",
|
|
1330
|
+
"operator": "=",
|
|
1331
|
+
"terminal": {
|
|
1332
|
+
"$type": "RuleCall",
|
|
1333
|
+
"rule": {
|
|
1334
|
+
"$ref": "#/rules@41"
|
|
1335
|
+
},
|
|
1336
|
+
"arguments": []
|
|
1337
|
+
},
|
|
1338
|
+
"cardinality": "?"
|
|
1339
|
+
},
|
|
1340
|
+
{
|
|
1341
|
+
"$type": "Assignment",
|
|
1342
|
+
"feature": "properties",
|
|
1343
|
+
"operator": "+=",
|
|
1344
|
+
"terminal": {
|
|
1345
|
+
"$type": "RuleCall",
|
|
1346
|
+
"rule": {
|
|
1347
|
+
"$ref": "#/rules@33"
|
|
1348
|
+
},
|
|
1349
|
+
"arguments": []
|
|
1350
|
+
},
|
|
1351
|
+
"cardinality": "*"
|
|
1352
|
+
},
|
|
1353
|
+
{
|
|
1354
|
+
"$type": "Group",
|
|
1355
|
+
"elements": [
|
|
1356
|
+
{
|
|
1357
|
+
"$type": "RuleCall",
|
|
1358
|
+
"rule": {
|
|
1359
|
+
"$ref": "#/rules@37"
|
|
1360
|
+
},
|
|
1361
|
+
"arguments": []
|
|
1362
|
+
},
|
|
1363
|
+
{
|
|
1364
|
+
"$type": "Assignment",
|
|
1365
|
+
"feature": "description",
|
|
1366
|
+
"operator": "=",
|
|
1367
|
+
"terminal": {
|
|
1368
|
+
"$type": "RuleCall",
|
|
1369
|
+
"rule": {
|
|
1370
|
+
"$ref": "#/rules@32"
|
|
1371
|
+
},
|
|
1372
|
+
"arguments": []
|
|
1373
|
+
}
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
"$type": "RuleCall",
|
|
1377
|
+
"rule": {
|
|
1378
|
+
"$ref": "#/rules@38"
|
|
1379
|
+
},
|
|
1380
|
+
"arguments": []
|
|
1381
|
+
}
|
|
1382
|
+
],
|
|
1383
|
+
"cardinality": "?"
|
|
1384
|
+
}
|
|
1385
|
+
]
|
|
1386
|
+
},
|
|
1387
|
+
"entry": false,
|
|
1388
|
+
"fragment": false,
|
|
1389
|
+
"parameters": []
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
"$type": "ParserRule",
|
|
1393
|
+
"name": "SizeDeclaration",
|
|
1394
|
+
"definition": {
|
|
1395
|
+
"$type": "Group",
|
|
1396
|
+
"elements": [
|
|
1397
|
+
{
|
|
1398
|
+
"$type": "Keyword",
|
|
1399
|
+
"value": "size"
|
|
1400
|
+
},
|
|
1401
|
+
{
|
|
1402
|
+
"$type": "Assignment",
|
|
1403
|
+
"feature": "name",
|
|
1404
|
+
"operator": "=",
|
|
1405
|
+
"terminal": {
|
|
1406
|
+
"$type": "RuleCall",
|
|
1407
|
+
"rule": {
|
|
1408
|
+
"$ref": "#/rules@49"
|
|
1409
|
+
},
|
|
1410
|
+
"arguments": []
|
|
1411
|
+
},
|
|
1412
|
+
"cardinality": "?"
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
"$type": "Assignment",
|
|
1416
|
+
"feature": "title",
|
|
1417
|
+
"operator": "=",
|
|
1418
|
+
"terminal": {
|
|
1419
|
+
"$type": "RuleCall",
|
|
1420
|
+
"rule": {
|
|
1421
|
+
"$ref": "#/rules@41"
|
|
1422
|
+
},
|
|
1423
|
+
"arguments": []
|
|
1424
|
+
},
|
|
1425
|
+
"cardinality": "?"
|
|
1426
|
+
},
|
|
1427
|
+
{
|
|
1428
|
+
"$type": "Assignment",
|
|
1429
|
+
"feature": "properties",
|
|
1430
|
+
"operator": "+=",
|
|
1431
|
+
"terminal": {
|
|
1432
|
+
"$type": "RuleCall",
|
|
1433
|
+
"rule": {
|
|
1434
|
+
"$ref": "#/rules@33"
|
|
1435
|
+
},
|
|
1436
|
+
"arguments": []
|
|
1437
|
+
},
|
|
1438
|
+
"cardinality": "*"
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
"$type": "Group",
|
|
1442
|
+
"elements": [
|
|
1443
|
+
{
|
|
1444
|
+
"$type": "RuleCall",
|
|
1445
|
+
"rule": {
|
|
1446
|
+
"$ref": "#/rules@37"
|
|
1447
|
+
},
|
|
1448
|
+
"arguments": []
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
"$type": "Assignment",
|
|
1452
|
+
"feature": "description",
|
|
1453
|
+
"operator": "=",
|
|
1454
|
+
"terminal": {
|
|
1455
|
+
"$type": "RuleCall",
|
|
1456
|
+
"rule": {
|
|
1457
|
+
"$ref": "#/rules@32"
|
|
1458
|
+
},
|
|
1459
|
+
"arguments": []
|
|
1460
|
+
}
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
"$type": "RuleCall",
|
|
1464
|
+
"rule": {
|
|
1465
|
+
"$ref": "#/rules@38"
|
|
1466
|
+
},
|
|
1467
|
+
"arguments": []
|
|
1468
|
+
}
|
|
1469
|
+
],
|
|
1470
|
+
"cardinality": "?"
|
|
1471
|
+
}
|
|
1472
|
+
]
|
|
1473
|
+
},
|
|
1474
|
+
"entry": false,
|
|
1475
|
+
"fragment": false,
|
|
1476
|
+
"parameters": []
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"$type": "ParserRule",
|
|
1480
|
+
"name": "StatusDeclaration",
|
|
1481
|
+
"definition": {
|
|
1482
|
+
"$type": "Group",
|
|
1483
|
+
"elements": [
|
|
1484
|
+
{
|
|
1485
|
+
"$type": "Keyword",
|
|
1486
|
+
"value": "status"
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
"$type": "Assignment",
|
|
1490
|
+
"feature": "name",
|
|
1491
|
+
"operator": "=",
|
|
1492
|
+
"terminal": {
|
|
1493
|
+
"$type": "RuleCall",
|
|
1494
|
+
"rule": {
|
|
1495
|
+
"$ref": "#/rules@49"
|
|
1496
|
+
},
|
|
1497
|
+
"arguments": []
|
|
1498
|
+
},
|
|
1499
|
+
"cardinality": "?"
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
"$type": "Assignment",
|
|
1503
|
+
"feature": "title",
|
|
1504
|
+
"operator": "=",
|
|
1505
|
+
"terminal": {
|
|
1506
|
+
"$type": "RuleCall",
|
|
1507
|
+
"rule": {
|
|
1508
|
+
"$ref": "#/rules@41"
|
|
1509
|
+
},
|
|
1510
|
+
"arguments": []
|
|
1511
|
+
},
|
|
1512
|
+
"cardinality": "?"
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
"$type": "Assignment",
|
|
1516
|
+
"feature": "properties",
|
|
1517
|
+
"operator": "+=",
|
|
1518
|
+
"terminal": {
|
|
1519
|
+
"$type": "RuleCall",
|
|
1520
|
+
"rule": {
|
|
1521
|
+
"$ref": "#/rules@33"
|
|
1522
|
+
},
|
|
1523
|
+
"arguments": []
|
|
1524
|
+
},
|
|
1525
|
+
"cardinality": "*"
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
"$type": "Group",
|
|
1529
|
+
"elements": [
|
|
1530
|
+
{
|
|
1531
|
+
"$type": "RuleCall",
|
|
1532
|
+
"rule": {
|
|
1533
|
+
"$ref": "#/rules@37"
|
|
1534
|
+
},
|
|
1535
|
+
"arguments": []
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
"$type": "Assignment",
|
|
1539
|
+
"feature": "description",
|
|
1540
|
+
"operator": "=",
|
|
1541
|
+
"terminal": {
|
|
1542
|
+
"$type": "RuleCall",
|
|
1543
|
+
"rule": {
|
|
1544
|
+
"$ref": "#/rules@32"
|
|
1545
|
+
},
|
|
1546
|
+
"arguments": []
|
|
1547
|
+
}
|
|
1548
|
+
},
|
|
1549
|
+
{
|
|
1550
|
+
"$type": "RuleCall",
|
|
1551
|
+
"rule": {
|
|
1552
|
+
"$ref": "#/rules@38"
|
|
1553
|
+
},
|
|
1554
|
+
"arguments": []
|
|
1555
|
+
}
|
|
1556
|
+
],
|
|
1557
|
+
"cardinality": "?"
|
|
1558
|
+
}
|
|
1559
|
+
]
|
|
1560
|
+
},
|
|
1561
|
+
"entry": false,
|
|
1562
|
+
"fragment": false,
|
|
1563
|
+
"parameters": []
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
"$type": "ParserRule",
|
|
1567
|
+
"name": "SwimlaneDeclaration",
|
|
1568
|
+
"definition": {
|
|
1569
|
+
"$type": "Group",
|
|
1570
|
+
"elements": [
|
|
1571
|
+
{
|
|
1572
|
+
"$type": "Keyword",
|
|
1573
|
+
"value": "swimlane"
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"$type": "Assignment",
|
|
1577
|
+
"feature": "name",
|
|
1578
|
+
"operator": "=",
|
|
1579
|
+
"terminal": {
|
|
1580
|
+
"$type": "RuleCall",
|
|
1581
|
+
"rule": {
|
|
1582
|
+
"$ref": "#/rules@49"
|
|
1583
|
+
},
|
|
1584
|
+
"arguments": []
|
|
1585
|
+
},
|
|
1586
|
+
"cardinality": "?"
|
|
1587
|
+
},
|
|
1588
|
+
{
|
|
1589
|
+
"$type": "Assignment",
|
|
1590
|
+
"feature": "title",
|
|
1591
|
+
"operator": "=",
|
|
1592
|
+
"terminal": {
|
|
1593
|
+
"$type": "RuleCall",
|
|
1594
|
+
"rule": {
|
|
1595
|
+
"$ref": "#/rules@41"
|
|
1596
|
+
},
|
|
1597
|
+
"arguments": []
|
|
1598
|
+
},
|
|
1599
|
+
"cardinality": "?"
|
|
1600
|
+
},
|
|
1601
|
+
{
|
|
1602
|
+
"$type": "Assignment",
|
|
1603
|
+
"feature": "properties",
|
|
1604
|
+
"operator": "+=",
|
|
1605
|
+
"terminal": {
|
|
1606
|
+
"$type": "RuleCall",
|
|
1607
|
+
"rule": {
|
|
1608
|
+
"$ref": "#/rules@33"
|
|
1609
|
+
},
|
|
1610
|
+
"arguments": []
|
|
1611
|
+
},
|
|
1612
|
+
"cardinality": "*"
|
|
1613
|
+
},
|
|
1614
|
+
{
|
|
1615
|
+
"$type": "Group",
|
|
1616
|
+
"elements": [
|
|
1617
|
+
{
|
|
1618
|
+
"$type": "RuleCall",
|
|
1619
|
+
"rule": {
|
|
1620
|
+
"$ref": "#/rules@37"
|
|
1621
|
+
},
|
|
1622
|
+
"arguments": []
|
|
1623
|
+
},
|
|
1624
|
+
{
|
|
1625
|
+
"$type": "Assignment",
|
|
1626
|
+
"feature": "content",
|
|
1627
|
+
"operator": "+=",
|
|
1628
|
+
"terminal": {
|
|
1629
|
+
"$type": "RuleCall",
|
|
1630
|
+
"rule": {
|
|
1631
|
+
"$ref": "#/rules@24"
|
|
1632
|
+
},
|
|
1633
|
+
"arguments": []
|
|
1634
|
+
},
|
|
1635
|
+
"cardinality": "+"
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
"$type": "RuleCall",
|
|
1639
|
+
"rule": {
|
|
1640
|
+
"$ref": "#/rules@38"
|
|
1641
|
+
},
|
|
1642
|
+
"arguments": []
|
|
1643
|
+
}
|
|
1644
|
+
],
|
|
1645
|
+
"cardinality": "?"
|
|
1646
|
+
}
|
|
1647
|
+
]
|
|
1648
|
+
},
|
|
1649
|
+
"entry": false,
|
|
1650
|
+
"fragment": false,
|
|
1651
|
+
"parameters": []
|
|
1652
|
+
},
|
|
1653
|
+
{
|
|
1654
|
+
"$type": "ParserRule",
|
|
1655
|
+
"name": "SwimlaneContent",
|
|
1656
|
+
"definition": {
|
|
1657
|
+
"$type": "Alternatives",
|
|
1658
|
+
"elements": [
|
|
1659
|
+
{
|
|
1660
|
+
"$type": "RuleCall",
|
|
1661
|
+
"rule": {
|
|
1662
|
+
"$ref": "#/rules@32"
|
|
1663
|
+
},
|
|
1664
|
+
"arguments": []
|
|
1665
|
+
},
|
|
1666
|
+
{
|
|
1667
|
+
"$type": "RuleCall",
|
|
1668
|
+
"rule": {
|
|
1669
|
+
"$ref": "#/rules@25"
|
|
1670
|
+
},
|
|
1671
|
+
"arguments": []
|
|
1672
|
+
},
|
|
1673
|
+
{
|
|
1674
|
+
"$type": "RuleCall",
|
|
1675
|
+
"rule": {
|
|
1676
|
+
"$ref": "#/rules@26"
|
|
1677
|
+
},
|
|
1678
|
+
"arguments": []
|
|
1679
|
+
},
|
|
1680
|
+
{
|
|
1681
|
+
"$type": "RuleCall",
|
|
1682
|
+
"rule": {
|
|
1683
|
+
"$ref": "#/rules@28"
|
|
1684
|
+
},
|
|
1685
|
+
"arguments": []
|
|
1686
|
+
}
|
|
1687
|
+
]
|
|
1688
|
+
},
|
|
1689
|
+
"entry": false,
|
|
1690
|
+
"fragment": false,
|
|
1691
|
+
"parameters": []
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
"$type": "ParserRule",
|
|
1695
|
+
"name": "ItemDeclaration",
|
|
1696
|
+
"definition": {
|
|
1697
|
+
"$type": "Group",
|
|
1698
|
+
"elements": [
|
|
1699
|
+
{
|
|
1700
|
+
"$type": "Keyword",
|
|
1701
|
+
"value": "item"
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
"$type": "Assignment",
|
|
1705
|
+
"feature": "name",
|
|
1706
|
+
"operator": "=",
|
|
1707
|
+
"terminal": {
|
|
1708
|
+
"$type": "RuleCall",
|
|
1709
|
+
"rule": {
|
|
1710
|
+
"$ref": "#/rules@49"
|
|
1711
|
+
},
|
|
1712
|
+
"arguments": []
|
|
1713
|
+
},
|
|
1714
|
+
"cardinality": "?"
|
|
1715
|
+
},
|
|
1716
|
+
{
|
|
1717
|
+
"$type": "Assignment",
|
|
1718
|
+
"feature": "title",
|
|
1719
|
+
"operator": "=",
|
|
1720
|
+
"terminal": {
|
|
1721
|
+
"$type": "RuleCall",
|
|
1722
|
+
"rule": {
|
|
1723
|
+
"$ref": "#/rules@41"
|
|
1724
|
+
},
|
|
1725
|
+
"arguments": []
|
|
1726
|
+
},
|
|
1727
|
+
"cardinality": "?"
|
|
1728
|
+
},
|
|
1729
|
+
{
|
|
1730
|
+
"$type": "Assignment",
|
|
1731
|
+
"feature": "properties",
|
|
1732
|
+
"operator": "+=",
|
|
1733
|
+
"terminal": {
|
|
1734
|
+
"$type": "RuleCall",
|
|
1735
|
+
"rule": {
|
|
1736
|
+
"$ref": "#/rules@33"
|
|
1737
|
+
},
|
|
1738
|
+
"arguments": []
|
|
1739
|
+
},
|
|
1740
|
+
"cardinality": "*"
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
"$type": "Group",
|
|
1744
|
+
"elements": [
|
|
1745
|
+
{
|
|
1746
|
+
"$type": "RuleCall",
|
|
1747
|
+
"rule": {
|
|
1748
|
+
"$ref": "#/rules@37"
|
|
1749
|
+
},
|
|
1750
|
+
"arguments": []
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
"$type": "Assignment",
|
|
1754
|
+
"feature": "description",
|
|
1755
|
+
"operator": "=",
|
|
1756
|
+
"terminal": {
|
|
1757
|
+
"$type": "RuleCall",
|
|
1758
|
+
"rule": {
|
|
1759
|
+
"$ref": "#/rules@32"
|
|
1760
|
+
},
|
|
1761
|
+
"arguments": []
|
|
1762
|
+
}
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
"$type": "RuleCall",
|
|
1766
|
+
"rule": {
|
|
1767
|
+
"$ref": "#/rules@38"
|
|
1768
|
+
},
|
|
1769
|
+
"arguments": []
|
|
1770
|
+
}
|
|
1771
|
+
],
|
|
1772
|
+
"cardinality": "?"
|
|
1773
|
+
}
|
|
1774
|
+
]
|
|
1775
|
+
},
|
|
1776
|
+
"entry": false,
|
|
1777
|
+
"fragment": false,
|
|
1778
|
+
"parameters": []
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"$type": "ParserRule",
|
|
1782
|
+
"name": "ParallelBlock",
|
|
1783
|
+
"definition": {
|
|
1784
|
+
"$type": "Group",
|
|
1785
|
+
"elements": [
|
|
1786
|
+
{
|
|
1787
|
+
"$type": "Keyword",
|
|
1788
|
+
"value": "parallel"
|
|
1789
|
+
},
|
|
1790
|
+
{
|
|
1791
|
+
"$type": "Assignment",
|
|
1792
|
+
"feature": "name",
|
|
1793
|
+
"operator": "=",
|
|
1794
|
+
"terminal": {
|
|
1795
|
+
"$type": "RuleCall",
|
|
1796
|
+
"rule": {
|
|
1797
|
+
"$ref": "#/rules@49"
|
|
1798
|
+
},
|
|
1799
|
+
"arguments": []
|
|
1800
|
+
},
|
|
1801
|
+
"cardinality": "?"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"$type": "Assignment",
|
|
1805
|
+
"feature": "title",
|
|
1806
|
+
"operator": "=",
|
|
1807
|
+
"terminal": {
|
|
1808
|
+
"$type": "RuleCall",
|
|
1809
|
+
"rule": {
|
|
1810
|
+
"$ref": "#/rules@41"
|
|
1811
|
+
},
|
|
1812
|
+
"arguments": []
|
|
1813
|
+
},
|
|
1814
|
+
"cardinality": "?"
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
"$type": "Assignment",
|
|
1818
|
+
"feature": "properties",
|
|
1819
|
+
"operator": "+=",
|
|
1820
|
+
"terminal": {
|
|
1821
|
+
"$type": "RuleCall",
|
|
1822
|
+
"rule": {
|
|
1823
|
+
"$ref": "#/rules@33"
|
|
1824
|
+
},
|
|
1825
|
+
"arguments": []
|
|
1826
|
+
},
|
|
1827
|
+
"cardinality": "*"
|
|
1828
|
+
},
|
|
1829
|
+
{
|
|
1830
|
+
"$type": "RuleCall",
|
|
1831
|
+
"rule": {
|
|
1832
|
+
"$ref": "#/rules@37"
|
|
1833
|
+
},
|
|
1834
|
+
"arguments": []
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
"$type": "Assignment",
|
|
1838
|
+
"feature": "content",
|
|
1839
|
+
"operator": "+=",
|
|
1840
|
+
"terminal": {
|
|
1841
|
+
"$type": "RuleCall",
|
|
1842
|
+
"rule": {
|
|
1843
|
+
"$ref": "#/rules@27"
|
|
1844
|
+
},
|
|
1845
|
+
"arguments": []
|
|
1846
|
+
},
|
|
1847
|
+
"cardinality": "+"
|
|
1848
|
+
},
|
|
1849
|
+
{
|
|
1850
|
+
"$type": "RuleCall",
|
|
1851
|
+
"rule": {
|
|
1852
|
+
"$ref": "#/rules@38"
|
|
1853
|
+
},
|
|
1854
|
+
"arguments": []
|
|
1855
|
+
}
|
|
1856
|
+
]
|
|
1857
|
+
},
|
|
1858
|
+
"entry": false,
|
|
1859
|
+
"fragment": false,
|
|
1860
|
+
"parameters": []
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
"$type": "ParserRule",
|
|
1864
|
+
"name": "ParallelContent",
|
|
1865
|
+
"definition": {
|
|
1866
|
+
"$type": "Alternatives",
|
|
1867
|
+
"elements": [
|
|
1868
|
+
{
|
|
1869
|
+
"$type": "RuleCall",
|
|
1870
|
+
"rule": {
|
|
1871
|
+
"$ref": "#/rules@32"
|
|
1872
|
+
},
|
|
1873
|
+
"arguments": []
|
|
1874
|
+
},
|
|
1875
|
+
{
|
|
1876
|
+
"$type": "RuleCall",
|
|
1877
|
+
"rule": {
|
|
1878
|
+
"$ref": "#/rules@25"
|
|
1879
|
+
},
|
|
1880
|
+
"arguments": []
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
"$type": "RuleCall",
|
|
1884
|
+
"rule": {
|
|
1885
|
+
"$ref": "#/rules@28"
|
|
1886
|
+
},
|
|
1887
|
+
"arguments": []
|
|
1888
|
+
}
|
|
1889
|
+
]
|
|
1890
|
+
},
|
|
1891
|
+
"entry": false,
|
|
1892
|
+
"fragment": false,
|
|
1893
|
+
"parameters": []
|
|
1894
|
+
},
|
|
1895
|
+
{
|
|
1896
|
+
"$type": "ParserRule",
|
|
1897
|
+
"name": "GroupBlock",
|
|
1898
|
+
"definition": {
|
|
1899
|
+
"$type": "Group",
|
|
1900
|
+
"elements": [
|
|
1901
|
+
{
|
|
1902
|
+
"$type": "Keyword",
|
|
1903
|
+
"value": "group"
|
|
1904
|
+
},
|
|
1905
|
+
{
|
|
1906
|
+
"$type": "Assignment",
|
|
1907
|
+
"feature": "name",
|
|
1908
|
+
"operator": "=",
|
|
1909
|
+
"terminal": {
|
|
1910
|
+
"$type": "RuleCall",
|
|
1911
|
+
"rule": {
|
|
1912
|
+
"$ref": "#/rules@49"
|
|
1913
|
+
},
|
|
1914
|
+
"arguments": []
|
|
1915
|
+
},
|
|
1916
|
+
"cardinality": "?"
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
"$type": "Assignment",
|
|
1920
|
+
"feature": "title",
|
|
1921
|
+
"operator": "=",
|
|
1922
|
+
"terminal": {
|
|
1923
|
+
"$type": "RuleCall",
|
|
1924
|
+
"rule": {
|
|
1925
|
+
"$ref": "#/rules@41"
|
|
1926
|
+
},
|
|
1927
|
+
"arguments": []
|
|
1928
|
+
},
|
|
1929
|
+
"cardinality": "?"
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
"$type": "Assignment",
|
|
1933
|
+
"feature": "properties",
|
|
1934
|
+
"operator": "+=",
|
|
1935
|
+
"terminal": {
|
|
1936
|
+
"$type": "RuleCall",
|
|
1937
|
+
"rule": {
|
|
1938
|
+
"$ref": "#/rules@33"
|
|
1939
|
+
},
|
|
1940
|
+
"arguments": []
|
|
1941
|
+
},
|
|
1942
|
+
"cardinality": "*"
|
|
1943
|
+
},
|
|
1944
|
+
{
|
|
1945
|
+
"$type": "RuleCall",
|
|
1946
|
+
"rule": {
|
|
1947
|
+
"$ref": "#/rules@37"
|
|
1948
|
+
},
|
|
1949
|
+
"arguments": []
|
|
1950
|
+
},
|
|
1951
|
+
{
|
|
1952
|
+
"$type": "Assignment",
|
|
1953
|
+
"feature": "content",
|
|
1954
|
+
"operator": "+=",
|
|
1955
|
+
"terminal": {
|
|
1956
|
+
"$type": "RuleCall",
|
|
1957
|
+
"rule": {
|
|
1958
|
+
"$ref": "#/rules@29"
|
|
1959
|
+
},
|
|
1960
|
+
"arguments": []
|
|
1961
|
+
},
|
|
1962
|
+
"cardinality": "+"
|
|
1963
|
+
},
|
|
1964
|
+
{
|
|
1965
|
+
"$type": "RuleCall",
|
|
1966
|
+
"rule": {
|
|
1967
|
+
"$ref": "#/rules@38"
|
|
1968
|
+
},
|
|
1969
|
+
"arguments": []
|
|
1970
|
+
}
|
|
1971
|
+
]
|
|
1972
|
+
},
|
|
1973
|
+
"entry": false,
|
|
1974
|
+
"fragment": false,
|
|
1975
|
+
"parameters": []
|
|
1976
|
+
},
|
|
1977
|
+
{
|
|
1978
|
+
"$type": "ParserRule",
|
|
1979
|
+
"name": "GroupContent",
|
|
1980
|
+
"definition": {
|
|
1981
|
+
"$type": "Alternatives",
|
|
1982
|
+
"elements": [
|
|
1983
|
+
{
|
|
1984
|
+
"$type": "RuleCall",
|
|
1985
|
+
"rule": {
|
|
1986
|
+
"$ref": "#/rules@32"
|
|
1987
|
+
},
|
|
1988
|
+
"arguments": []
|
|
1989
|
+
},
|
|
1990
|
+
{
|
|
1991
|
+
"$type": "RuleCall",
|
|
1992
|
+
"rule": {
|
|
1993
|
+
"$ref": "#/rules@25"
|
|
1994
|
+
},
|
|
1995
|
+
"arguments": []
|
|
1996
|
+
},
|
|
1997
|
+
{
|
|
1998
|
+
"$type": "RuleCall",
|
|
1999
|
+
"rule": {
|
|
2000
|
+
"$ref": "#/rules@26"
|
|
2001
|
+
},
|
|
2002
|
+
"arguments": []
|
|
2003
|
+
},
|
|
2004
|
+
{
|
|
2005
|
+
"$type": "RuleCall",
|
|
2006
|
+
"rule": {
|
|
2007
|
+
"$ref": "#/rules@28"
|
|
2008
|
+
},
|
|
2009
|
+
"arguments": []
|
|
2010
|
+
}
|
|
2011
|
+
]
|
|
2012
|
+
},
|
|
2013
|
+
"entry": false,
|
|
2014
|
+
"fragment": false,
|
|
2015
|
+
"parameters": []
|
|
2016
|
+
},
|
|
2017
|
+
{
|
|
2018
|
+
"$type": "ParserRule",
|
|
2019
|
+
"name": "MilestoneDeclaration",
|
|
2020
|
+
"definition": {
|
|
2021
|
+
"$type": "Group",
|
|
2022
|
+
"elements": [
|
|
2023
|
+
{
|
|
2024
|
+
"$type": "Keyword",
|
|
2025
|
+
"value": "milestone"
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
"$type": "Assignment",
|
|
2029
|
+
"feature": "name",
|
|
2030
|
+
"operator": "=",
|
|
2031
|
+
"terminal": {
|
|
2032
|
+
"$type": "RuleCall",
|
|
2033
|
+
"rule": {
|
|
2034
|
+
"$ref": "#/rules@49"
|
|
2035
|
+
},
|
|
2036
|
+
"arguments": []
|
|
2037
|
+
},
|
|
2038
|
+
"cardinality": "?"
|
|
2039
|
+
},
|
|
2040
|
+
{
|
|
2041
|
+
"$type": "Assignment",
|
|
2042
|
+
"feature": "title",
|
|
2043
|
+
"operator": "=",
|
|
2044
|
+
"terminal": {
|
|
2045
|
+
"$type": "RuleCall",
|
|
2046
|
+
"rule": {
|
|
2047
|
+
"$ref": "#/rules@41"
|
|
2048
|
+
},
|
|
2049
|
+
"arguments": []
|
|
2050
|
+
},
|
|
2051
|
+
"cardinality": "?"
|
|
2052
|
+
},
|
|
2053
|
+
{
|
|
2054
|
+
"$type": "Assignment",
|
|
2055
|
+
"feature": "properties",
|
|
2056
|
+
"operator": "+=",
|
|
2057
|
+
"terminal": {
|
|
2058
|
+
"$type": "RuleCall",
|
|
2059
|
+
"rule": {
|
|
2060
|
+
"$ref": "#/rules@33"
|
|
2061
|
+
},
|
|
2062
|
+
"arguments": []
|
|
2063
|
+
},
|
|
2064
|
+
"cardinality": "*"
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
"$type": "Group",
|
|
2068
|
+
"elements": [
|
|
2069
|
+
{
|
|
2070
|
+
"$type": "RuleCall",
|
|
2071
|
+
"rule": {
|
|
2072
|
+
"$ref": "#/rules@37"
|
|
2073
|
+
},
|
|
2074
|
+
"arguments": []
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
"$type": "Assignment",
|
|
2078
|
+
"feature": "description",
|
|
2079
|
+
"operator": "=",
|
|
2080
|
+
"terminal": {
|
|
2081
|
+
"$type": "RuleCall",
|
|
2082
|
+
"rule": {
|
|
2083
|
+
"$ref": "#/rules@32"
|
|
2084
|
+
},
|
|
2085
|
+
"arguments": []
|
|
2086
|
+
}
|
|
2087
|
+
},
|
|
2088
|
+
{
|
|
2089
|
+
"$type": "RuleCall",
|
|
2090
|
+
"rule": {
|
|
2091
|
+
"$ref": "#/rules@38"
|
|
2092
|
+
},
|
|
2093
|
+
"arguments": []
|
|
2094
|
+
}
|
|
2095
|
+
],
|
|
2096
|
+
"cardinality": "?"
|
|
2097
|
+
}
|
|
2098
|
+
]
|
|
2099
|
+
},
|
|
2100
|
+
"entry": false,
|
|
2101
|
+
"fragment": false,
|
|
2102
|
+
"parameters": []
|
|
2103
|
+
},
|
|
2104
|
+
{
|
|
2105
|
+
"$type": "ParserRule",
|
|
2106
|
+
"name": "FootnoteDeclaration",
|
|
2107
|
+
"definition": {
|
|
2108
|
+
"$type": "Group",
|
|
2109
|
+
"elements": [
|
|
2110
|
+
{
|
|
2111
|
+
"$type": "Keyword",
|
|
2112
|
+
"value": "footnote"
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
"$type": "Assignment",
|
|
2116
|
+
"feature": "name",
|
|
2117
|
+
"operator": "=",
|
|
2118
|
+
"terminal": {
|
|
2119
|
+
"$type": "RuleCall",
|
|
2120
|
+
"rule": {
|
|
2121
|
+
"$ref": "#/rules@49"
|
|
2122
|
+
},
|
|
2123
|
+
"arguments": []
|
|
2124
|
+
},
|
|
2125
|
+
"cardinality": "?"
|
|
2126
|
+
},
|
|
2127
|
+
{
|
|
2128
|
+
"$type": "Assignment",
|
|
2129
|
+
"feature": "title",
|
|
2130
|
+
"operator": "=",
|
|
2131
|
+
"terminal": {
|
|
2132
|
+
"$type": "RuleCall",
|
|
2133
|
+
"rule": {
|
|
2134
|
+
"$ref": "#/rules@41"
|
|
2135
|
+
},
|
|
2136
|
+
"arguments": []
|
|
2137
|
+
},
|
|
2138
|
+
"cardinality": "?"
|
|
2139
|
+
},
|
|
2140
|
+
{
|
|
2141
|
+
"$type": "Assignment",
|
|
2142
|
+
"feature": "properties",
|
|
2143
|
+
"operator": "+=",
|
|
2144
|
+
"terminal": {
|
|
2145
|
+
"$type": "RuleCall",
|
|
2146
|
+
"rule": {
|
|
2147
|
+
"$ref": "#/rules@33"
|
|
2148
|
+
},
|
|
2149
|
+
"arguments": []
|
|
2150
|
+
},
|
|
2151
|
+
"cardinality": "*"
|
|
2152
|
+
},
|
|
2153
|
+
{
|
|
2154
|
+
"$type": "Group",
|
|
2155
|
+
"elements": [
|
|
2156
|
+
{
|
|
2157
|
+
"$type": "RuleCall",
|
|
2158
|
+
"rule": {
|
|
2159
|
+
"$ref": "#/rules@37"
|
|
2160
|
+
},
|
|
2161
|
+
"arguments": []
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
"$type": "Assignment",
|
|
2165
|
+
"feature": "description",
|
|
2166
|
+
"operator": "=",
|
|
2167
|
+
"terminal": {
|
|
2168
|
+
"$type": "RuleCall",
|
|
2169
|
+
"rule": {
|
|
2170
|
+
"$ref": "#/rules@32"
|
|
2171
|
+
},
|
|
2172
|
+
"arguments": []
|
|
2173
|
+
}
|
|
2174
|
+
},
|
|
2175
|
+
{
|
|
2176
|
+
"$type": "RuleCall",
|
|
2177
|
+
"rule": {
|
|
2178
|
+
"$ref": "#/rules@38"
|
|
2179
|
+
},
|
|
2180
|
+
"arguments": []
|
|
2181
|
+
}
|
|
2182
|
+
],
|
|
2183
|
+
"cardinality": "?"
|
|
2184
|
+
}
|
|
2185
|
+
]
|
|
2186
|
+
},
|
|
2187
|
+
"entry": false,
|
|
2188
|
+
"fragment": false,
|
|
2189
|
+
"parameters": []
|
|
2190
|
+
},
|
|
2191
|
+
{
|
|
2192
|
+
"$type": "ParserRule",
|
|
2193
|
+
"name": "DescriptionDirective",
|
|
2194
|
+
"definition": {
|
|
2195
|
+
"$type": "Group",
|
|
2196
|
+
"elements": [
|
|
2197
|
+
{
|
|
2198
|
+
"$type": "Keyword",
|
|
2199
|
+
"value": "description"
|
|
2200
|
+
},
|
|
2201
|
+
{
|
|
2202
|
+
"$type": "Assignment",
|
|
2203
|
+
"feature": "text",
|
|
2204
|
+
"operator": "=",
|
|
2205
|
+
"terminal": {
|
|
2206
|
+
"$type": "RuleCall",
|
|
2207
|
+
"rule": {
|
|
2208
|
+
"$ref": "#/rules@41"
|
|
2209
|
+
},
|
|
2210
|
+
"arguments": []
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
]
|
|
2214
|
+
},
|
|
2215
|
+
"entry": false,
|
|
2216
|
+
"fragment": false,
|
|
2217
|
+
"parameters": []
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
"$type": "ParserRule",
|
|
2221
|
+
"name": "EntityProperty",
|
|
2222
|
+
"definition": {
|
|
2223
|
+
"$type": "Group",
|
|
2224
|
+
"elements": [
|
|
2225
|
+
{
|
|
2226
|
+
"$type": "Assignment",
|
|
2227
|
+
"feature": "key",
|
|
2228
|
+
"operator": "=",
|
|
2229
|
+
"terminal": {
|
|
2230
|
+
"$type": "RuleCall",
|
|
2231
|
+
"rule": {
|
|
2232
|
+
"$ref": "#/rules@48"
|
|
2233
|
+
},
|
|
2234
|
+
"arguments": []
|
|
2235
|
+
}
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
"$type": "Alternatives",
|
|
2239
|
+
"elements": [
|
|
2240
|
+
{
|
|
2241
|
+
"$type": "Assignment",
|
|
2242
|
+
"feature": "value",
|
|
2243
|
+
"operator": "=",
|
|
2244
|
+
"terminal": {
|
|
2245
|
+
"$type": "RuleCall",
|
|
2246
|
+
"rule": {
|
|
2247
|
+
"$ref": "#/rules@36"
|
|
2248
|
+
},
|
|
2249
|
+
"arguments": []
|
|
2250
|
+
}
|
|
2251
|
+
},
|
|
2252
|
+
{
|
|
2253
|
+
"$type": "Group",
|
|
2254
|
+
"elements": [
|
|
2255
|
+
{
|
|
2256
|
+
"$type": "Keyword",
|
|
2257
|
+
"value": "["
|
|
2258
|
+
},
|
|
2259
|
+
{
|
|
2260
|
+
"$type": "Assignment",
|
|
2261
|
+
"feature": "values",
|
|
2262
|
+
"operator": "+=",
|
|
2263
|
+
"terminal": {
|
|
2264
|
+
"$type": "RuleCall",
|
|
2265
|
+
"rule": {
|
|
2266
|
+
"$ref": "#/rules@36"
|
|
2267
|
+
},
|
|
2268
|
+
"arguments": []
|
|
2269
|
+
}
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
"$type": "Group",
|
|
2273
|
+
"elements": [
|
|
2274
|
+
{
|
|
2275
|
+
"$type": "Keyword",
|
|
2276
|
+
"value": ","
|
|
2277
|
+
},
|
|
2278
|
+
{
|
|
2279
|
+
"$type": "Assignment",
|
|
2280
|
+
"feature": "values",
|
|
2281
|
+
"operator": "+=",
|
|
2282
|
+
"terminal": {
|
|
2283
|
+
"$type": "RuleCall",
|
|
2284
|
+
"rule": {
|
|
2285
|
+
"$ref": "#/rules@36"
|
|
2286
|
+
},
|
|
2287
|
+
"arguments": []
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
],
|
|
2291
|
+
"cardinality": "*"
|
|
2292
|
+
},
|
|
2293
|
+
{
|
|
2294
|
+
"$type": "Keyword",
|
|
2295
|
+
"value": "]"
|
|
2296
|
+
}
|
|
2297
|
+
]
|
|
2298
|
+
}
|
|
2299
|
+
]
|
|
2300
|
+
}
|
|
2301
|
+
]
|
|
2302
|
+
},
|
|
2303
|
+
"entry": false,
|
|
2304
|
+
"fragment": false,
|
|
2305
|
+
"parameters": []
|
|
2306
|
+
},
|
|
2307
|
+
{
|
|
2308
|
+
"$type": "ParserRule",
|
|
2309
|
+
"name": "BlockProperty",
|
|
2310
|
+
"definition": {
|
|
2311
|
+
"$type": "Group",
|
|
2312
|
+
"elements": [
|
|
2313
|
+
{
|
|
2314
|
+
"$type": "Assignment",
|
|
2315
|
+
"feature": "key",
|
|
2316
|
+
"operator": "=",
|
|
2317
|
+
"terminal": {
|
|
2318
|
+
"$type": "RuleCall",
|
|
2319
|
+
"rule": {
|
|
2320
|
+
"$ref": "#/rules@48"
|
|
2321
|
+
},
|
|
2322
|
+
"arguments": []
|
|
2323
|
+
}
|
|
2324
|
+
},
|
|
2325
|
+
{
|
|
2326
|
+
"$type": "Assignment",
|
|
2327
|
+
"feature": "value",
|
|
2328
|
+
"operator": "=",
|
|
2329
|
+
"terminal": {
|
|
2330
|
+
"$type": "RuleCall",
|
|
2331
|
+
"rule": {
|
|
2332
|
+
"$ref": "#/rules@7"
|
|
2333
|
+
},
|
|
2334
|
+
"arguments": []
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
]
|
|
2338
|
+
},
|
|
2339
|
+
"entry": false,
|
|
2340
|
+
"fragment": false,
|
|
2341
|
+
"parameters": []
|
|
2342
|
+
},
|
|
2343
|
+
{
|
|
2344
|
+
"$type": "ParserRule",
|
|
2345
|
+
"name": "StyleProperty",
|
|
2346
|
+
"definition": {
|
|
2347
|
+
"$type": "Group",
|
|
2348
|
+
"elements": [
|
|
2349
|
+
{
|
|
2350
|
+
"$type": "Assignment",
|
|
2351
|
+
"feature": "key",
|
|
2352
|
+
"operator": "=",
|
|
2353
|
+
"terminal": {
|
|
2354
|
+
"$type": "RuleCall",
|
|
2355
|
+
"rule": {
|
|
2356
|
+
"$ref": "#/rules@48"
|
|
2357
|
+
},
|
|
2358
|
+
"arguments": []
|
|
2359
|
+
}
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
"$type": "Assignment",
|
|
2363
|
+
"feature": "value",
|
|
2364
|
+
"operator": "=",
|
|
2365
|
+
"terminal": {
|
|
2366
|
+
"$type": "RuleCall",
|
|
2367
|
+
"rule": {
|
|
2368
|
+
"$ref": "#/rules@10"
|
|
2369
|
+
},
|
|
2370
|
+
"arguments": []
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
]
|
|
2374
|
+
},
|
|
2375
|
+
"entry": false,
|
|
2376
|
+
"fragment": false,
|
|
2377
|
+
"parameters": []
|
|
2378
|
+
},
|
|
2379
|
+
{
|
|
2380
|
+
"$type": "ParserRule",
|
|
2381
|
+
"name": "PropertyAtom",
|
|
2382
|
+
"dataType": "string",
|
|
2383
|
+
"definition": {
|
|
2384
|
+
"$type": "Alternatives",
|
|
2385
|
+
"elements": [
|
|
2386
|
+
{
|
|
2387
|
+
"$type": "RuleCall",
|
|
2388
|
+
"rule": {
|
|
2389
|
+
"$ref": "#/rules@49"
|
|
2390
|
+
},
|
|
2391
|
+
"arguments": []
|
|
2392
|
+
},
|
|
2393
|
+
{
|
|
2394
|
+
"$type": "RuleCall",
|
|
2395
|
+
"rule": {
|
|
2396
|
+
"$ref": "#/rules@41"
|
|
2397
|
+
},
|
|
2398
|
+
"arguments": []
|
|
2399
|
+
},
|
|
2400
|
+
{
|
|
2401
|
+
"$type": "RuleCall",
|
|
2402
|
+
"rule": {
|
|
2403
|
+
"$ref": "#/rules@43"
|
|
2404
|
+
},
|
|
2405
|
+
"arguments": []
|
|
2406
|
+
},
|
|
2407
|
+
{
|
|
2408
|
+
"$type": "RuleCall",
|
|
2409
|
+
"rule": {
|
|
2410
|
+
"$ref": "#/rules@44"
|
|
2411
|
+
},
|
|
2412
|
+
"arguments": []
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
"$type": "RuleCall",
|
|
2416
|
+
"rule": {
|
|
2417
|
+
"$ref": "#/rules@40"
|
|
2418
|
+
},
|
|
2419
|
+
"arguments": []
|
|
2420
|
+
},
|
|
2421
|
+
{
|
|
2422
|
+
"$type": "RuleCall",
|
|
2423
|
+
"rule": {
|
|
2424
|
+
"$ref": "#/rules@42"
|
|
2425
|
+
},
|
|
2426
|
+
"arguments": []
|
|
2427
|
+
},
|
|
2428
|
+
{
|
|
2429
|
+
"$type": "RuleCall",
|
|
2430
|
+
"rule": {
|
|
2431
|
+
"$ref": "#/rules@45"
|
|
2432
|
+
},
|
|
2433
|
+
"arguments": []
|
|
2434
|
+
},
|
|
2435
|
+
{
|
|
2436
|
+
"$type": "RuleCall",
|
|
2437
|
+
"rule": {
|
|
2438
|
+
"$ref": "#/rules@46"
|
|
2439
|
+
},
|
|
2440
|
+
"arguments": []
|
|
2441
|
+
},
|
|
2442
|
+
{
|
|
2443
|
+
"$type": "RuleCall",
|
|
2444
|
+
"rule": {
|
|
2445
|
+
"$ref": "#/rules@47"
|
|
2446
|
+
},
|
|
2447
|
+
"arguments": []
|
|
2448
|
+
},
|
|
2449
|
+
{
|
|
2450
|
+
"$type": "Keyword",
|
|
2451
|
+
"value": "person"
|
|
2452
|
+
}
|
|
2453
|
+
]
|
|
2454
|
+
},
|
|
2455
|
+
"entry": false,
|
|
2456
|
+
"fragment": false,
|
|
2457
|
+
"parameters": []
|
|
2458
|
+
},
|
|
2459
|
+
{
|
|
2460
|
+
"$type": "TerminalRule",
|
|
2461
|
+
"name": "INDENT",
|
|
2462
|
+
"definition": {
|
|
2463
|
+
"$type": "RegexToken",
|
|
2464
|
+
"regex": "/\\\\x01/",
|
|
2465
|
+
"parenthesized": false
|
|
2466
|
+
},
|
|
2467
|
+
"fragment": false,
|
|
2468
|
+
"hidden": false
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
"$type": "TerminalRule",
|
|
2472
|
+
"name": "DEDENT",
|
|
2473
|
+
"definition": {
|
|
2474
|
+
"$type": "RegexToken",
|
|
2475
|
+
"regex": "/\\\\x02/",
|
|
2476
|
+
"parenthesized": false
|
|
2477
|
+
},
|
|
2478
|
+
"fragment": false,
|
|
2479
|
+
"hidden": false
|
|
2480
|
+
},
|
|
2481
|
+
{
|
|
2482
|
+
"$type": "TerminalRule",
|
|
2483
|
+
"name": "INCLUDE_OPTION_KEY",
|
|
2484
|
+
"definition": {
|
|
2485
|
+
"$type": "RegexToken",
|
|
2486
|
+
"regex": "/(config|roadmap):/",
|
|
2487
|
+
"parenthesized": false
|
|
2488
|
+
},
|
|
2489
|
+
"fragment": false,
|
|
2490
|
+
"hidden": false
|
|
2491
|
+
},
|
|
2492
|
+
{
|
|
2493
|
+
"$type": "TerminalRule",
|
|
2494
|
+
"name": "URL",
|
|
2495
|
+
"definition": {
|
|
2496
|
+
"$type": "RegexToken",
|
|
2497
|
+
"regex": "/https?:\\\\/\\\\/[^\\\\s\\\\[\\\\],]+/",
|
|
2498
|
+
"parenthesized": false
|
|
2499
|
+
},
|
|
2500
|
+
"fragment": false,
|
|
2501
|
+
"hidden": false
|
|
2502
|
+
},
|
|
2503
|
+
{
|
|
2504
|
+
"$type": "TerminalRule",
|
|
2505
|
+
"name": "STRING",
|
|
2506
|
+
"definition": {
|
|
2507
|
+
"$type": "RegexToken",
|
|
2508
|
+
"regex": "/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"/",
|
|
2509
|
+
"parenthesized": false
|
|
2510
|
+
},
|
|
2511
|
+
"fragment": false,
|
|
2512
|
+
"hidden": false
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
"$type": "TerminalRule",
|
|
2516
|
+
"name": "DATE_LITERAL",
|
|
2517
|
+
"definition": {
|
|
2518
|
+
"$type": "RegexToken",
|
|
2519
|
+
"regex": "/\\\\d{4}-\\\\d{2}-\\\\d{2}/",
|
|
2520
|
+
"parenthesized": false
|
|
2521
|
+
},
|
|
2522
|
+
"fragment": false,
|
|
2523
|
+
"hidden": false
|
|
2524
|
+
},
|
|
2525
|
+
{
|
|
2526
|
+
"$type": "TerminalRule",
|
|
2527
|
+
"name": "DURATION_LITERAL",
|
|
2528
|
+
"definition": {
|
|
2529
|
+
"$type": "RegexToken",
|
|
2530
|
+
"regex": "/\\\\d+(\\\\.\\\\d+)?[dwmqy]/",
|
|
2531
|
+
"parenthesized": false
|
|
2532
|
+
},
|
|
2533
|
+
"fragment": false,
|
|
2534
|
+
"hidden": false
|
|
2535
|
+
},
|
|
2536
|
+
{
|
|
2537
|
+
"$type": "TerminalRule",
|
|
2538
|
+
"name": "PERCENTAGE",
|
|
2539
|
+
"definition": {
|
|
2540
|
+
"$type": "RegexToken",
|
|
2541
|
+
"regex": "/\\\\d+(\\\\.\\\\d+)?%/",
|
|
2542
|
+
"parenthesized": false
|
|
2543
|
+
},
|
|
2544
|
+
"fragment": false,
|
|
2545
|
+
"hidden": false
|
|
2546
|
+
},
|
|
2547
|
+
{
|
|
2548
|
+
"$type": "TerminalRule",
|
|
2549
|
+
"name": "COLOR_HEX",
|
|
2550
|
+
"definition": {
|
|
2551
|
+
"$type": "RegexToken",
|
|
2552
|
+
"regex": "/#[0-9a-fA-F]{3,8}/",
|
|
2553
|
+
"parenthesized": false
|
|
2554
|
+
},
|
|
2555
|
+
"fragment": false,
|
|
2556
|
+
"hidden": false
|
|
2557
|
+
},
|
|
2558
|
+
{
|
|
2559
|
+
"$type": "TerminalRule",
|
|
2560
|
+
"name": "DECIMAL",
|
|
2561
|
+
"definition": {
|
|
2562
|
+
"$type": "RegexToken",
|
|
2563
|
+
"regex": "/\\\\d+\\\\.\\\\d+/",
|
|
2564
|
+
"parenthesized": false
|
|
2565
|
+
},
|
|
2566
|
+
"fragment": false,
|
|
2567
|
+
"hidden": false
|
|
2568
|
+
},
|
|
2569
|
+
{
|
|
2570
|
+
"$type": "TerminalRule",
|
|
2571
|
+
"name": "INTEGER",
|
|
2572
|
+
"definition": {
|
|
2573
|
+
"$type": "RegexToken",
|
|
2574
|
+
"regex": "/\\\\d+/",
|
|
2575
|
+
"parenthesized": false
|
|
2576
|
+
},
|
|
2577
|
+
"fragment": false,
|
|
2578
|
+
"hidden": false
|
|
2579
|
+
},
|
|
2580
|
+
{
|
|
2581
|
+
"$type": "TerminalRule",
|
|
2582
|
+
"name": "PROPERTY_KEY_WITH_COLON",
|
|
2583
|
+
"definition": {
|
|
2584
|
+
"$type": "RegexToken",
|
|
2585
|
+
"regex": "/[a-zA-Z_][a-zA-Z0-9_-]*:/",
|
|
2586
|
+
"parenthesized": false
|
|
2587
|
+
},
|
|
2588
|
+
"fragment": false,
|
|
2589
|
+
"hidden": false
|
|
2590
|
+
},
|
|
2591
|
+
{
|
|
2592
|
+
"$type": "TerminalRule",
|
|
2593
|
+
"name": "ID",
|
|
2594
|
+
"definition": {
|
|
2595
|
+
"$type": "RegexToken",
|
|
2596
|
+
"regex": "/[a-zA-Z_][a-zA-Z0-9_-]*/",
|
|
2597
|
+
"parenthesized": false
|
|
2598
|
+
},
|
|
2599
|
+
"fragment": false,
|
|
2600
|
+
"hidden": false
|
|
2601
|
+
},
|
|
2602
|
+
{
|
|
2603
|
+
"$type": "TerminalRule",
|
|
2604
|
+
"hidden": true,
|
|
2605
|
+
"name": "WS",
|
|
2606
|
+
"definition": {
|
|
2607
|
+
"$type": "RegexToken",
|
|
2608
|
+
"regex": "/[\\\\t ]+/",
|
|
2609
|
+
"parenthesized": false
|
|
2610
|
+
},
|
|
2611
|
+
"fragment": false
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
"$type": "TerminalRule",
|
|
2615
|
+
"hidden": true,
|
|
2616
|
+
"name": "NL",
|
|
2617
|
+
"definition": {
|
|
2618
|
+
"$type": "RegexToken",
|
|
2619
|
+
"regex": "/[\\\\r\\\\n]+/",
|
|
2620
|
+
"parenthesized": false
|
|
2621
|
+
},
|
|
2622
|
+
"fragment": false
|
|
2623
|
+
},
|
|
2624
|
+
{
|
|
2625
|
+
"$type": "TerminalRule",
|
|
2626
|
+
"hidden": true,
|
|
2627
|
+
"name": "SL_COMMENT",
|
|
2628
|
+
"definition": {
|
|
2629
|
+
"$type": "RegexToken",
|
|
2630
|
+
"regex": "/\\\\/\\\\/[^\\\\r\\\\n]*/",
|
|
2631
|
+
"parenthesized": false
|
|
2632
|
+
},
|
|
2633
|
+
"fragment": false
|
|
2634
|
+
},
|
|
2635
|
+
{
|
|
2636
|
+
"$type": "TerminalRule",
|
|
2637
|
+
"hidden": true,
|
|
2638
|
+
"name": "ML_COMMENT",
|
|
2639
|
+
"definition": {
|
|
2640
|
+
"$type": "RegexToken",
|
|
2641
|
+
"regex": "/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//",
|
|
2642
|
+
"parenthesized": false
|
|
2643
|
+
},
|
|
2644
|
+
"fragment": false
|
|
2645
|
+
},
|
|
2646
|
+
{
|
|
2647
|
+
"$type": "TerminalRule",
|
|
2648
|
+
"hidden": true,
|
|
2649
|
+
"name": "LINE_CONTINUATION",
|
|
2650
|
+
"definition": {
|
|
2651
|
+
"$type": "RegexToken",
|
|
2652
|
+
"regex": "/\\\\\\\\[ \\\\t]*\\\\r?\\\\n[ \\\\t]*/",
|
|
2653
|
+
"parenthesized": false
|
|
2654
|
+
},
|
|
2655
|
+
"fragment": false
|
|
2656
|
+
}
|
|
2657
|
+
],
|
|
2658
|
+
"imports": [],
|
|
2659
|
+
"interfaces": [],
|
|
2660
|
+
"types": []
|
|
2661
|
+
}`));var MF={languageId:"nowline",fileExtensions:[".nowline"],caseInsensitive:!1,mode:"development"},zI={AstReflection:()=>new ru},VI={Grammar:()=>WI(),LanguageMetaData:()=>MF,parser:{}};var KI={"NL.E0001":()=>"Config section must appear before roadmap.","NL.E0002":()=>"Include declarations must appear before the config section.","NL.E0003":()=>"Include declarations must appear before the roadmap section.","NL.E0004":()=>"At least one swimlane is required.","NL.E0005":t=>`Line ${t.line}: mixed tabs and spaces in indentation. Use either tabs or spaces consistently.`,"NL.E0100":t=>`Invalid version format "${t.version}". Expected format: v1, v2, etc.`,"NL.E0101":t=>`This file requires Nowline ${t.version}, but the parser only supports up to ${t.supported}.`,"NL.E0102":t=>`Unknown directive property "${t.key}". Allowed: ${t.allowed}.`,"NL.E0103":t=>`Duplicate directive property "${t.key}".`,"NL.E0104":t=>`Invalid locale "${t.value}". Use a BCP-47 tag like "en-US", "fr", or "fr-CA".`,"NL.E0200":t=>`Invalid include mode "${t.value}". Must be merge, ignore, or isolate.`,"NL.E0201":t=>`Duplicate "${t.key}" option on include.`,"NL.E0300":t=>`Duplicate identifier "${t.name}". First declared at ${t.location}.`,"NL.E0301":t=>`${t.type} must have an identifier, a title, or both.`,"NL.E0400":t=>`Invalid duration "${t.value}". Use a raw duration literal like 0.5d, 2w, 1m, 2q. Use "size:NAME" to reference a declared size.`,"NL.E0401":t=>`Invalid size "${t.value}". Use the id of a declared size (e.g. xs, m, lg).`,"NL.E0402":t=>`Invalid effort "${t.value}". Use a raw duration literal like 0.5d, 2w, 1m, 2q.`,"NL.E0403":t=>`Invalid remaining value "${t.value}". Use a percentage like 30% or a duration literal like 1w, 0.5d.`,"NL.E0404":t=>`Remaining must be between 0% and 100%, got ${t.value}.`,"NL.E0405":t=>`Invalid ${t.key} "${t.value}". Use ISO 8601 format: YYYY-MM-DD.`,"NL.E0406":t=>`Invalid scale "${t.value}". Use a raw duration literal like 1w, 2w, 1q (no name lookup).`,"NL.E0407":t=>`Invalid calendar "${t.value}". Must be business, full, or custom.`,"NL.E0408":t=>`Property "${t.key}" requires at least one reference.`,"NL.E0500":t=>`Anchor "${t.name}" requires a "date:" property.`,"NL.E0501":t=>`Anchor "${t.name}" has a date but the roadmap is missing "start:". Add start:YYYY-MM-DD to the roadmap.`,"NL.E0502":t=>`Anchor "${t.name}" date ${t.date} is before roadmap start ${t.start}.`,"NL.E0503":t=>`Milestone "${t.name}" requires at least one of "date:" or "after:".`,"NL.E0504":t=>`Milestone "${t.name}" date ${t.date} is before roadmap start ${t.start}.`,"NL.E0505":()=>'Footnote requires an "on:" property referencing one or more entities.',"NL.E0600":t=>`Item "${t.name}" requires a "size:" or "duration:" property.`,"NL.W0700":t=>`Unknown property "${t.key}" on ${t.entity}. The renderer ignores it.${t.suggested?` Did you mean "${t.suggested}"?`:""}`};var YI={"NL.E0001":()=>"La section config doit pr\xE9c\xE9der la section roadmap.","NL.E0002":()=>"Les d\xE9clarations include doivent pr\xE9c\xE9der la section config.","NL.E0003":()=>"Les d\xE9clarations include doivent pr\xE9c\xE9der la section roadmap.","NL.E0004":()=>"Au moins une swimlane est requise.","NL.E0005":t=>`Ligne ${t.line}\xA0: tabulations et espaces m\xE9lang\xE9s dans l'indentation. Utilisez l'un ou l'autre, mais pas les deux.`,"NL.E0100":t=>`Format de version invalide \xAB\xA0${t.version}\xA0\xBB. Format attendu\xA0: v1, v2, etc.`,"NL.E0101":t=>`Ce fichier requiert Nowline ${t.version}, mais l'analyseur ne prend en charge que jusqu'\xE0 ${t.supported}.`,"NL.E0102":t=>`Propri\xE9t\xE9 de directive inconnue \xAB\xA0${t.key}\xA0\xBB. Valeurs admises\xA0: ${t.allowed}.`,"NL.E0103":t=>`Propri\xE9t\xE9 de directive \xAB\xA0${t.key}\xA0\xBB en double.`,"NL.E0104":t=>`Locale invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez une \xE9tiquette BCP-47 telle que \xAB\xA0en-US\xA0\xBB, \xAB\xA0fr\xA0\xBB ou \xAB\xA0fr-CA\xA0\xBB.`,"NL.E0200":t=>`Mode d'include invalide \xAB\xA0${t.value}\xA0\xBB. Doit \xEAtre merge, ignore ou isolate.`,"NL.E0201":t=>`Option \xAB\xA0${t.key}\xA0\xBB en double sur include.`,"NL.E0300":t=>`Identifiant en double \xAB\xA0${t.name}\xA0\xBB. Premi\xE8re d\xE9claration \xE0 ${t.location}.`,"NL.E0301":t=>`${t.type} doit comporter un identifiant, un titre, ou les deux.`,"NL.E0400":t=>`Dur\xE9e invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 0.5d, 2w, 1m, 2q. Utilisez \xAB\xA0size:NOM\xA0\xBB pour r\xE9f\xE9rencer une taille d\xE9clar\xE9e.`,"NL.E0401":t=>`Taille invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez l'identifiant d'une taille d\xE9clar\xE9e (p.\xA0ex. xs, m, lg).`,"NL.E0402":t=>`Effort invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 0.5d, 2w, 1m, 2q.`,"NL.E0403":t=>`Valeur restante invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez un pourcentage tel que 30% ou un litt\xE9ral de dur\xE9e comme 1w, 0.5d.`,"NL.E0404":t=>`La valeur restante doit \xEAtre comprise entre 0 % et 100 %, re\xE7u ${t.value}.`,"NL.E0405":t=>`${t.key} invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez le format ISO 8601\xA0: AAAA-MM-JJ.`,"NL.E0406":t=>`\xC9chelle invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 1w, 2w, 1q (pas de recherche par nom).`,"NL.E0407":t=>`Calendrier invalide \xAB\xA0${t.value}\xA0\xBB. Doit \xEAtre business, full ou custom.`,"NL.E0408":t=>`La propri\xE9t\xE9 \xAB\xA0${t.key}\xA0\xBB exige au moins une r\xE9f\xE9rence.`,"NL.E0500":t=>`L'ancre \xAB\xA0${t.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0date:\xA0\xBB.`,"NL.E0501":t=>`L'ancre \xAB\xA0${t.name}\xA0\xBB a une date, mais \xAB\xA0start:\xA0\xBB manque sur la roadmap. Ajoutez start:AAAA-MM-JJ \xE0 la roadmap.`,"NL.E0502":t=>`La date ${t.date} de l'ancre \xAB\xA0${t.name}\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${t.start}).`,"NL.E0503":t=>`Le jalon \xAB\xA0${t.name}\xA0\xBB exige au moins l'une des propri\xE9t\xE9s \xAB\xA0date:\xA0\xBB ou \xAB\xA0after:\xA0\xBB.`,"NL.E0504":t=>`La date ${t.date} du jalon \xAB\xA0${t.name}\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${t.start}).`,"NL.E0505":()=>"Une note de bas de page exige une propri\xE9t\xE9 \xAB\xA0on:\xA0\xBB r\xE9f\xE9ren\xE7ant au moins une entit\xE9.","NL.E0600":t=>`L'\xE9l\xE9ment \xAB\xA0${t.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0size:\xA0\xBB ou \xAB\xA0duration:\xA0\xBB.`,"NL.W0700":t=>`Propri\xE9t\xE9 inconnue \xAB\xA0${t.key}\xA0\xBB sur ${t.entity}. Le moteur de rendu l'ignore.${t.suggested?` Vouliez-vous dire \xAB\xA0${t.suggested}\xA0\xBB\xA0?`:""}`};var ZI={};var JI={};var FF=new Map([["en-US",KI],["fr",YI],["fr-CA",ZI],["fr-FR",JI]]);function ev(t,e,...r){for(let n of UF(t)){let o=FF.get(n)?.[e];if(o)return o(...r)}return e}var QI="en-US";function UF(t){let e=[],r=BF(t);for(;r.length>0;){e.includes(r)||e.push(r);let n=r.lastIndexOf("-");if(n<=0)break;r=r.slice(0,n)}return e.includes(QI)||e.push(QI),e}function BF(t){return t.split("-").map((r,n)=>n===0?r.toLowerCase():/^[a-zA-Z]{2}$/.test(r)?r.toUpperCase():r).join("-")}var XF=/[\\/]/;function nv(t){for(let e=t.length-1;e>=0;e--){let r=t.charCodeAt(e);if(r===47||r===92)return e}return-1}function tv(...t){for(let e of t)if(e){if(e.includes("\\")&&!e.includes("/"))return"\\";if(e.includes("/"))return"/"}return"/"}function GF(t){return t?t[0]==="/"||t[0]==="\\"?!0:t.length>=3&&/^[A-Za-z]:[\\/]/.test(t):!1}function iv(t){let e=nv(t);return e<0?".":e===0?t[0]:e===2&&/^[A-Za-z]:[\\/]/.test(t)?t.slice(0,3):t.slice(0,e)}function $p(t){let e=nv(t);return e<0?t:t.slice(e+1)}function kT(t,e){if(GF(e))return rv(e,tv(e));let r=tv(t,e);return rv(`${t}${r}${e}`,r)}function rv(t,e){let r="",n=t,i=/^([A-Za-z]:)([\\/])?/.exec(n);i?(r=i[1]+(i[2]?e:""),n=n.slice(i[0].length)):(n[0]==="/"||n[0]==="\\")&&(r=e,n=n.replace(/^[\\/]+/,""));let o=[];for(let s of n.split(XF))if(!(s===""||s===".")){if(s===".."){o.length>0&&o[o.length-1]!==".."?o.pop():r||o.push("..");continue}o.push(s)}return r+o.join(e)}var jF=/^\d{4}-\d{2}-\d{2}$/;function av(t){let e=t?.properties.find(r=>r.key==="start");if(e?.value&&jF.test(e.value)&&!Number.isNaN(new Date(e.value).getTime()))return e.value}function qF(t,e,r){return e&&r?`Included "${t}" declares start:${r}, which doesn't match this file's start:${e}. Both files must declare the same start date, or neither should.`:e?`Included "${t}" has no start:, but this file declares start:${e}. Both files must declare the same start date, or neither should.`:`Included "${t}" declares start:${r}, but this file has no start:. Both files must declare the same start date, or neither should.`}function cv(){return{styles:new Map,defaults:new Map,symbols:new Map}}function lv(){return{persons:new Map,teams:new Map,anchors:new Map,labels:new Map,sizes:new Map,statuses:new Map,swimlanes:new Map,milestones:new Map,footnotes:new Map,isolatedRegions:[]}}async function NT(t,e,r){let n=r.readFile??(async c=>{let{nodeReadFile:l}=await Promise.resolve().then(()=>(sv(),ov));return l(c)}),i={services:r.services,diagnostics:[],resolving:[],processed:new Map,readFile:n},o=kT("",e),{config:s,content:a}=await fv(t,o,i);return{config:s,content:a,diagnostics:i.diagnostics,processedFiles:new Set(i.processed.keys())}}async function fv(t,e,r){if(r.processed.has(e))return r.processed.get(e);if(r.resolving.includes(e)){r.diagnostics.push({severity:"error",message:`Circular include detected: ${[...r.resolving,e].join(" \u2192 ")}`,sourcePath:e});let a={config:cv(),content:lv()};return r.processed.set(e,a),a}r.resolving.push(e);let n=cv(),i=lv();KF(n,t),ZF(i,t);let o=new Set;for(let a of t.includes){let c=a.path,l=kT(iv(e),c);if(o.has(l)){r.diagnostics.push({severity:"error",message:`Duplicate include "${c}" in ${$p(e)}.`,sourcePath:e,line:a.$cstNode?.range.start.line});continue}o.add(l);let u=uv(a,"config")??"merge",f=uv(a,"roadmap")??"merge",d;try{let y=await r.readFile(l);d=await WF(r.services,y,l)}catch(y){r.diagnostics.push({severity:"error",message:`Could not read include "${c}": ${y.message}`,sourcePath:e,line:a.$cstNode?.range.start.line});continue}let{config:p,content:g}=await fv(d,l,r);if(zF(n,p,u,l,r.diagnostics),VF(i,g,p,f,l,c,r.diagnostics),f==="isolate"&&!g.roadmap&&r.diagnostics.push({severity:"error",message:`Cannot isolate "${c}": it has no roadmap declaration.`,sourcePath:e,line:a.$cstNode?.range.start.line}),f!=="ignore"&&d.roadmapDecl){let y=av(t.roadmapDecl),_=av(d.roadmapDecl);y!==_&&r.diagnostics.push({severity:"error",message:qF(c,y,_),sourcePath:e,line:a.$cstNode?.range.start.line})}}r.resolving.pop();let s={config:n,content:i};return r.processed.set(e,s),s}function uv(t,e){let r=t.options.find(n=>n.key===e);if(r&&(r.value==="merge"||r.value==="ignore"||r.value==="isolate"))return r.value}async function WF(t,e,r){let n=ht.file(r),o=t.shared.workspace.LangiumDocumentFactory.fromString(e,n);return await t.shared.workspace.DocumentBuilder.build([o],{validation:!1}),o.parseResult.value}function zF(t,e,r,n,i){if(r==="ignore"||r==="isolate")return;let o=(s,a)=>i.push({severity:"warning",message:`${a} "${s}" from ${$p(n)} is shadowed by the parent's definition.`,sourcePath:n});Ar(t.styles,e.styles,s=>o(s,"Style")),Ar(t.defaults,e.defaults,s=>o(s,"Default")),Ar(t.symbols,e.symbols,s=>o(s,"Symbol")),e.scale&&!t.scale&&(t.scale=e.scale),e.calendar&&!t.calendar&&(t.calendar=e.calendar)}function VF(t,e,r,n,i,o,s){if(n==="ignore")return;if(n==="isolate"){e.roadmap&&t.isolatedRegions.push({sourcePath:o,config:r,content:e});return}let a=(c,l)=>s.push({severity:"warning",message:`${l} "${c}" from ${$p(i)} is shadowed by the parent's definition.`,sourcePath:i});Ar(t.persons,e.persons,c=>a(c,"Person")),Ar(t.teams,e.teams,c=>a(c,"Team")),Ar(t.anchors,e.anchors,c=>a(c,"Anchor")),Ar(t.labels,e.labels,c=>a(c,"Label")),Ar(t.sizes,e.sizes,c=>a(c,"Size")),Ar(t.statuses,e.statuses,c=>a(c,"Status")),Ar(t.swimlanes,e.swimlanes,c=>a(c,"Swimlane")),Ar(t.milestones,e.milestones,c=>a(c,"Milestone")),Ar(t.footnotes,e.footnotes,c=>a(c,"Footnote")),e.roadmap&&!t.roadmap&&(t.roadmap=e.roadmap)}function Ar(t,e,r){for(let[n,i]of e){if(t.has(n)){r(n);continue}t.set(n,i)}}function KF(t,e){for(let r of e.configEntries)YF(t,r)}function YF(t,e){jI(e)?t.scale||(t.scale=e):Cp(e)?t.calendar||(t.calendar=e):iu(e)?e.name&&!t.styles.has(e.name)&&t.styles.set(e.name,e):ou(e)?e.name&&!t.symbols.has(e.name)&&t.symbols.set(e.name,e):vi(e)&&(t.defaults.has(e.entityType)||t.defaults.set(e.entityType,e))}function ZF(t,e){e.roadmapDecl&&!t.roadmap&&(t.roadmap=e.roadmapDecl);for(let r of e.roadmapEntries)JF(t,r)}function JF(t,e){mn(e)?e.name&&!t.swimlanes.has(e.name)&&t.swimlanes.set(e.name,e):ki(e)?e.name&&!t.persons.has(e.name)&&t.persons.set(e.name,e):Xr(e)?e.name&&!t.teams.has(e.name)&&t.teams.set(e.name,e):Np(e)?e.name&&!t.anchors.has(e.name)&&t.anchors.set(e.name,e):Op(e)?e.name&&!t.labels.has(e.name)&&t.labels.set(e.name,e):Da(e)?e.name&&!t.sizes.has(e.name)&&t.sizes.set(e.name,e):nu(e)?e.name&&!t.statuses.has(e.name)&&t.statuses.set(e.name,e):Lp(e)?e.name&&!t.milestones.has(e.name)&&t.milestones.set(e.name,e):Pp(e)&&e.name&&!t.footnotes.has(e.name)&&t.footnotes.set(e.name,e)}var dv="v1",CT=new Set(["planned","in-progress","active","done","completed","at-risk","blocked"]),Dp=new Set(["bg","fg","text","border","icon","shadow","font","weight","italic","text-size","padding","spacing","header-height","corner-radius","bracket","header-position","capacity-icon","timeline-position","minor-grid"]),$T=new Set(["none","multiplier","person","people","points","time"]),Mp=new Set([...$T,"shield","warning","lock"]),bv="none",Fp={border:new Set(["solid","dashed","dotted"]),shadow:new Set(["none","subtle","soft","hard"]),font:new Set(["sans","serif","mono"]),weight:new Set(["thin","light","normal","bold"]),italic:new Set(["true","false"]),"text-size":new Set(["none","xs","sm","md","lg","xl"]),padding:new Set(["none","xs","sm","md","lg","xl"]),spacing:new Set(["none","xs","sm","md","lg","xl"]),"header-height":new Set(["none","xs","sm","md","lg","xl"]),"corner-radius":new Set(["none","xs","sm","md","lg","xl","full"]),bracket:new Set(["none","solid","dashed"]),"header-position":new Set(["beside","above"]),"timeline-position":new Set(["top","bottom","both"]),"minor-grid":new Set(["true","false"])},QF=new Set(["red","blue","yellow","green","orange","purple","violet","gray","grey","navy","white","none"]),eU=new Set(["business","full","custom"]),PT=new Set(["days-per-week","days-per-month","days-per-quarter","days-per-year"]),pv=new Set(["name","label-every","label"]),hv=new Set(["item","label","swimlane","roadmap","milestone","footnote","anchor","parallel","group"]),tU={item:new Set(["size","duration","after","before","remaining","link","description","owner"]),milestone:new Set(["date","after","link","description"]),anchor:new Set(["date","link","description"]),footnote:new Set(["on","link","description"]),label:new Set(["link","description"]),swimlane:new Set(["capacity"]),roadmap:new Set,parallel:new Set,group:new Set},mv=new Set(["labels","link","style","description"]),rU={RoadmapDeclaration:new Set(["author","start","length","scale","calendar","logo","logo-size"]),AnchorDeclaration:new Set(["date"]),SwimlaneDeclaration:new Set(["owner","capacity","utilization-warn-at","utilization-over-at","status","after","before"]),ItemDeclaration:new Set(["size","duration","status","owner","after","before","remaining","capacity","date","start"]),ParallelBlock:new Set(["owner","after","before","status"]),GroupBlock:new Set(["owner","after","before","status"]),MilestoneDeclaration:new Set(["date","after"]),FootnoteDeclaration:new Set(["on"]),PersonDeclaration:new Set,TeamDeclaration:new Set,LabelDeclaration:new Set,SizeDeclaration:new Set(["effort"]),StatusDeclaration:new Set};function nU(t,e,r){if(t===e)return 0;let n=t.length,i=e.length;if(Math.abs(n-i)>r)return r+1;if(n===0)return i;if(i===0)return n;let o=new Array(i+1),s=new Array(i+1);for(let a=0;a<=i;a++)o[a]=a;for(let a=1;a<=n;a++){s[0]=a;let c=a;for(let u=1;u<=i;u++){let f=t.charCodeAt(a-1)===e.charCodeAt(u-1)?0:1;s[u]=Math.min(o[u]+1,s[u-1]+1,o[u-1]+f),s[u]<c&&(c=s[u])}if(c>r)return r+1;let l=o;o=s,s=l}return o[i]}function iU(t,e,r=2){let n,i=r+1;for(let o of e){let s=nU(t,o,r);if(s<i&&(n=o,i=s,s===0))break}return n}function Ne(t){return t.key.endsWith(":")?t.key.slice(0,-1):t.key}var su=/^\d+(?:\.\d+)?[dwmqy]$/,oU=/^\d+%$/,Bp=/^\d{4}-\d{2}-\d{2}$/,sU=/^#[0-9a-fA-F]{3,8}$/,aU=/^v\d+$/,gv=/^\d+$/,cU=/^[dwmqy]$/,yv=/^\d+(\.\d+)?$/,DT=/^\d+(\.\d+)?%$/,wv=/^\d+\.\d+$/,lU=/^\d+$/,uU=/^[\x20-\x7E]{1,3}$/,fU=/^[a-zA-Z]{2,3}(-[a-zA-Z]{2}|-\d{3})?$/,dU=new Set(["merge","ignore","isolate"]),xv=new Set(["locale"]);function Tv(t){let e=t?.roadmapDecl?.properties.find(i=>Ne(i)==="start");if(!e)return{kind:"missing"};let r=e.value;if(!r||!Bp.test(r))return{kind:"invalid"};let n=new Date(r);return Number.isNaN(n.getTime())?{kind:"invalid"}:{kind:"valid",iso:r,date:n}}function Gr(t){return t.name??t.title??"<unnamed>"}function $e(t,e,r,n,...i){t(e,ev("en-US",n,...i),{...r,data:{code:n,args:i}})}function Av(t){let e=t.validation.ValidationRegistry,r=t.validation.NowlineValidator,n={NowlineFile:[r.checkFileStructure,r.checkUniqueIdentifiers,r.checkSwimlaneRequired,r.checkIndentationConsistency,r.checkRoadmapOnlyKeywordsPosition,r.checkForwardReferences,r.checkReferenceResolution,r.checkCircularDependencies,r.checkDuplicateSizeIds,r.checkCalendarBlockConsistency,r.checkPersonDeclarations,r.checkDuplicateSymbolIds,r.checkSymbolReferences],NowlineDirective:[r.checkDirectiveVersion,r.checkDirectiveProperties],IncludeOption:[r.checkIncludeMode],IncludeDeclaration:[r.checkIncludeDuplicateOptions],EntityProperty:[r.checkPropertyValues],RoadmapDeclaration:[r.checkEntityIdOrTitle,r.checkRoadmapProperties,r.checkNoRawStyleProperties,r.checkUnknownEntityProperties],AnchorDeclaration:[r.checkEntityIdOrTitle,r.checkAnchorRequiredDate,r.checkAnchorAgainstStart,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],SwimlaneDeclaration:[r.checkEntityIdOrTitle,r.checkNoRawStyleProperties,r.checkUtilizationOrdering,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],ItemDeclaration:[r.checkEntityIdOrTitle,r.checkItemRequiredDuration,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],ParallelBlock:[r.checkParallelMinChildren,r.checkNoComputedProperties,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],GroupBlock:[r.checkGroupMinChildren,r.checkNoComputedProperties,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],MilestoneDeclaration:[r.checkEntityIdOrTitle,r.checkMilestoneRequirement,r.checkMilestoneAgainstStart,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],FootnoteDeclaration:[r.checkEntityIdOrTitle,r.checkFootnoteOn,r.checkNoRawStyleProperties,r.checkUnknownEntityProperties],PersonDeclaration:[r.checkEntityIdOrTitle,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],TeamDeclaration:[r.checkEntityIdOrTitle,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],StyleDeclaration:[r.checkEntityIdOrTitle],StyleProperty:[r.checkStylePropertyEnum],SymbolDeclaration:[r.checkEntityIdOrTitle,r.checkSymbolDeclaration],LabelDeclaration:[r.checkEntityIdOrTitle,r.checkNoRawStyleProperties,r.checkUnknownEntityProperties],SizeDeclaration:[r.checkEntityIdOrTitle,r.checkSizeDeclaration,r.checkNoRawStyleProperties,r.checkUnknownEntityProperties],StatusDeclaration:[r.checkEntityIdOrTitle,r.checkStatusDeclaration,r.checkNoRawStyleProperties,r.checkUnknownEntityProperties],DefaultDeclaration:[r.checkDefaultDeclaration,r.checkUtilizationOrdering],CalendarBlock:[r.checkCalendarBlock],ScaleBlock:[r.checkScaleBlock]};e.register(n,r)}var Xp=class{checkFileStructure(e,r){let n=e.hasConfig?ds.findNodeForKeyword(e.$cstNode,"config")?.offset:void 0,i=e.roadmapDecl?.$cstNode?.offset;n!==void 0&&i!==void 0&&n>i&&$e(r,"error",{node:e,property:"hasConfig"},"NL.E0001");for(let o of e.includes){let s=o.$cstNode?.offset??0;n!==void 0&&s>n&&$e(r,"error",{node:o},"NL.E0002"),i!==void 0&&s>i&&$e(r,"error",{node:o},"NL.E0003")}}checkRoadmapOnlyKeywordsPosition(e,r){}checkDirectiveVersion(e,r){if(!aU.test(e.version)){$e(r,"error",{node:e,property:"version"},"NL.E0100",{version:e.version});return}let n=parseInt(e.version.slice(1),10),i=parseInt(dv.slice(1),10);n>i&&$e(r,"error",{node:e,property:"version"},"NL.E0101",{version:e.version,supported:dv})}checkDirectiveProperties(e,r){let n=new Set;for(let i of e.properties){let o=Ne(i);if(!xv.has(o)){$e(r,"error",{node:i,property:"key"},"NL.E0102",{key:o,allowed:[...xv].join(", ")});continue}if(n.has(o)&&$e(r,"error",{node:i,property:"key"},"NL.E0103",{key:o}),n.add(o),o==="locale"){let s=i.value;fU.test(s)||$e(r,"error",{node:i,property:"value"},"NL.E0104",{value:s})}}}checkEntityIdOrTitle(e,r){!e.name&&!e.title&&$e(r,"error",{node:e},"NL.E0301",{type:e.$type})}checkUniqueIdentifiers(e,r){let n=new Map,i=(o,s)=>{if(!o)return;let a=n.get(o);a?$e(r,"error",{node:s},"NL.E0300",{name:o,location:Up(a)}):n.set(o,s)};e.roadmapDecl?.name&&i(e.roadmapDecl.name,e.roadmapDecl);for(let o of e.roadmapEntries)mU(o,i);for(let o of e.configEntries)iu(o)&&o.name&&i(o.name,o)}checkIndentationConsistency(e,r){let n=e.$document?.textDocument.getText()??e.$cstNode?.text;if(!n)return;let i=n.split(/\r?\n/);for(let o=0;o<i.length;o++){let s=i[o];if(s.length===0)continue;let a=s.match(/^([\t ]+)/);if(!a)continue;let c=a[1];if(c.includes(" ")&&c.includes(" ")){$e(r,"error",{node:e},"NL.E0005",{line:o+1});return}}}checkSwimlaneRequired(e,r){let n=e.roadmapEntries.some(mn);e.roadmapDecl&&!n&&$e(r,"error",{node:e.roadmapDecl},"NL.E0004")}checkIncludeMode(e,r){dU.has(e.value)||$e(r,"error",{node:e,property:"value"},"NL.E0200",{value:e.value})}checkIncludeDuplicateOptions(e,r){let n=new Set;for(let i of e.options){let o=i.key.replace(/:$/,"");n.has(o)&&$e(r,"error",{node:i},"NL.E0201",{key:o}),n.add(o)}}checkPropertyValues(e,r){let n=Ne(e),i=e.value,o=e.values,s=i?[i]:o;switch(n){case"status":break;case"duration":i&&!su.test(i)&&$e(r,"error",{node:e,property:"value"},"NL.E0400",{value:i});break;case"size":i&&!Ev(i)&&$e(r,"error",{node:e,property:"value"},"NL.E0401",{value:i});break;case"effort":i&&!su.test(i)&&$e(r,"error",{node:e,property:"value"},"NL.E0402",{value:i});break;case"remaining":{if(i)if(oU.test(i)){let a=parseFloat(i);(a<0||a>100)&&$e(r,"error",{node:e,property:"value"},"NL.E0404",{value:i})}else su.test(i)||$e(r,"error",{node:e,property:"value"},"NL.E0403",{value:i});break}case"date":case"start":i&&(!Bp.test(i)||Number.isNaN(new Date(i).getTime()))&&$e(r,"error",{node:e,property:"value"},"NL.E0405",{key:n,value:i});break;case"scale":i&&!su.test(i)&&$e(r,"error",{node:e,property:"value"},"NL.E0406",{value:i});break;case"calendar":i&&!eU.has(i)&&$e(r,"error",{node:e,property:"value"},"NL.E0407",{value:i});break;case"on":case"after":case"before":s.length===0&&$e(r,"error",{node:e},"NL.E0408",{key:n});break;case"capacity":{if(!i)break;let a=e.$container,c=pU(a);if(c==="invalid")break;c==="lane"?(!yv.test(i)||parseFloat(i)<=0)&&r("error",`Invalid swimlane capacity "${i}". Use a positive integer (e.g. capacity:5) or decimal (e.g. capacity:1.5). Percent literals are not allowed on swimlanes.`,{node:e,property:"value"}):DT.test(i)?parseFloat(i)<=0&&r("error",`Item capacity "${i}" must be positive.`,{node:e,property:"value"}):yv.test(i)?parseFloat(i)<=0&&r("error",`Item capacity "${i}" must be positive.`,{node:e,property:"value"}):r("error",`Invalid item capacity "${i}". Use a positive integer (capacity:2), decimal (capacity:0.5), or percent literal (capacity:50%).`,{node:e,property:"value"});break}case"overcapacity":{r("error",'"overcapacity:" was removed. Use "utilization-over-at:none" (and/or "utilization-warn-at:none") to suppress the lane utilization underline.',{node:e});break}case"utilization-warn-at":case"utilization-over-at":{if(!i)break;if(!hU(e.$container)){r("error",`"${n}:" is only valid on "swimlane" or "default swimlane".`,{node:e});break}if(i===bv)break;if(DT.test(i)){parseFloat(i)<=0&&r("error",`${n} value "${i}" must be positive.`,{node:e,property:"value"});break}if(wv.test(i)){parseFloat(i)<=0&&r("error",`${n} value "${i}" must be positive.`,{node:e,property:"value"});break}if(lU.test(i)){r("error",`Ambiguous ${n} value "${i}". Use the percent form ("${i}%") or the decimal-fraction form ("0.${i}") to make the intent explicit.`,{node:e,property:"value"});break}r("error",`Invalid ${n} value "${i}". Use a positive percent (e.g. 80%), a positive decimal fraction (e.g. 0.8), or "none" to opt out.`,{node:e,property:"value"});break}case"capacity-icon":break;case"icon":break;default:if(Dp.has(n)){if(n==="bg"||n==="fg"||n==="text")i&&!OT(i)&&r("error",`Invalid color "${i}" for "${n}". Use a named color, hex value, or "none".`,{node:e,property:"value"});else if(n in Fp){let a=Fp[n];i&&!a.has(i)&&!OT(i)&&r("error",`Invalid value "${i}" for "${n}". Allowed: ${[...a].join(", ")}.`,{node:e,property:"value"})}}break}}checkAnchorRequiredDate(e,r){e.properties.find(i=>Ne(i)==="date")||$e(r,"error",{node:e},"NL.E0500",{name:Gr(e)})}checkAnchorAgainstStart(e,r){let n=e.properties.find(a=>Ne(a)==="date");if(!n?.value)return;let i=n.value;if(!Bp.test(i))return;let o=new Date(i);if(Number.isNaN(o.getTime()))return;let s=Tv(e.$container);switch(s.kind){case"invalid":return;case"missing":$e(r,"error",{node:n,property:"value"},"NL.E0501",{name:Gr(e)});return;case"valid":o<s.date&&$e(r,"error",{node:n,property:"value"},"NL.E0502",{name:Gr(e),date:i,start:s.iso});return}}checkMilestoneRequirement(e,r){let n=e.properties.some(o=>Ne(o)==="date"),i=e.properties.some(o=>Ne(o)==="after");!n&&!i&&$e(r,"error",{node:e},"NL.E0503",{name:Gr(e)})}checkMilestoneAgainstStart(e,r){let n=e.properties.find(a=>Ne(a)==="date");if(!n?.value)return;let i=n.value;if(!Bp.test(i))return;let o=new Date(i);if(Number.isNaN(o.getTime()))return;let s=Tv(e.$container);switch(s.kind){case"invalid":return;case"missing":r("error",`Milestone "${Gr(e)}" has a date but the roadmap is missing "start:". Add start:YYYY-MM-DD to the roadmap.`,{node:n,property:"value"});return;case"valid":o<s.date&&$e(r,"error",{node:n,property:"value"},"NL.E0504",{name:Gr(e),date:i,start:s.iso});return}}checkFootnoteOn(e,r){e.properties.some(i=>Ne(i)==="on")||$e(r,"error",{node:e},"NL.E0505")}checkNoFootnoteProperty(e,r){for(let n of e.properties)Ne(n)==="footnote"&&r("error",`Property "footnote:" is not valid on ${LT(e)}. Footnotes attach via "on:" on the footnote declaration \u2014 declare \`footnote <id> on:<target-id>\` instead.`,{node:n})}checkItemRequiredDuration(e,r){let n=e.properties.some(o=>Ne(o)==="duration"),i=e.properties.some(o=>Ne(o)==="size");!n&&!i&&$e(r,"error",{node:e},"NL.E0600",{name:Gr(e)})}checkNoComputedProperties(e,r){for(let n of e.properties){let i=Ne(n);(i==="size"||i==="duration"||i==="remaining"||i==="capacity")&&r("error",`"${i}" is not valid on ${e.$type==="ParallelBlock"?"parallel":"group"} (computed from children).`,{node:n})}}checkParallelMinChildren(e,r){let n=e.content.filter(i=>!vT(i));n.length===0?r("error","Parallel block must contain at least 2 children.",{node:e}):n.length===1&&r("warning","Parallel block has only 1 child. Use at least 2 for parallel execution.",{node:e})}checkGroupMinChildren(e,r){e.content.filter(i=>!vT(i)).length===0&&r("error","Group must contain at least 1 child.",{node:e})}checkNoRawStyleProperties(e,r){for(let n of e.properties){let i=Ne(n);Dp.has(i)&&r("error",`Raw style property "${i}" is not allowed on ${LT(e)}. Declare a named style in config and reference it via "style:id".`,{node:n})}}checkUnknownEntityProperties(e,r){let n=rU[e.$type];if(!n)return;let i=e.$type==="ParallelBlock"||e.$type==="GroupBlock"?new Set(["size","duration","remaining","capacity"]):null;for(let o of e.properties){let s=Ne(o);if(n.has(s)||mv.has(s)||Dp.has(s)||s==="footnote"||i?.has(s))continue;let a=[...n,...mv],c=iU(s,a)??"";$e(r,"warning",{node:o,property:"key"},"NL.W0700",{key:s,entity:LT(e),suggested:c})}}checkRoadmapProperties(e,r){}checkStylePropertyEnum(e,r){let n=Ne(e),i=e.value;if(n==="bg"||n==="fg"||n==="text")OT(i)||r("error",`Invalid color "${i}" for "${n}". Use a named color, hex value, or "none".`,{node:e,property:"value"});else if(n in Fp){let o=Fp[n];o.has(i)||r("error",`Invalid value "${i}" for "${n}". Allowed: ${[...o].join(", ")}.`,{node:e,property:"value"})}else Dp.has(n)||r("error",`Unknown style property "${n}".`,{node:e,property:"key"})}checkSizeDeclaration(e,r){e.properties.find(i=>Ne(i)==="effort")||r("error",`Size "${Gr(e)}" requires an "effort:" property.`,{node:e}),e.name&&(su.test(e.name)||cU.test(e.name))&&r("error",`Size id "${e.name}" collides with the raw duration pattern. Choose a different name (e.g. "xs", "small", "quarter").`,{node:e,property:"name"})}checkStatusDeclaration(e,r){e.name&&CT.has(e.name)&&r("error",`Status id "${e.name}" collides with the built-in status value. Built-ins: ${[...CT].join(", ")}.`,{node:e,property:"name"})}checkDuplicateSizeIds(e,r){let n=new Map;for(let i of e.roadmapEntries)if(Da(i)&&i.name){let o=n.get(i.name);o?r("error",`Duplicate size id "${i.name}". First declared at ${Up(o)}.`,{node:i,property:"name"}):n.set(i.name,i)}}checkUtilizationOrdering(e,r){if(vi(e)&&e.entityType!=="swimlane")return;let n=e.properties.find(a=>Ne(a)==="utilization-warn-at"),i=e.properties.find(a=>Ne(a)==="utilization-over-at");if(!n||!i)return;let o=_v(n.value),s=_v(i.value);o===null||s===null||o>s&&r("error",`utilization-warn-at (${n.value}) must be \u2264 utilization-over-at (${i.value}). Warn fires below over; if both fire at the same point, the warn band collapses to zero.`,{node:n,property:"value"})}checkDefaultDeclaration(e,r){if(!hv.has(e.entityType)){r("error",`"${e.entityType}" is not a supported entity type for default. Allowed: ${[...hv].join(", ")}.`,{node:e,property:"entityType"});return}let n=e.$container,i=-1;for(let s=0;s<n.configEntries.length;s++){let a=n.configEntries[s];if(vi(a)&&a.entityType===e.entityType){if(i<0)i=s;else if(a===e){r("error",`Duplicate "default ${e.entityType}" declaration. Only one is allowed per entity type per file.`,{node:e});break}}}let o=tU[e.entityType];if(o)for(let s of e.properties){let a=Ne(s);o.has(a)&&r("error",`"${a}" cannot be set on "default ${e.entityType}". Identity-defining, sizing, sequencing, reference, and prose properties must be explicit on each entity.`,{node:s})}}checkCalendarBlockConsistency(e,r){let n=e.configEntries.filter(Cp),o=e.roadmapDecl?.properties.find(s=>Ne(s)==="calendar")?.value;if(n.length>0&&o!=="custom")for(let s of n)r("error",'A "calendar" config block is only valid when the roadmap declares calendar:custom.',{node:s});if(o==="custom"&&n.length===0&&r("error",'calendar:custom requires a "calendar" config block with days-per-week, days-per-month, days-per-quarter, and days-per-year.',{node:e.roadmapDecl,property:"properties"}),o==="custom"&&n.length>0)for(let s of n){let a=new Set(s.properties.map(c=>Ne(c)));for(let c of PT)a.has(c)||r("error",`calendar:custom requires "${c}" in the calendar config block.`,{node:s})}}checkCalendarBlock(e,r){let n=new Set;for(let i of e.properties){let o=Ne(i);if(!PT.has(o)){r("error",`Unknown calendar property "${o}". Allowed: ${[...PT].join(", ")}.`,{node:i,property:"key"});continue}n.has(o)&&r("error",`Duplicate calendar property "${o}".`,{node:i,property:"key"}),n.add(o),(!gv.test(i.value)||parseInt(i.value,10)<=0)&&r("error",`"${o}" must be a positive integer, got "${i.value}".`,{node:i,property:"value"})}}checkScaleBlock(e,r){let n=new Set;for(let i of e.properties){let o=Ne(i);if(!pv.has(o)){r("error",`Unknown scale property "${o}". Allowed: ${[...pv].join(", ")}.`,{node:i,property:"key"});continue}n.has(o)&&r("error",`Duplicate scale property "${o}".`,{node:i,property:"key"}),n.add(o),o==="label-every"&&(!gv.test(i.value)||parseInt(i.value,10)<=0)&&r("error",`"label-every" must be a positive integer, got "${i.value}".`,{node:i,property:"value"})}}checkForwardReferences(e,r){let n=new Map,i=new Map;for(let o=0;o<e.roadmapEntries.length;o++){let s=e.roadmapEntries[o];Da(s)&&s.name?n.has(s.name)||n.set(s.name,o):nu(s)&&s.name&&(i.has(s.name)||i.set(s.name,o))}for(let o=0;o<e.roadmapEntries.length;o++){let s=e.roadmapEntries[o];Rv(s,a=>{let c=Ne(a);if(c==="size"&&a.value){let l=a.value,u=n.get(l);u===void 0?r("error",`Size "${l}" is not declared. Add "size ${l} effort:<literal>" earlier in the roadmap section.`,{node:a,property:"value"}):u>=o&&r("error",`Size "${l}" is referenced before its declaration. Move "size ${l}" above this entity.`,{node:a,property:"value"})}else if(c==="status"&&a.value){let l=a.value;if(CT.has(l))return;let u=i.get(l);u===void 0?r("error",`Status "${l}" is not a built-in and has no declaration. Add "status ${l}" earlier in the roadmap section.`,{node:a,property:"value"}):u>=o&&r("error",`Status "${l}" is referenced before its declaration. Move "status ${l}" above this entity.`,{node:a,property:"value"})}})}}checkReferenceResolution(e,r){let n=gU(e),i=o=>{Rv(o,s=>{let a=Ne(s);if(a!=="after"&&a!=="before"&&a!=="on")return;let c=s.value?[s.value]:s.values;for(let l of c)l&&(n.has(l)||r("error",`${a}: reference "${l}" does not resolve to any declared entity in this file.`,{node:s}))})};for(let o of e.roadmapEntries)i(o)}checkCircularDependencies(e,r){let n=new Map,i=(p,g)=>{n.has(p)||n.set(p,new Set),n.get(p).add(g)},o=(p,g,y)=>{if(p)for(let _ of g){let T=Ne(_);if(T==="after"){let R=_.value?[_.value]:_.values;for(let E of R)E&&i(p,E)}else if(T==="before"){let R=_.value?[_.value]:_.values;for(let E of R)E&&i(E,p)}}},s=p=>{let g=p.name,y=p.properties??[];if(o(g,y,e),mn(p))for(let _ of p.content)s(_);else if(Bn(p)||Un(p))for(let _ of p.content)s(_)};for(let p of e.roadmapEntries)s(p);let a=0,c=1,l=2,u=new Map;for(let p of n.keys())u.set(p,a);let f=new Set,d=(p,g)=>{u.set(p,c),g.push(p);for(let y of n.get(p)??[]){let _=u.get(y)??a;if(_===c){let T=g.indexOf(y),R=g.slice(T).concat(y),E=[...R].sort().join("\u2192");f.has(E)||(f.add(E),r("error",`Circular dependency detected: ${R.join(" \u2192 ")}.`,{node:e.roadmapDecl??e}))}else _===a&&d(y,g)}g.pop(),u.set(p,l)};for(let p of n.keys())(u.get(p)??a)===a&&d(p,[])}checkPersonDeclarations(e,r){let n=new Map,i=a=>!!a.title||a.properties.length>0||a.description!==void 0,o=a=>{if(!a.name)return;let c=i(a);n.has(a.name)||n.set(a.name,[]),n.get(a.name).push({node:a,isDeclaration:c}),!c&&a.$container.$type==="NowlineFile"&&r("warning",`Bare "person ${a.name}" at roadmap top level has no declaration. Either add properties (title, link, etc.) or remove the line.`,{node:a})},s=a=>{for(let c of a.content)ki(c)?o(c):Xr(c)&&s(c)};for(let a of e.roadmapEntries)ki(a)?o(a):Xr(a)&&s(a);for(let[a,c]of n){let l=c.filter(u=>u.isDeclaration);if(l.length>1)for(let u=1;u<l.length;u++)r("error",`Person "${a}" is declared more than once. First declaration at ${Up(l[0].node)}.`,{node:l[u].node})}}checkSymbolDeclaration(e,r){e.name&&Mp.has(e.name)&&r("error",`Symbol id "${e.name}" collides with a built-in icon name. Reserved built-ins: ${[...Mp].sort().join(", ")}.`,{node:e,property:"name"});let n=e.properties.find(o=>Ne(o)==="unicode");n?(!n.value||n.value.length===0)&&r("error",`Symbol "${Gr(e)}" unicode: must be a non-empty value.`,{node:n,property:"value"}):r("error",`Symbol "${Gr(e)}" requires a "unicode:" property (e.g. unicode:"\u{1F4B0}" or unicode:"\\u{1F464}").`,{node:e});let i=e.properties.find(o=>Ne(o)==="ascii");if(i){let o=i.value??"";uU.test(o)||r("error",`Symbol "${Gr(e)}" ascii: must be 1-3 ASCII characters (got ${o.length} character${o.length===1?"":"s"}).`,{node:i,property:"value"})}for(let o of e.properties){let s=Ne(o);s!=="unicode"&&s!=="ascii"&&s!=="link"&&s!=="description"&&r("error",`Unknown symbol property "${s}". Allowed: unicode, ascii, link, description.`,{node:o,property:"key"})}}checkDuplicateSymbolIds(e,r){let n=new Map;for(let i of e.configEntries)if(ou(i)&&i.name){let o=n.get(i.name);o?r("error",`Duplicate symbol id "${i.name}". First declared at ${Up(o)}.`,{node:i,property:"name"}):n.set(i.name,i)}}checkSymbolReferences(e,r){let n=new Map;for(let o=0;o<e.configEntries.length;o++){let s=e.configEntries[o];ou(s)&&s.name&&(n.has(s.name)||n.set(s.name,o))}let i=(o,s,a,c)=>{if(s!=="icon"&&s!=="capacity-icon"||!a||!Ev(a)||s==="capacity-icon"&&$T.has(a)||s==="icon"&&Mp.has(a))return;let l=n.get(a);if(l===void 0){let u=s==="capacity-icon"?[...$T].sort().join(", "):[...Mp].sort().join(", ");r("error",`${s}: "${a}" is neither a built-in (${u}) nor a declared symbol. Add "symbol ${a} unicode:..." earlier in config or use a quoted Unicode literal.`,{node:c,property:"value"})}else l>=o&&r("error",`${s}: symbol "${a}" is referenced before its declaration. Move "symbol ${a}" above this entry.`,{node:c,property:"value"})};for(let o=0;o<e.configEntries.length;o++){let s=e.configEntries[o];if(iu(s))for(let a of s.properties)i(o,Ne(a),a.value,a);else if(vi(s))for(let a of s.properties)i(o,Ne(a),a.value,a)}}};function OT(t){return QF.has(t)||sU.test(t)}function Ev(t){return/^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(t)}function pU(t){return t?mn(t)?"lane":wr(t)?"item":vi(t)?t.entityType==="swimlane"?"lane":"item":"invalid":"invalid"}function hU(t){return t?!!(mn(t)||vi(t)&&t.entityType==="swimlane"):!1}function _v(t){if(!t||t===bv)return null;if(DT.test(t)){let e=parseFloat(t);return Number.isFinite(e)&&e>0?e/100:null}if(wv.test(t)){let e=parseFloat(t);return Number.isFinite(e)&&e>0?e:null}return null}function Up(t){let e=t.$cstNode;return e?`line ${e.range.start.line+1}`:"unknown location"}function LT(t){let e=t.$type.replace(/Declaration$|Block$/,"").toLowerCase(),r=t.name??t.title;return r?`${e} "${r}"`:e}function mU(t,e){if(mn(t)){e(t.name,t);for(let r of t.content)MT(r,e)}else ki(t)?e(t.name,t):Xr(t)?Sv(t,e):(Np(t)||Lp(t)||Pp(t)||Op(t)||Da(t)||nu(t))&&e(t.name,t)}function Sv(t,e){e(t.name,t);for(let r of t.content)Xr(r)&&Sv(r,e)}function MT(t,e){if(wr(t))e(t.name,t);else if(Bn(t)){e(t.name,t);for(let r of t.content)MT(r,e)}else if(Un(t)){e(t.name,t);for(let r of t.content)MT(r,e)}}function Rv(t,e){let r=n=>{let i=n.properties;if(Array.isArray(i))for(let o of i)e(o);if(mn(n))for(let o of n.content)r(o);else if(Bn(n)||Un(n))for(let o of n.content)r(o);else if(Xr(n))for(let o of n.content)(Xr(o)||ki(o))&&r(o)};r(t)}function gU(t){let e=new Set;t.roadmapDecl?.name&&e.add(t.roadmapDecl.name);let r=n=>{let i=n.name;if(i&&e.add(i),mn(n))for(let o of n.content)r(o);else if(Bn(n)||Un(n))for(let o of n.content)r(o);else if(Xr(n))for(let o of n.content)Xr(o)||ki(o)?r(o):HI(o)};for(let n of t.roadmapEntries)r(n);return e}var FT=class extends Ro{runConverter(e,r,n){return e.name==="PROPERTY_KEY_WITH_COLON"||e.name==="INCLUDE_OPTION_KEY"?r.endsWith(":")?r.slice(0,-1):r:super.runConverter(e,r,n)}},UT=class extends _a{isStartOfLine(e,r){if(!super.isStartOfLine(e,r))return!1;let n=r-1;for(;n>=0&&(e[n]===" "||e[n]===" ");)n--;for(;n>=0&&(e[n]==="\r"||e[n]===`
|
|
2662
|
+
`);)n--;for(;n>=0&&(e[n]===" "||e[n]===" ");)n--;return n<0||e[n]!=="\\"}},Iv={parser:{TokenBuilder:()=>new UT({indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[["[","]"]]}),Lexer:t=>new Zl(t),ParserConfig:()=>({maxLookahead:4}),ValueConverter:()=>new FT},validation:{NowlineValidator:()=>new Xp}};function BT(t={}){let e=t.shared??Po(Kl(Jl),zI),r=Po(Vl({shared:e}),VI,Iv);return e.ServiceRegistry.register(r),Av(r),{shared:e,Nowline:r}}var yU=new Set(["none","multiplier","person","people","points","time"]),xU=/^\d+$/,TU=/^\d+\.\d+$/,EU=/^\d+(?:\.\d+)?%$/;function Ni(t){if(!t)return null;if(xU.test(t)){let e=parseInt(t,10);return e>0?e:null}if(TU.test(t)){let e=parseFloat(t);return Number.isFinite(e)&&e>0?e:null}if(EU.test(t)){let e=parseFloat(t.slice(0,-1))/100;return Number.isFinite(e)&&e>0?e:null}return null}function au(t){if(Number.isInteger(t))return String(t);let e=t.toFixed(6);return e=e.replace(/0+$/,""),e=e.replace(/\.$/,""),e}function _U(t){return t.key.endsWith(":")?t.key.slice(0,-1):t.key}function RU(t){for(let e of t.properties)if(_U(e)==="unicode"&&e.value)return e.value}function cu(t,e){if(t==="none")return null;if(yU.has(t))return{kind:"builtin",name:t};let r=e.get(t);return r?{kind:"literal",text:RU(r)??t}:{kind:"literal",text:t}}function $o(t,e,r){return e?e.kind==="builtin"&&e.name==="multiplier"?(t.length+1)*r*.58:t.length*r*.58+(.1+1)*r:t.length*r*.58}function lu(t,e,r,n=0,i=0){let o=t+10,s=o+12,a=e.length*6.5,c=s+a,l=0,u=0;r&&(l=`owner: ${r}`.length*5,u=c+6,c=u+l);let f=0;n>0&&(f=c+6,c=f+n);let d=0;i>0&&(d=c+6+i,c=d);let p=c-o+12,g=Math.max(56,p);return{titleTextWidth:a,ownerTextWidth:l,capacityBadgeWidth:n,footnoteIndicatorWidth:i,titleX:s,ownerX:u,badgeX:f,footnoteRightX:d,tabX:o,tabW:g,rightX:o+g}}function uu(t,e,r){let n=t+24,i=n+10,o=e.length*6,s=Math.max(60,o+10+10),a=n+s+6,c=a+18,l=0,u=0,f=0,d=0,p=c;return r&&(u=c+6,l=r.length*5.5,f=u-3,d=l+6,p=f+d),{labelTextWidth:o,sourceTextWidth:l,tabX:n,tabWidth:s,tabLabelX:i,badgeX:a,badgeSize:18,sourceHaloX:f,sourceHaloWidth:d,sourceTextX:u,chromeRightX:p}}function XT(t,e){if(t.length===0)return{rows:[[]],expanded:!1};let r=[[]],n=0,i=e,o=!1;for(let s of t){let a=r[r.length-1],c=(a.length===0?0:4)+s.width,l=n+c;if(l<=i){a.push(s),n=l;continue}if(a.length===0){a.push(s),n=s.width;continue}let u=l-i,f=s.width*.25;if(!o&&u<=f){a.push(s),n=l,i=l,o=!0;continue}r.push([s]),n=s.width,i=e}return{rows:r,expanded:o}}function vv(t){return t.endsWith(":")?t.slice(0,-1):t}function ne(t,e){return t.find(r=>vv(r.key)===e)?.value}function nr(t,e){let r=t.find(n=>vv(n.key)===e);return r?r.value!==void 0?[r.value]:[...r.values]:[]}function Lt(t){if(!t)return null;let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t);if(!e)return null;let r=new Date(Date.UTC(parseInt(e[1],10),parseInt(e[2],10)-1,parseInt(e[3],10)));return Number.isNaN(r.getTime())?null:r}var Ma={mode:"business",daysPerWeek:5,daysPerMonth:22,daysPerQuarter:65,daysPerYear:260},bU={mode:"full",daysPerWeek:7,daysPerMonth:30,daysPerQuarter:91,daysPerYear:365};function kv(t,e){let n=t.roadmapDecl?.properties.find(i=>GT(i.key)==="calendar")?.value??"business";if(n==="business")return{...Ma};if(n==="full")return{...bU};if(e){let i=(o,s)=>{let a=e.properties.find(l=>GT(l.key)===o),c=a?parseInt(a.value,10):NaN;return Number.isFinite(c)&&c>0?c:s};return{mode:"custom",daysPerWeek:i("days-per-week",Ma.daysPerWeek),daysPerMonth:i("days-per-month",Ma.daysPerMonth),daysPerQuarter:i("days-per-quarter",Ma.daysPerQuarter),daysPerYear:i("days-per-year",Ma.daysPerYear)}}return{...Ma}}var Gp=/^(\d+(?:\.\d+)?)([dwmqy])$/;function Hp(t,e){let r=Gp.exec(t);if(!r)return 0;let n=parseFloat(r[1]);switch(r[2]){case"d":return n;case"w":return n*e.daysPerWeek;case"m":return n*e.daysPerMonth;case"q":return n*e.daysPerQuarter;case"y":return n*e.daysPerYear;default:return 0}}function Nv(t,e,r){return t?Gp.test(t)?Hp(t,r):e.get(t)?.effortDays??0:0}function Ci(t,e,r){let n=ne(t,"duration");if(n&&Gp.test(n))return Hp(n,r);let i=ne(t,"size"),o=i?e.get(i):void 0;if(!o)return 0;let s=Ni(ne(t,"capacity"))??1;return o.effortDays/s}function Cv(t,e,r){let n=ne(t,"size"),i=n?e.get(n):void 0;if(i)return i.effortDays;let o=ne(t,"duration");if(o&&Gp.test(o)){let s=Ni(ne(t,"capacity"))??1;return Hp(o,r)*s}return 0}function jp(t,e){let r=new Map;for(let[n,i]of t){let s=i.properties.find(c=>GT(c.key)==="effort")?.value;if(!s)continue;let a=Hp(s,e);a<=0||r.set(n,{name:n,title:i.title||void 0,effortDays:a,effortLiteral:s})}return r}function GT(t){return t.endsWith(":")?t.slice(0,-1):t}function Hr(t,e){return Math.round((e.getTime()-t.getTime())/864e5)}function Do(t,e){let r=new Date(t.getTime());return r.setUTCDate(r.getUTCDate()+e),r}var qp=class{constructor(e){se(this,"items");se(this,"brackets");this.items=e.itemBars,this.brackets=e.brackets}hasObstacle(e,r,n){let i=Math.min(r,n),o=Math.max(r,n);for(let s of this.items)if(!(e<=s.x||e>=s.x+s.width)&&!(s.y+s.height<=i||s.y>=o))return!0;return!1}bracketsNear(e,r,n,i){let o=Math.min(r,n),s=Math.max(r,n),a=[];for(let c of this.brackets)Math.abs(c.x-e)>i||c.yBottom<=o||c.yTop>=s||a.push(c);return a}};function Pv(t,e){let r=[],n=[],i=s=>{if(s.kind==="item"){r.push(s.box);return}if(s.kind==="parallel"){if(s.style.bracket==="solid"||s.style.bracket==="dashed"){let l=s.box.y-12,u=s.box.y+s.box.height+12,f=s.box.x,d=s.box.x+s.box.width;n.push({x:f,yTop:l,yBottom:u}),n.push({x:d,yTop:l,yBottom:u}),n.push({x:f+4,yTop:l-1,yBottom:l+1}),n.push({x:f+4,yTop:u-1,yBottom:u+1}),n.push({x:d-4,yTop:l-1,yBottom:l+1}),n.push({x:d-4,yTop:u-1,yBottom:u+1})}for(let a of s.children)i(a);return}if(s.kind==="group"){!(s.style.bg!=="none"&&s.style.bg!=="#ffffff")&&s.style.bracket&&s.style.bracket!=="none"&&n.push({x:s.box.x,yTop:s.box.y,yBottom:s.box.y+s.box.height});for(let c of s.children)i(c);return}},o=s=>{for(let a of s.children)i(a);for(let a of s.nested)o(a)};for(let s of t)o(s);for(let s of e)for(let a of s.nestedSwimlanes)o(a);return{itemBars:r,brackets:n}}function wU(t,e){let{from:r,to:n}=t;if(Math.abs(r.y-n.y)<.5)return{x:(r.x+n.x)/2,underBar:!1,range:null};let i=Math.min(r.y,n.y),o=Math.max(r.y,n.y);if(r.x<=n.x){let a=r.x+6,c=n.x-6;if(a>c)return{x:n.x-6,underBar:!0,range:null};let l={minX:a,maxX:c},u=(r.x+n.x)/2,f=Math.max(a,Math.min(c,u));if(!e.hasObstacle(f,i,o))return{x:f,underBar:!1,range:l};let d=c-a;for(let p=1;p<=d;p++){let g=f-p;if(g>=a&&!e.hasObstacle(g,i,o))return{x:g,underBar:!1,range:l};let y=f+p;if(y<=c&&!e.hasObstacle(y,i,o))return{x:y,underBar:!1,range:l}}return{x:f,underBar:!0,range:l}}let s=[r.x+10,n.x-10];for(let a of s)if(a>0&&!e.hasObstacle(a,i,o))return{x:a,underBar:!1,range:null};return{x:r.x+10,underBar:!0,range:null}}function AU(t,e,r,n){let i=Math.min(r.from.y,r.to.y),o=Math.max(r.from.y,r.to.y),s=n.bracketsNear(t,i,o,4);if(s.length===0)return{x:t,forceUnderBar:!1};let a=s[0],c=Math.abs(s[0].x-t);for(let d=1;d<s.length;d++){let p=Math.abs(s[d].x-t);p<c&&(a=s[d],c=p)}let l=[a.x+4,a.x-4],u=4-.01;for(let d of l){if(e&&(d<e.minX||d>e.maxX))continue;let p=e?d:Math.max(Math.min(r.from.x,r.to.x)+1,Math.min(Math.max(r.from.x,r.to.x)-1,d));if(n.bracketsNear(p,i,o,u).length===0)return{x:p,forceUnderBar:!1}}return{x:e?Math.min(Math.max(t,e.minX),e.maxX):t,forceUnderBar:!0}}function SU(t){let e=[...t].sort((i,o)=>Math.abs(i.channelX-o.channelX)>=1?i.channelX-o.channelX:i.orderIndex-o.orderIndex),r=new Map,n=0;for(;n<e.length;){let i=n+1;for(;i<e.length&&Math.abs(e[i].channelX-e[n].channelX)<1;)i++;let s=[...e.slice(n,i)].sort((c,l)=>{let u=Math.min(c.req.from.y,c.req.to.y),f=Math.min(l.req.from.y,l.req.to.y);return Math.abs(u-f)>.5?u-f:c.orderIndex-l.orderIndex}),a=[];for(let c of s){let l=Math.min(c.req.from.y,c.req.to.y),u=Math.max(c.req.from.y,c.req.to.y),f=-1;for(let d=0;d<a.length;d++)if(a[d]<=l){f=d,a[d]=u;break}f===-1&&(f=a.length,a.push(u)),r.set(c.orderIndex,f)}n=i}return r}function IU(t){if(t===0||t>4)return 0;let e=Math.ceil(t/2);return(t%2===1?1:-1)*e*3}function vU(t){let e=t.from.x>=t.to.x?{x:t.to.x-1,y:t.from.y}:t.from;return{fromId:t.fromId,toId:t.toId,waypoints:[e,t.to],underBar:!1}}function Ov(t,e){let r=new Array(t.length),n=[];for(let o=0;o<t.length;o++){let s=t[o];if(s.isMarkerSource){r[o]=vU(s);continue}if(Math.abs(s.from.y-s.to.y)<.5&&s.to.x-s.from.x<20){r[o]={fromId:s.fromId,toId:s.toId,waypoints:[s.from,s.to],underBar:!1};continue}let{x:a,underBar:c,range:l}=wU(s,e),{x:u,forceUnderBar:f}=AU(a,l,s,e),d=c||f;n.push({req:s,channelX:u,underBar:d,orderIndex:o})}let i=SU(n);for(let o of n){let s=IU(i.get(o.orderIndex)??0),a=o.channelX+s;r[o.orderIndex]={fromId:o.req.fromId,toId:o.req.toId,waypoints:kU(o.req.from,o.req.to,a),underBar:o.underBar}}return r}function kU(t,e,r){return Math.abs(t.y-e.y)<.5?[t,e]:[t,{x:r,y:t.y},{x:r,y:e.y},e]}var fu="en-US",NU={"en-US":{nowLabel:"now",quarterPrefix:"Q"},fr:{nowLabel:"maint.",quarterPrefix:"T"}};function Lv(t,e){return e??t??fu}function Wp(t){let e={};for(let r of CU(t)){let n=NU[r];if(n)for(let i of Object.keys(n))e[i]===void 0&&n[i]!==void 0&&(e[i]=n[i])}return e}function CU(t){let e=[],r=PU(t);for(;r.length>0;){e.includes(r)||e.push(r);let n=r.lastIndexOf("-");if(n<=0)break;r=r.slice(0,n)}return e.includes(fu)||e.push(fu),e}function PU(t){return t.split("-").map((r,n)=>n===0?r.toLowerCase():/^[a-zA-Z]{2}$/.test(r)?r.toUpperCase():r).join("-")}function zp(t,e){return{x:t,y:e,height:0,maxX:t}}var Fa=class{constructor(e){se(this,"rows");se(this,"opts");this.opts=e,this.rows=[{y:e.originY,height:e.minRowHeight,rightEdge:e.laneLeftX,spillX:e.laneLeftX,placedChildren:[]}]}placeItem(e){for(let n=0;n<this.rows.length;n+=1){let i=this.rows[n];if(!(e.desiredStart<i.rightEdge)&&!(e.desiredStart<i.spillX)&&!this.rowIntersectsCorridor(i,e))return{rowIndex:n,y:i.y}}let r=this.appendRow(Math.max(this.opts.minRowHeight,e.predictedHeight));return{rowIndex:this.rows.length-1,y:r.y}}placeBlock(){let e=this.rows[this.rows.length-1];if(e.rightEdge>this.opts.laneLeftX){let r=this.appendRow(this.opts.minRowHeight);return{rowIndex:this.rows.length-1,y:r.y}}return{rowIndex:this.rows.length-1,y:e.y}}commitItem(e){let r=this.rows[e.rowIndex],n=Math.max(e.placed.box.height,e.rowHeight??0);this.growRowHeight(e.rowIndex,n),r.rightEdge=e.logicalEnd,r.spillX=e.spillReservation??this.opts.laneLeftX,r.placedChildren.push(e.placed)}commitBlock(e){let r=this.rows[e.rowIndex];this.growRowHeight(e.rowIndex,e.blockHeight),r.rightEdge=e.blockEnd,r.spillX=this.opts.laneLeftX,r.placedChildren.push(e.placed)}usedHeight(){let e=this.rows[this.rows.length-1];return e.y+e.height-this.opts.originY}usedRightX(){let e=this.opts.laneLeftX;for(let r of this.rows)r.rightEdge>e&&(e=r.rightEdge),r.spillX>e&&(e=r.spillX);return e}rowIntersectsCorridor(e,r){return this.opts.slackCorridors.some(n=>n.y>=e.y&&n.y<e.y+e.height&&r.desiredStart<n.xEnd&&r.desiredEnd>n.xStart&&n.slackPredId!==r.childId)}appendRow(e){let r=this.rows[this.rows.length-1],n={y:r.y+r.height,height:e,rightEdge:this.opts.laneLeftX,spillX:this.opts.laneLeftX,placedChildren:[]};return this.rows.push(n),n}growRowHeight(e,r){let n=this.rows[e],i=r-n.height;if(!(i<=0)){n.height=r;for(let o=e+1;o<this.rows.length;o+=1){let s=this.rows[o];s.y+=i;for(let a of s.placedChildren)$v(a,i)}}}};function $v(t,e){if(t.box.y+=e,t.kind==="item"){for(let r of t.labelChips)r.box.y+=e;t.overflowBox&&(t.overflowBox.y+=e);return}for(let r of t.children)$v(r,e)}var Dv={red:"#f87171",blue:"#60a5fa",yellow:"#facc15",green:"#34d399",orange:"#fb923c",purple:"#a78bfa",gray:"#94a3b8",navy:"#818cf8",white:"#e2e8f0"},Xn={bg:"none",fg:"#e2e8f0",text:"#e2e8f0",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},Mv={name:"dark",surface:{page:"#0b1220",chart:"#111827",headerBox:"#1e293b"},entities:{roadmap:{...Xn,headerHeight:"md",padding:"md"},swimlane:{...Xn,fg:"#e2e8f0",text:"#e2e8f0",padding:"sm",spacing:"none",textSize:"sm"},item:{...Xn,bg:"#0f172a",fg:"#94a3b8",text:"#e2e8f0",shadow:"subtle",cornerRadius:"sm"},parallel:{...Xn,bracket:"none",padding:"xs"},group:{...Xn,bracket:"solid",padding:"xs",fg:"#94a3b8"},anchor:{...Xn,bg:"#0b1220",fg:"#cbd5e1",text:"#cbd5e1",cornerRadius:"sm"},milestone:{...Xn,bg:"#e2e8f0",fg:"#e2e8f0",text:"#0b1220",border:"solid"},footnote:{...Xn,bg:"none",fg:"#94a3b8",text:"#e2e8f0",textSize:"sm"},label:{...Xn,bg:"#1e293b",fg:"#94a3b8",text:"#e2e8f0",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#111827",bandOdd:"#0f172a",separator:"#1f2937",frameTabText:"#e2e8f0",frameTabMuted:"#94a3b8",border:"#334155",tabFill:"#1e293b",tabStroke:"#475569",tabText:"#e2e8f0",ownerText:"#94a3b8",footnoteIndicator:"#f87171",rowTintEven:"#0f172a",rowTintOdd:"#1e293b",utilizationOk:"#34d399",utilizationWarn:"#fbbf24",utilizationOver:"#f87171"},timeline:{gridLine:"#475569",minorGridLine:"#334155",tickMark:"#334155",labelText:"#cbd5e1",panelFill:"#0f172a",border:"#334155"},header:{cardBorder:"#475569",author:"#94a3b8"},item:{overflowX:"#f87171",linkIconFg:"#94a3b8",overflowTailFill:"#7f1d1d",overflowTailStroke:"#f87171",overflowCaption:"#fecaca"},parallel:{bracketStroke:"#cbd5e1"},anchorDiamond:{fill:"#0f172a",stroke:"#cbd5e1",label:"#cbd5e1",cutLine:"#94a3b8"},milestoneDiamond:{fill:"#e2e8f0",label:"#e2e8f0",cutLineNormal:"#a5b4fc",cutLineOverrun:"#ef4444",slack:"#cbd5e1"},footnotePanel:{fill:"#0f172a",border:"#334155",header:"#e2e8f0",title:"#e2e8f0",description:"#94a3b8",number:"#f87171"},nowline:{stroke:"#f87171",labelText:"#0b1220",labelBg:"#f87171"},milestone:{dashedInk:"#a5b4fc",overrun:"#ef4444"},anchor:{predecessorLine:"#94a3b8"},dependency:{edgeStroke:"#cbd5e1",overflowStroke:"#ef5350"},footnote:{indicatorText:"#f87171",descriptionMuted:"#94a3b8"},includeRegion:{border:"#475569",label:"#cbd5e1",badge:"#94a3b8",fill:"#0b1220",tabFill:"#111827",tabStroke:"#475569",tabText:"#e2e8f0",badgeFill:"#1e293b",badgeStroke:"#475569",badgeText:"#94a3b8"},arrowhead:{neutral:"#94a3b8",light:"#64748b",dark:"#e2e8f0"},status:{done:"#34d399",inProgress:"#60a5fa",atRisk:"#facc15",blocked:"#ef4444",planned:"#94a3b8",neutral:"#94a3b8"},statusDot:{onLight:{done:"#065f46",inProgress:"#1e3a8a",atRisk:"#92400e",blocked:"#991b1b",planned:"#334155",neutral:"#334155"},onDark:{done:"#d1fae5",inProgress:"#dbeafe",atRisk:"#fef3c7",blocked:"#fee2e2",planned:"#e2e8f0",neutral:"#e2e8f0"}},attribution:{mark:"#cbd5e1",link:"#f87171"},diagnostic:{overlayBg:"#7f1d1d",errorText:"#fecaca"}};var Fv={red:"#e53935",blue:"#1e88e5",yellow:"#fdd835",green:"#43a047",orange:"#fb8c00",purple:"#8e24aa",gray:"#9e9e9e",navy:"#0d47a1",white:"#ffffff"},Gn={bg:"none",fg:"#0f172a",text:"#0f172a",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},Uv={name:"light",surface:{page:"#f8fafc",chart:"#ffffff",headerBox:"#ffffff"},entities:{roadmap:{...Gn,headerHeight:"md",padding:"md"},swimlane:{...Gn,fg:"#334155",text:"#334155",padding:"sm",spacing:"none",textSize:"sm"},item:{...Gn,bg:"#ffffff",fg:"#94a3b8",text:"#0f172a",shadow:"subtle",cornerRadius:"sm"},parallel:{...Gn,bracket:"none",padding:"xs"},group:{...Gn,bracket:"solid",padding:"xs",fg:"#475569"},anchor:{...Gn,bg:"#0f172a",fg:"#0f172a",text:"#0f172a",cornerRadius:"sm"},milestone:{...Gn,bg:"#312e81",fg:"#312e81",text:"#ffffff",border:"solid"},footnote:{...Gn,bg:"none",fg:"#475569",text:"#475569",textSize:"sm"},label:{...Gn,bg:"#f1f5f9",fg:"#475569",text:"#475569",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#ffffff",bandOdd:"#f8fafc",separator:"#e2e8f0",frameTabText:"#334155",frameTabMuted:"#64748b",border:"#e2e8f0",tabFill:"#f1f5f9",tabStroke:"#cbd5e1",tabText:"#334155",ownerText:"#64748b",footnoteIndicator:"#dc2626",rowTintEven:"#ffffff",rowTintOdd:"#f8fafc",utilizationOk:"#10b981",utilizationWarn:"#f59e0b",utilizationOver:"#ef4444"},timeline:{gridLine:"#cbd5e1",minorGridLine:"#e2e8f0",tickMark:"#cbd5e1",labelText:"#64748b",panelFill:"#ffffff",border:"#e2e8f0"},header:{cardBorder:"#e2e8f0",author:"#64748b"},item:{overflowX:"#dc2626",linkIconFg:"#0f172a",overflowTailFill:"#fee2e2",overflowTailStroke:"#ef4444",overflowCaption:"#b91c1c"},parallel:{bracketStroke:"#334155"},anchorDiamond:{fill:"#ffffff",stroke:"#334155",label:"#334155",cutLine:"#64748b"},milestoneDiamond:{fill:"#0f172a",label:"#0f172a",cutLineNormal:"#1e1b4b",cutLineOverrun:"#b91c1c",slack:"#0f172a"},footnotePanel:{fill:"#ffffff",border:"#e2e8f0",header:"#0f172a",title:"#0f172a",description:"#64748b",number:"#dc2626"},nowline:{stroke:"#e53e3e",labelText:"#ffffff",labelBg:"#e53e3e"},milestone:{dashedInk:"#94a3b8",overrun:"#ef4444"},anchor:{predecessorLine:"#94a3b8"},dependency:{edgeStroke:"#475569",overflowStroke:"#d32f2f"},footnote:{indicatorText:"#e53e3e",descriptionMuted:"#64748b"},includeRegion:{border:"#94a3b8",label:"#334155",badge:"#64748b",fill:"#f8fafc",tabFill:"#ffffff",tabStroke:"#cbd5e1",tabText:"#0f172a",badgeFill:"#e2e8f0",badgeStroke:"#cbd5e1",badgeText:"#475569"},arrowhead:{neutral:"#475569",light:"#94a3b8",dark:"#0f172a"},status:{done:"#10b981",inProgress:"#3b82f6",atRisk:"#f59e0b",blocked:"#ef4444",planned:"#94a3b8",neutral:"#94a3b8"},statusDot:{onLight:{done:"#065f46",inProgress:"#1e3a8a",atRisk:"#92400e",blocked:"#991b1b",planned:"#334155",neutral:"#334155"},onDark:{done:"#d1fae5",inProgress:"#dbeafe",atRisk:"#fef3c7",blocked:"#fee2e2",planned:"#e2e8f0",neutral:"#e2e8f0"}},attribution:{mark:"#94a3b8",link:"#e53e3e"},diagnostic:{overlayBg:"#fee2e2",errorText:"#991b1b"}};var Bv={light:Uv,dark:Mv};var OU={grey:"gray",violet:"purple"};function Mo(t,e){if(t==="none")return"none";if(t.startsWith("#"))return t;let r=e.name==="dark"?Dv:Fv,n=OU[t]??t,i=r[n];return typeof i=="string"?i:t}function Ua(t){return t.key.endsWith(":")?t.key.slice(0,-1):t.key}function LU(t,e){return{bg:Mo(t.bg,e),fg:Mo(t.fg,e),text:Mo(t.text,e),border:t.border,icon:t.icon,shadow:t.shadow,font:t.font,weight:t.weight,italic:t.italic,textSize:t.textSize,padding:t.padding,spacing:t.spacing,headerHeight:t.headerHeight,cornerRadius:t.cornerRadius,bracket:t.bracket,headerPosition:"beside",capacityIcon:t.capacityIcon,timelinePosition:"top",minorGrid:!1}}function HT(t,e,r,n){switch(e){case"bg":t.bg=Mo(r,n);break;case"fg":t.fg=Mo(r,n);break;case"text":t.text=Mo(r,n);break;case"border":(r==="solid"||r==="dashed"||r==="dotted")&&(t.border=r);break;case"icon":t.icon=r;break;case"shadow":(r==="none"||r==="subtle"||r==="soft"||r==="hard")&&(t.shadow=r);break;case"font":(r==="sans"||r==="serif"||r==="mono")&&(t.font=r);break;case"weight":(r==="thin"||r==="light"||r==="normal"||r==="bold")&&(t.weight=r);break;case"italic":t.italic=r==="true";break;case"text-size":t.textSize=du(r,"xl");break;case"padding":t.padding=du(r,"xl");break;case"spacing":t.spacing=du(r,"xl");break;case"header-height":t.headerHeight=du(r,"xl");break;case"corner-radius":t.cornerRadius=du(r,"full");break;case"bracket":(r==="none"||r==="solid"||r==="dashed")&&(t.bracket=r);break;case"header-position":(r==="beside"||r==="above")&&(t.headerPosition=r);break;case"capacity-icon":t.capacityIcon=r;break;case"timeline-position":(r==="top"||r==="bottom"||r==="both")&&(t.timelinePosition=r);break;case"minor-grid":t.minorGrid=r==="true";break;default:break}}function du(t,e){let r=["none","xs","sm","md","lg","xl","full"],n=r.indexOf(e),i=r.indexOf(t);return i<0?"md":i>n?r[n]:r[i]}function Xv(t,e,r){if(e)for(let n of e.properties)HT(t,Ua(n),n.value,r)}function $U(t,e,r){for(let n of e){let i=Ua(n);n.value!==void 0&&HT(t,i,n.value,r)}}function DU(t,e,r){let n=e.find(o=>Ua(o)==="labels");if(!n)return;let i=n.value?[n.value]:n.values;for(let o of i){let s=r.labels.get(o);if(!s)continue;let a=s.properties.find(c=>Ua(c)==="style");a?.value&&Xv(t,r.styles.get(a.value),r.theme)}}function MU(t,e,r){let n=e.find(i=>Ua(i)==="style");n?.value&&Xv(t,r.styles.get(n.value),r.theme)}function gt(t,e,r){let n=r.theme.entities[t],i=LU(n,r.theme),o=r.defaults.get(t);if(o)for(let s of o.properties)s.value!==void 0&&HT(i,Ua(s),s.value,r.theme);return DU(i,e,r),MU(i,e,r),$U(i,e,r.theme),i}function Gv(t,e){return gt("label",t.properties,e)}var Hv={none:0,xs:2,sm:4,md:8,lg:16,xl:24},jv={none:0,xs:4,sm:8,md:12,lg:20,xl:32};var Ba={none:0,xs:10,sm:12,md:14,lg:18,xl:24},Vp={none:0,xs:2,sm:4,md:8,lg:12,xl:20,full:9999};var Sr=8,gn=4,pu=24,Kp=15,hu=8,Yp=22,Zp=15,mu=16,Jp=6,jT=4,qT=11,WT=9,zT=5.5,VT=4,Xa=12,Qp="6 4",KT=36,Pi=16,YT=Pi/2,gu=10,ZT=Pi-4,Ga=6,eh=2.25,jr=6,qr=2*jr,qv=5,Wv=120,JT=240,th=72,yu=28,Wr=16,QT=22,xu=18,rh="Powered by",eE="https://nowline.io",Tu=.22,Oi=40,nh=32,zv=.58,FU=rh.length*nh*zv,UU=10,Eu=FU+UU,tE=Eu+74,rE=5,ih=Eu+81,BU=3*Oi*zv,XU=ih+BU,GU=12+Oi,nE=XU*Tu,Vv=GU*Tu,iE=4;var Ge={sans:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',serif:'Georgia, "Times New Roman", serif',mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},Kv={days:7,weeks:4,months:3,quarters:4,years:5};var oh=class{constructor(e,r){se(this,"node");se(this,"deps");this.node=e,this.deps=r}get id(){return this.node.name??""}place(e,r){let{node:n}=this,{deps:i}=this,o=gt("group",n.properties,r.styleCtx),s=e.x,a=n.title??n.name,c=r.currentFlowKey;r.currentFlowKey=`${c}/group:${n.name??"g"}`;let l=o.bg!=="none"&&o.bg!=="#ffffff"&&!!a,u=l?mu+jT:0,f=l?VT:0,d=!l&&a?Xa:0,p=e.y+d,g=r.bandScale.step(),y=s,_=new Fa({laneLeftX:y,originY:p+u,minRowHeight:g,slackCorridors:r.slackCorridors}),T=y,R=[];for(let q of n.content){if(q.$type==="DescriptionDirective")continue;if(!wr(q)){let V=q.properties??[],he=i.resolveChildStart(V,T,y,r),{rowIndex:it,y:je}=_.placeBlock(),qe=i.newCursor(he,je),G=i.sequenceOne(q,qe,r);R.push(G);let Z=G.box.x+G.box.width,ee=Math.max(g,qe.height);_.commitBlock({rowIndex:it,placed:G,blockHeight:ee,blockEnd:Z}),T=Math.max(T,Z);continue}let le=q.properties,Ee=i.resolveChildStart(le,T,y,r),O=Ci(le,r.sizes,r.cal),w=Math.max(Sr,O*r.timeline.pixelsPerDay),L=Ee+w,M=q.name??"",A=i.predictItemChipExtraHeight(q,r),S=g+A,{rowIndex:v,y:B}=_.placeItem({childId:M,desiredStart:Ee,desiredEnd:L,predictedHeight:S}),H=i.newCursor(Ee,B),$=i.sequenceItem(q,H,r);R.push($);let J=$.box.x+$.box.width+jr;T=Math.max(T,J);let K=null;($.textSpills||$.chipsOutside||$.dotSpills||$.iconSpills||$.footnoteSpills)&&(K=Math.max($.decorationsRightX,$.chipsOutside?$.chipsRightX:0)+6),_.commitItem({rowIndex:v,placed:$,logicalEnd:J,spillReservation:K,rowHeight:S})}let E=Math.max(g,_.usedHeight()),k=Math.max(T,_.usedRightX()),D={x:s,y:p,width:k-s,height:u+E+f};e.x=T+hu,e.maxX=Math.max(e.maxX,e.x);let P=r.bandScale.step()-r.bandScale.bandwidth();e.height=Math.max(e.height,d+D.height+P);let j=n.name;return j&&(r.entityLeftEdges.set(j,D.x),r.entityRightEdges.set(j,D.x+D.width)),r.currentFlowKey=c,{kind:"group",id:j,title:a,box:D,children:R,style:o}}};var oE=12,HU=4,jU=13,qU=11;function Yv(t,e){return t.length*e*.58}var sh=class{constructor(e){se(this,"input");this.input=e}get id(){return this.input.id}measure(e){return{width:Math.max(Sr,this.input.logicalRightX-this.input.logicalLeftX),height:e.bands.bandwidth()}}place(e,r){let n=this.measure(r),i=Math.max(Sr,n.width-2*jr),o=e.x+jr,s={x:o,y:e.y,width:i,height:n.height},a=this.input.hasLinkIcon?20+WU-oE:0,c=oE+Math.max(0,a),l=Math.max(0,i-c-oE),u=this.input.title,f=u?Yv(u,jU):0,d=this.input.metaText?Yv(this.input.metaText,qU):0,p=this.input.metaTrailingWidth??0,g=d+p,y=this.input.metaText!==void 0||p>0,_=u.length>0&&f>l||y&&g>l,T=_?o+i+HU:o+c;return{id:this.input.id,box:s,textX:T,textSpills:_}}},WU=4;var ah=class{constructor(e,r){se(this,"node");se(this,"deps");this.node=e,this.deps=r}get id(){return this.node.name??""}place(e,r){let{node:n}=this,{deps:i}=this,o=gt("parallel",n.properties,r.styleCtx),s=e.x,a=e.y,c=[],l=s,u=0,f=r.currentFlowKey,d=n.name??"p",p=0;for(let _ of n.content){if(_.$type==="DescriptionDirective")continue;r.currentFlowKey=`${f}/par:${d}#${p}`;let T=i.newCursor(s,a+u),R=i.sequenceOne(_,T,r);c.push(R),u+=Math.max(r.bandScale.step(),T.height),l=Math.max(l,T.maxX),p++}r.currentFlowKey=f;let g={x:s,y:a,width:l-s,height:u};e.x=l+hu,e.maxX=Math.max(e.maxX,e.x),e.height=Math.max(e.height,u);let y=n.name;return y&&(r.entityLeftEdges.set(y,g.x),r.entityRightEdges.set(y,g.x+g.width)),{kind:"parallel",id:y,title:n.title??n.name,box:g,children:c,style:o}}};function Fo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function aE(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Uo(t){let e,r,n;t.length!==2?(e=Fo,r=(a,c)=>Fo(t(a),c),n=(a,c)=>t(a)-c):(e=t===Fo||t===aE?t:zU,r=t,n=t);function i(a,c,l=0,u=a.length){if(l<u){if(e(c,c)!==0)return u;do{let f=l+u>>>1;r(a[f],c)<0?l=f+1:u=f}while(l<u)}return l}function o(a,c,l=0,u=a.length){if(l<u){if(e(c,c)!==0)return u;do{let f=l+u>>>1;r(a[f],c)<=0?l=f+1:u=f}while(l<u)}return l}function s(a,c,l=0,u=a.length){let f=i(a,c,l,u-1);return f>l&&n(a[f-1],c)>-n(a[f],c)?f-1:f}return{left:i,center:s,right:o}}function zU(){return 0}function cE(t){return t===null?NaN:+t}var Zv=Uo(Fo),Jv=Zv.right,VU=Zv.left,KU=Uo(cE).center,lE=Jv;var Ha=class extends Map{constructor(e,r=JU){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[n,i]of e)this.set(n,i)}get(e){return super.get(Qv(this,e))}has(e){return super.has(Qv(this,e))}set(e,r){return super.set(YU(this,e),r)}delete(e){return super.delete(ZU(this,e))}};function Qv({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):r}function YU({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function ZU({_intern:t,_key:e},r){let n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function JU(t){return t!==null&&typeof t=="object"?t.valueOf():t}var QU=Math.sqrt(50),eB=Math.sqrt(10),tB=Math.sqrt(2);function ek(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),s=o>=QU?10:o>=eB?5:o>=tB?2:1,a,c,l;return i<0?(l=Math.pow(10,-i)/s,a=Math.round(t*l),c=Math.round(e*l),a/l<t&&++a,c/l>e&&--c,l=-l):(l=Math.pow(10,i)*s,a=Math.round(t/l),c=Math.round(e/l),a*l<t&&++a,c*l>e&&--c),c<a&&.5<=r&&r<2?ek(t,e,r*2):[a,c,l]}function uE(t,e,r){return e=+e,t=+t,r=+r,ek(t,e,r)[2]}function ch(t,e,r){e=+e,t=+t,r=+r;let n=e<t,i=n?uE(e,t,r):uE(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}function lh(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,o=new Array(i);++n<i;)o[n]=t+n*r;return o}function ja(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var tk=Symbol("implicit");function uh(){var t=new Ha,e=[],r=[],n=tk;function i(o){let s=t.get(o);if(s===void 0){if(n!==tk)return n;t.set(o,s=e.push(o)-1)}return r[s%r.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Ha;for(let s of o)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return uh(e,r).unknown(n)},ja.apply(i,arguments),i}function Ru(){var t=uh().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,o,s,a=!1,c=0,l=0,u=.5;delete t.unknown;function f(){var d=e().length,p=i<n,g=p?i:n,y=p?n:i;o=(y-g)/Math.max(1,d-c+l*2),a&&(o=Math.floor(o)),g+=(y-g-o*(d-c))*u,s=o*(1-c),a&&(g=Math.round(g),s=Math.round(s));var _=lh(d).map(function(T){return g+o*T});return r(p?_.reverse():_)}return t.domain=function(d){return arguments.length?(e(d),f()):e()},t.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,f()):[n,i]},t.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,a=!0,f()},t.bandwidth=function(){return s},t.step=function(){return o},t.round=function(d){return arguments.length?(a=!!d,f()):a},t.padding=function(d){return arguments.length?(c=Math.min(1,l=+d),f()):c},t.paddingInner=function(d){return arguments.length?(c=Math.min(1,d),f()):c},t.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},t.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},t.copy=function(){return Ru(e(),[n,i]).round(a).paddingInner(c).paddingOuter(l).align(u)},ja.apply(f(),arguments)}function fh(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function fE(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function Au(){}var bu=.7,hh=1/bu,qa="\\s*([+-]?\\d+)\\s*",wu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",yn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rB=/^#([0-9a-f]{3,8})$/,nB=new RegExp(`^rgb\\(${qa},${qa},${qa}\\)$`),iB=new RegExp(`^rgb\\(${yn},${yn},${yn}\\)$`),oB=new RegExp(`^rgba\\(${qa},${qa},${qa},${wu}\\)$`),sB=new RegExp(`^rgba\\(${yn},${yn},${yn},${wu}\\)$`),aB=new RegExp(`^hsl\\(${wu},${yn},${yn}\\)$`),cB=new RegExp(`^hsla\\(${wu},${yn},${yn},${wu}\\)$`),rk={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};fh(Au,Li,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:nk,formatHex:nk,formatHex8:lB,formatHsl:uB,formatRgb:ik,toString:ik});function nk(){return this.rgb().formatHex()}function lB(){return this.rgb().formatHex8()}function uB(){return uk(this).formatHsl()}function ik(){return this.rgb().formatRgb()}function Li(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=rB.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?ok(e):r===3?new ir(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?dh(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?dh(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=nB.exec(t))?new ir(e[1],e[2],e[3],1):(e=iB.exec(t))?new ir(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=oB.exec(t))?dh(e[1],e[2],e[3],e[4]):(e=sB.exec(t))?dh(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=aB.exec(t))?ck(e[1],e[2]/100,e[3]/100,1):(e=cB.exec(t))?ck(e[1],e[2]/100,e[3]/100,e[4]):rk.hasOwnProperty(t)?ok(rk[t]):t==="transparent"?new ir(NaN,NaN,NaN,0):null}function ok(t){return new ir(t>>16&255,t>>8&255,t&255,1)}function dh(t,e,r,n){return n<=0&&(t=e=r=NaN),new ir(t,e,r,n)}function fB(t){return t instanceof Au||(t=Li(t)),t?(t=t.rgb(),new ir(t.r,t.g,t.b,t.opacity)):new ir}function Wa(t,e,r,n){return arguments.length===1?fB(t):new ir(t,e,r,n??1)}function ir(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}fh(ir,Wa,fE(Au,{brighter(t){return t=t==null?hh:Math.pow(hh,t),new ir(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?bu:Math.pow(bu,t),new ir(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ir(Xo(this.r),Xo(this.g),Xo(this.b),mh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:sk,formatHex:sk,formatHex8:dB,formatRgb:ak,toString:ak}));function sk(){return`#${Bo(this.r)}${Bo(this.g)}${Bo(this.b)}`}function dB(){return`#${Bo(this.r)}${Bo(this.g)}${Bo(this.b)}${Bo((isNaN(this.opacity)?1:this.opacity)*255)}`}function ak(){let t=mh(this.opacity);return`${t===1?"rgb(":"rgba("}${Xo(this.r)}, ${Xo(this.g)}, ${Xo(this.b)}${t===1?")":`, ${t})`}`}function mh(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Xo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Bo(t){return t=Xo(t),(t<16?"0":"")+t.toString(16)}function ck(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new zr(t,e,r,n)}function uk(t){if(t instanceof zr)return new zr(t.h,t.s,t.l,t.opacity);if(t instanceof Au||(t=Li(t)),!t)return new zr;if(t instanceof zr)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=NaN,a=o-i,c=(o+i)/2;return a?(e===o?s=(r-n)/a+(r<n)*6:r===o?s=(n-e)/a+2:s=(e-r)/a+4,a/=c<.5?o+i:2-o-i,s*=60):a=c>0&&c<1?0:s,new zr(s,a,c,t.opacity)}function fk(t,e,r,n){return arguments.length===1?uk(t):new zr(t,e,r,n??1)}function zr(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}fh(zr,fk,fE(Au,{brighter(t){return t=t==null?hh:Math.pow(hh,t),new zr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?bu:Math.pow(bu,t),new zr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new ir(dE(t>=240?t-240:t+120,i,n),dE(t,i,n),dE(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new zr(lk(this.h),ph(this.s),ph(this.l),mh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=mh(this.opacity);return`${t===1?"hsl(":"hsla("}${lk(this.h)}, ${ph(this.s)*100}%, ${ph(this.l)*100}%${t===1?")":`, ${t})`}`}}));function lk(t){return t=(t||0)%360,t<0?t+360:t}function ph(t){return Math.max(0,Math.min(1,t||0))}function dE(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}function pE(t,e,r,n,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*r+(1+3*t+3*o-3*s)*n+s*i)/6}function dk(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],o=t[n+1],s=n>0?t[n-1]:2*i-o,a=n<e-1?t[n+2]:2*o-i;return pE((r-n/e)*e,s,i,o,a)}}function pk(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),i=t[(n+e-1)%e],o=t[n%e],s=t[(n+1)%e],a=t[(n+2)%e];return pE((r-n/e)*e,i,o,s,a)}}var Su=t=>()=>t;function pB(t,e){return function(r){return t+r*e}}function hB(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function hk(t){return(t=+t)==1?gh:function(e,r){return r-e?hB(e,r,t):Su(isNaN(e)?r:e)}}function gh(t,e){var r=e-t;return r?pB(t,r):Su(isNaN(t)?e:t)}var hE=(function t(e){var r=hk(e);function n(i,o){var s=r((i=Wa(i)).r,(o=Wa(o)).r),a=r(i.g,o.g),c=r(i.b,o.b),l=gh(i.opacity,o.opacity);return function(u){return i.r=s(u),i.g=a(u),i.b=c(u),i.opacity=l(u),i+""}}return n.gamma=t,n})(1);function mk(t){return function(e){var r=e.length,n=new Array(r),i=new Array(r),o=new Array(r),s,a;for(s=0;s<r;++s)a=Wa(e[s]),n[s]=a.r||0,i[s]=a.g||0,o[s]=a.b||0;return n=t(n),i=t(i),o=t(o),a.opacity=1,function(c){return a.r=n(c),a.g=i(c),a.b=o(c),a+""}}}var Eee=mk(dk),_ee=mk(pk);function gk(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=t[i]*(1-o)+e[i]*o;return n}}function yk(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function xk(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),o=new Array(r),s;for(s=0;s<n;++s)i[s]=Go(t[s],e[s]);for(;s<r;++s)o[s]=e[s];return function(a){for(s=0;s<n;++s)o[s]=i[s](a);return o}}function Tk(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function $i(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Ek(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=Go(t[i],e[i]):n[i]=e[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var gE=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mE=new RegExp(gE.source,"g");function mB(t){return function(){return t}}function gB(t){return function(e){return t(e)+""}}function _k(t,e){var r=gE.lastIndex=mE.lastIndex=0,n,i,o,s=-1,a=[],c=[];for(t=t+"",e=e+"";(n=gE.exec(t))&&(i=mE.exec(e));)(o=i.index)>r&&(o=e.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,c.push({i:s,x:$i(n,i)})),r=mE.lastIndex;return r<e.length&&(o=e.slice(r),a[s]?a[s]+=o:a[++s]=o),a.length<2?c[0]?gB(c[0].x):mB(e):(e=c.length,function(l){for(var u=0,f;u<e;++u)a[(f=c[u]).i]=f.x(l);return a.join("")})}function Go(t,e){var r=typeof e,n;return e==null||r==="boolean"?Su(e):(r==="number"?$i:r==="string"?(n=Li(e))?(e=n,hE):_k:e instanceof Li?hE:e instanceof Date?Tk:yk(e)?gk:Array.isArray(e)?xk:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Ek:$i)(t,e)}function yE(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function xE(t){return function(){return t}}function TE(t){return+t}var Rk=[0,1];function za(t){return t}function EE(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:xE(isNaN(e)?NaN:.5)}function yB(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function xB(t,e,r){var n=t[0],i=t[1],o=e[0],s=e[1];return i<n?(n=EE(i,n),o=r(s,o)):(n=EE(n,i),o=r(o,s)),function(a){return o(n(a))}}function TB(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),o=new Array(n),s=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<n;)i[s]=EE(t[s],t[s+1]),o[s]=r(e[s],e[s+1]);return function(a){var c=lE(t,a,1,n)-1;return o[c](i[c](a))}}function bk(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function EB(){var t=Rk,e=Rk,r=Go,n,i,o,s=za,a,c,l;function u(){var d=Math.min(t.length,e.length);return s!==za&&(s=yB(t[0],t[d-1])),a=d>2?TB:xB,c=l=null,f}function f(d){return d==null||isNaN(d=+d)?o:(c||(c=a(t.map(n),e,r)))(n(s(d)))}return f.invert=function(d){return s(i((l||(l=a(e,t.map(n),$i)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,TE),u()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),u()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),r=yE,u()},f.clamp=function(d){return arguments.length?(s=d?!0:za,u()):s!==za},f.interpolate=function(d){return arguments.length?(r=d,u()):r},f.unknown=function(d){return arguments.length?(o=d,f):o},function(d,p){return n=d,i=p,u()}}function _E(){return EB()(za,za)}function RE(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],o=t[n],s;return o<i&&(s=r,r=n,n=s,s=i,i=o,o=s),t[r]=e.floor(i),t[n]=e.ceil(o),t}var bE=new Date,wE=new Date;function Ve(t,e,r,n){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{let s=i(o),a=i.ceil(o);return o-s<a-o?s:a},i.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,a)=>{let c=[];if(o=i.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return c;let l;do c.push(l=new Date(+o)),e(o,a),t(o);while(l<o&&o<s);return c},i.filter=o=>Ve(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),r&&(i.count=(o,s)=>(bE.setTime(+o),wE.setTime(+s),t(bE),t(wE),Math.floor(r(bE,wE))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?s=>n(s)%o===0:s=>i.count(0,s)%o===0):i)),i}var Iu=Ve(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Iu.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Ve(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Iu);var nte=Iu.range;var xn=Ve(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),wk=xn.range;var Va=Ve(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),_B=Va.range,yh=Ve(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),RB=yh.range;var Ka=Ve(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),bB=Ka.range,xh=Ve(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),wB=xh.range;var Hn=Ve(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),AB=Hn.range,ku=Ve(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),SB=ku.range,Th=Ve(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),IB=Th.range;function qo(t){return Ve(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}var jn=qo(0),Ya=qo(1),Sk=qo(2),Ik=qo(3),Di=qo(4),vk=qo(5),kk=qo(6),Nk=jn.range,vB=Ya.range,kB=Sk.range,NB=Ik.range,CB=Di.range,PB=vk.range,OB=kk.range;function Wo(t){return Ve(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var zo=Wo(0),Za=Wo(1),Ck=Wo(2),Pk=Wo(3),Mi=Wo(4),Ok=Wo(5),Lk=Wo(6),$k=zo.range,LB=Za.range,$B=Ck.range,DB=Pk.range,MB=Mi.range,FB=Ok.range,UB=Lk.range;var Ja=Ve(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),BB=Ja.range,Eh=Ve(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),XB=Eh.range;var hr=Ve(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());hr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ve(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});var GB=hr.range,Vr=Ve(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Vr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ve(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});var HB=Vr.range;function Mk(t,e,r,n,i,o){let s=[[xn,1,1e3],[xn,5,5*1e3],[xn,15,15*1e3],[xn,30,30*1e3],[o,1,6e4],[o,5,5*6e4],[o,15,15*6e4],[o,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function a(l,u,f){let d=u<l;d&&([l,u]=[u,l]);let p=f&&typeof f.range=="function"?f:c(l,u,f),g=p?p.range(l,+u+1):[];return d?g.reverse():g}function c(l,u,f){let d=Math.abs(u-l)/f,p=Uo(([,,_])=>_).right(s,d);if(p===s.length)return t.every(ch(l/31536e6,u/31536e6,f));if(p===0)return Iu.every(Math.max(ch(l,u,f),1));let[g,y]=s[d/s[p-1][2]<s[p][2]/d?p-1:p];return g.every(y)}return[a,c]}var[qB,WB]=Mk(Vr,Eh,zo,Th,xh,yh),[AE,SE]=Mk(hr,Ja,jn,Hn,Ka,Va);function IE(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function vE(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Nu(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function kE(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,o=t.days,s=t.shortDays,a=t.months,c=t.shortMonths,l=Cu(i),u=Pu(i),f=Cu(o),d=Pu(o),p=Cu(s),g=Pu(s),y=Cu(a),_=Pu(a),T=Cu(c),R=Pu(c),E={a:v,A:B,b:H,B:$,c:null,d:Hk,e:Hk,f:m2,g:A2,G:I2,H:d2,I:p2,j:h2,L:Vk,m:g2,M:y2,p:J,q:K,Q:Wk,s:zk,S:x2,u:T2,U:E2,V:_2,w:R2,W:b2,x:null,X:null,y:w2,Y:S2,Z:v2,"%":qk},k={a:_e,A:V,b:he,B:it,c:null,d:jk,e:jk,f:P2,g:G2,G:j2,H:k2,I:N2,j:C2,L:Yk,m:O2,M:L2,p:je,q:qe,Q:Wk,s:zk,S:$2,u:D2,U:M2,V:F2,w:U2,W:B2,x:null,X:null,y:X2,Y:H2,Z:q2,"%":qk},D={a:Ee,A:O,b:w,B:L,c:M,d:Xk,e:Xk,f:c2,g:Bk,G:Uk,H:Gk,I:Gk,j:i2,L:a2,m:n2,M:o2,p:le,q:r2,Q:u2,s:f2,S:s2,u:ZB,U:JB,V:QB,w:YB,W:e2,x:A,X:S,y:Bk,Y:Uk,Z:t2,"%":l2};E.x=P(r,E),E.X=P(n,E),E.c=P(e,E),k.x=P(r,k),k.X=P(n,k),k.c=P(e,k);function P(G,Z){return function(ee){var C=[],xe=-1,Re=0,Fe=G.length,ut,U,Ir;for(ee instanceof Date||(ee=new Date(+ee));++xe<Fe;)G.charCodeAt(xe)===37&&(C.push(G.slice(Re,xe)),(U=Fk[ut=G.charAt(++xe)])!=null?ut=G.charAt(++xe):U=ut==="e"?" ":"0",(Ir=Z[ut])&&(ut=Ir(ee,U)),C.push(ut),Re=xe+1);return C.push(G.slice(Re,xe)),C.join("")}}function j(G,Z){return function(ee){var C=Nu(1900,void 0,1),xe=q(C,G,ee+="",0),Re,Fe;if(xe!=ee.length)return null;if("Q"in C)return new Date(C.Q);if("s"in C)return new Date(C.s*1e3+("L"in C?C.L:0));if(Z&&!("Z"in C)&&(C.Z=0),"p"in C&&(C.H=C.H%12+C.p*12),C.m===void 0&&(C.m="q"in C?C.q:0),"V"in C){if(C.V<1||C.V>53)return null;"w"in C||(C.w=1),"Z"in C?(Re=vE(Nu(C.y,0,1)),Fe=Re.getUTCDay(),Re=Fe>4||Fe===0?Za.ceil(Re):Za(Re),Re=ku.offset(Re,(C.V-1)*7),C.y=Re.getUTCFullYear(),C.m=Re.getUTCMonth(),C.d=Re.getUTCDate()+(C.w+6)%7):(Re=IE(Nu(C.y,0,1)),Fe=Re.getDay(),Re=Fe>4||Fe===0?Ya.ceil(Re):Ya(Re),Re=Hn.offset(Re,(C.V-1)*7),C.y=Re.getFullYear(),C.m=Re.getMonth(),C.d=Re.getDate()+(C.w+6)%7)}else("W"in C||"U"in C)&&("w"in C||(C.w="u"in C?C.u%7:"W"in C?1:0),Fe="Z"in C?vE(Nu(C.y,0,1)).getUTCDay():IE(Nu(C.y,0,1)).getDay(),C.m=0,C.d="W"in C?(C.w+6)%7+C.W*7-(Fe+5)%7:C.w+C.U*7-(Fe+6)%7);return"Z"in C?(C.H+=C.Z/100|0,C.M+=C.Z%100,vE(C)):IE(C)}}function q(G,Z,ee,C){for(var xe=0,Re=Z.length,Fe=ee.length,ut,U;xe<Re;){if(C>=Fe)return-1;if(ut=Z.charCodeAt(xe++),ut===37){if(ut=Z.charAt(xe++),U=D[ut in Fk?Z.charAt(xe++):ut],!U||(C=U(G,ee,C))<0)return-1}else if(ut!=ee.charCodeAt(C++))return-1}return C}function le(G,Z,ee){var C=l.exec(Z.slice(ee));return C?(G.p=u.get(C[0].toLowerCase()),ee+C[0].length):-1}function Ee(G,Z,ee){var C=p.exec(Z.slice(ee));return C?(G.w=g.get(C[0].toLowerCase()),ee+C[0].length):-1}function O(G,Z,ee){var C=f.exec(Z.slice(ee));return C?(G.w=d.get(C[0].toLowerCase()),ee+C[0].length):-1}function w(G,Z,ee){var C=T.exec(Z.slice(ee));return C?(G.m=R.get(C[0].toLowerCase()),ee+C[0].length):-1}function L(G,Z,ee){var C=y.exec(Z.slice(ee));return C?(G.m=_.get(C[0].toLowerCase()),ee+C[0].length):-1}function M(G,Z,ee){return q(G,e,Z,ee)}function A(G,Z,ee){return q(G,r,Z,ee)}function S(G,Z,ee){return q(G,n,Z,ee)}function v(G){return s[G.getDay()]}function B(G){return o[G.getDay()]}function H(G){return c[G.getMonth()]}function $(G){return a[G.getMonth()]}function J(G){return i[+(G.getHours()>=12)]}function K(G){return 1+~~(G.getMonth()/3)}function _e(G){return s[G.getUTCDay()]}function V(G){return o[G.getUTCDay()]}function he(G){return c[G.getUTCMonth()]}function it(G){return a[G.getUTCMonth()]}function je(G){return i[+(G.getUTCHours()>=12)]}function qe(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var Z=P(G+="",E);return Z.toString=function(){return G},Z},parse:function(G){var Z=j(G+="",!1);return Z.toString=function(){return G},Z},utcFormat:function(G){var Z=P(G+="",k);return Z.toString=function(){return G},Z},utcParse:function(G){var Z=j(G+="",!0);return Z.toString=function(){return G},Z}}}var Fk={"-":"",_:" ",0:"0"},kt=/^\s*\d+/,zB=/^%/,VB=/[\\^$*+?|[\]().{}]/g;function Ce(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(e)+i:i)}function KB(t){return t.replace(VB,"\\$&")}function Cu(t){return new RegExp("^(?:"+t.map(KB).join("|")+")","i")}function Pu(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function YB(t,e,r){var n=kt.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function ZB(t,e,r){var n=kt.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function JB(t,e,r){var n=kt.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function QB(t,e,r){var n=kt.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function e2(t,e,r){var n=kt.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function Uk(t,e,r){var n=kt.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function Bk(t,e,r){var n=kt.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function t2(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function r2(t,e,r){var n=kt.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function n2(t,e,r){var n=kt.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Xk(t,e,r){var n=kt.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function i2(t,e,r){var n=kt.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function Gk(t,e,r){var n=kt.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function o2(t,e,r){var n=kt.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function s2(t,e,r){var n=kt.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function a2(t,e,r){var n=kt.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function c2(t,e,r){var n=kt.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function l2(t,e,r){var n=zB.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function u2(t,e,r){var n=kt.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function f2(t,e,r){var n=kt.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function Hk(t,e){return Ce(t.getDate(),e,2)}function d2(t,e){return Ce(t.getHours(),e,2)}function p2(t,e){return Ce(t.getHours()%12||12,e,2)}function h2(t,e){return Ce(1+Hn.count(hr(t),t),e,3)}function Vk(t,e){return Ce(t.getMilliseconds(),e,3)}function m2(t,e){return Vk(t,e)+"000"}function g2(t,e){return Ce(t.getMonth()+1,e,2)}function y2(t,e){return Ce(t.getMinutes(),e,2)}function x2(t,e){return Ce(t.getSeconds(),e,2)}function T2(t){var e=t.getDay();return e===0?7:e}function E2(t,e){return Ce(jn.count(hr(t)-1,t),e,2)}function Kk(t){var e=t.getDay();return e>=4||e===0?Di(t):Di.ceil(t)}function _2(t,e){return t=Kk(t),Ce(Di.count(hr(t),t)+(hr(t).getDay()===4),e,2)}function R2(t){return t.getDay()}function b2(t,e){return Ce(Ya.count(hr(t)-1,t),e,2)}function w2(t,e){return Ce(t.getFullYear()%100,e,2)}function A2(t,e){return t=Kk(t),Ce(t.getFullYear()%100,e,2)}function S2(t,e){return Ce(t.getFullYear()%1e4,e,4)}function I2(t,e){var r=t.getDay();return t=r>=4||r===0?Di(t):Di.ceil(t),Ce(t.getFullYear()%1e4,e,4)}function v2(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ce(e/60|0,"0",2)+Ce(e%60,"0",2)}function jk(t,e){return Ce(t.getUTCDate(),e,2)}function k2(t,e){return Ce(t.getUTCHours(),e,2)}function N2(t,e){return Ce(t.getUTCHours()%12||12,e,2)}function C2(t,e){return Ce(1+ku.count(Vr(t),t),e,3)}function Yk(t,e){return Ce(t.getUTCMilliseconds(),e,3)}function P2(t,e){return Yk(t,e)+"000"}function O2(t,e){return Ce(t.getUTCMonth()+1,e,2)}function L2(t,e){return Ce(t.getUTCMinutes(),e,2)}function $2(t,e){return Ce(t.getUTCSeconds(),e,2)}function D2(t){var e=t.getUTCDay();return e===0?7:e}function M2(t,e){return Ce(zo.count(Vr(t)-1,t),e,2)}function Zk(t){var e=t.getUTCDay();return e>=4||e===0?Mi(t):Mi.ceil(t)}function F2(t,e){return t=Zk(t),Ce(Mi.count(Vr(t),t)+(Vr(t).getUTCDay()===4),e,2)}function U2(t){return t.getUTCDay()}function B2(t,e){return Ce(Za.count(Vr(t)-1,t),e,2)}function X2(t,e){return Ce(t.getUTCFullYear()%100,e,2)}function G2(t,e){return t=Zk(t),Ce(t.getUTCFullYear()%100,e,2)}function H2(t,e){return Ce(t.getUTCFullYear()%1e4,e,4)}function j2(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Mi(t):Mi.ceil(t),Ce(t.getUTCFullYear()%1e4,e,4)}function q2(){return"+0000"}function qk(){return"%"}function Wk(t){return+t}function zk(t){return Math.floor(+t/1e3)}var Qa,_h,Jk,Qk,eN;NE({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function NE(t){return Qa=kE(t),_h=Qa.format,Jk=Qa.parse,Qk=Qa.utcFormat,eN=Qa.utcParse,Qa}function W2(t){return new Date(t)}function z2(t){return t instanceof Date?+t:+new Date(+t)}function tN(t,e,r,n,i,o,s,a,c,l){var u=_E(),f=u.invert,d=u.domain,p=l(".%L"),g=l(":%S"),y=l("%I:%M"),_=l("%I %p"),T=l("%a %d"),R=l("%b %d"),E=l("%B"),k=l("%Y");function D(P){return(c(P)<P?p:a(P)<P?g:s(P)<P?y:o(P)<P?_:n(P)<P?i(P)<P?T:R:r(P)<P?E:k)(P)}return u.invert=function(P){return new Date(f(P))},u.domain=function(P){return arguments.length?d(Array.from(P,z2)):d().map(W2)},u.ticks=function(P){var j=d();return t(j[0],j[j.length-1],P??10)},u.tickFormat=function(P,j){return j==null?D:l(j)},u.nice=function(P){var j=d();return(!P||typeof P.range!="function")&&(P=e(j[0],j[j.length-1],P??10)),P?d(RE(j,P)):u},u.copy=function(){return bk(u,tN(t,e,r,n,i,o,s,a,c,l))},u}function Rh(){return ja.apply(tN(AE,SE,hr,Ja,jn,Hn,Ka,Va,xn,_h).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var CE=class t{constructor(e,r,n){se(this,"bandwidthPx");se(this,"stepPx");se(this,"d3");this.bandwidthPx=e,this.stepPx=r,this.d3=n}static fixedRow(e){return new t(e.bandwidth,e.step)}static forRows(e){let r=Array.from({length:e.count},(i,o)=>String(o)),n=Ru().domain(r).range(e.range).paddingInner(e.paddingInner??0).paddingOuter(e.paddingOuter??0);return new t(n.bandwidth(),n.step(),n)}bandwidth(){return this.bandwidthPx}step(){return this.stepPx}forward(e){if(!this.d3)throw new Error("BandScale.forward is only available on closed-domain bands (BandScale.forRows)");let r=this.d3(e);if(r===void 0)throw new Error(`BandScale: unknown band id "${e}"`);return r}},V2={bandwidth:56,step:64};function rN(){return CE.fixedRow(V2)}var bh=class{constructor(e){se(this,"domain");se(this,"range");se(this,"pixelsPerDay");se(this,"calendar");se(this,"d3");this.domain=e.domain,this.range=e.range,this.calendar=e.calendar;let r=Math.max(1,Hr(e.domain[0],e.domain[1]));this.pixelsPerDay=(e.range[1]-e.range[0])/r,this.d3=Rh().domain(e.domain).range(e.range)}forward(e){let r=Hr(this.domain[0],e);return this.range[0]+r*this.pixelsPerDay}forwardWithinDomain(e){return e<this.domain[0]||e>this.domain[1]?null:this.forward(e)}invert(e){return this.d3.invert(e)}get originX(){return this.range[0]}get widthPx(){return this.range[1]-this.range[0]}};function wh(t){return t.endsWith(":")?t.slice(0,-1):t}function nN(t,e){let n=t.roadmapDecl?.properties.find(c=>wh(c.key)==="scale")?.value,i="weeks",o,s;if(n)if(n==="days"||n==="weeks"||n==="months"||n==="quarters"||n==="years")i=n;else{let c=/^(\d+)([dwmqy])$/.exec(n);if(c){let l=Math.max(1,parseInt(c[1],10));switch(c[2]){case"d":i="days";break;case"w":i="weeks";break;case"m":i="months";break;case"q":i="quarters";break;case"y":i="years";break}o=Ah(i)*l,s=1}}let a=s??Kv[i]??4;if(e){let l=e.properties.find(g=>wh(g.key)==="unit")?.value??i,u=e.properties.find(g=>wh(g.key)==="label-every"),f=e.properties.find(g=>wh(g.key)==="pixels-per-unit"),d=u?Math.max(1,parseInt(u.value,10)||a):a,p=f?Math.max(1,parseInt(f.value,10)||Ah(l)):o??Ah(l);return{unit:l,labelEvery:d,pixelsPerUnit:p}}return{unit:i,labelEvery:a,pixelsPerUnit:o??Ah(i)}}function Ah(t){switch(t){case"days":return qv;case"weeks":return 40;case"months":return 80;case"quarters":return 160;case"years":return 320}}function iN(t,e,r,n=fu){let i=r.daysPerUnit(e.unit),o=i*t.pixelsPerDay,s=Math.max(1,Math.round(t.widthPx/t.pixelsPerDay)),a=Math.floor(s/i)+1,c=[];for(let l=0;l<a;l++){let u=l*i,f=t.originX+u*t.pixelsPerDay,d=l%e.labelEvery===0,p=l===a-1;c.push({x:f,labelX:p?void 0:f+o/2,major:d,label:d&&!p?K2(e.unit,Do(t.domain[0],u),l,n):void 0})}return c}function K2(t,e,r,n){switch(t){case"days":return`${e.getUTCMonth()+1}/${e.getUTCDate()}`;case"weeks":{let i=e.toLocaleString(n,{month:"short",timeZone:"UTC"}),o=e.getUTCDate().toString().padStart(2,"0");return`${i} ${o}`}case"months":return e.toLocaleString(n,{month:"short",timeZone:"UTC"});case"quarters":{let i=Math.floor(e.getUTCMonth()/3)+1;return`${Wp(n).quarterPrefix}${i} ${e.getUTCFullYear()}`}case"years":return`${e.getUTCFullYear()}`}}function oN(t){return{daysPerUnit:e=>PE(e,t),addUnits:(e,r,n)=>Do(e,r*PE(n,t)),isWorkingDay:()=>!0}}function sN(t,e){return PE(t,e)}function PE(t,e){switch(t){case"days":return 1;case"weeks":return e.daysPerWeek;case"months":return e.daysPerMonth;case"quarters":return e.daysPerQuarter;case"years":return e.daysPerYear}}var OE=class{constructor(e,r){se(this,"id");se(this,"anchor");this.id=e,this.anchor=r}place(e,r){let n=ne(this.anchor.properties,"date"),i=Lt(n);if(!i)return null;let o=e.scale.forwardWithinDomain(i);if(o===null)return null;let s=gt("anchor",this.anchor.properties,e.styleCtx),a=e.markerRowPlacements.get(this.id),c=a?.centerY??e.timeline.markerRow.y,l={x:o,y:c},u=a?.labelBox??{x:o+6+6,y:c-4,width:0,height:12},f=a?.labelSide??"right";return e.entityLeftEdges.set(this.id,o),e.entityRightEdges.set(this.id,o),e.entityMidpoints.set(this.id,l),{id:this.id,title:this.anchor.title??this.id,center:l,radius:6,style:s,predecessorPoints:[],cutTopY:e.chartTopY,cutBottomY:e.swimlaneBottomY,bumpedUp:(a?.rowIndex??0)>0,labelBox:u,labelSide:f}}};function cN(t,e,r){let n=[];for(let[i,o]of t){let s=new OE(i,o).place(e,r);s&&n.push(s)}return n}function LE(t,e,r){let n=[],i=new Map,o=new Map;return[...t.entries()].sort(([c],[l])=>c.localeCompare(l)).forEach(([c,l],u)=>{let f=u+1;i.set(c,f),o.set(c,nr(l.properties,"on")),n.push({number:f,title:l.title??c,description:l.description?.text,style:gt("footnote",l.properties,e.styleCtx)})}),{area:{box:{x:Wr,y:r+Wr,width:e.chartRightX-2*Wr,height:n.length===0?0:yu+n.length*xu+Wr},entries:n},index:i,hosts:o}}var Y2=.8,Z2=1;function J2(t){let e=[];return uN(t,e),e}function uN(t,e){for(let r of t)if(r.kind==="item"){let n=Q2(r);n>0&&r.box.width>0&&e.push({startX:r.box.x,endX:r.box.x+r.box.width,load:n})}else(r.kind==="parallel"||r.kind==="group")&&uN(r.children,e)}function Q2(t){return t.capacity?t.capacity.value:t.size?1:0}function fN(t){if(t.capacityValue<=0||t.warnFraction===null&&t.overFraction===null)return null;let e=J2(t.children);if(e.length===0)return null;let r=new Set;for(let s of e)r.add(s.startX),r.add(s.endX);let n=Array.from(r).sort((s,a)=>s-a);if(n.length<2)return null;let i=[];for(let s=0;s<n.length-1;s++){let a=n[s],c=n[s+1],l=(a+c)/2,u=0;for(let f of e)f.startX<=l&&l<f.endX&&(u+=f.load);i.push({startX:a,endX:c,load:u,classification:eX(u,t.capacityValue,t.warnFraction,t.overFraction)})}let o=[];for(let s of i){let a=o[o.length-1];a&&a.classification===s.classification&&a.endX===s.startX?a.endX=s.endX:o.push({...s})}return{segments:o,capacityValue:t.capacityValue,warnFraction:t.warnFraction,overFraction:t.overFraction}}function eX(t,e,r,n){let i=t/e;return n!==null&&i>=n?"red":r!==null&&i>=r?"yellow":"green"}function dN(t,e){let r=e.get("swimlane"),n=lN(ne(t.properties,"utilization-warn-at"),r?ne(r.properties,"utilization-warn-at"):void 0,Y2),i=lN(ne(t.properties,"utilization-over-at"),r?ne(r.properties,"utilization-over-at"):void 0,Z2);return{warn:n,over:i}}function lN(t,e,r){let i=nX(t??e);return i.kind==="unset"?r:i.kind==="none"?null:i.value}var tX=/^\d+(?:\.\d+)?%$/,rX=/^\d+\.\d+$/;function nX(t){if(t===void 0)return{kind:"unset"};if(t==="none")return{kind:"none"};if(tX.test(t)){let e=parseFloat(t)/100;return Number.isFinite(e)&&e>0?{kind:"number",value:e}:{kind:"unset"}}if(rX.test(t)){let e=parseFloat(t);return Number.isFinite(e)&&e>0?{kind:"number",value:e}:{kind:"unset"}}return{kind:"unset"}}var pN=10;function iX(t,e,r){let n=ne(t.properties,"capacity"),i=Ni(n);if(i===null)return{capacity:null,badgeWidthPx:0};let o=au(i),s=cu(e.capacityIcon,r),a=$o(o,s,pN);return{capacity:{value:i,text:o,icon:s},badgeWidthPx:a}}var oX=10,sX=38,aX=8;function cX(t,e,r){let n=t.title??t.name??"";if(!n)return 0;let i=ne(t.properties,"owner");return lu(0,n,i??void 0,e,r).rightX}function lX(t,e){if(!t.name)return[];let r=[];for(let[n,i]of e.footnoteHosts.entries())if(i.includes(t.name)){let o=e.footnoteIndex.get(n);o!==void 0&&r.push(o)}return r.sort((n,i)=>n-i),r}function uX(t,e,r,n){for(let i of t.content){if(i.$type==="DescriptionDirective")continue;let o=wr(i)?i.properties:i.properties??[];return n.resolveChildStart(o,e,e,r)}}var ec=class{constructor(e,r){se(this,"input");se(this,"deps");this.input=e,this.deps=r}get id(){return this.input.lane.name??""}place(e,r){let{lane:n,bandIndex:i}=this.input,{deps:o}=this,s=gt("swimlane",n.properties,r.styleCtx),a=e.x,c=r.bandScale.step(),l=r.currentFlowKey;r.currentFlowKey=`lane:${n.name??i}`;let{capacity:u,badgeWidthPx:f}=iX(n,s,r.symbols),d=lX(n,r),p=d.length>0?o.estimateTextWidth(d.join(","),pN):0,g=cX(n,f,p),y=uX(n,a,r,o),_=!n.title||y===void 0||y>=g+aX,T=e.y+(_?oX:sX),R=new Fa({laneLeftX:a,originY:T,minRowHeight:c,slackCorridors:r.slackCorridors}),E=a,k=[];for(let w of n.content){if(w.$type==="DescriptionDirective")continue;if(!wr(w)){let qe=w.properties??[],G=o.resolveChildStart(qe,E,a,r),{rowIndex:Z,y:ee}=R.placeBlock(),C=o.newCursor(G,ee),xe=o.sequenceOne(w,C,r);k.push(xe);let Re=xe.box.x+xe.box.width,Fe=Math.max(c,C.height);R.commitBlock({rowIndex:Z,placed:xe,blockHeight:Fe,blockEnd:Re}),E=Math.max(E,Re);continue}let L=w.properties,M=o.resolveChildStart(L,E,a,r),A=Ci(L,r.sizes,r.cal),S=Math.max(Sr,A*r.timeline.pixelsPerDay),v=M+S,B=w.name??"",H=o.predictItemChipExtraHeight(w,r),$=c+H,{rowIndex:J,y:K}=R.placeItem({childId:B,desiredStart:M,desiredEnd:v,predictedHeight:$}),_e=o.newCursor(M,K),V=o.sequenceItem(w,_e,r);k.push(V);let he=V.box.x+V.box.width+jr;E=Math.max(E,he);let it=null;(V.textSpills||V.chipsOutside||V.dotSpills||V.iconSpills||V.footnoteSpills)&&(it=Math.max(V.decorationsRightX,V.chipsOutside?V.chipsRightX:0)+6),R.commitItem({rowIndex:J,placed:V,logicalEnd:he,spillReservation:it,rowHeight:$})}let D=T-e.y,P=Math.max(c+32,D+R.usedHeight()+16),j=Math.max(R.usedRightX(),g),q={x:0,y:e.y,width:r.chartRightX,height:P},le=ne(n.properties,"owner"),Ee;if(le){let w=r.teams.get(le),L=r.persons.get(le);Ee=w?.title??L?.title??le}let O=u?(()=>{let{warn:w,over:L}=dN(n,r.styleCtx.defaults);return fN({children:k,capacityValue:u.value,warnFraction:w,overFraction:L})})():null;return r.currentFlowKey=l,{positioned:{id:n.name,title:n.title??n.name??"",box:q,bandIndex:i,children:k,nested:[],style:s,owner:Ee,footnoteIndicators:d,capacity:u,utilization:O},usedHeight:P,usedRightX:j}}};var fX=18,dX=14,pX=14,hX=16,mX=32;function hN(t,e,r,n){let i=r+fX,o=[],s=!0;for(let a of t){s||(i+=hX),s=!1;let c=a.content.roadmap?.title??a.sourcePath,l=i+dX,u={cal:e.cal,styleCtx:{theme:e.styleCtx.theme,styles:a.config.styles,defaults:a.config.defaults,labels:a.content.labels},sizes:jp(a.content.sizes,e.cal),labels:a.content.labels,teams:a.content.teams,persons:a.content.persons,symbols:a.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:e.timeline,scale:e.scale,calendar:e.calendar,bandScale:e.bandScale,entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,entityVisualLeftX:new Map,entityVisualRightX:new Map,itemArrowSource:new Map,itemFlowKey:new Map,currentFlowKey:"",itemSlackAttachY:new Map,slackCorridors:[],markerRowPlacements:new Map,chartTopY:l,chartBottomY:l,swimlaneBottomY:l,chartRightX:e.chartRightX},f=[],d=l,p=0,g=u.timeline.originX;for(let P of a.content.swimlanes.values()){let{positioned:j,usedHeight:q,usedRightX:le}=new ec({lane:P,bandIndex:p},n).place({x:u.timeline.originX,y:d},u);f.push(j),d+=q,p++,le>g&&(g=le)}let y=d,_=Math.max(e.bandScale.bandwidth(),y-i+pX),T=0,{chromeRightX:R}=uu(T,c,a.sourcePath),E=Math.max(R,g)+mX,k=Math.min(e.chartRightX-T,E-T),D={x:T,y:i,width:k,height:_};for(let P of f)P.box.width=k;o.push({sourcePath:a.sourcePath,label:c,box:D,nestedSwimlanes:f,style:gt("swimlane",[],e.styleCtx)}),i+=_}return{regions:o,endY:i}}function vh(t,e){let r=[];for(let n of t){let o=e.entityVisualRightX.get(n)??e.entityRightEdges.get(n);if(o===void 0)continue;let s=e.itemSlackAttachY.get(n)??e.entityMidpoints.get(n)?.y??0,a=e.itemFlowKey.get(n)??`marker:${n}`;r.push({ref:n,x:o,y:s,flowKey:a})}return r}function kh(t){let e=new Map;for(let r of t){let n=e.get(r.flowKey);(!n||r.x>n.x)&&e.set(r.flowKey,r)}return Array.from(e.values())}function mN(t,e,r,n,i,o,s,a){let c=n.length*i*.58*(o?1.05:1),l=t+r+6,u=t-r-6-c,f=l+c<=a,d=u>=s,p=f?"right":d?"left":"right";return{box:{x:p==="right"?l:u,y:e-4,width:c,height:12},side:p}}var $E=class{constructor(e,r){se(this,"id");se(this,"milestone");this.id=e,this.milestone=r}place(e){let r=this.milestone,n=gt("milestone",r.properties,e.styleCtx),i=ne(r.properties,"date"),o=nr(r.properties,"after"),s=Lt(i),a=e.timeline.markerRow.y,c=6,l=r.title??this.id,u=null,f=a,d=null,p="right",g=!1,y,_=!1;if(s){let R=e.scale.forwardWithinDomain(s);if(R===null)return null;u=R,g=!0;let E=e.markerRowPlacements.get(this.id);E&&(f=E.centerY,d=E.labelBox,p=E.labelSide);let k=vh(o,e),D=kh(k),P=null;for(let j of D)(!P||j.x>P.x)&&(P=j);P&&P.x>R&&(_=!0,y=[{x:P.x,y:P.y>0?P.y:f}])}else if(o.length>0){let R=vh(o,e),E=kh(R);E.sort((j,q)=>q.x-j.x);let k=E[0]?.x??e.timeline.originX;u=k,g=!1;let D=mN(u,a,c,l,10,!0,e.timeline.box.x,e.chartRightX);f=a,d=D.box,p=D.side,e.markerRowPlacements.set(this.id,{rowIndex:0,centerY:f,labelBox:d,labelSide:p});let P=[];for(let j=1;j<E.length;j++){let q=E[j];q.x<k&&q.y>0&&P.push({x:q.x,y:q.y})}P.length>0&&(y=P)}if(u===null)return null;if(!d){let R=mN(u,f,c,l,10,!0,e.timeline.box.x,e.chartRightX);d=R.box,p=R.side}let T={x:u,y:f};return e.entityLeftEdges.set(this.id,T.x),e.entityRightEdges.set(this.id,T.x),e.entityMidpoints.set(this.id,T),{id:this.id,title:l,center:T,radius:c,fixed:g,slackArrows:y,isOverrun:_,style:n,cutTopY:e.chartTopY,cutBottomY:e.swimlaneBottomY,labelBox:d,labelSide:p}}};function gN(t,e){let r=[];for(let[n,i]of t){let o=new $E(n,i).place(e);o&&r.push(o)}return r}var yX=4;function xX(t,e){e>t.chartRightX&&(t.chartRightX=e)}var Ch=class{place(e,r,n,i){let o=n.theme??"light",s=Bv[o],a=n.width??1280,c=Lv(n.locale,_X(e)),l=kv(e,r.config.calendar),u=nN(e,r.config.scale),f=jp(r.content.sizes,l),d={theme:s,styles:r.config.styles,defaults:r.config.defaults,labels:r.content.labels},{startDate:p,endDate:g}=i.computeDateWindow(e,{cal:l,sizes:f},r,n.today,u),y=gt("roadmap",e.roadmapDecl?.properties??[],d),_=y.headerPosition==="beside",T=y.timelinePosition!=="bottom",R=y.timelinePosition==="bottom"||y.timelinePosition==="both",E=e.roadmapDecl?.title??e.roadmapDecl?.name??"",k=ne(e.roadmapDecl?.properties??[],"author"),D=i.sizeBesideHeader(E,k),P=_?{x:0,y:0,width:D.boxWidth,height:0}:{x:0,y:0,width:0,height:th},j=_?D.boxWidth:0,q=_?8:th+8,le=oN(l),Ee=u.pixelsPerUnit/le.daysPerUnit(u.unit),w=Math.max(1,Hr(p,g))*Ee,L=j+qr,M=w,A=j+qr+M+qr,S=Math.min(a,A),v=n.today!==void 0&&n.today>=p&&n.today<=g,B=r.content.anchors.size+r.content.milestones.size>0,H=v?Pi:0,$=T?pu:0,J=new bh({domain:[p,g],range:[L,L+w],calendar:le}),K=Math.max(S,L+M+qr),_e=[];for(let[W,ae]of r.content.anchors){let be=Lt(ne(ae.properties,"date"));if(!be)continue;let Yr=J.forwardWithinDomain(be);Yr!==null&&_e.push({id:W,centerX:Yr,radius:6,title:ae.title??W,fontSize:10,bold:!1,date:be,isMilestone:!1})}for(let[W,ae]of r.content.milestones){let be=Lt(ne(ae.properties,"date"));if(!be)continue;let Yr=J.forwardWithinDomain(be);Yr!==null&&_e.push({id:W,centerX:Yr,radius:6,title:ae.title??W,fontSize:10,bold:!0,date:be,isMilestone:!0})}let V=xN(_e,j,K,i.estimateTextWidth),he=B?Math.max(1,V.rowCount):0,it=he*26,je=H+$+it,qe=je+8,G=_?D.cardHeight+yX:0,Z=Math.max(q,G-je),ee=Z+H,C=ee+$,xe=C+it,Re=iN(J,u,le,c),Fe={box:{x:L,y:Z,width:w,height:0},ticks:Re,pixelsPerDay:Ee,originX:L,startDate:p,endDate:g,labelStyle:gt("roadmap",[],d),pillRowHeight:H,tickPanelY:ee,tickPanelHeight:$,markerRow:{y:C+13,height:it,collisionY:C-8},minorGrid:y.minorGrid},ut=new Map;for(let[W,ae]of V.placements){let be=C+13+ae.rowIndex*26;ut.set(W,{rowIndex:ae.rowIndex,centerY:be,labelBox:{...ae.labelBox,y:be-4},labelSide:ae.labelSide})}let U={cal:l,styleCtx:d,sizes:f,labels:r.content.labels,teams:r.content.teams,persons:r.content.persons,symbols:r.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:Fe,scale:J,calendar:le,bandScale:rN(),entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,entityVisualLeftX:new Map,entityVisualRightX:new Map,itemArrowSource:new Map,itemFlowKey:new Map,currentFlowKey:"",itemSlackAttachY:new Map,slackCorridors:[],markerRowPlacements:ut,chartTopY:Z+qe,chartBottomY:0,swimlaneBottomY:0,chartRightX:K};for(let W of _e){let ae=ut.get(W.id);ae&&(U.entityLeftEdges.set(W.id,W.centerX),U.entityRightEdges.set(W.id,W.centerX),U.entityMidpoints.set(W.id,{x:W.centerX,y:ae.centerY}))}let Ir=LE(r.content.footnotes,U,0);U.footnoteIndex=Ir.index,U.footnoteHosts=Ir.hosts;let vr=new Map(U.entityLeftEdges),de=new Map(U.entityRightEdges),Ui=new Map(U.entityMidpoints),Bi=[...r.content.swimlanes.values()],kr=gt("swimlane",[],d),Ko=Hv[kr.spacing]??0,gr=()=>{let W=[],ae=U.chartTopY,be=0,Yr=U.timeline.originX;for(let ce of Bi){be>0&&(ae+=Ko);let{positioned:et,usedHeight:_t,usedRightX:Yo}=new ec({lane:ce,bandIndex:be},i).place({x:U.timeline.originX,y:ae},U);W.push(et),ae+=_t,Yo>Yr&&(Yr=Yo),be++}return{swimlanes:W,nextY:ae,maxRightX:Yr}},Ct=gr(),Kr=Ct.swimlanes,Gt=Ct.nextY,x=TX(r.content.milestones,U);x.length>0&&(U.entityLeftEdges=new Map(vr),U.entityRightEdges=new Map(de),U.entityMidpoints=new Map(Ui),U.itemSlackAttachY=new Map,U.entityVisualLeftX=new Map,U.entityVisualRightX=new Map,U.itemArrowSource=new Map,U.itemFlowKey=new Map,U.currentFlowKey="",U.slackCorridors=x,Ct=gr(),Kr=Ct.swimlanes,Gt=Ct.nextY),xX(U,Ct.maxRightX+qr);for(let W of Kr)W.box.width=U.chartRightX;let N=r.content.isolatedRegions,X=[];if(N.length>0){let W=hN(N,U,Gt+8,i);X=W.regions,Gt=W.endY}U.chartBottomY=Gt,U.swimlaneBottomY=Gt,Fe.box.height=U.chartBottomY-Fe.box.y;let z=gN(r.content.milestones,U),Ue=_e.map(W=>({id:W.id,centerX:W.centerX,radius:W.radius,title:W.title,fontSize:W.fontSize,bold:W.bold}));for(let W of z)W.fixed||Ue.push({id:W.id??"",centerX:W.center.x,radius:W.radius,title:W.title,fontSize:10,bold:!0});let Se=xN(Ue,j,U.chartRightX,i.estimateTextWidth);U.markerRowPlacements.clear();for(let[W,ae]of Se.placements){let be=C+13+ae.rowIndex*26;U.markerRowPlacements.set(W,{rowIndex:ae.rowIndex,centerY:be,labelBox:{...ae.labelBox,y:be-4},labelSide:ae.labelSide})}for(let W of z){let ae=U.markerRowPlacements.get(W.id??"");ae&&(W.center={x:W.center.x,y:ae.centerY},W.labelBox=ae.labelBox,W.labelSide=ae.labelSide)}for(let W of _e){let ae=U.markerRowPlacements.get(W.id);ae&&U.entityMidpoints.set(W.id,{x:W.centerX,y:ae.centerY})}for(let W of z)W.fixed||U.entityMidpoints.set(W.id??"",{x:W.center.x,y:W.center.y});let Oe=B?Math.max(1,Se.rowCount):0;if(Oe>he){let W=(Oe-he)*26;U.timeline.markerRow.height=Oe*26,U.timeline.box.height+=W,U.chartTopY+=W,U.chartBottomY+=W,U.swimlaneBottomY+=W;for(let ae of Kr)DE(ae,W);for(let ae of X)EX(ae,W);for(let[ae,be]of U.entityMidpoints)U.markerRowPlacements.has(ae)||U.entityMidpoints.set(ae,{x:be.x,y:be.y+W});for(let[ae,be]of U.itemSlackAttachY)U.itemSlackAttachY.set(ae,be+W);for(let ae of z)if(ae.cutTopY=U.chartTopY,ae.cutBottomY=U.swimlaneBottomY,ae.slackArrows)for(let be of ae.slackArrows)be.y+=W}R&&(U.timeline.bottomTickPanelY=U.chartBottomY+8,U.timeline.bottomTickPanelHeight=pu,U.chartBottomY+=8+pu);let He=new Set(z.map(W=>W.center.x)),ye=cN(r.content.anchors,U,He),Be=i.collectItems(Bi),Ie=i.buildDependencies(Be,Kr,X,U),ft=i.buildNowline(n.today,U,c),Qe=LE(r.content.footnotes,U,U.chartBottomY);U.footnoteIndex=Qe.index,U.footnoteHosts=Qe.hosts,P.height=P.height||U.chartBottomY,_||(P.width=U.chartRightX);let or=_?{x:6,y:xe-D.cardHeight,width:D.cardWidth,height:D.cardHeight}:{x:0,y:0,width:U.chartRightX,height:th},$t=Qe.area.entries.length>0?Qe.area.box.y+Qe.area.box.height:U.chartBottomY,yr={x:U.chartRightX-qr-nE,y:$t+qr,width:nE,height:Vv},oc=yr.y+yr.height+qr,Du={box:P,position:y.headerPosition,title:E,author:k,titleLines:D.titleLines,authorLines:D.authorLines,cardBox:or,logo:void 0,style:y,attributionBox:yr};return{width:U.chartRightX,height:oc,theme:o,palette:s,backgroundColor:s.surface.page,header:Du,timeline:Fe,nowline:ft,swimlanes:Kr,anchors:ye,milestones:z,edges:Ie,footnotes:Qe.area,includes:X,chartBox:{x:j,y:U.chartTopY,width:U.chartRightX-j,height:U.chartBottomY-U.chartTopY}}}};function TX(t,e){let r=[];for(let[n,i]of t){let o=ne(i.properties,"date"),s=nr(i.properties,"after"),a=Lt(o),c=vh(s,e),l=kh(c);if(a){let f=e.scale.forwardWithinDomain(a);if(f===null)continue;let d=null;for(let p of l)(!d||p.x>d.x)&&(d=p);d&&d.x>f&&d.y>0&&r.push({xStart:Math.min(d.x,f),xEnd:Math.max(d.x,f),y:d.y,slackPredId:d.ref,milestoneId:n});continue}if(l.length===0)continue;l.sort((f,d)=>d.x-f.x);let u=l[0].x;for(let f=1;f<l.length;f++){let d=l[f];d.x<u&&d.y>0&&r.push({xStart:d.x,xEnd:u,y:d.y,slackPredId:d.ref,milestoneId:n})}}return r}function DE(t,e){t.box.y+=e;for(let r of t.children)TN(r,e);for(let r of t.nested)DE(r,e)}function TN(t,e){if(t.box.y+=e,t.kind==="item"){t.overflowBox&&(t.overflowBox.y+=e);for(let r of t.labelChips)r.box.y+=e;return}for(let r of t.children)TN(r,e)}function EX(t,e){t.box.y+=e;for(let r of t.nestedSwimlanes)DE(r,e)}function xN(t,e,r,n){let i=[...t].sort((a,c)=>a.centerX-c.centerX),o=new Map,s=[];for(let a of i){let c=n(a.title,a.fontSize)*(a.bold?1.05:1),l=a.centerX+a.radius+6,u=a.centerX-a.radius-6-c,f=l+c<=r,d=u>=e,p=a.centerX-a.radius,g=a.centerX+a.radius,y=j=>j==="right"?l:u,_=j=>j==="right"?f:d,T=(j,q)=>{let le=Math.min(p,j),Ee=Math.max(g,j+c);return s[q].some(O=>O.left<Ee&&O.right>le)},R=-1,E="right",k=l;e:for(let j=s.length-1;j>=0;j--)for(let q of["right","left"]){if(!_(q))continue;let le=y(q);if(!T(le,j)){R=j,E=q,k=le;break e}}if(R===-1){for(let[j,q]of o)o.set(j,{...q,rowIndex:q.rowIndex+1});s=[[],...s],R=0,E=f?"right":"left",k=y(E)}let D=Math.min(p,k),P=Math.max(g,k+c);s[R].push({left:D,right:P}),o.set(a.id,{rowIndex:R,labelBox:{x:k,y:0,width:c,height:12},labelSide:E})}return{placements:o,rowCount:s.length}}function _X(t){return t.directive?.properties.find(r=>RX(r.key)==="locale")?.value}function RX(t){return t.endsWith(":")?t.slice(0,-1):t}function SX(t){switch(t){case"done":case"completed":return"done";case"in-progress":case"active":return"in-progress";case"at-risk":case"blocked":case"planned":return t;case void 0:return"planned";default:return"neutral"}}function IX(t){if(!t)return 0;let e=/^(\d{1,3})%$/.exec(t);return e?Math.max(0,Math.min(100,parseInt(e[1],10)))/100:0}function vX(t,e){if(t)return/^\d+(?:\.\d+)?[dwmqy]$/.test(t)||/^\d+%$/.test(t)?t:e.sizes.get(t)?.effortLiteral??t}function kX(t,e){if(t)return e.teams.get(t)?.title??e.persons.get(t)?.title??t}function NX(t){if(!t)return{icon:"none"};let e=t.toLowerCase();return e.includes("linear.app")?{icon:"linear",href:t}:e.includes("github.com")?{icon:"github",href:t}:e.includes("atlassian.net")||e.includes("jira.")?{icon:"jira",href:t}:{icon:"generic",href:t}}function Ph(t,e,r,n,i){let o=Gv(t,e),s=t.name??t.title??"",a=o.padding==="none"?"xs":o.padding,c=jv[a],l=Math.max(20,Math.round(s.length*5.5+c*2));return i!==void 0&&(l=Math.min(l,i)),{text:s,style:o,box:{x:r,y:n,width:l,height:13}}}function GE(t,e,r,n){let i=t.properties,o=gt("item",i,r.styleCtx),s=ne(i,"size"),a=s?r.sizes.get(s)??null:null,c=Ci(i,r.sizes,r.cal),l=Cv(i,r.sizes,r.cal),u=nr(i,"after"),f=ne(i,"before"),d=ne(i,"date"),p=Nv(ne(i,"remaining"),r.sizes,r.cal),g=e.x,y=Lt(d);if(y){let ce=r.scale.forwardWithinDomain(y);ce!==null&&(g=ce)}else if(u.length>0){let ce=e.x;for(let et of u){let _t=r.entityRightEdges.get(et);_t!==void 0&&(ce=Math.max(ce,_t))}g=Math.max(e.x,ce)}let _=Math.max(Sr,c*r.timeline.pixelsPerDay),T=g,R=g+_,E=ne(i,"link"),k=NX(E),D=k.icon!=="none",P=Math.max(Sr,_-2*jr),j=nr(i,"labels"),q=[];for(let ce of j){let et=r.labels.get(ce);if(!et)continue;let _t=Ph(et,r.styleCtx,0,0);q.push({id:et,width:_t.box.width})}let le=0;for(let ce=0;ce<q.length;ce+=1)ce>0&&(le+=4),le+=q[ce].width;let Ee=Math.max(0,P-24),O=q.length>0&&le>Ee,w=!1,L,M;if(f){let ce=r.entityLeftEdges.get(f);ce!==void 0&&R>ce&&(w=!0,L={x:ce,y:e.y,width:R-ce,height:r.bandScale.bandwidth()},M=f)}let A=ne(i,"status"),S=SX(A),v=IX(A);v===0&&S==="done"&&(v=1);let B=/^(\d{1,3})%$/.exec(ne(i,"remaining")??"");v===0&&S==="in-progress"&&B&&(v=1-Math.max(0,Math.min(100,parseInt(B[1],10)))/100),v===0&&S==="in-progress"&&p>0&&l>0&&(v=Math.max(0,Math.min(1,1-p/l)));let H={done:"#ecfdf5","in-progress":"#eff6ff","at-risk":"#fffbeb",blocked:"#fee2e2",planned:"#f8fafc",neutral:"#f8fafc"},$={done:"#052e16","in-progress":"#172554","at-risk":"#422006",blocked:"#7f1d1d",planned:"#1e293b",neutral:"#1e293b"},J={done:r.styleCtx.theme.status.done,"in-progress":r.styleCtx.theme.status.inProgress,"at-risk":r.styleCtx.theme.status.atRisk,blocked:r.styleCtx.theme.status.blocked,planned:r.styleCtx.theme.status.planned,neutral:r.styleCtx.theme.status.neutral},K=r.styleCtx.theme.name==="light",_e=K?"#ffffff":"#0f172a",V="#94a3b8";o.bg===_e&&(o.bg=K?H[S]:$[S]),o.fg===V&&(o.fg=J[S]);let he=ne(i,"duration"),it=!!he&&/^\d+(?:\.\d+)?[dwmqy]$/.test(he),je=a?a.title??a.name:"",qe=it?he:je||void 0,G=ne(i,"remaining"),Z=vX(G,r),ee=kX(n??ne(i,"owner"),r),C=()=>[qe,ee].filter(Boolean).join(" "),xe;if(S==="in-progress"&&Z){let ce=C();xe=ce?`${ce} \u2014 ${Z} remaining`:`${Z} remaining`}else if(S==="in-progress"&&v>0&&v<1){let ce=Math.round((1-v)*100),et=C();xe=et?`${et} \u2014 ${ce}% remaining`:`${ce}% remaining`}else(ee||qe)&&(xe=C()||void 0);let Re=ne(i,"capacity"),Fe=Ni(Re),ut=null,U=0;if(Fe!==null){let ce=au(Fe),et=cu(o.capacityIcon,r.symbols);ut={value:Fe,text:ce,icon:et};let _t=11;U=(xe?En(" ",_t):0)+$o(ce,et,_t)}let Ir=t.title??t.name??"",vr=new sh({id:t.name??"",title:Ir,logicalLeftX:T,logicalRightX:R,metaText:xe,metaTrailingWidth:U,hasLinkIcon:D}).place({x:T,y:e.y},{time:r.scale,bands:r.bandScale,style:o}),de=vr.box,Ui=r.bandScale.bandwidth(),Bi=de.width<17,kr=D&&de.width<41,Ko=de.width<23,gr=vr.textSpills||kr,Ct=null;O&&(Ct=XT(q,de.width));let Kr=Ct?Ct.rows.length:q.length>0?1:0,Gt=xe!==void 0||ut!==null,x=wN(O,gr,Kr,Ui,Gt);x>0&&(de.height=Ui+x);let N=[],X=de.y+Ui-gn-13-3,z=de.y+38+3,Se=O&&gr||!O&&Gt&&q.length>0?Math.max(X,z):X,Oe=O?de.x+de.width+6:de.x+12,He=Oe;if(Ct)for(let ce=0;ce<Ct.rows.length;ce+=1){let et=Se+ce*17,_t=Oe;for(let JN of Ct.rows[ce]){let QE=Ph(JN.id,r.styleCtx,_t,et);N.push(QE),_t+=QE.box.width+4}let Yo=_t-4;Yo>He&&(He=Yo)}else{let ce=Oe;for(let et of q){let _t=Ph(et.id,r.styleCtx,ce,Se);N.push(_t),ce+=_t.box.width+4}He=q.length>0?ce-4:Oe}let ye=new Set;if(t.name){for(let[ce,et]of r.footnoteHosts.entries())if(et.includes(t.name)){let _t=r.footnoteIndex.get(ce);_t!==void 0&&ye.add(_t)}}let Be=[...ye].sort((ce,et)=>ce-et),Ie=ee??n??ne(i,"owner"),ft=t.description?.text,Qe=Be.length>0&&Ko,$t=de.x+de.width+6,yr=!1,oc=null;kr&&(yr&&($t+=4),oc=$t,$t=oc+14,yr=!0);let Du=0;if(gr){yr&&($t+=4);let ce=En(Ir,13),et=(xe?En(xe,11):0)+U;Du=Math.max(ce,et),$t+=Du,yr=!0}let jh=null;Qe&&(yr&&($t+=4),jh=$t,$t+=Be.length*8,yr=!0);let W=null;Bi&&(yr&&($t+=4),W=$t+5,$t=W+5,yr=!0);let ae=Math.max(de.x+de.width,$t),be=t.name;if(be){r.entityLeftEdges.set(be,T),r.entityRightEdges.set(be,R),r.entityMidpoints.set(be,{x:(T+R)/2,y:de.y+de.height/2}),r.entityVisualLeftX.set(be,de.x),r.entityVisualRightX.set(be,de.x+de.width);let ce=gr?{x:de.x+de.width,y:de.y+de.height-gn/2}:{x:de.x+de.width,y:de.y+de.height/2};r.itemArrowSource.set(be,ce),r.itemFlowKey.set(be,r.currentFlowKey);let et=gr?de.y+de.height-gn/2:de.y+de.height/2;r.itemSlackAttachY.set(be,et)}return e.x=R,e.maxX=Math.max(e.maxX,e.x),e.height=Math.max(e.height,r.bandScale.step()+x),{kind:"item",id:be,title:Ir,box:de,status:S,progressFraction:v,footnoteIndicators:Be,labelChips:N,chipsOutside:O,chipsRightX:He,linkIcon:k.icon,linkHref:k.href,hasOverflow:w,overflowBox:L,overflowAnchorId:M,owner:Ie,description:ft,metaText:xe,textSpills:gr,dotSpills:Bi,iconSpills:kr,footnoteSpills:Qe,dotSpillCx:W,iconSpillX:oc,footnoteSpillStartX:jh,decorationsRightX:ae,capacity:ut,size:a,style:o}}function CX(t,e,r){return new ah(t,{sequenceOne:HE,newCursor:zp}).place(e,r)}function PX(t,e,r){return new oh(t,{sequenceItem:GE,sequenceOne:HE,resolveChildStart:SN,newCursor:zp,estimateTextWidth:En,predictItemChipExtraHeight:AN}).place(e,r)}function HE(t,e,r){if(wr(t))return GE(t,e,r);if(Bn(t))return CX(t,e,r);if(Un(t))return PX(t,e,r);throw new Error(`Unknown swimlane child type: ${t.$type??"unknown"}`)}function En(t,e){return t.length*e*.58}function wN(t,e,r,n,i){if(r===0)return 0;let o=n-gn-13-3,s=41,a;t&&e?a=s:!t&&i?a=Math.max(o,s):a=o;let l=a+(r-1)*17+13+3+gn;return Math.max(0,l-n)}function AN(t,e){let r=t.properties,n=nr(r,"labels");if(n.length===0)return 0;let i=Ci(r,e.sizes,e.cal),o=Math.max(Sr,i*e.timeline.pixelsPerDay),s=Math.max(Sr,o-2*jr),a=[];for(let T of n){let R=e.labels.get(T);if(!R)continue;let E=Ph(R,e.styleCtx,0,0);a.push({id:R,width:E.box.width})}if(a.length===0)return 0;let c=0;for(let T=0;T<a.length;T+=1)T>0&&(c+=4),c+=a[T].width;let l=Math.max(0,s-24),u=c>l,f=ne(r,"duration")!==void 0||ne(r,"size")!==void 0||ne(r,"owner")!==void 0||ne(r,"remaining")!==void 0||ne(r,"capacity")!==void 0,d=t.title??t.name??"",g=(d?En(d,13):0)>l,y=u?XT(a,s):null,_=y?y.rows.length:a.length>0?1:0;return wN(u,g,_,e.bandScale.bandwidth(),f)}function SN(t,e,r,n){let i=Lt(ne(t,"date"))??Lt(ne(t,"start"));if(i){let s=n.scale.forwardWithinDomain(i);if(s!==null)return s}let o=nr(t,"after");if(o.length>0){let s=r;for(let a of o){let c=n.entityRightEdges.get(a);c!==void 0&&(s=Math.max(s,c))}return Math.max(r,s)}return e}var ME=6;function EN(t,e,r){if(!t)return[];let n=t.split(/\s+/).filter(s=>s.length>0);if(n.length===0)return[];let i=[],o="";for(let s of n){let a=o?`${o} ${s}`:s;o&&En(a,r)>e?(i.push(o),o=s):o=a}return o&&i.push(o),i}function OX(t,e){let r=JT-32,n=EN(t,r,16),i=EN(e??"",r,11),o=0;for(let d of n)o=Math.max(o,En(d,16));for(let d of i)o=Math.max(o,En(d,11));let s=o+32,a=Math.max(Wv-ME,Math.min(JT-ME,s)),c=n.length>0?(n.length-1)*20:0,l=i.length>0?18+(i.length-1)*14:0,u=26+c+l+14,f=a+ME;return{titleLines:n,authorLines:i,cardWidth:a,cardHeight:u,boxWidth:f}}function LX(t,e,r,n,i){let s=t.roadmapDecl?.properties??[],a=ne(s,"start"),c=Lt(a)??$X(n),l=ne(s,"length");if(l){let p=DX(l,e.cal);if(p>0)return{startDate:c,endDate:Do(c,p)}}let u=IN(r,e,c,n),f=sN(i.unit,e.cal),d=u>0?Math.ceil(u/f)*f:4*e.cal.daysPerWeek;return{startDate:c,endDate:Do(c,Math.max(1,d))}}function $X(t){let e=t??new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}function DX(t,e){let r=/^(\d+(?:\.\d+)?)([dwmqy])$/.exec(t);if(!r)return 0;let n=parseFloat(r[1]);switch(r[2]){case"d":return n;case"w":return n*e.daysPerWeek;case"m":return n*e.daysPerMonth;case"q":return n*e.daysPerQuarter;case"y":return n*e.daysPerYear;default:return 0}}function IN(t,e,r,n){let i=new Map,o=new Map,s=new Map,a=0,c=f=>i.has(f)?i.get(f):o.has(f)?o.get(f):s.has(f)?s.get(f):0;for(let f of t.content.anchors.values()){let d=Lt(ne(f.properties,"date"));if(d&&f.name){let p=Hr(r,d);o.set(f.name,p),a=Math.max(a,p)}}let l=(f,d)=>{let p=d;for(let g of f)g.$type!=="DescriptionDirective"&&(p=u(g,p),a=Math.max(a,p));return p},u=(f,d)=>{if(wr(f)){let p=Ci(f.properties,e.sizes,e.cal),g=Lt(ne(f.properties,"date")),y=Lt(ne(f.properties,"start")),_=nr(f.properties,"after"),T=d;g?T=Hr(r,g):y?T=Hr(r,y):_.length>0&&(T=Math.max(d,..._.map(c)));let R=T+p;return f.name&&i.set(f.name,R),R}if(Bn(f)){let p=d;for(let g of f.content){if(g.$type==="DescriptionDirective")continue;let y=u(g,d);p=Math.max(p,y)}return p}return Un(f)?l(f.content,d):d};for(let f of t.content.swimlanes.values())l(f.content,0);for(let f of t.content.milestones.values()){let d=Lt(ne(f.properties,"date"));if(d){let g=Hr(r,d);f.name&&s.set(f.name,g),a=Math.max(a,g);continue}let p=nr(f.properties,"after");if(p.length>0){let g=Math.max(0,...p.map(c));f.name&&s.set(f.name,g),a=Math.max(a,g)}}for(let f of t.content.isolatedRegions){let d=IN({config:f.config,content:f.content,diagnostics:[],processedFiles:new Set},e,r,void 0);a=Math.max(a,d)}if(n){let f=Hr(r,n);f>0&&(a=Math.max(a,f))}return a}function MX(t,e,r,n){let i=new qp(Pv(e,r)),o=[],s=[];for(let[l,u]of t){let f=nr(u.properties,"after"),d=n.entityMidpoints.get(l),p=n.entityVisualLeftX.get(l);if(!d||p===void 0)continue;let g={x:p,y:d.y};for(let y of f){let _=n.itemArrowSource.get(y),T,R=_===void 0;if(_)T=_;else{let E=n.entityMidpoints.get(y);if(!E)continue;T={x:E.x,y:d.y}}!R&&Math.abs(T.y-g.y)<.5&&g.x-T.x<20||(o.push({fromId:y,toId:l,from:T,to:g,isMarkerSource:R}),s.push({fromId:y,toId:l}))}}let a=Ov(o,i),c=[];for(let l=0;l<a.length;l++){let u=a[l];c.push({fromId:s[l].fromId,toId:s[l].toId,waypoints:u.waypoints,kind:u.underBar?"underBar":"normal",style:gt("item",[],n.styleCtx)})}return c}function FX(t,e,r){if(!t)return null;let n=e.scale.forwardWithinDomain(t);if(n===null)return null;let i=e.timeline.box.y,o=e.timeline.tickPanelY,s=Wp(r).nowLabel,a=En(s,gu),c=Math.max(KT,Math.ceil(a+2*Ga)),l=e.timeline.originX-qr,u=c/2,f;n-u<l?f="flag-right":n+u>e.chartRightX?f="flag-left":f="center";let d=e.timeline.bottomTickPanelY,p=e.timeline.bottomTickPanelHeight??0,g=d!==void 0&&p>0?d+p:e.swimlaneBottomY;return{x:n,topY:o,bottomY:g,pillTopY:i,pillMode:f,label:s,pillWidth:c,style:gt("item",[],e.styleCtx)}}function UX(t){let e=new Map,r=n=>{if(wr(n)){n.name&&e.set(n.name,n);return}if(Bn(n)){for(let i of n.content)i.$type!=="DescriptionDirective"&&r(i);return}if(Un(n)){for(let i of n.content)i.$type!=="DescriptionDirective"&&r(i);return}};for(let n of t)for(let i of n.content)i.$type!=="DescriptionDirective"&&r(i);return e}function jE(t,e,r={}){return new Ch().place(t,e,r,{sequenceItem:GE,sequenceOne:HE,resolveChildStart:SN,newCursor:zp,estimateTextWidth:En,predictItemChipExtraHeight:AN,computeDateWindow:LX,sizeBesideHeader:OX,collectItems:UX,buildDependencies:MX,buildNowline:FX})}var Vo={person:{viewBox:"0 0 24 24",body:'<circle cx="12" cy="8" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 21a8 8 0 0 1 16 0" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"p"},people:{viewBox:"0 0 24 24",body:'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="9" cy="7" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M22 21v-2a4 4 0 0 0-3-3.87" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 3.13a4 4 0 0 1 0 7.75" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"P"},points:{viewBox:"0 0 24 24",body:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" fill="currentColor" stroke="currentColor" stroke-width="1" stroke-linejoin="round"/>',ascii:"*"},time:{viewBox:"0 0 24 24",body:'<line x1="10" x2="14" y1="2" y2="2" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="12" x2="15" y1="14" y2="11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="12" cy="14" r="8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"t"}};var Wne={none:"",multiplier:"x",person:Vo.person.ascii,people:Vo.people.ascii,points:Vo.points.ascii,time:Vo.time.ascii};var Bh=class{constructor(e="nl"){se(this,"prefix");se(this,"counter",0);this.prefix=e}next(e){let r=`${this.prefix}-${this.counter++}`;return e?`${r}-${e}`:r}};var BX=new Set(["svg","g","defs","symbol","use","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","linearGradient","radialGradient","stop","clipPath","mask","pattern","filter","feGaussianBlur","feColorMatrix","feOffset","feMerge","feMergeNode","feFlood","feComposite","feBlend","feDropShadow","image"]),XX=new Set(["d","x","y","x1","y1","x2","y2","cx","cy","r","rx","ry","width","height","viewBox","preserveAspectRatio","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-dasharray","stroke-dashoffset","opacity","transform","points","id","class","clip-path","mask","filter","font-family","font-size","font-weight","font-style","text-anchor","dx","dy","rotate","letter-spacing","word-spacing","style","xmlns","href","xlink:href","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","maskUnits","maskContentUnits","stdDeviation","values","in","in2","mode","type","result","flood-color","flood-opacity","patternUnits","patternContentUnits","role","aria-label"]);function GX(t){let e=[],r=0,n=t.length;for(;r<n;){if(t[r]!=="<"){let u=r;for(;r<n&&t[r]!=="<";)r++;let f=t.slice(u,r);f.trim().length>0?e.push({kind:"text",text:f}):f.length>0&&e.push({kind:"text",text:f});continue}if(t.startsWith("<!--",r)){let u=t.indexOf("-->",r+4);if(u<0)break;e.push({kind:"comment",text:t.slice(r+4,u)}),r=u+3;continue}if(t.startsWith("<![CDATA[",r)){let u=t.indexOf("]]>",r+9);if(u<0)break;e.push({kind:"cdata",text:t.slice(r+9,u)}),r=u+3;continue}if(t.startsWith("<?",r)){let u=t.indexOf("?>",r+2);if(u<0)break;e.push({kind:"decl",text:t.slice(r+2,u)}),r=u+2;continue}if(t.startsWith("<!",r)){let u=t.indexOf(">",r+2);if(u<0)break;e.push({kind:"decl",text:t.slice(r+2,u)}),r=u+1;continue}if(t[r+1]==="/"){let u=t.indexOf(">",r+2);if(u<0)break;let f=t.slice(r+2,u).trim();e.push({kind:"close",name:f}),r=u+1;continue}let i=HX(t,r);if(i<0)break;let o=t.slice(r+1,i).trim(),s=o.endsWith("/"),a=s?o.slice(0,-1).trim():o,{name:c,attrs:l}=jX(a);e.push({kind:s?"self":"open",name:c,attrs:l}),r=i+1}return e}function HX(t,e){let r=e+1,n=null;for(;r<t.length;){let i=t[r];if(n)i===n&&(n=null);else if(i==='"'||i==="'")n=i;else if(i===">")return r;r++}return-1}function jX(t){let e=0;for(;e<t.length&&/\s/.test(t[e]);)e++;let r=e;for(;e<t.length&&!/\s/.test(t[e]);)e++;let n=t.slice(r,e),i={};for(;e<t.length;){for(;e<t.length&&/\s/.test(t[e]);)e++;if(e>=t.length)break;let o=e;for(;e<t.length&&t[e]!=="="&&!/\s/.test(t[e]);)e++;let s=t.slice(o,e);if(e>=t.length||t[e]!=="="){s&&(i[s]="");continue}if(e++,e>=t.length)break;let a=t[e];if(a!=='"'&&a!=="'"){let l=e;for(;e<t.length&&!/\s/.test(t[e]);)e++;i[s]=t.slice(l,e);continue}e++;let c=e;for(;e<t.length&&t[e]!==a;)e++;i[s]=t.slice(c,e),e<t.length&&e++}return{name:n,attrs:i}}function $u(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function qX(t,e){if(t.startsWith("#")){let r=e.get(t.slice(1));return r?`#${r}`:null}if(/^url\(#[^)]+\)$/.test(t)){let r=t.slice(5,-1),n=e.get(r);return n?`url(#${n})`:null}return null}function vN(t,e={}){let r=e.idPrefix??"nl-logo",n=e.onWarn??(()=>{}),i=GX(t),o=new Map,s=0;for(let l of i)if((l.kind==="open"||l.kind==="self")&&l.attrs&&"id"in l.attrs){let u=l.attrs.id;u&&!o.has(u)&&o.set(u,`${r}-${s++}`)}let a=[],c=[];for(let l of i)if(l.kind!=="comment"&&l.kind!=="decl"){if(l.kind==="cdata"){c[c.length-1]&&a.push($u(l.text??""));continue}if(l.kind==="text"){if(c.length===0||c[c.length-1]){let u=(l.text??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");a.push(u)}continue}if(l.kind==="open"||l.kind==="self"){let u=l.name??"";if(u==="script"||u==="foreignObject"||u==="animate"||u==="animateTransform"||u==="animateMotion"||u==="set"){n(`sanitizer: dropping <${u}>`),l.kind==="open"&&c.push(!1);continue}if(!BX.has(u)){n(`sanitizer: dropping unknown element <${u}>`),l.kind==="open"&&c.push(!1);continue}let f=[`<${u}`],d=Object.keys(l.attrs??{}).sort();for(let p of d){let g=l.attrs[p];if(/^on/i.test(p)){n(`sanitizer: dropping event handler ${p}`);continue}if(!XX.has(p)){n(`sanitizer: dropping attribute ${p}`);continue}if(p==="href"||p==="xlink:href"){let y=qX(g,o);if(y===null){n(`sanitizer: dropping external href ${g}`);continue}f.push(` ${p}="${$u(y)}"`);continue}if(p==="style"){n("sanitizer: dropping inline style");continue}if(p==="id"){let y=o.get(g);y&&f.push(` id="${$u(y)}"`);continue}if(/\burl\(#/i.test(g)){let y=g.replace(/url\(#([^)]+)\)/gi,(_,T)=>{let R=o.get(T);return R?`url(#${R})`:"none"});f.push(` ${p}="${$u(y)}"`);continue}if(/data:|javascript:|vbscript:/i.test(g)){n(`sanitizer: dropping suspicious value at ${p}`);continue}f.push(` ${p}="${$u(g)}"`)}f.push(l.kind==="self"?"/>":">"),a.push(f.join("")),l.kind==="open"&&c.push(!0);continue}l.kind==="close"&&c.pop()&&a.push(`</${l.name}>`)}return a.join("")}var kN=/&/g,NN=/</g,CN=/>/g,WX=/"/g,zX=/'/g;function mr(t){return t.replace(kN,"&").replace(NN,"<").replace(CN,">")}function Fi(t){return t.replace(kN,"&").replace(NN,"<").replace(CN,">").replace(WX,""").replace(zX,"'")}function nc(t){let e=Object.keys(t).sort(),r=[];for(let n of e){let i=t[n];i==null||i===!1||(i===!0?r.push(n):r.push(`${n}="${Fi(String(i))}"`))}return r.length?` ${r.join(" ")}`:""}function Y(t,e,r){return r===void 0||r===""?`<${t}${nc(e)}/>`:`<${t}${nc(e)}>${r}</${t}>`}function Pe(t,e){return`<text${nc(t)}>${mr(e)}</text>`}function h(t){return Number.isFinite(t)?Number.isInteger(t)?t.toString():(Math.round(t*100)/100).toString():"0"}var VX={none:{dx:0,dy:0,stdDeviation:0,opacity:0},subtle:{dx:0,dy:1,stdDeviation:1.5,opacity:.2},soft:{dx:0,dy:3,stdDeviation:5,opacity:.3},hard:{dx:2,dy:2,stdDeviation:0,opacity:.45}};function KX(t,e){let r=`${t}-shadow-${e}`,n=VX[e],i=`<feGaussianBlur in="SourceAlpha" stdDeviation="${n.stdDeviation}"/><feOffset dx="${n.dx}" dy="${n.dy}" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="${n.opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>`;return Y("filter",{id:r,x:"-50%",y:"-50%",width:"200%",height:"200%"},i)}function PN(t,e){return e==="none"?null:`url(#${t}-shadow-${e})`}function ON(t){return["subtle","soft","hard"].map(e=>KX(t,e)).join("")}var rG={thin:100,light:300,normal:400,bold:700};function nG(t){return Ba[t]??14}function WE(t,e){return{"font-family":Ge[t.font],"font-size":e??nG(t.textSize),"font-weight":rG[t.weight]??400,"font-style":t.italic?"italic":"normal",fill:t.text}}function iG(t){if(t.border==="dashed")return"4 3";if(t.border==="dotted")return"1 3"}function oG(t){if(!t||t==="none"||t==="transparent")return 1;let e=t.startsWith("#")?t.slice(1):t;if(e.length===3&&(e=e.split("").map(s=>s+s).join("")),e.length!==6)return 1;let r=parseInt(e.slice(0,2),16)/255,n=parseInt(e.slice(2,4),16)/255,i=parseInt(e.slice(4,6),16)/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(r)+.7152*o(n)+.0722*o(i)}function sG(t,e){return oG(t)>=.24?e.statusDot.onLight:e.statusDot.onDark}function qE(t,e){return t.length*e*.58}function MN(t,e,r,n,i,o,s){let a=i*.58,c=e?qE(e,i):0,l=e?a:0,u=r+c+l,{text:f,icon:d}=t,p=qE(f,i),g={"font-family":o,"font-size":i,fill:s};if(!d)return Pe({x:h(u),y:h(n),...g},f);if(d.kind==="builtin"&&d.name==="multiplier")return Pe({x:h(u),y:h(n),...g},`${f}\xD7`);if(d.kind==="builtin"){let _=Vo[d.name],T=Pe({x:h(u),y:h(n),...g},f),R=i*.1,E=i,k=u+p+R,D=n-i*.85,P=`<svg x="${h(k)}" y="${h(D)}" width="${h(E)}" height="${h(E)}" viewBox="${_.viewBox}" style="color:${Fi(s)}" aria-hidden="true">${_.body}</svg>`;return T+P}let y=h(i*.1);return`<text x="${h(u)}" y="${h(n)}" font-family="${Fi(o)}" font-size="${i}" fill="${Fi(s)}">${mr(f)}<tspan dx="${y}">${mr(d.text)}</tspan></text>`}var LN=.6,aG=.5;function cG(t){let{metaText:e,capacity:r,x:n,baselineY:i,fontSize:o,fontFamily:s,color:a}=t;if(!e&&!r)return"";let c={"font-family":s,"font-size":o,fill:a};if(!r)return Pe({x:h(n),y:h(i),...c},e);if(!e)return MN(r,void 0,n,i,o,s,a);let l=h(o*LN),u=`<text x="${h(n)}" y="${h(i)}" font-family="${Fi(s)}" font-size="${o}" fill="${Fi(a)}">`,{text:f,icon:d}=r;if(!d)return u+mr(e)+`<tspan dx="${l}">${mr(f)}</tspan></text>`;if(d.kind==="builtin"&&d.name==="multiplier")return u+mr(e)+`<tspan dx="${l}">${mr(f)}\xD7</tspan></text>`;if(d.kind==="literal"){let P=h(o*.1);return u+mr(e)+`<tspan dx="${l}">${mr(f)}</tspan><tspan dx="${P}">${mr(d.text)}</tspan></text>`}let p=Vo[d.name],g=P=>P.length*o*aG,y=n+g(e)+o*LN,_=o*.1,T=o,R=y+g(f)+_,E=i-o*.85,k=u+mr(e)+`<tspan dx="${l}">${mr(f)}</tspan></text>`,D=`<svg x="${h(R)}" y="${h(E)}" width="${h(T)}" height="${h(T)}" viewBox="${p.viewBox}" style="color:${Fi(a)}" aria-hidden="true">${p.body}</svg>`;return k+D}function lG(t,e,r,n,i,o={}){let s=Math.min(Vp[i.cornerRadius]??4,n/2);return Y("rect",{x:h(t),y:h(e),width:h(r),height:h(n),rx:h(s),ry:h(s),fill:i.bg==="none"?"transparent":i.bg,stroke:i.fg,"stroke-width":1,"stroke-dasharray":iG(i)??null,...o})}function uG(t,e,r){let n=t.box.x+t.cardBox.x,i=t.box.y+t.cardBox.y,o=t.cardBox.width,s=t.cardBox.height,a=t.style.bg==="none"?r.surface.headerBox:t.style.bg,c=r.header.cardBorder,l=Y("rect",{x:h(n),y:h(i),width:h(o),height:h(s),rx:6,ry:6,fill:a,stroke:c,"stroke-width":1,filter:`url(#${e}-shadow-subtle)`}),u=[];t.titleLines.forEach((_,T)=>{u.push(Pe({x:h(n+16),y:h(i+26+T*20),"font-family":Ge[t.style.font],"font-size":16,"font-weight":600,fill:t.style.text},_))});let f=u.join(""),d=i+26+Math.max(0,t.titleLines.length-1)*20,p=r.header.author,g=[];t.authorLines.forEach((_,T)=>{g.push(Pe({x:h(n+16),y:h(d+18+T*14),"font-family":Ge[t.style.font],"font-size":11,fill:p},_))});let y=g.join("");return Y("g",{"data-layer":"header","data-id":`${e}-header`},l+f+y)}function fG(t,e,r){let n=r.timeline.gridLine,i=r.timeline.minorGridLine,o=t.bottomTickPanelHeight??0,s=t.bottomTickPanelY!==void 0&&o>0,a=t.tickPanelY,c=s?t.bottomTickPanelY+o:t.box.y+t.box.height,l=e,u=t.box.y+t.box.height,f=[];for(let d of t.ticks)if(d.major)f.push(Y("line",{x1:h(d.x),y1:h(a),x2:h(d.x),y2:h(c),stroke:n,"stroke-width":1}));else if(t.minorGrid){if(d.labelX===void 0)continue;f.push(Y("line",{x1:h(d.x),y1:h(l),x2:h(d.x),y2:h(u),stroke:i,"stroke-width":1}))}return Y("g",{"data-layer":"grid"},f.join(""))}function dG(t,e){let r=e.timeline.panelFill,n=e.timeline.border,i=e.timeline.labelText,o=[],s=t.tickPanelY,a=t.tickPanelHeight,c=a>0,l=t.markerRow.height>0,u=s+a,f=t.markerRow.height,d=t.bottomTickPanelY,p=t.bottomTickPanelHeight??0,g=d!==void 0&&p>0;c&&o.push(Y("rect",{x:h(t.box.x),y:h(s),width:h(t.box.width),height:h(a),rx:4,ry:4,fill:r,stroke:n,"stroke-width":1})),l&&o.push(Y("rect",{x:h(t.box.x),y:h(u),width:h(t.box.width),height:h(f),rx:4,ry:4,fill:r,stroke:n,"stroke-width":1})),g&&o.push(Y("rect",{x:h(t.box.x),y:h(d),width:h(t.box.width),height:h(p),rx:4,ry:4,fill:r,stroke:n,"stroke-width":1}));for(let y of t.ticks)y.major&&(!y.label||y.labelX===void 0||(c&&o.push(Pe({x:h(y.labelX),y:h(s+Kp),"font-family":Ge.sans,"font-size":10,fill:i,"text-anchor":"middle"},y.label)),g&&o.push(Pe({x:h(y.labelX),y:h(d+Kp),"font-family":Ge.sans,"font-size":10,fill:i,"text-anchor":"middle"},y.label))));return Y("g",{"data-layer":"timeline"},o.join(""))}function pG(t,e){if(!t)return"";let r=e.nowline.stroke,n=e.nowline.labelText,i=Y("line",{x1:h(t.x),y1:h(t.topY),x2:h(t.x),y2:h(t.bottomY),stroke:r,"stroke-width":eh}),o=hG(t,r),s=mG(t,n);return Y("g",{"data-layer":"nowline"},i+o+s)}function FN(t){let e=eh/2;return t.pillMode==="flag-right"?t.x-e:t.pillMode==="flag-left"?t.x+e:t.x}function hG(t,e){let r=t.pillTopY,n=t.pillTopY+Pi,i=YT,o=t.pillWidth;if(t.pillMode==="center")return Y("rect",{x:h(t.x-o/2),y:h(r),width:h(o),height:h(Pi),rx:i,ry:i,fill:e});let s=FN(t);if(t.pillMode==="flag-right"){let l=s+o,u=[`M ${h(s)} ${h(r)}`,`L ${h(l-i)} ${h(r)}`,`A ${i} ${i} 0 0 1 ${h(l)} ${h(r+i)}`,`L ${h(l)} ${h(n-i)}`,`A ${i} ${i} 0 0 1 ${h(l-i)} ${h(n)}`,`L ${h(s)} ${h(n)}`,"Z"].join(" ");return Y("path",{d:u,fill:e})}let a=s-o,c=[`M ${h(s)} ${h(r)}`,`L ${h(a+i)} ${h(r)}`,`A ${i} ${i} 0 0 0 ${h(a)} ${h(r+i)}`,`L ${h(a)} ${h(n-i)}`,`A ${i} ${i} 0 0 0 ${h(a+i)} ${h(n)}`,`L ${h(s)} ${h(n)}`,"Z"].join(" ");return Y("path",{d:c,fill:e})}function mG(t,e){let r=t.pillTopY+ZT,n=FN(t),i,o;return t.pillMode==="center"?(i=t.x,o="middle"):t.pillMode==="flag-right"?(i=n+Ga,o="start"):(i=n-Ga,o="end"),Pe({x:h(i),y:h(r),"font-family":Ge.sans,"font-size":gu,"font-weight":700,fill:e,"text-anchor":o},t.label)}function gG(t,e,r,n){let i=[],o=PN(r,t.style.shadow);i.push(lG(t.box.x,t.box.y,t.box.width,t.box.height,t.style,{filter:o??null}));let s=sG(t.style.bg,n),a={done:s.done,"in-progress":s.inProgress,"at-risk":s.atRisk,blocked:s.blocked,planned:s.planned,neutral:s.neutral},c=a[t.status]??a.neutral;if(t.progressFraction>0){let y=Math.max(0,Math.min(t.box.width,t.box.width*t.progressFraction));i.push(Y("rect",{x:h(t.box.x),y:h(t.box.y+t.box.height-gn),width:h(y),height:gn,fill:t.style.fg,opacity:.55}))}let l=t.dotSpills&&t.dotSpillCx!==null?t.dotSpillCx:t.box.x+t.box.width-12;i.push(Y("circle",{cx:h(l),cy:h(t.box.y+12),r:5,fill:c}));let u;t.textSpills?(u=t.box.x+t.box.width+6,t.iconSpills&&(u+=18)):u=t.box.x+12;let f=t.style.text,d=n.entities.item.text,p=t.textSpills?d:f,g=t.textSpills?d:t.style.fg;if(t.title&&i.push(Pe({x:h(u),y:h(t.box.y+20),"font-family":Ge[t.style.font],"font-size":13,"font-weight":600,fill:p},t.title)),(t.metaText||t.capacity)&&i.push(cG({metaText:t.metaText,capacity:t.capacity,x:u,baselineY:t.box.y+38,fontSize:11,fontFamily:Ge[t.style.font],color:g})),t.footnoteIndicators.length>0){let y=t.box.y+14;if(t.footnoteSpills&&t.footnoteSpillStartX!==null){let _=t.footnoteSpillStartX;for(let T=0;T<t.footnoteIndicators.length;T++){let R=t.footnoteIndicators[T];i.push(Pe({x:h(_),y:h(y),"font-family":Ge.sans,"font-size":10,"font-weight":700,fill:d},String(R))),_+=8}}else{let _=t.box.x+t.box.width-22;for(let T=t.footnoteIndicators.length-1;T>=0;T--){let R=t.footnoteIndicators[T];i.push(Pe({x:h(_),y:h(y),"font-family":Ge.sans,"font-size":10,"font-weight":700,fill:t.style.text,"text-anchor":"end"},String(R))),_-=8}}}if(!e.noLinks&&t.linkIcon&&t.linkIcon!=="none"){let y={linear:"#5e6ad2",github:"#0f172a",jira:"#0052cc",generic:n.item.linkIconFg},_=y[t.linkIcon]??y.generic,T=14,R=t.iconSpills&&t.iconSpillX!==null?t.iconSpillX:t.box.x+6,E=t.box.y+6,k=Y("rect",{x:h(R),y:h(E),width:T,height:T,rx:2,ry:2,fill:_}),D=R,P=E,j=Y("path",{d:`M${h(D+4)} ${h(P+10)} L${h(D+10)} ${h(P+4)} M${h(D+6)} ${h(P+4)} H${h(D+10)} V${h(P+8)}`,stroke:"#ffffff",fill:"none","stroke-width":1.1,"stroke-linecap":"round","stroke-linejoin":"round"}),q=k+j,le=t.linkHref?Y("a",{href:t.linkHref,target:"_blank",rel:"noopener"},q):q;i.push(le)}if(t.hasOverflow&&t.overflowBox){let y=n.item.overflowTailFill,_=n.item.overflowTailStroke,T=n.item.overflowCaption;i.push(Y("rect",{x:h(t.overflowBox.x),y:h(t.overflowBox.y),width:h(t.overflowBox.width),height:h(t.overflowBox.height),fill:y,stroke:_,"stroke-width":1})),t.overflowAnchorId&&t.overflowBox.width>60&&i.push(Pe({x:h(t.overflowBox.x+t.overflowBox.width/2),y:h(t.overflowBox.y+t.overflowBox.height/2+3),"font-family":Ge.sans,"font-size":9,"font-weight":700,fill:T,"text-anchor":"middle"},`past ${t.overflowAnchorId}`))}for(let y of t.labelChips){let _=Math.min(Vp[y.style.cornerRadius]??8,y.box.height/2);i.push(Y("rect",{x:h(y.box.x),y:h(y.box.y),width:h(y.box.width),height:h(y.box.height),rx:h(_),ry:h(_),fill:y.style.bg==="none"?"transparent":y.style.bg,stroke:y.style.fg,"stroke-width":.5})),i.push(Pe({x:h(y.box.x+y.box.width/2),y:h(y.box.y+y.box.height/2+3),...WE(y.style,Ba.xs),"text-anchor":"middle"},y.text))}return Y("g",{"data-layer":"item","data-id":t.id??null},i.join(""))}function yG(t,e,r,n){let i=[];if(t.style.bg!=="none"&&t.style.bg!=="#ffffff"){if(i.push(Y("rect",{x:h(t.box.x),y:h(t.box.y),width:h(t.box.width),height:h(t.box.height),rx:6,ry:6,fill:t.style.bg,stroke:t.style.fg,"stroke-width":1,"fill-opacity":.18,filter:`url(#${r}-shadow-subtle)`})),t.title){let s=t.title.length*zT+2*Jp,a=t.box.x,c=t.box.y,l=mu,u=6,f=`M${h(a+u)} ${h(c)}H${h(a+s)}V${h(c+l-u)}A${u} ${u} 0 0 1 ${h(a+s-u)} ${h(c+l)}H${h(a)}V${h(c+u)}A${u} ${u} 0 0 1 ${h(a+u)} ${h(c)}Z`;i.push(Y("path",{d:f,fill:t.style.fg})),i.push(Pe({x:h(a+Jp),y:h(c+qT),"font-family":Ge[t.style.font],"font-size":WT,"font-weight":600,fill:"#ffffff"},t.title))}}else{let s=t.style.fg;if(t.style.bracket!=="none"){let c=t.box.y+t.box.height,l=t.style.bracket==="dashed"?"3 2":null,u=t.title?`M${h(t.box.x+4)} ${h(t.box.y-Xa)} L${h(t.box.x)} ${h(t.box.y-Xa)} L${h(t.box.x)} ${h(c)} L${h(t.box.x+4)} ${h(c)}`:`M${h(t.box.x)} ${h(t.box.y)} L${h(t.box.x)} ${h(c)} L${h(t.box.x+4)} ${h(c)}`;i.push(Y("path",{d:u,fill:"none",stroke:s,"stroke-width":1,"stroke-dasharray":l}))}t.title&&i.push(Pe({x:h(t.box.x+6),y:h(t.box.y-2),...WE(t.style,Ba.xs),"fill-opacity":.7},t.title))}for(let s of t.children)i.push(zE(s,e,r,n));return Y("g",{"data-layer":"group","data-id":t.id??null},i.join(""))}function xG(t,e,r,n){let i=[];if(t.style.bracket==="solid"||t.style.bracket==="dashed"){let a=t.box.y-12,c=t.box.y+t.box.height+12,l=t.box.x,u=t.box.x+t.box.width,f=n.parallel.bracketStroke;i.push(Y("path",{d:`M${h(l+4)} ${h(a)} H${h(l)} V${h(c)} H${h(l+4)}`,fill:"none",stroke:f,"stroke-width":1.25,"stroke-dasharray":t.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"})),i.push(Y("path",{d:`M${h(u-4)} ${h(a)} H${h(u)} V${h(c)} H${h(u-4)}`,fill:"none",stroke:f,"stroke-width":1.25,"stroke-dasharray":t.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"}))}t.title&&i.push(Pe({x:h(t.box.x+4),y:h(t.box.y-2),...WE(t.style,Ba.xs),"fill-opacity":.7},t.title));for(let o of t.children)i.push(zE(o,e,r,n));return Y("g",{"data-layer":"parallel","data-id":t.id??null},i.join(""))}function zE(t,e,r,n){return t.kind==="item"?gG(t,e,r,n):t.kind==="group"?yG(t,e,r,n):xG(t,e,r,n)}var $N=2;function TG(t,e){switch(t){case"green":return e.swimlane.utilizationOk;case"yellow":return e.swimlane.utilizationWarn;case"red":return e.swimlane.utilizationOver}}function EG(t,e){if(!t.utilization||t.utilization.segments.length===0)return"";let r=t.box.y+t.box.height-$N,n=t.utilization.segments.map(i=>{let o=i.endX-i.startX;return o<=0?"":Y("rect",{x:h(i.startX),y:h(r),width:h(o),height:$N,fill:TG(i.classification,e),"data-utilization":i.classification,"data-load":h(i.load)})});return Y("g",{"data-layer":"lane-utilization","data-id":t.id??null},n.join(""))}function _G(t,e){let r=t.bandIndex%2===0?e.swimlane.rowTintEven:e.swimlane.rowTintOdd,n=e.swimlane.border;return Y("g",{"data-layer":"swimlane-bg","data-id":t.id??null},Y("rect",{x:h(t.box.x),y:h(t.box.y),width:h(t.box.width),height:h(t.box.height),fill:r,stroke:n,"stroke-width":1}))}function UN(t,e,r,n){let i=n.swimlane.tabFill,o=n.swimlane.tabStroke,s=n.swimlane.tabText,a=n.swimlane.ownerText,c=n.swimlane.footnoteIndicator,l=[];if(t.title){let f=t.capacity?$o(t.capacity.text,t.capacity.icon,10):0,d=t.footnoteIndicators.length>0?t.footnoteIndicators.join(","):"",p=d?qE(d,10):0,g=lu(t.box.x,t.title,t.owner,f,p),y=Yp,_=t.box.y+10,T=_+Zp;l.push(Y("rect",{x:h(g.tabX),y:h(_),width:h(g.tabW),height:h(y),rx:4,ry:4,fill:i,stroke:o,"stroke-width":1})),l.push(Pe({x:h(g.titleX),y:h(T),"font-family":Ge[t.style.font],"font-size":12,"font-weight":600,fill:s},t.title)),t.owner&&l.push(Pe({x:h(g.ownerX),y:h(T),"font-family":Ge[t.style.font],"font-size":10,fill:a},`owner: ${t.owner}`)),t.capacity&&l.push(MN(t.capacity,void 0,g.badgeX,T,10,Ge[t.style.font],a)),d&&l.push(Pe({x:h(g.footnoteRightX),y:h(_+14),"font-family":Ge.sans,"font-size":10,"font-weight":700,fill:c,"text-anchor":"end"},d))}for(let u of t.children)l.push(zE(u,e,r,n));return l.push(EG(t,n)),Y("g",{"data-layer":"swimlane","data-id":t.id??null},l.join(""))}function RG(t,e){let r=t.radius,n=t.center.x,i=t.center.y,o=e.anchorDiamond.fill,s=e.anchorDiamond.stroke,a=Y("path",{d:`M${h(n)} ${h(i-r)} L${h(n+r)} ${h(i)} L${h(n)} ${h(i+r)} L${h(n-r)} ${h(i)} Z`,fill:o,stroke:s,"stroke-width":1.25}),c=e.anchorDiamond.label,l=t.labelSide==="left"?t.labelBox.x+t.labelBox.width:t.labelBox.x,u={x:h(l),y:h(i+4),"font-family":Ge.sans,"font-size":10,fill:c};t.labelSide==="left"&&(u["text-anchor"]="end");let f=t.title?Pe(u,t.title):"";return Y("g",{"data-layer":"anchor","data-id":t.id??null},a+f)}function bG(t,e){let r=e.anchorDiamond.cutLine;return Y("line",{x1:h(t.center.x),y1:h(t.center.y+t.radius+1),x2:h(t.center.x),y2:h(t.cutBottomY),stroke:r,"stroke-width":1,"stroke-dasharray":"1 3"})}function wG(t,e){let r=t.center.x,n=t.center.y,i=t.radius,o=e.milestoneDiamond.fill,s=Y("path",{d:`M${h(r)} ${h(n-i)} L${h(r+i)} ${h(n)} L${h(r)} ${h(n+i)} L${h(r-i)} ${h(n)} Z`,fill:o,stroke:o,"stroke-width":1}),a=e.milestoneDiamond.label,c=t.labelSide==="left"?t.labelBox.x+t.labelBox.width:t.labelBox.x,l={x:h(c),y:h(n+4),"font-family":Ge.sans,"font-size":10,"font-weight":600,fill:a};t.labelSide==="left"&&(l["text-anchor"]="end");let u=t.title?Pe(l,t.title):"";return Y("g",{"data-layer":"milestone","data-id":t.id??null},s+u)}function AG(t,e){let r=t.isOverrun?e.milestoneDiamond.cutLineOverrun:e.milestoneDiamond.cutLineNormal,n=[];if(n.push(Y("line",{x1:h(t.center.x),y1:h(t.center.y+t.radius+1),x2:h(t.center.x),y2:h(t.cutBottomY),stroke:r,"stroke-width":2,"stroke-dasharray":Qp,"stroke-linecap":"round"})),t.slackArrows&&t.slackArrows.length>0){let i=e.milestoneDiamond.slack;for(let o of t.slackArrows)n.push(Y("path",{d:`M${h(o.x)} ${h(o.y)} H${h(t.center.x-6)}`,fill:"none",stroke:i,"stroke-width":1.1,"stroke-dasharray":"3 3","stroke-linecap":"round","marker-end":"url(#nl-arrow-dark)"}))}return n.join("")}function DN(t,e){let r=t.kind==="overflow"?e.dependency.overflowStroke:e.dependency.edgeStroke,n=t.waypoints;if(n.length<2)return"";let i=t.kind==="underBar"?.8:1.1;return Y("path",{d:SG(n,iE),fill:"none",stroke:r,"stroke-width":i,"stroke-dasharray":t.kind==="overflow"?"4 2":null,"stroke-linejoin":"round","marker-end":"url(#nl-arrow)"})}function SG(t,e){if(t.length<2)return"";let r=[`M${h(t[0].x)} ${h(t[0].y)}`];for(let n=1;n<t.length;n++){let i=t[n-1],o=t[n];if(n===t.length-1){r.push(`L${h(o.x)} ${h(o.y)}`);continue}let s=t[n+1],a=Math.sign(o.x-i.x),c=Math.sign(o.y-i.y),l=Math.sign(s.x-o.x),u=Math.sign(s.y-o.y),f=Math.hypot(o.x-i.x,o.y-i.y),d=Math.hypot(s.x-o.x,s.y-o.y),p=Math.min(e,f/2,d/2);if(p<=0||a!==0&&l!==0||c!==0&&u!==0){r.push(`L${h(o.x)} ${h(o.y)}`);continue}let g={x:o.x-a*p,y:o.y-c*p},y={x:o.x+l*p,y:o.y+u*p};r.push(`L${h(g.x)} ${h(g.y)}`),r.push(`Q${h(o.x)} ${h(o.y)} ${h(y.x)} ${h(y.y)}`)}return r.join(" ")}function IG(t,e,r){if(t.entries.length===0)return"";let n=r.footnotePanel.fill,i=r.footnotePanel.border,o=r.footnotePanel.header,s=r.footnotePanel.title,a=r.footnotePanel.description,c=r.footnotePanel.number,l=[];l.push(Y("rect",{x:h(t.box.x),y:h(t.box.y),width:h(t.box.width),height:h(t.box.height),rx:6,ry:6,fill:n,stroke:i,"stroke-width":1,filter:`url(#${e}-shadow-subtle)`})),l.push(Pe({x:h(t.box.x+Wr),y:h(t.box.y+QT),"font-family":Ge.sans,"font-size":12,"font-weight":700,fill:o},"Footnotes"));let u=t.box.y+yu+Wr,f=t.box.x+Wr,d=f+Wr;return t.entries.forEach((p,g)=>{let y=u+g*xu;l.push(Pe({x:h(f),y:h(y),"font-family":Ge.sans,"font-size":10,"font-weight":700,fill:c},String(p.number))),l.push(Pe({x:h(d),y:h(y),"font-family":Ge.sans,"font-size":11,"font-weight":600,fill:s},p.title)),p.description&&l.push(Pe({x:h(d+Math.max(120,p.title.length*6)),y:h(y),"font-family":Ge.sans,"font-size":11,fill:a},`\u2014 ${p.description}`))}),Y("g",{"data-layer":"footnotes"},l.join(""))}function vG(t,e,r,n){let i=n.includeRegion.border,o=n.includeRegion.fill,s=n.includeRegion.tabFill,a=n.includeRegion.tabStroke,c=n.includeRegion.tabText,l=n.includeRegion.badgeFill,u=n.includeRegion.badgeStroke,f=n.includeRegion.badgeText,d=t.box.x+8,p=t.box.y,g=t.box.width-16,y=t.box.height,_=Y("rect",{x:h(d),y:h(p),width:h(g),height:h(y),rx:8,ry:8,fill:o,stroke:i,"stroke-width":1,"stroke-dasharray":Qp}),T=Yp,R=uu(t.box.x,t.label,t.sourcePath),E=p-T/2,k=Y("rect",{x:h(R.tabX),y:h(E),width:h(R.tabWidth),height:T,rx:4,ry:4,fill:s,stroke:a,"stroke-width":1}),D=Pe({x:h(R.tabLabelX),y:h(E+Zp),"font-family":Ge.sans,"font-size":11,"font-weight":600,fill:c},t.label),P=R.badgeX,j=R.badgeSize,q=p-j/2,le=Y("rect",{x:h(P),y:h(q),width:j,height:j,rx:4,ry:4,fill:l,stroke:u,"stroke-width":1}),Ee=Y("path",{d:`M${h(P+7)} ${h(q+4)} H${h(P+14)} V${h(q+11)} M${h(P+4)} ${h(q+7)} H${h(P+11)} V${h(q+14)} H${h(P+4)} Z`,stroke:f,"stroke-width":1.4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}),O=9,w=p+4,L=Y("rect",{x:h(R.sourceHaloX),y:h(w-O),width:h(R.sourceHaloWidth),height:O+6,fill:o}),M=Pe({x:h(R.sourceTextX),y:h(w),"font-family":Ge.mono,"font-size":O,fill:f},t.sourcePath),A=t.nestedSwimlanes.map(S=>UN(S,e,r,n)).join("");return Y("g",{"data-layer":"include"},_+A+k+D+le+Ee+L+M)}function kG(t){let e=t.palette.attribution.mark,r=t.palette.attribution.link;if(t.swimlanes.length===0)return"";let n=t.header.attributionBox.x,i=t.header.attributionBox.y,o=Oi,s=Pe({x:"0",y:o,"font-family":Ge.sans,"font-size":nh,"font-weight":400,fill:e},rh)+Pe({x:Eu,y:o,"font-family":Ge.sans,"font-size":Oi,"font-weight":700,fill:e},"now")+Y("rect",{x:tE,y:12,width:rE,height:Oi,fill:r})+Pe({x:ih,y:o,"font-family":Ge.sans,"font-size":Oi,"font-weight":400,fill:e},"ine"),a=Y("g",{transform:`translate(${h(n)} ${h(i)}) scale(${h(Tu)})`},s);return Y("a",{href:eE,target:"_blank",rel:"noopener","aria-label":"Powered by nowline"},Y("g",{"data-layer":"attribution"},a))}async function NG(t,e,r,n,i,o,s){if(!e)return"";let a;try{a=await e(t)}catch(u){let f=`logo: failed to load ${t}: ${u instanceof Error?u.message:String(u)}`;if(n.strict)throw u;return n.warn?.(f),""}let c=(a.mime??"").toLowerCase();if(c==="image/svg+xml"){let u=new TextDecoder().decode(a.bytes),f=vN(u,{idPrefix:`${r}-logo`,onWarn:n.warn});return Y("g",{transform:`translate(${h(i)} ${h(o)})`},f)}if(c==="image/png"||c==="image/jpeg"||c==="image/jpg"||c==="image/webp"){let u=CG(a.bytes);return Y("image",{href:`data:${c};base64,${u}`,x:h(i),y:h(o),width:h(s),height:h(s),preserveAspectRatio:"xMidYMid meet"})}let l=`logo: unsupported mime ${c} for ${t}`;if(n.strict)throw new Error(l);return n.warn?.(l),""}function CG(t){if(typeof btoa<"u"){let r="";for(let n=0;n<t.length;n++)r+=String.fromCharCode(t[n]);return btoa(r)}let e=globalThis;if(e.Buffer)return e.Buffer.from(t).toString("base64");throw new Error("renderer: no base64 encoder available")}async function VE(t,e={}){let n=new Bh(e.idPrefix??"nl").next("root"),i=t.palette,o=[],s=i.arrowhead.neutral,a=i.arrowhead.light,c=i.arrowhead.dark,l=(d,p)=>`<marker id="${d}" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" fill="${p}"/></marker>`,u=`<defs>${ON(n)}`+l("nl-arrow",s)+l("nl-arrow-light",a)+l("nl-arrow-dark",c)+"</defs>";o.push(u),o.push(Y("rect",{x:0,y:0,width:h(t.width),height:h(t.height),fill:t.backgroundColor})),o.push(dG(t.timeline,i));for(let d of t.swimlanes)o.push(_G(d,i));o.push(fG(t.timeline,t.chartBox.y,i));for(let d of t.edges)d.kind==="underBar"&&o.push(DN(d,i));for(let d of t.swimlanes)o.push(UN(d,e,n,i));for(let d of t.includes)o.push(vG(d,e,n,i));for(let d of t.edges)d.kind!=="underBar"&&o.push(DN(d,i));for(let d of t.anchors)o.push(bG(d,i));for(let d of t.milestones)o.push(AG(d,i));for(let d of t.anchors)o.push(RG(d,i));for(let d of t.milestones)o.push(wG(d,i));if(o.push(pG(t.nowline,i)),o.push(IG(t.footnotes,n,i)),o.push(uG(t.header,n,i)),o.push(kG(t)),t.header.logo&&e.assetResolver){let d=await NG(t.header.logo.assetRef??"",e.assetResolver,n,e,t.header.logo.box.x,t.header.logo.box.y,Math.max(t.header.logo.box.width,t.header.logo.box.height));d&&o.push(d)}return`<svg${nc({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${h(t.width)} ${h(t.height)}`,width:h(t.width),height:h(t.height),"data-theme":t.theme,"data-generator":"nowline"})}>${o.join("")}</svg>`}var BN="__nowline_embed_noop_include__";async function XN(t){throw new Error(`${BN}: include "${t}" was skipped \u2014 the embed runs in single-file mode.`)}function GN(t){return t.includes(BN)}var Xh,HN=0,KE=!1;function jN(){return Xh||(Xh=BT()),Xh}function PG(){return ht.parse(`memory:///nowline-embed-${++HN}.nowline`)}async function YE(t){let e=jN(),n=e.shared.workspace.LangiumDocumentFactory.fromString(t,PG());await e.shared.workspace.DocumentBuilder.build([n],{validation:!0});let i=[];for(let o of n.parseResult.lexerErrors)i.push(o.message);for(let o of n.parseResult.parserErrors)i.push(o.message);for(let o of n.diagnostics??[])o.severity===1&&i.push(o.message);return{ast:n.parseResult.value,errors:i}}async function Gh(t,e={}){let r=await YE(t);if(r.errors.length>0)throw new ic(`Failed to parse Nowline source: ${r.errors.join("; ")}`,r.errors);let n=jN(),i=await NT(r.ast,"/embed.nowline",{services:n.Nowline,readFile:XN}),o=!1,s=[];for(let c of i.diagnostics)if(c.severity==="error"){if(GN(c.message)){o=!0;continue}s.push(c.message)}if(s.length>0)throw new ic(`Failed to resolve Nowline source: ${s.join("; ")}`,s);o&&!KE&&(KE=!0,console.warn("nowline: `include` directives are skipped in the browser embed (single-file mode). Render multi-file roadmaps with the CLI or the GitHub Action."));let a=jE(r.ast,i,{theme:e.theme,today:e.today,locale:e.locale,width:e.width});return VE(a,{idPrefix:e.idPrefix})}var ic=class extends Error{constructor(r,n){super(r);se(this,"details",n);this.name="EmbedRenderError"}};function qN(){KE=!1,Xh=void 0,HN=0}var WN=0;async function zN(t){let e=t.document??globalThis.document;if(!e)return{rendered:0,failed:0};let r=e.querySelectorAll(t.selector),n=0,i=0,o=++WN,s=[],a=0;for(let c of Array.from(r)){let l=OG(c);if(!l)continue;let u=LG(c),f=`nl-r${o}-${a++}`,d={theme:t.theme,locale:t.locale,width:t.width,today:t.today,idPrefix:f};s.push(Gh(u,d).then(p=>{$G(l,p),n++},p=>{i++,console.error("nowline: render failed",p)}))}return await Promise.all(s),{rendered:n,failed:i}}function OG(t){let e=t.parentElement;return e&&e.tagName.toUpperCase()==="PRE"?e:t}function LG(t){return t.textContent??""}function $G(t,e){t.outerHTML=e}function VN(){WN=0}function Hh(){if(typeof globalThis>"u")return"light";let t=globalThis.matchMedia;if(typeof t!="function")return"light";try{return t("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}}function KN(t,e){return t==="light"||t==="dark"?t:e}var DG="pre code.language-nowline, code.language-nowline",YN={theme:"auto",startOnLoad:!0,selector:DG,systemTheme:Hh()},Nt={...YN},ZE=!1;function MG(t={}){Nt={theme:t.theme??Nt.theme,startOnLoad:t.startOnLoad??Nt.startOnLoad,selector:t.selector??Nt.selector,locale:t.locale??Nt.locale,width:t.width??Nt.width,today:t.today??Nt.today,systemTheme:Hh()}}function ZN(){return{theme:KN(Nt.theme,Nt.systemTheme),locale:Nt.locale,width:Nt.width,today:Nt.today}}async function FG(t,e={}){let r={...ZN(),...e};return Gh(t,r)}async function UG(t){return YE(t)}async function JE(t){let e={selector:t?.selector??Nt.selector,theme:t?.theme??ZN().theme,locale:t?.locale??Nt.locale,width:t?.width??Nt.width,today:t?.today??Nt.today,document:t?.document};return zN(e)}var BG=JE;if(typeof document<"u"&&!ZE){ZE=!0;let t=()=>{Nt.startOnLoad&&JE()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t,{once:!0}):queueMicrotask(t)}function XG(){Nt={...YN,systemTheme:Hh()},ZE=!1,qN(),VN()}return Fu(GG);})();
|
|
2663
|
+
//# sourceMappingURL=nowline.min.js.map
|