import{a as i}from"./chunk-AQ6EADP3.mjs";var $S=Object.create,gs=Object.defineProperty,AS=Object.getOwnPropertyDescriptor,Bf=Object.getOwnPropertyNames,ES=Object.getPrototypeOf,_S=Object.prototype.hasOwnProperty,o=i((e,t)=>gs(e,"name",{value:t,configurable:!0}),"__name"),CS=i((e,t)=>i(function(){return e&&(t=(0,e[Bf(e)[0]])(e=0)),t},"__init"),"__esm"),Y=i((e,t)=>i(function(){return t||(0,e[Bf(e)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),xr=i((e,t)=>{for(var r in t)gs(e,r,{get:t[r],enumerable:!0})},"__export"),bo=i((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Bf(t))!_S.call(e,a)&&a!==r&&gs(e,a,{get:i(()=>t[a],"get"),enumerable:!(n=AS(t,a))||n.enumerable});return e},"__copyProps"),ml=i((e,t,r)=>(bo(e,t,"default"),r&&bo(r,t,"default")),"__reExport"),Kf=i((e,t,r)=>(r=e!=null?$S(ES(e)):{},bo(t||!e||!e.__esModule?gs(r,"default",{value:e,enumerable:!0}):r,e)),"__toESM"),qf=i(e=>bo(gs({},"__esModule",{value:!0}),e),"__toCommonJS"),gl={};xr(gl,{AnnotatedTextEdit:i(()=>ar,"AnnotatedTextEdit"),ChangeAnnotation:i(()=>Hr,"ChangeAnnotation"),ChangeAnnotationIdentifier:i(()=>Be,"ChangeAnnotationIdentifier"),CodeAction:i(()=>bc,"CodeAction"),CodeActionContext:i(()=>Cc,"CodeActionContext"),CodeActionKind:i(()=>_c,"CodeActionKind"),CodeActionTriggerKind:i(()=>ki,"CodeActionTriggerKind"),CodeDescription:i(()=>rc,"CodeDescription"),CodeLens:i(()=>Sc,"CodeLens"),Color:i(()=>no,"Color"),ColorInformation:i(()=>Xu,"ColorInformation"),ColorPresentation:i(()=>Ju,"ColorPresentation"),Command:i(()=>Vr,"Command"),CompletionItem:i(()=>dc,"CompletionItem"),CompletionItemKind:i(()=>sc,"CompletionItemKind"),CompletionItemLabelDetails:i(()=>fc,"CompletionItemLabelDetails"),CompletionItemTag:i(()=>lc,"CompletionItemTag"),CompletionList:i(()=>pc,"CompletionList"),CreateFile:i(()=>na,"CreateFile"),DeleteFile:i(()=>ia,"DeleteFile"),Diagnostic:i(()=>Si,"Diagnostic"),DiagnosticRelatedInformation:i(()=>ao,"DiagnosticRelatedInformation"),DiagnosticSeverity:i(()=>ec,"DiagnosticSeverity"),DiagnosticTag:i(()=>tc,"DiagnosticTag"),DocumentHighlight:i(()=>vc,"DocumentHighlight"),DocumentHighlightKind:i(()=>yc,"DocumentHighlightKind"),DocumentLink:i(()=>Ic,"DocumentLink"),DocumentSymbol:i(()=>Ec,"DocumentSymbol"),DocumentUri:i(()=>Vu,"DocumentUri"),EOL:i(()=>yg,"EOL"),FoldingRange:i(()=>Qu,"FoldingRange"),FoldingRangeKind:i(()=>Zu,"FoldingRangeKind"),FormattingOptions:i(()=>wc,"FormattingOptions"),Hover:i(()=>hc,"Hover"),InlayHint:i(()=>Fc,"InlayHint"),InlayHintKind:i(()=>oo,"InlayHintKind"),InlayHintLabelPart:i(()=>lo,"InlayHintLabelPart"),InlineCompletionContext:i(()=>Kc,"InlineCompletionContext"),InlineCompletionItem:i(()=>jc,"InlineCompletionItem"),InlineCompletionList:i(()=>Uc,"InlineCompletionList"),InlineCompletionTriggerKind:i(()=>zc,"InlineCompletionTriggerKind"),InlineValueContext:i(()=>xc,"InlineValueContext"),InlineValueEvaluatableExpression:i(()=>Mc,"InlineValueEvaluatableExpression"),InlineValueText:i(()=>Lc,"InlineValueText"),InlineValueVariableLookup:i(()=>Dc,"InlineValueVariableLookup"),InsertReplaceEdit:i(()=>uc,"InsertReplaceEdit"),InsertTextFormat:i(()=>oc,"InsertTextFormat"),InsertTextMode:i(()=>cc,"InsertTextMode"),Location:i(()=>bi,"Location"),LocationLink:i(()=>Yu,"LocationLink"),MarkedString:i(()=>Ni,"MarkedString"),MarkupContent:i(()=>sa,"MarkupContent"),MarkupKind:i(()=>so,"MarkupKind"),OptionalVersionedTextDocumentIdentifier:i(()=>Ii,"OptionalVersionedTextDocumentIdentifier"),ParameterInformation:i(()=>mc,"ParameterInformation"),Position:i(()=>ae,"Position"),Range:i(()=>Q,"Range"),RenameFile:i(()=>aa,"RenameFile"),SelectedCompletionInfo:i(()=>Bc,"SelectedCompletionInfo"),SelectionRange:i(()=>Nc,"SelectionRange"),SemanticTokenModifiers:i(()=>Pc,"SemanticTokenModifiers"),SemanticTokenTypes:i(()=>kc,"SemanticTokenTypes"),SemanticTokens:i(()=>Oc,"SemanticTokens"),SignatureInformation:i(()=>gc,"SignatureInformation"),StringValue:i(()=>Gc,"StringValue"),SymbolInformation:i(()=>$c,"SymbolInformation"),SymbolKind:i(()=>Tc,"SymbolKind"),SymbolTag:i(()=>Rc,"SymbolTag"),TextDocument:i(()=>Wc,"TextDocument"),TextDocumentEdit:i(()=>wi,"TextDocumentEdit"),TextDocumentIdentifier:i(()=>nc,"TextDocumentIdentifier"),TextDocumentItem:i(()=>ic,"TextDocumentItem"),TextEdit:i(()=>zt,"TextEdit"),URI:i(()=>ro,"URI"),VersionedTextDocumentIdentifier:i(()=>ac,"VersionedTextDocumentIdentifier"),WorkspaceChange:i(()=>gg,"WorkspaceChange"),WorkspaceEdit:i(()=>io,"WorkspaceEdit"),WorkspaceFolder:i(()=>qc,"WorkspaceFolder"),WorkspaceSymbol:i(()=>Ac,"WorkspaceSymbol"),integer:i(()=>Hu,"integer"),uinteger:i(()=>Ci,"uinteger")});var Vu,ro,Hu,Ci,ae,Q,bi,Yu,no,Xu,Ju,Zu,Qu,ao,ec,tc,rc,Si,Vr,zt,Hr,Be,ar,wi,na,aa,ia,io,mi,Cu,gg,nc,ac,Ii,ic,so,sa,sc,oc,lc,uc,cc,fc,dc,pc,Ni,hc,mc,gc,yc,vc,Tc,Rc,$c,Ac,Ec,_c,ki,Cc,bc,Sc,wc,Ic,Nc,kc,Pc,Oc,Lc,Dc,Mc,xc,oo,lo,Fc,Gc,jc,Uc,zc,Bc,Kc,qc,yg,Wc,Nh,A,ys=CS({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){"use strict";(function(e){function t(r){return typeof r=="string"}i(t,"is"),o(t,"is"),e.is=t})(Vu||(Vu={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),o(t,"is"),e.is=t})(ro||(ro={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),o(t,"is"),e.is=t})(Hu||(Hu={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),o(t,"is"),e.is=t})(Ci||(Ci={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ci.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ci.MAX_VALUE),{line:n,character:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),o(r,"is"),e.is=r})(ae||(ae={})),(function(e){function t(n,a,s,l){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(l))return{start:ae.create(n,a),end:ae.create(s,l)};if(ae.is(n)&&ae.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${l}]`)}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ae.is(a.start)&&ae.is(a.end)}i(r,"is"),o(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),o(r,"is"),e.is=r})(bi||(bi={})),(function(e){function t(n,a,s,l){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:l}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),o(r,"is"),e.is=r})(Yu||(Yu={})),(function(e){function t(n,a,s,l){return{red:n,green:a,blue:s,alpha:l}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),o(r,"is"),e.is=r})(no||(no={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&no.is(a.color)}i(r,"is"),o(r,"is"),e.is=r})(Xu||(Xu={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||zt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,zt.is))}i(r,"is"),o(r,"is"),e.is=r})(Ju||(Ju={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Zu||(Zu={})),(function(e){function t(n,a,s,l,u,c){let f={startLine:n,endLine:a};return A.defined(s)&&(f.startCharacter=s),A.defined(l)&&(f.endCharacter=l),A.defined(u)&&(f.kind=u),A.defined(c)&&(f.collapsedText=c),f}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),o(r,"is"),e.is=r})(Qu||(Qu={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&bi.is(a.location)&&A.string(a.message)}i(r,"is"),o(r,"is"),e.is=r})(ao||(ao={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ec||(ec={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(tc||(tc={})),(function(e){function t(r){let n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),o(t,"is"),e.is=t})(rc||(rc={})),(function(e){function t(n,a,s,l,u,c){let f={range:n,message:a};return A.defined(s)&&(f.severity=s),A.defined(l)&&(f.code=l),A.defined(u)&&(f.source=u),A.defined(c)&&(f.relatedInformation=c),f}i(t,"create"),o(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,ao.is))}i(r,"is"),o(r,"is"),e.is=r})(Si||(Si={})),(function(e){function t(n,a,...s){let l={title:n,command:a};return A.defined(s)&&s.length>0&&(l.arguments=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),o(r,"is"),e.is=r})(Vr||(Vr={})),(function(e){function t(s,l){return{range:s,newText:l}}i(t,"replace"),o(t,"replace"),e.replace=t;function r(s,l){return{range:{start:s,end:s},newText:l}}i(r,"insert"),o(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),o(n,"del"),e.del=n;function a(s){let l=s;return A.objectLiteral(l)&&A.string(l.newText)&&Q.is(l.range)}i(a,"is"),o(a,"is"),e.is=a})(zt||(zt={})),(function(e){function t(n,a,s){let l={label:n};return a!==void 0&&(l.needsConfirmation=a),s!==void 0&&(l.description=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),o(r,"is"),e.is=r})(Hr||(Hr={})),(function(e){function t(r){let n=r;return A.string(n)}i(t,"is"),o(t,"is"),e.is=t})(Be||(Be={})),(function(e){function t(s,l,u){return{range:s,newText:l,annotationId:u}}i(t,"replace"),o(t,"replace"),e.replace=t;function r(s,l,u){return{range:{start:s,end:s},newText:l,annotationId:u}}i(r,"insert"),o(r,"insert"),e.insert=r;function n(s,l){return{range:s,newText:"",annotationId:l}}i(n,"del"),o(n,"del"),e.del=n;function a(s){let l=s;return zt.is(l)&&(Hr.is(l.annotationId)||Be.is(l.annotationId))}i(a,"is"),o(a,"is"),e.is=a})(ar||(ar={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Ii.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),o(r,"is"),e.is=r})(wi||(wi={})),(function(e){function t(n,a,s){let l={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(l.options=a),s!==void 0&&(l.annotationId=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Be.is(a.annotationId))}i(r,"is"),o(r,"is"),e.is=r})(na||(na={})),(function(e){function t(n,a,s,l){let u={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(u.options=s),l!==void 0&&(u.annotationId=l),u}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Be.is(a.annotationId))}i(r,"is"),o(r,"is"),e.is=r})(aa||(aa={})),(function(e){function t(n,a,s){let l={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(l.options=a),s!==void 0&&(l.annotationId=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Be.is(a.annotationId))}i(r,"is"),o(r,"is"),e.is=r})(ia||(ia={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>A.string(a.kind)?na.is(a)||aa.is(a)||ia.is(a):wi.is(a)))}i(t,"is"),o(t,"is"),e.is=t})(io||(io={})),mi=class{static{i(this,"TextEditChangeImpl")}static{o(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=zt.insert(e,t):Be.is(r)?(a=r,n=ar.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=ar.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=zt.replace(e,t):Be.is(r)?(a=r,n=ar.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=ar.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=zt.del(e):Be.is(t)?(n=t,r=ar.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=ar.del(e,n)),this.edits.push(r),n!==void 0)return n}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.")}},Cu=class{static{i(this,"ChangeAnnotations")}static{o(this,"ChangeAnnotations")}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,t){let r;if(Be.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},gg=class{static{i(this,"WorkspaceChange")}static{o(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Cu(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(wi.is(t)){let r=new mi(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{let r=new mi(e.changes[t]);this._textEditChanges[t]=r})):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(Ii.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let t={uri:e.uri,version:e.version},r=this._textEditChanges[t.uri];if(!r){let n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new mi(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new mi(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Cu,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,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;Hr.is(t)||Be.is(t)?n=t:r=t;let a,s;if(n===void 0?a=na.create(e,r):(s=Be.is(n)?n:this._changeAnnotations.manage(n),a=na.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;Hr.is(r)||Be.is(r)?a=r:n=r;let s,l;if(a===void 0?s=aa.create(e,t,n):(l=Be.is(a)?a:this._changeAnnotations.manage(a),s=aa.create(e,t,n,l)),this._workspaceEdit.documentChanges.push(s),l!==void 0)return l}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;Hr.is(t)||Be.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ia.create(e,r):(s=Be.is(n)?n:this._changeAnnotations.manage(n),a=ia.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),o(r,"is"),e.is=r})(nc||(nc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),o(r,"is"),e.is=r})(ac||(ac={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),o(r,"is"),e.is=r})(Ii||(Ii={})),(function(e){function t(n,a,s,l){return{uri:n,languageId:a,version:s,text:l}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),o(r,"is"),e.is=r})(ic||(ic={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){let n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),o(t,"is"),e.is=t})(so||(so={})),(function(e){function t(r){let n=r;return A.objectLiteral(r)&&so.is(n.kind)&&A.string(n.value)}i(t,"is"),o(t,"is"),e.is=t})(sa||(sa={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(sc||(sc={})),(function(e){e.PlainText=1,e.Snippet=2})(oc||(oc={})),(function(e){e.Deprecated=1})(lc||(lc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),o(r,"is"),e.is=r})(uc||(uc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(cc||(cc={})),(function(e){function t(r){let n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),o(t,"is"),e.is=t})(fc||(fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),o(t,"create"),e.create=t})(dc||(dc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),o(t,"create"),e.create=t})(pc||(pc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),o(t,"fromPlainText"),e.fromPlainText=t;function r(n){let a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),o(r,"is"),e.is=r})(Ni||(Ni={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(sa.is(n.contents)||Ni.is(n.contents)||A.typedArray(n.contents,Ni.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),o(t,"is"),e.is=t})(hc||(hc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),o(t,"create"),e.create=t})(mc||(mc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),o(t,"create"),e.create=t})(gc||(gc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(yc||(yc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),o(t,"create"),e.create=t})(vc||(vc={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Tc||(Tc={})),(function(e){e.Deprecated=1})(Rc||(Rc={})),(function(e){function t(r,n,a,s,l){let u={name:r,kind:n,location:{uri:s,range:a}};return l&&(u.containerName=l),u}i(t,"create"),o(t,"create"),e.create=t})($c||($c={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),o(t,"create"),e.create=t})(Ac||(Ac={})),(function(e){function t(n,a,s,l,u,c){let f={name:n,detail:a,kind:s,range:l,selectionRange:u};return c!==void 0&&(f.children=c),f}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),o(r,"is"),e.is=r})(Ec||(Ec={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(_c||(_c={})),(function(e){e.Invoked=1,e.Automatic=2})(ki||(ki={})),(function(e){function t(n,a,s){let l={diagnostics:n};return a!=null&&(l.only=a),s!=null&&(l.triggerKind=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Si.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===ki.Invoked||a.triggerKind===ki.Automatic)}i(r,"is"),o(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){let l={title:n},u=!0;return typeof a=="string"?(u=!1,l.kind=a):Vr.is(a)?l.command=a:l.edit=a,u&&s!==void 0&&(l.kind=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Si.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||Vr.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||io.is(a.edit))}i(r,"is"),o(r,"is"),e.is=r})(bc||(bc={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||Vr.is(a.command))}i(r,"is"),o(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),o(r,"is"),e.is=r})(wc||(wc={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),o(r,"is"),e.is=r})(Ic||(Ic={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),o(r,"is"),e.is=r})(Nc||(Nc={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(kc||(kc={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Pc||(Pc={})),(function(e){function t(r){let n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),o(t,"is"),e.is=t})(Oc||(Oc={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),o(r,"is"),e.is=r})(Lc||(Lc={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),o(r,"is"),e.is=r})(Dc||(Dc={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),o(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),o(r,"is"),e.is=r})(xc||(xc={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),o(t,"is"),e.is=t})(oo||(oo={})),(function(e){function t(n){return{value:n}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||sa.is(a.tooltip))&&(a.location===void 0||bi.is(a.location))&&(a.command===void 0||Vr.is(a.command))}i(r,"is"),o(r,"is"),e.is=r})(lo||(lo={})),(function(e){function t(n,a,s){let l={position:n,label:a};return s!==void 0&&(l.kind=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ae.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,lo.is))&&(a.kind===void 0||oo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,zt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||sa.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),o(r,"is"),e.is=r})(Fc||(Fc={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),o(t,"createSnippet"),e.createSnippet=t})(Gc||(Gc={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),o(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(r){return{items:r}}i(t,"create"),o(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){e.Invoked=0,e.Automatic=1})(zc||(zc={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),o(t,"create"),e.create=t})(Bc||(Bc={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),o(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){function t(r){let n=r;return A.objectLiteral(n)&&ro.is(n.uri)&&A.string(n.name)}i(t,"is"),o(t,"is"),e.is=t})(qc||(qc={})),yg=[` `,`\r `,"\r"],(function(e){function t(s,l,u,c){return new Nh(s,l,u,c)}i(t,"create"),o(t,"create"),e.create=t;function r(s){let l=s;return!!(A.defined(l)&&A.string(l.uri)&&(A.undefined(l.languageId)||A.string(l.languageId))&&A.uinteger(l.lineCount)&&A.func(l.getText)&&A.func(l.positionAt)&&A.func(l.offsetAt))}i(r,"is"),o(r,"is"),e.is=r;function n(s,l){let u=s.getText(),c=a(l,(d,p)=>{let m=d.range.start.line-p.range.start.line;return m===0?d.range.start.character-p.range.start.character:m}),f=u.length;for(let d=c.length-1;d>=0;d--){let p=c[d],m=s.offsetAt(p.range.start),v=s.offsetAt(p.range.end);if(v<=f)u=u.substring(0,m)+p.newText+u.substring(v,u.length);else throw new Error("Overlapping edit");f=m}return u}i(n,"applyEdits"),o(n,"applyEdits"),e.applyEdits=n;function a(s,l){if(s.length<=1)return s;let u=s.length/2|0,c=s.slice(0,u),f=s.slice(u);a(c,l),a(f,l);let d=0,p=0,m=0;for(;d0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,n=t.length;if(n===0)return ae.create(0,e);for(;re?n=s:r=s+1}let a=r-1;return ae.create(a,e-t[a])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],n=e.line+1"u"}i(n,"undefined2"),o(n,"undefined"),e.undefined=n;function a(v){return v===!0||v===!1}i(a,"boolean"),o(a,"boolean"),e.boolean=a;function s(v){return t.call(v)==="[object String]"}i(s,"string"),o(s,"string"),e.string=s;function l(v){return t.call(v)==="[object Number]"}i(l,"number"),o(l,"number"),e.number=l;function u(v,T,w){return t.call(v)==="[object Number]"&&T<=v&&v<=w}i(u,"numberRange"),o(u,"numberRange"),e.numberRange=u;function c(v){return t.call(v)==="[object Number]"&&-2147483648<=v&&v<=2147483647}i(c,"integer2"),o(c,"integer"),e.integer=c;function f(v){return t.call(v)==="[object Number]"&&0<=v&&v<=2147483647}i(f,"uinteger2"),o(f,"uinteger"),e.uinteger=f;function d(v){return t.call(v)==="[object Function]"}i(d,"func"),o(d,"func"),e.func=d;function p(v){return v!==null&&typeof v=="object"}i(p,"objectLiteral"),o(p,"objectLiteral"),e.objectLiteral=p;function m(v,T){return Array.isArray(v)&&v.every(T)}i(m,"typedArray"),o(m,"typedArray"),e.typedArray=m})(A||(A={}))}}),_n=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t;function r(){if(t===void 0)throw new Error("No runtime abstraction layer installed");return t}i(r,"RAL"),o(r,"RAL"),(function(n){function a(s){if(s===void 0)throw new Error("No runtime abstraction layer provided");t=s}i(a,"install"),o(a,"install"),n.install=a})(r||(r={})),e.default=r}}),vs=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(c){return c===!0||c===!1}i(t,"boolean"),o(t,"boolean"),e.boolean=t;function r(c){return typeof c=="string"||c instanceof String}i(r,"string"),o(r,"string"),e.string=r;function n(c){return typeof c=="number"||c instanceof Number}i(n,"number"),o(n,"number"),e.number=n;function a(c){return c instanceof Error}i(a,"error"),o(a,"error"),e.error=a;function s(c){return typeof c=="function"}i(s,"func"),o(s,"func"),e.func=s;function l(c){return Array.isArray(c)}i(l,"array"),o(l,"array"),e.array=l;function u(c){return l(c)&&c.every(f=>r(f))}i(u,"stringArray"),o(u,"stringArray"),e.stringArray=u}}),Fa=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var t=_n(),r;(function(s){let l={dispose(){}};s.None=function(){return l}})(r||(e.Event=r={}));var n=class{static{i(this,"CallbackList")}static{o(this,"CallbackList")}add(s,l=null,u){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(s),this._contexts.push(l),Array.isArray(u)&&u.push({dispose:o(()=>this.remove(s,l),"dispose")})}remove(s,l=null){if(!this._callbacks)return;let u=!1;for(let c=0,f=this._callbacks.length;c{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(l,u);let f={dispose:o(()=>{this._callbacks&&(this._callbacks.remove(l,u),f.dispose=vg._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(c)&&c.push(f),f}),this._event}fire(l){this._callbacks&&this._callbacks.invoke.call(this._callbacks,l)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};e.Emitter=a,a._noop=function(){}}}),yl=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t=_n(),r=vs(),n=Fa(),a;(function(c){c.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),c.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n.Event.None});function f(d){let p=d;return p&&(p===c.None||p===c.Cancelled||r.boolean(p.isCancellationRequested)&&!!p.onCancellationRequested)}i(f,"is"),o(f,"is"),c.is=f})(a||(e.CancellationToken=a={}));var s=Object.freeze(function(c,f){let d=(0,t.default)().timer.setTimeout(c.bind(f),0);return{dispose(){d.dispose()}}}),l=class{static{i(this,"MutableToken")}static{o(this,"MutableToken")}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?s:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},u=class{static{i(this,"CancellationTokenSource3")}static{o(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=a.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=a.None}};e.CancellationTokenSource=u}}),Tg=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var t=vs(),r;(function(y){y.ParseError=-32700,y.InvalidRequest=-32600,y.MethodNotFound=-32601,y.InvalidParams=-32602,y.InternalError=-32603,y.jsonrpcReservedErrorRangeStart=-32099,y.serverErrorStart=-32099,y.MessageWriteError=-32099,y.MessageReadError=-32098,y.PendingResponseRejected=-32097,y.ConnectionInactive=-32096,y.ServerNotInitialized=-32002,y.UnknownErrorCode=-32001,y.jsonrpcReservedErrorRangeEnd=-32e3,y.serverErrorEnd=-32e3})(r||(e.ErrorCodes=r={}));var n=class Rg extends Error{static{i(this,"_ResponseError")}static{o(this,"ResponseError")}constructor(E,R,$){super(R),this.code=t.number(E)?E:r.UnknownErrorCode,this.data=$,Object.setPrototypeOf(this,Rg.prototype)}toJson(){let E={code:this.code,message:this.message};return this.data!==void 0&&(E.data=this.data),E}};e.ResponseError=n;var a=class uo{static{i(this,"_ParameterStructures")}static{o(this,"ParameterStructures")}constructor(E){this.kind=E}static is(E){return E===uo.auto||E===uo.byName||E===uo.byPosition}toString(){return this.kind}};e.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");var s=class{static{i(this,"AbstractMessageSignature")}static{o(this,"AbstractMessageSignature")}constructor(y,E){this.method=y,this.numberOfParams=E}get parameterStructures(){return a.auto}};e.AbstractMessageSignature=s;var l=class extends s{static{i(this,"RequestType0")}static{o(this,"RequestType0")}constructor(y){super(y,0)}};e.RequestType0=l;var u=class extends s{static{i(this,"RequestType")}static{o(this,"RequestType")}constructor(y,E=a.auto){super(y,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.RequestType=u;var c=class extends s{static{i(this,"RequestType1")}static{o(this,"RequestType1")}constructor(y,E=a.auto){super(y,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.RequestType1=c;var f=class extends s{static{i(this,"RequestType2")}static{o(this,"RequestType2")}constructor(y){super(y,2)}};e.RequestType2=f;var d=class extends s{static{i(this,"RequestType3")}static{o(this,"RequestType3")}constructor(y){super(y,3)}};e.RequestType3=d;var p=class extends s{static{i(this,"RequestType4")}static{o(this,"RequestType4")}constructor(y){super(y,4)}};e.RequestType4=p;var m=class extends s{static{i(this,"RequestType5")}static{o(this,"RequestType5")}constructor(y){super(y,5)}};e.RequestType5=m;var v=class extends s{static{i(this,"RequestType6")}static{o(this,"RequestType6")}constructor(y){super(y,6)}};e.RequestType6=v;var T=class extends s{static{i(this,"RequestType7")}static{o(this,"RequestType7")}constructor(y){super(y,7)}};e.RequestType7=T;var w=class extends s{static{i(this,"RequestType8")}static{o(this,"RequestType8")}constructor(y){super(y,8)}};e.RequestType8=w;var N=class extends s{static{i(this,"RequestType9")}static{o(this,"RequestType9")}constructor(y){super(y,9)}};e.RequestType9=N;var I=class extends s{static{i(this,"NotificationType")}static{o(this,"NotificationType")}constructor(y,E=a.auto){super(y,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.NotificationType=I;var S=class extends s{static{i(this,"NotificationType0")}static{o(this,"NotificationType0")}constructor(y){super(y,0)}};e.NotificationType0=S;var _=class extends s{static{i(this,"NotificationType1")}static{o(this,"NotificationType1")}constructor(y,E=a.auto){super(y,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=_;var P=class extends s{static{i(this,"NotificationType2")}static{o(this,"NotificationType2")}constructor(y){super(y,2)}};e.NotificationType2=P;var j=class extends s{static{i(this,"NotificationType3")}static{o(this,"NotificationType3")}constructor(y){super(y,3)}};e.NotificationType3=j;var ee=class extends s{static{i(this,"NotificationType4")}static{o(this,"NotificationType4")}constructor(y){super(y,4)}};e.NotificationType4=ee;var X=class extends s{static{i(this,"NotificationType5")}static{o(this,"NotificationType5")}constructor(y){super(y,5)}};e.NotificationType5=X;var ce=class extends s{static{i(this,"NotificationType6")}static{o(this,"NotificationType6")}constructor(y){super(y,6)}};e.NotificationType6=ce;var me=class extends s{static{i(this,"NotificationType7")}static{o(this,"NotificationType7")}constructor(y){super(y,7)}};e.NotificationType7=me;var Re=class extends s{static{i(this,"NotificationType8")}static{o(this,"NotificationType8")}constructor(y){super(y,8)}};e.NotificationType8=Re;var O=class extends s{static{i(this,"NotificationType9")}static{o(this,"NotificationType9")}constructor(y){super(y,9)}};e.NotificationType9=O;var C;(function(y){function E(b){let L=b;return L&&t.string(L.method)&&(t.string(L.id)||t.number(L.id))}i(E,"isRequest"),o(E,"isRequest"),y.isRequest=E;function R(b){let L=b;return L&&t.string(L.method)&&b.id===void 0}i(R,"isNotification"),o(R,"isNotification"),y.isNotification=R;function $(b){let L=b;return L&&(L.result!==void 0||!!L.error)&&(t.string(L.id)||t.number(L.id)||L.id===null)}i($,"isResponse"),o($,"isResponse"),y.isResponse=$})(C||(e.Message=C={}))}}),$g=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var r;(function(s){s.None=0,s.First=1,s.AsOld=s.First,s.Last=2,s.AsNew=s.Last})(r||(e.Touch=r={}));var n=class{static{i(this,"LinkedMap")}static{o(this,"LinkedMap")}constructor(){this[t]="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(s){return this._map.has(s)}get(s,l=r.None){let u=this._map.get(s);if(u)return l!==r.None&&this.touch(u,l),u.value}set(s,l,u=r.None){let c=this._map.get(s);if(c)c.value=l,u!==r.None&&this.touch(c,u);else{switch(c={key:s,value:l,next:void 0,previous:void 0},u){case r.None:this.addItemLast(c);break;case r.First:this.addItemFirst(c);break;case r.Last:this.addItemLast(c);break;default:this.addItemLast(c);break}this._map.set(s,c),this._size++}return this}delete(s){return!!this.remove(s)}remove(s){let l=this._map.get(s);if(l)return this._map.delete(s),this.removeItem(l),this._size--,l.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let s=this._head;return this._map.delete(s.key),this.removeItem(s),this._size--,s.value}forEach(s,l){let u=this._state,c=this._head;for(;c;){if(l?s.bind(l)(c.value,c.key,this):s(c.value,c.key,this),this._state!==u)throw new Error("LinkedMap got modified during iteration.");c=c.next}}keys(){let s=this._state,l=this._head,u={[Symbol.iterator]:()=>u,next:o(()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(l){let c={value:l.key,done:!1};return l=l.next,c}else return{value:void 0,done:!0}},"next")};return u}values(){let s=this._state,l=this._head,u={[Symbol.iterator]:()=>u,next:o(()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(l){let c={value:l.value,done:!1};return l=l.next,c}else return{value:void 0,done:!0}},"next")};return u}entries(){let s=this._state,l=this._head,u={[Symbol.iterator]:()=>u,next:o(()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(l){let c={value:[l.key,l.value],done:!1};return l=l.next,c}else return{value:void 0,done:!0}},"next")};return u}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(s){if(s>=this.size)return;if(s===0){this.clear();return}let l=this._head,u=this.size;for(;l&&u>s;)this._map.delete(l.key),l=l.next,u--;this._head=l,this._size=u,l&&(l.previous=void 0),this._state++}addItemFirst(s){if(!this._head&&!this._tail)this._tail=s;else if(this._head)s.next=this._head,this._head.previous=s;else throw new Error("Invalid list");this._head=s,this._state++}addItemLast(s){if(!this._head&&!this._tail)this._head=s;else if(this._tail)s.previous=this._tail,this._tail.next=s;else throw new Error("Invalid list");this._tail=s,this._state++}removeItem(s){if(s===this._head&&s===this._tail)this._head=void 0,this._tail=void 0;else if(s===this._head){if(!s.next)throw new Error("Invalid list");s.next.previous=void 0,this._head=s.next}else if(s===this._tail){if(!s.previous)throw new Error("Invalid list");s.previous.next=void 0,this._tail=s.previous}else{let l=s.next,u=s.previous;if(!l||!u)throw new Error("Invalid list");l.previous=u,u.next=l}s.next=void 0,s.previous=void 0,this._state++}touch(s,l){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(l!==r.First&&l!==r.Last)){if(l===r.First){if(s===this._head)return;let u=s.next,c=s.previous;s===this._tail?(c.next=void 0,this._tail=c):(u.previous=c,c.next=u),s.previous=void 0,s.next=this._head,this._head.previous=s,this._head=s,this._state++}else if(l===r.Last){if(s===this._tail)return;let u=s.next,c=s.previous;s===this._head?(u.previous=void 0,this._head=u):(u.previous=c,c.next=u),s.next=void 0,s.previous=this._tail,this._tail.next=s,this._tail=s,this._state++}}}toJSON(){let s=[];return this.forEach((l,u)=>{s.push([u,l])}),s}fromJSON(s){this.clear();for(let[l,u]of s)this.set(l,u)}};e.LinkedMap=n;var a=class extends n{static{i(this,"LRUCache")}static{o(this,"LRUCache")}constructor(s,l=1){super(),this._limit=s,this._ratio=Math.min(Math.max(0,l),1)}get limit(){return this._limit}set limit(s){this._limit=s,this.checkTrim()}get ratio(){return this._ratio}set ratio(s){this._ratio=Math.min(Math.max(0,s),1),this.checkTrim()}get(s,l=r.AsNew){return super.get(s,l)}peek(s){return super.get(s,r.None)}set(s,l){return super.set(s,l,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=a}}),bS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(r){function n(a){return{dispose:a}}i(n,"create"),o(n,"create"),r.create=n})(t||(e.Disposable=t={}))}}),SS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=yl(),r;(function(u){u.Continue=0,u.Cancelled=1})(r||(r={}));var n=class{static{i(this,"SharedArraySenderStrategy")}static{o(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(u){if(u.id===null)return;let c=new SharedArrayBuffer(4),f=new Int32Array(c,0,1);f[0]=r.Continue,this.buffers.set(u.id,c),u.$cancellationData=c}async sendCancellation(u,c){let f=this.buffers.get(c);if(f===void 0)return;let d=new Int32Array(f,0,1);Atomics.store(d,0,r.Cancelled)}cleanup(u){this.buffers.delete(u)}dispose(){this.buffers.clear()}};e.SharedArraySenderStrategy=n;var a=class{static{i(this,"SharedArrayBufferCancellationToken")}static{o(this,"SharedArrayBufferCancellationToken")}constructor(u){this.data=new Int32Array(u,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},s=class{static{i(this,"SharedArrayBufferCancellationTokenSource")}static{o(this,"SharedArrayBufferCancellationTokenSource")}constructor(u){this.token=new a(u)}cancel(){}dispose(){}},l=class{static{i(this,"SharedArrayReceiverStrategy")}static{o(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(u){let c=u.$cancellationData;return c===void 0?new t.CancellationTokenSource:new s(c)}};e.SharedArrayReceiverStrategy=l}}),Ag=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=_n(),r=class{static{i(this,"Semaphore")}static{o(this,"Semaphore")}constructor(n=1){if(n<=0)throw new Error("Capacity must be greater than 0");this._capacity=n,this._active=0,this._waiting=[]}lock(n){return new Promise((a,s)=>{this._waiting.push({thunk:n,resolve:a,reject:s}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let n=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let a=n.thunk();a instanceof Promise?a.then(s=>{this._active--,n.resolve(s),this.runNext()},s=>{this._active--,n.reject(s),this.runNext()}):(this._active--,n.resolve(a),this.runNext())}catch(a){this._active--,n.reject(a),this.runNext()}}};e.Semaphore=r}}),wS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var t=_n(),r=vs(),n=Fa(),a=Ag(),s;(function(f){function d(p){let m=p;return m&&r.func(m.listen)&&r.func(m.dispose)&&r.func(m.onError)&&r.func(m.onClose)&&r.func(m.onPartialMessage)}i(d,"is"),o(d,"is"),f.is=d})(s||(e.MessageReader=s={}));var l=class{static{i(this,"AbstractMessageReader")}static{o(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter,this.partialMessageEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(f){this.errorEmitter.fire(this.asError(f))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(f){this.partialMessageEmitter.fire(f)}asError(f){return f instanceof Error?f:new Error(`Reader received error. Reason: ${r.string(f.message)?f.message:"unknown"}`)}};e.AbstractMessageReader=l;var u;(function(f){function d(p){let m,v,T,w=new Map,N,I=new Map;if(p===void 0||typeof p=="string")m=p??"utf-8";else{if(m=p.charset??"utf-8",p.contentDecoder!==void 0&&(T=p.contentDecoder,w.set(T.name,T)),p.contentDecoders!==void 0)for(let S of p.contentDecoders)w.set(S.name,S);if(p.contentTypeDecoder!==void 0&&(N=p.contentTypeDecoder,I.set(N.name,N)),p.contentTypeDecoders!==void 0)for(let S of p.contentTypeDecoders)I.set(S.name,S)}return N===void 0&&(N=(0,t.default)().applicationJson.decoder,I.set(N.name,N)),{charset:m,contentDecoder:T,contentDecoders:w,contentTypeDecoder:N,contentTypeDecoders:I}}i(d,"fromOptions"),o(d,"fromOptions"),f.fromOptions=d})(u||(u={}));var c=class extends l{static{i(this,"ReadableStreamMessageReader")}static{o(this,"ReadableStreamMessageReader")}constructor(f,d){super(),this.readable=f,this.options=u.fromOptions(d),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new a.Semaphore(1)}set partialMessageTimeout(f){this._partialMessageTimeout=f}get partialMessageTimeout(){return this._partialMessageTimeout}listen(f){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=f;let d=this.readable.onData(p=>{this.onData(p)});return this.readable.onError(p=>this.fireError(p)),this.readable.onClose(()=>this.fireClose()),d}onData(f){try{for(this.buffer.append(f);;){if(this.nextMessageLength===-1){let p=this.buffer.tryReadHeaders(!0);if(!p)return;let m=p.get("content-length");if(!m){this.fireError(new Error(`Header must provide a Content-Length property. ${JSON.stringify(Object.fromEntries(p))}`));return}let v=parseInt(m);if(isNaN(v)){this.fireError(new Error(`Content-Length value must be a number. Got ${m}`));return}this.nextMessageLength=v}let d=this.buffer.tryReadBody(this.nextMessageLength);if(d===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let p=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(d):d,m=await this.options.contentTypeDecoder.decode(p,this.options);this.callback(m)}).catch(p=>{this.fireError(p)})}}catch(d){this.fireError(d)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((f,d)=>{this.partialMessageTimer=void 0,f===this.messageToken&&(this.firePartialMessage({messageToken:f,waitingTime:d}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=c}}),IS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=_n(),r=vs(),n=Ag(),a=Fa(),s="Content-Length: ",l=`\r `,u;(function(p){function m(v){let T=v;return T&&r.func(T.dispose)&&r.func(T.onClose)&&r.func(T.onError)&&r.func(T.write)}i(m,"is"),o(m,"is"),p.is=m})(u||(e.MessageWriter=u={}));var c=class{static{i(this,"AbstractMessageWriter")}static{o(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(p,m,v){this.errorEmitter.fire([this.asError(p),m,v])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(p){return p instanceof Error?p:new Error(`Writer received error. Reason: ${r.string(p.message)?p.message:"unknown"}`)}};e.AbstractMessageWriter=c;var f;(function(p){function m(v){return v===void 0||typeof v=="string"?{charset:v??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:v.charset??"utf-8",contentEncoder:v.contentEncoder,contentTypeEncoder:v.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}i(m,"fromOptions"),o(m,"fromOptions"),p.fromOptions=m})(f||(f={}));var d=class extends c{static{i(this,"WriteableStreamMessageWriter")}static{o(this,"WriteableStreamMessageWriter")}constructor(p,m){super(),this.writable=p,this.options=f.fromOptions(m),this.errorCount=0,this.writeSemaphore=new n.Semaphore(1),this.writable.onError(v=>this.fireError(v)),this.writable.onClose(()=>this.fireClose())}async write(p){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(p,this.options).then(v=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(v):v).then(v=>{let T=[];return T.push(s,v.byteLength.toString(),l),T.push(l),this.doWrite(p,T,v)},v=>{throw this.fireError(v),v}))}async doWrite(p,m,v){try{return await this.writable.write(m.join(""),"ascii"),this.writable.write(v)}catch(T){return this.handleError(T,p),Promise.reject(T)}}handleError(p,m){this.errorCount++,this.fireError(p,m,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=d}}),NS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=13,r=10,n=`\r `,a=class{static{i(this,"AbstractMessageBuffer")}static{o(this,"AbstractMessageBuffer")}constructor(s="utf-8"){this._encoding=s,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(s){let l=typeof s=="string"?this.fromString(s,this._encoding):s;this._chunks.push(l),this._totalLength+=l.byteLength}tryReadHeaders(s=!1){if(this._chunks.length===0)return;let l=0,u=0,c=0,f=0;e:for(;uthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===s){let f=this._chunks[0];return this._chunks.shift(),this._totalLength-=s,this.asNative(f)}if(this._chunks[0].byteLength>s){let f=this._chunks[0],d=this.asNative(f,s);return this._chunks[0]=f.slice(s),this._totalLength-=s,d}let l=this.allocNative(s),u=0,c=0;for(;s>0;){let f=this._chunks[c];if(f.byteLength>s){let d=f.slice(0,s);l.set(d,u),u+=s,this._chunks[c]=f.slice(s),this._totalLength-=s,s-=s}else l.set(f,u),u+=f.byteLength,this._chunks.shift(),this._totalLength-=f.byteLength,s-=f.byteLength}return l}};e.AbstractMessageBuffer=a}}),kS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var t=_n(),r=vs(),n=Tg(),a=$g(),s=Fa(),l=yl(),u;(function(y){y.type=new n.NotificationType("$/cancelRequest")})(u||(u={}));var c;(function(y){function E(R){return typeof R=="string"||typeof R=="number"}i(E,"is"),o(E,"is"),y.is=E})(c||(e.ProgressToken=c={}));var f;(function(y){y.type=new n.NotificationType("$/progress")})(f||(f={}));var d=class{static{i(this,"ProgressType")}static{o(this,"ProgressType")}constructor(){}};e.ProgressType=d;var p;(function(y){function E(R){return r.func(R)}i(E,"is"),o(E,"is"),y.is=E})(p||(p={})),e.NullLogger=Object.freeze({error:o(()=>{},"error"),warn:o(()=>{},"warn"),info:o(()=>{},"info"),log:o(()=>{},"log")});var m;(function(y){y[y.Off=0]="Off",y[y.Messages=1]="Messages",y[y.Compact=2]="Compact",y[y.Verbose=3]="Verbose"})(m||(e.Trace=m={}));var v;(function(y){y.Off="off",y.Messages="messages",y.Compact="compact",y.Verbose="verbose"})(v||(e.TraceValues=v={})),(function(y){function E($){if(!r.string($))return y.Off;switch($=$.toLowerCase(),$){case"off":return y.Off;case"messages":return y.Messages;case"compact":return y.Compact;case"verbose":return y.Verbose;default:return y.Off}}i(E,"fromString"),o(E,"fromString"),y.fromString=E;function R($){switch($){case y.Off:return"off";case y.Messages:return"messages";case y.Compact:return"compact";case y.Verbose:return"verbose";default:return"off"}}i(R,"toString4"),o(R,"toString"),y.toString=R})(m||(e.Trace=m={}));var T;(function(y){y.Text="text",y.JSON="json"})(T||(e.TraceFormat=T={})),(function(y){function E(R){return r.string(R)?(R=R.toLowerCase(),R==="json"?y.JSON:y.Text):y.Text}i(E,"fromString"),o(E,"fromString"),y.fromString=E})(T||(e.TraceFormat=T={}));var w;(function(y){y.type=new n.NotificationType("$/setTrace")})(w||(e.SetTraceNotification=w={}));var N;(function(y){y.type=new n.NotificationType("$/logTrace")})(N||(e.LogTraceNotification=N={}));var I;(function(y){y[y.Closed=1]="Closed",y[y.Disposed=2]="Disposed",y[y.AlreadyListening=3]="AlreadyListening"})(I||(e.ConnectionErrors=I={}));var S=class Eg extends Error{static{i(this,"_ConnectionError")}static{o(this,"ConnectionError")}constructor(E,R){super(R),this.code=E,Object.setPrototypeOf(this,Eg.prototype)}};e.ConnectionError=S;var _;(function(y){function E(R){let $=R;return $&&r.func($.cancelUndispatched)}i(E,"is"),o(E,"is"),y.is=E})(_||(e.ConnectionStrategy=_={}));var P;(function(y){function E(R){let $=R;return $&&($.kind===void 0||$.kind==="id")&&r.func($.createCancellationTokenSource)&&($.dispose===void 0||r.func($.dispose))}i(E,"is"),o(E,"is"),y.is=E})(P||(e.IdCancellationReceiverStrategy=P={}));var j;(function(y){function E(R){let $=R;return $&&$.kind==="request"&&r.func($.createCancellationTokenSource)&&($.dispose===void 0||r.func($.dispose))}i(E,"is"),o(E,"is"),y.is=E})(j||(e.RequestCancellationReceiverStrategy=j={}));var ee;(function(y){y.Message=Object.freeze({createCancellationTokenSource(R){return new l.CancellationTokenSource}});function E(R){return P.is(R)||j.is(R)}i(E,"is"),o(E,"is"),y.is=E})(ee||(e.CancellationReceiverStrategy=ee={}));var X;(function(y){y.Message=Object.freeze({sendCancellation(R,$){return R.sendNotification(u.type,{id:$})},cleanup(R){}});function E(R){let $=R;return $&&r.func($.sendCancellation)&&r.func($.cleanup)}i(E,"is"),o(E,"is"),y.is=E})(X||(e.CancellationSenderStrategy=X={}));var ce;(function(y){y.Message=Object.freeze({receiver:ee.Message,sender:X.Message});function E(R){let $=R;return $&&ee.is($.receiver)&&X.is($.sender)}i(E,"is"),o(E,"is"),y.is=E})(ce||(e.CancellationStrategy=ce={}));var me;(function(y){function E(R){let $=R;return $&&r.func($.handleMessage)}i(E,"is"),o(E,"is"),y.is=E})(me||(e.MessageStrategy=me={}));var Re;(function(y){function E(R){let $=R;return $&&(ce.is($.cancellationStrategy)||_.is($.connectionStrategy)||me.is($.messageStrategy))}i(E,"is"),o(E,"is"),y.is=E})(Re||(e.ConnectionOptions=Re={}));var O;(function(y){y[y.New=1]="New",y[y.Listening=2]="Listening",y[y.Closed=3]="Closed",y[y.Disposed=4]="Disposed"})(O||(O={}));function C(y,E,R,$){let b=R!==void 0?R:e.NullLogger,L=0,x=0,M=0,U="2.0",W,le=new Map,H,Oe=new Map,ie=new Map,Le,Ue=new a.LinkedMap,$e=new Map,ze=new Set,Ie=new Map,J=m.Off,Ge=T.Text,fe,at=O.New,qn=new s.Emitter,Ha=new s.Emitter,Ya=new s.Emitter,Xa=new s.Emitter,Ja=new s.Emitter,St=$&&$.cancellationStrategy?$.cancellationStrategy:ce.Message;function Wn(g){if(g===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+g.toString()}i(Wn,"createRequestQueueKey"),o(Wn,"createRequestQueueKey");function Za(g){return g===null?"res-unknown-"+(++M).toString():"res-"+g.toString()}i(Za,"createResponseQueueKey"),o(Za,"createResponseQueueKey");function Qa(){return"not-"+(++x).toString()}i(Qa,"createNotificationQueueKey"),o(Qa,"createNotificationQueueKey");function ei(g,k){n.Message.isRequest(k)?g.set(Wn(k.id),k):n.Message.isResponse(k)?g.set(Za(k.id),k):g.set(Qa(),k)}i(ei,"addMessageToQueue"),o(ei,"addMessageToQueue");function ti(g){}i(ti,"cancelUndispatched"),o(ti,"cancelUndispatched");function Vn(){return at===O.Listening}i(Vn,"isListening"),o(Vn,"isListening");function Hn(){return at===O.Closed}i(Hn,"isClosed"),o(Hn,"isClosed");function Ft(){return at===O.Disposed}i(Ft,"isDisposed"),o(Ft,"isDisposed");function Yn(){(at===O.New||at===O.Listening)&&(at=O.Closed,Ha.fire(void 0))}i(Yn,"closeHandler"),o(Yn,"closeHandler");function ri(g){qn.fire([g,void 0,void 0])}i(ri,"readErrorHandler"),o(ri,"readErrorHandler");function ni(g){qn.fire(g)}i(ni,"writeErrorHandler"),o(ni,"writeErrorHandler"),y.onClose(Yn),y.onError(ri),E.onClose(Yn),E.onError(ni);function Xn(){Le||Ue.size===0||(Le=(0,t.default)().timer.setImmediate(()=>{Le=void 0,ai()}))}i(Xn,"triggerMessageQueue"),o(Xn,"triggerMessageQueue");function Jn(g){n.Message.isRequest(g)?ii(g):n.Message.isNotification(g)?oi(g):n.Message.isResponse(g)?si(g):li(g)}i(Jn,"handleMessage"),o(Jn,"handleMessage");function ai(){if(Ue.size===0)return;let g=Ue.shift();try{let k=$?.messageStrategy;me.is(k)?k.handleMessage(g,Jn):Jn(g)}finally{Xn()}}i(ai,"processMessageQueue"),o(ai,"processMessageQueue");let xs=o(g=>{try{if(n.Message.isNotification(g)&&g.method===u.type.method){let k=g.params.id,D=Wn(k),F=Ue.get(D);if(n.Message.isRequest(F)){let ue=$?.connectionStrategy,be=ue&&ue.cancelUndispatched?ue.cancelUndispatched(F,ti):void 0;if(be&&(be.error!==void 0||be.result!==void 0)){Ue.delete(D),Ie.delete(k),be.id=F.id,Cr(be,g.method,Date.now()),E.write(be).catch(()=>b.error("Sending response for canceled message failed."));return}}let ge=Ie.get(k);if(ge!==void 0){ge.cancel(),zr(g);return}else ze.add(k)}ei(Ue,g)}finally{Xn()}},"callback");function ii(g){if(Ft())return;function k(te,Ee,se){let De={jsonrpc:U,id:g.id};te instanceof n.ResponseError?De.error=te.toJson():De.result=te===void 0?null:te,Cr(De,Ee,se),E.write(De).catch(()=>b.error("Sending response failed."))}i(k,"reply"),o(k,"reply");function D(te,Ee,se){let De={jsonrpc:U,id:g.id,error:te.toJson()};Cr(De,Ee,se),E.write(De).catch(()=>b.error("Sending response failed."))}i(D,"replyError"),o(D,"replyError");function F(te,Ee,se){te===void 0&&(te=null);let De={jsonrpc:U,id:g.id,result:te};Cr(De,Ee,se),E.write(De).catch(()=>b.error("Sending response failed."))}i(F,"replySuccess"),o(F,"replySuccess"),fi(g);let ge=le.get(g.method),ue,be;ge&&(ue=ge.type,be=ge.handler);let Ne=Date.now();if(be||W){let te=g.id??String(Date.now()),Ee=P.is(St.receiver)?St.receiver.createCancellationTokenSource(te):St.receiver.createCancellationTokenSource(g);g.id!==null&&ze.has(g.id)&&Ee.cancel(),g.id!==null&&Ie.set(te,Ee);try{let se;if(be)if(g.params===void 0){if(ue!==void 0&&ue.numberOfParams!==0){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${g.method} defines ${ue.numberOfParams} params but received none.`),g.method,Ne);return}se=be(Ee.token)}else if(Array.isArray(g.params)){if(ue!==void 0&&ue.parameterStructures===n.ParameterStructures.byName){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${g.method} defines parameters by name but received parameters by position`),g.method,Ne);return}se=be(...g.params,Ee.token)}else{if(ue!==void 0&&ue.parameterStructures===n.ParameterStructures.byPosition){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${g.method} defines parameters by position but received parameters by name`),g.method,Ne);return}se=be(g.params,Ee.token)}else W&&(se=W(g.method,g.params,Ee.token));let De=se;se?De.then?De.then(He=>{Ie.delete(te),k(He,g.method,Ne)},He=>{Ie.delete(te),He instanceof n.ResponseError?D(He,g.method,Ne):He&&r.string(He.message)?D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${g.method} failed with message: ${He.message}`),g.method,Ne):D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${g.method} failed unexpectedly without providing any details.`),g.method,Ne)}):(Ie.delete(te),k(se,g.method,Ne)):(Ie.delete(te),F(se,g.method,Ne))}catch(se){Ie.delete(te),se instanceof n.ResponseError?k(se,g.method,Ne):se&&r.string(se.message)?D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${g.method} failed with message: ${se.message}`),g.method,Ne):D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${g.method} failed unexpectedly without providing any details.`),g.method,Ne)}}else D(new n.ResponseError(n.ErrorCodes.MethodNotFound,`Unhandled method ${g.method}`),g.method,Ne)}i(ii,"handleRequest"),o(ii,"handleRequest");function si(g){if(!Ft())if(g.id===null)g.error?b.error(`Received response message without id: Error is: ${JSON.stringify(g.error,void 0,4)}`):b.error("Received response message without id. No further error information provided.");else{let k=g.id,D=$e.get(k);if(di(g,D),D!==void 0){$e.delete(k);try{if(g.error){let F=g.error;D.reject(new n.ResponseError(F.code,F.message,F.data))}else if(g.result!==void 0)D.resolve(g.result);else throw new Error("Should never happen.")}catch(F){F.message?b.error(`Response handler '${D.method}' failed with message: ${F.message}`):b.error(`Response handler '${D.method}' failed unexpectedly.`)}}}}i(si,"handleResponse"),o(si,"handleResponse");function oi(g){if(Ft())return;let k,D;if(g.method===u.type.method){let F=g.params.id;ze.delete(F),zr(g);return}else{let F=Oe.get(g.method);F&&(D=F.handler,k=F.type)}if(D||H)try{if(zr(g),D)if(g.params===void 0)k!==void 0&&k.numberOfParams!==0&&k.parameterStructures!==n.ParameterStructures.byName&&b.error(`Notification ${g.method} defines ${k.numberOfParams} params but received none.`),D();else if(Array.isArray(g.params)){let F=g.params;g.method===f.type.method&&F.length===2&&c.is(F[0])?D({token:F[0],value:F[1]}):(k!==void 0&&(k.parameterStructures===n.ParameterStructures.byName&&b.error(`Notification ${g.method} defines parameters by name but received parameters by position`),k.numberOfParams!==g.params.length&&b.error(`Notification ${g.method} defines ${k.numberOfParams} params but received ${F.length} arguments`)),D(...F))}else k!==void 0&&k.parameterStructures===n.ParameterStructures.byPosition&&b.error(`Notification ${g.method} defines parameters by position but received parameters by name`),D(g.params);else H&&H(g.method,g.params)}catch(F){F.message?b.error(`Notification handler '${g.method}' failed with message: ${F.message}`):b.error(`Notification handler '${g.method}' failed unexpectedly.`)}else Ya.fire(g)}i(oi,"handleNotification"),o(oi,"handleNotification");function li(g){if(!g){b.error("Received empty message.");return}b.error(`Received message which is neither a response nor a notification message: ${JSON.stringify(g,null,4)}`);let k=g;if(r.string(k.id)||r.number(k.id)){let D=k.id,F=$e.get(D);F&&F.reject(new Error("The received response has neither a result nor an error property."))}}i(li,"handleInvalidMessage"),o(li,"handleInvalidMessage");function Rt(g){if(g!=null)switch(J){case m.Verbose:return JSON.stringify(g,null,4);case m.Compact:return JSON.stringify(g);default:return}}i(Rt,"stringifyTrace"),o(Rt,"stringifyTrace");function ui(g){if(!(J===m.Off||!fe))if(Ge===T.Text){let k;(J===m.Verbose||J===m.Compact)&&g.params&&(k=`Params: ${Rt(g.params)} `),fe.log(`Sending request '${g.method} - (${g.id})'.`,k)}else Gt("send-request",g)}i(ui,"traceSendingRequest"),o(ui,"traceSendingRequest");function ci(g){if(!(J===m.Off||!fe))if(Ge===T.Text){let k;(J===m.Verbose||J===m.Compact)&&(g.params?k=`Params: ${Rt(g.params)} `:k=`No parameters provided. `),fe.log(`Sending notification '${g.method}'.`,k)}else Gt("send-notification",g)}i(ci,"traceSendingNotification"),o(ci,"traceSendingNotification");function Cr(g,k,D){if(!(J===m.Off||!fe))if(Ge===T.Text){let F;(J===m.Verbose||J===m.Compact)&&(g.error&&g.error.data?F=`Error data: ${Rt(g.error.data)} `:g.result?F=`Result: ${Rt(g.result)} `:g.error===void 0&&(F=`No result returned. `)),fe.log(`Sending response '${k} - (${g.id})'. Processing request took ${Date.now()-D}ms`,F)}else Gt("send-response",g)}i(Cr,"traceSendingResponse"),o(Cr,"traceSendingResponse");function fi(g){if(!(J===m.Off||!fe))if(Ge===T.Text){let k;(J===m.Verbose||J===m.Compact)&&g.params&&(k=`Params: ${Rt(g.params)} `),fe.log(`Received request '${g.method} - (${g.id})'.`,k)}else Gt("receive-request",g)}i(fi,"traceReceivedRequest"),o(fi,"traceReceivedRequest");function zr(g){if(!(J===m.Off||!fe||g.method===N.type.method))if(Ge===T.Text){let k;(J===m.Verbose||J===m.Compact)&&(g.params?k=`Params: ${Rt(g.params)} `:k=`No parameters provided. `),fe.log(`Received notification '${g.method}'.`,k)}else Gt("receive-notification",g)}i(zr,"traceReceivedNotification"),o(zr,"traceReceivedNotification");function di(g,k){if(!(J===m.Off||!fe))if(Ge===T.Text){let D;if((J===m.Verbose||J===m.Compact)&&(g.error&&g.error.data?D=`Error data: ${Rt(g.error.data)} `:g.result?D=`Result: ${Rt(g.result)} `:g.error===void 0&&(D=`No result returned. `)),k){let F=g.error?` Request failed: ${g.error.message} (${g.error.code}).`:"";fe.log(`Received response '${k.method} - (${g.id})' in ${Date.now()-k.timerStart}ms.${F}`,D)}else fe.log(`Received response ${g.id} without active response promise.`,D)}else Gt("receive-response",g)}i(di,"traceReceivedResponse"),o(di,"traceReceivedResponse");function Gt(g,k){if(!fe||J===m.Off)return;let D={isLSPMessage:!0,type:g,message:k,timestamp:Date.now()};fe.log(D)}i(Gt,"logLSPMessage"),o(Gt,"logLSPMessage");function tr(){if(Hn())throw new S(I.Closed,"Connection is closed.");if(Ft())throw new S(I.Disposed,"Connection is disposed.")}i(tr,"throwIfClosedOrDisposed"),o(tr,"throwIfClosedOrDisposed");function pi(){if(Vn())throw new S(I.AlreadyListening,"Connection is already listening")}i(pi,"throwIfListening"),o(pi,"throwIfListening");function hi(){if(!Vn())throw new Error("Call listen() first.")}i(hi,"throwIfNotListening"),o(hi,"throwIfNotListening");function rr(g){return g===void 0?null:g}i(rr,"undefinedToNull"),o(rr,"undefinedToNull");function Zn(g){if(g!==null)return g}i(Zn,"nullToUndefined"),o(Zn,"nullToUndefined");function h(g){return g!=null&&!Array.isArray(g)&&typeof g=="object"}i(h,"isNamedParam"),o(h,"isNamedParam");function ne(g,k){switch(g){case n.ParameterStructures.auto:return h(k)?Zn(k):[rr(k)];case n.ParameterStructures.byName:if(!h(k))throw new Error("Received parameters by name but param is not an object literal.");return Zn(k);case n.ParameterStructures.byPosition:return[rr(k)];default:throw new Error(`Unknown parameter structure ${g.toString()}`)}}i(ne,"computeSingleParam"),o(ne,"computeSingleParam");function Ae(g,k){let D,F=g.numberOfParams;switch(F){case 0:D=void 0;break;case 1:D=ne(g.parameterStructures,k[0]);break;default:D=[];for(let ge=0;ge{tr();let D,F;if(r.string(g)){D=g;let ue=k[0],be=0,Ne=n.ParameterStructures.auto;n.ParameterStructures.is(ue)&&(be=1,Ne=ue);let te=k.length,Ee=te-be;switch(Ee){case 0:F=void 0;break;case 1:F=ne(Ne,k[be]);break;default:if(Ne===n.ParameterStructures.byName)throw new Error(`Received ${Ee} parameters for 'by Name' notification parameter structure.`);F=k.slice(be,te).map(se=>rr(se));break}}else{let ue=k;D=g.method,F=Ae(g,ue)}let ge={jsonrpc:U,method:D,params:F};return ci(ge),E.write(ge).catch(ue=>{throw b.error("Sending notification failed."),ue})},"sendNotification"),onNotification:o((g,k)=>{tr();let D;return r.func(g)?H=g:k&&(r.string(g)?(D=g,Oe.set(g,{type:void 0,handler:k})):(D=g.method,Oe.set(g.method,{type:g,handler:k}))),{dispose:o(()=>{D!==void 0?Oe.delete(D):H=void 0},"dispose")}},"onNotification"),onProgress:o((g,k,D)=>{if(ie.has(k))throw new Error(`Progress handler for token ${k} already registered`);return ie.set(k,D),{dispose:o(()=>{ie.delete(k)},"dispose")}},"onProgress"),sendProgress:o((g,k,D)=>V.sendNotification(f.type,{token:k,value:D}),"sendProgress"),onUnhandledProgress:Xa.event,sendRequest:o((g,...k)=>{tr(),hi();let D,F,ge;if(r.string(g)){D=g;let te=k[0],Ee=k[k.length-1],se=0,De=n.ParameterStructures.auto;n.ParameterStructures.is(te)&&(se=1,De=te);let He=k.length;l.CancellationToken.is(Ee)&&(He=He-1,ge=Ee);let jt=He-se;switch(jt){case 0:F=void 0;break;case 1:F=ne(De,k[se]);break;default:if(De===n.ParameterStructures.byName)throw new Error(`Received ${jt} parameters for 'by Name' request parameter structure.`);F=k.slice(se,He).map(RS=>rr(RS));break}}else{let te=k;D=g.method,F=Ae(g,te);let Ee=g.numberOfParams;ge=l.CancellationToken.is(te[Ee])?te[Ee]:void 0}let ue=L++,be;ge&&(be=ge.onCancellationRequested(()=>{let te=St.sender.sendCancellation(V,ue);return te===void 0?(b.log(`Received no promise from cancellation strategy when cancelling id ${ue}`),Promise.resolve()):te.catch(()=>{b.log(`Sending cancellation messages for id ${ue} failed`)})}));let Ne={jsonrpc:U,id:ue,method:D,params:F};return ui(Ne),typeof St.sender.enableCancellation=="function"&&St.sender.enableCancellation(Ne),new Promise(async(te,Ee)=>{let se=o(jt=>{te(jt),St.sender.cleanup(ue),be?.dispose()},"resolveWithCleanup"),De=o(jt=>{Ee(jt),St.sender.cleanup(ue),be?.dispose()},"rejectWithCleanup"),He={method:D,timerStart:Date.now(),resolve:se,reject:De};try{await E.write(Ne),$e.set(ue,He)}catch(jt){throw b.error("Sending request failed."),He.reject(new n.ResponseError(n.ErrorCodes.MessageWriteError,jt.message?jt.message:"Unknown reason")),jt}})},"sendRequest"),onRequest:o((g,k)=>{tr();let D=null;return p.is(g)?(D=void 0,W=g):r.string(g)?(D=null,k!==void 0&&(D=g,le.set(g,{handler:k,type:void 0}))):k!==void 0&&(D=g.method,le.set(g.method,{type:g,handler:k})),{dispose:o(()=>{D!==null&&(D!==void 0?le.delete(D):W=void 0)},"dispose")}},"onRequest"),hasPendingResponse:o(()=>$e.size>0,"hasPendingResponse"),trace:o(async(g,k,D)=>{let F=!1,ge=T.Text;D!==void 0&&(r.boolean(D)?F=D:(F=D.sendNotification||!1,ge=D.traceFormat||T.Text)),J=g,Ge=ge,J===m.Off?fe=void 0:fe=k,F&&!Hn()&&!Ft()&&await V.sendNotification(w.type,{value:m.toString(g)})},"trace"),onError:qn.event,onClose:Ha.event,onUnhandledNotification:Ya.event,onDispose:Ja.event,end:o(()=>{E.end()},"end"),dispose:o(()=>{if(Ft())return;at=O.Disposed,Ja.fire(void 0);let g=new n.ResponseError(n.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let k of $e.values())k.reject(g);$e=new Map,Ie=new Map,ze=new Set,Ue=new a.LinkedMap,r.func(E.dispose)&&E.dispose(),r.func(y.dispose)&&y.dispose()},"dispose"),listen:o(()=>{tr(),pi(),at=O.Listening,y.listen(xs)},"listen"),inspect:o(()=>{(0,t.default)().console.log("inspect")},"inspect")};return V.onNotification(N.type,g=>{if(J===m.Off||!fe)return;let k=J===m.Verbose||J===m.Compact;fe.log(g.message,k?g.verbose:void 0)}),V.onNotification(f.type,g=>{let k=ie.get(g.token);k?k(g.value):Xa.fire(g)}),V}i(C,"createMessageConnection"),o(C,"createMessageConnection"),e.createMessageConnection=C}}),Vc=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=Tg();Object.defineProperty(e,"Message",{enumerable:!0,get:o(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:o(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:o(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:o(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:o(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:o(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:o(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:o(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:o(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:o(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:o(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:o(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:o(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:o(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:o(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:o(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:o(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:o(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:o(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:o(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:o(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:o(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:o(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:o(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:o(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:o(function(){return t.ParameterStructures},"get")});var r=$g();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:o(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:o(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:o(function(){return r.Touch},"get")});var n=bS();Object.defineProperty(e,"Disposable",{enumerable:!0,get:o(function(){return n.Disposable},"get")});var a=Fa();Object.defineProperty(e,"Event",{enumerable:!0,get:o(function(){return a.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:o(function(){return a.Emitter},"get")});var s=yl();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:o(function(){return s.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:o(function(){return s.CancellationToken},"get")});var l=SS();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:o(function(){return l.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:o(function(){return l.SharedArrayReceiverStrategy},"get")});var u=wS();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:o(function(){return u.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:o(function(){return u.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:o(function(){return u.ReadableStreamMessageReader},"get")});var c=IS();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:o(function(){return c.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:o(function(){return c.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:o(function(){return c.WriteableStreamMessageWriter},"get")});var f=NS();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:o(function(){return f.AbstractMessageBuffer},"get")});var d=kS();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:o(function(){return d.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:o(function(){return d.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:o(function(){return d.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:o(function(){return d.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:o(function(){return d.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:o(function(){return d.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:o(function(){return d.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:o(function(){return d.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:o(function(){return d.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:o(function(){return d.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:o(function(){return d.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:o(function(){return d.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:o(function(){return d.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:o(function(){return d.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:o(function(){return d.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:o(function(){return d.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:o(function(){return d.MessageStrategy},"get")});var p=_n();e.RAL=p.default}}),PS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Vc(),r=class _g extends t.AbstractMessageBuffer{static{i(this,"_MessageBuffer")}static{o(this,"MessageBuffer")}constructor(f="utf-8"){super(f),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return _g.emptyBuffer}fromString(f,d){return new TextEncoder().encode(f)}toString(f,d){return d==="ascii"?this.asciiDecoder.decode(f):new TextDecoder(d).decode(f)}asNative(f,d){return d===void 0?f:f.slice(0,d)}allocNative(f){return new Uint8Array(f)}};r.emptyBuffer=new Uint8Array(0);var n=class{static{i(this,"ReadableStreamWrapper")}static{o(this,"ReadableStreamWrapper")}constructor(c){this.socket=c,this._onData=new t.Emitter,this._messageListener=f=>{f.data.arrayBuffer().then(p=>{this._onData.fire(new Uint8Array(p))},()=>{(0,t.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(c){return this.socket.addEventListener("close",c),t.Disposable.create(()=>this.socket.removeEventListener("close",c))}onError(c){return this.socket.addEventListener("error",c),t.Disposable.create(()=>this.socket.removeEventListener("error",c))}onEnd(c){return this.socket.addEventListener("end",c),t.Disposable.create(()=>this.socket.removeEventListener("end",c))}onData(c){return this._onData.event(c)}},a=class{static{i(this,"WritableStreamWrapper")}static{o(this,"WritableStreamWrapper")}constructor(c){this.socket=c}onClose(c){return this.socket.addEventListener("close",c),t.Disposable.create(()=>this.socket.removeEventListener("close",c))}onError(c){return this.socket.addEventListener("error",c),t.Disposable.create(()=>this.socket.removeEventListener("error",c))}onEnd(c){return this.socket.addEventListener("end",c),t.Disposable.create(()=>this.socket.removeEventListener("end",c))}write(c,f){if(typeof c=="string"){if(f!==void 0&&f!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${f}`);this.socket.send(c)}else this.socket.send(c);return Promise.resolve()}end(){this.socket.close()}},s=new TextEncoder,l=Object.freeze({messageBuffer:Object.freeze({create:o(c=>new r(c),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:o((c,f)=>{if(f.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${f.charset}`);return Promise.resolve(s.encode(JSON.stringify(c,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:o((c,f)=>{if(!(c instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(f.charset).decode(c)))},"decode")})}),stream:Object.freeze({asReadableStream:o(c=>new n(c),"asReadableStream"),asWritableStream:o(c=>new a(c),"asWritableStream")}),console,timer:Object.freeze({setTimeout(c,f,...d){let p=setTimeout(c,f,...d);return{dispose:o(()=>clearTimeout(p),"dispose")}},setImmediate(c,...f){let d=setTimeout(c,0,...f);return{dispose:o(()=>clearTimeout(d),"dispose")}},setInterval(c,f,...d){let p=setInterval(c,f,...d);return{dispose:o(()=>clearInterval(p),"dispose")}}})});function u(){return l}i(u,"RIL"),o(u,"RIL"),(function(c){function f(){t.RAL.install(l)}i(f,"install"),o(f,"install"),c.install=f})(u||(u={})),e.default=u}}),Ga=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(c,f,d,p){p===void 0&&(p=d);var m=Object.getOwnPropertyDescriptor(f,d);(!m||("get"in m?!f.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:o(function(){return f[d]},"get")}),Object.defineProperty(c,p,m)}):(function(c,f,d,p){p===void 0&&(p=d),c[p]=f[d]})),r=e&&e.__exportStar||function(c,f){for(var d in c)d!=="default"&&!Object.prototype.hasOwnProperty.call(f,d)&&t(f,c,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0;var n=PS();n.default.install();var a=Vc();r(Vc(),e);var s=class extends a.AbstractMessageReader{static{i(this,"BrowserMessageReader")}static{o(this,"BrowserMessageReader")}constructor(c){super(),this._onData=new a.Emitter,this._messageListener=f=>{this._onData.fire(f.data)},c.addEventListener("error",f=>this.fireError(f)),c.onmessage=this._messageListener}listen(c){return this._onData.event(c)}};e.BrowserMessageReader=s;var l=class extends a.AbstractMessageWriter{static{i(this,"BrowserMessageWriter")}static{o(this,"BrowserMessageWriter")}constructor(c){super(),this.port=c,this.errorCount=0,c.addEventListener("error",f=>this.fireError(f))}write(c){try{return this.port.postMessage(c),Promise.resolve()}catch(f){return this.handleError(f,c),Promise.reject(f)}}handleError(c,f){this.errorCount++,this.fireError(c,f,this.errorCount)}end(){}};e.BrowserMessageWriter=l;function u(c,f,d,p){return d===void 0&&(d=a.NullLogger),a.ConnectionStrategy.is(p)&&(p={connectionStrategy:p}),(0,a.createMessageConnection)(c,f,d,p)}i(u,"createMessageConnection"),o(u,"createMessageConnection"),e.createMessageConnection=u}}),kh=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){"use strict";t.exports=Ga()}}),Ce=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=Ga(),r;(function(c){c.clientToServer="clientToServer",c.serverToClient="serverToClient",c.both="both"})(r||(e.MessageDirection=r={}));var n=class{static{i(this,"RegistrationType")}static{o(this,"RegistrationType")}constructor(c){this.method=c}};e.RegistrationType=n;var a=class extends t.RequestType0{static{i(this,"ProtocolRequestType0")}static{o(this,"ProtocolRequestType0")}constructor(c){super(c)}};e.ProtocolRequestType0=a;var s=class extends t.RequestType{static{i(this,"ProtocolRequestType")}static{o(this,"ProtocolRequestType")}constructor(c){super(c,t.ParameterStructures.byName)}};e.ProtocolRequestType=s;var l=class extends t.NotificationType0{static{i(this,"ProtocolNotificationType0")}static{o(this,"ProtocolNotificationType0")}constructor(c){super(c)}};e.ProtocolNotificationType0=l;var u=class extends t.NotificationType{static{i(this,"ProtocolNotificationType")}static{o(this,"ProtocolNotificationType")}constructor(c){super(c,t.ParameterStructures.byName)}};e.ProtocolNotificationType=u}}),Wf=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(d){return d===!0||d===!1}i(t,"boolean"),o(t,"boolean"),e.boolean=t;function r(d){return typeof d=="string"||d instanceof String}i(r,"string"),o(r,"string"),e.string=r;function n(d){return typeof d=="number"||d instanceof Number}i(n,"number"),o(n,"number"),e.number=n;function a(d){return d instanceof Error}i(a,"error"),o(a,"error"),e.error=a;function s(d){return typeof d=="function"}i(s,"func"),o(s,"func"),e.func=s;function l(d){return Array.isArray(d)}i(l,"array"),o(l,"array"),e.array=l;function u(d){return l(d)&&d.every(p=>r(p))}i(u,"stringArray"),o(u,"stringArray"),e.stringArray=u;function c(d,p){return Array.isArray(d)&&d.every(p)}i(c,"typedArray"),o(c,"typedArray"),e.typedArray=c;function f(d){return d!==null&&typeof d=="object"}i(f,"objectLiteral"),o(f,"objectLiteral"),e.objectLiteral=f}}),OS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=Ce(),r;(function(n){n.method="textDocument/implementation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ImplementationRequest=r={}))}}),LS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=Ce(),r;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.TypeDefinitionRequest=r={}))}}),DS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t=Ce(),r;(function(a){a.method="workspace/workspaceFolders",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)})(r||(e.WorkspaceFoldersRequest=r={}));var n;(function(a){a.method="workspace/didChangeWorkspaceFolders",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolNotificationType(a.method)})(n||(e.DidChangeWorkspaceFoldersNotification=n={}))}}),MS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=Ce(),r;(function(n){n.method="workspace/configuration",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ConfigurationRequest=r={}))}}),xS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t=Ce(),r;(function(a){a.method="textDocument/documentColor",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.DocumentColorRequest=r={}));var n;(function(a){a.method="textDocument/colorPresentation",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.ColorPresentationRequest=n={}))}}),FS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t=Ce(),r;(function(a){a.method="textDocument/foldingRange",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.FoldingRangeRequest=r={}));var n;(function(a){a.method="workspace/foldingRange/refresh",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)})(n||(e.FoldingRangeRefreshRequest=n={}))}}),GS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=Ce(),r;(function(n){n.method="textDocument/declaration",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.DeclarationRequest=r={}))}}),jS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=Ce(),r;(function(n){n.method="textDocument/selectionRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.SelectionRangeRequest=r={}))}}),US=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t=Ga(),r=Ce(),n;(function(l){l.type=new t.ProgressType;function u(c){return c===l.type}i(u,"is"),o(u,"is"),l.is=u})(n||(e.WorkDoneProgress=n={}));var a;(function(l){l.method="window/workDoneProgress/create",l.messageDirection=r.MessageDirection.serverToClient,l.type=new r.ProtocolRequestType(l.method)})(a||(e.WorkDoneProgressCreateRequest=a={}));var s;(function(l){l.method="window/workDoneProgress/cancel",l.messageDirection=r.MessageDirection.clientToServer,l.type=new r.ProtocolNotificationType(l.method)})(s||(e.WorkDoneProgressCancelNotification=s={}))}}),zS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t=Ce(),r;(function(s){s.method="textDocument/prepareCallHierarchy",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(r||(e.CallHierarchyPrepareRequest=r={}));var n;(function(s){s.method="callHierarchy/incomingCalls",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(n||(e.CallHierarchyIncomingCallsRequest=n={}));var a;(function(s){s.method="callHierarchy/outgoingCalls",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(a||(e.CallHierarchyOutgoingCallsRequest=a={}))}}),BS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t=Ce(),r;(function(c){c.Relative="relative"})(r||(e.TokenFormat=r={}));var n;(function(c){c.method="textDocument/semanticTokens",c.type=new t.RegistrationType(c.method)})(n||(e.SemanticTokensRegistrationType=n={}));var a;(function(c){c.method="textDocument/semanticTokens/full",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method),c.registrationMethod=n.method})(a||(e.SemanticTokensRequest=a={}));var s;(function(c){c.method="textDocument/semanticTokens/full/delta",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method),c.registrationMethod=n.method})(s||(e.SemanticTokensDeltaRequest=s={}));var l;(function(c){c.method="textDocument/semanticTokens/range",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method),c.registrationMethod=n.method})(l||(e.SemanticTokensRangeRequest=l={}));var u;(function(c){c.method="workspace/semanticTokens/refresh",c.messageDirection=t.MessageDirection.serverToClient,c.type=new t.ProtocolRequestType0(c.method)})(u||(e.SemanticTokensRefreshRequest=u={}))}}),KS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=Ce(),r;(function(n){n.method="window/showDocument",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ShowDocumentRequest=r={}))}}),qS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=Ce(),r;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.LinkedEditingRangeRequest=r={}))}}),WS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t=Ce(),r;(function(f){f.file="file",f.folder="folder"})(r||(e.FileOperationPatternKind=r={}));var n;(function(f){f.method="workspace/willCreateFiles",f.messageDirection=t.MessageDirection.clientToServer,f.type=new t.ProtocolRequestType(f.method)})(n||(e.WillCreateFilesRequest=n={}));var a;(function(f){f.method="workspace/didCreateFiles",f.messageDirection=t.MessageDirection.clientToServer,f.type=new t.ProtocolNotificationType(f.method)})(a||(e.DidCreateFilesNotification=a={}));var s;(function(f){f.method="workspace/willRenameFiles",f.messageDirection=t.MessageDirection.clientToServer,f.type=new t.ProtocolRequestType(f.method)})(s||(e.WillRenameFilesRequest=s={}));var l;(function(f){f.method="workspace/didRenameFiles",f.messageDirection=t.MessageDirection.clientToServer,f.type=new t.ProtocolNotificationType(f.method)})(l||(e.DidRenameFilesNotification=l={}));var u;(function(f){f.method="workspace/didDeleteFiles",f.messageDirection=t.MessageDirection.clientToServer,f.type=new t.ProtocolNotificationType(f.method)})(u||(e.DidDeleteFilesNotification=u={}));var c;(function(f){f.method="workspace/willDeleteFiles",f.messageDirection=t.MessageDirection.clientToServer,f.type=new t.ProtocolRequestType(f.method)})(c||(e.WillDeleteFilesRequest=c={}))}}),VS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=Ce(),r;(function(s){s.document="document",s.project="project",s.group="group",s.scheme="scheme",s.global="global"})(r||(e.UniquenessLevel=r={}));var n;(function(s){s.$import="import",s.$export="export",s.local="local"})(n||(e.MonikerKind=n={}));var a;(function(s){s.method="textDocument/moniker",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(a||(e.MonikerRequest=a={}))}}),HS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=Ce(),r;(function(s){s.method="textDocument/prepareTypeHierarchy",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(r||(e.TypeHierarchyPrepareRequest=r={}));var n;(function(s){s.method="typeHierarchy/supertypes",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(n||(e.TypeHierarchySupertypesRequest=n={}));var a;(function(s){s.method="typeHierarchy/subtypes",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(a||(e.TypeHierarchySubtypesRequest=a={}))}}),YS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t=Ce(),r;(function(a){a.method="textDocument/inlineValue",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.InlineValueRequest=r={}));var n;(function(a){a.method="workspace/inlineValue/refresh",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)})(n||(e.InlineValueRefreshRequest=n={}))}}),XS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t=Ce(),r;(function(s){s.method="textDocument/inlayHint",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(r||(e.InlayHintRequest=r={}));var n;(function(s){s.method="inlayHint/resolve",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(n||(e.InlayHintResolveRequest=n={}));var a;(function(s){s.method="workspace/inlayHint/refresh",s.messageDirection=t.MessageDirection.serverToClient,s.type=new t.ProtocolRequestType0(s.method)})(a||(e.InlayHintRefreshRequest=a={}))}}),JS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t=Ga(),r=Wf(),n=Ce(),a;(function(f){function d(p){let m=p;return m&&r.boolean(m.retriggerRequest)}i(d,"is"),o(d,"is"),f.is=d})(a||(e.DiagnosticServerCancellationData=a={}));var s;(function(f){f.Full="full",f.Unchanged="unchanged"})(s||(e.DocumentDiagnosticReportKind=s={}));var l;(function(f){f.method="textDocument/diagnostic",f.messageDirection=n.MessageDirection.clientToServer,f.type=new n.ProtocolRequestType(f.method),f.partialResult=new t.ProgressType})(l||(e.DocumentDiagnosticRequest=l={}));var u;(function(f){f.method="workspace/diagnostic",f.messageDirection=n.MessageDirection.clientToServer,f.type=new n.ProtocolRequestType(f.method),f.partialResult=new t.ProgressType})(u||(e.WorkspaceDiagnosticRequest=u={}));var c;(function(f){f.method="workspace/diagnostic/refresh",f.messageDirection=n.MessageDirection.serverToClient,f.type=new n.ProtocolRequestType0(f.method)})(c||(e.DiagnosticRefreshRequest=c={}))}}),ZS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var t=(ys(),qf(gl)),r=Wf(),n=Ce(),a;(function(T){T.Markup=1,T.Code=2;function w(N){return N===1||N===2}i(w,"is"),o(w,"is"),T.is=w})(a||(e.NotebookCellKind=a={}));var s;(function(T){function w(S,_){let P={executionOrder:S};return(_===!0||_===!1)&&(P.success=_),P}i(w,"create"),o(w,"create"),T.create=w;function N(S){let _=S;return r.objectLiteral(_)&&t.uinteger.is(_.executionOrder)&&(_.success===void 0||r.boolean(_.success))}i(N,"is"),o(N,"is"),T.is=N;function I(S,_){return S===_?!0:S==null||_===null||_===void 0?!1:S.executionOrder===_.executionOrder&&S.success===_.success}i(I,"equals"),o(I,"equals"),T.equals=I})(s||(e.ExecutionSummary=s={}));var l;(function(T){function w(_,P){return{kind:_,document:P}}i(w,"create"),o(w,"create"),T.create=w;function N(_){let P=_;return r.objectLiteral(P)&&a.is(P.kind)&&t.DocumentUri.is(P.document)&&(P.metadata===void 0||r.objectLiteral(P.metadata))}i(N,"is"),o(N,"is"),T.is=N;function I(_,P){let j=new Set;return _.document!==P.document&&j.add("document"),_.kind!==P.kind&&j.add("kind"),_.executionSummary!==P.executionSummary&&j.add("executionSummary"),(_.metadata!==void 0||P.metadata!==void 0)&&!S(_.metadata,P.metadata)&&j.add("metadata"),(_.executionSummary!==void 0||P.executionSummary!==void 0)&&!s.equals(_.executionSummary,P.executionSummary)&&j.add("executionSummary"),j}i(I,"diff"),o(I,"diff"),T.diff=I;function S(_,P){if(_===P)return!0;if(_==null||P===null||P===void 0||typeof _!=typeof P||typeof _!="object")return!1;let j=Array.isArray(_),ee=Array.isArray(P);if(j!==ee)return!1;if(j&&ee){if(_.length!==P.length)return!1;for(let X=0;X<_.length;X++)if(!S(_[X],P[X]))return!1}if(r.objectLiteral(_)&&r.objectLiteral(P)){let X=Object.keys(_),ce=Object.keys(P);if(X.length!==ce.length||(X.sort(),ce.sort(),!S(X,ce)))return!1;for(let me=0;me0}i(ne,"hasId"),o(ne,"hasId"),h.hasId=ne})(L||(e.StaticRegistrationOptions=L={}));var x;(function(h){function ne(Ae){let V=Ae;return V&&(V.documentSelector===null||C.is(V.documentSelector))}i(ne,"is"),o(ne,"is"),h.is=ne})(x||(e.TextDocumentRegistrationOptions=x={}));var M;(function(h){function ne(V){let g=V;return n.objectLiteral(g)&&(g.workDoneProgress===void 0||n.boolean(g.workDoneProgress))}i(ne,"is"),o(ne,"is"),h.is=ne;function Ae(V){let g=V;return g&&n.boolean(g.workDoneProgress)}i(Ae,"hasWorkDoneProgress"),o(Ae,"hasWorkDoneProgress"),h.hasWorkDoneProgress=Ae})(M||(e.WorkDoneProgressOptions=M={}));var U;(function(h){h.method="initialize",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(U||(e.InitializeRequest=U={}));var W;(function(h){h.unknownProtocolVersion=1})(W||(e.InitializeErrorCodes=W={}));var le;(function(h){h.method="initialized",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(le||(e.InitializedNotification=le={}));var H;(function(h){h.method="shutdown",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType0(h.method)})(H||(e.ShutdownRequest=H={}));var Oe;(function(h){h.method="exit",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType0(h.method)})(Oe||(e.ExitNotification=Oe={}));var ie;(function(h){h.method="workspace/didChangeConfiguration",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(ie||(e.DidChangeConfigurationNotification=ie={}));var Le;(function(h){h.Error=1,h.Warning=2,h.Info=3,h.Log=4,h.Debug=5})(Le||(e.MessageType=Le={}));var Ue;(function(h){h.method="window/showMessage",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolNotificationType(h.method)})(Ue||(e.ShowMessageNotification=Ue={}));var $e;(function(h){h.method="window/showMessageRequest",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolRequestType(h.method)})($e||(e.ShowMessageRequest=$e={}));var ze;(function(h){h.method="window/logMessage",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolNotificationType(h.method)})(ze||(e.LogMessageNotification=ze={}));var Ie;(function(h){h.method="telemetry/event",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolNotificationType(h.method)})(Ie||(e.TelemetryEventNotification=Ie={}));var J;(function(h){h.None=0,h.Full=1,h.Incremental=2})(J||(e.TextDocumentSyncKind=J={}));var Ge;(function(h){h.method="textDocument/didOpen",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(Ge||(e.DidOpenTextDocumentNotification=Ge={}));var fe;(function(h){function ne(V){let g=V;return g!=null&&typeof g.text=="string"&&g.range!==void 0&&(g.rangeLength===void 0||typeof g.rangeLength=="number")}i(ne,"isIncremental"),o(ne,"isIncremental"),h.isIncremental=ne;function Ae(V){let g=V;return g!=null&&typeof g.text=="string"&&g.range===void 0&&g.rangeLength===void 0}i(Ae,"isFull"),o(Ae,"isFull"),h.isFull=Ae})(fe||(e.TextDocumentContentChangeEvent=fe={}));var at;(function(h){h.method="textDocument/didChange",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(at||(e.DidChangeTextDocumentNotification=at={}));var qn;(function(h){h.method="textDocument/didClose",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(qn||(e.DidCloseTextDocumentNotification=qn={}));var Ha;(function(h){h.method="textDocument/didSave",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(Ha||(e.DidSaveTextDocumentNotification=Ha={}));var Ya;(function(h){h.Manual=1,h.AfterDelay=2,h.FocusOut=3})(Ya||(e.TextDocumentSaveReason=Ya={}));var Xa;(function(h){h.method="textDocument/willSave",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(Xa||(e.WillSaveTextDocumentNotification=Xa={}));var Ja;(function(h){h.method="textDocument/willSaveWaitUntil",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Ja||(e.WillSaveTextDocumentWaitUntilRequest=Ja={}));var St;(function(h){h.method="workspace/didChangeWatchedFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(St||(e.DidChangeWatchedFilesNotification=St={}));var Wn;(function(h){h.Created=1,h.Changed=2,h.Deleted=3})(Wn||(e.FileChangeType=Wn={}));var Za;(function(h){function ne(Ae){let V=Ae;return n.objectLiteral(V)&&(r.URI.is(V.baseUri)||r.WorkspaceFolder.is(V.baseUri))&&n.string(V.pattern)}i(ne,"is"),o(ne,"is"),h.is=ne})(Za||(e.RelativePattern=Za={}));var Qa;(function(h){h.Create=1,h.Change=2,h.Delete=4})(Qa||(e.WatchKind=Qa={}));var ei;(function(h){h.method="textDocument/publishDiagnostics",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolNotificationType(h.method)})(ei||(e.PublishDiagnosticsNotification=ei={}));var ti;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.TriggerForIncompleteCompletions=3})(ti||(e.CompletionTriggerKind=ti={}));var Vn;(function(h){h.method="textDocument/completion",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Vn||(e.CompletionRequest=Vn={}));var Hn;(function(h){h.method="completionItem/resolve",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Hn||(e.CompletionResolveRequest=Hn={}));var Ft;(function(h){h.method="textDocument/hover",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Ft||(e.HoverRequest=Ft={}));var Yn;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.ContentChange=3})(Yn||(e.SignatureHelpTriggerKind=Yn={}));var ri;(function(h){h.method="textDocument/signatureHelp",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(ri||(e.SignatureHelpRequest=ri={}));var ni;(function(h){h.method="textDocument/definition",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(ni||(e.DefinitionRequest=ni={}));var Xn;(function(h){h.method="textDocument/references",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Xn||(e.ReferencesRequest=Xn={}));var Jn;(function(h){h.method="textDocument/documentHighlight",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Jn||(e.DocumentHighlightRequest=Jn={}));var ai;(function(h){h.method="textDocument/documentSymbol",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(ai||(e.DocumentSymbolRequest=ai={}));var xs;(function(h){h.method="textDocument/codeAction",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(xs||(e.CodeActionRequest=xs={}));var ii;(function(h){h.method="codeAction/resolve",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(ii||(e.CodeActionResolveRequest=ii={}));var si;(function(h){h.method="workspace/symbol",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(si||(e.WorkspaceSymbolRequest=si={}));var oi;(function(h){h.method="workspaceSymbol/resolve",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(oi||(e.WorkspaceSymbolResolveRequest=oi={}));var li;(function(h){h.method="textDocument/codeLens",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(li||(e.CodeLensRequest=li={}));var Rt;(function(h){h.method="codeLens/resolve",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Rt||(e.CodeLensResolveRequest=Rt={}));var ui;(function(h){h.method="workspace/codeLens/refresh",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolRequestType0(h.method)})(ui||(e.CodeLensRefreshRequest=ui={}));var ci;(function(h){h.method="textDocument/documentLink",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(ci||(e.DocumentLinkRequest=ci={}));var Cr;(function(h){h.method="documentLink/resolve",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Cr||(e.DocumentLinkResolveRequest=Cr={}));var fi;(function(h){h.method="textDocument/formatting",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(fi||(e.DocumentFormattingRequest=fi={}));var zr;(function(h){h.method="textDocument/rangeFormatting",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(zr||(e.DocumentRangeFormattingRequest=zr={}));var di;(function(h){h.method="textDocument/rangesFormatting",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(di||(e.DocumentRangesFormattingRequest=di={}));var Gt;(function(h){h.method="textDocument/onTypeFormatting",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Gt||(e.DocumentOnTypeFormattingRequest=Gt={}));var tr;(function(h){h.Identifier=1})(tr||(e.PrepareSupportDefaultBehavior=tr={}));var pi;(function(h){h.method="textDocument/rename",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(pi||(e.RenameRequest=pi={}));var hi;(function(h){h.method="textDocument/prepareRename",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(hi||(e.PrepareRenameRequest=hi={}));var rr;(function(h){h.method="workspace/executeCommand",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(rr||(e.ExecuteCommandRequest=rr={}));var Zn;(function(h){h.method="workspace/applyEdit",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolRequestType("workspace/applyEdit")})(Zn||(e.ApplyWorkspaceEditRequest=Zn={}))}}),tw=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=Ga();function r(n,a,s,l){return t.ConnectionStrategy.is(l)&&(l={connectionStrategy:l}),(0,t.createMessageConnection)(n,a,s,l)}i(r,"createProtocolConnection"),o(r,"createProtocolConnection"),e.createProtocolConnection=r}}),rw=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(s,l,u,c){c===void 0&&(c=u);var f=Object.getOwnPropertyDescriptor(l,u);(!f||("get"in f?!l.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:o(function(){return l[u]},"get")}),Object.defineProperty(s,c,f)}):(function(s,l,u,c){c===void 0&&(c=u),s[c]=l[u]})),r=e&&e.__exportStar||function(s,l){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&t(l,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,r(Ga(),e),r((ys(),qf(gl)),e),r(Ce(),e),r(ew(),e);var n=tw();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:o(function(){return n.createProtocolConnection},"get")});var a;(function(s){s.lspReservedErrorRangeStart=-32899,s.RequestFailed=-32803,s.ServerCancelled=-32802,s.ContentModified=-32801,s.RequestCancelled=-32800,s.lspReservedErrorRangeEnd=-32800})(a||(e.LSPErrorCodes=a={}))}}),nw=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(s,l,u,c){c===void 0&&(c=u);var f=Object.getOwnPropertyDescriptor(l,u);(!f||("get"in f?!l.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:o(function(){return l[u]},"get")}),Object.defineProperty(s,c,f)}):(function(s,l,u,c){c===void 0&&(c=u),s[c]=l[u]})),r=e&&e.__exportStar||function(s,l){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&t(l,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=kh();r(kh(),e),r(rw(),e);function a(s,l,u,c){return(0,n.createMessageConnection)(s,l,u,c)}i(a,"createProtocolConnection"),o(a,"createProtocolConnection"),e.createProtocolConnection=a}}),Cg={};xr(Cg,{AbstractAstReflection:i(()=>Yf,"AbstractAstReflection"),AbstractCstNode:i(()=>Jp,"AbstractCstNode"),AbstractLangiumParser:i(()=>Qp,"AbstractLangiumParser"),AbstractParserErrorMessageProvider:i(()=>hb,"AbstractParserErrorMessageProvider"),AbstractThreadedAsyncParser:i(()=>P1,"AbstractThreadedAsyncParser"),AstUtils:i(()=>Xf,"AstUtils"),BiMap:i(()=>cl,"BiMap"),Cancellation:i(()=>pe,"Cancellation"),CompositeCstNodeImpl:i(()=>pu,"CompositeCstNodeImpl"),ContextCache:i(()=>Ru,"ContextCache"),CstNodeBuilder:i(()=>cb,"CstNodeBuilder"),CstUtils:i(()=>Vf,"CstUtils"),DEFAULT_TOKENIZE_OPTIONS:i(()=>yh,"DEFAULT_TOKENIZE_OPTIONS"),DONE_RESULT:i(()=>Ye,"DONE_RESULT"),DatatypeSymbol:i(()=>sl,"DatatypeSymbol"),DefaultAstNodeDescriptionProvider:i(()=>Kb,"DefaultAstNodeDescriptionProvider"),DefaultAstNodeLocator:i(()=>Wb,"DefaultAstNodeLocator"),DefaultAsyncParser:i(()=>cS,"DefaultAsyncParser"),DefaultCommentProvider:i(()=>uS,"DefaultCommentProvider"),DefaultConfigurationProvider:i(()=>Vb,"DefaultConfigurationProvider"),DefaultDocumentBuilder:i(()=>Hb,"DefaultDocumentBuilder"),DefaultDocumentValidator:i(()=>Bb,"DefaultDocumentValidator"),DefaultHydrator:i(()=>dS,"DefaultHydrator"),DefaultIndexManager:i(()=>Yb,"DefaultIndexManager"),DefaultJsonSerializer:i(()=>Gb,"DefaultJsonSerializer"),DefaultLangiumDocumentFactory:i(()=>Nb,"DefaultLangiumDocumentFactory"),DefaultLangiumDocuments:i(()=>kb,"DefaultLangiumDocuments"),DefaultLangiumProfiler:i(()=>x1,"DefaultLangiumProfiler"),DefaultLexer:i(()=>vh,"DefaultLexer"),DefaultLexerErrorMessageProvider:i(()=>Jb,"DefaultLexerErrorMessageProvider"),DefaultLinker:i(()=>Pb,"DefaultLinker"),DefaultNameProvider:i(()=>Ob,"DefaultNameProvider"),DefaultReferenceDescriptionProvider:i(()=>qb,"DefaultReferenceDescriptionProvider"),DefaultReferences:i(()=>Lb,"DefaultReferences"),DefaultScopeComputation:i(()=>Db,"DefaultScopeComputation"),DefaultScopeProvider:i(()=>Fb,"DefaultScopeProvider"),DefaultServiceRegistry:i(()=>jb,"DefaultServiceRegistry"),DefaultTokenBuilder:i(()=>gu,"DefaultTokenBuilder"),DefaultValueConverter:i(()=>sh,"DefaultValueConverter"),DefaultWorkspaceLock:i(()=>fS,"DefaultWorkspaceLock"),DefaultWorkspaceManager:i(()=>Xb,"DefaultWorkspaceManager"),Deferred:i(()=>Tr,"Deferred"),Disposable:i(()=>Tn,"Disposable"),DisposableCache:i(()=>Tu,"DisposableCache"),DocumentCache:i(()=>xb,"DocumentCache"),DocumentState:i(()=>Z,"DocumentState"),DocumentValidator:i(()=>$t,"DocumentValidator"),EMPTY_SCOPE:i(()=>w1,"EMPTY_SCOPE"),EMPTY_STREAM:i(()=>ba,"EMPTY_STREAM"),EmptyFileSystem:i(()=>gS,"EmptyFileSystem"),EmptyFileSystemProvider:i(()=>mS,"EmptyFileSystemProvider"),ErrorWithLocation:i(()=>bl,"ErrorWithLocation"),GrammarAST:i(()=>wg,"GrammarAST"),GrammarUtils:i(()=>bd,"GrammarUtils"),IndentationAwareLexer:i(()=>L1,"IndentationAwareLexer"),IndentationAwareTokenBuilder:i(()=>hS,"IndentationAwareTokenBuilder"),JSDocDocumentationProvider:i(()=>lS,"JSDocDocumentationProvider"),LangiumCompletionParser:i(()=>mb,"LangiumCompletionParser"),LangiumParser:i(()=>pb,"LangiumParser"),LangiumParserErrorMessageProvider:i(()=>eh,"LangiumParserErrorMessageProvider"),LeafCstNodeImpl:i(()=>il,"LeafCstNodeImpl"),LexingMode:i(()=>yn,"LexingMode"),MapScope:i(()=>S1,"MapScope"),Module:i(()=>Nf,"Module"),MultiMap:i(()=>Rr,"MultiMap"),MultiMapScope:i(()=>Mb,"MultiMapScope"),OperationCancelled:i(()=>Vt,"OperationCancelled"),ParserWorker:i(()=>O1,"ParserWorker"),ProfilingTask:i(()=>vS,"ProfilingTask"),Reduction:i(()=>es,"Reduction"),RefResolving:i(()=>Zr,"RefResolving"),RegExpUtils:i(()=>wd,"RegExpUtils"),RootCstNodeImpl:i(()=>Zp,"RootCstNodeImpl"),SimpleCache:i(()=>dh,"SimpleCache"),StreamImpl:i(()=>Wt,"StreamImpl"),StreamScope:i(()=>bf,"StreamScope"),TextDocument:i(()=>ll,"TextDocument"),TreeStreamImpl:i(()=>Sa,"TreeStreamImpl"),URI:i(()=>dt,"URI"),UriTrie:i(()=>ch,"UriTrie"),UriUtils:i(()=>Je,"UriUtils"),VALIDATE_EACH_NODE:i(()=>zb,"VALIDATE_EACH_NODE"),ValidationCategory:i(()=>fl,"ValidationCategory"),ValidationRegistry:i(()=>Ub,"ValidationRegistry"),ValueConverter:i(()=>Kt,"ValueConverter"),WorkspaceCache:i(()=>ph,"WorkspaceCache"),assertCondition:i(()=>Sd,"assertCondition"),assertUnreachable:i(()=>Fr,"assertUnreachable"),createCompletionParser:i(()=>nh,"createCompletionParser"),createDefaultCoreModule:i(()=>Ch,"createDefaultCoreModule"),createDefaultSharedCoreModule:i(()=>bh,"createDefaultSharedCoreModule"),createGrammarConfig:i(()=>Wd,"createGrammarConfig"),createLangiumParser:i(()=>ah,"createLangiumParser"),createParser:i(()=>hu,"createParser"),delayNextTick:i(()=>yu,"delayNextTick"),diagnosticData:i(()=>gn,"diagnosticData"),eagerLoad:i(()=>Sh,"eagerLoad"),getDiagnosticRange:i(()=>mh,"getDiagnosticRange"),indentationBuilderDefaultOptions:i(()=>Pf,"indentationBuilderDefaultOptions"),inject:i(()=>hl,"inject"),interruptAndCheck:i(()=>je,"interruptAndCheck"),isAstNode:i(()=>Pe,"isAstNode"),isAstNodeDescription:i(()=>Hf,"isAstNodeDescription"),isAstNodeWithComment:i(()=>hh,"isAstNodeWithComment"),isCompositeCstNode:i(()=>fr,"isCompositeCstNode"),isIMultiModeLexerDefinition:i(()=>Eu,"isIMultiModeLexerDefinition"),isJSDoc:i(()=>Rh,"isJSDoc"),isLeafCstNode:i(()=>Cn,"isLeafCstNode"),isLinkingError:i(()=>tn,"isLinkingError"),isMultiReference:i(()=>Ht,"isMultiReference"),isNamed:i(()=>fh,"isNamed"),isOperationCancelled:i(()=>Kn,"isOperationCancelled"),isReference:i(()=>Xe,"isReference"),isRootCstNode:i(()=>vl,"isRootCstNode"),isTokenTypeArray:i(()=>Au,"isTokenTypeArray"),isTokenTypeDictionary:i(()=>dl,"isTokenTypeDictionary"),loadGrammarFromJson:i(()=>vt,"loadGrammarFromJson"),parseJSDoc:i(()=>Th,"parseJSDoc"),prepareLangiumParser:i(()=>ih,"prepareLangiumParser"),setInterruptionPeriod:i(()=>oh,"setInterruptionPeriod"),startCancelableOperation:i(()=>vu,"startCancelableOperation"),stream:i(()=>oe,"stream"),toDiagnosticData:i(()=>gh,"toDiagnosticData"),toDiagnosticSeverity:i(()=>Zi,"toDiagnosticSeverity")});var Vf={};xr(Vf,{DefaultNameRegexp:i(()=>$d,"DefaultNameRegexp"),RangeComparison:i(()=>qt,"RangeComparison"),compareRange:i(()=>Td,"compareRange"),findCommentNode:i(()=>Ad,"findCommentNode"),findDeclarationNodeAtOffset:i(()=>Vg,"findDeclarationNodeAtOffset"),findLeafNodeAtOffset:i(()=>Cl,"findLeafNodeAtOffset"),findLeafNodeBeforeOffset:i(()=>Ed,"findLeafNodeBeforeOffset"),flattenCst:i(()=>Wg,"flattenCst"),getDatatypeNode:i(()=>qg,"getDatatypeNode"),getInteriorNodes:i(()=>Xg,"getInteriorNodes"),getNextNode:i(()=>Hg,"getNextNode"),getPreviousNode:i(()=>Cd,"getPreviousNode"),getStartlineNode:i(()=>Yg,"getStartlineNode"),inRange:i(()=>Rd,"inRange"),isChildNode:i(()=>vd,"isChildNode"),isCommentNode:i(()=>Bo,"isCommentNode"),streamCst:i(()=>ka,"streamCst"),toDocumentSegment:i(()=>Pa,"toDocumentSegment"),tokenToRange:i(()=>ts,"tokenToRange")});function Pe(e){return typeof e=="object"&&e!==null&&typeof e.$type=="string"}i(Pe,"isAstNode");o(Pe,"isAstNode");function Xe(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"ref"in e}i(Xe,"isReference");o(Xe,"isReference");function Ht(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"items"in e}i(Ht,"isMultiReference");o(Ht,"isMultiReference");function Hf(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.path=="string"}i(Hf,"isAstNodeDescription");o(Hf,"isAstNodeDescription");function tn(e){return typeof e=="object"&&e!==null&&typeof e.info=="object"&&typeof e.message=="string"}i(tn,"isLinkingError");o(tn,"isLinkingError");var Yf=class{static{i(this,"AbstractAstReflection")}static{o(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);let r=t.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){let t=this.types[e];return t||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return Pe(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});let n=r[t];if(n!==void 0)return n;{let a=this.types[e],s=a?a.superTypes.some(l=>this.isSubtype(l,t)):!1;return r[t]=s,s}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let r=this.getAllTypes(),n=[];for(let a of r)this.isSubtype(a,e)&&n.push(a);return this.allSubtypes[e]=n,n}}};function fr(e){return typeof e=="object"&&e!==null&&Array.isArray(e.content)}i(fr,"isCompositeCstNode");o(fr,"isCompositeCstNode");function Cn(e){return typeof e=="object"&&e!==null&&typeof e.tokenType=="object"}i(Cn,"isLeafCstNode");o(Cn,"isLeafCstNode");function vl(e){return fr(e)&&typeof e.fullText=="string"}i(vl,"isRootCstNode");o(vl,"isRootCstNode");var Wt=class ir{static{i(this,"_StreamImpl")}static{o(this,"StreamImpl")}constructor(t,r){this.startFn=t,this.nextFn=r}iterator(){let t={state:this.startFn(),next:o(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),r=0,n=t.next();for(;!n.done;)r++,n=t.next();return r}toArray(){let t=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&t.push(n.value);while(!n.done);return t}toSet(){return new Set(this)}toMap(t,r){let n=this.map(a=>[t?t(a):a,r?r(a):a]);return new Map(n)}toString(){return this.join()}concat(t){return new ir(()=>({first:this.startFn(),firstDone:!1,iterator:t[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 Ye})}join(t=","){let r=this.iterator(),n="",a,s=!1;do a=r.next(),a.done||(s&&(n+=t),n+=bg(a.value)),s=!0;while(!a.done);return n}indexOf(t,r=0){let n=this.iterator(),a=0,s=n.next();for(;!s.done;){if(a>=r&&s.value===t)return a;s=n.next(),a++}return-1}every(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(!t(n.value))return!1;n=r.next()}return!0}some(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(t(n.value))return!0;n=r.next()}return!1}forEach(t){let r=this.iterator(),n=0,a=r.next();for(;!a.done;)t(a.value,n),a=r.next(),n++}map(t){return new ir(this.startFn,r=>{let{done:n,value:a}=this.nextFn(r);return n?Ye:{done:!1,value:t(a)}})}filter(t){return new ir(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&t(n.value))return n;while(!n.done);return Ye})}nonNullable(){return this.filter(t=>t!=null)}reduce(t,r){let n=this.iterator(),a=r,s=n.next();for(;!s.done;)a===void 0?a=s.value:a=t(a,s.value),s=n.next();return a}reduceRight(t,r){return this.recursiveReduce(this.iterator(),t,r)}recursiveReduce(t,r,n){let a=t.next();if(a.done)return n;let s=this.recursiveReduce(t,r,n);return s===void 0?a.value:r(s,a.value)}find(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(t(n.value))return n.value;n=r.next()}}findIndex(t){let r=this.iterator(),n=0,a=r.next();for(;!a.done;){if(t(a.value))return n;a=r.next(),n++}return-1}includes(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===t)return!0;n=r.next()}return!1}flatMap(t){return new ir(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let s=r.iterator.next();if(s.done)r.iterator=void 0;else return s}let{done:n,value:a}=this.nextFn(r.this);if(!n){let s=t(a);if(Qi(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(r.iterator);return Ye})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let r=t>1?this.flat(t-1):this;return new ir(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let l=n.iterator.next();if(l.done)n.iterator=void 0;else return l}let{done:a,value:s}=r.nextFn(n.this);if(!a)if(Qi(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(n.iterator);return Ye})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(t=1){return new ir(()=>{let r=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),r=>(r.size++,r.size>t?Ye:this.nextFn(r.state)))}distinct(t){return new ir(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){let a=t?t(n.value):n.value;if(!r.set.has(a))return r.set.add(a),n}while(!n.done);return Ye})}exclude(t,r){let n=new Set;for(let a of t){let s=r?r(a):a;n.add(s)}return this.filter(a=>{let s=r?r(a):a;return!n.has(s)})}};function bg(e){return typeof e=="string"?e:typeof e>"u"?"undefined":typeof e.toString=="function"?e.toString():Object.prototype.toString.call(e)}i(bg,"toString");o(bg,"toString");function Qi(e){return!!e&&typeof e[Symbol.iterator]=="function"}i(Qi,"isIterable");o(Qi,"isIterable");var ba=new Wt(()=>{},()=>Ye),Ye=Object.freeze({done:!0,value:void 0});function oe(...e){if(e.length===1){let t=e[0];if(t instanceof Wt)return t;if(Qi(t))return new Wt(()=>t[Symbol.iterator](),r=>r.next());if(typeof t.length=="number")return new Wt(()=>({index:0}),r=>r.index1?new Wt(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let r=t.iterator.next();if(!r.done)return r;t.iterator=void 0}if(t.array){if(t.arrIndex({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),n=>{for(n.pruned&&(n.iterators.pop(),n.pruned=!1);n.iterators.length>0;){let s=n.iterators[n.iterators.length-1].next();if(s.done)n.iterators.pop();else return n.iterators.push(t(s.value)[Symbol.iterator]()),s}return Ye})}iterator(){let e={state:this.startFn(),next:o(()=>this.nextFn(e.state),"next"),prune:o(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},es;(function(e){function t(s){return s.reduce((l,u)=>l+u,0)}i(t,"sum"),o(t,"sum"),e.sum=t;function r(s){return s.reduce((l,u)=>l*u,0)}i(r,"product"),o(r,"product"),e.product=r;function n(s){return s.reduce((l,u)=>Math.min(l,u))}i(n,"min2"),o(n,"min"),e.min=n;function a(s){return s.reduce((l,u)=>Math.max(l,u))}i(a,"max"),o(a,"max"),e.max=a})(es||(es={}));var Xf={};xr(Xf,{assignMandatoryProperties:i(()=>Jf,"assignMandatoryProperties"),copyAstNode:i(()=>Io,"copyAstNode"),findRootNode:i(()=>Aa,"findRootNode"),getContainerOfType:i(()=>bn,"getContainerOfType"),getDocument:i(()=>kt,"getDocument"),getReferenceNodes:i(()=>So,"getReferenceNodes"),hasContainerOfType:i(()=>Sg,"hasContainerOfType"),linkContentToContainer:i(()=>wa,"linkContentToContainer"),streamAllContents:i(()=>$r,"streamAllContents"),streamAst:i(()=>Pt,"streamAst"),streamContents:i(()=>Ts,"streamContents"),streamReferences:i(()=>Ia,"streamReferences")});function wa(e,t={}){for(let[r,n]of Object.entries(e))r.startsWith("$")||(Array.isArray(n)?n.forEach((a,s)=>{Pe(a)&&(a.$container=e,a.$containerProperty=r,a.$containerIndex=s,t.deep&&wa(a,t))}):Pe(n)&&(n.$container=e,n.$containerProperty=r,t.deep&&wa(n,t)))}i(wa,"linkContentToContainer");o(wa,"linkContentToContainer");function bn(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}i(bn,"getContainerOfType");o(bn,"getContainerOfType");function Sg(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}i(Sg,"hasContainerOfType");o(Sg,"hasContainerOfType");function kt(e){let r=Aa(e).$document;if(!r)throw new Error("AST node has no document.");return r}i(kt,"getDocument");o(kt,"getDocument");function Aa(e){for(;e.$container;)e=e.$container;return e}i(Aa,"findRootNode");o(Aa,"findRootNode");function So(e){return Xe(e)?e.ref?[e.ref]:[]:Ht(e)?e.items.map(t=>t.ref):[]}i(So,"getReferenceNodes");o(So,"getReferenceNodes");function Ts(e,t){if(!e)throw new Error("Node must be an AstNode.");let r=t?.range;return new Wt(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndexTs(r,t))}i($r,"streamAllContents");o($r,"streamAllContents");function Pt(e,t){if(e){if(t?.range&&!wo(e,t.range))return new Sa(e,()=>[])}else throw new Error("Root node must be an AstNode.");return new Sa(e,r=>Ts(r,t),{includeRoot:!0})}i(Pt,"streamAst");o(Pt,"streamAst");function wo(e,t){if(!t)return!0;let r=e.$cstNode?.range;return r?Rd(r,t):!1}i(wo,"isAstNodeInRange");o(wo,"isAstNodeInRange");function Ia(e){return new Wt(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexit,"AbstractElement"),AbstractParserRule:i(()=>Fi,"AbstractParserRule"),AbstractRule:i(()=>ha,"AbstractRule"),AbstractType:i(()=>ft,"AbstractType"),Action:i(()=>Sr,"Action"),Alternatives:i(()=>Gi,"Alternatives"),ArrayLiteral:i(()=>No,"ArrayLiteral"),ArrayType:i(()=>ko,"ArrayType"),Assignment:i(()=>wr,"Assignment"),BooleanLiteral:i(()=>Po,"BooleanLiteral"),CharacterRange:i(()=>Ir,"CharacterRange"),Condition:i(()=>Nr,"Condition"),Conjunction:i(()=>ji,"Conjunction"),CrossReference:i(()=>kr,"CrossReference"),Disjunction:i(()=>Ui,"Disjunction"),EndOfFile:i(()=>Oo,"EndOfFile"),Grammar:i(()=>lr,"Grammar"),GrammarImport:i(()=>Lo,"GrammarImport"),Group:i(()=>rn,"Group"),InferredType:i(()=>Do,"InferredType"),InfixRule:i(()=>Bt,"InfixRule"),InfixRuleOperatorList:i(()=>zi,"InfixRuleOperatorList"),InfixRuleOperators:i(()=>Mo,"InfixRuleOperators"),Interface:i(()=>ma,"Interface"),Keyword:i(()=>ga,"Keyword"),LangiumGrammarAstReflection:i(()=>yd,"LangiumGrammarAstReflection"),LangiumGrammarTerminals:i(()=>aw,"LangiumGrammarTerminals"),NamedArgument:i(()=>ya,"NamedArgument"),NegatedToken:i(()=>nn,"NegatedToken"),Negation:i(()=>xo,"Negation"),NumberLiteral:i(()=>Fo,"NumberLiteral"),Parameter:i(()=>va,"Parameter"),ParameterReference:i(()=>Go,"ParameterReference"),ParserRule:i(()=>wt,"ParserRule"),ReferenceType:i(()=>Bi,"ReferenceType"),RegexToken:i(()=>an,"RegexToken"),ReturnType:i(()=>jo,"ReturnType"),RuleCall:i(()=>sn,"RuleCall"),SimpleType:i(()=>Ta,"SimpleType"),StringLiteral:i(()=>Uo,"StringLiteral"),TerminalAlternatives:i(()=>on,"TerminalAlternatives"),TerminalElement:i(()=>st,"TerminalElement"),TerminalGroup:i(()=>ln,"TerminalGroup"),TerminalRule:i(()=>ur,"TerminalRule"),TerminalRuleCall:i(()=>un,"TerminalRuleCall"),Type:i(()=>Ki,"Type"),TypeAttribute:i(()=>cn,"TypeAttribute"),TypeDefinition:i(()=>fn,"TypeDefinition"),UnionType:i(()=>zo,"UnionType"),UnorderedGroup:i(()=>qi,"UnorderedGroup"),UntilToken:i(()=>dn,"UntilToken"),ValueLiteral:i(()=>pn,"ValueLiteral"),Wildcard:i(()=>Ra,"Wildcard"),isAbstractElement:i(()=>Tl,"isAbstractElement"),isAbstractParserRule:i(()=>Sn,"isAbstractParserRule"),isAbstractRule:i(()=>Ig,"isAbstractRule"),isAbstractType:i(()=>Ng,"isAbstractType"),isAction:i(()=>Pr,"isAction"),isAlternatives:i(()=>Rl,"isAlternatives"),isArrayLiteral:i(()=>kg,"isArrayLiteral"),isArrayType:i(()=>Qf,"isArrayType"),isAssignment:i(()=>dr,"isAssignment"),isBooleanLiteral:i(()=>ed,"isBooleanLiteral"),isCharacterRange:i(()=>td,"isCharacterRange"),isCondition:i(()=>Pg,"isCondition"),isConjunction:i(()=>rd,"isConjunction"),isCrossReference:i(()=>wn,"isCrossReference"),isDisjunction:i(()=>nd,"isDisjunction"),isEndOfFile:i(()=>ad,"isEndOfFile"),isGrammar:i(()=>Og,"isGrammar"),isGrammarImport:i(()=>Lg,"isGrammarImport"),isGroup:i(()=>In,"isGroup"),isInferredType:i(()=>Rs,"isInferredType"),isInfixRule:i(()=>Na,"isInfixRule"),isInfixRuleOperatorList:i(()=>Dg,"isInfixRuleOperatorList"),isInfixRuleOperators:i(()=>Mg,"isInfixRuleOperators"),isInterface:i(()=>id,"isInterface"),isKeyword:i(()=>pr,"isKeyword"),isNamedArgument:i(()=>xg,"isNamedArgument"),isNegatedToken:i(()=>sd,"isNegatedToken"),isNegation:i(()=>od,"isNegation"),isNumberLiteral:i(()=>Fg,"isNumberLiteral"),isParameter:i(()=>Gg,"isParameter"),isParameterReference:i(()=>ld,"isParameterReference"),isParserRule:i(()=>Qe,"isParserRule"),isReferenceType:i(()=>ud,"isReferenceType"),isRegexToken:i(()=>cd,"isRegexToken"),isReturnType:i(()=>fd,"isReturnType"),isRuleCall:i(()=>hr,"isRuleCall"),isSimpleType:i(()=>$l,"isSimpleType"),isStringLiteral:i(()=>jg,"isStringLiteral"),isTerminalAlternatives:i(()=>dd,"isTerminalAlternatives"),isTerminalElement:i(()=>Ug,"isTerminalElement"),isTerminalGroup:i(()=>pd,"isTerminalGroup"),isTerminalRule:i(()=>Ct,"isTerminalRule"),isTerminalRuleCall:i(()=>Al,"isTerminalRuleCall"),isType:i(()=>El,"isType"),isTypeAttribute:i(()=>zg,"isTypeAttribute"),isTypeDefinition:i(()=>Bg,"isTypeDefinition"),isUnionType:i(()=>hd,"isUnionType"),isUnorderedGroup:i(()=>_l,"isUnorderedGroup"),isUntilToken:i(()=>md,"isUntilToken"),isValueLiteral:i(()=>Kg,"isValueLiteral"),isWildcard:i(()=>gd,"isWildcard"),reflection:i(()=>z,"reflection")});var aw={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]*/},it={$type:"AbstractElement",cardinality:"cardinality"};function Tl(e){return z.isInstance(e,it.$type)}i(Tl,"isAbstractElement");o(Tl,"isAbstractElement");var Fi={$type:"AbstractParserRule"};function Sn(e){return z.isInstance(e,Fi.$type)}i(Sn,"isAbstractParserRule");o(Sn,"isAbstractParserRule");var ha={$type:"AbstractRule"};function Ig(e){return z.isInstance(e,ha.$type)}i(Ig,"isAbstractRule");o(Ig,"isAbstractRule");var ft={$type:"AbstractType"};function Ng(e){return z.isInstance(e,ft.$type)}i(Ng,"isAbstractType");o(Ng,"isAbstractType");var Sr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Pr(e){return z.isInstance(e,Sr.$type)}i(Pr,"isAction");o(Pr,"isAction");var Gi={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function Rl(e){return z.isInstance(e,Gi.$type)}i(Rl,"isAlternatives");o(Rl,"isAlternatives");var No={$type:"ArrayLiteral",elements:"elements"};function kg(e){return z.isInstance(e,No.$type)}i(kg,"isArrayLiteral");o(kg,"isArrayLiteral");var ko={$type:"ArrayType",elementType:"elementType"};function Qf(e){return z.isInstance(e,ko.$type)}i(Qf,"isArrayType");o(Qf,"isArrayType");var wr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function dr(e){return z.isInstance(e,wr.$type)}i(dr,"isAssignment");o(dr,"isAssignment");var Po={$type:"BooleanLiteral",true:"true"};function ed(e){return z.isInstance(e,Po.$type)}i(ed,"isBooleanLiteral");o(ed,"isBooleanLiteral");var Ir={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function td(e){return z.isInstance(e,Ir.$type)}i(td,"isCharacterRange");o(td,"isCharacterRange");var Nr={$type:"Condition"};function Pg(e){return z.isInstance(e,Nr.$type)}i(Pg,"isCondition");o(Pg,"isCondition");var ji={$type:"Conjunction",left:"left",right:"right"};function rd(e){return z.isInstance(e,ji.$type)}i(rd,"isConjunction");o(rd,"isConjunction");var kr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function wn(e){return z.isInstance(e,kr.$type)}i(wn,"isCrossReference");o(wn,"isCrossReference");var Ui={$type:"Disjunction",left:"left",right:"right"};function nd(e){return z.isInstance(e,Ui.$type)}i(nd,"isDisjunction");o(nd,"isDisjunction");var Oo={$type:"EndOfFile",cardinality:"cardinality"};function ad(e){return z.isInstance(e,Oo.$type)}i(ad,"isEndOfFile");o(ad,"isEndOfFile");var lr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function Og(e){return z.isInstance(e,lr.$type)}i(Og,"isGrammar");o(Og,"isGrammar");var Lo={$type:"GrammarImport",path:"path"};function Lg(e){return z.isInstance(e,Lo.$type)}i(Lg,"isGrammarImport");o(Lg,"isGrammarImport");var rn={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function In(e){return z.isInstance(e,rn.$type)}i(In,"isGroup");o(In,"isGroup");var Do={$type:"InferredType",name:"name"};function Rs(e){return z.isInstance(e,Do.$type)}i(Rs,"isInferredType");o(Rs,"isInferredType");var Bt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function Na(e){return z.isInstance(e,Bt.$type)}i(Na,"isInfixRule");o(Na,"isInfixRule");var zi={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function Dg(e){return z.isInstance(e,zi.$type)}i(Dg,"isInfixRuleOperatorList");o(Dg,"isInfixRuleOperatorList");var Mo={$type:"InfixRuleOperators",precedences:"precedences"};function Mg(e){return z.isInstance(e,Mo.$type)}i(Mg,"isInfixRuleOperators");o(Mg,"isInfixRuleOperators");var ma={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function id(e){return z.isInstance(e,ma.$type)}i(id,"isInterface");o(id,"isInterface");var ga={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function pr(e){return z.isInstance(e,ga.$type)}i(pr,"isKeyword");o(pr,"isKeyword");var ya={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function xg(e){return z.isInstance(e,ya.$type)}i(xg,"isNamedArgument");o(xg,"isNamedArgument");var nn={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function sd(e){return z.isInstance(e,nn.$type)}i(sd,"isNegatedToken");o(sd,"isNegatedToken");var xo={$type:"Negation",value:"value"};function od(e){return z.isInstance(e,xo.$type)}i(od,"isNegation");o(od,"isNegation");var Fo={$type:"NumberLiteral",value:"value"};function Fg(e){return z.isInstance(e,Fo.$type)}i(Fg,"isNumberLiteral");o(Fg,"isNumberLiteral");var va={$type:"Parameter",name:"name"};function Gg(e){return z.isInstance(e,va.$type)}i(Gg,"isParameter");o(Gg,"isParameter");var Go={$type:"ParameterReference",parameter:"parameter"};function ld(e){return z.isInstance(e,Go.$type)}i(ld,"isParameterReference");o(ld,"isParameterReference");var wt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Qe(e){return z.isInstance(e,wt.$type)}i(Qe,"isParserRule");o(Qe,"isParserRule");var Bi={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function ud(e){return z.isInstance(e,Bi.$type)}i(ud,"isReferenceType");o(ud,"isReferenceType");var an={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function cd(e){return z.isInstance(e,an.$type)}i(cd,"isRegexToken");o(cd,"isRegexToken");var jo={$type:"ReturnType",name:"name"};function fd(e){return z.isInstance(e,jo.$type)}i(fd,"isReturnType");o(fd,"isReturnType");var sn={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function hr(e){return z.isInstance(e,sn.$type)}i(hr,"isRuleCall");o(hr,"isRuleCall");var Ta={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function $l(e){return z.isInstance(e,Ta.$type)}i($l,"isSimpleType");o($l,"isSimpleType");var Uo={$type:"StringLiteral",value:"value"};function jg(e){return z.isInstance(e,Uo.$type)}i(jg,"isStringLiteral");o(jg,"isStringLiteral");var on={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function dd(e){return z.isInstance(e,on.$type)}i(dd,"isTerminalAlternatives");o(dd,"isTerminalAlternatives");var st={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Ug(e){return z.isInstance(e,st.$type)}i(Ug,"isTerminalElement");o(Ug,"isTerminalElement");var ln={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function pd(e){return z.isInstance(e,ln.$type)}i(pd,"isTerminalGroup");o(pd,"isTerminalGroup");var ur={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Ct(e){return z.isInstance(e,ur.$type)}i(Ct,"isTerminalRule");o(Ct,"isTerminalRule");var un={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Al(e){return z.isInstance(e,un.$type)}i(Al,"isTerminalRuleCall");o(Al,"isTerminalRuleCall");var Ki={$type:"Type",name:"name",type:"type"};function El(e){return z.isInstance(e,Ki.$type)}i(El,"isType");o(El,"isType");var cn={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function zg(e){return z.isInstance(e,cn.$type)}i(zg,"isTypeAttribute");o(zg,"isTypeAttribute");var fn={$type:"TypeDefinition"};function Bg(e){return z.isInstance(e,fn.$type)}i(Bg,"isTypeDefinition");o(Bg,"isTypeDefinition");var zo={$type:"UnionType",types:"types"};function hd(e){return z.isInstance(e,zo.$type)}i(hd,"isUnionType");o(hd,"isUnionType");var qi={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function _l(e){return z.isInstance(e,qi.$type)}i(_l,"isUnorderedGroup");o(_l,"isUnorderedGroup");var dn={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function md(e){return z.isInstance(e,dn.$type)}i(md,"isUntilToken");o(md,"isUntilToken");var pn={$type:"ValueLiteral"};function Kg(e){return z.isInstance(e,pn.$type)}i(Kg,"isValueLiteral");o(Kg,"isValueLiteral");var Ra={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function gd(e){return z.isInstance(e,Ra.$type)}i(gd,"isWildcard");o(gd,"isWildcard");var yd=class extends Yf{static{i(this,"LangiumGrammarAstReflection")}static{o(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:it.$type,properties:{cardinality:{name:it.cardinality}},superTypes:[]},AbstractParserRule:{name:Fi.$type,properties:{},superTypes:[ha.$type,ft.$type]},AbstractRule:{name:ha.$type,properties:{},superTypes:[]},AbstractType:{name:ft.$type,properties:{},superTypes:[]},Action:{name:Sr.$type,properties:{cardinality:{name:Sr.cardinality},feature:{name:Sr.feature},inferredType:{name:Sr.inferredType},operator:{name:Sr.operator},type:{name:Sr.type,referenceType:ft.$type}},superTypes:[it.$type]},Alternatives:{name:Gi.$type,properties:{cardinality:{name:Gi.cardinality},elements:{name:Gi.elements,defaultValue:[]}},superTypes:[it.$type]},ArrayLiteral:{name:No.$type,properties:{elements:{name:No.elements,defaultValue:[]}},superTypes:[pn.$type]},ArrayType:{name:ko.$type,properties:{elementType:{name:ko.elementType}},superTypes:[fn.$type]},Assignment:{name:wr.$type,properties:{cardinality:{name:wr.cardinality},feature:{name:wr.feature},operator:{name:wr.operator},predicate:{name:wr.predicate},terminal:{name:wr.terminal}},superTypes:[it.$type]},BooleanLiteral:{name:Po.$type,properties:{true:{name:Po.true,defaultValue:!1}},superTypes:[Nr.$type,pn.$type]},CharacterRange:{name:Ir.$type,properties:{cardinality:{name:Ir.cardinality},left:{name:Ir.left},lookahead:{name:Ir.lookahead},parenthesized:{name:Ir.parenthesized,defaultValue:!1},right:{name:Ir.right}},superTypes:[st.$type]},Condition:{name:Nr.$type,properties:{},superTypes:[]},Conjunction:{name:ji.$type,properties:{left:{name:ji.left},right:{name:ji.right}},superTypes:[Nr.$type]},CrossReference:{name:kr.$type,properties:{cardinality:{name:kr.cardinality},deprecatedSyntax:{name:kr.deprecatedSyntax,defaultValue:!1},isMulti:{name:kr.isMulti,defaultValue:!1},terminal:{name:kr.terminal},type:{name:kr.type,referenceType:ft.$type}},superTypes:[it.$type]},Disjunction:{name:Ui.$type,properties:{left:{name:Ui.left},right:{name:Ui.right}},superTypes:[Nr.$type]},EndOfFile:{name:Oo.$type,properties:{cardinality:{name:Oo.cardinality}},superTypes:[it.$type]},Grammar:{name:lr.$type,properties:{imports:{name:lr.imports,defaultValue:[]},interfaces:{name:lr.interfaces,defaultValue:[]},isDeclared:{name:lr.isDeclared,defaultValue:!1},name:{name:lr.name},rules:{name:lr.rules,defaultValue:[]},types:{name:lr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Lo.$type,properties:{path:{name:Lo.path}},superTypes:[]},Group:{name:rn.$type,properties:{cardinality:{name:rn.cardinality},elements:{name:rn.elements,defaultValue:[]},guardCondition:{name:rn.guardCondition},predicate:{name:rn.predicate}},superTypes:[it.$type]},InferredType:{name:Do.$type,properties:{name:{name:Do.name}},superTypes:[ft.$type]},InfixRule:{name:Bt.$type,properties:{call:{name:Bt.call},dataType:{name:Bt.dataType},inferredType:{name:Bt.inferredType},name:{name:Bt.name},operators:{name:Bt.operators},parameters:{name:Bt.parameters,defaultValue:[]},returnType:{name:Bt.returnType,referenceType:ft.$type}},superTypes:[Fi.$type]},InfixRuleOperatorList:{name:zi.$type,properties:{associativity:{name:zi.associativity},operators:{name:zi.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Mo.$type,properties:{precedences:{name:Mo.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:ma.$type,properties:{attributes:{name:ma.attributes,defaultValue:[]},name:{name:ma.name},superTypes:{name:ma.superTypes,defaultValue:[],referenceType:ft.$type}},superTypes:[ft.$type]},Keyword:{name:ga.$type,properties:{cardinality:{name:ga.cardinality},predicate:{name:ga.predicate},value:{name:ga.value}},superTypes:[it.$type]},NamedArgument:{name:ya.$type,properties:{calledByName:{name:ya.calledByName,defaultValue:!1},parameter:{name:ya.parameter,referenceType:va.$type},value:{name:ya.value}},superTypes:[]},NegatedToken:{name:nn.$type,properties:{cardinality:{name:nn.cardinality},lookahead:{name:nn.lookahead},parenthesized:{name:nn.parenthesized,defaultValue:!1},terminal:{name:nn.terminal}},superTypes:[st.$type]},Negation:{name:xo.$type,properties:{value:{name:xo.value}},superTypes:[Nr.$type]},NumberLiteral:{name:Fo.$type,properties:{value:{name:Fo.value}},superTypes:[pn.$type]},Parameter:{name:va.$type,properties:{name:{name:va.name}},superTypes:[]},ParameterReference:{name:Go.$type,properties:{parameter:{name:Go.parameter,referenceType:va.$type}},superTypes:[Nr.$type]},ParserRule:{name:wt.$type,properties:{dataType:{name:wt.dataType},definition:{name:wt.definition},entry:{name:wt.entry,defaultValue:!1},fragment:{name:wt.fragment,defaultValue:!1},inferredType:{name:wt.inferredType},name:{name:wt.name},parameters:{name:wt.parameters,defaultValue:[]},returnType:{name:wt.returnType,referenceType:ft.$type}},superTypes:[Fi.$type]},ReferenceType:{name:Bi.$type,properties:{isMulti:{name:Bi.isMulti,defaultValue:!1},referenceType:{name:Bi.referenceType}},superTypes:[fn.$type]},RegexToken:{name:an.$type,properties:{cardinality:{name:an.cardinality},lookahead:{name:an.lookahead},parenthesized:{name:an.parenthesized,defaultValue:!1},regex:{name:an.regex}},superTypes:[st.$type]},ReturnType:{name:jo.$type,properties:{name:{name:jo.name}},superTypes:[]},RuleCall:{name:sn.$type,properties:{arguments:{name:sn.arguments,defaultValue:[]},cardinality:{name:sn.cardinality},predicate:{name:sn.predicate},rule:{name:sn.rule,referenceType:ha.$type}},superTypes:[it.$type]},SimpleType:{name:Ta.$type,properties:{primitiveType:{name:Ta.primitiveType},stringType:{name:Ta.stringType},typeRef:{name:Ta.typeRef,referenceType:ft.$type}},superTypes:[fn.$type]},StringLiteral:{name:Uo.$type,properties:{value:{name:Uo.value}},superTypes:[pn.$type]},TerminalAlternatives:{name:on.$type,properties:{cardinality:{name:on.cardinality},elements:{name:on.elements,defaultValue:[]},lookahead:{name:on.lookahead},parenthesized:{name:on.parenthesized,defaultValue:!1}},superTypes:[st.$type]},TerminalElement:{name:st.$type,properties:{cardinality:{name:st.cardinality},lookahead:{name:st.lookahead},parenthesized:{name:st.parenthesized,defaultValue:!1}},superTypes:[it.$type]},TerminalGroup:{name:ln.$type,properties:{cardinality:{name:ln.cardinality},elements:{name:ln.elements,defaultValue:[]},lookahead:{name:ln.lookahead},parenthesized:{name:ln.parenthesized,defaultValue:!1}},superTypes:[st.$type]},TerminalRule:{name:ur.$type,properties:{definition:{name:ur.definition},fragment:{name:ur.fragment,defaultValue:!1},hidden:{name:ur.hidden,defaultValue:!1},name:{name:ur.name},type:{name:ur.type}},superTypes:[ha.$type]},TerminalRuleCall:{name:un.$type,properties:{cardinality:{name:un.cardinality},lookahead:{name:un.lookahead},parenthesized:{name:un.parenthesized,defaultValue:!1},rule:{name:un.rule,referenceType:ur.$type}},superTypes:[st.$type]},Type:{name:Ki.$type,properties:{name:{name:Ki.name},type:{name:Ki.type}},superTypes:[ft.$type]},TypeAttribute:{name:cn.$type,properties:{defaultValue:{name:cn.defaultValue},isOptional:{name:cn.isOptional,defaultValue:!1},name:{name:cn.name},type:{name:cn.type}},superTypes:[]},TypeDefinition:{name:fn.$type,properties:{},superTypes:[]},UnionType:{name:zo.$type,properties:{types:{name:zo.types,defaultValue:[]}},superTypes:[fn.$type]},UnorderedGroup:{name:qi.$type,properties:{cardinality:{name:qi.cardinality},elements:{name:qi.elements,defaultValue:[]}},superTypes:[it.$type]},UntilToken:{name:dn.$type,properties:{cardinality:{name:dn.cardinality},lookahead:{name:dn.lookahead},parenthesized:{name:dn.parenthesized,defaultValue:!1},terminal:{name:dn.terminal}},superTypes:[st.$type]},ValueLiteral:{name:pn.$type,properties:{},superTypes:[]},Wildcard:{name:Ra.$type,properties:{cardinality:{name:Ra.cardinality},lookahead:{name:Ra.lookahead},parenthesized:{name:Ra.parenthesized,defaultValue:!1}},superTypes:[st.$type]}}}},z=new yd;function qg(e){let t=e,r=!1;for(;t;){let n=bn(t.grammarSource,Qe);if(n&&n.dataType)t=t.container,r=!0;else return r?t:void 0}}i(qg,"getDatatypeNode");o(qg,"getDatatypeNode");function ka(e){return new Sa(e,t=>fr(t)?t.content:[],{includeRoot:!0})}i(ka,"streamCst");o(ka,"streamCst");function Wg(e){return ka(e).filter(Cn)}i(Wg,"flattenCst");o(Wg,"flattenCst");function vd(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}i(vd,"isChildNode");o(vd,"isChildNode");function ts(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}i(ts,"tokenToRange");o(ts,"tokenToRange");function Pa(e){if(!e)return;let{offset:t,end:r,range:n}=e;return{range:n,offset:t,end:r,length:r-t}}i(Pa,"toDocumentSegment");o(Pa,"toDocumentSegment");var qt;(function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside",e[e.Outside=5]="Outside"})(qt||(qt={}));function Td(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return qt.After;let r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,n=e.end.lineqt.After}i(Rd,"inRange");o(Rd,"inRange");var $d=/^[\w\p{L}]$/u;function Vg(e,t,r=$d){if(e){if(t>0){let n=t-e.offset,a=e.text.charAt(n);r.test(a)||t--}return Cl(e,t)}}i(Vg,"findDeclarationNodeAtOffset");o(Vg,"findDeclarationNodeAtOffset");function Ad(e,t){if(e){let r=Cd(e,!0);if(r&&Bo(r,t))return r;if(vl(e)){let n=e.content.findIndex(a=>!a.hidden);for(let a=n-1;a>=0;a--){let s=e.content[a];if(Bo(s,t))return s}}}}i(Ad,"findCommentNode");o(Ad,"findCommentNode");function Bo(e,t){return Cn(e)&&t.includes(e.tokenType.name)}i(Bo,"isCommentNode");o(Bo,"isCommentNode");function Cl(e,t){if(Cn(e))return e;if(fr(e)){let r=_d(e,t,!1);if(r)return Cl(r,t)}}i(Cl,"findLeafNodeAtOffset");o(Cl,"findLeafNodeAtOffset");function Ed(e,t){if(Cn(e))return e;if(fr(e)){let r=_d(e,t,!0);if(r)return Ed(r,t)}}i(Ed,"findLeafNodeBeforeOffset");o(Ed,"findLeafNodeBeforeOffset");function _d(e,t,r){let n=0,a=e.content.length-1,s;for(;n<=a;){let l=Math.floor((n+a)/2),u=e.content[l];if(u.offset<=t&&u.end>t)return u;u.end<=t?(s=r?u:void 0,n=l+1):a=l-1}return s}i(_d,"binarySearch");o(_d,"binarySearch");function Cd(e,t=!0){for(;e.container;){let r=e.container,n=r.content.indexOf(e);for(;n>0;){n--;let a=r.content[n];if(t||!a.hidden)return a}e=r}}i(Cd,"getPreviousNode");o(Cd,"getPreviousNode");function Hg(e,t=!0){for(;e.container;){let r=e.container,n=r.content.indexOf(e),a=r.content.length-1;for(;nGd,"findAssignment"),findNameAssignment:i(()=>Ol,"findNameAssignment"),findNodeForKeyword:i(()=>Fd,"findNodeForKeyword"),findNodeForProperty:i(()=>Nl,"findNodeForProperty"),findNodesForKeyword:i(()=>ay,"findNodesForKeyword"),findNodesForKeywordInternal:i(()=>Pl,"findNodesForKeywordInternal"),findNodesForProperty:i(()=>xd,"findNodesForProperty"),getActionAtElement:i(()=>Ud,"getActionAtElement"),getActionType:i(()=>Bd,"getActionType"),getAllReachableRules:i(()=>Il,"getAllReachableRules"),getAllRulesUsedForCrossReferences:i(()=>ny,"getAllRulesUsedForCrossReferences"),getCrossReferenceTerminal:i(()=>Dd,"getCrossReferenceTerminal"),getEntryRule:i(()=>Pd,"getEntryRule"),getExplicitRuleType:i(()=>As,"getExplicitRuleType"),getHiddenRules:i(()=>Od,"getHiddenRules"),getRuleType:i(()=>Kd,"getRuleType"),getRuleTypeName:i(()=>uy,"getRuleTypeName"),getTypeName:i(()=>Rn,"getTypeName"),isArrayCardinality:i(()=>sy,"isArrayCardinality"),isArrayOperator:i(()=>oy,"isArrayOperator"),isCommentTerminal:i(()=>Md,"isCommentTerminal"),isDataType:i(()=>ly,"isDataType"),isDataTypeRule:i(()=>$s,"isDataTypeRule"),isOptionalCardinality:i(()=>iy,"isOptionalCardinality"),terminalRegex:i(()=>Es,"terminalRegex")});var bl=class extends Error{static{i(this,"ErrorWithLocation")}static{o(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function Fr(e,t="Error: Got unexpected value."){throw new Error(t)}i(Fr,"assertUnreachable");o(Fr,"assertUnreachable");function Sd(e,t="Error: Condition is violated."){if(!e)throw new Error(t)}i(Sd,"assertCondition");o(Sd,"assertCondition");var wd={};xr(wd,{NEWLINE_REGEXP:i(()=>Qg,"NEWLINE_REGEXP"),escapeRegExp:i(()=>ja,"escapeRegExp"),getTerminalParts:i(()=>ty,"getTerminalParts"),isMultilineComment:i(()=>Id,"isMultilineComment"),isWhitespace:i(()=>wl,"isWhitespace"),partialMatches:i(()=>Nd,"partialMatches"),partialRegExp:i(()=>kd,"partialRegExp"),whitespaceCharacters:i(()=>ry,"whitespaceCharacters")});function K(e){return e.charCodeAt(0)}i(K,"cc");o(K,"cc");function co(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}i(co,"insertToSet");o(co,"insertToSet");function oa(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}i(oa,"addFlag");o(oa,"addFlag");function Yr(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}i(Yr,"ASSERT_EXISTS");o(Yr,"ASSERT_EXISTS");function Pi(){throw Error("Internal Error - Should never get here!")}i(Pi,"ASSERT_NEVER_REACH_HERE");o(Pi,"ASSERT_NEVER_REACH_HERE");function Yc(e){return e.type==="Character"}i(Yc,"isCharacter");o(Yc,"isCharacter");var Ko=[];for(let e=K("0");e<=K("9");e++)Ko.push(e);var qo=[K("_")].concat(Ko);for(let e=K("a");e<=K("z");e++)qo.push(e);for(let e=K("A");e<=K("Z");e++)qo.push(e);var Ph=[K(" "),K("\f"),K(` `),K("\r"),K(" "),K("\v"),K(" "),K("\xA0"),K("\u1680"),K("\u2000"),K("\u2001"),K("\u2002"),K("\u2003"),K("\u2004"),K("\u2005"),K("\u2006"),K("\u2007"),K("\u2008"),K("\u2009"),K("\u200A"),K("\u2028"),K("\u2029"),K("\u202F"),K("\u205F"),K("\u3000"),K("\uFEFF")],iw=/[0-9a-fA-F]/,Fs=/[0-9]/,sw=/[1-9]/,Zg=class{static{i(this,"RegExpParser")}static{o(this,"RegExpParser")}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 t=this.disjunction();this.consumeChar("/");let r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":oa(r,"global");break;case"i":oa(r,"ignoreCase");break;case"m":oa(r,"multiLine");break;case"u":oa(r,"unicode");break;case"y":oa(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}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 t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Yr(t);let r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return Pi()}quantifier(e=!1){let t,r=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":let n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),t={atLeast:n,atMost:a}):t={atLeast:n,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Yr(t);break}if(!(e===!0&&t===void 0)&&Yr(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(r),t}atom(){let e,t=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()),Yr(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Pi()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[K(` `),K("\r"),K("\u2028"),K("\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,t=!1;switch(this.popChar()){case"d":e=Ko;break;case"D":e=Ko,t=!0;break;case"s":e=Ph;break;case"S":e=Ph,t=!0;break;case"w":e=qo;break;case"W":e=qo,t=!0;break}return Yr(e)?{type:"Set",value:e,complement:t}:Pi()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=K("\f");break;case"n":e=K(` `);break;case"r":e=K("\r");break;case"t":e=K(" ");break;case"v":e=K("\v");break}return Yr(e)?{type:"Character",value:e}:Pi()}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:K("\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:K(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case` `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:K(e)}}}characterClass(){let e=[],t=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),t=!0);this.isClassAtom();){let r=this.classAtom(),n=r.type==="Character";if(Yc(r)&&this.isRangeDash()){this.consumeChar("-");let a=this.classAtom(),s=a.type==="Character";if(Yc(a)){if(a.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},Sl=class{static{i(this,"BaseRegExpVisitor")}static{o(this,"BaseRegExpVisitor")}visitChildren(e){for(let t in e){let r=e[t];e.hasOwnProperty(t)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(n=>{this.visit(n)},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){}},Qg=/\r?\n/gm,ey=new Zg,ow=class extends Sl{static{i(this,"TerminalRegExpVisitor")}static{o(this,"TerminalRegExpVisitor")}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 t=String.fromCharCode(e.value);if(!this.multiline&&t===` `&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=ja(t);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitSet(e){if(!this.multiline){let t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=!!` `.match(r)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},hn=new ow;function ty(e){try{typeof e!="string"&&(e=e.source),e=`/${e}/`;let t=ey.pattern(e),r=[];for(let n of t.value.value)hn.reset(e),hn.visit(n),r.push({start:hn.startRegexp,end:hn.endRegex});return r}catch{return[]}}i(ty,"getTerminalParts");o(ty,"getTerminalParts");function Id(e){try{return typeof e=="string"&&(e=new RegExp(e)),e=e.toString(),hn.reset(e),hn.visit(ey.pattern(e)),hn.multiline}catch{return!1}}i(Id,"isMultilineComment");o(Id,"isMultilineComment");var ry=`\f \r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("");function wl(e){let t=typeof e=="string"?new RegExp(e):e;return ry.some(r=>t.test(r))}i(wl,"isWhitespace");o(wl,"isWhitespace");function ja(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(ja,"escapeRegExp");o(ja,"escapeRegExp");function Nd(e,t){let r=kd(e),n=t.match(r);return!!n&&n[0].length>0}i(Nd,"partialMatches");o(Nd,"partialMatches");function kd(e){typeof e=="string"&&(e=new RegExp(e));let t=e,r=e.source,n=0;function a(){let s="",l;function u(f){s+=r.substr(n,f),n+=f}i(u,"appendRaw"),o(u,"appendRaw");function c(f){s+="(?:"+r.substr(n,f)+"|$)",n+=f}for(i(c,"appendOptional"),o(c,"appendOptional");n",n)-n+1);break;default:c(2);break}break;case"[":l=/\[(?:\\.|.)*?\]/g,l.lastIndex=n,l=l.exec(r)||[],c(l[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":u(1);break;case"{":l=/\{\d+,?\d*\}/g,l.lastIndex=n,l=l.exec(r),l?u(l[0].length):c(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":s+="(?:",n+=3,s+=a()+"|$)";break;case"=":s+="(?=",n+=3,s+=a()+")";break;case"!":l=n,n+=3,a(),s+=r.substr(l,n-l);break;case"<":switch(r[n+3]){case"=":case"!":l=n,n+=4,a(),s+=r.substr(l,n-l);break;default:u(r.indexOf(">",n)-n+1),s+=a()+"|$)";break}break}else u(1),s+=a()+"|$)";break;case")":return++n,s;default:c(1);break}return s}return i(a,"process2"),o(a,"process"),new RegExp(a(),e.flags)}i(kd,"partialRegExp");o(kd,"partialRegExp");function Pd(e){return e.rules.find(t=>Qe(t)&&t.entry)}i(Pd,"getEntryRule");o(Pd,"getEntryRule");function Od(e){return e.rules.filter(t=>Ct(t)&&t.hidden)}i(Od,"getHiddenRules");o(Od,"getHiddenRules");function Il(e,t){let r=new Set,n=Pd(e);if(!n)return new Set(e.rules);let a=[n].concat(Od(e));for(let l of a)Ld(l,r,t);let s=new Set;for(let l of e.rules)(r.has(l.name)||Ct(l)&&l.hidden)&&s.add(l);return s}i(Il,"getAllReachableRules");o(Il,"getAllReachableRules");function Ld(e,t,r){t.add(e.name),$r(e).forEach(n=>{if(hr(n)||r&&Al(n)){let a=n.rule.ref;a&&!t.has(a.name)&&Ld(a,t,r)}})}i(Ld,"ruleDfs");o(Ld,"ruleDfs");function ny(e){let t=new Set;return $r(e).forEach(r=>{wn(r)&&(Qe(r.type.ref)&&t.add(r.type.ref),Rs(r.type.ref)&&Qe(r.type.ref.$container)&&t.add(r.type.ref.$container))}),t}i(ny,"getAllRulesUsedForCrossReferences");o(ny,"getAllRulesUsedForCrossReferences");function Dd(e){if(e.terminal)return e.terminal;if(e.type.ref)return Ol(e.type.ref)?.terminal}i(Dd,"getCrossReferenceTerminal");o(Dd,"getCrossReferenceTerminal");function Md(e){return e.hidden&&!wl(Es(e))}i(Md,"isCommentTerminal");o(Md,"isCommentTerminal");function xd(e,t){return!e||!t?[]:kl(e,t,e.astNode,!0)}i(xd,"findNodesForProperty");o(xd,"findNodesForProperty");function Nl(e,t,r){if(!e||!t)return;let n=kl(e,t,e.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}i(Nl,"findNodeForProperty");o(Nl,"findNodeForProperty");function kl(e,t,r,n){if(!n){let a=bn(e.grammarSource,dr);if(a&&a.feature===t)return[e]}return fr(e)&&e.astNode===r?e.content.flatMap(a=>kl(a,t,r,!1)):[]}i(kl,"findNodesForPropertyInternal");o(kl,"findNodesForPropertyInternal");function ay(e,t){return e?Pl(e,t,e?.astNode):[]}i(ay,"findNodesForKeyword");o(ay,"findNodesForKeyword");function Fd(e,t,r){if(!e)return;let n=Pl(e,t,e?.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}i(Fd,"findNodeForKeyword");o(Fd,"findNodeForKeyword");function Pl(e,t,r){if(e.astNode!==r)return[];if(pr(e.grammarSource)&&e.grammarSource.value===t)return[e];let n=ka(e).iterator(),a,s=[];do if(a=n.next(),!a.done){let l=a.value;l.astNode===r?pr(l.grammarSource)&&l.grammarSource.value===t&&s.push(l):n.prune()}while(!a.done);return s}i(Pl,"findNodesForKeywordInternal");o(Pl,"findNodesForKeywordInternal");function Gd(e){let t=e.astNode;for(;t===e.container?.astNode;){let r=bn(e.grammarSource,dr);if(r)return r;e=e.container}}i(Gd,"findAssignment");o(Gd,"findAssignment");function Ol(e){let t=e;return Rs(t)&&(Pr(t.$container)?t=t.$container.$container:Sn(t.$container)?t=t.$container:Fr(t.$container)),jd(e,t,new Map)}i(Ol,"findNameAssignment");o(Ol,"findNameAssignment");function jd(e,t,r){function n(a,s){let l;return bn(a,dr)||(l=jd(s,s,r)),r.set(e,l),l}if(i(n,"go"),o(n,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(let a of $r(t)){if(dr(a)&&a.feature.toLowerCase()==="name")return r.set(e,a),a;if(hr(a)&&Qe(a.rule.ref))return n(a,a.rule.ref);if($l(a)&&a.typeRef?.ref)return n(a,a.typeRef.ref)}}i(jd,"findNameAssignmentInternal");o(jd,"findNameAssignmentInternal");function Ud(e){let t=e.$container;if(In(t)){let r=t.elements,n=r.indexOf(e);for(let a=n-1;a>=0;a--){let s=r[a];if(Pr(s))return s;{let l=$r(r[a]).find(Pr);if(l)return l}}}if(Tl(t))return Ud(t)}i(Ud,"getActionAtElement");o(Ud,"getActionAtElement");function iy(e,t){return e==="?"||e==="*"||In(t)&&!!t.guardCondition}i(iy,"isOptionalCardinality");o(iy,"isOptionalCardinality");function sy(e){return e==="*"||e==="+"}i(sy,"isArrayCardinality");o(sy,"isArrayCardinality");function oy(e){return e==="+="}i(oy,"isArrayOperator");o(oy,"isArrayOperator");function $s(e){return zd(e,new Set)}i($s,"isDataTypeRule");o($s,"isDataTypeRule");function zd(e,t){if(t.has(e))return!0;t.add(e);for(let r of $r(e))if(hr(r)){if(!r.rule.ref||Qe(r.rule.ref)&&!zd(r.rule.ref,t)||Na(r.rule.ref))return!1}else{if(dr(r))return!1;if(Pr(r))return!1}return!!e.definition}i(zd,"isDataTypeRuleInternal");o(zd,"isDataTypeRuleInternal");function ly(e){return Wo(e.type,new Set)}i(ly,"isDataType");o(ly,"isDataType");function Wo(e,t){if(t.has(e))return!0;if(t.add(e),Qf(e))return!1;if(ud(e))return!1;if(hd(e))return e.types.every(r=>Wo(r,t));if($l(e)){if(e.primitiveType!==void 0)return!0;if(e.stringType!==void 0)return!0;if(e.typeRef!==void 0){let r=e.typeRef.ref;return El(r)?Wo(r.type,t):!1}else return!1}else return!1}i(Wo,"isDataTypeInternal");o(Wo,"isDataTypeInternal");function As(e){if(!Ct(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){let t=e.returnType.ref;if(t)return t.name}}}i(As,"getExplicitRuleType");o(As,"getExplicitRuleType");function Rn(e){if(Sn(e))return Qe(e)&&$s(e)?e.name:As(e)??e.name;if(id(e)||El(e)||fd(e))return e.name;if(Pr(e)){let t=Bd(e);if(t)return t}else if(Rs(e))return e.name;throw new Error("Cannot get name of Unknown Type")}i(Rn,"getTypeName");o(Rn,"getTypeName");function Bd(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return Rn(e.type.ref)}i(Bd,"getActionType");o(Bd,"getActionType");function uy(e){return Ct(e)?e.type?.name??"string":Qe(e)&&$s(e)?e.name:As(e)??e.name}i(uy,"getRuleTypeName");o(uy,"getRuleTypeName");function Kd(e){return Ct(e)?e.type?.name??"string":As(e)??e.name}i(Kd,"getRuleType");o(Kd,"getRuleType");function Es(e){let t={s:!1,i:!1,u:!1},r=Nn(e.definition,t),n=Object.entries(t).filter(([,a])=>a).map(([a])=>a).join("");return new RegExp(r,n)}i(Es,"terminalRegex");o(Es,"terminalRegex");var qd=/[\s\S]/.source;function Nn(e,t){if(dd(e))return cy(e);if(pd(e))return fy(e);if(td(e))return hy(e);if(Al(e)){let r=e.rule.ref;if(!r)throw new Error("Missing rule reference.");return Yt(Nn(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else{if(sd(e))return py(e);if(md(e))return dy(e);if(cd(e)){let r=e.regex.lastIndexOf("/"),n=e.regex.substring(1,r),a=e.regex.substring(r+1);return t&&(t.i=a.includes("i"),t.s=a.includes("s"),t.u=a.includes("u")),Yt(n,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else{if(gd(e))return Yt(qd,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}}}i(Nn,"abstractElementToRegex");o(Nn,"abstractElementToRegex");function cy(e){return Yt(e.elements.map(t=>Nn(t)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(cy,"terminalAlternativesToRegex");o(cy,"terminalAlternativesToRegex");function fy(e){return Yt(e.elements.map(t=>Nn(t)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(fy,"terminalGroupToRegex");o(fy,"terminalGroupToRegex");function dy(e){return Yt(`${qd}*?${Nn(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}i(dy,"untilTokenToRegex");o(dy,"untilTokenToRegex");function py(e){return Yt(`(?!${Nn(e.terminal)})${qd}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}i(py,"negateTokenToRegex");o(py,"negateTokenToRegex");function hy(e){return e.right?Yt(`[${fo(e.left)}-${fo(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):Yt(fo(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(hy,"characterRangeToRegex");o(hy,"characterRangeToRegex");function fo(e){return ja(e.value)}i(fo,"keywordToRegex");o(fo,"keywordToRegex");function Yt(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?`${e}${t.cardinality}`:e}i(Yt,"withCardinality");o(Yt,"withCardinality");function Wd(e){let t=[],r=e.Grammar;for(let n of r.rules)Ct(n)&&Md(n)&&Id(Es(n))&&t.push(n.name);return{multilineCommentRules:t,nameRegexp:$d}}i(Wd,"createGrammarConfig");o(Wd,"createGrammarConfig");var lw=typeof global=="object"&&global&&global.Object===Object&&global,my=lw,uw=typeof self=="object"&&self&&self.Object===Object&&self,cw=my||uw||Function("return this")(),Jt=cw,fw=Jt.Symbol,Et=fw,gy=Object.prototype,dw=gy.hasOwnProperty,pw=gy.toString,gi=Et?Et.toStringTag:void 0;function yy(e){var t=dw.call(e,gi),r=e[gi];try{e[gi]=void 0;var n=!0}catch{}var a=pw.call(e);return n&&(t?e[gi]=r:delete e[gi]),a}i(yy,"getRawTag");o(yy,"getRawTag");var hw=yy,mw=Object.prototype,gw=mw.toString;function vy(e){return gw.call(e)}i(vy,"objectToString");o(vy,"objectToString");var yw=vy,vw="[object Null]",Tw="[object Undefined]",Oh=Et?Et.toStringTag:void 0;function Ty(e){return e==null?e===void 0?Tw:vw:Oh&&Oh in Object(e)?hw(e):yw(e)}i(Ty,"baseGetTag");o(Ty,"baseGetTag");var Gr=Ty;function Ry(e){return e!=null&&typeof e=="object"}i(Ry,"isObjectLike");o(Ry,"isObjectLike");var Dt=Ry,Rw="[object Symbol]";function $y(e){return typeof e=="symbol"||Dt(e)&&Gr(e)==Rw}i($y,"isSymbol");o($y,"isSymbol");var Ll=$y;function Ay(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r0){if(++t>=nI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}i(Gy,"shortOut");o(Gy,"shortOut");var sI=Gy;function jy(e){return function(){return e}}i(jy,"constant");o(jy,"constant");var oI=jy,lI=(function(){try{var e=Pn(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Vo=lI,uI=Vo?function(e,t){return Vo(e,"toString",{configurable:!0,enumerable:!1,value:oI(t),writable:!0})}:Oa,cI=uI,fI=sI(cI),dI=fI;function Uy(e,t){for(var r=-1,n=e==null?0:e.length;++r-1}i(Hy,"arrayIncludes");o(Hy,"arrayIncludes");var Yy=Hy,mI=9007199254740991,gI=/^(?:0|[1-9]\d*)$/;function Xy(e,t){var r=typeof e;return t=t??mI,!!t&&(r=="number"||r!="symbol"&&gI.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=RI}i(nv,"isLength");o(nv,"isLength");var Jd=nv;function av(e){return e!=null&&Jd(e.length)&&!Ar(e)}i(av,"isArrayLike");o(av,"isArrayLike");var Zt=av;function iv(e,t,r){if(!_t(r))return!1;var n=typeof t;return(n=="number"?Zt(r)&&Dl(t,r.length):n=="string"&&t in r)?bs(r[t],e):!1}i(iv,"isIterateeCall");o(iv,"isIterateeCall");var xl=iv;function sv(e){return Xd(function(t,r){var n=-1,a=r.length,s=a>1?r[a-1]:void 0,l=a>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(a--,s):void 0,l&&xl(r[0],r[1],l)&&(s=a<3?void 0:s,a=1),t=Object(t);++n-1}i(Mv,"listCacheHas");o(Mv,"listCacheHas");var FN=Mv;function xv(e,t){var r=this.__data__,n=jl(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}i(xv,"listCacheSet");o(xv,"listCacheSet");var GN=xv;function Ln(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0&&r(u)?t>1?rp(u,t-1,r,n,a):tp(a,u):n||(a[a.length]=u)}return a}i(rp,"baseFlatten");o(rp,"baseFlatten");var np=rp;function Qv(e){var t=e==null?0:e.length;return t?np(e,1):[]}i(Qv,"flatten");o(Qv,"flatten");var Ot=Qv,ik=Tv(Object.getPrototypeOf,Object),eT=ik;function tT(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(a);++nu))return!1;var f=s.get(e),d=s.get(t);if(f&&d)return f==t&&d==e;var p=-1,m=!0,v=r&YP?new op:void 0;for(s.set(e,t),s.set(t,e);++p2?t[2]:void 0;for(a&&xl(t[0],t[1],a)&&(n=1);++r=z0&&(s=lp,l=!1,t=new op(t));e:for(;++a-1?a[s?t[l]:l]:void 0}}i(MR,"createFind");o(MR,"createFind");var H0=MR,Y0=Math.max;function xR(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:Cs(r);return a<0&&(a=Y0(n+a,0)),Ky(e,Qt(t,3),a)}i(xR,"findIndex");o(xR,"findIndex");var X0=xR,J0=H0(X0),Da=J0;function FR(e){return e&&e.length?e[0]:void 0}i(FR,"head");o(FR,"head");var Mt=FR;function GR(e,t){var r=-1,n=Zt(e)?Array(e.length):[];return xn(e,function(a,s,l){n[++r]=t(a,s,l)}),n}i(GR,"baseMap");o(GR,"baseMap");var Z0=GR;function jR(e,t){var r=re(e)?_s:Z0;return r(e,Qt(t,3))}i(jR,"map");o(jR,"map");var G=jR;function UR(e,t){return np(G(e,t),1)}i(UR,"flatMap");o(UR,"flatMap");var At=UR,Q0=Object.prototype,eO=Q0.hasOwnProperty,tO=G0(function(e,t,r){eO.call(e,r)?e[r].push(t):Yd(e,r,[t])}),rO=tO,nO=Object.prototype,aO=nO.hasOwnProperty;function zR(e,t){return e!=null&&aO.call(e,t)}i(zR,"baseHas");o(zR,"baseHas");var iO=zR;function BR(e,t){return e!=null&&oR(e,t,iO)}i(BR,"has");o(BR,"has");var B=BR,sO="[object String]";function KR(e){return typeof e=="string"||!re(e)&&Dt(e)&&Gr(e)==sO}i(KR,"isString");o(KR,"isString");var ot=KR;function qR(e,t){return _s(t,function(r){return e[r]})}i(qR,"baseValues");o(qR,"baseValues");var oO=qR;function WR(e){return e==null?[]:oO(e,pt(e))}i(WR,"values");o(WR,"values");var xe=WR,lO=Math.max;function VR(e,t,r,n){e=Zt(e)?e:xe(e),r=r&&!n?Cs(r):0;var a=e.length;return r<0&&(r=lO(a+r,0)),ot(e)?r<=a&&e.indexOf(t,r)>-1:!!a&&Hd(e,t,r)>-1}i(VR,"includes");o(VR,"includes");var nt=VR,uO=Math.max;function HR(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:Cs(r);return a<0&&(a=uO(n+a,0)),Hd(e,t,a)}i(HR,"indexOf");o(HR,"indexOf");var fm=HR,cO="[object Map]",fO="[object Set]",dO=Object.prototype,pO=dO.hasOwnProperty;function YR(e){if(e==null)return!0;if(Zt(e)&&(re(e)||typeof e=="string"||typeof e.splice=="function"||rs(e)||Zd(e)||Fl(e)))return!e.length;var t=La(e);if(t==cO||t==fO)return!e.size;if(ws(e))return!$v(e).length;for(var r in e)if(pO.call(e,r))return!1;return!0}i(YR,"isEmpty");o(YR,"isEmpty");var he=YR,hO="[object RegExp]";function XR(e){return Dt(e)&&Gr(e)==hO}i(XR,"baseIsRegExp");o(XR,"baseIsRegExp");var mO=XR,dm=Or&&Or.isRegExp,gO=dm?Is(dm):mO,mr=gO;function JR(e){return e===void 0}i(JR,"isUndefined");o(JR,"isUndefined");var gr=JR,yO="Expected a function";function ZR(e){if(typeof e!="function")throw new TypeError(yO);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}i(ZR,"negate");o(ZR,"negate");var vO=ZR;function QR(e,t,r,n){if(!_t(e))return e;t=ql(t,e);for(var a=-1,s=t.length,l=s-1,u=e;u!=null&&++a=bO){var f=t?null:CO(e);if(f)return up(f);l=!1,a=lp,c=new op}else c=t?[]:u;e:for(;++n{t.accept(e)})}},et=class extends er{static{i(this,"NonTerminal")}static{o(this,"NonTerminal")}constructor(e){super([]),this.idx=1,ht(this,xt(e,t=>t!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Ua=class extends er{static{i(this,"Rule")}static{o(this,"Rule")}constructor(e){super(e.definition),this.orgText="",ht(this,xt(e,t=>t!==void 0))}},lt=class extends er{static{i(this,"Alternative")}static{o(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,ht(this,xt(e,t=>t!==void 0))}},We=class extends er{static{i(this,"Option")}static{o(this,"Option")}constructor(e){super(e.definition),this.idx=1,ht(this,xt(e,t=>t!==void 0))}},gt=class extends er{static{i(this,"RepetitionMandatory")}static{o(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,ht(this,xt(e,t=>t!==void 0))}},yt=class extends er{static{i(this,"RepetitionMandatoryWithSeparator")}static{o(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,ht(this,xt(e,t=>t!==void 0))}},Se=class extends er{static{i(this,"Repetition")}static{o(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,ht(this,xt(e,t=>t!==void 0))}},ut=class extends er{static{i(this,"RepetitionWithSeparator")}static{o(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,ht(this,xt(e,t=>t!==void 0))}},ct=class extends er{static{i(this,"Alternation")}static{o(this,"Alternation")}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,ht(this,xt(e,t=>t!==void 0))}},Te=class{static{i(this,"Terminal")}static{o(this,"Terminal")}constructor(e){this.idx=1,ht(this,xt(e,t=>t!==void 0))}accept(e){e.visit(this)}};function d$(e){return G(e,Yi)}i(d$,"serializeGrammar");o(d$,"serializeGrammar");function Yi(e){function t(r){return G(r,Yi)}if(i(t,"convertDefinition"),o(t,"convertDefinition"),e instanceof et){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return ot(e.label)&&(r.label=e.label),r}else{if(e instanceof lt)return{type:"Alternative",definition:t(e.definition)};if(e instanceof We)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof gt)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof yt)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Yi(new Te({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof ut)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Yi(new Te({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Se)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof ct)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof Te){let r={type:"Terminal",name:e.terminalType.name,label:c$(e.terminalType),idx:e.idx};ot(e.label)&&(r.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=mr(n)?n.source:n),r}else{if(e instanceof Ua)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}i(Yi,"serializeProduction");o(Yi,"serializeProduction");var za=class{static{i(this,"GAstVisitor")}static{o(this,"GAstVisitor")}visit(e){let t=e;switch(t.constructor){case et:return this.visitNonTerminal(t);case lt:return this.visitAlternative(t);case We:return this.visitOption(t);case gt:return this.visitRepetitionMandatory(t);case yt:return this.visitRepetitionMandatoryWithSeparator(t);case ut:return this.visitRepetitionWithSeparator(t);case Se:return this.visitRepetition(t);case ct:return this.visitAlternation(t);case Te:return this.visitTerminal(t);case Ua:return this.visitRule(t);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 p$(e){return e instanceof lt||e instanceof We||e instanceof Se||e instanceof gt||e instanceof yt||e instanceof ut||e instanceof Te||e instanceof Ua}i(p$,"isSequenceProd");o(p$,"isSequenceProd");function os(e,t=[]){return e instanceof We||e instanceof Se||e instanceof ut?!0:e instanceof ct?o$(e.definition,n=>os(n,t)):e instanceof et&&nt(t,e)?!1:e instanceof er?(e instanceof et&&t.push(e),Lt(e.definition,n=>os(n,t))):!1}i(os,"isOptionalProd");o(os,"isOptionalProd");function h$(e){return e instanceof ct}i(h$,"isBranchingProd");o(h$,"isBranchingProd");function It(e){if(e instanceof et)return"SUBRULE";if(e instanceof We)return"OPTION";if(e instanceof ct)return"OR";if(e instanceof gt)return"AT_LEAST_ONE";if(e instanceof yt)return"AT_LEAST_ONE_SEP";if(e instanceof ut)return"MANY_SEP";if(e instanceof Se)return"MANY";if(e instanceof Te)return"CONSUME";throw Error("non exhaustive match")}i(It,"getProductionDslName");o(It,"getProductionDslName");var Hl=class{static{i(this,"RestWalker")}static{o(this,"RestWalker")}walk(e,t=[]){q(e.definition,(r,n)=>{let a=qe(e.definition,n+1);if(r instanceof et)this.walkProdRef(r,a,t);else if(r instanceof Te)this.walkTerminal(r,a,t);else if(r instanceof lt)this.walkFlat(r,a,t);else if(r instanceof We)this.walkOption(r,a,t);else if(r instanceof gt)this.walkAtLeastOne(r,a,t);else if(r instanceof yt)this.walkAtLeastOneSep(r,a,t);else if(r instanceof ut)this.walkManySep(r,a,t);else if(r instanceof Se)this.walkMany(r,a,t);else if(r instanceof ct)this.walkOr(r,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){let n=t.concat(r);this.walk(e,n)}walkOption(e,t,r){let n=t.concat(r);this.walk(e,n)}walkAtLeastOne(e,t,r){let n=[new We({definition:e.definition})].concat(t,r);this.walk(e,n)}walkAtLeastOneSep(e,t,r){let n=ef(e,t,r);this.walk(e,n)}walkMany(e,t,r){let n=[new We({definition:e.definition})].concat(t,r);this.walk(e,n)}walkManySep(e,t,r){let n=ef(e,t,r);this.walk(e,n)}walkOr(e,t,r){let n=t.concat(r);q(e.definition,a=>{let s=new lt({definition:[a]});this.walk(s,n)})}};function ef(e,t,r){return[new We({definition:[new Te({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}i(ef,"restForRepetitionWithSeparator");o(ef,"restForRepetitionWithSeparator");function Ba(e){if(e instanceof et)return Ba(e.referencedRule);if(e instanceof Te)return y$(e);if(p$(e))return m$(e);if(h$(e))return g$(e);throw Error("non exhaustive match")}i(Ba,"first");o(Ba,"first");function m$(e){let t=[],r=e.definition,n=0,a=r.length>n,s,l=!0;for(;a&&l;)s=r[n],l=os(s),t=t.concat(Ba(s)),n=n+1,a=r.length>n;return dp(t)}i(m$,"firstForSequence");o(m$,"firstForSequence");function g$(e){let t=G(e.definition,r=>Ba(r));return dp(Ot(t))}i(g$,"firstForBranching");o(g$,"firstForBranching");function y$(e){return[e.terminalType]}i(y$,"firstForTerminal");o(y$,"firstForTerminal");var v$="_~IN~_",wO=class extends Hl{static{i(this,"ResyncFollowsWalker")}static{o(this,"ResyncFollowsWalker")}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){let n=R$(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(r),s=new lt({definition:a}),l=Ba(s);this.follows[n]=l}};function T$(e){let t={};return q(e,r=>{let n=new wO(r).startWalking();ht(t,n)}),t}i(T$,"computeAllProdsFollows");o(T$,"computeAllProdsFollows");function R$(e,t){return e.name+t+v$}i(R$,"buildBetweenProdsFollowPrefix");o(R$,"buildBetweenProdsFollowPrefix");var po={},IO=new Zg;function Ps(e){let t=e.toString();if(po.hasOwnProperty(t))return po[t];{let r=IO.pattern(t);return po[t]=r,r}}i(Ps,"getRegExpAst");o(Ps,"getRegExpAst");function $$(){po={}}i($$,"clearRegExpParserCache");o($$,"clearRegExpParserCache");var A$="Complement Sets are not supported for first char optimization",Xo=`Unable to use "first char" lexer optimizations: `;function E$(e,t=!1){try{let r=Ps(e);return Jo(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===A$)t&&pp(`${Xo} Unable to optimize: < ${e.toString()} > Complement Sets cannot be automatically optimized. This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n=` This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Yo(`${Xo} Failed parsing: < ${e.toString()} > Using the @chevrotain/regexp-to-ast library Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}i(E$,"getOptimizedStartCodesIndices");o(E$,"getOptimizedStartCodesIndices");function Jo(e,t,r){switch(e.type){case"Disjunction":for(let a=0;a{if(typeof c=="number")Oi(c,t,r);else{let f=c;if(r===!0)for(let d=f.from;d<=f.to;d++)Oi(d,t,r);else{for(let d=f.from;d<=f.to&&d=Di){let d=f.from>=Di?f.from:Di,p=f.to,m=yr(d),v=yr(p);for(let T=m;T<=v;T++)t[T]=T}}}});break;case"Group":Jo(l.value,t,r);break;default:throw Error("Non Exhaustive Match")}let u=l.quantifier!==void 0&&l.quantifier.atLeast===0;if(l.type==="Group"&&Zo(l)===!1||l.type!=="Group"&&u===!1)break}break;default:throw Error("non exhaustive match!")}return xe(t)}i(Jo,"firstCharOptimizedIndices");o(Jo,"firstCharOptimizedIndices");function Oi(e,t,r){let n=yr(e);t[n]=n,r===!0&&_$(e,t)}i(Oi,"addOptimizedIdxToResult");o(Oi,"addOptimizedIdxToResult");function _$(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let a=yr(n.charCodeAt(0));t[a]=a}else{let a=r.toLowerCase();if(a!==r){let s=yr(a.charCodeAt(0));t[s]=s}}}i(_$,"handleIgnoreCase");o(_$,"handleIgnoreCase");function tf(e,t){return Da(e.value,r=>{if(typeof r=="number")return nt(t,r);{let n=r;return Da(t,a=>n.from<=a&&a<=n.to)!==void 0}})}i(tf,"findCode");o(tf,"findCode");function Zo(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?re(e.value)?Lt(e.value,Zo):Zo(e.value):!1}i(Zo,"isWholeOptional");o(Zo,"isWholeOptional");var NO=class extends Sl{static{i(this,"CharCodeFinder")}static{o(this,"CharCodeFinder")}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){nt(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?tf(e,this.targetCharCodes)===void 0&&(this.found=!0):tf(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function Yl(e,t){if(t instanceof RegExp){let r=Ps(t),n=new NO(e);return n.visit(r),n.found}else return Da(t,r=>nt(e,r.charCodeAt(0)))!==void 0}i(Yl,"canMatchCharCode");o(Yl,"canMatchCharCode");var An="PATTERN",Li="defaultMode",js="modes",C$=typeof new RegExp("(?:)").sticky=="boolean";function b$(e,t){t=fp(t,{useSticky:C$,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` `],tracer:o((S,_)=>_(),"tracer")});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{V$()});let n;r("Reject Lexer.NA",()=>{n=Vl(e,S=>S[An]===Ze.NA)});let a=!1,s;r("Transform Patterns",()=>{a=!1,s=G(n,S=>{let _=S[An];if(mr(_)){let P=_.source;return P.length===1&&P!=="^"&&P!=="$"&&P!=="."&&!_.ignoreCase?P:P.length===2&&P[0]==="\\"&&!nt(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],P[1])?P[1]:t.useSticky?nf(_):rf(_)}else{if(Ar(_))return a=!0,{exec:_};if(typeof _=="object")return a=!0,_;if(typeof _=="string"){if(_.length===1)return _;{let P=_.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),j=new RegExp(P);return t.useSticky?nf(j):rf(j)}}else throw Error("non exhaustive match")}})});let l,u,c,f,d;r("misc mapping",()=>{l=G(n,S=>S.tokenTypeIdx),u=G(n,S=>{let _=S.GROUP;if(_!==Ze.SKIPPED){if(ot(_))return _;if(gr(_))return!1;throw Error("non exhaustive match")}}),c=G(n,S=>{let _=S.LONGER_ALT;if(_)return re(_)?G(_,j=>fm(n,j)):[fm(n,_)]}),f=G(n,S=>S.PUSH_MODE),d=G(n,S=>B(S,"POP_MODE"))});let p;r("Line Terminator Handling",()=>{let S=vp(t.lineTerminatorCharacters);p=G(n,_=>!1),t.positionTracking!=="onlyOffset"&&(p=G(n,_=>B(_,"LINE_BREAKS")?!!_.LINE_BREAKS:yp(_,S)===!1&&Yl(S,_.PATTERN)))});let m,v,T,w;r("Misc Mapping #2",()=>{m=G(n,gp),v=G(s,q$),T=mt(n,(S,_)=>{let P=_.GROUP;return ot(P)&&P!==Ze.SKIPPED&&(S[P]=[]),S},{}),w=G(s,(S,_)=>({pattern:s[_],longerAlt:c[_],canLineTerminator:p[_],isCustom:m[_],short:v[_],group:u[_],push:f[_],pop:d[_],tokenTypeIdx:l[_],tokenType:n[_]}))});let N=!0,I=[];return t.safeMode||r("First Char Optimization",()=>{I=mt(n,(S,_,P)=>{if(typeof _.PATTERN=="string"){let j=_.PATTERN.charCodeAt(0),ee=yr(j);ho(S,ee,w[P])}else if(re(_.START_CHARS_HINT)){let j;q(_.START_CHARS_HINT,ee=>{let X=typeof ee=="string"?ee.charCodeAt(0):ee,ce=yr(X);j!==ce&&(j=ce,ho(S,ce,w[P]))})}else if(mr(_.PATTERN))if(_.PATTERN.unicode)N=!1,t.ensureOptimizations&&Yo(`${Xo} Unable to analyze < ${_.PATTERN.toString()} > pattern. The regexp unicode flag is not currently supported by the regexp-to-ast library. This will disable the lexer's first char optimizations. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let j=E$(_.PATTERN,t.ensureOptimizations);he(j)&&(N=!1),q(j,ee=>{ho(S,ee,w[P])})}else t.ensureOptimizations&&Yo(`${Xo} TokenType: <${_.name}> is using a custom token pattern without providing parameter. This will disable the lexer's first char optimizations. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),N=!1;return S},[])}),{emptyGroups:T,patternIdxToConfig:w,charCodeToPatternIdxToConfig:I,hasCustom:a,canBeOptimized:N}}i(b$,"analyzeTokenTypes");o(b$,"analyzeTokenTypes");function S$(e,t){let r=[],n=I$(e);r=r.concat(n.errors);let a=N$(n.valid),s=a.valid;return r=r.concat(a.errors),r=r.concat(w$(s)),r=r.concat(M$(s)),r=r.concat(x$(s,t)),r=r.concat(F$(s)),r}i(S$,"validatePatterns");o(S$,"validatePatterns");function w$(e){let t=[],r=bt(e,n=>mr(n[An]));return t=t.concat(k$(r)),t=t.concat(O$(r)),t=t.concat(L$(r)),t=t.concat(D$(r)),t=t.concat(P$(r)),t}i(w$,"validateRegExpPattern");o(w$,"validateRegExpPattern");function I$(e){let t=bt(e,a=>!B(a,An)),r=G(t,a=>({message:"Token Type: ->"+a.name+"<- missing static 'PATTERN' property",type:we.MISSING_PATTERN,tokenTypes:[a]})),n=Wl(e,t);return{errors:r,valid:n}}i(I$,"findMissingPatterns");o(I$,"findMissingPatterns");function N$(e){let t=bt(e,a=>{let s=a[An];return!mr(s)&&!Ar(s)&&!B(s,"exec")&&!ot(s)}),r=G(t,a=>({message:"Token Type: ->"+a.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:we.INVALID_PATTERN,tokenTypes:[a]})),n=Wl(e,t);return{errors:r,valid:n}}i(N$,"findInvalidPatterns");o(N$,"findInvalidPatterns");var kO=/[^\\][$]/;function k$(e){class t extends Sl{static{i(this,"EndAnchorFinder")}static{o(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}let r=bt(e,a=>{let s=a.PATTERN;try{let l=Ps(s),u=new t;return u.visit(l),u.found}catch{return kO.test(s.source)}});return G(r,a=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+a.name+`<- static 'PATTERN' cannot contain end of input anchor '$' See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:we.EOI_ANCHOR_FOUND,tokenTypes:[a]}))}i(k$,"findEndOfInputAnchor");o(k$,"findEndOfInputAnchor");function P$(e){let t=bt(e,n=>n.PATTERN.test(""));return G(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:we.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}i(P$,"findEmptyMatchRegExps");o(P$,"findEmptyMatchRegExps");var PO=/[^\\[][\^]|^\^/;function O$(e){class t extends Sl{static{i(this,"StartAnchorFinder")}static{o(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}let r=bt(e,a=>{let s=a.PATTERN;try{let l=Ps(s),u=new t;return u.visit(l),u.found}catch{return PO.test(s.source)}});return G(r,a=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+a.name+`<- static 'PATTERN' cannot contain start of input anchor '^' See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:we.SOI_ANCHOR_FOUND,tokenTypes:[a]}))}i(O$,"findStartOfInputAnchor");o(O$,"findStartOfInputAnchor");function L$(e){let t=bt(e,n=>{let a=n[An];return a instanceof RegExp&&(a.multiline||a.global)});return G(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:we.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}i(L$,"findUnsupportedFlags");o(L$,"findUnsupportedFlags");function D$(e){let t=[],r=G(e,s=>mt(e,(l,u)=>(s.PATTERN.source===u.PATTERN.source&&!nt(t,u)&&u.PATTERN!==Ze.NA&&(t.push(u),l.push(u)),l),[]));r=ks(r);let n=bt(r,s=>s.length>1);return G(n,s=>{let l=G(s,c=>c.name);return{message:`The same RegExp pattern ->${Mt(s).PATTERN}<-has been used in all of the following Token Types: ${l.join(", ")} <-`,type:we.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}i(D$,"findDuplicatePatterns");o(D$,"findDuplicatePatterns");function M$(e){let t=bt(e,n=>{if(!B(n,"GROUP"))return!1;let a=n.GROUP;return a!==Ze.SKIPPED&&a!==Ze.NA&&!ot(a)});return G(t,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:we.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}i(M$,"findInvalidGroupType");o(M$,"findInvalidGroupType");function x$(e,t){let r=bt(e,a=>a.PUSH_MODE!==void 0&&!nt(t,a.PUSH_MODE));return G(r,a=>({message:`Token Type: ->${a.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${a.PUSH_MODE}<-which does not exist`,type:we.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[a]}))}i(x$,"findModesThatDoNotExist");o(x$,"findModesThatDoNotExist");function F$(e){let t=[],r=mt(e,(n,a,s)=>{let l=a.PATTERN;return l===Ze.NA||(ot(l)?n.push({str:l,idx:s,tokenType:a}):mr(l)&&j$(l)&&n.push({str:l.source,idx:s,tokenType:a})),n},[]);return q(e,(n,a)=>{q(r,({str:s,idx:l,tokenType:u})=>{if(a${u.name}<- can never be matched. Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:c,type:we.UNREACHABLE_PATTERN,tokenTypes:[n,u]})}})}),t}i(F$,"findUnreachablePatterns");o(F$,"findUnreachablePatterns");function G$(e,t){if(mr(t)){if(U$(t))return!1;let r=t.exec(e);return r!==null&&r.index===0}else{if(Ar(t))return t(e,0,[],{});if(B(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}i(G$,"tryToMatchStrToPattern");o(G$,"tryToMatchStrToPattern");function j$(e){return Da([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}i(j$,"noMetaChar");o(j$,"noMetaChar");function U$(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition `,type:we.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),B(e,js)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+js+`> property in its definition `,type:we.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),B(e,js)&&B(e,Li)&&!B(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Li}: <${e.defaultMode}>which does not exist `,type:we.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),B(e,js)&&q(e.modes,(a,s)=>{q(a,(l,u)=>{if(gr(l))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${s}> at index: <${u}> `,type:we.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(B(l,"LONGER_ALT")){let c=re(l.LONGER_ALT)?l.LONGER_ALT:[l.LONGER_ALT];q(c,f=>{!gr(f)&&!nt(a,f)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${f.name}> on token <${l.name}> outside of mode <${s}> `,type:we.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}i(z$,"performRuntimeChecks");o(z$,"performRuntimeChecks");function B$(e,t,r){let n=[],a=!1,s=ks(Ot(xe(e.modes))),l=Vl(s,c=>c[An]===Ze.NA),u=vp(r);return t&&q(l,c=>{let f=yp(c,u);if(f!==!1){let p={message:W$(c,f),type:f.issue,tokenType:c};n.push(p)}else B(c,"LINE_BREAKS")?c.LINE_BREAKS===!0&&(a=!0):Yl(u,c.PATTERN)&&(a=!0)}),t&&!a&&n.push({message:`Warning: No LINE_BREAKS Found. This Lexer has been defined to track line and column information, But none of the Token Types can be identified as matching a line terminator. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS for details.`,type:we.NO_LINE_BREAKS_FLAGS}),n}i(B$,"performWarningRuntimeChecks");o(B$,"performWarningRuntimeChecks");function K$(e){let t={},r=pt(e);return q(r,n=>{let a=e[n];if(re(a))t[n]=[];else throw Error("non exhaustive match")}),t}i(K$,"cloneEmptyGroups");o(K$,"cloneEmptyGroups");function gp(e){let t=e.PATTERN;if(mr(t))return!1;if(Ar(t))return!0;if(B(t,"exec"))return!0;if(ot(t))return!1;throw Error("non exhaustive match")}i(gp,"isCustomPattern");o(gp,"isCustomPattern");function q$(e){return ot(e)&&e.length===1?e.charCodeAt(0):!1}i(q$,"isShortPattern");o(q$,"isShortPattern");var OO={test:o(function(e){let t=e.length;for(let r=this.lastIndex;r Token Type Root cause: ${t.errMsg}. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===we.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. The problem is in the <${e.name}> Token Type For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}i(W$,"buildLineBreakIssueMessage");o(W$,"buildLineBreakIssueMessage");function vp(e){return G(e,r=>ot(r)?r.charCodeAt(0):r)}i(vp,"getCharCodes");o(vp,"getCharCodes");function ho(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}i(ho,"addToMapOfArrays");o(ho,"addToMapOfArrays");var Di=256,mo=[];function yr(e){return e255?255+~~(e/255):e}}i(V$,"initCharCodeToOptimizedIndexMap");o(V$,"initCharCodeToOptimizedIndexMap");function Ka(e,t){let r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}i(Ka,"tokenStructuredMatcher");o(Ka,"tokenStructuredMatcher");function ls(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}i(ls,"tokenStructuredMatcherNoCategories");o(ls,"tokenStructuredMatcherNoCategories");var pm=1,H$={};function qa(e){let t=Y$(e);X$(t),Z$(t),J$(t),q(t,r=>{r.isParent=r.categoryMatches.length>0})}i(qa,"augmentTokenTypes");o(qa,"augmentTokenTypes");function Y$(e){let t=Ve(e),r=e,n=!0;for(;n;){r=ks(Ot(G(r,s=>s.CATEGORIES)));let a=Wl(r,t);t=t.concat(a),he(a)?n=!1:r=a}return t}i(Y$,"expandCategories");o(Y$,"expandCategories");function X$(e){q(e,t=>{Rp(t)||(H$[pm]=t,t.tokenTypeIdx=pm++),af(t)&&!re(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),af(t)||(t.CATEGORIES=[]),Q$(t)||(t.categoryMatches=[]),eA(t)||(t.categoryMatchesMap={})})}i(X$,"assignTokenDefaultProps");o(X$,"assignTokenDefaultProps");function J$(e){q(e,t=>{t.categoryMatches=[],q(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(H$[n].tokenTypeIdx)})})}i(J$,"assignCategoriesTokensProp");o(J$,"assignCategoriesTokensProp");function Z$(e){q(e,t=>{Tp([],t)})}i(Z$,"assignCategoriesMapProp");o(Z$,"assignCategoriesMapProp");function Tp(e,t){q(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),q(t.CATEGORIES,r=>{let n=e.concat(t);nt(n,r)||Tp(n,r)})}i(Tp,"singleAssignCategoriesToksMap");o(Tp,"singleAssignCategoriesToksMap");function Rp(e){return B(e,"tokenTypeIdx")}i(Rp,"hasShortKeyProperty");o(Rp,"hasShortKeyProperty");function af(e){return B(e,"CATEGORIES")}i(af,"hasCategoriesProperty");o(af,"hasCategoriesProperty");function Q$(e){return B(e,"categoryMatches")}i(Q$,"hasExtendingTokensTypesProperty");o(Q$,"hasExtendingTokensTypesProperty");function eA(e){return B(e,"categoryMatchesMap")}i(eA,"hasExtendingTokensTypesMapProperty");o(eA,"hasExtendingTokensTypesMapProperty");function tA(e){return B(e,"tokenTypeIdx")}i(tA,"isTokenType");o(tA,"isTokenType");var sf={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,a,s){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}},we;(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(we||(we={}));var Mi={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:sf,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Mi);var Ze=class{static{i(this,"Lexer")}static{o(this,"Lexer")}constructor(e,t=Mi){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=(n,a)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${n}>`);let{time:l,value:u}=hp(a),c=l>10?console.warn:console.log;return this.traceInitIndent time: ${l}ms`),this.traceInitIndent--,u}else return a()},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. a boolean 2nd argument is no longer supported`);this.config=ht({},Mi,t);let r=this.config.traceInitPerf;r===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof r=="number"&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let n,a=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Mi.lineTerminatorsPattern)this.config.lineTerminatorsPattern=OO;else if(this.config.lineTerminatorCharacters===Mi.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.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),re(e)?n={modes:{defaultMode:Ve(e)},defaultMode:Li}:(a=!1,n=Ve(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(z$(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(B$(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},q(n.modes,(l,u)=>{n.modes[u]=Vl(l,c=>gr(c))});let s=pt(n.modes);if(q(n.modes,(l,u)=>{this.TRACE_INIT(`Mode: <${u}> processing`,()=>{if(this.modes.push(u),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(S$(l,s))}),he(this.lexerDefinitionErrors)){qa(l);let c;this.TRACE_INIT("analyzeTokenTypes",()=>{c=b$(l,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[u]=c.patternIdxToConfig,this.charCodeToPatternIdxToConfig[u]=c.charCodeToPatternIdxToConfig,this.emptyGroups=ht({},this.emptyGroups,c.emptyGroups),this.hasCustom=c.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=c.canBeOptimized}})}),this.defaultMode=n.defaultMode,!he(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let u=G(this.lexerDefinitionErrors,c=>c.message).join(`----------------------- `);throw new Error(`Errors detected in definition of Lexer: `+u)}q(this.lexerDefinitionWarning,l=>{pp(l.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(C$?(this.chopInput=Oa,this.match=this.matchWithTest):(this.updateLastIndex=Me,this.match=this.matchWithExec),a&&(this.handleModes=Me),this.trackStartLines===!1&&(this.computeNewColumn=Oa),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Me),/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 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 l=mt(this.canModeBeOptimized,(u,c,f)=>(c===!1&&u.push(f),u),[]);if(t.ensureOptimizations&&!he(l))throw Error(`Lexer Modes: < ${l.join(", ")} > cannot be optimized. Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{$$()}),this.TRACE_INIT("toFastProperties",()=>{mp(this)})})}tokenize(e,t=this.defaultMode){if(!he(this.lexerDefinitionErrors)){let n=G(this.lexerDefinitionErrors,a=>a.message).join(`----------------------- `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: `+n)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,n,a,s,l,u,c,f,d,p,m,v,T,w,N,I,S=e,_=S.length,P=0,j=0,ee=this.hasCustom?0:Math.floor(e.length/10),X=new Array(ee),ce=[],me=this.trackStartLines?1:void 0,Re=this.trackStartLines?1:void 0,O=K$(this.emptyGroups),C=this.trackStartLines,y=this.config.lineTerminatorsPattern,E=0,R=[],$=[],b=[],L=[];Object.freeze(L);let x;function M(){return R}i(M,"getPossiblePatternsSlow"),o(M,"getPossiblePatternsSlow");function U(ie){let Le=yr(ie),Ue=$[Le];return Ue===void 0?L:Ue}i(U,"getPossiblePatternsOptimized"),o(U,"getPossiblePatternsOptimized");let W=o(ie=>{if(b.length===1&&ie.tokenType.PUSH_MODE===void 0){let Le=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(ie);ce.push({offset:ie.startOffset,line:ie.startLine,column:ie.startColumn,length:ie.image.length,message:Le})}else{b.pop();let Le=$n(b);R=this.patternIdxToConfig[Le],$=this.charCodeToPatternIdxToConfig[Le],E=R.length;let Ue=this.canModeBeOptimized[Le]&&this.config.safeMode===!1;$&&Ue?x=U:x=M}},"pop_mode");function le(ie){b.push(ie),$=this.charCodeToPatternIdxToConfig[ie],R=this.patternIdxToConfig[ie],E=R.length,E=R.length;let Le=this.canModeBeOptimized[ie]&&this.config.safeMode===!1;$&&Le?x=U:x=M}i(le,"push_mode"),o(le,"push_mode"),le.call(this,t);let H,Oe=this.config.recoveryEnabled;for(;P<_;){u=null;let ie=S.charCodeAt(P),Le=x(ie),Ue=Le.length;for(r=0;ru.length){u=s,c=f,H=J;break}}}break}}if(u!==null){if(d=u.length,p=H.group,p!==void 0&&(m=H.tokenTypeIdx,v=this.createTokenInstance(u,P,m,H.tokenType,me,Re,d),this.handlePayload(v,c),p===!1?j=this.addToken(X,j,v):O[p].push(v)),e=this.chopInput(e,d),P=P+d,Re=this.computeNewColumn(Re,d),C===!0&&H.canLineTerminator===!0){let $e=0,ze,Ie;y.lastIndex=0;do ze=y.test(u),ze===!0&&(Ie=y.lastIndex-1,$e++);while(ze===!0);$e!==0&&(me=me+$e,Re=d-Ie,this.updateTokenEndLineColumnLocation(v,p,Ie,$e,me,Re,d))}this.handleModes(H,W,le,v)}else{let $e=P,ze=me,Ie=Re,J=Oe===!1;for(;J===!1&&P<_;)for(e=this.chopInput(e,1),P++,n=0;n ${vn(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:a}){let s="Expecting: ",u=` but found: '`+Mt(t).image+"'";if(n)return s+n+u;{let c=mt(e,(m,v)=>m.concat(v),[]),f=G(c,m=>`[${G(m,v=>vn(v)).join(", ")}]`),p=`one of these possible Token sequences: ${G(f,(m,v)=>` ${v+1}. ${m}`).join(` `)}`;return s+p+u}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){let a="Expecting: ",l=` but found: '`+Mt(t).image+"'";if(r)return a+r+l;{let c=`expecting at least one iteration which starts with one of these possible Token sequences:: <${G(e,f=>`[${G(f,d=>vn(d)).join(",")}]`).join(" ,")}>`;return a+c+l}}};Object.freeze($a);var DO={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- inside top level rule: ->`+e.name+"<-"}},mn={buildDuplicateFoundError(e,t){function r(d){return d instanceof Te?d.terminalType.name:d instanceof et?d.nonTerminalName:""}i(r,"getExtraProductionArgument2"),o(r,"getExtraProductionArgument");let n=e.name,a=Mt(t),s=a.idx,l=It(a),u=r(a),c=s>0,f=`->${l}${c?s:""}<- ${u?`with argument: ->${u}<-`:""} appears more than once (${t.length} times) in the top level rule: ->${n}<-. For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES `;return f=f.replace(/[ \t]+/g," "),f=f.replace(/\s\s+/g,` `),f},buildNamespaceConflictError(e){return`Namespace conflict found in grammar. The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>. To resolve this make sure each Terminal and Non-Terminal names are unique This is easy to accomplish by using the convention that Terminal names start with an uppercase letter and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=G(e.prefixPath,a=>vn(a)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix in inside <${e.topLevelRule.name}> Rule, <${t}> may appears as a prefix path in all these alternatives. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX For Further details.`},buildAlternationAmbiguityError(e){let t=G(e.prefixPath,a=>vn(a)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule, <${t}> may appears as a prefix path in all these alternatives. `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES For Further details.`,n},buildEmptyRepetitionError(e){let t=It(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens. This could lead to an infinite loop.`},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule. Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives: inside <${e.topLevelRule.name}> Rule. has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name,r=G(e.leftRecursionPath,s=>s.name),n=`${t} --> ${r.concat([t]).join(" --> ")}`;return`Left Recursion found in grammar. rule: <${t}> can be invoked from itself (directly or indirectly) without consuming any Tokens. The grammar path that causes this is: ${n} To fix this refactor your grammar to remove the left recursion. see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof Ua?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function nA(e,t){let r=new MO(e,t);return r.resolveRefs(),r.errors}i(nA,"resolveGrammar");o(nA,"resolveGrammar");var MO=class extends za{static{i(this,"GastRefResolverVisitor")}static{o(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){q(xe(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:tt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},xO=class extends Hl{static{i(this,"AbstractNextPossibleTokensWalker")}static{o(this,"AbstractNextPossibleTokensWalker")}constructor(e,t){super(),this.topProd=e,this.path=t,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=Ve(this.path.ruleStack).reverse(),this.occurrenceStack=Ve(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}}updateExpectedNext(){he(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},FO=class extends xO{static{i(this,"NextAfterTokenWalker")}static{o(this,"NextAfterTokenWalker")}constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let n=t.concat(r),a=new lt({definition:n});this.possibleTokTypes=Ba(a),this.found=!0}}},Xl=class extends Hl{static{i(this,"AbstractNextTerminalAfterProductionWalker")}static{o(this,"AbstractNextTerminalAfterProductionWalker")}constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},GO=class extends Xl{static{i(this,"NextTerminalAfterManyWalker")}static{o(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){if(e.idx===this.occurrence){let n=Mt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof Te&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkMany(e,t,r)}},Am=class extends Xl{static{i(this,"NextTerminalAfterManySepWalker")}static{o(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){if(e.idx===this.occurrence){let n=Mt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof Te&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkManySep(e,t,r)}},jO=class extends Xl{static{i(this,"NextTerminalAfterAtLeastOneWalker")}static{o(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){let n=Mt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof Te&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOne(e,t,r)}},Em=class extends Xl{static{i(this,"NextTerminalAfterAtLeastOneSepWalker")}static{o(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){let n=Mt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof Te&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOneSep(e,t,r)}};function Qo(e,t,r=[]){r=Ve(r);let n=[],a=0;function s(u){return u.concat(qe(e,a+1))}i(s,"remainingPathWith"),o(s,"remainingPathWith");function l(u){let c=Qo(s(u),t,r);return n.concat(c)}for(i(l,"getAlternativesForProd"),o(l,"getAlternativesForProd");r.length{he(c.definition)===!1&&(n=l(c.definition))}),n;if(u instanceof Te)r.push(u.terminalType);else throw Error("non exhaustive match")}a++}return n.push({partialPath:r,suffixDef:qe(e,a)}),n}i(Qo,"possiblePathsFrom");o(Qo,"possiblePathsFrom");function Ep(e,t,r,n){let a="EXIT_NONE_TERMINAL",s=[a],l="EXIT_ALTERNATIVE",u=!1,c=t.length,f=c-n-1,d=[],p=[];for(p.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!he(p);){let m=p.pop();if(m===l){u&&$n(p).idx<=f&&p.pop();continue}let v=m.def,T=m.idx,w=m.ruleStack,N=m.occurrenceStack;if(he(v))continue;let I=v[0];if(I===a){let S={idx:T,def:qe(v),ruleStack:ss(w),occurrenceStack:ss(N)};p.push(S)}else if(I instanceof Te)if(T=0;S--){let _=I.definition[S],P={idx:T,def:_.definition.concat(qe(v)),ruleStack:w,occurrenceStack:N};p.push(P),p.push(l)}else if(I instanceof lt)p.push({idx:T,def:I.definition.concat(qe(v)),ruleStack:w,occurrenceStack:N});else if(I instanceof Ua)p.push(aA(I,T,w,N));else throw Error("non exhaustive match")}return d}i(Ep,"nextPossibleTokensAfter");o(Ep,"nextPossibleTokensAfter");function aA(e,t,r,n){let a=Ve(r);a.push(e.name);let s=Ve(n);return s.push(1),{idx:t,def:e.definition,ruleStack:a,occurrenceStack:s}}i(aA,"expandTopLevelRule");o(aA,"expandTopLevelRule");var _e;(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(_e||(_e={}));function Jl(e){if(e instanceof We||e==="Option")return _e.OPTION;if(e instanceof Se||e==="Repetition")return _e.REPETITION;if(e instanceof gt||e==="RepetitionMandatory")return _e.REPETITION_MANDATORY;if(e instanceof yt||e==="RepetitionMandatoryWithSeparator")return _e.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof ut||e==="RepetitionWithSeparator")return _e.REPETITION_WITH_SEPARATOR;if(e instanceof ct||e==="Alternation")return _e.ALTERNATION;throw Error("non exhaustive match")}i(Jl,"getProdType");o(Jl,"getProdType");function of(e){let{occurrence:t,rule:r,prodType:n,maxLookahead:a}=e,s=Jl(n);return s===_e.ALTERNATION?Ls(t,r,a):Ds(t,r,s,a)}i(of,"getLookaheadPaths");o(of,"getLookaheadPaths");function iA(e,t,r,n,a,s){let l=Ls(e,t,r),u=Cp(l)?ls:Ka;return s(l,n,u,a)}i(iA,"buildLookaheadFuncForOr");o(iA,"buildLookaheadFuncForOr");function sA(e,t,r,n,a,s){let l=Ds(e,t,a,r),u=Cp(l)?ls:Ka;return s(l[0],u,n)}i(sA,"buildLookaheadFuncForOptionalProd");o(sA,"buildLookaheadFuncForOptionalProd");function oA(e,t,r,n){let a=e.length,s=Lt(e,l=>Lt(l,u=>u.length===1));if(t)return function(l){let u=G(l,c=>c.GATE);for(let c=0;cOt(c)),u=mt(l,(c,f,d)=>(q(f,p=>{B(c,p.tokenTypeIdx)||(c[p.tokenTypeIdx]=d),q(p.categoryMatches,m=>{B(c,m)||(c[m]=d)})}),c),{});return function(){let c=this.LA(1);return u[c.tokenTypeIdx]}}else return function(){for(let l=0;ls.length===1),a=e.length;if(n&&!r){let s=Ot(e);if(s.length===1&&he(s[0].categoryMatches)){let u=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===u}}else{let l=mt(s,(u,c,f)=>(u[c.tokenTypeIdx]=!0,q(c.categoryMatches,d=>{u[d]=!0}),u),[]);return function(){let u=this.LA(1);return l[u.tokenTypeIdx]===!0}}}else return function(){e:for(let s=0;sQo([l],1)),n=lf(r.length),a=G(r,l=>{let u={};return q(l,c=>{let f=go(c.partialPath);q(f,d=>{u[d]=!0})}),u}),s=r;for(let l=1;l<=t;l++){let u=s;s=lf(u.length);for(let c=0;c{let I=go(N.partialPath);q(I,S=>{a[c][S]=!0})})}}}}return n}i(_p,"lookAheadSequenceFromAlternatives");o(_p,"lookAheadSequenceFromAlternatives");function Ls(e,t,r,n){let a=new uA(e,_e.ALTERNATION,n);return t.accept(a),_p(a.result,r)}i(Ls,"getLookaheadPathsForOr");o(Ls,"getLookaheadPathsForOr");function Ds(e,t,r,n){let a=new uA(e,r);t.accept(a);let s=a.result,u=new UO(t,e,r).startWalking(),c=new lt({definition:s}),f=new lt({definition:u});return _p([c,f],n)}i(Ds,"getLookaheadPathsForOptionalProd");o(Ds,"getLookaheadPathsForOptionalProd");function el(e,t){e:for(let r=0;r{let a=t[n];return r===a||a.categoryMatchesMap[r.tokenTypeIdx]})}i(fA,"isStrictPrefixOfPath");o(fA,"isStrictPrefixOfPath");function Cp(e){return Lt(e,t=>Lt(t,r=>Lt(r,n=>he(n.categoryMatches))))}i(Cp,"areTokenCategoriesNotUsed");o(Cp,"areTokenCategoriesNotUsed");function dA(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return G(t,r=>Object.assign({type:tt.CUSTOM_LOOKAHEAD_VALIDATION},r))}i(dA,"validateLookahead");o(dA,"validateLookahead");function pA(e,t,r,n){let a=At(e,c=>hA(c,r)),s=_A(e,t,r),l=At(e,c=>RA(c,r)),u=At(e,c=>gA(c,e,n,r));return a.concat(s,l,u)}i(pA,"validateGrammar");o(pA,"validateGrammar");function hA(e,t){let r=new zO;e.accept(r);let n=r.allProductions,a=rO(n,mA),s=xt(a,u=>u.length>1);return G(xe(s),u=>{let c=Mt(u),f=t.buildDuplicateFoundError(e,u),d=It(c),p={message:f,type:tt.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:d,occurrence:c.idx},m=bp(c);return m&&(p.parameter=m),p})}i(hA,"validateDuplicateProductions");o(hA,"validateDuplicateProductions");function mA(e){return`${It(e)}_#_${e.idx}_#_${bp(e)}`}i(mA,"identifyProductionForDuplicates");o(mA,"identifyProductionForDuplicates");function bp(e){return e instanceof Te?e.terminalType.name:e instanceof et?e.nonTerminalName:""}i(bp,"getExtraProductionArgument");o(bp,"getExtraProductionArgument");var zO=class extends za{static{i(this,"OccurrenceValidationCollector")}static{o(this,"OccurrenceValidationCollector")}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 gA(e,t,r,n){let a=[];if(mt(t,(l,u)=>u.name===e.name?l+1:l,0)>1){let l=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});a.push({message:l,type:tt.DUPLICATE_RULE_NAME,ruleName:e.name})}return a}i(gA,"validateRuleDoesNotAlreadyExist");o(gA,"validateRuleDoesNotAlreadyExist");function yA(e,t,r){let n=[],a;return nt(t,e)||(a=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:a,type:tt.INVALID_RULE_OVERRIDE,ruleName:e})),n}i(yA,"validateRuleIsOverridden");o(yA,"validateRuleIsOverridden");function Sp(e,t,r,n=[]){let a=[],s=Xi(t.definition);if(he(s))return[];{let l=e.name;nt(s,e)&&a.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:tt.LEFT_RECURSION,ruleName:l});let c=Wl(s,n.concat([e])),f=At(c,d=>{let p=Ve(n);return p.push(d),Sp(e,d,r,p)});return a.concat(f)}}i(Sp,"validateNoLeftRecursion");o(Sp,"validateNoLeftRecursion");function Xi(e){let t=[];if(he(e))return t;let r=Mt(e);if(r instanceof et)t.push(r.referencedRule);else if(r instanceof lt||r instanceof We||r instanceof gt||r instanceof yt||r instanceof ut||r instanceof Se)t=t.concat(Xi(r.definition));else if(r instanceof ct)t=Ot(G(r.definition,s=>Xi(s.definition)));else if(!(r instanceof Te))throw Error("non exhaustive match");let n=os(r),a=e.length>1;if(n&&a){let s=qe(e);return t.concat(Xi(s))}else return t}i(Xi,"getFirstNoneTerminal");o(Xi,"getFirstNoneTerminal");var wp=class extends za{static{i(this,"OrCollector")}static{o(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function vA(e,t){let r=new wp;e.accept(r);let n=r.alternations;return At(n,s=>{let l=ss(s.definition);return At(l,(u,c)=>{let f=Ep([u],[],Ka,1);return he(f)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:s,emptyChoiceIdx:c}),type:tt.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:s.idx,alternative:c+1}]:[]})})}i(vA,"validateEmptyOrAlternative");o(vA,"validateEmptyOrAlternative");function TA(e,t,r){let n=new wp;e.accept(n);let a=n.alternations;return a=Vl(a,l=>l.ignoreAmbiguities===!0),At(a,l=>{let u=l.idx,c=l.maxLookahead||t,f=Ls(u,e,c,l),d=AA(f,l,e,r),p=EA(f,l,e,r);return d.concat(p)})}i(TA,"validateAmbiguousAlternationAlternatives");o(TA,"validateAmbiguousAlternationAlternatives");var BO=class extends za{static{i(this,"RepetitionCollector")}static{o(this,"RepetitionCollector")}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 RA(e,t){let r=new wp;e.accept(r);let n=r.alternations;return At(n,s=>s.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:s}),type:tt.TOO_MANY_ALTS,ruleName:e.name,occurrence:s.idx}]:[])}i(RA,"validateTooManyAlts");o(RA,"validateTooManyAlts");function $A(e,t,r){let n=[];return q(e,a=>{let s=new BO;a.accept(s);let l=s.allProductions;q(l,u=>{let c=Jl(u),f=u.maxLookahead||t,d=u.idx,m=Ds(d,a,c,f)[0];if(he(Ot(m))){let v=r.buildEmptyRepetitionError({topLevelRule:a,repetition:u});n.push({message:v,type:tt.NO_NON_EMPTY_LOOKAHEAD,ruleName:a.name})}})}),n}i($A,"validateSomeNonEmptyLookaheadPath");o($A,"validateSomeNonEmptyLookaheadPath");function AA(e,t,r,n){let a=[],s=mt(e,(u,c,f)=>(t.definition[f].ignoreAmbiguities===!0||q(c,d=>{let p=[f];q(e,(m,v)=>{f!==v&&el(m,d)&&t.definition[v].ignoreAmbiguities!==!0&&p.push(v)}),p.length>1&&!el(a,d)&&(a.push(d),u.push({alts:p,path:d}))}),u),[]);return G(s,u=>{let c=G(u.alts,d=>d+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:c,prefixPath:u.path}),type:tt.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:u.alts}})}i(AA,"checkAlternativesAmbiguities");o(AA,"checkAlternativesAmbiguities");function EA(e,t,r,n){let a=mt(e,(l,u,c)=>{let f=G(u,d=>({idx:c,path:d}));return l.concat(f)},[]);return ks(At(a,l=>{if(t.definition[l.idx].ignoreAmbiguities===!0)return[];let c=l.idx,f=l.path,d=bt(a,m=>t.definition[m.idx].ignoreAmbiguities!==!0&&m.idx{let v=[m.idx+1,c+1],T=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:v,prefixPath:m.path}),type:tt.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:T,alternatives:v}})}))}i(EA,"checkPrefixAlternativesAmbiguities");o(EA,"checkPrefixAlternativesAmbiguities");function _A(e,t,r){let n=[],a=G(t,s=>s.name);return q(e,s=>{let l=s.name;if(nt(a,l)){let u=r.buildNamespaceConflictError(s);n.push({message:u,type:tt.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:l})}}),n}i(_A,"checkTerminalAndNoneTerminalsNameSpace");o(_A,"checkTerminalAndNoneTerminalsNameSpace");function CA(e){let t=fp(e,{errMsgProvider:DO}),r={};return q(e.rules,n=>{r[n.name]=n}),nA(r,t.errMsgProvider)}i(CA,"resolveGrammar2");o(CA,"resolveGrammar");function bA(e){return e=fp(e,{errMsgProvider:mn}),pA(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}i(bA,"validateGrammar2");o(bA,"validateGrammar");var SA="MismatchedTokenException",wA="NoViableAltException",IA="EarlyExitException",NA="NotAllInputParsedException",kA=[SA,wA,IA,NA];Object.freeze(kA);function us(e){return nt(kA,e.name)}i(us,"isRecognitionException");o(us,"isRecognitionException");var Zl=class extends Error{static{i(this,"RecognitionException")}static{o(this,"RecognitionException")}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},PA=class extends Zl{static{i(this,"MismatchedTokenException")}static{o(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=SA}},KO=class extends Zl{static{i(this,"NoViableAltException")}static{o(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=wA}},qO=class extends Zl{static{i(this,"NotAllInputParsedException")}static{o(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name=NA}},WO=class extends Zl{static{i(this,"EarlyExitException")}static{o(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=IA}},Iu={},OA="InRuleRecoveryException",VO=class extends Error{static{i(this,"InRuleRecoveryException")}static{o(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=OA}},HO=class{static{i(this,"Recoverable")}static{o(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=B(e,"recoveryEnabled")?e.recoveryEnabled:vr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=LA)}getTokenToInsert(e){let t=Os(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,n){let a=this.findReSyncTokenType(),s=this.exportLexerState(),l=[],u=!1,c=this.LA(1),f=this.LA(1),d=o(()=>{let p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:c,previous:p,ruleName:this.getCurrRuleFullName()}),v=new PA(m,c,this.LA(0));v.resyncedTokens=ss(l),this.SAVE_ERROR(v)},"generateErrorMessage");for(;!u;)if(this.tokenMatcher(f,n)){d();return}else if(r.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(f,a)?u=!0:(f=this.SKIP_TOKEN(),this.addToResyncTokens(f,l));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(r===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){let r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new VO("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||he(t))return!1;let r=this.LA(1);return Da(t,a=>this.tokenMatcher(r,a))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return nt(r,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;for(;;){let n=Da(e,a=>Ap(t,a));if(n!==void 0)return n;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Iu;let e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return G(e,(r,n)=>n===0?Iu:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[n],inRule:this.shortRuleNameToFullName(e[n-1])})}flattenFollowSet(){let e=G(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return Ot(e)}getFollowSetFromFollowKey(e){if(e===Iu)return[Lr];let t=e.ruleName+e.idxInCallingRule+v$+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,Lr)||t.push(e),t}reSyncTo(e){let t=[],r=this.LA(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return ss(t)}attemptInRepetitionRecovery(e,t,r,n,a,s,l){}getCurrentGrammarPath(e,t){let r=this.getHumanReadableRuleStack(),n=Ve(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:n,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return G(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function LA(e,t,r,n,a,s,l){let u=this.getKeyForAutomaticLookahead(n,a),c=this.firstAfterRepMap[u];if(c===void 0){let m=this.getCurrRuleFullName(),v=this.getGAstProductions()[m];c=new s(v,a).startWalking(),this.firstAfterRepMap[u]=c}let f=c.token,d=c.occurrence,p=c.isEndOfRule;this.RULE_STACK.length===1&&p&&f===void 0&&(f=Lr,d=1),!(f===void 0||d===void 0)&&this.shouldInRepetitionRecoveryBeTried(f,d,l)&&this.tryInRepetitionRecovery(e,t,r,f)}i(LA,"attemptInRepetitionRecovery");o(LA,"attemptInRepetitionRecovery");var YO=4,jr=8,XO=8,DA=1<Sp(t,t,mn))}validateEmptyOrAlternatives(e){return At(e,t=>vA(t,mn))}validateAmbiguousAlternationAlternatives(e,t){return At(e,r=>TA(r,t,mn))}validateSomeNonEmptyLookaheadPath(e,t){return $A(e,t,mn)}buildLookaheadForAlternation(e){return iA(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,oA)}buildLookaheadForOptional(e){return sA(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Jl(e.prodType),lA)}},JO=class{static{i(this,"LooksAhead")}static{o(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=B(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:vr.dynamicTokensEnabled,this.maxLookahead=B(e,"maxLookahead")?e.maxLookahead:vr.maxLookahead,this.lookaheadStrategy=B(e,"lookaheadStrategy")?e.lookaheadStrategy:new Ip({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){q(e,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{let{alternation:r,repetition:n,option:a,repetitionMandatory:s,repetitionMandatoryWithSeparator:l,repetitionWithSeparator:u}=xA(t);q(r,c=>{let f=c.idx===0?"":c.idx;this.TRACE_INIT(`${It(c)}${f}`,()=>{let d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:c.idx,rule:t,maxLookahead:c.maxLookahead||this.maxLookahead,hasPredicates:c.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=vo(this.fullRuleNameToShort[t.name],DA,c.idx);this.setLaFuncCache(p,d)})}),q(n,c=>{this.computeLookaheadFunc(t,c.idx,uf,"Repetition",c.maxLookahead,It(c))}),q(a,c=>{this.computeLookaheadFunc(t,c.idx,MA,"Option",c.maxLookahead,It(c))}),q(s,c=>{this.computeLookaheadFunc(t,c.idx,cf,"RepetitionMandatory",c.maxLookahead,It(c))}),q(l,c=>{this.computeLookaheadFunc(t,c.idx,yo,"RepetitionMandatoryWithSeparator",c.maxLookahead,It(c))}),q(u,c=>{this.computeLookaheadFunc(t,c.idx,ff,"RepetitionWithSeparator",c.maxLookahead,It(c))})})})}computeLookaheadFunc(e,t,r,n,a,s){this.TRACE_INIT(`${s}${t===0?"":t}`,()=>{let l=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),u=vo(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(u,l)})}getKeyForAutomaticLookahead(e,t){let r=this.getLastExplicitRuleShortName();return vo(r,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},ZO=class extends za{static{i(this,"DslMethodsCollectorVisitor")}static{o(this,"DslMethodsCollectorVisitor")}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)}},Us=new ZO;function xA(e){Us.reset(),e.accept(Us);let t=Us.dslMethods;return Us.reset(),t}i(xA,"collectMethods");o(xA,"collectMethods");function df(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffsetl.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: ${s.join(` `).replace(/\n/g,` `)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}i(UA,"createBaseSemanticVisitorConstructor");o(UA,"createBaseSemanticVisitorConstructor");function zA(e,t,r){let n=o(function(){},"derivedConstructor");Np(n,e+"BaseSemanticsWithDefaults");let a=Object.create(r.prototype);return q(t,s=>{a[s]=jA}),n.prototype=a,n.prototype.constructor=n,n}i(zA,"createBaseVisitorConstructorWithDefaults");o(zA,"createBaseVisitorConstructorWithDefaults");var hf;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(hf||(hf={}));function BA(e,t){return KA(e,t)}i(BA,"validateVisitor");o(BA,"validateVisitor");function KA(e,t){let r=bt(t,a=>Ar(e[a])===!1),n=G(r,a=>({msg:`Missing visitor method: <${a}> on ${e.constructor.name} CST Visitor.`,type:hf.MISSING_METHOD,methodName:a}));return ks(n)}i(KA,"validateMissingCstMethods");o(KA,"validateMissingCstMethods");var eL=class{static{i(this,"TreeBuilder")}static{o(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=B(e,"nodeLocationTracking")?e.nodeLocationTracking:vr.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Me,this.cstFinallyStateUpdate=Me,this.cstPostTerminal=Me,this.cstPostNonTerminal=Me,this.cstPostRule=Me;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=pf,this.setNodeLocationFromNode=pf,this.cstPostRule=Me,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Me,this.setNodeLocationFromNode=Me,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=df,this.setNodeLocationFromNode=df,this.cstPostRule=Me,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Me,this.setNodeLocationFromNode=Me,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Me,this.setNodeLocationFromNode=Me,this.cstPostRule=Me,this.setInitialNodeLocation=Me;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];FA(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];GA(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(gr(this.baseCstVisitorConstructor)){let e=UA(this.className,pt(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(gr(this.baseCstVisitorWithDefaultsConstructor)){let e=zA(this.className,pt(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},tL=class{static{i(this,"LexerAdapter")}static{o(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing 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.tokVector.length-2?(this.consumeToken(),this.LA(1)):tl}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?tl:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},rL=class{static{i(this,"RecognizerApi")}static{o(this,"RecognizerApi")}ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}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,t,r=rl){if(nt(this.definedRulesNames,e)){let s={message:mn.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:tt.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);let n=this.defineRule(e,t,r);return this[e]=n,n}OVERRIDE_RULE(e,t,r=rl){let n=yA(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);let a=this.defineRule(e,t,r);return this[e]=a,a}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let r=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if(us(n))return!1;throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return d$(xe(this.gastProductionsCache))}},nL=class{static{i(this,"RecognizerEngine")}static{o(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=ls,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},B(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 For Further details.`);if(re(e)){if(he(e))throw Error(`A Token Vocabulary cannot be empty. Note that the first argument for the parser constructor 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. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 For Further details.`)}if(re(e))this.tokensMap=mt(e,(a,s)=>(a[s.name]=s,a),{});else if(B(e,"modes")&&Lt(Ot(xe(e.modes)),tA)){let a=Ot(xe(e.modes)),s=dp(a);this.tokensMap=mt(s,(l,u)=>(l[u.name]=u,l),{})}else if(_t(e))this.tokensMap=Ve(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Lr;let r=B(e,"modes")?Ot(xe(e.modes)):xe(e),n=Lt(r,a=>he(a.categoryMatches));this.tokenMatcher=n?ls:Ka,qa(xe(this.tokensMap))}defineRule(e,t,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let n=B(r,"resyncEnabled")?r.resyncEnabled:rl.resyncEnabled,a=B(r,"recoveryValueFunc")?r.recoveryValueFunc:rl.recoveryValueFunc,s=this.ruleShortNameIdx<s.call(this)&&l.call(this),"lookAheadFunc")}}else a=e;if(n.call(this)===!0)return a.call(this)}atLeastOneInternal(e,t){let r=this.getKeyForAutomaticLookahead(cf,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),a;if(typeof t!="function"){a=t.DEF;let s=t.GATE;if(s!==void 0){let l=n;n=o(()=>s.call(this)&&l.call(this),"lookAheadFunc")}}else a=t;if(n.call(this)===!0){let s=this.doSingleRepetition(a);for(;n.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a)}else throw this.raiseEarlyExitException(e,_e.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],n,cf,e,jO)}atLeastOneSepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(yo,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let n=t.DEF,a=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);let l=o(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,l,n,Em],l,yo,e,Em)}else throw this.raiseEarlyExitException(e,_e.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let r=this.getKeyForAutomaticLookahead(uf,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),a;if(typeof t!="function"){a=t.DEF;let l=t.GATE;if(l!==void 0){let u=n;n=o(()=>l.call(this)&&u.call(this),"lookaheadFunction")}}else a=t;let s=!0;for(;n.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],n,uf,e,GO,s)}manySepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(ff,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let n=t.DEF,a=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);let l=o(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,l,n,Am],l,ff,e,Am)}}repetitionSepSecondInternal(e,t,r,n,a){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,a],r,yo,e,a)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let r=this.getKeyForAutomaticLookahead(DA,t),n=re(e)?e:e.DEF,s=this.getLaFuncFromCache(r).call(this,n);if(s!==void 0)return n[s].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new qO(t,e))}}subruleInternal(e,t,r){let n;try{let a=r!==void 0?r.ARGS:void 0;return this.subruleIdx=t,n=e.apply(this,a),this.cstPostNonTerminal(n,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),n}catch(a){throw this.subruleInternalError(a,r,e.ruleName)}}subruleInternalError(e,t,r){throw us(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let n;try{let a=this.LA(1);this.tokenMatcher(a,e)===!0?(this.consumeToken(),n=a):this.consumeInternalError(e,a,r)}catch(a){n=this.consumeInternalRecovery(e,t,a)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){let n,a=this.LA(0);throw r!==void 0&&r.ERR_MSG?n=r.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new PA(n,t,a))}consumeInternalRecovery(e,t,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){let n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(a){throw a.name===OA?r:a}}else throw r}saveRecogState(){let e=this.errors,t=Ve(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Lr)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},aL=class{static{i(this,"ErrorHandler")}static{o(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=B(e,"errorMessageProvider")?e.errorMessageProvider:vr.errorMessageProvider}SAVE_ERROR(e){if(us(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Ve(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Ve(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){let n=this.getCurrRuleFullName(),a=this.getGAstProductions()[n],l=Ds(e,a,t,this.maxLookahead)[0],u=[];for(let f=1;f<=this.maxLookahead;f++)u.push(this.LA(f));let c=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:l,actual:u,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new WO(c,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let r=this.getCurrRuleFullName(),n=this.getGAstProductions()[r],a=Ls(e,n,this.maxLookahead),s=[];for(let c=1;c<=this.maxLookahead;c++)s.push(this.LA(c));let l=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:s,previous:l,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new KO(u,this.LA(1),l))}},iL=class{static{i(this,"ContentAssist")}static{o(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){let r=this.gastProductionsCache[e];if(gr(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return Ep([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=Mt(e.ruleStack),n=this.getGAstProductions()[t];return new FO(n,e).startWalking()}},Ql={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Ql);var _m=!0,Cm=Math.pow(2,jr)-1,qA=_a({name:"RECORDING_PHASE_TOKEN",pattern:Ze.NA});qa([qA]);var WA=Os(qA,`This IToken indicates the Parser is in Recording Phase See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(WA);var sL={name:`This CSTNode indicates the Parser is in Recording Phase See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},oL=class{static{i(this,"GastRecorder")}static{o(this,"GastRecorder")}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 t=e>0?e:"";this[`CONSUME${t}`]=function(r,n){return this.consumeInternalRecord(r,e,n)},this[`SUBRULE${t}`]=function(r,n){return this.subruleInternalRecord(r,e,n)},this[`OPTION${t}`]=function(r){return this.optionInternalRecord(r,e)},this[`OR${t}`]=function(r){return this.orInternalRecord(r,e)},this[`MANY${t}`]=function(r){this.manyInternalRecord(e,r)},this[`MANY_SEP${t}`]=function(r){this.manySepFirstInternalRecord(e,r)},this[`AT_LEAST_ONE${t}`]=function(r){this.atLeastOneInternalRecord(e,r)},this[`AT_LEAST_ONE_SEP${t}`]=function(r){this.atLeastOneSepFirstInternalRecord(e,r)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},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 t=0;t<10;t++){let r=t>0?t:"";delete e[`CONSUME${r}`],delete e[`SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}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,t){return()=>!0}LA_RECORD(e){return tl}topLevelRuleRecord(e,t){try{let r=new Ua({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(r){if(r.KNOWN_RECORDER_ERROR!==!0)try{r.message=r.message+` This error was thrown during the "grammar recording phase" For more info see: https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw r}throw r}}optionInternalRecord(e,t){return la.call(this,We,e,t)}atLeastOneInternalRecord(e,t){la.call(this,gt,t,e)}atLeastOneSepFirstInternalRecord(e,t){la.call(this,yt,t,e,_m)}manyInternalRecord(e,t){la.call(this,Se,t,e)}manySepFirstInternalRecord(e,t){la.call(this,ut,t,e,_m)}orInternalRecord(e,t){return VA.call(this,e,t)}subruleInternalRecord(e,t,r){if(cs(t),!e||B(e,"ruleName")===!1){let l=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> inside top level rule: <${this.recordingProdStack[0].name}>`);throw l.KNOWN_RECORDER_ERROR=!0,l}let n=$n(this.recordingProdStack),a=e.ruleName,s=new et({idx:t,nonTerminalName:a,label:r?.LABEL,referencedRule:void 0});return n.definition.push(s),this.outputCst?sL:Ql}consumeInternalRecord(e,t,r){if(cs(t),!Rp(e)){let s=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let n=$n(this.recordingProdStack),a=new Te({idx:t,terminalType:e,label:r?.LABEL});return n.definition.push(a),WA}};function la(e,t,r,n=!1){cs(r);let a=$n(this.recordingProdStack),s=Ar(t)?t:t.DEF,l=new e({definition:[],idx:r});return n&&(l.separator=t.SEP),B(t,"MAX_LOOKAHEAD")&&(l.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(l),s.call(this),a.definition.push(l),this.recordingProdStack.pop(),Ql}i(la,"recordProd");o(la,"recordProd");function VA(e,t){cs(t);let r=$n(this.recordingProdStack),n=re(e)===!1,a=n===!1?e:e.DEF,s=new ct({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});B(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD);let l=o$(a,u=>Ar(u.GATE));return s.hasPredicates=l,r.definition.push(s),q(a,u=>{let c=new lt({definition:[]});s.definition.push(c),B(u,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=u.IGNORE_AMBIGUITIES:B(u,"GATE")&&(c.ignoreAmbiguities=!0),this.recordingProdStack.push(c),u.ALT.call(this),this.recordingProdStack.pop()}),Ql}i(VA,"recordOrProd");o(VA,"recordOrProd");function mf(e){return e===0?"":`${e}`}i(mf,"getIdxSuffix");o(mf,"getIdxSuffix");function cs(e){if(e<0||e>Cm){let t=new Error(`Invalid DSL Method idx value: <${e}> Idx value must be a none negative value smaller than ${Cm+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}i(cs,"assertMethodIdxIsValid");o(cs,"assertMethodIdxIsValid");var lL=class{static{i(this,"PerformanceTracer")}static{o(this,"PerformanceTracer")}initPerformanceTracer(e){if(B(e,"traceInitPerf")){let t=e.traceInitPerf,r=typeof t=="number";this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=vr.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let r=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);let{time:n,value:a}=hp(t),s=n>10?console.warn:console.log;return this.traceInitIndent time: ${n}ms`),this.traceInitIndent--,a}else return t()}};function HA(e,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(a=>{if(a==="constructor")return;let s=Object.getOwnPropertyDescriptor(n,a);s&&(s.get||s.set)?Object.defineProperty(e.prototype,a,s):e.prototype[a]=r.prototype[a]})})}i(HA,"applyMixins");o(HA,"applyMixins");var tl=Os(Lr,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(tl);var vr=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:$a,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),rl=Object.freeze({recoveryValueFunc:o(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),tt;(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(tt||(tt={}));function gf(e=void 0){return function(){return e}}i(gf,"EMPTY_ALT");o(gf,"EMPTY_ALT");var kp=class YA{static{i(this,"_Parser")}static{o(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{mp(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),q(this.definedRulesNames,a=>{let l=this[a].originalGrammarAction,u;this.TRACE_INIT(`${a} Rule`,()=>{u=this.topLevelRuleRecord(a,l)}),this.gastProductionsCache[a]=u})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=CA({rules:xe(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(he(n)&&this.skipValidations===!1){let a=bA({rules:xe(this.gastProductionsCache),tokenTypes:xe(this.tokensMap),errMsgProvider:mn,grammarName:r}),s=dA({lookaheadStrategy:this.lookaheadStrategy,rules:xe(this.gastProductionsCache),tokenTypes:xe(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(a,s)}}),he(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let a=T$(xe(this.gastProductionsCache));this.resyncFollows=a}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var a,s;(s=(a=this.lookaheadStrategy).initialize)===null||s===void 0||s.call(a,{rules:xe(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(xe(this.gastProductionsCache))})),!YA.DEFER_DEFINITION_ERRORS_HANDLING&&!he(this.definitionErrors))throw t=G(this.definitionErrors,a=>a.message),new Error(`Parser Definition Errors detected: ${t.join(` ------------------------------- `)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(t,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),B(r,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. Please use the flag on the relevant DSL method instead. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES For further details.`);this.skipValidations=B(r,"skipValidations")?r.skipValidations:vr.skipValidations}};kp.DEFER_DEFINITION_ERRORS_HANDLING=!1;HA(kp,[HO,JO,eL,tL,nL,rL,aL,iL,oL,lL]);var uL=class extends kp{static{i(this,"EmbeddedActionsParser")}static{o(this,"EmbeddedActionsParser")}constructor(e,t=vr){let r=Ve(t);r.outputCst=!1,super(e,r)}};function XA(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r-1}i(aE,"listCacheHas2");o(aE,"listCacheHas");var mL=aE;function iE(e,t){var r=this.__data__,n=eu(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}i(iE,"listCacheSet2");o(iE,"listCacheSet");var gL=iE;function Fn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++tu))return!1;var f=s.get(e),d=s.get(t);if(f&&d)return f==t&&d==e;var p=-1,m=!0,v=r&AD?new FE:void 0;for(s.set(e,t),s.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=nM}i(o_,"isLength2");o(o_,"isLength");var Lp=o_,aM="[object Arguments]",iM="[object Array]",sM="[object Boolean]",oM="[object Date]",lM="[object Error]",uM="[object Function]",cM="[object Map]",fM="[object Number]",dM="[object Object]",pM="[object RegExp]",hM="[object Set]",mM="[object String]",gM="[object WeakMap]",yM="[object ArrayBuffer]",vM="[object DataView]",TM="[object Float32Array]",RM="[object Float64Array]",$M="[object Int8Array]",AM="[object Int16Array]",EM="[object Int32Array]",_M="[object Uint8Array]",CM="[object Uint8ClampedArray]",bM="[object Uint16Array]",SM="[object Uint32Array]",ve={};ve[TM]=ve[RM]=ve[$M]=ve[AM]=ve[EM]=ve[_M]=ve[CM]=ve[bM]=ve[SM]=!0;ve[aM]=ve[iM]=ve[yM]=ve[sM]=ve[vM]=ve[oM]=ve[lM]=ve[uM]=ve[cM]=ve[fM]=ve[dM]=ve[pM]=ve[hM]=ve[mM]=ve[gM]=!1;function l_(e){return Ma(e)&&Lp(e.length)&&!!ve[Wa(e)]}i(l_,"baseIsTypedArray2");o(l_,"baseIsTypedArray");var wM=l_;function u_(e){return function(t){return e(t)}}i(u_,"baseUnary2");o(u_,"baseUnary");var IM=u_,c_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ji=c_&&typeof module=="object"&&module&&!module.nodeType&&module,NM=Ji&&Ji.exports===c_,Pu=NM&&cE.process,kM=(function(){try{var e=Ji&&Ji.require&&Ji.require("util").types;return e||Pu&&Pu.binding&&Pu.binding("util")}catch{}})(),Dm=kM,Mm=Dm&&Dm.isTypedArray,PM=Mm?IM(Mm):wM,Dp=PM,OM=Object.prototype,LM=OM.hasOwnProperty;function f_(e,t){var r=rt(e),n=!r&&au(e),a=!r&&!n&&nl(e),s=!r&&!n&&!a&&Dp(e),l=r||n||a||s,u=l?WD(e.length,String):[],c=u.length;for(var f in e)(t||LM.call(e,f))&&!(l&&(f=="length"||a&&(f=="offset"||f=="parent")||s&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||s_(f,c)))&&u.push(f);return u}i(f_,"arrayLikeKeys2");o(f_,"arrayLikeKeys");var DM=f_,MM=Object.prototype;function d_(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||MM;return e===r}i(d_,"isPrototype2");o(d_,"isPrototype");var p_=d_;function h_(e,t){return function(r){return e(t(r))}}i(h_,"overArg2");o(h_,"overArg");var xM=h_,FM=xM(Object.keys,Object),GM=FM,jM=Object.prototype,UM=jM.hasOwnProperty;function m_(e){if(!p_(e))return GM(e);var t=[];for(var r in Object(e))UM.call(e,r)&&r!="constructor"&&t.push(r);return t}i(m_,"baseKeys2");o(m_,"baseKeys");var g_=m_;function y_(e){return e!=null&&Lp(e.length)&&!yE(e)}i(y_,"isArrayLike2");o(y_,"isArrayLike");var iu=y_;function v_(e){return iu(e)?DM(e):g_(e)}i(v_,"keys2");o(v_,"keys");var Mp=v_;function T_(e){return jD(e,Mp,qD)}i(T_,"getAllKeys2");o(T_,"getAllKeys");var xm=T_,zM=1,BM=Object.prototype,KM=BM.hasOwnProperty;function R_(e,t,r,n,a,s){var l=r&zM,u=xm(e),c=u.length,f=xm(t),d=f.length;if(c!=d&&!l)return!1;for(var p=c;p--;){var m=u[p];if(!(l?m in t:KM.call(t,m)))return!1}var v=s.get(e),T=s.get(t);if(v&&T)return v==t&&T==e;var w=!0;s.set(e,t),s.set(t,e);for(var N=l;++pKp(e,t,l));return Bn(e,t,n,r,...a)}i(dC,"alternation");o(dC,"alternation");function pC(e,t,r){let n=Fe(e,t,r,{type:Dr});_r(e,n);let a=Bn(e,t,n,r,Ur(e,t,r));return hC(e,t,r,a)}i(pC,"option");o(pC,"option");function Ur(e,t,r){let n=Bx(cr(r.definition,a=>Kp(e,t,a)),a=>a!==void 0);return n.length===1?n[0]:n.length===0?void 0:gC(e,n)}i(Ur,"block");o(Ur,"block");function qp(e,t,r,n,a){let s=n.left,l=n.right,u=Fe(e,t,r,{type:Hx});_r(e,u);let c=Fe(e,t,r,{type:aC});return s.loopback=u,c.loopback=u,e.decisionMap[En(t,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=u,ke(l,u),a===void 0?(ke(u,s),ke(u,c)):(ke(u,c),ke(u,a.left),ke(a.right,s)),{left:s,right:c}}i(qp,"plus");o(qp,"plus");function Wp(e,t,r,n,a){let s=n.left,l=n.right,u=Fe(e,t,r,{type:Vx});_r(e,u);let c=Fe(e,t,r,{type:aC}),f=Fe(e,t,r,{type:Wx});return u.loopback=f,c.loopback=f,ke(u,s),ke(u,c),ke(l,f),a!==void 0?(ke(f,c),ke(f,a.left),ke(a.right,s)):ke(f,u),e.decisionMap[En(t,a?"RepetitionWithSeparator":"Repetition",r.idx)]=u,{left:u,right:c}}i(Wp,"star");o(Wp,"star");function hC(e,t,r,n){let a=n.left,s=n.right;return ke(a,s),e.decisionMap[En(t,"Option",r.idx)]=a,n}i(hC,"optional");o(hC,"optional");function _r(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}i(_r,"defineDecisionState");o(_r,"defineDecisionState");function Bn(e,t,r,n,...a){let s=Fe(e,t,n,{type:qx,start:r});r.end=s;for(let u of a)u!==void 0?(ke(r,u.left),ke(u.right,s)):ke(r,s);let l={left:r,right:s};return e.decisionMap[En(t,mC(n),n.idx)]=r,l}i(Bn,"makeAlts");o(Bn,"makeAlts");function mC(e){if(e instanceof ct)return"Alternation";if(e instanceof We)return"Option";if(e instanceof Se)return"Repetition";if(e instanceof ut)return"RepetitionWithSeparator";if(e instanceof gt)return"RepetitionMandatory";if(e instanceof yt)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}i(mC,"getProdType2");o(mC,"getProdType");function gC(e,t){let r=t.length;for(let s=0;se.alt)}get key(){let e="";for(let t in this.map)e+=t+":";return e}};function Vp(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(r=>r.stateNumber.toString()).join("_")}`}i(Vp,"getATNConfigKey");o(Vp,"getATNConfigKey");function RC(e,t,r){for(var n=-1,a=e.length;++n0&&r(u)?t>1?Hp(u,t-1,r,n,a):HE(a,u):n||(a[a.length]=u)}return a}i(Hp,"baseFlatten2");o(Hp,"baseFlatten");var _C=Hp;function CC(e,t){return _C(cr(e,t),1)}i(CC,"flatMap2");o(CC,"flatMap");var Qx=CC;function bC(e,t,r,n){for(var a=e.length,s=r+(n?1:-1);n?s--:++s-1}i(NC,"arrayIncludes2");o(NC,"arrayIncludes");var a1=NC;function kC(e,t,r){for(var n=-1,a=e==null?0:e.length;++n=c1){var f=t?null:u1(e);if(f)return Op(f);l=!1,a=UE,c=new FE}else c=t?[]:u;e:for(;++n{let a=n.toString(),s=r[a];return s!==void 0||(s={atnStartState:e,decision:t,states:{}},r[a]=s),s}}i(BC,"createDFACache");o(BC,"createDFACache");var KC=class{static{i(this,"PredicateSet")}static{o(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="",t=this.predicates.length;for(let r=0;rconsole.log(r))}initialize(e){this.atn=sC(e.rules),this.dfas=qC(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:a}=e,s=this.dfas,l=this.logging,u=En(r,"Alternation",t),f=this.atn.decisionMap[u].decision,d=cr(of({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),p=>cr(p,m=>m[0]));if(Af(d,!1)&&!a){let p=Ym(d,(m,v,T)=>(Ou(v,w=>{w&&(m[w.tokenTypeIdx]=T,Ou(w.categoryMatches,N=>{m[N]=T}))}),m),{});return n?function(m){var v;let T=this.LA(1),w=p[T.tokenTypeIdx];if(m!==void 0&&w!==void 0){let N=(v=m[w])===null||v===void 0?void 0:v.GATE;if(N!==void 0&&N.call(this)===!1)return}return w}:function(){let m=this.LA(1);return p[m.tokenTypeIdx]}}else return n?function(p){let m=new KC,v=p===void 0?0:p.length;for(let w=0;wcr(p,m=>m[0]));if(Af(d)&&d[0][0]&&!a){let p=d[0],m=p1(p);if(m.length===1&&R1(m[0].categoryMatches)){let T=m[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===T}}else{let v=Ym(m,(T,w)=>(w!==void 0&&(T[w.tokenTypeIdx]=!0,Ou(w.categoryMatches,N=>{T[N]=!0})),T),{});return function(){let T=this.LA(1);return v[T.tokenTypeIdx]===!0}}}return function(){let p=Ro.call(this,s,f,Xm,l);return typeof p=="object"?!1:p===0}}};function Af(e,t=!0){let r=new Set;for(let n of e){let a=new Set;for(let s of n){if(s===void 0){if(t)break;return!1}let l=[s.tokenTypeIdx].concat(s.categoryMatches);for(let u of l)if(r.has(u)){if(!a.has(u))return!1}else r.add(u),a.add(u)}}return!0}i(Af,"isLL1Sequence");o(Af,"isLL1Sequence");function qC(e){let t=e.decisionStates.length,r=Array(t);for(let n=0;nvn(a)).join(", "),r=e.production.idx===0?"":e.production.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${XC(e.production)}${r}> inside <${e.topLevelRule.name}> Rule, <${t}> may appears as a prefix path in all these alternatives. `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES For Further details.`,n}i(YC,"buildAmbiguityError");o(YC,"buildAmbiguityError");function XC(e){if(e instanceof et)return"SUBRULE";if(e instanceof We)return"OPTION";if(e instanceof ct)return"OR";if(e instanceof gt)return"AT_LEAST_ONE";if(e instanceof yt)return"AT_LEAST_ONE_SEP";if(e instanceof ut)return"MANY_SEP";if(e instanceof Se)return"MANY";if(e instanceof Te)return"CONSUME";throw Error("non exhaustive match")}i(XC,"getProductionDslName2");o(XC,"getProductionDslName");function JC(e,t,r){let n=Qx(t.configs.elements,s=>s.state.transitions),a=d1(n.filter(s=>s instanceof zp).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:a,tokenPath:e}}i(JC,"buildAdaptivePredictError");o(JC,"buildAdaptivePredictError");function ZC(e,t){return e.edges[t.tokenTypeIdx]}i(ZC,"getExistingTargetState");o(ZC,"getExistingTargetState");function QC(e,t,r){let n=new $f,a=[];for(let l of e.elements){if(r.is(l.alt)===!1)continue;if(l.state.type===Ms){a.push(l);continue}let u=l.state.transitions.length;for(let c=0;c0&&!ab(s))for(let l of a)s.add(l);return s}i(QC,"computeReachSet");o(QC,"computeReachSet");function eb(e,t){if(e instanceof zp&&Ap(t,e.tokenType))return e.target}i(eb,"getReachableTarget");o(eb,"getReachableTarget");function tb(e,t){let r;for(let n of e.elements)if(t.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}i(tb,"getUniqueAlt");o(tb,"getUniqueAlt");function Yp(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}i(Yp,"newDFAState");o(Yp,"newDFAState");function Ef(e,t,r,n){return n=Xp(e,n),t.edges[r.tokenTypeIdx]=n,n}i(Ef,"addDFAEdge");o(Ef,"addDFAEdge");function Xp(e,t){if(t===al)return t;let r=t.configs.key,n=e.states[r];return n!==void 0?n:(t.configs.finalize(),e.states[r]=t,t)}i(Xp,"addDFAState");o(Xp,"addDFAState");function rb(e){let t=new $f,r=e.transitions.length;for(let n=0;n0){let a=[...e.stack],l={state:a.pop(),alt:e.alt,stack:a};hs(l,t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);let n=r.transitions.length;for(let a=0;a1)return!0;return!1}i(lb,"hasConflictingAltSet");o(lb,"hasConflictingAltSet");function ub(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}i(ub,"hasStateAssociatedWithOneAlt");o(ub,"hasStateAssociatedWithOneAlt");ys();var cb=class{static{i(this,"CstNodeBuilder")}static{o(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new Zp(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new pu;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let r=new il(e.startOffset,e.image.length,ts(e),e.tokenType,!t);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){let t=e.container;if(t){let r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}addHiddenNodes(e){let t=[];for(let a of e){let s=new il(a.startOffset,a.image.length,ts(a),a.tokenType,!0);s.root=this.rootNode,t.push(s)}let r=this.current,n=!1;if(r.content.length>0){r.content.push(...t);return}for(;r.container;){let a=r.container.content.indexOf(r);if(a>0){r.container.content.splice(a,0,...t),n=!0;break}r=r.container}n||this.rootNode.content.unshift(...t)}construct(e){let t=this.current;typeof e.$type=="string"&&!e.$infix&&(this.current.astNode=e),e.$cstNode=t;let r=this.nodeStack.pop();r?.content.length===0&&this.removeNode(r)}},Jp=class{static{i(this,"AbstractCstNode")}static{o(this,"AbstractCstNode")}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)}},il=class extends Jp{static{i(this,"LeafCstNodeImpl")}static{o(this,"LeafCstNodeImpl")}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,t,r,n,a=!1){super(),this._hidden=a,this._offset=e,this._tokenType=n,this._length=t,this._range=r}},pu=class extends Jp{static{i(this,"CompositeCstNodeImpl")}static{o(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new _1(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,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){let{range:r}=e,{range:n}=t;this._rangeCache={start:r.start,end:n.end.line=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},_1=class fb extends Array{static{i(this,"_CstNodeContainer")}static{o(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,fb.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,r,...n){return this.addParents(n),super.splice(t,r,...n)}addParents(t){for(let r of t)r.container=this.parent}},Zp=class extends pu{static{i(this,"RootCstNodeImpl")}static{o(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}},sl=Symbol("Datatype");function $o(e){return e.$type===sl}i($o,"isDataTypeNode");o($o,"isDataTypeNode");var Jm="\u200B",db=o(e=>e.endsWith(Jm)?e:e+Jm,"withRuleSuffix"),Qp=class{static{i(this,"AbstractLangiumParser")}static{o(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let t=this.lexer.definition,r=e.LanguageMetaData.mode==="production";e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new b1(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new gb(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}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()}},pb=class extends Qp{static{i(this,"LangiumParser")}static{o(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new cb,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,t){let r=this.computeRuleType(e),n;Na(e)&&(n=e.name,this.registerPrecedenceMap(e));let a=this.wrapper.DEFINE_RULE(db(e.name),this.startImplementation(r,n,t).bind(this));return this.allRules.set(e.name,a),Qe(e)&&e.entry&&(this.mainRule=a),a}registerPrecedenceMap(e){let t=e.name,r=new Map;for(let n=0;n0&&(t=this.construct()),t===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 t}startImplementation(e,t,r){return n=>{let a=!this.isRecording()&&e!==void 0;if(a){let s={$type:e};this.stack.push(s),e===sl?s.value="":t!==void 0&&(s.$infixName=t)}return r(n),a?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let r=e.startOffset;for(let n=0;nr)return t.splice(0,n);return t.splice(0,t.length)}consume(e,t,r){let n=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(n)){let a=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(a);let s=this.nodeBuilder.buildLeafNode(n,r),{assignment:l,crossRef:u}=this.getAssignment(r),c=this.current;if(l){let f=pr(r)?n.image:this.converter.convert(n.image,s);this.assign(l.operator,l.feature,f,s,u)}else if($o(c)){let f=n.image;pr(r)||(f=this.converter.convert(f,s).toString()),c.value+=f}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,t,r,n,a){let s;!this.isRecording()&&!r&&(s=this.nodeBuilder.buildCompositeNode(n));let l;try{l=this.wrapper.wrapSubrule(e,t,a)}finally{this.isRecording()||(l===void 0&&!r&&(l=this.construct()),l!==void 0&&s&&s.length>0&&this.performSubruleAssignment(l,n,s))}}performSubruleAssignment(e,t,r){let{assignment:n,crossRef:a}=this.getAssignment(t);if(n)this.assign(n.operator,n.feature,e,r,a);else if(!n){let s=this.current;if($o(s))s.value+=e.toString();else if(typeof e=="object"&&e){let u=this.assignWithoutOverride(e,s);this.stack.pop(),this.stack.push(u)}}}action(e,t){if(!this.isRecording()){let r=this.current;if(t.feature&&t.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(r.$cstNode);let a={$type:e};this.stack.push(a),this.assign(t.operator,t.feature,r,r.$cstNode)}else r.$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)):$o(e)?this.converter.convert(e.value,e.$cstNode):(Jf(this.astReflection,e),e)}constructInfix(e,t){let r=e.parts;if(!Array.isArray(r)||r.length===0)return;let n=e.operators;if(!Array.isArray(n)||r.length<2)return r[0];let a=0,s=-1;for(let T=0;Ts?(s=N.precedence,a=T):N.precedence===s&&(N.rightAssoc||(a=T))}let l=n.slice(0,a),u=n.slice(a+1),c=r.slice(0,a+1),f=r.slice(a+1),d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:l},p={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:f,operators:u},m=this.constructInfix(d,t),v=this.constructInfix(p,t);return{$type:e.$type,$cstNode:e.$cstNode,left:m,operator:n[a],right:v}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=bn(e,dr);this.assignmentMap.set(e,{assignment:t,crossRef:t&&wn(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,r,n,a){let s=this.current,l;switch(a==="single"&&typeof r=="string"?l=this.linker.buildReference(s,t,n,r):a==="multi"&&typeof r=="string"?l=this.linker.buildMultiReference(s,t,n,r):l=r,e){case"=":{s[t]=l;break}case"?=":{s[t]=!0;break}case"+=":Array.isArray(s[t])||(s[t]=[]),s[t].push(l)}}assignWithoutOverride(e,t){for(let[n,a]of Object.entries(t)){let s=e[n];s===void 0?e[n]=a:Array.isArray(s)&&Array.isArray(a)&&(a.push(...s),e[n]=a)}let r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},hb=class{static{i(this,"AbstractParserErrorMessageProvider")}static{o(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return $a.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return $a.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return $a.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return $a.buildEarlyExitMessage(e)}},eh=class extends hb{static{i(this,"LangiumParserErrorMessageProvider")}static{o(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:e,actual:t}){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 \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},mb=class extends Qp{static{i(this,"LangiumCompletionParser")}static{o(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let t=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=t.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,t){let r=this.wrapper.DEFINE_RULE(db(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,r),e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{let r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}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,t,r){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,r,n,a){this.before(n),this.wrapper.wrapSubrule(e,t,a),this.after(n)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},C1={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new eh},gb=class extends uL{static{i(this,"ChevrotainWrapper")}static{o(this,"ChevrotainWrapper")}constructor(e,t){let r=t&&"maxLookahead"in t;super(e,{...C1,lookaheadStrategy:r?new Ip({maxLookahead:t.maxLookahead}):new E1({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,r){return this.RULE(e,t,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},b1=class extends gb{static{i(this,"ProfilerWrapper")}static{o(this,"ProfilerWrapper")}constructor(e,t,r){super(e,t),this.task=r}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,t,r){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,r)}finally{this.task.stopSubTask(this.ruleName(t))}}};function hu(e,t,r){return yb({parser:t,tokens:r,ruleNames:new Map},e),t}i(hu,"createParser");o(hu,"createParser");function yb(e,t){let r=Il(t,!1),n=oe(t.rules).filter(Qe).filter(s=>r.has(s));for(let s of n){let l={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(s,Mr(l,s.definition))}let a=oe(t.rules).filter(Na).filter(s=>r.has(s));for(let s of a)e.parser.rule(s,vb(e,s))}i(yb,"buildRules");o(yb,"buildRules");function vb(e,t){let r=t.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if(Ct(r))throw new Error("Cannot use terminal rule in infix expression");let n=t.operators.precedences.flatMap(v=>v.operators),a={$type:"Group",elements:[]},s={$container:a,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},l={$container:a,$type:"Group",elements:[],cardinality:"*"};a.elements.push(s,l);let c={$container:l,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},f={...s,$container:l};l.elements.push(c,f);let p=n.map(v=>e.tokens[v.value]).map((v,T)=>({ALT:o(()=>e.parser.consume(T,v,c),"ALT")})),m;return v=>{m??(m=mu(e,r)),e.parser.subrule(0,m,!1,s,v),e.parser.many(0,{DEF:o(()=>{e.parser.alternatives(0,p),e.parser.subrule(1,m,!1,f,v)},"DEF")})}}i(vb,"buildInfixRule");o(vb,"buildInfixRule");function Mr(e,t,r=!1){let n;if(pr(t))n=Cb(e,t);else if(Pr(t))n=Tb(e,t);else if(dr(t))n=Mr(e,t.terminal);else if(wn(t))n=th(e,t);else if(hr(t))n=Rb(e,t);else if(Rl(t))n=Ab(e,t);else if(_l(t))n=Eb(e,t);else if(In(t))n=_b(e,t);else if(ad(t)){let a=e.consume++;n=o(()=>e.parser.consume(a,Lr,t),"method")}else throw new bl(t.$cstNode,`Unexpected element type: ${t.$type}`);return rh(e,r?void 0:ms(t),n,t.cardinality)}i(Mr,"buildElement");o(Mr,"buildElement");function Tb(e,t){let r=Rn(t);return()=>e.parser.action(r,t)}i(Tb,"buildAction");o(Tb,"buildAction");function Rb(e,t){let r=t.rule.ref;if(Sn(r)){let n=e.subrule++,a=Qe(r)&&r.fragment,s=t.arguments.length>0?$b(r,t.arguments):()=>({}),l;return u=>{l??(l=mu(e,r)),e.parser.subrule(n,l,a,t,s(u))}}else if(Ct(r)){let n=e.consume++,a=ol(e,r.name);return()=>e.parser.consume(n,a,t)}else if(r)Fr(r);else throw new bl(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}i(Rb,"buildRuleCall");o(Rb,"buildRuleCall");function $b(e,t){if(t.some(n=>n.calledByName)){let n=t.map(a=>({parameterName:a.parameter?.ref?.name,predicate:Nt(a.value)}));return a=>{let s={};for(let{parameterName:l,predicate:u}of n)l&&(s[l]=u(a));return s}}else{let n=t.map(a=>Nt(a.value));return a=>{let s={};for(let l=0;lt(n)||r(n)}else if(rd(e)){let t=Nt(e.left),r=Nt(e.right);return n=>t(n)&&r(n)}else if(od(e)){let t=Nt(e.value);return r=>!t(r)}else if(ld(e)){let t=e.parameter.ref.name;return r=>r!==void 0&&r[t]===!0}else if(ed(e)){let t=!!e.true;return()=>t}Fr(e)}i(Nt,"buildPredicate");o(Nt,"buildPredicate");function Ab(e,t){if(t.elements.length===1)return Mr(e,t.elements[0]);{let r=[];for(let a of t.elements){let s={ALT:Mr(e,a,!0)},l=ms(a);l&&(s.GATE=Nt(l)),r.push(s)}let n=e.or++;return a=>e.parser.alternatives(n,r.map(s=>{let l={ALT:o(()=>s.ALT(a),"ALT")},u=s.GATE;return u&&(l.GATE=()=>u(a)),l}))}}i(Ab,"buildAlternatives");o(Ab,"buildAlternatives");function Eb(e,t){if(t.elements.length===1)return Mr(e,t.elements[0]);let r=[];for(let u of t.elements){let c={ALT:Mr(e,u,!0)},f=ms(u);f&&(c.GATE=Nt(f)),r.push(c)}let n=e.or++,a=o((u,c)=>{let f=c.getRuleStack().join("-");return`uGroup_${u}_${f}`},"idFunc"),s=o(u=>e.parser.alternatives(n,r.map((c,f)=>{let d={ALT:o(()=>!0,"ALT")},p=e.parser;d.ALT=()=>{if(c.ALT(u),!p.isRecording()){let v=a(n,p);p.unorderedGroups.get(v)||p.unorderedGroups.set(v,[]);let T=p.unorderedGroups.get(v);typeof T?.[f]>"u"&&(T[f]=!0)}};let m=c.GATE;return m?d.GATE=()=>m(u):d.GATE=()=>!p.unorderedGroups.get(a(n,p))?.[f],d})),"alternatives"),l=rh(e,ms(t),s,"*");return u=>{l(u),e.parser.isRecording()||e.parser.unorderedGroups.delete(a(n,e.parser))}}i(Eb,"buildUnorderedGroup");o(Eb,"buildUnorderedGroup");function _b(e,t){let r=t.elements.map(n=>Mr(e,n));return n=>r.forEach(a=>a(n))}i(_b,"buildGroup");o(_b,"buildGroup");function ms(e){if(In(e))return e.guardCondition}i(ms,"getGuardCondition");o(ms,"getGuardCondition");function th(e,t,r=t.terminal){if(r)if(hr(r)&&Qe(r.rule.ref)){let n=r.rule.ref,a=e.subrule++,s;return l=>{s??(s=mu(e,n)),e.parser.subrule(a,s,!1,t,l)}}else if(hr(r)&&Ct(r.rule.ref)){let n=e.consume++,a=ol(e,r.rule.ref.name);return()=>e.parser.consume(n,a,t)}else if(pr(r)){let n=e.consume++,a=ol(e,r.value);return()=>e.parser.consume(n,a,t)}else throw new Error("Could not build cross reference parser");else{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);let a=Ol(t.type.ref)?.terminal;if(!a)throw new Error("Could not find name assignment for type: "+Rn(t.type.ref));return th(e,t,a)}}i(th,"buildCrossReference");o(th,"buildCrossReference");function Cb(e,t){let r=e.consume++,n=e.tokens[t.value];if(!n)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(r,n,t)}i(Cb,"buildKeyword");o(Cb,"buildKeyword");function rh(e,t,r,n){let a=t&&Nt(t);if(!n)if(a){let s=e.or++;return l=>e.parser.alternatives(s,[{ALT:o(()=>r(l),"ALT"),GATE:o(()=>a(l),"GATE")},{ALT:gf(),GATE:o(()=>!a(l),"GATE")}])}else return r;if(n==="*"){let s=e.many++;return l=>e.parser.many(s,{DEF:o(()=>r(l),"DEF"),GATE:a?()=>a(l):void 0})}else if(n==="+"){let s=e.many++;if(a){let l=e.or++;return u=>e.parser.alternatives(l,[{ALT:o(()=>e.parser.atLeastOne(s,{DEF:o(()=>r(u),"DEF")}),"ALT"),GATE:o(()=>a(u),"GATE")},{ALT:gf(),GATE:o(()=>!a(u),"GATE")}])}else return l=>e.parser.atLeastOne(s,{DEF:o(()=>r(l),"DEF")})}else if(n==="?"){let s=e.optional++;return l=>e.parser.optional(s,{DEF:o(()=>r(l),"DEF"),GATE:a?()=>a(l):void 0})}else Fr(n)}i(rh,"wrap");o(rh,"wrap");function mu(e,t){let r=bb(e,t),n=e.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}i(mu,"getRule");o(mu,"getRule");function bb(e,t){if(Sn(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,n=r.$container,a=t.$type;for(;!Qe(n);)(In(n)||Rl(n)||_l(n))&&(a=n.elements.indexOf(r).toString()+":"+a),r=n,n=n.$container;return a=n.name+":"+a,e.ruleNames.set(t,a),a}}i(bb,"getRuleName");o(bb,"getRuleName");function ol(e,t){let r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}i(ol,"getToken");o(ol,"getToken");function nh(e){let t=e.Grammar,r=e.parser.Lexer,n=new mb(e);return hu(t,n,r.definition),n.finalize(),n}i(nh,"createCompletionParser");o(nh,"createCompletionParser");function ah(e){let t=ih(e);return t.finalize(),t}i(ah,"createLangiumParser");o(ah,"createLangiumParser");function ih(e){let t=e.Grammar,r=e.parser.Lexer,n=new pb(e);return hu(t,n,r.definition)}i(ih,"prepareLangiumParser");o(ih,"prepareLangiumParser");var gu=class{static{i(this,"DefaultTokenBuilder")}static{o(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){let r=oe(Il(e,!1)),n=this.buildTerminalTokens(r),a=this.buildKeywordTokens(r,n,t);return a.push(...n),a}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Ct).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){let t=Es(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,n={name:e.name,PATTERN:r};return typeof r=="function"&&(n.LINE_BREAKS=!0),e.hidden&&(n.GROUP=wl(t)?Ze.SKIPPED:"hidden"),n}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s"))}regexPatternFunction(e){let t=new RegExp(e,e.flags+"y");return(r,n)=>(t.lastIndex=n,t.exec(r))}buildKeywordTokens(e,t,r){return e.filter(Sn).flatMap(n=>$r(n).filter(pr)).distinct(n=>n.value).toArray().sort((n,a)=>a.value.length-n.value.length).map(n=>this.buildKeywordToken(n,t,!!r?.caseInsensitive))}buildKeywordToken(e,t,r){let n=this.buildKeywordPattern(e,r),a={name:e.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(e,t)};return typeof n=="function"&&(a.LINE_BREAKS=!0),a}buildKeywordPattern(e,t){return t?new RegExp(ja(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((r,n)=>{let a=n?.PATTERN;return a?.source&&Nd("^"+a.source+"$",e.value)&&r.push(n),r},[])}},sh=class{static{i(this,"DefaultValueConverter")}static{o(this,"DefaultValueConverter")}convert(e,t){let r=t.grammarSource;if(wn(r)&&(r=Dd(r)),hr(r)){let n=r.rule.ref;if(!n)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(n,e,t)}return e}runConverter(e,t,r){switch(e.name.toUpperCase()){case"INT":return Kt.convertInt(t);case"STRING":return Kt.convertString(t);case"ID":return Kt.convertID(t)}switch(Kd(e)?.toLowerCase()){case"number":return Kt.convertNumber(t);case"boolean":return Kt.convertBoolean(t);case"bigint":return Kt.convertBigint(t);case"date":return Kt.convertDate(t);default:return t}}},Kt;(function(e){function t(f){let d="";for(let p=1;p{typeof setImmediate>"u"?setTimeout(e,0):setImmediate(e)})}i(yu,"delayNextTick");o(yu,"delayNextTick");var Ao=0,Sb=10;function vu(){return Ao=performance.now(),new pe.CancellationTokenSource}i(vu,"startCancelableOperation");o(vu,"startCancelableOperation");function oh(e){Sb=e}i(oh,"setInterruptionPeriod");o(oh,"setInterruptionPeriod");var Vt=Symbol("OperationCancelled");function Kn(e){return e===Vt}i(Kn,"isOperationCancelled");o(Kn,"isOperationCancelled");async function je(e){if(e===pe.CancellationToken.None)return;let t=performance.now();if(t-Ao>=Sb&&(Ao=t,await yu(),Ao=performance.now()),e.isCancellationRequested)throw Vt}i(je,"interruptAndCheck");o(je,"interruptAndCheck");var Tr=class{static{i(this,"Deferred")}static{o(this,"Deferred")}constructor(){this.promise=new Promise((e,t)=>{this.resolve=r=>(e(r),this),this.reject=r=>(t(r),this)})}},Zm=class _f{static{i(this,"_FullTextDocument")}static{o(this,"FullTextDocument")}constructor(t,r,n,a){this._uri=t,this._languageId=r,this._version=n,this._content=a,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content}update(t,r){for(let n of t)if(_f.isIncremental(n)){let a=uh(n.range),s=this.offsetAt(a.start),l=this.offsetAt(a.end);this._content=this._content.substring(0,s)+n.text+this._content.substring(l,this._content.length);let u=Math.max(a.start.line,0),c=Math.max(a.end.line,0),f=this._lineOffsets,d=Cf(n.text,!1,s);if(c-u===d.length)for(let m=0,v=d.length;mt?a=l:n=l+1}let s=n-1;return t=this.ensureBeforeEOL(t,r[s]),{line:s,character:t-r[s]}}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let n=r[t.line];if(t.character<=0)return n;let a=t.line+1r&&lh(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}},ll;(function(e){function t(a,s,l,u){return new Zm(a,s,l,u)}i(t,"create"),o(t,"create"),e.create=t;function r(a,s,l){if(a instanceof Zm)return a.update(s,l),a;throw new Error("TextDocument.update: document must be created by TextDocument.create")}i(r,"update"),o(r,"update"),e.update=r;function n(a,s){let l=a.getText(),u=ul(s.map(wb),(d,p)=>{let m=d.range.start.line-p.range.start.line;return m===0?d.range.start.character-p.range.start.character:m}),c=0,f=[];for(let d of u){let p=a.offsetAt(d.range.start);if(pc&&f.push(l.substring(c,p)),d.newText.length&&f.push(d.newText),c=a.offsetAt(d.range.end)}return f.push(l.substr(c)),f.join("")}i(n,"applyEdits"),o(n,"applyEdits"),e.applyEdits=n})(ll||(ll={}));function ul(e,t){if(e.length<=1)return e;let r=e.length/2|0,n=e.slice(0,r),a=e.slice(r);ul(n,t),ul(a,t);let s=0,l=0,u=0;for(;sr.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}i(uh,"getWellformedRange");o(uh,"getWellformedRange");function wb(e){let t=uh(e.range);return t!==e.range?{newText:e.newText,range:t}:e}i(wb,"getWellformedEdit");o(wb,"getWellformedEdit");var Ib;(()=>{"use strict";var e={975:O=>{function C(R){if(typeof R!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(R))}i(C,"e2"),o(C,"e");function y(R,$){for(var b,L="",x=0,M=-1,U=0,W=0;W<=R.length;++W){if(W2){var le=L.lastIndexOf("/");if(le!==L.length-1){le===-1?(L="",x=0):x=(L=L.slice(0,le)).length-1-L.lastIndexOf("/"),M=W,U=0;continue}}else if(L.length===2||L.length===1){L="",x=0,M=W,U=0;continue}}$&&(L.length>0?L+="/..":L="..",x=2)}else L.length>0?L+="/"+R.slice(M+1,W):L=R.slice(M+1,W),x=W-M-1;M=W,U=0}else b===46&&U!==-1?++U:U=-1}return L}i(y,"r2"),o(y,"r");var E={resolve:o(function(){for(var R,$="",b=!1,L=arguments.length-1;L>=-1&&!b;L--){var x;L>=0?x=arguments[L]:(R===void 0&&(R=process.cwd()),x=R),C(x),x.length!==0&&($=x+"/"+$,b=x.charCodeAt(0)===47)}return $=y($,!b),b?$.length>0?"/"+$:"/":$.length>0?$:"."},"resolve"),normalize:o(function(R){if(C(R),R.length===0)return".";var $=R.charCodeAt(0)===47,b=R.charCodeAt(R.length-1)===47;return(R=y(R,!$)).length!==0||$||(R="."),R.length>0&&b&&(R+="/"),$?"/"+R:R},"normalize"),isAbsolute:o(function(R){return C(R),R.length>0&&R.charCodeAt(0)===47},"isAbsolute"),join:o(function(){if(arguments.length===0)return".";for(var R,$=0;$0&&(R===void 0?R=b:R+="/"+b)}return R===void 0?".":E.normalize(R)},"join"),relative:o(function(R,$){if(C(R),C($),R===$||(R=E.resolve(R))===($=E.resolve($)))return"";for(var b=1;bW){if($.charCodeAt(M+H)===47)return $.slice(M+H+1);if(H===0)return $.slice(M+H)}else x>W&&(R.charCodeAt(b+H)===47?le=H:H===0&&(le=0));break}var Oe=R.charCodeAt(b+H);if(Oe!==$.charCodeAt(M+H))break;Oe===47&&(le=H)}var ie="";for(H=b+le+1;H<=L;++H)H!==L&&R.charCodeAt(H)!==47||(ie.length===0?ie+="..":ie+="/..");return ie.length>0?ie+$.slice(M+le):(M+=le,$.charCodeAt(M)===47&&++M,$.slice(M))},"relative"),_makeLong:o(function(R){return R},"_makeLong"),dirname:o(function(R){if(C(R),R.length===0)return".";for(var $=R.charCodeAt(0),b=$===47,L=-1,x=!0,M=R.length-1;M>=1;--M)if(($=R.charCodeAt(M))===47){if(!x){L=M;break}}else x=!1;return L===-1?b?"/":".":b&&L===1?"//":R.slice(0,L)},"dirname"),basename:o(function(R,$){if($!==void 0&&typeof $!="string")throw new TypeError('"ext" argument must be a string');C(R);var b,L=0,x=-1,M=!0;if($!==void 0&&$.length>0&&$.length<=R.length){if($.length===R.length&&$===R)return"";var U=$.length-1,W=-1;for(b=R.length-1;b>=0;--b){var le=R.charCodeAt(b);if(le===47){if(!M){L=b+1;break}}else W===-1&&(M=!1,W=b+1),U>=0&&(le===$.charCodeAt(U)?--U==-1&&(x=b):(U=-1,x=W))}return L===x?x=W:x===-1&&(x=R.length),R.slice(L,x)}for(b=R.length-1;b>=0;--b)if(R.charCodeAt(b)===47){if(!M){L=b+1;break}}else x===-1&&(M=!1,x=b+1);return x===-1?"":R.slice(L,x)},"basename"),extname:o(function(R){C(R);for(var $=-1,b=0,L=-1,x=!0,M=0,U=R.length-1;U>=0;--U){var W=R.charCodeAt(U);if(W!==47)L===-1&&(x=!1,L=U+1),W===46?$===-1?$=U:M!==1&&(M=1):$!==-1&&(M=-1);else if(!x){b=U+1;break}}return $===-1||L===-1||M===0||M===1&&$===L-1&&$===b+1?"":R.slice($,L)},"extname"),format:o(function(R){if(R===null||typeof R!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof R);return(function($,b){var L=b.dir||b.root,x=b.base||(b.name||"")+(b.ext||"");return L?L===b.root?L+x:L+"/"+x:x})(0,R)},"format"),parse:o(function(R){C(R);var $={root:"",dir:"",base:"",ext:"",name:""};if(R.length===0)return $;var b,L=R.charCodeAt(0),x=L===47;x?($.root="/",b=1):b=0;for(var M=-1,U=0,W=-1,le=!0,H=R.length-1,Oe=0;H>=b;--H)if((L=R.charCodeAt(H))!==47)W===-1&&(le=!1,W=H+1),L===46?M===-1?M=H:Oe!==1&&(Oe=1):M!==-1&&(Oe=-1);else if(!le){U=H+1;break}return M===-1||W===-1||Oe===0||Oe===1&&M===W-1&&M===U+1?W!==-1&&($.base=$.name=U===0&&x?R.slice(1,W):R.slice(U,W)):(U===0&&x?($.name=R.slice(1,M),$.base=R.slice(1,W)):($.name=R.slice(U,M),$.base=R.slice(U,W)),$.ext=R.slice(M,W)),U>0?$.dir=R.slice(0,U-1):x&&($.dir="/"),$},"parse"),sep:"/",delimiter:":",win32:null,posix:null};E.posix=E,O.exports=E}},t={};function r(O){var C=t[O];if(C!==void 0)return C.exports;var y=t[O]={exports:{}};return e[O](y,y.exports,r),y.exports}i(r,"r"),o(r,"r"),r.d=(O,C)=>{for(var y in C)r.o(C,y)&&!r.o(O,y)&&Object.defineProperty(O,y,{enumerable:!0,get:C[y]})},r.o=(O,C)=>Object.prototype.hasOwnProperty.call(O,C),r.r=O=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})};var n={};let a;r.r(n),r.d(n,{URI:o(()=>m,"URI"),Utils:o(()=>Re,"Utils")}),typeof process=="object"?a=process.platform==="win32":typeof navigator=="object"&&(a=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,l=/^\//,u=/^\/\//;function c(O,C){if(!O.scheme&&C)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${O.authority}", path: "${O.path}", query: "${O.query}", fragment: "${O.fragment}"}`);if(O.scheme&&!s.test(O.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(O.path){if(O.authority){if(!l.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(u.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 ("//")')}}i(c,"a"),o(c,"a");let f="",d="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class m{static{i(this,"l")}static{o(this,"l")}static isUri(C){return C instanceof m||!!C&&typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="string"&&typeof C.with=="function"&&typeof C.toString=="function"}scheme;authority;path;query;fragment;constructor(C,y,E,R,$,b=!1){typeof C=="object"?(this.scheme=C.scheme||f,this.authority=C.authority||f,this.path=C.path||f,this.query=C.query||f,this.fragment=C.fragment||f):(this.scheme=(function(L,x){return L||x?L:"file"})(C,b),this.authority=y||f,this.path=(function(L,x){switch(L){case"https":case"http":case"file":x?x[0]!==d&&(x=d+x):x=d}return x})(this.scheme,E||f),this.query=R||f,this.fragment=$||f,c(this,b))}get fsPath(){return S(this,!1)}with(C){if(!C)return this;let{scheme:y,authority:E,path:R,query:$,fragment:b}=C;return y===void 0?y=this.scheme:y===null&&(y=f),E===void 0?E=this.authority:E===null&&(E=f),R===void 0?R=this.path:R===null&&(R=f),$===void 0?$=this.query:$===null&&($=f),b===void 0?b=this.fragment:b===null&&(b=f),y===this.scheme&&E===this.authority&&R===this.path&&$===this.query&&b===this.fragment?this:new T(y,E,R,$,b)}static parse(C,y=!1){let E=p.exec(C);return E?new T(E[2]||f,ee(E[4]||f),ee(E[5]||f),ee(E[7]||f),ee(E[9]||f),y):new T(f,f,f,f,f)}static file(C){let y=f;if(a&&(C=C.replace(/\\/g,d)),C[0]===d&&C[1]===d){let E=C.indexOf(d,2);E===-1?(y=C.substring(2),C=d):(y=C.substring(2,E),C=C.substring(E)||d)}return new T("file",y,C,f,f)}static from(C){let y=new T(C.scheme,C.authority,C.path,C.query,C.fragment);return c(y,!0),y}toString(C=!1){return _(this,C)}toJSON(){return this}static revive(C){if(C){if(C instanceof m)return C;{let y=new T(C);return y._formatted=C.external,y._fsPath=C._sep===v?C.fsPath:null,y}}return C}}let v=a?1:void 0;class T extends m{static{i(this,"d")}static{o(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=S(this,!1)),this._fsPath}toString(C=!1){return C?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)}toJSON(){let C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=v),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C}}let w={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 N(O,C,y){let E,R=-1;for(let $=0;$=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45||b===46||b===95||b===126||C&&b===47||y&&b===91||y&&b===93||y&&b===58)R!==-1&&(E+=encodeURIComponent(O.substring(R,$)),R=-1),E!==void 0&&(E+=O.charAt($));else{E===void 0&&(E=O.substr(0,$));let L=w[b];L!==void 0?(R!==-1&&(E+=encodeURIComponent(O.substring(R,$)),R=-1),E+=L):R===-1&&(R=$)}}return R!==-1&&(E+=encodeURIComponent(O.substring(R))),E!==void 0?E:O}i(N,"m"),o(N,"m");function I(O){let C;for(let y=0;y1&&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?C?O.path.substr(1):O.path[1].toLowerCase()+O.path.substr(2):O.path,a&&(y=y.replace(/\//g,"\\")),y}i(S,"v"),o(S,"v");function _(O,C){let y=C?I:N,E="",{scheme:R,authority:$,path:b,query:L,fragment:x}=O;if(R&&(E+=R,E+=":"),($||R==="file")&&(E+=d,E+=d),$){let M=$.indexOf("@");if(M!==-1){let U=$.substr(0,M);$=$.substr(M+1),M=U.lastIndexOf(":"),M===-1?E+=y(U,!1,!1):(E+=y(U.substr(0,M),!1,!1),E+=":",E+=y(U.substr(M+1),!1,!0)),E+="@"}$=$.toLowerCase(),M=$.lastIndexOf(":"),M===-1?E+=y($,!1,!0):(E+=y($.substr(0,M),!1,!0),E+=$.substr(M))}if(b){if(b.length>=3&&b.charCodeAt(0)===47&&b.charCodeAt(2)===58){let M=b.charCodeAt(1);M>=65&&M<=90&&(b=`/${String.fromCharCode(M+32)}:${b.substr(3)}`)}else if(b.length>=2&&b.charCodeAt(1)===58){let M=b.charCodeAt(0);M>=65&&M<=90&&(b=`${String.fromCharCode(M+32)}:${b.substr(2)}`)}E+=y(b,!0,!1)}return L&&(E+="?",E+=y(L,!1,!1)),x&&(E+="#",E+=C?x:N(x,!1,!1)),E}i(_,"b"),o(_,"b");function P(O){try{return decodeURIComponent(O)}catch{return O.length>3?O.substr(0,3)+P(O.substr(3)):O}}i(P,"C"),o(P,"C");let j=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ee(O){return O.match(j)?O.replace(j,(C=>P(C))):O}i(ee,"w"),o(ee,"w");var X=r(975);let ce=X.posix||X,me="/";var Re;(function(O){O.joinPath=function(C,...y){return C.with({path:ce.join(C.path,...y)})},O.resolvePath=function(C,...y){let E=C.path,R=!1;E[0]!==me&&(E=me+E,R=!0);let $=ce.resolve(E,...y);return R&&$[0]===me&&!C.authority&&($=$.substring(1)),C.with({path:$})},O.dirname=function(C){if(C.path.length===0||C.path===me)return C;let y=ce.dirname(C.path);return y.length===1&&y.charCodeAt(0)===46&&(y=""),C.with({path:y})},O.basename=function(C){return ce.basename(C.path)},O.extname=function(C){return ce.extname(C.path)}})(Re||(Re={})),Ib=n})();var{URI:dt,Utils:vi}=Ib,Je;(function(e){e.basename=vi.basename,e.dirname=vi.dirname,e.extname=vi.extname,e.joinPath=vi.joinPath,e.resolvePath=vi.resolvePath;let t=typeof process=="object"&&process?.platform==="win32";function r(l,u){return l?.toString()===u?.toString()}i(r,"equals"),o(r,"equals"),e.equals=r;function n(l,u){let c=typeof l=="string"?dt.parse(l).path:l.path,f=typeof u=="string"?dt.parse(u).path:u.path,d=c.split("/").filter(w=>w.length>0),p=f.split("/").filter(w=>w.length>0);if(t){let w=/^[A-Z]:$/;if(d[0]&&w.test(d[0])&&(d[0]=d[0].toLowerCase()),p[0]&&w.test(p[0])&&(p[0]=p[0].toLowerCase()),d[0]!==p[0])return f.substring(1)}let m=0;for(;m({name:n.name,uri:Je.joinPath(dt.parse(t),n.name).toString(),element:n.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(Je.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let r=e.split("/");e.charAt(e.length-1)==="/"&&r.pop();let n=this.root;for(let a of r){let s=n.children.get(a);if(!s)if(t)s={name:a,children:new Map,parent:n},n.children.set(a,s);else return;n=s}return n}collectValues(e){let t=[];e.element&&t.push(e.element);for(let r of e.children.values())t.push(...this.collectValues(r));return t}},Z;(function(e){e[e.Changed=0]="Changed",e[e.Parsed=1]="Parsed",e[e.IndexedContent=2]="IndexedContent",e[e.ComputedScopes=3]="ComputedScopes",e[e.Linked=4]="Linked",e[e.IndexedReferences=5]="IndexedReferences",e[e.Validated=6]="Validated"})(Z||(Z={}));var Nb=class{static{i(this,"DefaultLangiumDocumentFactory")}static{o(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=pe.CancellationToken.None){let r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??dt.parse(e.uri),pe.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return pe.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,r){if(typeof t=="string"){let n=this.parse(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}else if("$model"in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let n=this.parse(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}async createAsync(e,t,r){if(typeof t=="string"){let n=await this.parseAsync(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}else{let n=await this.parseAsync(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}createLangiumDocument(e,t,r,n){let a;if(r)a={parseResult:e,uri:t,state:Z.Parsed,references:[],textDocument:r};else{let s=this.createTextDocumentGetter(t,n);a={parseResult:e,uri:t,state:Z.Parsed,references:[],get textDocument(){return s()}}}return e.value.$document=a,a}async update(e,t){let r=e.parseResult.value.$cstNode?.root.fullText,n=this.textDocuments?.get(e.uri.toString()),a=n?n.getText():await this.fileSystemProvider.readFile(e.uri);if(n)Object.defineProperty(e,"textDocument",{value:n});else{let s=this.createTextDocumentGetter(e.uri,a);Object.defineProperty(e,"textDocument",{get:s})}return r!==a&&(e.parseResult=await this.parseAsync(e.uri,a,t),e.parseResult.value.$document=e),e.state=Z.Parsed,e}parse(e,t,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,r)}parseAsync(e,t,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,r)}createTextDocumentGetter(e,t){let r=this.serviceRegistry,n;return()=>n??(n=ll.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},kb=class{static{i(this,"DefaultLangiumDocuments")}static{o(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new ch,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return oe(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(r),r)}createDocument(e,t,r){if(r)return this.langiumDocumentFactory.fromString(t,e,r).then(n=>(this.addDocument(n),n));{let n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),r=this.documentTrie.find(t);return r&&this.documentBuilder().resetToState(r,Z.Changed),r}deleteDocument(e){let t=e.toString(),r=this.documentTrie.find(t);return r&&(r.state=Z.Changed,this.documentTrie.delete(t)),r}deleteDocuments(e){let t=e.toString(),r=this.documentTrie.findAll(t);for(let n of r)n.state=Z.Changed;return this.documentTrie.delete(t),r}},Zr=Symbol("RefResolving"),Pb=class{static{i(this,"DefaultLinker")}static{o(this,"DefaultLinker")}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,t=pe.CancellationToken.None){if(this.profiler?.isActive("linking")){let r=this.profiler.createTask("linking",this.languageId);r.start();try{for(let n of Pt(e.parseResult.value))await je(t),Ia(n).forEach(a=>{let s=`${n.$type}:${a.property}`;r.startSubTask(s);try{this.doLink(a,e)}finally{r.stopSubTask(s)}})}finally{r.stop()}}else for(let r of Pt(e.parseResult.value))await je(t),Ia(r).forEach(n=>this.doLink(n,e))}doLink(e,t){let r=e.reference;if("_ref"in r&&r._ref===void 0){r._ref=Zr;try{let n=this.getCandidate(e);if(tn(n))r._ref=n;else{r._nodeDescription=n;let a=this.loadAstNode(n);r._ref=a??this.createLinkingError(e,n)}}catch(n){console.error(`An error occurred while resolving reference to '${r.$refText}':`,n);let a=n.message??String(n);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${a}`}}t.references.push(r)}else if("_items"in r&&r._items===void 0){r._items=Zr;try{let n=this.getCandidates(e),a=[];if(tn(n))r._linkingError=n;else for(let s of n){let l=this.loadAstNode(s);l&&a.push({ref:l,$nodeDescription:s})}r._items=a}catch(n){r._linkingError={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${n}`},r._items=[]}t.references.push(r)}}unlink(e){for(let t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_items"in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let r=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(n=>`${n.documentUri}#${n.path}`).toArray();return r.length>0?r:this.createLinkingError(e)}buildReference(e,t,r,n){let a=this,s={$refNode:r,$refText:n,_ref:void 0,get ref(){if(Pe(this._ref))return this._ref;if(Hf(this._nodeDescription)){let l=a.loadAstNode(this._nodeDescription);this._ref=l??a.createLinkingError({reference:s,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){this._ref=Zr;let l=Aa(e).$document,u=a.getLinkedNode({reference:s,container:e,property:t});if(u.error&&l&&l.state0))return this._linkingError=a.createLinkingError({reference:s,container:e,property:t})}};return s}throwCyclicReferenceError(e,t,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${r}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(tn(t))return{error:t};let r=this.loadAstNode(t);return r?{node:r,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let r=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${r}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let r=Aa(e.container).$document;r&&r.statewn(t)&&t.isMulti)}findDeclarations(e){if(e){let t=Gd(e),r=e.astNode;if(t&&r){let n=r[t.feature];if(Xe(n)||Ht(n))return So(n);if(Array.isArray(n)){for(let a of n)if((Xe(a)||Ht(a))&&a.$refNode&&a.$refNode.offset<=e.offset&&a.$refNode.end>=e.end)return So(a)}}if(r){let n=this.nameProvider.getNameNode(r);if(n&&(n===e||vd(e,n)))return this.getSelfNodes(r)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),r=this.getNodeFromReferenceDescription(t.head());if(r){for(let n of Ia(r))if(Ht(n.reference)&&n.reference.items.some(a=>a.ref===e))return n.reference.items.map(a=>a.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let t=this.findDeclarations(e),r=[];for(let n of t){let a=this.nameProvider.getNameNode(n)??n.$cstNode;a&&r.push(a)}return r}findReferences(e,t){let r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let n=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(n=n.filter(a=>Je.equals(a.sourceUri,t.documentUri))),r.push(...n),oe(r)}getSelfReferences(e){let t=this.getSelfNodes(e),r=[];for(let n of t){let a=this.nameProvider.getNameNode(n);if(a){let s=kt(n),l=this.nodeLocator.getAstNodePath(n);r.push({sourceUri:s.uri,sourcePath:l,targetUri:s.uri,targetPath:l,segment:Pa(a),local:!0})}}return r}},Rr=class{static{i(this,"MultiMap")}static{o(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(let[t,r]of e)this.add(t,r)}get size(){return es.sum(oe(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{let r=this.map.get(e);if(r){let n=r.indexOf(t);if(n>=0)return r.length===1?this.map.delete(e):r.splice(n,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?oe(t):ba}has(e,t){if(t===void 0)return this.map.has(e);{let r=this.map.get(e);return r?r.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,r)=>t.forEach(n=>e(n,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return oe(this.map.entries()).flatMap(([e,t])=>t.map(r=>[e,r]))}keys(){return oe(this.map.keys())}values(){return oe(this.map.values()).flat()}entriesGroupedByKey(){return oe(this.map.entries())}},cl=class{static{i(this,"BiMap")}static{o(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);return t!==void 0?(this.map.delete(e),this.inverse.delete(t),!0):!1}},Db=class{static{i(this,"DefaultScopeComputation")}static{o(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=pe.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=Ts,n=pe.CancellationToken.None){let a=[];this.addExportedSymbol(e,a,t);for(let s of r(e))await je(n),this.addExportedSymbol(s,a,t);return a}addExportedSymbol(e,t,r){let n=this.nameProvider.getName(e);n&&t.push(this.descriptions.createDescription(e,n,r))}async collectLocalSymbols(e,t=pe.CancellationToken.None){let r=e.parseResult.value,n=new Rr;for(let a of $r(r))await je(t),this.addLocalSymbol(a,e,n);return n}addLocalSymbol(e,t,r){let n=e.$container;if(n){let a=this.nameProvider.getName(e);a&&r.add(n,this.descriptions.createDescription(e,a,t))}}},bf=class{static{i(this,"StreamScope")}static{o(this,"StreamScope")}constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.find(n=>n.name.toLowerCase()===t):this.elements.find(n=>n.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.filter(n=>n.name.toLowerCase()===t):this.elements.filter(n=>n.name===e);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(e)):r}},S1=class{static{i(this,"MapScope")}static{o(this,"MapScope")}constructor(e,t,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let n of e){let a=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(a,n)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t),n=r?[r]:[];return(this.concatOuterScope||n.length>0)&&this.outerScope?oe(n).concat(this.outerScope.getElements(e)):oe(n)}getAllElements(){let e=oe(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},Mb=class{static{i(this,"MultiMapScope")}static{o(this,"MultiMapScope")}constructor(e,t,r){this.elements=new Rr,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let n of e){let a=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(a,n)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t)[0];if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return(this.concatOuterScope||r.length===0)&&this.outerScope?oe(r).concat(this.outerScope.getElements(e)):oe(r)}getAllElements(){let e=oe(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},w1={getElement(){},getElements(){return ba},getAllElements(){return ba}},Tu=class{static{i(this,"DisposableCache")}static{o(this,"DisposableCache")}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")}},dh=class extends Tu{static{i(this,"SimpleCache")}static{o(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){let r=t();return this.cache.set(e,r),r}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},Ru=class extends Tu{static{i(this,"ContextCache")}static{o(this,"ContextCache")}constructor(e){super(),this.cache=new Map,this.converter=e??(t=>t)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){this.throwIfDisposed();let n=this.cacheForContext(e);if(n.has(t))return n.get(t);if(r){let a=r();return n.set(t,a),a}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}},xb=class extends Ru{static{i(this,"DocumentCache")}static{o(this,"DocumentCache")}constructor(e,t){super(r=>r.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,r=>{this.clear(r.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{for(let a of n)this.clear(a)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{let a=r.concat(n);for(let s of a)this.clear(s)}))}},ph=class extends dh{static{i(this,"WorkspaceCache")}static{o(this,"WorkspaceCache")}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{n.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},Fb=class{static{i(this,"DefaultScopeProvider")}static{o(this,"DefaultScopeProvider")}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 ph(e.shared)}getScope(e){let t=[],r=this.reflection.getReferenceType(e),n=kt(e.container).localSymbols;if(n){let s=e.container;do n.has(s)&&t.push(n.getStream(s).filter(l=>this.reflection.isSubtype(l.type,r))),s=s.$container;while(s)}let a=this.getGlobalScope(r,e);for(let s=t.length-1;s>=0;s--)a=this.createScope(t[s],a);return a}createScope(e,t,r){return new bf(oe(e),t,r)}createScopeForNodes(e,t,r){let n=oe(e).map(a=>{let s=this.nameProvider.getName(a);if(s)return this.descriptions.createDescription(a,s)}).nonNullable();return new bf(n,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new Mb(this.indexManager.allElements(e)))}};function hh(e){return typeof e.$comment=="string"}i(hh,"isAstNodeWithComment");o(hh,"isAstNodeWithComment");function Sf(e){return typeof e=="object"&&!!e&&("$ref"in e||"$error"in e)}i(Sf,"isIntermediateReference");o(Sf,"isIntermediateReference");var Gb=class{static{i(this,"DefaultJsonSerializer")}static{o(this,"DefaultJsonSerializer")}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,t){let r=t??{},n=t?.replacer,a=o((l,u)=>this.replacer(l,u,r),"defaultReplacer"),s=n?(l,u)=>n(l,u,a):a;try{return this.currentDocument=kt(e),JSON.stringify(e,s,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let r=t??{},n=JSON.parse(e);return this.linkNode(n,n,r),n}replacer(e,t,{refText:r,sourceText:n,textRegions:a,comments:s,uriConverter:l}){if(!this.ignoreProperties.has(e))if(Xe(t)){let u=t.ref,c=r?t.$refText:void 0;if(u){let f=kt(u),d="";this.currentDocument&&this.currentDocument!==f&&(l?d=l(f.uri,u):d=f.uri.toString());let p=this.astNodeLocator.getAstNodePath(u);return{$ref:`${d}#${p}`,$refText:c}}else return{$error:t.error?.message??"Could not resolve reference",$refText:c}}else if(Ht(t)){let u=r?t.$refText:void 0,c=[];for(let f of t.items){let d=f.ref,p=kt(f.ref),m="";this.currentDocument&&this.currentDocument!==p&&(l?m=l(p.uri,d):m=p.uri.toString());let v=this.astNodeLocator.getAstNodePath(d);c.push(`${m}#${v}`)}return{$refs:c,$refText:u}}else if(Pe(t)){let u;if(a&&(u=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&u?.$textRegion&&(u.$textRegion.documentURI=this.currentDocument?.uri.toString())),n&&!e&&(u??(u={...t}),u.$sourceText=t.$cstNode?.text),s){u??(u={...t});let c=this.commentProvider.getComment(t);c&&(u.$comment=c.replace(/\r/g,""))}return u??t}else return t}addAstNodeRegionWithAssignmentsTo(e){let t=o(r=>({offset:r.offset,end:r.end,length:r.length,range:r.range}),"createDocumentSegment");if(e.$cstNode){let r=e.$textRegion=t(e.$cstNode),n=r.assignments={};return Object.keys(e).filter(a=>!a.startsWith("$")).forEach(a=>{let s=xd(e.$cstNode,a).map(t);s.length!==0&&(n[a]=s)}),e}}linkNode(e,t,r,n,a,s){for(let[u,c]of Object.entries(e))if(Array.isArray(c))for(let f=0;f{await this.handleException(()=>e.call(t,r,n,a),"An error occurred during validation",n,r)}}async handleException(e,t,r,n){try{await e()}catch(a){if(Kn(a))throw a;console.error(`${t}:`,a),a instanceof Error&&a.stack&&console.error(a.stack);let s=a instanceof Error?a.message:String(a);r("error",`${t}: ${s}`,{node:n})}}addEntry(e,t){if(e==="AstNode"){this.entries.add("AstNode",t);return}for(let r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=oe(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(n=>t.includes(n.category))),r.map(n=>n.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(e,t,r){return async(n,a,s,l)=>{await this.handleException(()=>e.call(r,n,a,s,l),t,a,n)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},zb=Object.freeze({validateNode:!0,validateChildren:!0}),Bb=class{static{i(this,"DefaultDocumentValidator")}static{o(this,"DefaultDocumentValidator")}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,t={},r=pe.CancellationToken.None){let n=e.parseResult,a=[];if(await je(r),(!t.categories||t.categories.includes("built-in"))&&(this.processLexingErrors(n,a,t),t.stopAfterLexingErrors&&a.some(s=>s.data?.code===$t.LexingError)||(this.processParsingErrors(n,a,t),t.stopAfterParsingErrors&&a.some(s=>s.data?.code===$t.ParsingError))||(this.processLinkingErrors(e,a,t),t.stopAfterLinkingErrors&&a.some(s=>s.data?.code===$t.LinkingError))))return a;try{a.push(...await this.validateAst(n.value,t,r))}catch(s){if(Kn(s))throw s;console.error("An error occurred during validation:",s)}return await je(r),a}processLexingErrors(e,t,r){let n=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let a of n){let s=a.severity??"error",l={severity:Zi(s),range:{start:{line:a.line-1,character:a.column-1},end:{line:a.line-1,character:a.column+a.length-1}},message:a.message,data:gh(s),source:this.getSource()};t.push(l)}}processParsingErrors(e,t,r){for(let n of e.parserErrors){let a;if(isNaN(n.token.startOffset)){if("previousToken"in n){let s=n.previousToken;if(isNaN(s.startOffset)){let l={line:0,character:0};a={start:l,end:l}}else{let l={line:s.endLine-1,character:s.endColumn};a={start:l,end:l}}}}else a=ts(n.token);if(a){let s={severity:Zi("error"),range:a,message:n.message,data:gn($t.ParsingError),source:this.getSource()};t.push(s)}}}processLinkingErrors(e,t,r){for(let n of e.references){let a=n.error;if(a){let s={node:a.info.container,range:n.$refNode?.range,property:a.info.property,index:a.info.index,data:{code:$t.LinkingError,containerType:a.info.container.$type,property:a.info.property,refText:a.info.reference.$refText}};t.push(this.toDiagnostic("error",a.message,s))}}}async validateAst(e,t,r=pe.CancellationToken.None){let n=[],a=o((s,l,u)=>{n.push(this.toDiagnostic(s,l,u))},"acceptor");return await this.validateAstBefore(e,t,a,r),await this.validateAstNodes(e,t,a,r),await this.validateAstAfter(e,t,a,r),n}async validateAstBefore(e,t,r,n=pe.CancellationToken.None){let a=this.validationRegistry.checksBefore;for(let s of a)await je(n),await s(e,r,t.categories??[],n)}async validateAstNodes(e,t,r,n=pe.CancellationToken.None){if(this.profiler?.isActive("validating")){let a=this.profiler.createTask("validating",this.languageId);a.start();try{let s=Pt(e).iterator();for(let l of s){a.startSubTask(l.$type);let u=this.validateSingleNodeOptions(l,t);if(u.validateNode)try{let c=this.validationRegistry.getChecks(l.$type,t.categories);for(let f of c)await f(l,r,n)}finally{a.stopSubTask(l.$type)}u.validateChildren||s.prune()}}finally{a.stop()}}else{let a=Pt(e).iterator();for(let s of a){await je(n);let l=this.validateSingleNodeOptions(s,t);if(l.validateNode){let u=this.validationRegistry.getChecks(s.$type,t.categories);for(let c of u)await c(s,r,n)}l.validateChildren||a.prune()}}}validateSingleNodeOptions(e,t){return zb}async validateAstAfter(e,t,r,n=pe.CancellationToken.None){let a=this.validationRegistry.checksAfter;for(let s of a)await je(n),await s(e,r,t.categories??[],n)}toDiagnostic(e,t,r){return{message:t,range:mh(r),severity:Zi(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function mh(e){if(e.range)return e.range;let t;return typeof e.property=="string"?t=Nl(e.node.$cstNode,e.property,e.index):typeof e.keyword=="string"&&(t=Fd(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}i(mh,"getDiagnosticRange");o(mh,"getDiagnosticRange");function Zi(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}i(Zi,"toDiagnosticSeverity");o(Zi,"toDiagnosticSeverity");function gh(e){switch(e){case"error":return gn($t.LexingError);case"warning":return gn($t.LexingWarning);case"info":return gn($t.LexingInfo);case"hint":return gn($t.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}i(gh,"toDiagnosticData");o(gh,"toDiagnosticData");var $t;(function(e){e.LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"})($t||($t={}));var Kb=class{static{i(this,"DefaultAstNodeDescriptionProvider")}static{o(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){let n=r??kt(e);t??(t=this.nameProvider.getName(e));let a=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${a} has no name.`);let s,l=o(()=>s??(s=Pa(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return l()},selectionSegment:Pa(e.$cstNode),type:e.$type,documentUri:n.uri,path:a}}},qb=class{static{i(this,"DefaultReferenceDescriptionProvider")}static{o(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=pe.CancellationToken.None){let r=[],n=e.parseResult.value;for(let a of Pt(n))await je(t),Ia(a).forEach(s=>{s.reference.error||r.push(...this.createInfoDescriptions(s))});return r}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let r=[];Xe(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Ht(t)&&(r=t.items.map(u=>u.$nodeDescription).filter(u=>u!==void 0));let n=kt(e.container).uri,a=this.nodeLocator.getAstNodePath(e.container),s=[],l=Pa(t.$refNode);for(let u of r)s.push({sourceUri:n,sourcePath:a,targetUri:u.documentUri,targetPath:u.path,segment:l,local:Je.equals(u.documentUri,n)});return s}},Wb=class{static{i(this,"DefaultAstNodeLocator")}static{o(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return t+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return t!==void 0?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((n,a)=>{if(!n||a.length===0)return n;let s=a.indexOf(this.indexSeparator);if(s>0){let l=a.substring(0,s),u=parseInt(a.substring(s+1));return n[l]?.[u]}return n[a]},e)}},$u={};ml($u,Kf(Fa(),1));var Vb=class{static{i(this,"DefaultConfigurationProvider")}static{o(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new Tr,this.onConfigurationSectionUpdateEmitter=new $u.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 t=this.serviceRegistry.all;e.register({section:t.map(r=>this.toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map(n=>({section:this.toSectionName(n.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((n,a)=>{this.updateSectionConfiguration(n.section,r[a])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!="object"||e.settings===null||Object.entries(e.settings).forEach(([t,r])=>{this.updateSectionConfiguration(t,r),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:r})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},Bs=Kf(nw(),1),Tn;(function(e){function t(r){return{dispose:o(async()=>await r(),"dispose")}}i(t,"create"),o(t,"create"),e.create=t})(Tn||(Tn={}));var Hb=class{static{i(this,"DefaultDocumentBuilder")}static{o(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Rr,this.documentPhaseListeners=new Rr,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Z.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,t={},r=pe.CancellationToken.None){for(let n of e){let a=n.uri.toString();if(n.state===Z.Validated){if(typeof t.validation=="boolean"&&t.validation)this.resetToState(n,Z.IndexedReferences);else if(typeof t.validation=="object"){let s=this.findMissingValidationCategories(n,t);s.length>0&&(this.buildState.set(a,{completed:!1,options:{validation:{categories:s}},result:this.buildState.get(a)?.result}),n.state=Z.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=Z.Changed,await this.emitUpdate(e.map(n=>n.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=pe.CancellationToken.None){this.currentState=Z.Changed;let n=[];for(let u of t){let c=this.langiumDocuments.deleteDocuments(u);for(let f of c)n.push(f.uri),this.cleanUpDeleted(f)}let a=(await Promise.all(e.map(u=>this.findChangedUris(u)))).flat();for(let u of a){let c=this.langiumDocuments.getDocument(u);c===void 0&&(c=this.langiumDocumentFactory.fromModel({$type:"INVALID"},u),c.state=Z.Changed,this.langiumDocuments.addDocument(c)),this.resetToState(c,Z.Changed)}let s=oe(a).concat(n).map(u=>u.toString()).toSet();this.langiumDocuments.all.filter(u=>!s.has(u.uri.toString())&&this.shouldRelink(u,s)).forEach(u=>this.resetToState(u,Z.ComputedScopes)),await this.emitUpdate(a,n),await je(r);let l=this.sortDocuments(this.langiumDocuments.all.filter(u=>u.state=1}findMissingValidationCategories(e,t){let r=this.buildState.get(e.uri.toString()),n=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),a=r?.result?.validationChecks?new Set(r?.result?.validationChecks):r?.completed?n:new Set,s=t===void 0||t.validation===!0?n:typeof t.validation=="object"?t.validation.categories??n:[];return oe(s).filter(l=>!a.has(l)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let r=await this.fileSystemProvider.stat(e);if(r.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(r))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(r=>r(e,t)))}sortDocuments(e){let t=0,r=e.length-1;for(;t=0&&!this.hasTextDocument(e[r]);)r--;tr.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),Tn.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case Z.Changed:case Z.Parsed:this.indexManager.removeContent(e.uri);case Z.IndexedContent:e.localSymbols=void 0;case Z.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Z.Linked:this.indexManager.removeReferences(e.uri);case Z.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Z.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Z.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,Z.Parsed,r,s=>this.langiumDocumentFactory.update(s,r)),await this.runCancelable(e,Z.IndexedContent,r,s=>this.indexManager.updateContent(s,r)),await this.runCancelable(e,Z.ComputedScopes,r,async s=>{let l=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.localSymbols=await l.collectLocalSymbols(s,r)});let n=e.filter(s=>this.shouldLink(s));await this.runCancelable(n,Z.Linked,r,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,r)),await this.runCancelable(n,Z.IndexedReferences,r,s=>this.indexManager.updateReferences(s,r));let a=e.filter(s=>this.shouldValidate(s)?!0:(this.markAsCompleted(s),!1));await this.runCancelable(a,Z.Validated,r,async s=>{await this.validate(s,r),this.markAsCompleted(s)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(let r of e){let n=r.uri.toString(),a=this.buildState.get(n);(!a||a.completed)&&this.buildState.set(n,{completed:!1,options:t,result:a?.result})}}async runCancelable(e,t,r,n){for(let s of e)s.states.state===t);await this.notifyBuildPhase(a,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),Tn.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),Tn.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let n;return t&&"path"in t?n=t:r=t,r??(r=pe.CancellationToken.None),n?this.awaitDocumentState(e,n,r):this.awaitBuilderState(e,r)}awaitDocumentState(e,t,r){let n=this.langiumDocuments.getDocument(t);if(n){if(n.state>=e)return Promise.resolve(t);if(r.isCancellationRequested)return Promise.reject(Vt);if(this.currentState>=e&&e>n.state)return Promise.reject(new Bs.ResponseError(Bs.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Z[n.state]}, requiring ${Z[e]}, but workspace state is already ${Z[this.currentState]}. Returning undefined.`))}else return Promise.reject(new Bs.ResponseError(Bs.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`));return new Promise((a,s)=>{let l=this.onDocumentPhase(e,c=>{Je.equals(c.uri,t)&&(l.dispose(),u.dispose(),a(c.uri))}),u=r.onCancellationRequested(()=>{l.dispose(),u.dispose(),s(Vt)})})}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Vt):new Promise((r,n)=>{let a=this.onBuildPhase(e,()=>{a.dispose(),s.dispose(),r()}),s=t.onCancellationRequested(()=>{a.dispose(),s.dispose(),n(Vt)})})}async notifyDocumentPhase(e,t,r){let a=this.documentPhaseListeners.get(t).slice();for(let s of a)try{await je(r),await s(e,r)}catch(l){if(!Kn(l))throw l}}async notifyBuildPhase(e,t,r){if(e.length===0)return;let a=this.buildPhaseListeners.get(t).slice();for(let s of a)await je(r),await s(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){let r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,n=this.getBuildOptions(e),a=typeof n.validation=="object"?{...n.validation}:{};a.categories=this.findMissingValidationCategories(e,n);let s=await r.validateDocument(e,a,t);e.diagnostics?e.diagnostics.push(...s):e.diagnostics=s;let l=this.buildState.get(e.uri.toString());l&&(l.result??(l.result={}),l.result.validationChecks?l.result.validationChecks=oe(l.result.validationChecks).concat(a.categories).distinct().toArray():l.result.validationChecks=[...a.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},Yb=class{static{i(this,"DefaultIndexManager")}static{o(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new Ru,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=kt(e).uri,n=[];return this.referenceIndex.forEach(a=>{a.forEach(s=>{Je.equals(s.targetUri,r)&&s.targetPath===t&&n.push(s)})}),oe(n)}allElements(e,t){let r=oe(this.symbolIndex.keys());return t&&(r=r.filter(n=>!t||t.has(n))),r.map(n=>this.getFileDescriptions(n,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(a=>this.astReflection.isSubtype(a.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=pe.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),a=e.uri.toString();this.symbolIndex.set(a,n),this.symbolByTypeIndex.clear(a)}async updateReferences(e,t=pe.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){let r=this.referenceIndex.get(e.uri.toString());return r?r.some(n=>!n.local&&t.has(n.targetUri.toString())):!1}},Xb=class{static{i(this,"DefaultWorkspaceManager")}static{o(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new Tr,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(t=>this.initializeWorkspace(this.folders??[],t))}async initializeWorkspace(e,t=pe.CancellationToken.None){let r=await this.performStartup(e);await je(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){let t=[],r=o(s=>{t.push(s),this.langiumDocuments.hasDocument(s.uri)||this.langiumDocuments.addDocument(s)},"collector");await this.loadAdditionalDocuments(e,r);let n=[];await Promise.all(e.map(s=>this.getRootFolder(s)).map(async s=>this.traverseFolder(s,n)));let a=oe(n).distinct(s=>s.toString()).filter(s=>!this.langiumDocuments.hasDocument(s));return await this.loadWorkspaceDocuments(a,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async r=>{let n=await this.langiumDocuments.getOrCreateDocument(r);t(n)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return dt.parse(e.uri)}async traverseFolder(e,t){try{let r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async n=>{this.shouldIncludeEntry(n)&&(n.isDirectory?await this.traverseFolder(n.uri,t):n.isFile&&t.push(n.uri))}))}catch(r){console.error("Failure to read directory content of "+e.toString(!0),r)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=Je.basename(e.uri);return t.startsWith(".")?!1:e.isDirectory?t!=="node_modules"&&t!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},Jb=class{static{i(this,"DefaultLexerErrorMessageProvider")}static{o(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,n,a){return sf.buildUnexpectedCharactersMessage(e,t,r,n,a)}buildUnableToPopLexerModeMessage(e){return sf.buildUnableToPopLexerModeMessage(e)}},yh={mode:"full"},vh=class{static{i(this,"DefaultLexer")}static{o(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);let r=dl(t)?Object.values(t):t,n=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new Ze(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=yh){let r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(dl(e))return e;let t=Eu(e)?Object.values(e.modes).flat():e,r={};return t.forEach(n=>r[n.name]=n),r}};function Au(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}i(Au,"isTokenTypeArray");o(Au,"isTokenTypeArray");function Eu(e){return e&&"modes"in e&&"defaultMode"in e}i(Eu,"isIMultiModeLexerDefinition");o(Eu,"isIMultiModeLexerDefinition");function dl(e){return!Au(e)&&!Eu(e)}i(dl,"isTokenTypeDictionary");o(dl,"isTokenTypeDictionary");ys();function Th(e,t,r){let n,a;typeof e=="string"?(a=t,n=r):(a=e.range.start,n=t),a||(a=ae.create(0,0));let s=$h(e),l=_u(n),u=Zb({lines:s,position:a,options:l});return tS({index:0,tokens:u,position:a})}i(Th,"parseJSDoc");o(Th,"parseJSDoc");function Rh(e,t){let r=_u(t),n=$h(e);if(n.length===0)return!1;let a=n[0],s=n[n.length-1],l=r.start,u=r.end;return!!l?.exec(a)&&!!u?.exec(s)}i(Rh,"isJSDoc");o(Rh,"isJSDoc");function $h(e){let t="";return typeof e=="string"?t=e:t=e.text,t.split(Qg)}i($h,"getLines");o($h,"getLines");var Qm=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,I1=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Zb(e){let t=[],r=e.position.line,n=e.position.character;for(let a=0;a=u.length){if(t.length>0){let d=ae.create(r,n);t.push({type:"break",content:"",range:Q.create(d,d)})}}else{Qm.lastIndex=c;let d=Qm.exec(u);if(d){let p=d[0],m=d[1],v=ae.create(r,n+c),T=ae.create(r,n+c+p.length);t.push({type:"tag",content:m,range:Q.create(v,T)}),c+=p.length,c=pl(u,c)}if(c0&&t[t.length-1].type==="break"?t.slice(0,-1):t}i(Zb,"tokenize");o(Zb,"tokenize");function Qb(e,t,r,n){let a=[];if(e.length===0){let s=ae.create(r,n),l=ae.create(r,n+t.length);a.push({type:"text",content:t,range:Q.create(s,l)})}else{let s=0;for(let u of e){let c=u.index,f=t.substring(s,c);f.length>0&&a.push({type:"text",content:t.substring(s,c),range:Q.create(ae.create(r,s+n),ae.create(r,c+n))});let d=f.length+1,p=u[1];if(a.push({type:"inline-tag",content:p,range:Q.create(ae.create(r,s+d+n),ae.create(r,s+d+p.length+n))}),d+=p.length,u.length===4){d+=u[2].length;let m=u[3];a.push({type:"text",content:m,range:Q.create(ae.create(r,s+d+n),ae.create(r,s+d+m.length+n))})}else a.push({type:"text",content:"",range:Q.create(ae.create(r,s+d+n),ae.create(r,s+d+n))});s=c+u[0].length}let l=t.substring(s);l.length>0&&a.push({type:"text",content:l,range:Q.create(ae.create(r,s+n),ae.create(r,s+n+l.length))})}return a}i(Qb,"buildInlineTokens");o(Qb,"buildInlineTokens");var N1=/\S/,k1=/\s*$/;function pl(e,t){let r=e.substring(t).match(N1);return r?t+r.index:e.length}i(pl,"skipWhitespace");o(pl,"skipWhitespace");function eS(e){let t=e.match(k1);if(t&&typeof t.index=="number")return t.index}i(eS,"lastCharacter");o(eS,"lastCharacter");function tS(e){let t=ae.create(e.position.line,e.position.character);if(e.tokens.length===0)return new eg([],Q.create(t,t));let r=[];for(;e.indext.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(let t of this.elements)if(e.length===0)e=t.toString();else{let r=t.toString();e+=If(e)+r}return e.trim()}toMarkdown(e){let t="";for(let r of this.elements)if(t.length===0)t=r.toMarkdown(e);else{let n=r.toMarkdown(e);t+=If(t)+n}return t.trim()}},Lu=class{static{i(this,"JSDocTagImpl")}static{o(this,"JSDocTagImpl")}constructor(e,t,r,n){this.name=e,this.content=t,this.inline=r,this.range=n}toString(){let e=`@${this.name}`,t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e} ${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){let t=this.content.toMarkdown(e);if(this.inline){let a=iS(this.name,t,e??{});if(typeof a=="string")return a}let r="";e?.tag==="italic"||e?.tag===void 0?r="*":e?.tag==="bold"?r="**":e?.tag==="bold-italic"&&(r="***");let n=`${r}@${this.name}${r}`;return this.content.inlines.length===1?n=`${n} \u2014 ${t}`:this.content.inlines.length>1&&(n=`${n} ${t}`),this.inline?`{${n}}`:n}};function iS(e,t,r){if(e==="linkplain"||e==="linkcode"||e==="link"){let n=t.indexOf(" "),a=t;if(n>0){let l=pl(t,n);a=t.substring(l),t=t.substring(0,n)}return(e==="linkcode"||e==="link"&&r.link==="code")&&(a=`\`${a}\``),r.renderLink?.(t,a)??sS(t,a)}}i(iS,"renderInlineTag");o(iS,"renderInlineTag");function sS(e,t){try{return dt.parse(e,!0),`[${t}](${e})`}catch{return e}}i(sS,"renderLinkDefault");o(sS,"renderLinkDefault");var wf=class{static{i(this,"JSDocTextImpl")}static{o(this,"JSDocTextImpl")}constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tr.range.start.line&&(e+=` `)}return e}toMarkdown(e){let t="";for(let r=0;rn.range.start.line&&(t+=` `)}return t}},oS=class{static{i(this,"JSDocLineImpl")}static{o(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};function If(e){return e.endsWith(` `)?` `:` `}i(If,"fillNewlines");o(If,"fillNewlines");var lS=class{static{i(this,"JSDocDocumentationProvider")}static{o(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let t=this.commentProvider.getComment(e);if(t&&Rh(t))return Th(t).toMarkdown({renderLink:o((n,a)=>this.documentationLinkRenderer(e,n,a),"renderLink"),renderTag:o(n=>this.documentationTagRenderer(e,n),"renderTag")})}documentationLinkRenderer(e,t,r){let n=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(n&&n.nameSegment){let a=n.nameSegment.range.start.line+1,s=n.nameSegment.range.start.character+1,l=n.documentUri.with({fragment:`L${a},${s}`});return`[${r}](${l.toString()})`}else return}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){let n=kt(e).localSymbols;if(!n)return;let a=e;do{let l=n.getStream(a).find(u=>u.name===t);if(l)return l;a=a.$container}while(a)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(n=>n.name===t)}},uS=class{static{i(this,"DefaultCommentProvider")}static{o(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return hh(e)?e.$comment:Ad(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},cS=class{static{i(this,"DefaultAsyncParser")}static{o(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},P1=class{static{i(this,"AbstractThreadedAsyncParser")}static{o(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){let r=await this.acquireParserWorker(t),n=new Tr,a,s=t.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(l=>{let u=this.hydrator.hydrate(l);n.resolve(u)}).catch(l=>{n.reject(l)}).finally(()=>{s.dispose(),clearTimeout(a)}),n.promise}terminateWorker(e){e.terminate();let t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(let r of this.workerPool)if(r.ready)return r.lock(),r;let t=new Tr;return e.onCancellationRequested(()=>{let r=this.queue.indexOf(t);r>=0&&this.queue.splice(r,1),t.reject(Vt)}),this.queue.push(t),t.promise}},O1=class{static{i(this,"ParserWorker")}static{o(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new $u.Emitter,this.deferred=new Tr,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=n,t(a=>{let s=a;this.deferred.resolve(s),this.unlock()}),r(a=>{this.deferred.reject(a),this.unlock()})}terminate(){this.deferred.reject(Vt),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 Tr,this.sendMessage(e),this.deferred.promise}},fS=class{static{i(this,"DefaultWorkspaceLock")}static{o(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new pe.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let t=vu();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=pe.CancellationToken.None){let n=new Tr,a={action:t,deferred:n,cancellationToken:r};return e.push(a),this.performNextOperation(),n.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:t,deferred:r,cancellationToken:n})=>{try{let a=await Promise.resolve().then(()=>t(n));r.resolve(a)}catch(a){Kn(a)?r.resolve(void 0):r.reject(a)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},dS=class{static{i(this,"DefaultHydrator")}static{o(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new cl,this.tokenTypeIdMap=new cl,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(t=>({...t,message:t.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let t=new Map,r=new Map;for(let n of Pt(e))t.set(n,{});if(e.$cstNode)for(let n of ka(e.$cstNode))r.set(n,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){let r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(let[n,a]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(a)){let s=[];r[n]=s;for(let l of a)Pe(l)?s.push(this.dehydrateAstNode(l,t)):Xe(l)?s.push(this.dehydrateReference(l,t)):s.push(l)}else Pe(a)?r[n]=this.dehydrateAstNode(a,t):Xe(a)?r[n]=this.dehydrateReference(a,t):a!==void 0&&(r[n]=a);return r}dehydrateReference(e,t){let r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){let r=t.cstNodes.get(e);return vl(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),fr(e)?r.content=e.content.map(n=>this.dehydrateCstNode(n,t)):Cn(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){let t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){let t=new Map,r=new Map;for(let a of Pt(e))t.set(a,{});let n;if(e.$cstNode)for(let a of ka(e.$cstNode)){let s;"fullText"in a?(s=new Zp(a.fullText),n=s):"content"in a?s=new pu:"tokenType"in a&&(s=this.hydrateCstLeafNode(a)),s&&(r.set(a,s),s.root=n)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){let r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=t.cstNodes.get(e.$cstNode));for(let[n,a]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(a)){let s=[];r[n]=s;for(let l of a)Pe(l)?s.push(this.setParent(this.hydrateAstNode(l,t),r)):Xe(l)?s.push(this.hydrateReference(l,r,n,t)):s.push(l)}else Pe(a)?r[n]=this.setParent(this.hydrateAstNode(a,t),r):Xe(a)?r[n]=this.hydrateReference(a,r,n,t):a!==void 0&&(r[n]=a);return r}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,n){return this.linker.buildReference(t,r,n.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){let n=t.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(n.grammarSource=this.getGrammarElement(e.grammarSource)),n.astNode=t.astNodes.get(e.astNode),fr(n))for(let a of e.content){let s=this.hydrateCstNode(a,t,r++);n.content.push(s)}return n}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType),r=e.offset,n=e.length,a=e.startLine,s=e.startColumn,l=e.endLine,u=e.endColumn,c=e.hidden;return new il(r,n,{start:{line:a,character:s},end:{line:l,character:u}},t,c)}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 t of Pt(this.grammar))Tl(t)&&this.grammarElementIdMap.set(t,e++)}};function Ch(e){return{documentation:{CommentProvider:o(t=>new uS(t),"CommentProvider"),DocumentationProvider:o(t=>new lS(t),"DocumentationProvider")},parser:{AsyncParser:o(t=>new cS(t),"AsyncParser"),GrammarConfig:o(t=>Wd(t),"GrammarConfig"),LangiumParser:o(t=>ah(t),"LangiumParser"),CompletionParser:o(t=>nh(t),"CompletionParser"),ValueConverter:o(()=>new sh,"ValueConverter"),TokenBuilder:o(()=>new gu,"TokenBuilder"),Lexer:o(t=>new vh(t),"Lexer"),ParserErrorMessageProvider:o(()=>new eh,"ParserErrorMessageProvider"),LexerErrorMessageProvider:o(()=>new Jb,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:o(()=>new Wb,"AstNodeLocator"),AstNodeDescriptionProvider:o(t=>new Kb(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:o(t=>new qb(t),"ReferenceDescriptionProvider")},references:{Linker:o(t=>new Pb(t),"Linker"),NameProvider:o(()=>new Ob,"NameProvider"),ScopeProvider:o(t=>new Fb(t),"ScopeProvider"),ScopeComputation:o(t=>new Db(t),"ScopeComputation"),References:o(t=>new Lb(t),"References")},serializer:{Hydrator:o(t=>new dS(t),"Hydrator"),JsonSerializer:o(t=>new Gb(t),"JsonSerializer")},validation:{DocumentValidator:o(t=>new Bb(t),"DocumentValidator"),ValidationRegistry:o(t=>new Ub(t),"ValidationRegistry")},shared:o(()=>e.shared,"shared")}}i(Ch,"createDefaultCoreModule");o(Ch,"createDefaultCoreModule");function bh(e){return{ServiceRegistry:o(t=>new jb(t),"ServiceRegistry"),workspace:{LangiumDocuments:o(t=>new kb(t),"LangiumDocuments"),LangiumDocumentFactory:o(t=>new Nb(t),"LangiumDocumentFactory"),DocumentBuilder:o(t=>new Hb(t),"DocumentBuilder"),IndexManager:o(t=>new Yb(t),"IndexManager"),WorkspaceManager:o(t=>new Xb(t),"WorkspaceManager"),FileSystemProvider:o(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:o(()=>new fS,"WorkspaceLock"),ConfigurationProvider:o(t=>new Vb(t),"ConfigurationProvider")},profilers:{}}}i(bh,"createDefaultSharedCoreModule");o(bh,"createDefaultSharedCoreModule");var Nf;(function(e){e.merge=(t,r)=>xa(xa({},t),r)})(Nf||(Nf={}));function hl(e,t,r,n,a,s,l,u,c){let f=[e,t,r,n,a,s,l,u,c].reduce(xa,{});return wh(f)}i(hl,"inject");o(hl,"inject");var pS=Symbol("isProxy");function Sh(e){if(e&&e[pS])for(let t of Object.values(e))Sh(t);return e}i(Sh,"eagerLoad");o(Sh,"eagerLoad");function wh(e,t){let r=new Proxy({},{deleteProperty:o(()=>!1,"deleteProperty"),set:o(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:o((n,a)=>a===pS?!0:kf(n,a,e,t||r),"get"),getOwnPropertyDescriptor:o((n,a)=>(kf(n,a,e,t||r),Object.getOwnPropertyDescriptor(n,a)),"getOwnPropertyDescriptor"),has:o((n,a)=>a in e,"has"),ownKeys:o(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}i(wh,"_inject");o(wh,"_inject");var tg=Symbol();function kf(e,t,r,n){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===tg)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}else if(t in r){let a=r[t];e[t]=tg;try{e[t]=typeof a=="function"?a(n):wh(a,n)}catch(s){throw e[t]=s instanceof Error?s:void 0,s}return e[t]}else return}i(kf,"_resolve");o(kf,"_resolve");function xa(e,t){if(t){for(let[r,n]of Object.entries(t))if(n!=null)if(typeof n=="object"){let a=e[r];typeof a=="object"&&a!==null?e[r]=xa(a,n):e[r]=xa({},n)}else e[r]=n}return e}i(xa,"_merge");o(xa,"_merge");var Pf={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},yn;(function(e){e.REGULAR="indentation-sensitive",e.IGNORE_INDENTATION="ignore-indentation"})(yn||(yn={}));var hS=class extends gu{static{i(this,"IndentationAwareTokenBuilder")}static{o(this,"IndentationAwareTokenBuilder")}constructor(e=Pf){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...Pf,...e},this.indentTokenType=_a({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=_a({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){let r=super.buildTokens(e,t);if(!Au(r))throw new Error("Invalid tokens built by default builder");let{indentTokenName:n,dedentTokenName:a,whitespaceTokenName:s,ignoreIndentationDelimiters:l}=this.options,u,c,f,d=[];for(let p of r){for(let[m,v]of l)p.name===m?p.PUSH_MODE=yn.IGNORE_INDENTATION:p.name===v&&(p.POP_MODE=!0);p.name===a?u=p:p.name===n?c=p:p.name===s?f=p:d.push(p)}if(!u||!c||!f)throw new Error("Some indentation/whitespace tokens not found!");return l.length>0?{modes:{[yn.REGULAR]:[u,c,...d,f],[yn.IGNORE_INDENTATION]:[...d,f]},defaultMode:yn.REGULAR}:[u,c,f,...d]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return t===0||`\r `.includes(e[t-1])}matchWhitespace(e,t,r,n){this.whitespaceRegExp.lastIndex=t;let a=this.whitespaceRegExp.exec(e);return{currIndentLevel:a?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:a}}createIndentationTokenInstance(e,t,r,n){let a=this.getLineNumber(t,n);return Os(e,r,n,n+r.length,a,a,1,r.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:a,prevIndentLevel:s,match:l}=this.matchWhitespace(e,t,r,n);return a<=s?null:(this.indentationStack.push(a),l)}dedentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:a,prevIndentLevel:s,match:l}=this.matchWhitespace(e,t,r,n);if(a>=s)return null;let u=this.indentationStack.lastIndexOf(a);if(u===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${a} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:l?.[0]?.length??0,line:this.getLineNumber(e,t),column:1}),null;let c=this.indentationStack.length-u-1,f=e.substring(0,t).match(/[\r\n]+$/)?.[0].length??1;for(let d=0;d1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},L1=class extends vh{static{i(this,"IndentationAwareLexer")}static{o(this,"IndentationAwareLexer")}constructor(e){if(super(e),e.parser.TokenBuilder instanceof hS)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,t=yh){let r=super.tokenize(e),n=r.report;t?.mode==="full"&&r.tokens.push(...n.remainingDedents),n.remainingDedents=[];let{indentTokenType:a,dedentTokenType:s}=this.indentationTokenBuilder,l=a.tokenTypeIdx,u=s.tokenTypeIdx,c=[],f=r.tokens.length-1;for(let d=0;d=0&&c.push(r.tokens[f]),r.tokens=c,r}},Ih={};xr(Ih,{AstUtils:i(()=>Xf,"AstUtils"),BiMap:i(()=>cl,"BiMap"),Cancellation:i(()=>pe,"Cancellation"),ContextCache:i(()=>Ru,"ContextCache"),CstUtils:i(()=>Vf,"CstUtils"),DONE_RESULT:i(()=>Ye,"DONE_RESULT"),Deferred:i(()=>Tr,"Deferred"),Disposable:i(()=>Tn,"Disposable"),DisposableCache:i(()=>Tu,"DisposableCache"),DocumentCache:i(()=>xb,"DocumentCache"),EMPTY_STREAM:i(()=>ba,"EMPTY_STREAM"),ErrorWithLocation:i(()=>bl,"ErrorWithLocation"),GrammarUtils:i(()=>bd,"GrammarUtils"),MultiMap:i(()=>Rr,"MultiMap"),OperationCancelled:i(()=>Vt,"OperationCancelled"),Reduction:i(()=>es,"Reduction"),RegExpUtils:i(()=>wd,"RegExpUtils"),SimpleCache:i(()=>dh,"SimpleCache"),StreamImpl:i(()=>Wt,"StreamImpl"),TreeStreamImpl:i(()=>Sa,"TreeStreamImpl"),URI:i(()=>dt,"URI"),UriTrie:i(()=>ch,"UriTrie"),UriUtils:i(()=>Je,"UriUtils"),WorkspaceCache:i(()=>ph,"WorkspaceCache"),assertCondition:i(()=>Sd,"assertCondition"),assertUnreachable:i(()=>Fr,"assertUnreachable"),delayNextTick:i(()=>yu,"delayNextTick"),interruptAndCheck:i(()=>je,"interruptAndCheck"),isOperationCancelled:i(()=>Kn,"isOperationCancelled"),loadGrammarFromJson:i(()=>vt,"loadGrammarFromJson"),setInterruptionPeriod:i(()=>oh,"setInterruptionPeriod"),startCancelableOperation:i(()=>vu,"startCancelableOperation"),stream:i(()=>oe,"stream")});ml(Ih,$u);var mS=class{static{i(this,"EmptyFileSystemProvider")}static{o(this,"EmptyFileSystemProvider")}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[]}},gS={fileSystemProvider:o(()=>new mS,"fileSystemProvider")},D1={Grammar:o(()=>{},"Grammar"),LanguageMetaData:o(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},M1={AstReflection:o(()=>new yd,"AstReflection")};function yS(){let e=hl(bh(gS),M1),t=hl(Ch({shared:e}),D1);return e.ServiceRegistry.register(t),t}i(yS,"createMinimalGrammarServices");o(yS,"createMinimalGrammarServices");function vt(e){let t=yS(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,dt.parse(`memory:/${r.name??"grammar"}.langium`)),r}i(vt,"loadGrammarFromJson");o(vt,"loadGrammarFromJson");ml(Cg,Ih);var x1=class{static{i(this,"DefaultLangiumProfiler")}static{o(this,"DefaultLangiumProfiler")}constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new Rr}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(t=>this.activeCategories.add(t)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(t=>this.activeCategories.delete(t)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${t}'.`),new vS(r=>this.records.add(e,this.dumpRecord(e,r)),t)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at ${t.date.toISOString()}`);let r=[];for(let s of t.entries.keys()){let l=t.entries.get(s),u=l.reduce((c,f)=>c+f);r.push({name:`${t.identifier}.${s}`,count:l.length,duration:u})}let n=t.duration-r.map(s=>s.duration).reduce((s,l)=>s+l,0);r.push({name:t.identifier,count:1,duration:n}),r.sort((s,l)=>l.duration-s.duration);function a(s){return Math.round(100*s)/100}return i(a,"Round"),o(a,"Round"),console.table(r.map(s=>({Element:s.name,Count:s.count,"Self %":a(100*s.duration/t.duration),"Time (ms)":a(s.duration)}))),t}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(t=>e.some(r=>r===t[0])).flatMap(t=>t[1])}},vS=class{static{i(this,"ProfilingTask")}static{o(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new Rr,this.addRecord=e,this.identifier=t}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(t=>t.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 t=this.stack.pop();if(!t)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw new Error(`Sub-Task "${t.id}" is not already stopped.`);let r=performance.now()-t.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=r);let n=r-t.content;this.entries.add(e,n)}},Of;(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(Of||(Of={}));var Lf;(e=>{e.Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/}})(Lf||(Lf={}));var Df;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(Df||(Df={}));var Mf;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Mf||(Mf={}));var xf;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(xf||(xf={}));var Ff;(e=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Ff||(Ff={}));var Gf;(e=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Gf||(Gf={}));var jf;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(jf||(jf={}));var Uf;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/}})(Uf||(Uf={}));var zf;(e=>{e.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(zf||(zf={}));var CF={...Of.Terminals,...Lf.Terminals,...Df.Terminals,...Mf.Terminals,...xf.Terminals,...Ff.Terminals,...Gf.Terminals,...Uf.Terminals,...jf.Terminals,...zf.Terminals},Ks={$type:"Accelerator",name:"name",x:"x",y:"y"},qs={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},Ti={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},Du={$type:"Annotations",x:"x",y:"y"},sr={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function F1(e){return Tt.isInstance(e,sr.$type)}i(F1,"isArchitecture");o(F1,"isArchitecture");var Ws={$type:"Axis",label:"label",name:"name"},_o={$type:"Branch",name:"name",order:"order"};function G1(e){return Tt.isInstance(e,_o.$type)}i(G1,"isBranch");o(G1,"isBranch");var rg={$type:"Checkout",branch:"branch"},Vs={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},Mu={$type:"ClassDefStatement",className:"className",styleText:"styleText"},ua={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function j1(e){return Tt.isInstance(e,ua.$type)}i(j1,"isCommit");o(j1,"isCommit");var Hs={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},Br={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},Ys={$type:"Curve",entries:"entries",label:"label",name:"name"},Xs={$type:"Deaccelerator",name:"name",x:"x",y:"y"},ng={$type:"Decorator",strategy:"strategy"},Qn={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},Ut={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},ea={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},Kr={$type:"EmFrame"},Ri={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},ag={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},xu={$type:"EmModelEntity",name:"name"};function U1(e){return e==="rmo"||e==="readmodel"||e==="ui"||e==="cmd"||e==="command"||e==="evt"||e==="event"||e==="pcr"||e==="processor"}i(U1,"isEmModelEntityType");o(U1,"isEmModelEntityType");var Js={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},or={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};function z1(e){return Tt.isInstance(e,or.$type)}i(z1,"isEmResetFrame");o(z1,"isEmResetFrame");var br={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},Fu={$type:"Entry",axis:"axis",value:"value"},nr={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},ig={$type:"Evolution",stages:"stages"},Zs={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},Gu={$type:"Evolve",component:"component",target:"target"},Qr={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function B1(e){return Tt.isInstance(e,Qr.$type)}i(B1,"isGitGraph");o(B1,"isGitGraph");var $i={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},xi={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function K1(e){return Tt.isInstance(e,xi.$type)}i(K1,"isInfo");o(K1,"isInfo");var Ai={$type:"Item",classSelector:"classSelector",name:"name"},ju={$type:"Junction",id:"id",in:"in"},Ei={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},Qs={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},qr={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},ca={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function q1(e){return Tt.isInstance(e,ca.$type)}i(q1,"isMerge");o(q1,"isMerge");var eo={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},Uu={$type:"Option",name:"name",value:"value"},fa={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function W1(e){return Tt.isInstance(e,fa.$type)}i(W1,"isPacket");o(W1,"isPacket");var da={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function V1(e){return Tt.isInstance(e,da.$type)}i(V1,"isPacketBlock");o(V1,"isPacketBlock");var en={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function H1(e){return Tt.isInstance(e,en.$type)}i(H1,"isPie");o(H1,"isPie");var Co={$type:"PieSection",label:"label",value:"value"};function Y1(e){return Tt.isInstance(e,Co.$type)}i(Y1,"isPieSection");o(Y1,"isPieSection");var zu={$type:"Pipeline",components:"components",parent:"parent"},to={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},Wr={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},Bu={$type:"Section",classSelector:"classSelector",name:"name"},ta={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},Ku={$type:"Size",height:"height",width:"width"},ra={$type:"Statement"},pa={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function X1(e){return Tt.isInstance(e,pa.$type)}i(X1,"isTreemap");o(X1,"isTreemap");var qu={$type:"TreemapRow",indent:"indent",item:"item"},Wu={$type:"TreeNode",indent:"indent",name:"name"},_i={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},Ke={$type:"Wardley",accDescr:"accDescr",accelerators:"accelerators",accTitle:"accTitle",anchors:"anchors",annotation:"annotation",annotations:"annotations",components:"components",deaccelerators:"deaccelerators",evolution:"evolution",evolves:"evolves",links:"links",notes:"notes",pipelines:"pipelines",size:"size",title:"title"};function J1(e){return Tt.isInstance(e,Ke.$type)}i(J1,"isWardley");o(J1,"isWardley");var TS=class extends Yf{static{i(this,"MermaidAstReflection")}constructor(){super(...arguments),this.types={Accelerator:{name:Ks.$type,properties:{name:{name:Ks.name},x:{name:Ks.x},y:{name:Ks.y}},superTypes:[]},Anchor:{name:qs.$type,properties:{evolution:{name:qs.evolution},name:{name:qs.name},visibility:{name:qs.visibility}},superTypes:[]},Annotation:{name:Ti.$type,properties:{number:{name:Ti.number},text:{name:Ti.text},x:{name:Ti.x},y:{name:Ti.y}},superTypes:[]},Annotations:{name:Du.$type,properties:{x:{name:Du.x},y:{name:Du.y}},superTypes:[]},Architecture:{name:sr.$type,properties:{accDescr:{name:sr.accDescr},accTitle:{name:sr.accTitle},edges:{name:sr.edges,defaultValue:[]},groups:{name:sr.groups,defaultValue:[]},junctions:{name:sr.junctions,defaultValue:[]},services:{name:sr.services,defaultValue:[]},title:{name:sr.title}},superTypes:[]},Axis:{name:Ws.$type,properties:{label:{name:Ws.label},name:{name:Ws.name}},superTypes:[]},Branch:{name:_o.$type,properties:{name:{name:_o.name},order:{name:_o.order}},superTypes:[ra.$type]},Checkout:{name:rg.$type,properties:{branch:{name:rg.branch}},superTypes:[ra.$type]},CherryPicking:{name:Vs.$type,properties:{id:{name:Vs.id},parent:{name:Vs.parent},tags:{name:Vs.tags,defaultValue:[]}},superTypes:[ra.$type]},ClassDefStatement:{name:Mu.$type,properties:{className:{name:Mu.className},styleText:{name:Mu.styleText}},superTypes:[]},Commit:{name:ua.$type,properties:{id:{name:ua.id},message:{name:ua.message},tags:{name:ua.tags,defaultValue:[]},type:{name:ua.type}},superTypes:[ra.$type]},Common:{name:Hs.$type,properties:{accDescr:{name:Hs.accDescr},accTitle:{name:Hs.accTitle},title:{name:Hs.title}},superTypes:[]},Component:{name:Br.$type,properties:{decorator:{name:Br.decorator},evolution:{name:Br.evolution},inertia:{name:Br.inertia,defaultValue:!1},label:{name:Br.label},name:{name:Br.name},visibility:{name:Br.visibility}},superTypes:[]},Curve:{name:Ys.$type,properties:{entries:{name:Ys.entries,defaultValue:[]},label:{name:Ys.label},name:{name:Ys.name}},superTypes:[]},Deaccelerator:{name:Xs.$type,properties:{name:{name:Xs.name},x:{name:Xs.x},y:{name:Xs.y}},superTypes:[]},Decorator:{name:ng.$type,properties:{strategy:{name:ng.strategy}},superTypes:[]},Direction:{name:Qn.$type,properties:{accDescr:{name:Qn.accDescr},accTitle:{name:Qn.accTitle},dir:{name:Qn.dir},statements:{name:Qn.statements,defaultValue:[]},title:{name:Qn.title}},superTypes:[Qr.$type]},Edge:{name:Ut.$type,properties:{lhsDir:{name:Ut.lhsDir},lhsGroup:{name:Ut.lhsGroup,defaultValue:!1},lhsId:{name:Ut.lhsId},lhsInto:{name:Ut.lhsInto,defaultValue:!1},rhsDir:{name:Ut.rhsDir},rhsGroup:{name:Ut.rhsGroup,defaultValue:!1},rhsId:{name:Ut.rhsId},rhsInto:{name:Ut.rhsInto,defaultValue:!1},title:{name:Ut.title}},superTypes:[]},EmDataEntity:{name:ea.$type,properties:{dataBlockValue:{name:ea.dataBlockValue},dataType:{name:ea.dataType},name:{name:ea.name}},superTypes:[]},EmFrame:{name:Kr.$type,properties:{},superTypes:[]},EmGwt:{name:Ri.$type,properties:{givenStatements:{name:Ri.givenStatements,defaultValue:[]},sourceFrame:{name:Ri.sourceFrame,referenceType:Kr.$type},thenStatements:{name:Ri.thenStatements,defaultValue:[]},whenStatements:{name:Ri.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:ag.$type,properties:{entityIdentifier:{name:ag.entityIdentifier,referenceType:xu.$type}},superTypes:[]},EmModelEntity:{name:xu.$type,properties:{name:{name:xu.name}},superTypes:[]},EmNoteEntity:{name:Js.$type,properties:{dataBlockValue:{name:Js.dataBlockValue},dataType:{name:Js.dataType},sourceFrame:{name:Js.sourceFrame,referenceType:Kr.$type}},superTypes:[]},EmResetFrame:{name:or.$type,properties:{dataInlineValue:{name:or.dataInlineValue},dataReference:{name:or.dataReference,referenceType:ea.$type},dataType:{name:or.dataType},entityIdentifier:{name:or.entityIdentifier},modelEntityType:{name:or.modelEntityType},name:{name:or.name},sourceFrames:{name:or.sourceFrames,defaultValue:[],referenceType:Kr.$type}},superTypes:[Kr.$type]},EmTimeFrame:{name:br.$type,properties:{dataInlineValue:{name:br.dataInlineValue},dataReference:{name:br.dataReference,referenceType:ea.$type},dataType:{name:br.dataType},entityIdentifier:{name:br.entityIdentifier},modelEntityType:{name:br.modelEntityType},name:{name:br.name},sourceFrames:{name:br.sourceFrames,defaultValue:[],referenceType:Kr.$type}},superTypes:[Kr.$type]},Entry:{name:Fu.$type,properties:{axis:{name:Fu.axis,referenceType:Ws.$type},value:{name:Fu.value}},superTypes:[]},EventModel:{name:nr.$type,properties:{accDescr:{name:nr.accDescr},accTitle:{name:nr.accTitle},dataEntities:{name:nr.dataEntities,defaultValue:[]},frames:{name:nr.frames,defaultValue:[]},gwtEntities:{name:nr.gwtEntities,defaultValue:[]},modelEntities:{name:nr.modelEntities,defaultValue:[]},noteEntities:{name:nr.noteEntities,defaultValue:[]},title:{name:nr.title}},superTypes:[]},Evolution:{name:ig.$type,properties:{stages:{name:ig.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:Zs.$type,properties:{boundary:{name:Zs.boundary},name:{name:Zs.name},secondName:{name:Zs.secondName}},superTypes:[]},Evolve:{name:Gu.$type,properties:{component:{name:Gu.component},target:{name:Gu.target}},superTypes:[]},GitGraph:{name:Qr.$type,properties:{accDescr:{name:Qr.accDescr},accTitle:{name:Qr.accTitle},statements:{name:Qr.statements,defaultValue:[]},title:{name:Qr.title}},superTypes:[]},Group:{name:$i.$type,properties:{icon:{name:$i.icon},id:{name:$i.id},in:{name:$i.in},title:{name:$i.title}},superTypes:[]},Info:{name:xi.$type,properties:{accDescr:{name:xi.accDescr},accTitle:{name:xi.accTitle},title:{name:xi.title}},superTypes:[]},Item:{name:Ai.$type,properties:{classSelector:{name:Ai.classSelector},name:{name:Ai.name}},superTypes:[]},Junction:{name:ju.$type,properties:{id:{name:ju.id},in:{name:ju.in}},superTypes:[]},Label:{name:Ei.$type,properties:{negX:{name:Ei.negX,defaultValue:!1},negY:{name:Ei.negY,defaultValue:!1},offsetX:{name:Ei.offsetX},offsetY:{name:Ei.offsetY}},superTypes:[]},Leaf:{name:Qs.$type,properties:{classSelector:{name:Qs.classSelector},name:{name:Qs.name},value:{name:Qs.value}},superTypes:[Ai.$type]},Link:{name:qr.$type,properties:{arrow:{name:qr.arrow},from:{name:qr.from},fromPort:{name:qr.fromPort},linkLabel:{name:qr.linkLabel},to:{name:qr.to},toPort:{name:qr.toPort}},superTypes:[]},Merge:{name:ca.$type,properties:{branch:{name:ca.branch},id:{name:ca.id},tags:{name:ca.tags,defaultValue:[]},type:{name:ca.type}},superTypes:[ra.$type]},Note:{name:eo.$type,properties:{evolution:{name:eo.evolution},text:{name:eo.text},visibility:{name:eo.visibility}},superTypes:[]},Option:{name:Uu.$type,properties:{name:{name:Uu.name},value:{name:Uu.value,defaultValue:!1}},superTypes:[]},Packet:{name:fa.$type,properties:{accDescr:{name:fa.accDescr},accTitle:{name:fa.accTitle},blocks:{name:fa.blocks,defaultValue:[]},title:{name:fa.title}},superTypes:[]},PacketBlock:{name:da.$type,properties:{bits:{name:da.bits},end:{name:da.end},label:{name:da.label},start:{name:da.start}},superTypes:[]},Pie:{name:en.$type,properties:{accDescr:{name:en.accDescr},accTitle:{name:en.accTitle},sections:{name:en.sections,defaultValue:[]},showData:{name:en.showData,defaultValue:!1},title:{name:en.title}},superTypes:[]},PieSection:{name:Co.$type,properties:{label:{name:Co.label},value:{name:Co.value}},superTypes:[]},Pipeline:{name:zu.$type,properties:{components:{name:zu.components,defaultValue:[]},parent:{name:zu.parent}},superTypes:[]},PipelineComponent:{name:to.$type,properties:{evolution:{name:to.evolution},label:{name:to.label},name:{name:to.name}},superTypes:[]},Radar:{name:Wr.$type,properties:{accDescr:{name:Wr.accDescr},accTitle:{name:Wr.accTitle},axes:{name:Wr.axes,defaultValue:[]},curves:{name:Wr.curves,defaultValue:[]},options:{name:Wr.options,defaultValue:[]},title:{name:Wr.title}},superTypes:[]},Section:{name:Bu.$type,properties:{classSelector:{name:Bu.classSelector},name:{name:Bu.name}},superTypes:[Ai.$type]},Service:{name:ta.$type,properties:{icon:{name:ta.icon},iconText:{name:ta.iconText},id:{name:ta.id},in:{name:ta.in},title:{name:ta.title}},superTypes:[]},Size:{name:Ku.$type,properties:{height:{name:Ku.height},width:{name:Ku.width}},superTypes:[]},Statement:{name:ra.$type,properties:{},superTypes:[]},TreeNode:{name:Wu.$type,properties:{indent:{name:Wu.indent},name:{name:Wu.name}},superTypes:[]},TreeView:{name:_i.$type,properties:{accDescr:{name:_i.accDescr},accTitle:{name:_i.accTitle},nodes:{name:_i.nodes,defaultValue:[]},title:{name:_i.title}},superTypes:[]},Treemap:{name:pa.$type,properties:{accDescr:{name:pa.accDescr},accTitle:{name:pa.accTitle},title:{name:pa.title},TreemapRows:{name:pa.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:qu.$type,properties:{indent:{name:qu.indent},item:{name:qu.item}},superTypes:[]},Wardley:{name:Ke.$type,properties:{accDescr:{name:Ke.accDescr},accelerators:{name:Ke.accelerators,defaultValue:[]},accTitle:{name:Ke.accTitle},anchors:{name:Ke.anchors,defaultValue:[]},annotation:{name:Ke.annotation,defaultValue:[]},annotations:{name:Ke.annotations,defaultValue:[]},components:{name:Ke.components,defaultValue:[]},deaccelerators:{name:Ke.deaccelerators,defaultValue:[]},evolution:{name:Ke.evolution},evolves:{name:Ke.evolves,defaultValue:[]},links:{name:Ke.links,defaultValue:[]},notes:{name:Ke.notes,defaultValue:[]},pipelines:{name:Ke.pipelines,defaultValue:[]},size:{name:Ke.size},title:{name:Ke.title}},superTypes:[]}}}static{o(this,"MermaidAstReflection")}},Tt=new TS,sg,Z1=o(()=>sg??(sg=vt(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"ArchitectureGrammarGrammar"),og,Q1=o(()=>og??(og=vt('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}')),"EventModelingGrammar"),lg,eF=o(()=>lg??(lg=vt(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"GitGraphGrammarGrammar"),ug,tF=o(()=>ug??(ug=vt(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"InfoGrammarGrammar"),cg,rF=o(()=>cg??(cg=vt(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PacketGrammarGrammar"),fg,nF=o(()=>fg??(fg=vt(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PieGrammarGrammar"),dg,aF=o(()=>dg??(dg=vt(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`)),"RadarGrammarGrammar"),pg,iF=o(()=>pg??(pg=vt(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`)),"TreemapGrammarGrammar"),hg,sF=o(()=>hg??(hg=vt(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n * Converted from treemap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`)),"TreeViewGrammarGrammar"),mg,oF=o(()=>mg??(mg=vt(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"WardleyGrammarGrammar"),lF={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},uF={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},cF={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},fF={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},dF={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},pF={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},hF={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},mF={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},gF={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},yF={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},bF={AstReflection:o(()=>new TS,"AstReflection")},SF={Grammar:o(()=>Z1(),"Grammar"),LanguageMetaData:o(()=>lF,"LanguageMetaData"),parser:{}},wF={Grammar:o(()=>Q1(),"Grammar"),LanguageMetaData:o(()=>uF,"LanguageMetaData"),parser:{}},IF={Grammar:o(()=>eF(),"Grammar"),LanguageMetaData:o(()=>cF,"LanguageMetaData"),parser:{}},NF={Grammar:o(()=>tF(),"Grammar"),LanguageMetaData:o(()=>fF,"LanguageMetaData"),parser:{}},kF={Grammar:o(()=>rF(),"Grammar"),LanguageMetaData:o(()=>dF,"LanguageMetaData"),parser:{}},PF={Grammar:o(()=>nF(),"Grammar"),LanguageMetaData:o(()=>pF,"LanguageMetaData"),parser:{}},OF={Grammar:o(()=>aF(),"Grammar"),LanguageMetaData:o(()=>hF,"LanguageMetaData"),parser:{}},LF={Grammar:o(()=>iF(),"Grammar"),LanguageMetaData:o(()=>mF,"LanguageMetaData"),parser:{}},DF={Grammar:o(()=>sF(),"Grammar"),LanguageMetaData:o(()=>gF,"LanguageMetaData"),parser:{}},MF={Grammar:o(()=>oF(),"Grammar"),LanguageMetaData:o(()=>yF,"LanguageMetaData"),parser:{}},vF=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,TF=/accTitle[\t ]*:([^\n\r]*)/,RF=/title([\t ][^\n\r]*|)/,$F={ACC_DESCR:vF,ACC_TITLE:TF,TITLE:RF},AF=class extends sh{static{i(this,"AbstractMermaidValueConverter")}static{o(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){let n=this.runCommonConverter(e,t,r);return n===void 0&&(n=this.runCustomConverter(e,t,r)),n===void 0?super.runConverter(e,t,r):n}runCommonConverter(e,t,r){let n=$F[e.name];if(n===void 0)return;let a=n.exec(t);if(a!==null){if(a[1]!==void 0)return a[1].trim().replace(/[\t ]{2,}/gm," ");if(a[2]!==void 0)return a[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` `)}}},xF=class extends AF{static{i(this,"CommonValueConverter")}static{o(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},EF=class extends gu{static{i(this,"AbstractMermaidTokenBuilder")}static{o(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){let n=super.buildKeywordTokens(e,t,r);return n.forEach(a=>{this.keywords.has(a.name)&&a.PATTERN!==void 0&&(a.PATTERN=new RegExp(a.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}},FF=class extends EF{static{i(this,"CommonTokenBuilder")}static{o(this,"CommonTokenBuilder")}};export{o as a,Ch as b,bh as c,hl as d,gS as e,z1 as f,bF as g,SF as h,wF as i,IF as j,NF as k,kF as l,PF as m,OF as n,LF as o,DF as p,MF as q,AF as r,xF as s,EF as t}; /*! Bundled license information: lodash-es/lodash.js: (** * @license * Lodash (Custom Build) * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) */