@agent-link/server 0.1.533 → 0.1.535

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/package.json +4 -3
  2. package/web/dist/assets/{abnfDiagram-VRR7QNED-DTqibD6g.js → abnfDiagram-VRR7QNED-CF7P098z.js} +1 -1
  3. package/web/dist/assets/{arc-C3eew4e6.js → arc-C59x_NX0.js} +1 -1
  4. package/web/dist/assets/{architectureDiagram-ZJ3FMSHR-uRA0GwvC.js → architectureDiagram-ZJ3FMSHR-BgiRZC4X.js} +1 -1
  5. package/web/dist/assets/{blockDiagram-677ZJIJ3-BfGl7qbg.js → blockDiagram-677ZJIJ3-DbyyYQVu.js} +1 -1
  6. package/web/dist/assets/{c4Diagram-LMCZKHZV-1hm38Bwl.js → c4Diagram-LMCZKHZV-j9yfsB9T.js} +1 -1
  7. package/web/dist/assets/channel-DUGYP_Ga.js +1 -0
  8. package/web/dist/assets/{chunk-2Q5K7J3B-BUP52oYq.js → chunk-2Q5K7J3B-DBA35W4b.js} +1 -1
  9. package/web/dist/assets/{chunk-32BRIVSS-yQKEtQBT.js → chunk-32BRIVSS-49t1AAEq.js} +1 -1
  10. package/web/dist/assets/{chunk-5VM5RSS4-Cz5gzMlS.js → chunk-5VM5RSS4-BH4tn2Bl.js} +1 -1
  11. package/web/dist/assets/{chunk-EX3LRPZG-rI_5p8L1.js → chunk-EX3LRPZG-DPfAknnN.js} +1 -1
  12. package/web/dist/assets/{chunk-JWPE2WC7-DdFuOOTn.js → chunk-JWPE2WC7-diP27-v4.js} +1 -1
  13. package/web/dist/assets/{chunk-MOJQB5TN-C7pc0vwS.js → chunk-MOJQB5TN-D5rohUBO.js} +1 -1
  14. package/web/dist/assets/{chunk-RYQCIY6F-B3lsjb_M.js → chunk-RYQCIY6F-CWwReH1T.js} +1 -1
  15. package/web/dist/assets/{chunk-V7JOEXUC-D06UIgKi.js → chunk-V7JOEXUC-DX_exavz.js} +1 -1
  16. package/web/dist/assets/{chunk-VR4S4FIN-W4KDoSuZ.js → chunk-VR4S4FIN-d8jJiY_O.js} +1 -1
  17. package/web/dist/assets/{chunk-XXDRQBXY-DzYnzvEh.js → chunk-XXDRQBXY-BMsRmNA_.js} +1 -1
  18. package/web/dist/assets/classDiagram-OUVF2IWQ-IDWWW0hg.js +1 -0
  19. package/web/dist/assets/classDiagram-v2-EOCWNBFH-IDWWW0hg.js +1 -0
  20. package/web/dist/assets/{cose-bilkent-JH36ORCC-CLRpdoFA.js → cose-bilkent-JH36ORCC-B5nwmF3_.js} +1 -1
  21. package/web/dist/assets/{cssMode-0qcDWPvz.js → cssMode-CcQVS6p2.js} +1 -1
  22. package/web/dist/assets/{cynefin-VYW2F7L2-D6nSGz8H.js → cynefin-VYW2F7L2-BhPPuLEh.js} +1 -1
  23. package/web/dist/assets/{cynefinDiagram-TSTJHNR4-9SSw1ZA7.js → cynefinDiagram-TSTJHNR4-CRDySWA4.js} +1 -1
  24. package/web/dist/assets/{dagre-VKFMJZFB-CZQ-wTmp.js → dagre-VKFMJZFB-Dkg9XDp_.js} +1 -1
  25. package/web/dist/assets/{diagram-FQU43EPY-CGfxGAx4.js → diagram-FQU43EPY-zuvpKPT_.js} +1 -1
  26. package/web/dist/assets/{diagram-G47NLZAW-iy9kh8dP.js → diagram-G47NLZAW-DLbZ7e8v.js} +1 -1
  27. package/web/dist/assets/{diagram-NH7WQ7WH-DYHISN3A.js → diagram-NH7WQ7WH-XB9yrVBk.js} +1 -1
  28. package/web/dist/assets/{diagram-OA4YK3LP-DHXgq-9w.js → diagram-OA4YK3LP-xVMLcUPT.js} +1 -1
  29. package/web/dist/assets/{diagram-WEI45ONY-tzoJ1nXV.js → diagram-WEI45ONY-B2wLh5Ur.js} +1 -1
  30. package/web/dist/assets/{ebnfDiagram-CCIWWBDH-B-Ad4Y1C.js → ebnfDiagram-CCIWWBDH-kGQOKNjc.js} +1 -1
  31. package/web/dist/assets/{editor.main-CRrZGcc8.js → editor.main-Dnk9sp-f.js} +3 -3
  32. package/web/dist/assets/{erDiagram-Q63AITRT-aiuxwx7u.js → erDiagram-Q63AITRT-UM746MeO.js} +1 -1
  33. package/web/dist/assets/{flowDiagram-23GEKE2U-HsTatdI5.js → flowDiagram-23GEKE2U-ClRiFeQ7.js} +1 -1
  34. package/web/dist/assets/{freemarker2-DJDpp-Fv.js → freemarker2-BR_vBZso.js} +1 -1
  35. package/web/dist/assets/{ganttDiagram-NO4QXBWP-QNOROSP_.js → ganttDiagram-NO4QXBWP-COkrmlRK.js} +1 -1
  36. package/web/dist/assets/{gitGraphDiagram-IHSO6WYX-D7txQhQa.js → gitGraphDiagram-IHSO6WYX-Dv9WIrPI.js} +1 -1
  37. package/web/dist/assets/{handlebars-CWDbpKYW.js → handlebars-BT3ojp_S.js} +1 -1
  38. package/web/dist/assets/{html-BS45kqgL.js → html-Nfq0m1I8.js} +1 -1
  39. package/web/dist/assets/{htmlMode-CAnCR40m.js → htmlMode-BS4gsjsW.js} +1 -1
  40. package/web/dist/assets/{index-DxesAJ2s.js → index-CA5N4n3x.js} +6 -6
  41. package/web/dist/assets/{index-BBwchZ8I.css → index-P--EnTnB.css} +1 -1
  42. package/web/dist/assets/{infoDiagram-FWYZ7A6U-DWu6EBgQ.js → infoDiagram-FWYZ7A6U-DVDsQpsP.js} +1 -1
  43. package/web/dist/assets/{ishikawaDiagram-FXEZZL3T-DwEW4qqa.js → ishikawaDiagram-FXEZZL3T-caLJ7q48.js} +1 -1
  44. package/web/dist/assets/{javascript-BF80ERom.js → javascript-BuLRuirW.js} +1 -1
  45. package/web/dist/assets/{journeyDiagram-5HDEW3XC-O_oDrYzt.js → journeyDiagram-5HDEW3XC-CFo7pcyA.js} +1 -1
  46. package/web/dist/assets/{jsonMode-D1HXiMjp.js → jsonMode-CtWdfVP4.js} +1 -1
  47. package/web/dist/assets/{kanban-definition-HUTT4EX6-DIJ6SMSe.js → kanban-definition-HUTT4EX6-mm_sHCRv.js} +1 -1
  48. package/web/dist/assets/{linear-CmbVRcR_.js → linear-BT-MpMsf.js} +1 -1
  49. package/web/dist/assets/{liquid-Dr7uz6WX.js → liquid-CepXiWiD.js} +1 -1
  50. package/web/dist/assets/{lspLanguageFeatures-CdykXsuW.js → lspLanguageFeatures-CYV708a2.js} +1 -1
  51. package/web/dist/assets/{mdx-Yx41ZcrW.js → mdx-Cg6hI2dr.js} +1 -1
  52. package/web/dist/assets/{mermaid.core-CXWrxBgC.js → mermaid.core-DzASjxSb.js} +2 -2
  53. package/web/dist/assets/{mindmap-definition-LN4V7U3C-DwxZKA6c.js → mindmap-definition-LN4V7U3C-CQllaqbn.js} +1 -1
  54. package/web/dist/assets/{pegDiagram-2B236MQR-D8-bMh8z.js → pegDiagram-2B236MQR-BZjsDU53.js} +1 -1
  55. package/web/dist/assets/{pieDiagram-ENE6RG2P-Dgk7sruZ.js → pieDiagram-ENE6RG2P-DT-yCgy4.js} +1 -1
  56. package/web/dist/assets/{python-B6tr8PTH.js → python-DlYwMsHj.js} +1 -1
  57. package/web/dist/assets/{quadrantDiagram-ABIIQ3AL-CODtFODk.js → quadrantDiagram-ABIIQ3AL-BifCy1v2.js} +1 -1
  58. package/web/dist/assets/{railroadDiagram-RFXS5EU6-DAe_gRtf.js → railroadDiagram-RFXS5EU6-Ddj5F2cR.js} +1 -1
  59. package/web/dist/assets/{razor-CEKCSzig.js → razor-DfctSx4t.js} +1 -1
  60. package/web/dist/assets/{requirementDiagram-TGXJPOKE-CY--9zSb.js → requirementDiagram-TGXJPOKE-BODdjtNi.js} +1 -1
  61. package/web/dist/assets/{sankeyDiagram-HTMAVEWB-Ct9U2-g_.js → sankeyDiagram-HTMAVEWB--7NcLvqQ.js} +1 -1
  62. package/web/dist/assets/{sequenceDiagram-DBY2YBRQ-DIqIRBpX.js → sequenceDiagram-DBY2YBRQ-mgenv1mg.js} +1 -1
  63. package/web/dist/assets/{sizeCapture-X5ZJPWSS-DrnpGiKz.js → sizeCapture-X5ZJPWSS-DmdLa5Dd.js} +1 -1
  64. package/web/dist/assets/{stateDiagram-2N3HPSRC-X95EIyN0.js → stateDiagram-2N3HPSRC-CbaAR2rb.js} +1 -1
  65. package/web/dist/assets/stateDiagram-v2-6OUMAXLB-D1D_VAAU.js +1 -0
  66. package/web/dist/assets/{swimlanes-5IMT3BWC-BeOG0dPV.js → swimlanes-5IMT3BWC-BXnBFUJL.js} +2 -2
  67. package/web/dist/assets/swimlanesDiagram-G3AALYLV-rAYhu43H.js +1 -0
  68. package/web/dist/assets/{timeline-definition-FHXFAJF6-BQ5Vnv63.js → timeline-definition-FHXFAJF6-DTZ87MqH.js} +1 -1
  69. package/web/dist/assets/{tsMode-EwiMaZm0.js → tsMode-DeS4GNee.js} +1 -1
  70. package/web/dist/assets/{typescript-CBmYQinx.js → typescript-BlpXNGCd.js} +1 -1
  71. package/web/dist/assets/{vennDiagram-L72KCM5P-CEgiFAHT.js → vennDiagram-L72KCM5P-gcsGexxE.js} +1 -1
  72. package/web/dist/assets/{wardleyDiagram-EHGQE667-D7ypEdSe.js → wardleyDiagram-EHGQE667-CKvl03Jz.js} +1 -1
  73. package/web/dist/assets/{xml-CyQ2wxNX.js → xml-B9eDYoD1.js} +1 -1
  74. package/web/dist/assets/{xychartDiagram-FW5EYKEG-IaYJgy1U.js → xychartDiagram-FW5EYKEG-B3bYNF8r.js} +1 -1
  75. package/web/dist/assets/{yaml-DEs_nBjf.js → yaml-B4h8_T1W.js} +1 -1
  76. package/web/dist/index.html +2 -2
  77. package/web/dist/assets/channel-DOciy6CL.js +0 -1
  78. package/web/dist/assets/classDiagram-OUVF2IWQ-D8vBbsZC.js +0 -1
  79. package/web/dist/assets/classDiagram-v2-EOCWNBFH-D8vBbsZC.js +0 -1
  80. package/web/dist/assets/stateDiagram-v2-6OUMAXLB-DRdWHuhY.js +0 -1
  81. package/web/dist/assets/swimlanesDiagram-G3AALYLV-HQ82s869.js +0 -1
@@ -1,4 +1,4 @@
1
- var e,t,r,n,a,i,s,o,l,u,c,p,d,f,m,h,y,g,v,T,$,R,E,b,A,C,S,k,x,w,N,_,I,P,O,L,D,M,j,F,G,z,K,q,U,B,V,W,H,Y,X,Z,J,Q,ee,te,re,ne,ae,ie,se,oe,le,ue,ce,pe,de,fe,me,he,ye,ge,ve,Te,$e,Re,Ee,be,Ae,Ce,Se,ke,xe,we,Ne,_e,Ie,Pe,Oe,Le,De,Me,je,Fe,Ge,ze,Ke,qe,Ue,Be,Ve,We,He,Ye,Xe,Ze,Je,Qe,et,tt,rt,nt,at,it,st,ot,lt,ut,ct,pt,dt,ft,mt,ht,yt,gt,vt,Tt,$t,Rt,Et,bt,At,Ct,St,kt,xt,wt,Nt,_t,It,Pt,Ot,Lt,Dt,Mt,jt,Ft,Gt,zt,Kt,qt,Ut,Bt,Vt,Wt,Ht,Yt,Xt=Object.defineProperty,Zt=(e,t,r)=>((e,t,r)=>t in e?Xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);import{_ as Jt}from"./index-DxesAJ2s.js";var Qt,er,tr,rr,nr,ar,ir,sr,or,lr,ur,cr,pr,dr,fr,mr,hr,yr,gr,vr,Tr,$r,Rr,Er,br,Ar,Cr,Sr,kr,xr,wr,Nr,_r,Ir,Pr,Or,Lr,Dr,Mr,jr,Fr,Gr,zr,Kr,qr,Ur,Br,Vr,Wr,Hr,Yr,Xr,Zr,Jr,Qr,en,tn,rn,nn,an,sn,on,ln,un,cn,pn,dn,fn,mn,hn,yn,gn,vn,Tn,$n,Rn,En,bn,An,Cn,Sn,kn,xn,wn,Nn,_n=Object.create,In=Object.defineProperty,Pn=Object.getOwnPropertyDescriptor,On=Object.getOwnPropertyNames,Ln=Object.getPrototypeOf,Dn=Object.prototype.hasOwnProperty,Mn=(e,t)=>In(e,"name",{value:t,configurable:!0}),jn=(e,t)=>function(){return t||(0,e[On(e)[0]])((t={exports:{}}).exports,t),t.exports},Fn=(e,t)=>{for(var r in t)In(e,r,{get:t[r],enumerable:!0})},Gn=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of On(t))Dn.call(e,a)||a===r||In(e,a,{get:()=>t[a],enumerable:!(n=Pn(t,a))||n.enumerable});return e},zn=(e,t,r)=>(Gn(e,t,"default"),r),Kn=(e,t,r)=>(r=null!=e?_n(Ln(e)):{},Gn(In(r,"default",{value:e,enumerable:!0}),e)),qn=e=>Gn(In({},"__esModule",{value:!0}),e),Un={};Fn(Un,{AnnotatedTextEdit:()=>Rr,ChangeAnnotation:()=>Tr,ChangeAnnotationIdentifier:()=>$r,CodeAction:()=>an,CodeActionContext:()=>nn,CodeActionKind:()=>tn,CodeActionTriggerKind:()=>rn,CodeDescription:()=>hr,CodeLens:()=>sn,Color:()=>or,ColorInformation:()=>lr,ColorPresentation:()=>ur,Command:()=>gr,CompletionItem:()=>Kr,CompletionItemKind:()=>Dr,CompletionItemLabelDetails:()=>zr,CompletionItemTag:()=>jr,CompletionList:()=>qr,CreateFile:()=>br,DeleteFile:()=>Cr,Diagnostic:()=>yr,DiagnosticRelatedInformation:()=>dr,DiagnosticSeverity:()=>fr,DiagnosticTag:()=>mr,DocumentHighlight:()=>Yr,DocumentHighlightKind:()=>Hr,DocumentLink:()=>ln,DocumentSymbol:()=>en,DocumentUri:()=>Qt,EOL:()=>kn,FoldingRange:()=>pr,FoldingRangeKind:()=>cr,FormattingOptions:()=>on,Hover:()=>Br,InlayHint:()=>Tn,InlayHintKind:()=>gn,InlayHintLabelPart:()=>vn,InlineCompletionContext:()=>Cn,InlineCompletionItem:()=>Rn,InlineCompletionList:()=>En,InlineCompletionTriggerKind:()=>bn,InlineValueContext:()=>yn,InlineValueEvaluatableExpression:()=>hn,InlineValueText:()=>fn,InlineValueVariableLookup:()=>mn,InsertReplaceEdit:()=>Fr,InsertTextFormat:()=>Mr,InsertTextMode:()=>Gr,Location:()=>ir,LocationLink:()=>sr,MarkedString:()=>Ur,MarkupContent:()=>Lr,MarkupKind:()=>Or,OptionalVersionedTextDocumentIdentifier:()=>Ir,ParameterInformation:()=>Vr,Position:()=>nr,Range:()=>ar,RenameFile:()=>Ar,SelectedCompletionInfo:()=>An,SelectionRange:()=>un,SemanticTokenModifiers:()=>pn,SemanticTokenTypes:()=>cn,SemanticTokens:()=>dn,SignatureInformation:()=>Wr,StringValue:()=>$n,SymbolInformation:()=>Jr,SymbolKind:()=>Xr,SymbolTag:()=>Zr,TextDocument:()=>xn,TextDocumentEdit:()=>Er,TextDocumentIdentifier:()=>Nr,TextDocumentItem:()=>Pr,TextEdit:()=>vr,URI:()=>er,VersionedTextDocumentIdentifier:()=>_r,WorkspaceChange:()=>wr,WorkspaceEdit:()=>Sr,WorkspaceFolder:()=>Sn,WorkspaceSymbol:()=>Qr,integer:()=>tr,uinteger:()=>rr});var Bn,Vn,Wn=(Bn={"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var e,t,r,n,a,i,s,o,l,u,c,p,d,f,m,h,y;!function(e){function t(e){return"string"==typeof e}Mn(t,"is"),e.is=t}(Qt||(Qt={})),function(e){function t(e){return"string"==typeof e}Mn(t,"is"),e.is=t}(er||(er={})),function(e){function t(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,Mn(t,"is"),e.is=t}(tr||(tr={})),function(e){function t(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=0,e.MAX_VALUE=2147483647,Mn(t,"is"),e.is=t}(rr||(rr={})),function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=rr.MAX_VALUE),t===Number.MAX_VALUE&&(t=rr.MAX_VALUE),{line:e,character:t}}function r(e){let t=e;return Nn.objectLiteral(t)&&Nn.uinteger(t.line)&&Nn.uinteger(t.character)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(nr||(nr={})),function(e){function t(e,t,r,n){if(Nn.uinteger(e)&&Nn.uinteger(t)&&Nn.uinteger(r)&&Nn.uinteger(n))return{start:nr.create(e,t),end:nr.create(r,n)};if(nr.is(e)&&nr.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${r}, ${n}]`)}function r(e){let t=e;return Nn.objectLiteral(t)&&nr.is(t.start)&&nr.is(t.end)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(ar||(ar={})),function(e){function t(e,t){return{uri:e,range:t}}function r(e){let t=e;return Nn.objectLiteral(t)&&ar.is(t.range)&&(Nn.string(t.uri)||Nn.undefined(t.uri))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(ir||(ir={})),function(e){function t(e,t,r,n){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:n}}function r(e){let t=e;return Nn.objectLiteral(t)&&ar.is(t.targetRange)&&Nn.string(t.targetUri)&&ar.is(t.targetSelectionRange)&&(ar.is(t.originSelectionRange)||Nn.undefined(t.originSelectionRange))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(sr||(sr={})),function(e){function t(e,t,r,n){return{red:e,green:t,blue:r,alpha:n}}function r(e){const t=e;return Nn.objectLiteral(t)&&Nn.numberRange(t.red,0,1)&&Nn.numberRange(t.green,0,1)&&Nn.numberRange(t.blue,0,1)&&Nn.numberRange(t.alpha,0,1)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(or||(or={})),function(e){function t(e,t){return{range:e,color:t}}function r(e){const t=e;return Nn.objectLiteral(t)&&ar.is(t.range)&&or.is(t.color)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(lr||(lr={})),function(e){function t(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}}function r(e){const t=e;return Nn.objectLiteral(t)&&Nn.string(t.label)&&(Nn.undefined(t.textEdit)||vr.is(t))&&(Nn.undefined(t.additionalTextEdits)||Nn.typedArray(t.additionalTextEdits,vr.is))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(ur||(ur={})),(a=cr||(cr={})).Comment="comment",a.Imports="imports",a.Region="region",function(e){function t(e,t,r,n,a,i){const s={startLine:e,endLine:t};return Nn.defined(r)&&(s.startCharacter=r),Nn.defined(n)&&(s.endCharacter=n),Nn.defined(a)&&(s.kind=a),Nn.defined(i)&&(s.collapsedText=i),s}function r(e){const t=e;return Nn.objectLiteral(t)&&Nn.uinteger(t.startLine)&&Nn.uinteger(t.startLine)&&(Nn.undefined(t.startCharacter)||Nn.uinteger(t.startCharacter))&&(Nn.undefined(t.endCharacter)||Nn.uinteger(t.endCharacter))&&(Nn.undefined(t.kind)||Nn.string(t.kind))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(pr||(pr={})),function(e){function t(e,t){return{location:e,message:t}}function r(e){let t=e;return Nn.defined(t)&&ir.is(t.location)&&Nn.string(t.message)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(dr||(dr={})),(i=fr||(fr={})).Error=1,i.Warning=2,i.Information=3,i.Hint=4,(s=mr||(mr={})).Unnecessary=1,s.Deprecated=2,function(e){function t(e){const t=e;return Nn.objectLiteral(t)&&Nn.string(t.href)}Mn(t,"is"),e.is=t}(hr||(hr={})),function(e){function t(e,t,r,n,a,i){let s={range:e,message:t};return Nn.defined(r)&&(s.severity=r),Nn.defined(n)&&(s.code=n),Nn.defined(a)&&(s.source=a),Nn.defined(i)&&(s.relatedInformation=i),s}function r(e){var t;let r=e;return Nn.defined(r)&&ar.is(r.range)&&Nn.string(r.message)&&(Nn.number(r.severity)||Nn.undefined(r.severity))&&(Nn.integer(r.code)||Nn.string(r.code)||Nn.undefined(r.code))&&(Nn.undefined(r.codeDescription)||Nn.string(null===(t=r.codeDescription)||void 0===t?void 0:t.href))&&(Nn.string(r.source)||Nn.undefined(r.source))&&(Nn.undefined(r.relatedInformation)||Nn.typedArray(r.relatedInformation,dr.is))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(yr||(yr={})),function(e){function t(e,t,...r){let n={title:e,command:t};return Nn.defined(r)&&r.length>0&&(n.arguments=r),n}function r(e){let t=e;return Nn.defined(t)&&Nn.string(t.title)&&Nn.string(t.command)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(gr||(gr={})),function(e){function t(e,t){return{range:e,newText:t}}function r(e,t){return{range:{start:e,end:e},newText:t}}function n(e){return{range:e,newText:""}}function a(e){const t=e;return Nn.objectLiteral(t)&&Nn.string(t.newText)&&ar.is(t.range)}Mn(t,"replace"),e.replace=t,Mn(r,"insert"),e.insert=r,Mn(n,"del"),e.del=n,Mn(a,"is"),e.is=a}(vr||(vr={})),function(e){function t(e,t,r){const n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==r&&(n.description=r),n}function r(e){const t=e;return Nn.objectLiteral(t)&&Nn.string(t.label)&&(Nn.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Nn.string(t.description)||void 0===t.description)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Tr||(Tr={})),function(e){function t(e){const t=e;return Nn.string(t)}Mn(t,"is"),e.is=t}($r||($r={})),function(e){function t(e,t,r){return{range:e,newText:t,annotationId:r}}function r(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}}function n(e,t){return{range:e,newText:"",annotationId:t}}function a(e){const t=e;return vr.is(t)&&(Tr.is(t.annotationId)||$r.is(t.annotationId))}Mn(t,"replace"),e.replace=t,Mn(r,"insert"),e.insert=r,Mn(n,"del"),e.del=n,Mn(a,"is"),e.is=a}(Rr||(Rr={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function r(e){let t=e;return Nn.defined(t)&&Ir.is(t.textDocument)&&Array.isArray(t.edits)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Er||(Er={})),function(e){function t(e,t,r){let n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==r&&(n.annotationId=r),n}function r(e){let t=e;return t&&"create"===t.kind&&Nn.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Nn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Nn.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||$r.is(t.annotationId))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(br||(br={})),function(e){function t(e,t,r,n){let a={kind:"rename",oldUri:e,newUri:t};return void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(a.options=r),void 0!==n&&(a.annotationId=n),a}function r(e){let t=e;return t&&"rename"===t.kind&&Nn.string(t.oldUri)&&Nn.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Nn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Nn.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||$r.is(t.annotationId))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Ar||(Ar={})),function(e){function t(e,t,r){let n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==r&&(n.annotationId=r),n}function r(e){let t=e;return t&&"delete"===t.kind&&Nn.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Nn.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Nn.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||$r.is(t.annotationId))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Cr||(Cr={})),function(e){function t(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>Nn.string(e.kind)?br.is(e)||Ar.is(e)||Cr.is(e):Er.is(e)))}Mn(t,"is"),e.is=t}(Sr||(Sr={})),Mn(e=class{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(void 0===r?n=vr.insert(e,t):$r.is(r)?(a=r,n=Rr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=Rr.insert(e,t,a)),this.edits.push(n),void 0!==a)return a}replace(e,t,r){let n,a;if(void 0===r?n=vr.replace(e,t):$r.is(r)?(a=r,n=Rr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=Rr.replace(e,t,a)),this.edits.push(n),void 0!==a)return a}delete(e,t){let r,n;if(void 0===t?r=vr.del(e):$r.is(t)?(n=t,r=Rr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=Rr.del(e,n)),this.edits.push(r),void 0!==n)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}},"TextEditChangeImpl"),kr=e,Mn(t=class{constructor(e){this._annotations=void 0===e?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($r.is(e)?r=e:(r=this.nextId(),t=e),void 0!==this._annotations[r])throw new Error(`Id ${r} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},"ChangeAnnotations"),xr=t,Mn(r=class{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new xr(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(Er.is(e)){const t=new kr(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new kr(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Ir.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const e=[],n={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(n),r=new kr(e,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}{if(this.initChanges(),void 0===this._workspaceEdit.changes)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 kr(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new xr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,a,i;if(Tr.is(t)||$r.is(t)?n=t:r=t,void 0===n?a=br.create(e,r):(i=$r.is(n)?n:this._changeAnnotations.manage(n),a=br.create(e,r,i)),this._workspaceEdit.documentChanges.push(a),void 0!==i)return i}renameFile(e,t,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let a,i,s;if(Tr.is(r)||$r.is(r)?a=r:n=r,void 0===a?i=Ar.create(e,t,n):(s=$r.is(a)?a:this._changeAnnotations.manage(a),i=Ar.create(e,t,n,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}deleteFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,a,i;if(Tr.is(t)||$r.is(t)?n=t:r=t,void 0===n?a=Cr.create(e,r):(i=$r.is(n)?n:this._changeAnnotations.manage(n),a=Cr.create(e,r,i)),this._workspaceEdit.documentChanges.push(a),void 0!==i)return i}},"WorkspaceChange"),wr=r,function(e){function t(e){return{uri:e}}function r(e){let t=e;return Nn.defined(t)&&Nn.string(t.uri)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Nr||(Nr={})),function(e){function t(e,t){return{uri:e,version:t}}function r(e){let t=e;return Nn.defined(t)&&Nn.string(t.uri)&&Nn.integer(t.version)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(_r||(_r={})),function(e){function t(e,t){return{uri:e,version:t}}function r(e){let t=e;return Nn.defined(t)&&Nn.string(t.uri)&&(null===t.version||Nn.integer(t.version))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Ir||(Ir={})),function(e){function t(e,t,r,n){return{uri:e,languageId:t,version:r,text:n}}function r(e){let t=e;return Nn.defined(t)&&Nn.string(t.uri)&&Nn.string(t.languageId)&&Nn.integer(t.version)&&Nn.string(t.text)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Pr||(Pr={})),function(e){function t(t){const r=t;return r===e.PlainText||r===e.Markdown}e.PlainText="plaintext",e.Markdown="markdown",Mn(t,"is"),e.is=t}(Or||(Or={})),function(e){function t(e){const t=e;return Nn.objectLiteral(e)&&Or.is(t.kind)&&Nn.string(t.value)}Mn(t,"is"),e.is=t}(Lr||(Lr={})),(o=Dr||(Dr={})).Text=1,o.Method=2,o.Function=3,o.Constructor=4,o.Field=5,o.Variable=6,o.Class=7,o.Interface=8,o.Module=9,o.Property=10,o.Unit=11,o.Value=12,o.Enum=13,o.Keyword=14,o.Snippet=15,o.Color=16,o.File=17,o.Reference=18,o.Folder=19,o.EnumMember=20,o.Constant=21,o.Struct=22,o.Event=23,o.Operator=24,o.TypeParameter=25,(l=Mr||(Mr={})).PlainText=1,l.Snippet=2,(jr||(jr={})).Deprecated=1,function(e){function t(e,t,r){return{newText:e,insert:t,replace:r}}function r(e){const t=e;return t&&Nn.string(t.newText)&&ar.is(t.insert)&&ar.is(t.replace)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Fr||(Fr={})),(u=Gr||(Gr={})).asIs=1,u.adjustIndentation=2,function(e){function t(e){const t=e;return t&&(Nn.string(t.detail)||void 0===t.detail)&&(Nn.string(t.description)||void 0===t.description)}Mn(t,"is"),e.is=t}(zr||(zr={})),function(e){function t(e){return{label:e}}Mn(t,"create"),e.create=t}(Kr||(Kr={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}Mn(t,"create"),e.create=t}(qr||(qr={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function r(e){const t=e;return Nn.string(t)||Nn.objectLiteral(t)&&Nn.string(t.language)&&Nn.string(t.value)}Mn(t,"fromPlainText"),e.fromPlainText=t,Mn(r,"is"),e.is=r}(Ur||(Ur={})),function(e){function t(e){let t=e;return!!t&&Nn.objectLiteral(t)&&(Lr.is(t.contents)||Ur.is(t.contents)||Nn.typedArray(t.contents,Ur.is))&&(void 0===e.range||ar.is(e.range))}Mn(t,"is"),e.is=t}(Br||(Br={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}Mn(t,"create"),e.create=t}(Vr||(Vr={})),function(e){function t(e,t,...r){let n={label:e};return Nn.defined(t)&&(n.documentation=t),Nn.defined(r)?n.parameters=r:n.parameters=[],n}Mn(t,"create"),e.create=t}(Wr||(Wr={})),(c=Hr||(Hr={})).Text=1,c.Read=2,c.Write=3,function(e){function t(e,t){let r={range:e};return Nn.number(t)&&(r.kind=t),r}Mn(t,"create"),e.create=t}(Yr||(Yr={})),(p=Xr||(Xr={})).File=1,p.Module=2,p.Namespace=3,p.Package=4,p.Class=5,p.Method=6,p.Property=7,p.Field=8,p.Constructor=9,p.Enum=10,p.Interface=11,p.Function=12,p.Variable=13,p.Constant=14,p.String=15,p.Number=16,p.Boolean=17,p.Array=18,p.Object=19,p.Key=20,p.Null=21,p.EnumMember=22,p.Struct=23,p.Event=24,p.Operator=25,p.TypeParameter=26,(Zr||(Zr={})).Deprecated=1,function(e){function t(e,t,r,n,a){let i={name:e,kind:t,location:{uri:n,range:r}};return a&&(i.containerName=a),i}Mn(t,"create"),e.create=t}(Jr||(Jr={})),function(e){function t(e,t,r,n){return void 0!==n?{name:e,kind:t,location:{uri:r,range:n}}:{name:e,kind:t,location:{uri:r}}}Mn(t,"create"),e.create=t}(Qr||(Qr={})),function(e){function t(e,t,r,n,a,i){let s={name:e,detail:t,kind:r,range:n,selectionRange:a};return void 0!==i&&(s.children=i),s}function r(e){let t=e;return t&&Nn.string(t.name)&&Nn.number(t.kind)&&ar.is(t.range)&&ar.is(t.selectionRange)&&(void 0===t.detail||Nn.string(t.detail))&&(void 0===t.deprecated||Nn.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(en||(en={})),(d=tn||(tn={})).Empty="",d.QuickFix="quickfix",d.Refactor="refactor",d.RefactorExtract="refactor.extract",d.RefactorInline="refactor.inline",d.RefactorRewrite="refactor.rewrite",d.Source="source",d.SourceOrganizeImports="source.organizeImports",d.SourceFixAll="source.fixAll",(f=rn||(rn={})).Invoked=1,f.Automatic=2,function(e){function t(e,t,r){let n={diagnostics:e};return null!=t&&(n.only=t),null!=r&&(n.triggerKind=r),n}function r(e){let t=e;return Nn.defined(t)&&Nn.typedArray(t.diagnostics,yr.is)&&(void 0===t.only||Nn.typedArray(t.only,Nn.string))&&(void 0===t.triggerKind||t.triggerKind===rn.Invoked||t.triggerKind===rn.Automatic)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(nn||(nn={})),function(e){function t(e,t,r){let n={title:e},a=!0;return"string"==typeof t?(a=!1,n.kind=t):gr.is(t)?n.command=t:n.edit=t,a&&void 0!==r&&(n.kind=r),n}function r(e){let t=e;return t&&Nn.string(t.title)&&(void 0===t.diagnostics||Nn.typedArray(t.diagnostics,yr.is))&&(void 0===t.kind||Nn.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||gr.is(t.command))&&(void 0===t.isPreferred||Nn.boolean(t.isPreferred))&&(void 0===t.edit||Sr.is(t.edit))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(an||(an={})),function(e){function t(e,t){let r={range:e};return Nn.defined(t)&&(r.data=t),r}function r(e){let t=e;return Nn.defined(t)&&ar.is(t.range)&&(Nn.undefined(t.command)||gr.is(t.command))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(sn||(sn={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function r(e){let t=e;return Nn.defined(t)&&Nn.uinteger(t.tabSize)&&Nn.boolean(t.insertSpaces)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(on||(on={})),function(e){function t(e,t,r){return{range:e,target:t,data:r}}function r(e){let t=e;return Nn.defined(t)&&ar.is(t.range)&&(Nn.undefined(t.target)||Nn.string(t.target))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(ln||(ln={})),function(e){function t(e,t){return{range:e,parent:t}}function r(t){let r=t;return Nn.objectLiteral(r)&&ar.is(r.range)&&(void 0===r.parent||e.is(r.parent))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(un||(un={})),(m=cn||(cn={})).namespace="namespace",m.type="type",m.class="class",m.enum="enum",m.interface="interface",m.struct="struct",m.typeParameter="typeParameter",m.parameter="parameter",m.variable="variable",m.property="property",m.enumMember="enumMember",m.event="event",m.function="function",m.method="method",m.macro="macro",m.keyword="keyword",m.modifier="modifier",m.comment="comment",m.string="string",m.number="number",m.regexp="regexp",m.operator="operator",m.decorator="decorator",(h=pn||(pn={})).declaration="declaration",h.definition="definition",h.readonly="readonly",h.static="static",h.deprecated="deprecated",h.abstract="abstract",h.async="async",h.modification="modification",h.documentation="documentation",h.defaultLibrary="defaultLibrary",function(e){function t(e){const t=e;return Nn.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}Mn(t,"is"),e.is=t}(dn||(dn={})),function(e){function t(e,t){return{range:e,text:t}}function r(e){const t=e;return null!=t&&ar.is(t.range)&&Nn.string(t.text)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(fn||(fn={})),function(e){function t(e,t,r){return{range:e,variableName:t,caseSensitiveLookup:r}}function r(e){const t=e;return null!=t&&ar.is(t.range)&&Nn.boolean(t.caseSensitiveLookup)&&(Nn.string(t.variableName)||void 0===t.variableName)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(mn||(mn={})),function(e){function t(e,t){return{range:e,expression:t}}function r(e){const t=e;return null!=t&&ar.is(t.range)&&(Nn.string(t.expression)||void 0===t.expression)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(hn||(hn={})),function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}function r(e){const t=e;return Nn.defined(t)&&ar.is(e.stoppedLocation)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(yn||(yn={})),function(e){function t(e){return 1===e||2===e}e.Type=1,e.Parameter=2,Mn(t,"is"),e.is=t}(gn||(gn={})),function(e){function t(e){return{value:e}}function r(e){const t=e;return Nn.objectLiteral(t)&&(void 0===t.tooltip||Nn.string(t.tooltip)||Lr.is(t.tooltip))&&(void 0===t.location||ir.is(t.location))&&(void 0===t.command||gr.is(t.command))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(vn||(vn={})),function(e){function t(e,t,r){const n={position:e,label:t};return void 0!==r&&(n.kind=r),n}function r(e){const t=e;return Nn.objectLiteral(t)&&nr.is(t.position)&&(Nn.string(t.label)||Nn.typedArray(t.label,vn.is))&&(void 0===t.kind||gn.is(t.kind))&&void 0===t.textEdits||Nn.typedArray(t.textEdits,vr.is)&&(void 0===t.tooltip||Nn.string(t.tooltip)||Lr.is(t.tooltip))&&(void 0===t.paddingLeft||Nn.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Nn.boolean(t.paddingRight))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Tn||(Tn={})),function(e){function t(e){return{kind:"snippet",value:e}}Mn(t,"createSnippet"),e.createSnippet=t}($n||($n={})),function(e){function t(e,t,r,n){return{insertText:e,filterText:t,range:r,command:n}}Mn(t,"create"),e.create=t}(Rn||(Rn={})),function(e){function t(e){return{items:e}}Mn(t,"create"),e.create=t}(En||(En={})),(y=bn||(bn={})).Invoked=0,y.Automatic=1,function(e){function t(e,t){return{range:e,text:t}}Mn(t,"create"),e.create=t}(An||(An={})),function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}Mn(t,"create"),e.create=t}(Cn||(Cn={})),function(e){function t(e){const t=e;return Nn.objectLiteral(t)&&er.is(t.uri)&&Nn.string(t.name)}Mn(t,"is"),e.is=t}(Sn||(Sn={})),kn=["\n","\r\n","\r"],function(e){function t(e,t,r,n){return new wn(e,t,r,n)}function r(e){let t=e;return!!(Nn.defined(t)&&Nn.string(t.uri)&&(Nn.undefined(t.languageId)||Nn.string(t.languageId))&&Nn.uinteger(t.lineCount)&&Nn.func(t.getText)&&Nn.func(t.positionAt)&&Nn.func(t.offsetAt))}function n(e,t){let r=e.getText(),n=a(t,(e,t)=>{let r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r}),i=r.length;for(let a=n.length-1;a>=0;a--){let t=n[a],s=e.offsetAt(t.range.start),o=e.offsetAt(t.range.end);if(!(o<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+t.newText+r.substring(o,r.length),i=s}return r}function a(e,t){if(e.length<=1)return e;const r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);a(n,t),a(i,t);let s=0,o=0,l=0;for(;s<n.length&&o<i.length;){let r=t(n[s],i[o]);e[l++]=r<=0?n[s++]:i[o++]}for(;s<n.length;)e[l++]=n[s++];for(;o<i.length;)e[l++]=i[o++];return e}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r,Mn(n,"applyEdits"),e.applyEdits=n,Mn(a,"mergeSort")}(xn||(xn={})),Mn(n=class{constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,r=!0;for(let n=0;n<t.length;n++){r&&(e.push(n),r=!1);let a=t.charAt(n);r="\r"===a||"\n"===a,"\r"===a&&n+1<t.length&&"\n"===t.charAt(n+1)&&n++}r&&t.length>0&&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(0===n)return nr.create(0,e);for(;r<n;){let a=Math.floor((r+n)/2);t[a]>e?n=a:r=a+1}let a=r-1;return nr.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<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,n),r)}get lineCount(){return this.getLineOffsets().length}},"FullTextDocument"),wn=n,function(e){const t=Object.prototype.toString;function r(e){return void 0!==e}function n(e){return void 0===e}function a(e){return!0===e||!1===e}function i(e){return"[object String]"===t.call(e)}function s(e){return"[object Number]"===t.call(e)}function o(e,r,n){return"[object Number]"===t.call(e)&&r<=e&&e<=n}function l(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647}function u(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647}function c(e){return"[object Function]"===t.call(e)}function p(e){return null!==e&&"object"==typeof e}function d(e,t){return Array.isArray(e)&&e.every(t)}Mn(r,"defined"),e.defined=r,Mn(n,"undefined"),e.undefined=n,Mn(a,"boolean"),e.boolean=a,Mn(i,"string"),e.string=i,Mn(s,"number"),e.number=s,Mn(o,"numberRange"),e.numberRange=o,Mn(l,"integer"),e.integer=l,Mn(u,"uinteger"),e.uinteger=u,Mn(c,"func"),e.func=c,Mn(p,"objectLiteral"),e.objectLiteral=p,Mn(d,"typedArray"),e.typedArray=d}(Nn||(Nn={}))}},function(){return Bn&&(Vn=(0,Bn[On(Bn)[0]])(Bn=0)),Vn}),Hn=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){var t;function r(){if(void 0===t)throw new Error("No runtime abstraction layer installed");return t}Object.defineProperty(e,"__esModule",{value:!0}),Mn(r,"RAL"),function(e){function r(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");t=e}Mn(r,"install"),e.install=r}(r||(r={})),e.default=r}}),Yn=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(e){function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function n(e){return"number"==typeof e||e instanceof Number}function a(e){return e instanceof Error}function i(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,Mn(t,"boolean"),e.boolean=t,Mn(r,"string"),e.string=r,Mn(n,"number"),e.number=n,Mn(a,"error"),e.error=a,Mn(i,"func"),e.func=i,Mn(s,"array"),e.array=s,Mn(o,"stringArray"),e.stringArray=o}}),Xn=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var n,a=Hn();!function(e){const t={dispose(){}};e.None=function(){return t}}(n||(e.Event=n={}));var i=(Mn(t=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:Mn(()=>this.remove(e,t),"dispose")})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let n=0,a=this._callbacks.length;n<a;n++)if(this._callbacks[n]===e){if(this._contexts[n]===t)return this._callbacks.splice(n,1),void this._contexts.splice(n,1);r=!0}if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],r=this._callbacks.slice(0),n=this._contexts.slice(0);for(let s=0,o=r.length;s<o;s++)try{t.push(r[s].apply(n[s],e))}catch(i){(0,a.default)().console.error(i)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}},"CallbackList"),t),s=(Mn(r=class{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const a={dispose:Mn(()=>{this._callbacks&&(this._callbacks.remove(e,t),a.dispose=r._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(n)&&n.push(a),a}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}},"Emitter"),r);e.Emitter=s,s._noop=function(){}}}),Zn=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var n,a=Hn(),i=Yn(),s=Xn();!function(e){function t(t){const r=t;return r&&(r===e.None||r===e.Cancelled||i.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:s.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s.Event.None}),Mn(t,"is"),e.is=t}(n||(e.CancellationToken=n={}));var o=Object.freeze(function(e,t){const r=(0,a.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}}),l=(Mn(t=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new s.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},"MutableToken"),t),u=(Mn(r=class{get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=n.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=n.None}},"CancellationTokenSource"),r);e.CancellationTokenSource=u}}),Jn=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){var t,r,n,a,i,s,o,l,u,c,p,d,f,m,h,y,g,v,T,$,R,E,b,A,C;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 S,k,x=Yn();(k=S||(e.ErrorCodes=S={})).ParseError=-32700,k.InvalidRequest=-32600,k.MethodNotFound=-32601,k.InvalidParams=-32602,k.InternalError=-32603,k.jsonrpcReservedErrorRangeStart=-32099,k.serverErrorStart=-32099,k.MessageWriteError=-32099,k.MessageReadError=-32098,k.PendingResponseRejected=-32097,k.ConnectionInactive=-32096,k.ServerNotInitialized=-32002,k.UnknownErrorCode=-32001,k.jsonrpcReservedErrorRangeEnd=-32e3,k.serverErrorEnd=-32e3;var w=(t=class extends Error{constructor(e,r,n){super(r),this.code=x.number(e)?e:S.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,t.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}},Mn(t,"ResponseError"),t);e.ResponseError=w;var N=(Mn(r=class{constructor(e){this.kind=e}static is(e){return e===r.auto||e===r.byName||e===r.byPosition}toString(){return this.kind}},"ParameterStructures"),r);e.ParameterStructures=N,N.auto=new N("auto"),N.byPosition=new N("byPosition"),N.byName=new N("byName");var _=(Mn(n=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return N.auto}},"AbstractMessageSignature"),n);e.AbstractMessageSignature=_;var I=(Mn(a=class extends _{constructor(e){super(e,0)}},"RequestType0"),a);e.RequestType0=I;var P=(Mn(i=class extends _{constructor(e,t=N.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},"RequestType"),i);e.RequestType=P;var O=(Mn(s=class extends _{constructor(e,t=N.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},"RequestType1"),s);e.RequestType1=O;var L=(Mn(o=class extends _{constructor(e){super(e,2)}},"RequestType2"),o);e.RequestType2=L;var D=(Mn(l=class extends _{constructor(e){super(e,3)}},"RequestType3"),l);e.RequestType3=D;var M=(Mn(u=class extends _{constructor(e){super(e,4)}},"RequestType4"),u);e.RequestType4=M;var j=(Mn(c=class extends _{constructor(e){super(e,5)}},"RequestType5"),c);e.RequestType5=j;var F=(Mn(p=class extends _{constructor(e){super(e,6)}},"RequestType6"),p);e.RequestType6=F;var G=(Mn(d=class extends _{constructor(e){super(e,7)}},"RequestType7"),d);e.RequestType7=G;var z=(Mn(f=class extends _{constructor(e){super(e,8)}},"RequestType8"),f);e.RequestType8=z;var K=(Mn(m=class extends _{constructor(e){super(e,9)}},"RequestType9"),m);e.RequestType9=K;var q=(Mn(h=class extends _{constructor(e,t=N.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},"NotificationType"),h);e.NotificationType=q;var U=(Mn(y=class extends _{constructor(e){super(e,0)}},"NotificationType0"),y);e.NotificationType0=U;var B=(Mn(g=class extends _{constructor(e,t=N.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},"NotificationType1"),g);e.NotificationType1=B;var V=(Mn(v=class extends _{constructor(e){super(e,2)}},"NotificationType2"),v);e.NotificationType2=V;var W=(Mn(T=class extends _{constructor(e){super(e,3)}},"NotificationType3"),T);e.NotificationType3=W;var H=(Mn($=class extends _{constructor(e){super(e,4)}},"NotificationType4"),$);e.NotificationType4=H;var Y=(Mn(R=class extends _{constructor(e){super(e,5)}},"NotificationType5"),R);e.NotificationType5=Y;var X=(Mn(E=class extends _{constructor(e){super(e,6)}},"NotificationType6"),E);e.NotificationType6=X;var Z=(Mn(b=class extends _{constructor(e){super(e,7)}},"NotificationType7"),b);e.NotificationType7=Z;var J=(Mn(A=class extends _{constructor(e){super(e,8)}},"NotificationType8"),A);e.NotificationType8=J;var Q,ee=(Mn(C=class extends _{constructor(e){super(e,9)}},"NotificationType9"),C);e.NotificationType9=ee,function(e){function t(e){const t=e;return t&&x.string(t.method)&&(x.string(t.id)||x.number(t.id))}function r(e){const t=e;return t&&x.string(t.method)&&void 0===e.id}function n(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(x.string(t.id)||x.number(t.id)||null===t.id)}Mn(t,"isRequest"),e.isRequest=t,Mn(r,"isNotification"),e.isNotification=r,Mn(n,"isResponse"),e.isResponse=n}(Q||(e.Message=Q={}))}}),Qn=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){var t,r,n,a,i;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0,(i=a||(e.Touch=a={})).None=0,i.First=1,i.AsOld=i.First,i.Last=2,i.AsNew=i.Last;var s=(t=class{constructor(){this[n]="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(){var e;return null==(e=this._head)?void 0:e.value}get last(){var e;return null==(e=this._tail)?void 0:e.value}has(e){return this._map.has(e)}get(e,t=a.None){const r=this._map.get(e);if(r)return t!==a.None&&this.touch(r,t),r.value}set(e,t,r=a.None){let n=this._map.get(e);if(n)n.value=t,r!==a.None&&this.touch(n,r);else{switch(n={key:e,value:t,next:void 0,previous:void 0},r){case a.None:this.addItemLast(n);break;case a.First:this.addItemFirst(n);break;case a.Last:default:this.addItemLast(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const r=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:Mn(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}},"next")};return r}values(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:Mn(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}},"next")};return r}entries(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:Mn(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}},"next")};return r}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===a.First||t===a.Last)if(t===a.First){if(e===this._head)return;const t=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(t.previous=r,r.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===a.Last){if(e===this._tail)return;const t=e.next,r=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=r,r.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}},Mn(t,"LinkedMap"),t);e.LinkedMap=s;var o=(Mn(r=class extends s{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=a.AsNew){return super.get(e,t)}peek(e){return super.get(e,a.None)}set(e,t){return super.set(e,t,a.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}},"LRUCache"),r);e.LRUCache=o}}),ea=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0,function(e){function t(e){return{dispose:e}}Mn(t,"create"),e.create=t}(t||(e.Disposable=t={}))}}),ta=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){var t,r,n,a;Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var i,s,o=Zn();(s=i||(i={})).Continue=0,s.Cancelled=1;var l=(Mn(t=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=i.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const r=this.buffers.get(t);if(void 0===r)return;const n=new Int32Array(r,0,1);Atomics.store(n,0,i.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}},"SharedArraySenderStrategy"),t);e.SharedArraySenderStrategy=l;var u=(Mn(r=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===i.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},"SharedArrayBufferCancellationToken"),r),c=(Mn(n=class{constructor(e){this.token=new u(e)}cancel(){}dispose(){}},"SharedArrayBufferCancellationTokenSource"),n),p=(Mn(a=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new o.CancellationTokenSource:new c(t)}},"SharedArrayReceiverStrategy"),a);e.SharedArrayReceiverStrategy=p}}),ra=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var r=Hn(),n=(Mn(t=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}},"Semaphore"),t);e.Semaphore=n}}),na=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var n,a=Hn(),i=Yn(),s=Xn(),o=ra();!function(e){function t(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)}Mn(t,"is"),e.is=t}(n||(e.MessageReader=n={}));var l,u=(Mn(t=class{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter,this.partialMessageEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}},"AbstractMessageReader"),t);e.AbstractMessageReader=u,function(e){function t(e){let t,r;const n=new Map;let i;const s=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(r=e.contentDecoder,n.set(r.name,r)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)n.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(i=e.contentTypeDecoder,s.set(i.name,i)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===i&&(i=(0,a.default)().applicationJson.decoder,s.set(i.name,i)),{charset:t,contentDecoder:r,contentDecoders:n,contentTypeDecoder:i,contentTypeDecoders:s}}Mn(t,"fromOptions"),e.fromOptions=t}(l||(l={}));var c=(Mn(r=class extends u{constructor(e,t){super(),this.readable=e,this.options=l.fromOptions(t),this.buffer=(0,a.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new o.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const r=parseInt(t);if(isNaN(r))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=r}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,r=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(r)}).catch(e=>{this.fireError(e)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,a.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}},"ReadableStreamMessageReader"),r);e.ReadableStreamMessageReader=c}}),aa=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var n,a=Hn(),i=Yn(),s=ra(),o=Xn();!function(e){function t(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}Mn(t,"is"),e.is=t}(n||(e.MessageWriter=n={}));var l,u=(Mn(t=class{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}},"AbstractMessageWriter"),t);e.AbstractMessageWriter=u,function(e){function t(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,a.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,a.default)().applicationJson.encoder}}Mn(t,"fromOptions"),e.fromOptions=t}(l||(l={}));var c=(Mn(r=class extends u{constructor(e,t){super(),this.writable=e,this.options=l.fromOptions(t),this.errorCount=0,this.writeSemaphore=new s.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const r=[];return r.push("Content-Length: ",t.byteLength.toString(),"\r\n"),r.push("\r\n"),this.doWrite(e,r,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(n){return this.handleError(n,e),Promise.reject(n)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}},"WriteableStreamMessageWriter"),r);e.WriteableStreamMessageWriter=c}}),ia=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var r=(Mn(t=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,r=0,n=0,a=0;e:for(;r<this._chunks.length;){const e=this._chunks[r];for(n=0;n<e.length;){switch(e[n]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,n++;break e;default:t=0}break;default:t=0}n++}a+=e.byteLength,r++}if(4!==t)return;const i=this._read(a+n),s=new Map,o=this.toString(i,"ascii").split("\r\n");if(o.length<2)return s;for(let l=0;l<o.length-2;l++){const t=o[l],r=t.indexOf(":");if(-1===r)throw new Error(`Message header must separate key and value using ':'\n${t}`);const n=t.substr(0,r),a=t.substr(r+1).trim();s.set(e?n.toLowerCase():n,a)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],r=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,r}const t=this.allocNative(e);let r=0;for(;e>0;){const n=this._chunks[0];if(n.byteLength>e){const a=n.slice(0,e);t.set(a,r),r+=e,this._chunks[0]=n.slice(e),this._totalLength-=e,e-=e}else t.set(n,r),r+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,e-=n.byteLength}return t}},"AbstractMessageBuffer"),t);e.AbstractMessageBuffer=r}}),sa=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){var t,r;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 n,a,i,s=Hn(),o=Yn(),l=Jn(),u=Qn(),c=Xn(),p=Zn();(n||(n={})).type=new l.NotificationType("$/cancelRequest"),function(e){function t(e){return"string"==typeof e||"number"==typeof e}Mn(t,"is"),e.is=t}(a||(e.ProgressToken=a={})),(i||(i={})).type=new l.NotificationType("$/progress");var d,f,m,h,y,g,v,T,$,R,E,b=(Mn(t=class{constructor(){}},"ProgressType"),t);e.ProgressType=b,function(e){function t(e){return o.func(e)}Mn(t,"is"),e.is=t}(d||(d={})),e.NullLogger=Object.freeze({error:Mn(()=>{},"error"),warn:Mn(()=>{},"warn"),info:Mn(()=>{},"info"),log:Mn(()=>{},"log")}),(m=f||(e.Trace=f={}))[m.Off=0]="Off",m[m.Messages=1]="Messages",m[m.Compact=2]="Compact",m[m.Verbose=3]="Verbose",(y=h||(e.TraceValues=h={})).Off="off",y.Messages="messages",y.Compact="compact",y.Verbose="verbose",function(e){function t(t){if(!o.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}}function r(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}Mn(t,"fromString"),e.fromString=t,Mn(r,"toString"),e.toString=r}(f||(e.Trace=f={})),(v=g||(e.TraceFormat=g={})).Text="text",v.JSON="json",function(e){function t(t){return o.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}Mn(t,"fromString"),e.fromString=t}(g||(e.TraceFormat=g={})),(T||(e.SetTraceNotification=T={})).type=new l.NotificationType("$/setTrace"),($||(e.LogTraceNotification=$={})).type=new l.NotificationType("$/logTrace"),(E=R||(e.ConnectionErrors=R={}))[E.Closed=1]="Closed",E[E.Disposed=2]="Disposed",E[E.AlreadyListening=3]="AlreadyListening";var A,C,S,k,x,w,N,_,I,P,O=(r=class extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,r.prototype)}},Mn(r,"ConnectionError"),r);function L(t,r,m,h){const y=void 0!==m?m:e.NullLogger;let v=0,E=0,b=0;const A="2.0";let S;const k=new Map;let x;const _=new Map,P=new Map;let L,D,M=new u.LinkedMap,j=new Map,F=new Set,G=new Map,z=f.Off,K=g.Text,q=I.New;const U=new c.Emitter,B=new c.Emitter,V=new c.Emitter,W=new c.Emitter,H=new c.Emitter,Y=h&&h.cancellationStrategy?h.cancellationStrategy:w.Message;function X(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function Z(e){return null===e?"res-unknown-"+(++b).toString():"res-"+e.toString()}function J(){return"not-"+(++E).toString()}function Q(e,t){l.Message.isRequest(t)?e.set(X(t.id),t):l.Message.isResponse(t)?e.set(Z(t.id),t):e.set(J(),t)}function ee(e){}function te(){return q===I.Listening}function re(){return q===I.Closed}function ne(){return q===I.Disposed}function ae(){q!==I.New&&q!==I.Listening||(q=I.Closed,B.fire(void 0))}function ie(e){U.fire([e,void 0,void 0])}function se(e){U.fire(e)}function oe(){L||0===M.size||(L=(0,s.default)().timer.setImmediate(()=>{L=void 0,ue()}))}function le(e){l.Message.isRequest(e)?pe(e):l.Message.isNotification(e)?fe(e):l.Message.isResponse(e)?de(e):me(e)}function ue(){if(0===M.size)return;const e=M.shift();try{const t=null==h?void 0:h.messageStrategy;N.is(t)?t.handleMessage(e,le):le(e)}finally{oe()}}Mn(X,"createRequestQueueKey"),Mn(Z,"createResponseQueueKey"),Mn(J,"createNotificationQueueKey"),Mn(Q,"addMessageToQueue"),Mn(ee,"cancelUndispatched"),Mn(te,"isListening"),Mn(re,"isClosed"),Mn(ne,"isDisposed"),Mn(ae,"closeHandler"),Mn(ie,"readErrorHandler"),Mn(se,"writeErrorHandler"),t.onClose(ae),t.onError(ie),r.onClose(ae),r.onError(se),Mn(oe,"triggerMessageQueue"),Mn(le,"handleMessage"),Mn(ue,"processMessageQueue");const ce=Mn(e=>{try{if(l.Message.isNotification(e)&&e.method===n.type.method){const t=e.params.id,n=X(t),a=M.get(n);if(l.Message.isRequest(a)){const i=null==h?void 0:h.connectionStrategy,s=i&&i.cancelUndispatched?i.cancelUndispatched(a,ee):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return M.delete(n),G.delete(t),s.id=a.id,ve(s,e.method,Date.now()),void r.write(s).catch(()=>y.error("Sending response for canceled message failed."))}const i=G.get(t);if(void 0!==i)return i.cancel(),void $e(e);F.add(t)}Q(M,e)}finally{oe()}},"callback");function pe(e){if(ne())return;function t(t,n,a){const i={jsonrpc:A,id:e.id};t instanceof l.ResponseError?i.error=t.toJson():i.result=void 0===t?null:t,ve(i,n,a),r.write(i).catch(()=>y.error("Sending response failed."))}function n(t,n,a){const i={jsonrpc:A,id:e.id,error:t.toJson()};ve(i,n,a),r.write(i).catch(()=>y.error("Sending response failed."))}function a(t,n,a){void 0===t&&(t=null);const i={jsonrpc:A,id:e.id,result:t};ve(i,n,a),r.write(i).catch(()=>y.error("Sending response failed."))}Mn(t,"reply"),Mn(n,"replyError"),Mn(a,"replySuccess"),Te(e);const i=k.get(e.method);let s,u;i&&(s=i.type,u=i.handler);const c=Date.now();if(u||S){const r=e.id??String(Date.now()),i=C.is(Y.receiver)?Y.receiver.createCancellationTokenSource(r):Y.receiver.createCancellationTokenSource(e);null!==e.id&&F.has(e.id)&&i.cancel(),null!==e.id&&G.set(r,i);try{let p;if(u)if(void 0===e.params){if(void 0!==s&&0!==s.numberOfParams)return void n(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${e.method} defines ${s.numberOfParams} params but received none.`),e.method,c);p=u(i.token)}else if(Array.isArray(e.params)){if(void 0!==s&&s.parameterStructures===l.ParameterStructures.byName)return void n(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,c);p=u(...e.params,i.token)}else{if(void 0!==s&&s.parameterStructures===l.ParameterStructures.byPosition)return void n(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,c);p=u(e.params,i.token)}else S&&(p=S(e.method,e.params,i.token));const d=p;p?d.then?d.then(n=>{G.delete(r),t(n,e.method,c)},t=>{G.delete(r),t instanceof l.ResponseError?n(t,e.method,c):t&&o.string(t.message)?n(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,c):n(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}):(G.delete(r),t(p,e.method,c)):(G.delete(r),a(p,e.method,c))}catch(p){G.delete(r),p instanceof l.ResponseError?t(p,e.method,c):p&&o.string(p.message)?n(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${p.message}`),e.method,c):n(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}}else n(new l.ResponseError(l.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,c)}function de(e){if(!ne())if(null===e.id)e.error?y.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):y.error("Received response message without id. No further error information provided.");else{const r=e.id,n=j.get(r);if(Re(e,n),void 0!==n){j.delete(r);try{if(e.error){const t=e.error;n.reject(new l.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(t){t.message?y.error(`Response handler '${n.method}' failed with message: ${t.message}`):y.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}function fe(e){if(ne())return;let t,r;if(e.method===n.type.method){const t=e.params.id;return F.delete(t),void $e(e)}{const n=_.get(e.method);n&&(r=n.handler,t=n.type)}if(r||x)try{if($e(e),r)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==l.ParameterStructures.byName&&y.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),r();else if(Array.isArray(e.params)){const n=e.params;e.method===i.type.method&&2===n.length&&a.is(n[0])?r({token:n[0],value:n[1]}):(void 0!==t&&(t.parameterStructures===l.ParameterStructures.byName&&y.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&y.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${n.length} arguments`)),r(...n))}else void 0!==t&&t.parameterStructures===l.ParameterStructures.byPosition&&y.error(`Notification ${e.method} defines parameters by position but received parameters by name`),r(e.params);else x&&x(e.method,e.params)}catch(s){s.message?y.error(`Notification handler '${e.method}' failed with message: ${s.message}`):y.error(`Notification handler '${e.method}' failed unexpectedly.`)}else V.fire(e)}function me(e){if(!e)return void y.error("Received empty message.");y.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(o.string(t.id)||o.number(t.id)){const e=t.id,r=j.get(e);r&&r.reject(new Error("The received response has neither a result nor an error property."))}}function he(e){if(null!=e)switch(z){case f.Verbose:return JSON.stringify(e,null,4);case f.Compact:return JSON.stringify(e);default:return}}function ye(e){if(z!==f.Off&&D)if(K===g.Text){let t;z!==f.Verbose&&z!==f.Compact||!e.params||(t=`Params: ${he(e.params)}\n\n`),D.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Ee("send-request",e)}function ge(e){if(z!==f.Off&&D)if(K===g.Text){let t;z!==f.Verbose&&z!==f.Compact||(t=e.params?`Params: ${he(e.params)}\n\n`:"No parameters provided.\n\n"),D.log(`Sending notification '${e.method}'.`,t)}else Ee("send-notification",e)}function ve(e,t,r){if(z!==f.Off&&D)if(K===g.Text){let n;z!==f.Verbose&&z!==f.Compact||(e.error&&e.error.data?n=`Error data: ${he(e.error.data)}\n\n`:e.result?n=`Result: ${he(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),D.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-r}ms`,n)}else Ee("send-response",e)}function Te(e){if(z!==f.Off&&D)if(K===g.Text){let t;z!==f.Verbose&&z!==f.Compact||!e.params||(t=`Params: ${he(e.params)}\n\n`),D.log(`Received request '${e.method} - (${e.id})'.`,t)}else Ee("receive-request",e)}function $e(e){if(z!==f.Off&&D&&e.method!==$.type.method)if(K===g.Text){let t;z!==f.Verbose&&z!==f.Compact||(t=e.params?`Params: ${he(e.params)}\n\n`:"No parameters provided.\n\n"),D.log(`Received notification '${e.method}'.`,t)}else Ee("receive-notification",e)}function Re(e,t){if(z!==f.Off&&D)if(K===g.Text){let r;if(z!==f.Verbose&&z!==f.Compact||(e.error&&e.error.data?r=`Error data: ${he(e.error.data)}\n\n`:e.result?r=`Result: ${he(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),t){const n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";D.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,r)}else D.log(`Received response ${e.id} without active response promise.`,r)}else Ee("receive-response",e)}function Ee(e,t){if(!D||z===f.Off)return;const r={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};D.log(r)}function be(){if(re())throw new O(R.Closed,"Connection is closed.");if(ne())throw new O(R.Disposed,"Connection is disposed.")}function Ae(){if(te())throw new O(R.AlreadyListening,"Connection is already listening")}function Ce(){if(!te())throw new Error("Call listen() first.")}function Se(e){return void 0===e?null:e}function ke(e){return null===e?void 0:e}function xe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function we(e,t){switch(e){case l.ParameterStructures.auto:return xe(t)?ke(t):[Se(t)];case l.ParameterStructures.byName:if(!xe(t))throw new Error("Received parameters by name but param is not an object literal.");return ke(t);case l.ParameterStructures.byPosition:return[Se(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function Ne(e,t){let r;const n=e.numberOfParams;switch(n){case 0:r=void 0;break;case 1:r=we(e.parameterStructures,t[0]);break;default:r=[];for(let e=0;e<t.length&&e<n;e++)r.push(Se(t[e]));if(t.length<n)for(let e=t.length;e<n;e++)r.push(null)}return r}Mn(pe,"handleRequest"),Mn(de,"handleResponse"),Mn(fe,"handleNotification"),Mn(me,"handleInvalidMessage"),Mn(he,"stringifyTrace"),Mn(ye,"traceSendingRequest"),Mn(ge,"traceSendingNotification"),Mn(ve,"traceSendingResponse"),Mn(Te,"traceReceivedRequest"),Mn($e,"traceReceivedNotification"),Mn(Re,"traceReceivedResponse"),Mn(Ee,"logLSPMessage"),Mn(be,"throwIfClosedOrDisposed"),Mn(Ae,"throwIfListening"),Mn(Ce,"throwIfNotListening"),Mn(Se,"undefinedToNull"),Mn(ke,"nullToUndefined"),Mn(xe,"isNamedParam"),Mn(we,"computeSingleParam"),Mn(Ne,"computeMessageParams");const _e={sendNotification:Mn((e,...t)=>{let n,a;if(be(),o.string(e)){n=e;const r=t[0];let i=0,s=l.ParameterStructures.auto;l.ParameterStructures.is(r)&&(i=1,s=r);let o=t.length;const u=o-i;switch(u){case 0:a=void 0;break;case 1:a=we(s,t[i]);break;default:if(s===l.ParameterStructures.byName)throw new Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);a=t.slice(i,o).map(e=>Se(e))}}else{const r=t;n=e.method,a=Ne(e,r)}const i={jsonrpc:A,method:n,params:a};return ge(i),r.write(i).catch(e=>{throw y.error("Sending notification failed."),e})},"sendNotification"),onNotification:Mn((e,t)=>{let r;return be(),o.func(e)?x=e:t&&(o.string(e)?(r=e,_.set(e,{type:void 0,handler:t})):(r=e.method,_.set(e.method,{type:e,handler:t}))),{dispose:Mn(()=>{void 0!==r?_.delete(r):x=void 0},"dispose")}},"onNotification"),onProgress:Mn((e,t,r)=>{if(P.has(t))throw new Error(`Progress handler for token ${t} already registered`);return P.set(t,r),{dispose:Mn(()=>{P.delete(t)},"dispose")}},"onProgress"),sendProgress:Mn((e,t,r)=>_e.sendNotification(i.type,{token:t,value:r}),"sendProgress"),onUnhandledProgress:W.event,sendRequest:Mn((e,...t)=>{let n,a,i;if(be(),Ce(),o.string(e)){n=e;const r=t[0],s=t[t.length-1];let o=0,u=l.ParameterStructures.auto;l.ParameterStructures.is(r)&&(o=1,u=r);let c=t.length;p.CancellationToken.is(s)&&(c-=1,i=s);const d=c-o;switch(d){case 0:a=void 0;break;case 1:a=we(u,t[o]);break;default:if(u===l.ParameterStructures.byName)throw new Error(`Received ${d} parameters for 'by Name' request parameter structure.`);a=t.slice(o,c).map(e=>Se(e))}}else{const r=t;n=e.method,a=Ne(e,r);const s=e.numberOfParams;i=p.CancellationToken.is(r[s])?r[s]:void 0}const s=v++;let u;i&&(u=i.onCancellationRequested(()=>{const e=Y.sender.sendCancellation(_e,s);return void 0===e?(y.log(`Received no promise from cancellation strategy when cancelling id ${s}`),Promise.resolve()):e.catch(()=>{y.log(`Sending cancellation messages for id ${s} failed`)})}));const c={jsonrpc:A,id:s,method:n,params:a};return ye(c),"function"==typeof Y.sender.enableCancellation&&Y.sender.enableCancellation(c),new Promise(async(e,t)=>{const a=Mn(t=>{e(t),Y.sender.cleanup(s),null==u||u.dispose()},"resolveWithCleanup"),i=Mn(e=>{t(e),Y.sender.cleanup(s),null==u||u.dispose()},"rejectWithCleanup"),o={method:n,timerStart:Date.now(),resolve:a,reject:i};try{await r.write(c),j.set(s,o)}catch(p){throw y.error("Sending request failed."),o.reject(new l.ResponseError(l.ErrorCodes.MessageWriteError,p.message?p.message:"Unknown reason")),p}})},"sendRequest"),onRequest:Mn((e,t)=>{be();let r=null;return d.is(e)?(r=void 0,S=e):o.string(e)?(r=null,void 0!==t&&(r=e,k.set(e,{handler:t,type:void 0}))):void 0!==t&&(r=e.method,k.set(e.method,{type:e,handler:t})),{dispose:Mn(()=>{null!==r&&(void 0!==r?k.delete(r):S=void 0)},"dispose")}},"onRequest"),hasPendingResponse:Mn(()=>j.size>0,"hasPendingResponse"),trace:Mn(async(e,t,r)=>{let n=!1,a=g.Text;void 0!==r&&(o.boolean(r)?n=r:(n=r.sendNotification||!1,a=r.traceFormat||g.Text)),z=e,K=a,D=z===f.Off?void 0:t,!n||re()||ne()||await _e.sendNotification(T.type,{value:f.toString(e)})},"trace"),onError:U.event,onClose:B.event,onUnhandledNotification:V.event,onDispose:H.event,end:Mn(()=>{r.end()},"end"),dispose:Mn(()=>{if(ne())return;q=I.Disposed,H.fire(void 0);const e=new l.ResponseError(l.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const t of j.values())t.reject(e);j=new Map,G=new Map,F=new Set,M=new u.LinkedMap,o.func(r.dispose)&&r.dispose(),o.func(t.dispose)&&t.dispose()},"dispose"),listen:Mn(()=>{be(),Ae(),q=I.Listening,t.listen(ce)},"listen"),inspect:Mn(()=>{(0,s.default)().console.log("inspect")},"inspect")};return _e.onNotification($.type,e=>{if(z===f.Off||!D)return;const t=z===f.Verbose||z===f.Compact;D.log(e.message,t?e.verbose:void 0)}),_e.onNotification(i.type,e=>{const t=P.get(e.token);t?t(e.value):W.fire(e)}),_e}e.ConnectionError=O,function(e){function t(e){const t=e;return t&&o.func(t.cancelUndispatched)}Mn(t,"is"),e.is=t}(A||(e.ConnectionStrategy=A={})),function(e){function t(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}Mn(t,"is"),e.is=t}(C||(e.IdCancellationReceiverStrategy=C={})),function(e){function t(e){const t=e;return t&&"request"===t.kind&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}Mn(t,"is"),e.is=t}(S||(e.RequestCancellationReceiverStrategy=S={})),function(e){function t(e){return C.is(e)||S.is(e)}e.Message=Object.freeze({createCancellationTokenSource:e=>new p.CancellationTokenSource}),Mn(t,"is"),e.is=t}(k||(e.CancellationReceiverStrategy=k={})),function(e){function t(e){const t=e;return t&&o.func(t.sendCancellation)&&o.func(t.cleanup)}e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(n.type,{id:t}),cleanup(e){}}),Mn(t,"is"),e.is=t}(x||(e.CancellationSenderStrategy=x={})),function(e){function t(e){const t=e;return t&&k.is(t.receiver)&&x.is(t.sender)}e.Message=Object.freeze({receiver:k.Message,sender:x.Message}),Mn(t,"is"),e.is=t}(w||(e.CancellationStrategy=w={})),function(e){function t(e){const t=e;return t&&o.func(t.handleMessage)}Mn(t,"is"),e.is=t}(N||(e.MessageStrategy=N={})),function(e){function t(e){const t=e;return t&&(w.is(t.cancellationStrategy)||A.is(t.connectionStrategy)||N.is(t.messageStrategy))}Mn(t,"is"),e.is=t}(_||(e.ConnectionOptions=_={})),(P=I||(I={}))[P.New=1]="New",P[P.Listening=2]="Listening",P[P.Closed=3]="Closed",P[P.Disposed=4]="Disposed",Mn(L,"createMessageConnection"),e.createMessageConnection=L}}),oa=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){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=Jn();Object.defineProperty(e,"Message",{enumerable:!0,get:Mn(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:Mn(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:Mn(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:Mn(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:Mn(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:Mn(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:Mn(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:Mn(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:Mn(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:Mn(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:Mn(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:Mn(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:Mn(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:Mn(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:Mn(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:Mn(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:Mn(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:Mn(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:Mn(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:Mn(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:Mn(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:Mn(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:Mn(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:Mn(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:Mn(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:Mn(function(){return t.ParameterStructures},"get")});var r=Qn();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:Mn(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:Mn(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:Mn(function(){return r.Touch},"get")});var n=ea();Object.defineProperty(e,"Disposable",{enumerable:!0,get:Mn(function(){return n.Disposable},"get")});var a=Xn();Object.defineProperty(e,"Event",{enumerable:!0,get:Mn(function(){return a.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:Mn(function(){return a.Emitter},"get")});var i=Zn();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:Mn(function(){return i.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:Mn(function(){return i.CancellationToken},"get")});var s=ta();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:Mn(function(){return s.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:Mn(function(){return s.SharedArrayReceiverStrategy},"get")});var o=na();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:Mn(function(){return o.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:Mn(function(){return o.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:Mn(function(){return o.ReadableStreamMessageReader},"get")});var l=aa();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:Mn(function(){return l.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:Mn(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:Mn(function(){return l.WriteableStreamMessageWriter},"get")});var u=ia();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:Mn(function(){return u.AbstractMessageBuffer},"get")});var c=sa();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:Mn(function(){return c.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:Mn(function(){return c.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:Mn(function(){return c.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:Mn(function(){return c.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:Mn(function(){return c.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:Mn(function(){return c.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:Mn(function(){return c.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:Mn(function(){return c.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:Mn(function(){return c.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:Mn(function(){return c.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:Mn(function(){return c.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:Mn(function(){return c.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:Mn(function(){return c.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:Mn(function(){return c.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:Mn(function(){return c.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:Mn(function(){return c.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:Mn(function(){return c.MessageStrategy},"get")});var p=Hn();e.RAL=p.default}}),la=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){var t,r,n;Object.defineProperty(e,"__esModule",{value:!0});var a=oa(),i=(t=class extends a.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return t.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}},Mn(t,"MessageBuffer"),t);i.emptyBuffer=new Uint8Array(0);var s=(Mn(r=class{constructor(e){this.socket=e,this._onData=new a.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,a.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),a.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),a.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),a.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}},"ReadableStreamWrapper"),r),o=(Mn(n=class{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),a.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),a.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),a.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},"WritableStreamWrapper"),n),l=new TextEncoder,u=Object.freeze({messageBuffer:Object.freeze({create:Mn(e=>new i(e),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:Mn((e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(l.encode(JSON.stringify(e,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:Mn((e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))},"decode")})}),stream:Object.freeze({asReadableStream:Mn(e=>new s(e),"asReadableStream"),asWritableStream:Mn(e=>new o(e),"asWritableStream")}),console:console,timer:Object.freeze({setTimeout(e,t,...r){const n=setTimeout(e,t,...r);return{dispose:Mn(()=>clearTimeout(n),"dispose")}},setImmediate(e,...t){const r=setTimeout(e,0,...t);return{dispose:Mn(()=>clearTimeout(r),"dispose")}},setInterval(e,t,...r){const n=setInterval(e,t,...r);return{dispose:Mn(()=>clearInterval(n),"dispose")}}})});function c(){return u}Mn(c,"RIL"),function(e){function t(){a.RAL.install(u)}Mn(t,"install"),e.install=t}(c||(c={})),e.default=c}}),ua=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){var t,r,n=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:Mn(function(){return t[r]},"get")}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,la().default.install();var i=oa();a(oa(),e);var s=(t=class extends i.AbstractMessageReader{constructor(e){super(),this._onData=new i.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}},Mn(t,"BrowserMessageReader"),t);e.BrowserMessageReader=s;var o=(r=class extends i.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}},Mn(r,"BrowserMessageWriter"),r);function l(e,t,r,n){return void 0===r&&(r=i.NullLogger),i.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,i.createMessageConnection)(e,t,r,n)}e.BrowserMessageWriter=o,Mn(l,"createMessageConnection"),e.createMessageConnection=l}}),ca=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=ua()}}),pa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){var t,r,n,a,i;Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var s,o,l=ua();(o=s||(e.MessageDirection=s={})).clientToServer="clientToServer",o.serverToClient="serverToClient",o.both="both";var u=(Mn(t=class{constructor(e){this.method=e}},"RegistrationType"),t);e.RegistrationType=u;var c=(r=class extends l.RequestType0{constructor(e){super(e)}},Mn(r,"ProtocolRequestType0"),r);e.ProtocolRequestType0=c;var p=(n=class extends l.RequestType{constructor(e){super(e,l.ParameterStructures.byName)}},Mn(n,"ProtocolRequestType"),n);e.ProtocolRequestType=p;var d=(a=class extends l.NotificationType0{constructor(e){super(e)}},Mn(a,"ProtocolNotificationType0"),a);e.ProtocolNotificationType0=d;var f=(i=class extends l.NotificationType{constructor(e){super(e,l.ParameterStructures.byName)}},Mn(i,"ProtocolNotificationType"),i);e.ProtocolNotificationType=f}}),da=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function n(e){return"number"==typeof e||e instanceof Number}function a(e){return e instanceof Error}function i(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}function l(e,t){return Array.isArray(e)&&e.every(t)}function u(e){return null!==e&&"object"==typeof e}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,Mn(t,"boolean"),e.boolean=t,Mn(r,"string"),e.string=r,Mn(n,"number"),e.number=n,Mn(a,"error"),e.error=a,Mn(i,"func"),e.func=i,Mn(s,"array"),e.array=s,Mn(o,"stringArray"),e.stringArray=o,Mn(l,"typedArray"),e.typedArray=l,Mn(u,"objectLiteral"),e.objectLiteral=u}}),fa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t,r,n=pa();(r=t||(e.ImplementationRequest=t={})).method="textDocument/implementation",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),ma=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t,r,n=pa();(r=t||(e.TypeDefinitionRequest=t={})).method="textDocument/typeDefinition",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),ha=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t,r,n,a,i=pa();(r=t||(e.WorkspaceFoldersRequest=t={})).method="workspace/workspaceFolders",r.messageDirection=i.MessageDirection.serverToClient,r.type=new i.ProtocolRequestType0(r.method),(a=n||(e.DidChangeWorkspaceFoldersNotification=n={})).method="workspace/didChangeWorkspaceFolders",a.messageDirection=i.MessageDirection.clientToServer,a.type=new i.ProtocolNotificationType(a.method)}}),ya=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t,r,n=pa();(r=t||(e.ConfigurationRequest=t={})).method="workspace/configuration",r.messageDirection=n.MessageDirection.serverToClient,r.type=new n.ProtocolRequestType(r.method)}}),ga=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t,r,n,a,i=pa();(r=t||(e.DocumentColorRequest=t={})).method="textDocument/documentColor",r.messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),(a=n||(e.ColorPresentationRequest=n={})).method="textDocument/colorPresentation",a.messageDirection=i.MessageDirection.clientToServer,a.type=new i.ProtocolRequestType(a.method)}}),va=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t,r,n,a,i=pa();(r=t||(e.FoldingRangeRequest=t={})).method="textDocument/foldingRange",r.messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),(a=n||(e.FoldingRangeRefreshRequest=n={})).method="workspace/foldingRange/refresh",a.messageDirection=i.MessageDirection.serverToClient,a.type=new i.ProtocolRequestType0(a.method)}}),Ta=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t,r,n=pa();(r=t||(e.DeclarationRequest=t={})).method="textDocument/declaration",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),$a=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t,r,n=pa();(r=t||(e.SelectionRangeRequest=t={})).method="textDocument/selectionRange",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),Ra=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t,r,n,a,i,s=ua(),o=pa();!function(e){function t(t){return t===e.type}e.type=new s.ProgressType,Mn(t,"is"),e.is=t}(t||(e.WorkDoneProgress=t={})),(n=r||(e.WorkDoneProgressCreateRequest=r={})).method="window/workDoneProgress/create",n.messageDirection=o.MessageDirection.serverToClient,n.type=new o.ProtocolRequestType(n.method),(i=a||(e.WorkDoneProgressCancelNotification=a={})).method="window/workDoneProgress/cancel",i.messageDirection=o.MessageDirection.clientToServer,i.type=new o.ProtocolNotificationType(i.method)}}),Ea=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t,r,n,a,i,s,o=pa();(r=t||(e.CallHierarchyPrepareRequest=t={})).method="textDocument/prepareCallHierarchy",r.messageDirection=o.MessageDirection.clientToServer,r.type=new o.ProtocolRequestType(r.method),(a=n||(e.CallHierarchyIncomingCallsRequest=n={})).method="callHierarchy/incomingCalls",a.messageDirection=o.MessageDirection.clientToServer,a.type=new o.ProtocolRequestType(a.method),(s=i||(e.CallHierarchyOutgoingCallsRequest=i={})).method="callHierarchy/outgoingCalls",s.messageDirection=o.MessageDirection.clientToServer,s.type=new o.ProtocolRequestType(s.method)}}),ba=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t,r,n,a,i,s,o,l,u,c,p,d=pa();(t||(e.TokenFormat=t={})).Relative="relative",(n=r||(e.SemanticTokensRegistrationType=r={})).method="textDocument/semanticTokens",n.type=new d.RegistrationType(n.method),(i=a||(e.SemanticTokensRequest=a={})).method="textDocument/semanticTokens/full",i.messageDirection=d.MessageDirection.clientToServer,i.type=new d.ProtocolRequestType(i.method),i.registrationMethod=r.method,(o=s||(e.SemanticTokensDeltaRequest=s={})).method="textDocument/semanticTokens/full/delta",o.messageDirection=d.MessageDirection.clientToServer,o.type=new d.ProtocolRequestType(o.method),o.registrationMethod=r.method,(u=l||(e.SemanticTokensRangeRequest=l={})).method="textDocument/semanticTokens/range",u.messageDirection=d.MessageDirection.clientToServer,u.type=new d.ProtocolRequestType(u.method),u.registrationMethod=r.method,(p=c||(e.SemanticTokensRefreshRequest=c={})).method="workspace/semanticTokens/refresh",p.messageDirection=d.MessageDirection.serverToClient,p.type=new d.ProtocolRequestType0(p.method)}}),Aa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t,r,n=pa();(r=t||(e.ShowDocumentRequest=t={})).method="window/showDocument",r.messageDirection=n.MessageDirection.serverToClient,r.type=new n.ProtocolRequestType(r.method)}}),Ca=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t,r,n=pa();(r=t||(e.LinkedEditingRangeRequest=t={})).method="textDocument/linkedEditingRange",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),Sa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t,r,n,a,i,s,o,l,u,c,p,d,f,m,h=pa();(r=t||(e.FileOperationPatternKind=t={})).file="file",r.folder="folder",(a=n||(e.WillCreateFilesRequest=n={})).method="workspace/willCreateFiles",a.messageDirection=h.MessageDirection.clientToServer,a.type=new h.ProtocolRequestType(a.method),(s=i||(e.DidCreateFilesNotification=i={})).method="workspace/didCreateFiles",s.messageDirection=h.MessageDirection.clientToServer,s.type=new h.ProtocolNotificationType(s.method),(l=o||(e.WillRenameFilesRequest=o={})).method="workspace/willRenameFiles",l.messageDirection=h.MessageDirection.clientToServer,l.type=new h.ProtocolRequestType(l.method),(c=u||(e.DidRenameFilesNotification=u={})).method="workspace/didRenameFiles",c.messageDirection=h.MessageDirection.clientToServer,c.type=new h.ProtocolNotificationType(c.method),(d=p||(e.DidDeleteFilesNotification=p={})).method="workspace/didDeleteFiles",d.messageDirection=h.MessageDirection.clientToServer,d.type=new h.ProtocolNotificationType(d.method),(m=f||(e.WillDeleteFilesRequest=f={})).method="workspace/willDeleteFiles",m.messageDirection=h.MessageDirection.clientToServer,m.type=new h.ProtocolRequestType(m.method)}}),ka=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t,r,n,a,i,s,o=pa();(r=t||(e.UniquenessLevel=t={})).document="document",r.project="project",r.group="group",r.scheme="scheme",r.global="global",(a=n||(e.MonikerKind=n={})).$import="import",a.$export="export",a.local="local",(s=i||(e.MonikerRequest=i={})).method="textDocument/moniker",s.messageDirection=o.MessageDirection.clientToServer,s.type=new o.ProtocolRequestType(s.method)}}),xa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t,r,n,a,i,s,o=pa();(r=t||(e.TypeHierarchyPrepareRequest=t={})).method="textDocument/prepareTypeHierarchy",r.messageDirection=o.MessageDirection.clientToServer,r.type=new o.ProtocolRequestType(r.method),(a=n||(e.TypeHierarchySupertypesRequest=n={})).method="typeHierarchy/supertypes",a.messageDirection=o.MessageDirection.clientToServer,a.type=new o.ProtocolRequestType(a.method),(s=i||(e.TypeHierarchySubtypesRequest=i={})).method="typeHierarchy/subtypes",s.messageDirection=o.MessageDirection.clientToServer,s.type=new o.ProtocolRequestType(s.method)}}),wa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t,r,n,a,i=pa();(r=t||(e.InlineValueRequest=t={})).method="textDocument/inlineValue",r.messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),(a=n||(e.InlineValueRefreshRequest=n={})).method="workspace/inlineValue/refresh",a.messageDirection=i.MessageDirection.serverToClient,a.type=new i.ProtocolRequestType0(a.method)}}),Na=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t,r,n,a,i,s,o=pa();(r=t||(e.InlayHintRequest=t={})).method="textDocument/inlayHint",r.messageDirection=o.MessageDirection.clientToServer,r.type=new o.ProtocolRequestType(r.method),(a=n||(e.InlayHintResolveRequest=n={})).method="inlayHint/resolve",a.messageDirection=o.MessageDirection.clientToServer,a.type=new o.ProtocolRequestType(a.method),(s=i||(e.InlayHintRefreshRequest=i={})).method="workspace/inlayHint/refresh",s.messageDirection=o.MessageDirection.serverToClient,s.type=new o.ProtocolRequestType0(s.method)}}),_a=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t,r,n,a,i,s,o,l,u,c=ua(),p=da(),d=pa();!function(e){function t(e){const t=e;return t&&p.boolean(t.retriggerRequest)}Mn(t,"is"),e.is=t}(t||(e.DiagnosticServerCancellationData=t={})),(n=r||(e.DocumentDiagnosticReportKind=r={})).Full="full",n.Unchanged="unchanged",(i=a||(e.DocumentDiagnosticRequest=a={})).method="textDocument/diagnostic",i.messageDirection=d.MessageDirection.clientToServer,i.type=new d.ProtocolRequestType(i.method),i.partialResult=new c.ProgressType,(o=s||(e.WorkspaceDiagnosticRequest=s={})).method="workspace/diagnostic",o.messageDirection=d.MessageDirection.clientToServer,o.type=new d.ProtocolRequestType(o.method),o.partialResult=new c.ProgressType,(u=l||(e.DiagnosticRefreshRequest=l={})).method="workspace/diagnostic/refresh",u.messageDirection=d.MessageDirection.serverToClient,u.type=new d.ProtocolRequestType0(u.method)}}),Ia=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){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,r,n,a,i,s,o,l,u,c,p,d,f,m,h,y=(Wn(),qn(Un)),g=da(),v=pa();!function(e){function t(e){return 1===e||2===e}e.Markup=1,e.Code=2,Mn(t,"is"),e.is=t}(t||(e.NotebookCellKind=t={})),function(e){function t(e,t){const r={executionOrder:e};return!0!==t&&!1!==t||(r.success=t),r}function r(e){const t=e;return g.objectLiteral(t)&&y.uinteger.is(t.executionOrder)&&(void 0===t.success||g.boolean(t.success))}function n(e,t){return e===t||null!=e&&null!=t&&(e.executionOrder===t.executionOrder&&e.success===t.success)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r,Mn(n,"equals"),e.equals=n}(r||(e.ExecutionSummary=r={})),function(e){function n(e,t){return{kind:e,document:t}}function a(e){const r=e;return g.objectLiteral(r)&&t.is(r.kind)&&y.DocumentUri.is(r.document)&&(void 0===r.metadata||g.objectLiteral(r.metadata))}function i(e,t){const n=new Set;return e.document!==t.document&&n.add("document"),e.kind!==t.kind&&n.add("kind"),e.executionSummary!==t.executionSummary&&n.add("executionSummary"),void 0===e.metadata&&void 0===t.metadata||s(e.metadata,t.metadata)||n.add("metadata"),void 0===e.executionSummary&&void 0===t.executionSummary||r.equals(e.executionSummary,t.executionSummary)||n.add("executionSummary"),n}function s(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),n=Array.isArray(t);if(r!==n)return!1;if(r&&n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!s(e[r],t[r]))return!1}if(g.objectLiteral(e)&&g.objectLiteral(t)){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;if(r.sort(),n.sort(),!s(r,n))return!1;for(let a=0;a<r.length;a++){const n=r[a];if(!s(e[n],t[n]))return!1}}return!0}Mn(n,"create"),e.create=n,Mn(a,"is"),e.is=a,Mn(i,"diff"),e.diff=i,Mn(s,"equalsMetadata")}(n||(e.NotebookCell=n={})),function(e){function t(e,t,r,n){return{uri:e,notebookType:t,version:r,cells:n}}function r(e){const t=e;return g.objectLiteral(t)&&g.string(t.uri)&&y.integer.is(t.version)&&g.typedArray(t.cells,n.is)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(a||(e.NotebookDocument=a={})),(s=i||(e.NotebookDocumentSyncRegistrationType=i={})).method="notebookDocument/sync",s.messageDirection=v.MessageDirection.clientToServer,s.type=new v.RegistrationType(s.method),(l=o||(e.DidOpenNotebookDocumentNotification=o={})).method="notebookDocument/didOpen",l.messageDirection=v.MessageDirection.clientToServer,l.type=new v.ProtocolNotificationType(l.method),l.registrationMethod=i.method,function(e){function t(e){const t=e;return g.objectLiteral(t)&&y.uinteger.is(t.start)&&y.uinteger.is(t.deleteCount)&&(void 0===t.cells||g.typedArray(t.cells,n.is))}function r(e,t,r){const n={start:e,deleteCount:t};return void 0!==r&&(n.cells=r),n}Mn(t,"is"),e.is=t,Mn(r,"create"),e.create=r}(u||(e.NotebookCellArrayChange=u={})),(p=c||(e.DidChangeNotebookDocumentNotification=c={})).method="notebookDocument/didChange",p.messageDirection=v.MessageDirection.clientToServer,p.type=new v.ProtocolNotificationType(p.method),p.registrationMethod=i.method,(f=d||(e.DidSaveNotebookDocumentNotification=d={})).method="notebookDocument/didSave",f.messageDirection=v.MessageDirection.clientToServer,f.type=new v.ProtocolNotificationType(f.method),f.registrationMethod=i.method,(h=m||(e.DidCloseNotebookDocumentNotification=m={})).method="notebookDocument/didClose",h.messageDirection=v.MessageDirection.clientToServer,h.type=new v.ProtocolNotificationType(h.method),h.registrationMethod=i.method}}),Pa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;var t,r,n=pa();(r=t||(e.InlineCompletionRequest=t={})).method="textDocument/inlineCompletion",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),Oa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=pa(),r=(Wn(),qn(Un)),n=da(),a=fa();Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:Mn(function(){return a.ImplementationRequest},"get")});var i=ma();Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:Mn(function(){return i.TypeDefinitionRequest},"get")});var s=ha();Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:Mn(function(){return s.WorkspaceFoldersRequest},"get")}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:Mn(function(){return s.DidChangeWorkspaceFoldersNotification},"get")});var o=ya();Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:Mn(function(){return o.ConfigurationRequest},"get")});var l=ga();Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:Mn(function(){return l.DocumentColorRequest},"get")}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:Mn(function(){return l.ColorPresentationRequest},"get")});var u=va();Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:Mn(function(){return u.FoldingRangeRequest},"get")}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:Mn(function(){return u.FoldingRangeRefreshRequest},"get")});var c=Ta();Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:Mn(function(){return c.DeclarationRequest},"get")});var p=$a();Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:Mn(function(){return p.SelectionRangeRequest},"get")});var d=Ra();Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:Mn(function(){return d.WorkDoneProgress},"get")}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:Mn(function(){return d.WorkDoneProgressCreateRequest},"get")}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:Mn(function(){return d.WorkDoneProgressCancelNotification},"get")});var f=Ea();Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:Mn(function(){return f.CallHierarchyIncomingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:Mn(function(){return f.CallHierarchyOutgoingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:Mn(function(){return f.CallHierarchyPrepareRequest},"get")});var m=ba();Object.defineProperty(e,"TokenFormat",{enumerable:!0,get:Mn(function(){return m.TokenFormat},"get")}),Object.defineProperty(e,"SemanticTokensRequest",{enumerable:!0,get:Mn(function(){return m.SemanticTokensRequest},"get")}),Object.defineProperty(e,"SemanticTokensDeltaRequest",{enumerable:!0,get:Mn(function(){return m.SemanticTokensDeltaRequest},"get")}),Object.defineProperty(e,"SemanticTokensRangeRequest",{enumerable:!0,get:Mn(function(){return m.SemanticTokensRangeRequest},"get")}),Object.defineProperty(e,"SemanticTokensRefreshRequest",{enumerable:!0,get:Mn(function(){return m.SemanticTokensRefreshRequest},"get")}),Object.defineProperty(e,"SemanticTokensRegistrationType",{enumerable:!0,get:Mn(function(){return m.SemanticTokensRegistrationType},"get")});var h=Aa();Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:Mn(function(){return h.ShowDocumentRequest},"get")});var y=Ca();Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:Mn(function(){return y.LinkedEditingRangeRequest},"get")});var g=Sa();Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:Mn(function(){return g.FileOperationPatternKind},"get")}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:Mn(function(){return g.DidCreateFilesNotification},"get")}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:Mn(function(){return g.WillCreateFilesRequest},"get")}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:Mn(function(){return g.DidRenameFilesNotification},"get")}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:Mn(function(){return g.WillRenameFilesRequest},"get")}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:Mn(function(){return g.DidDeleteFilesNotification},"get")}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:Mn(function(){return g.WillDeleteFilesRequest},"get")});var v=ka();Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:Mn(function(){return v.UniquenessLevel},"get")}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:Mn(function(){return v.MonikerKind},"get")}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:Mn(function(){return v.MonikerRequest},"get")});var T=xa();Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:Mn(function(){return T.TypeHierarchyPrepareRequest},"get")}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:Mn(function(){return T.TypeHierarchySubtypesRequest},"get")}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:Mn(function(){return T.TypeHierarchySupertypesRequest},"get")});var $=wa();Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:Mn(function(){return $.InlineValueRequest},"get")}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:Mn(function(){return $.InlineValueRefreshRequest},"get")});var R=Na();Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:Mn(function(){return R.InlayHintRequest},"get")}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:Mn(function(){return R.InlayHintResolveRequest},"get")}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:Mn(function(){return R.InlayHintRefreshRequest},"get")});var E=_a();Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:Mn(function(){return E.DiagnosticServerCancellationData},"get")}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:Mn(function(){return E.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:Mn(function(){return E.DocumentDiagnosticRequest},"get")}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:Mn(function(){return E.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:Mn(function(){return E.DiagnosticRefreshRequest},"get")});var b=Ia();Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:Mn(function(){return b.NotebookCellKind},"get")}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:Mn(function(){return b.ExecutionSummary},"get")}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:Mn(function(){return b.NotebookCell},"get")}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:Mn(function(){return b.NotebookDocument},"get")}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:Mn(function(){return b.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:Mn(function(){return b.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:Mn(function(){return b.NotebookCellArrayChange},"get")}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:Mn(function(){return b.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:Mn(function(){return b.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:Mn(function(){return b.DidCloseNotebookDocumentNotification},"get")});var A,C,S,k,x,w,N,_,I,P,O,L,D,M,j,F,G,z,K,q,U,B,V,W,H,Y,X,Z,J,Q,ee,te,re,ne,ae,ie,se,oe,le,ue,ce,pe,de,fe,me,he,ye,ge,ve,Te,$e,Re,Ee,be,Ae,Ce,Se,ke,xe,we,Ne,_e,Ie,Pe,Oe,Le,De,Me,je,Fe,Ge,ze,Ke,qe,Ue,Be,Ve,We,He,Ye,Xe,Ze,Je,Qe,et,tt,rt,nt,at,it,st,ot,lt,ut,ct,pt,dt,ft,mt,ht,yt,gt,vt,Tt,$t,Rt,Et,bt,At,Ct,St,kt,xt,wt,Nt,_t,It,Pt,Ot,Lt=Pa();Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:Mn(function(){return Lt.InlineCompletionRequest},"get")}),function(e){function t(e){const t=e;return n.string(t)||n.string(t.language)||n.string(t.scheme)||n.string(t.pattern)}Mn(t,"is"),e.is=t}(A||(e.TextDocumentFilter=A={})),function(e){function t(e){const t=e;return n.objectLiteral(t)&&(n.string(t.notebookType)||n.string(t.scheme)||n.string(t.pattern))}Mn(t,"is"),e.is=t}(C||(e.NotebookDocumentFilter=C={})),function(e){function t(e){const t=e;return n.objectLiteral(t)&&(n.string(t.notebook)||C.is(t.notebook))&&(void 0===t.language||n.string(t.language))}Mn(t,"is"),e.is=t}(S||(e.NotebookCellTextDocumentFilter=S={})),function(e){function t(e){if(!Array.isArray(e))return!1;for(let t of e)if(!n.string(t)&&!A.is(t)&&!S.is(t))return!1;return!0}Mn(t,"is"),e.is=t}(k||(e.DocumentSelector=k={})),(w=x||(e.RegistrationRequest=x={})).method="client/registerCapability",w.messageDirection=t.MessageDirection.serverToClient,w.type=new t.ProtocolRequestType(w.method),(_=N||(e.UnregistrationRequest=N={})).method="client/unregisterCapability",_.messageDirection=t.MessageDirection.serverToClient,_.type=new t.ProtocolRequestType(_.method),(P=I||(e.ResourceOperationKind=I={})).Create="create",P.Rename="rename",P.Delete="delete",(L=O||(e.FailureHandlingKind=O={})).Abort="abort",L.Transactional="transactional",L.TextOnlyTransactional="textOnlyTransactional",L.Undo="undo",(M=D||(e.PositionEncodingKind=D={})).UTF8="utf-8",M.UTF16="utf-16",M.UTF32="utf-32",function(e){function t(e){const t=e;return t&&n.string(t.id)&&t.id.length>0}Mn(t,"hasId"),e.hasId=t}(j||(e.StaticRegistrationOptions=j={})),function(e){function t(e){const t=e;return t&&(null===t.documentSelector||k.is(t.documentSelector))}Mn(t,"is"),e.is=t}(F||(e.TextDocumentRegistrationOptions=F={})),function(e){function t(e){const t=e;return n.objectLiteral(t)&&(void 0===t.workDoneProgress||n.boolean(t.workDoneProgress))}function r(e){const t=e;return t&&n.boolean(t.workDoneProgress)}Mn(t,"is"),e.is=t,Mn(r,"hasWorkDoneProgress"),e.hasWorkDoneProgress=r}(G||(e.WorkDoneProgressOptions=G={})),(K=z||(e.InitializeRequest=z={})).method="initialize",K.messageDirection=t.MessageDirection.clientToServer,K.type=new t.ProtocolRequestType(K.method),(q||(e.InitializeErrorCodes=q={})).unknownProtocolVersion=1,(B=U||(e.InitializedNotification=U={})).method="initialized",B.messageDirection=t.MessageDirection.clientToServer,B.type=new t.ProtocolNotificationType(B.method),(W=V||(e.ShutdownRequest=V={})).method="shutdown",W.messageDirection=t.MessageDirection.clientToServer,W.type=new t.ProtocolRequestType0(W.method),(Y=H||(e.ExitNotification=H={})).method="exit",Y.messageDirection=t.MessageDirection.clientToServer,Y.type=new t.ProtocolNotificationType0(Y.method),(Z=X||(e.DidChangeConfigurationNotification=X={})).method="workspace/didChangeConfiguration",Z.messageDirection=t.MessageDirection.clientToServer,Z.type=new t.ProtocolNotificationType(Z.method),(Q=J||(e.MessageType=J={})).Error=1,Q.Warning=2,Q.Info=3,Q.Log=4,Q.Debug=5,(te=ee||(e.ShowMessageNotification=ee={})).method="window/showMessage",te.messageDirection=t.MessageDirection.serverToClient,te.type=new t.ProtocolNotificationType(te.method),(ne=re||(e.ShowMessageRequest=re={})).method="window/showMessageRequest",ne.messageDirection=t.MessageDirection.serverToClient,ne.type=new t.ProtocolRequestType(ne.method),(ie=ae||(e.LogMessageNotification=ae={})).method="window/logMessage",ie.messageDirection=t.MessageDirection.serverToClient,ie.type=new t.ProtocolNotificationType(ie.method),(oe=se||(e.TelemetryEventNotification=se={})).method="telemetry/event",oe.messageDirection=t.MessageDirection.serverToClient,oe.type=new t.ProtocolNotificationType(oe.method),(ue=le||(e.TextDocumentSyncKind=le={})).None=0,ue.Full=1,ue.Incremental=2,(pe=ce||(e.DidOpenTextDocumentNotification=ce={})).method="textDocument/didOpen",pe.messageDirection=t.MessageDirection.clientToServer,pe.type=new t.ProtocolNotificationType(pe.method),function(e){function t(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}function r(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}Mn(t,"isIncremental"),e.isIncremental=t,Mn(r,"isFull"),e.isFull=r}(de||(e.TextDocumentContentChangeEvent=de={})),(me=fe||(e.DidChangeTextDocumentNotification=fe={})).method="textDocument/didChange",me.messageDirection=t.MessageDirection.clientToServer,me.type=new t.ProtocolNotificationType(me.method),(ye=he||(e.DidCloseTextDocumentNotification=he={})).method="textDocument/didClose",ye.messageDirection=t.MessageDirection.clientToServer,ye.type=new t.ProtocolNotificationType(ye.method),(ve=ge||(e.DidSaveTextDocumentNotification=ge={})).method="textDocument/didSave",ve.messageDirection=t.MessageDirection.clientToServer,ve.type=new t.ProtocolNotificationType(ve.method),($e=Te||(e.TextDocumentSaveReason=Te={})).Manual=1,$e.AfterDelay=2,$e.FocusOut=3,(Ee=Re||(e.WillSaveTextDocumentNotification=Re={})).method="textDocument/willSave",Ee.messageDirection=t.MessageDirection.clientToServer,Ee.type=new t.ProtocolNotificationType(Ee.method),(Ae=be||(e.WillSaveTextDocumentWaitUntilRequest=be={})).method="textDocument/willSaveWaitUntil",Ae.messageDirection=t.MessageDirection.clientToServer,Ae.type=new t.ProtocolRequestType(Ae.method),(Se=Ce||(e.DidChangeWatchedFilesNotification=Ce={})).method="workspace/didChangeWatchedFiles",Se.messageDirection=t.MessageDirection.clientToServer,Se.type=new t.ProtocolNotificationType(Se.method),(xe=ke||(e.FileChangeType=ke={})).Created=1,xe.Changed=2,xe.Deleted=3,function(e){function t(e){const t=e;return n.objectLiteral(t)&&(r.URI.is(t.baseUri)||r.WorkspaceFolder.is(t.baseUri))&&n.string(t.pattern)}Mn(t,"is"),e.is=t}(we||(e.RelativePattern=we={})),(_e=Ne||(e.WatchKind=Ne={})).Create=1,_e.Change=2,_e.Delete=4,(Pe=Ie||(e.PublishDiagnosticsNotification=Ie={})).method="textDocument/publishDiagnostics",Pe.messageDirection=t.MessageDirection.serverToClient,Pe.type=new t.ProtocolNotificationType(Pe.method),(Le=Oe||(e.CompletionTriggerKind=Oe={})).Invoked=1,Le.TriggerCharacter=2,Le.TriggerForIncompleteCompletions=3,(Me=De||(e.CompletionRequest=De={})).method="textDocument/completion",Me.messageDirection=t.MessageDirection.clientToServer,Me.type=new t.ProtocolRequestType(Me.method),(Fe=je||(e.CompletionResolveRequest=je={})).method="completionItem/resolve",Fe.messageDirection=t.MessageDirection.clientToServer,Fe.type=new t.ProtocolRequestType(Fe.method),(ze=Ge||(e.HoverRequest=Ge={})).method="textDocument/hover",ze.messageDirection=t.MessageDirection.clientToServer,ze.type=new t.ProtocolRequestType(ze.method),(qe=Ke||(e.SignatureHelpTriggerKind=Ke={})).Invoked=1,qe.TriggerCharacter=2,qe.ContentChange=3,(Be=Ue||(e.SignatureHelpRequest=Ue={})).method="textDocument/signatureHelp",Be.messageDirection=t.MessageDirection.clientToServer,Be.type=new t.ProtocolRequestType(Be.method),(We=Ve||(e.DefinitionRequest=Ve={})).method="textDocument/definition",We.messageDirection=t.MessageDirection.clientToServer,We.type=new t.ProtocolRequestType(We.method),(Ye=He||(e.ReferencesRequest=He={})).method="textDocument/references",Ye.messageDirection=t.MessageDirection.clientToServer,Ye.type=new t.ProtocolRequestType(Ye.method),(Ze=Xe||(e.DocumentHighlightRequest=Xe={})).method="textDocument/documentHighlight",Ze.messageDirection=t.MessageDirection.clientToServer,Ze.type=new t.ProtocolRequestType(Ze.method),(Qe=Je||(e.DocumentSymbolRequest=Je={})).method="textDocument/documentSymbol",Qe.messageDirection=t.MessageDirection.clientToServer,Qe.type=new t.ProtocolRequestType(Qe.method),(tt=et||(e.CodeActionRequest=et={})).method="textDocument/codeAction",tt.messageDirection=t.MessageDirection.clientToServer,tt.type=new t.ProtocolRequestType(tt.method),(nt=rt||(e.CodeActionResolveRequest=rt={})).method="codeAction/resolve",nt.messageDirection=t.MessageDirection.clientToServer,nt.type=new t.ProtocolRequestType(nt.method),(it=at||(e.WorkspaceSymbolRequest=at={})).method="workspace/symbol",it.messageDirection=t.MessageDirection.clientToServer,it.type=new t.ProtocolRequestType(it.method),(ot=st||(e.WorkspaceSymbolResolveRequest=st={})).method="workspaceSymbol/resolve",ot.messageDirection=t.MessageDirection.clientToServer,ot.type=new t.ProtocolRequestType(ot.method),(ut=lt||(e.CodeLensRequest=lt={})).method="textDocument/codeLens",ut.messageDirection=t.MessageDirection.clientToServer,ut.type=new t.ProtocolRequestType(ut.method),(pt=ct||(e.CodeLensResolveRequest=ct={})).method="codeLens/resolve",pt.messageDirection=t.MessageDirection.clientToServer,pt.type=new t.ProtocolRequestType(pt.method),(ft=dt||(e.CodeLensRefreshRequest=dt={})).method="workspace/codeLens/refresh",ft.messageDirection=t.MessageDirection.serverToClient,ft.type=new t.ProtocolRequestType0(ft.method),(ht=mt||(e.DocumentLinkRequest=mt={})).method="textDocument/documentLink",ht.messageDirection=t.MessageDirection.clientToServer,ht.type=new t.ProtocolRequestType(ht.method),(gt=yt||(e.DocumentLinkResolveRequest=yt={})).method="documentLink/resolve",gt.messageDirection=t.MessageDirection.clientToServer,gt.type=new t.ProtocolRequestType(gt.method),(Tt=vt||(e.DocumentFormattingRequest=vt={})).method="textDocument/formatting",Tt.messageDirection=t.MessageDirection.clientToServer,Tt.type=new t.ProtocolRequestType(Tt.method),(Rt=$t||(e.DocumentRangeFormattingRequest=$t={})).method="textDocument/rangeFormatting",Rt.messageDirection=t.MessageDirection.clientToServer,Rt.type=new t.ProtocolRequestType(Rt.method),(bt=Et||(e.DocumentRangesFormattingRequest=Et={})).method="textDocument/rangesFormatting",bt.messageDirection=t.MessageDirection.clientToServer,bt.type=new t.ProtocolRequestType(bt.method),(Ct=At||(e.DocumentOnTypeFormattingRequest=At={})).method="textDocument/onTypeFormatting",Ct.messageDirection=t.MessageDirection.clientToServer,Ct.type=new t.ProtocolRequestType(Ct.method),(St||(e.PrepareSupportDefaultBehavior=St={})).Identifier=1,(xt=kt||(e.RenameRequest=kt={})).method="textDocument/rename",xt.messageDirection=t.MessageDirection.clientToServer,xt.type=new t.ProtocolRequestType(xt.method),(Nt=wt||(e.PrepareRenameRequest=wt={})).method="textDocument/prepareRename",Nt.messageDirection=t.MessageDirection.clientToServer,Nt.type=new t.ProtocolRequestType(Nt.method),(It=_t||(e.ExecuteCommandRequest=_t={})).method="workspace/executeCommand",It.messageDirection=t.MessageDirection.clientToServer,It.type=new t.ProtocolRequestType(It.method),(Ot=Pt||(e.ApplyWorkspaceEditRequest=Pt={})).method="workspace/applyEdit",Ot.messageDirection=t.MessageDirection.serverToClient,Ot.type=new t.ProtocolRequestType("workspace/applyEdit")}}),La=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=ua();function r(e,r,n,a){return t.ConnectionStrategy.is(a)&&(a={connectionStrategy:a}),(0,t.createMessageConnection)(e,r,n,a)}Mn(r,"createProtocolConnection"),e.createProtocolConnection=r}}),Da=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:Mn(function(){return t[r]},"get")}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,r(ua(),e),r((Wn(),qn(Un)),e),r(pa(),e),r(Oa(),e);var n,a,i=La();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:Mn(function(){return i.createProtocolConnection},"get")}),(a=n||(e.LSPErrorCodes=n={})).lspReservedErrorRangeStart=-32899,a.RequestFailed=-32803,a.ServerCancelled=-32802,a.ContentModified=-32801,a.RequestCancelled=-32800,a.lspReservedErrorRangeEnd=-32800}}),Ma=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:Mn(function(){return t[r]},"get")}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=ca();function a(e,t,r,a){return(0,n.createMessageConnection)(e,t,r,a)}r(ca(),e),r(Da(),e),Mn(a,"createProtocolConnection"),e.createProtocolConnection=a}}),ja={};Fn(ja,{AbstractAstReflection:()=>Ba,AbstractCstNode:()=>nN,AbstractLangiumParser:()=>pN,AbstractParserErrorMessageProvider:()=>fN,AbstractThreadedAsyncParser:()=>zI,AstUtils:()=>ni,BiMap:()=>R_,Cancellation:()=>qN,CompositeCstNodeImpl:()=>iN,ContextCache:()=>w_,CstNodeBuilder:()=>rN,CstUtils:()=>Fa,DEFAULT_TOKENIZE_OPTIONS:()=>iI,DONE_RESULT:()=>Qa,DatatypeSymbol:()=>lN,DefaultAstNodeDescriptionProvider:()=>H_,DefaultAstNodeLocator:()=>X_,DefaultAsyncParser:()=>GI,DefaultCommentProvider:()=>FI,DefaultConfigurationProvider:()=>Q_,DefaultDocumentBuilder:()=>tI,DefaultDocumentValidator:()=>U_,DefaultHydrator:()=>UI,DefaultIndexManager:()=>rI,DefaultJsonSerializer:()=>M_,DefaultLangiumDocumentFactory:()=>f_,DefaultLangiumDocuments:()=>m_,DefaultLangiumProfiler:()=>kP,DefaultLexer:()=>sI,DefaultLexerErrorMessageProvider:()=>aI,DefaultLinker:()=>y_,DefaultNameProvider:()=>v_,DefaultReferenceDescriptionProvider:()=>Y_,DefaultReferences:()=>T_,DefaultScopeComputation:()=>E_,DefaultScopeProvider:()=>I_,DefaultServiceRegistry:()=>j_,DefaultTokenBuilder:()=>zN,DefaultValueConverter:()=>KN,DefaultWorkspaceLock:()=>qI,DefaultWorkspaceManager:()=>nI,Deferred:()=>e_,Disposable:()=>J_,DisposableCache:()=>k_,DocumentCache:()=>N_,DocumentState:()=>c_,DocumentValidator:()=>G_,EMPTY_SCOPE:()=>S_,EMPTY_STREAM:()=>Ja,EmptyFileSystem:()=>oP,EmptyFileSystemProvider:()=>sP,ErrorWithLocation:()=>zo,GrammarAST:()=>vi,GrammarUtils:()=>Go,IndentationAwareLexer:()=>aP,IndentationAwareTokenBuilder:()=>nP,JSDocDocumentationProvider:()=>jI,LangiumCompletionParser:()=>hN,LangiumParser:()=>dN,LangiumParserErrorMessageProvider:()=>mN,LeafCstNodeImpl:()=>aN,LexingMode:()=>eP,MapScope:()=>A_,Module:()=>MI,MultiMap:()=>$_,MultiMapScope:()=>C_,OperationCancelled:()=>YN,ParserWorker:()=>KI,ProfilingTask:()=>xP,Reduction:()=>ti,RefResolving:()=>h_,RegExpUtils:()=>Uo,RootCstNodeImpl:()=>oN,SimpleCache:()=>x_,StreamImpl:()=>Ya,StreamScope:()=>b_,TextDocument:()=>JN,TreeStreamImpl:()=>ri,URI:()=>l_,UriTrie:()=>d_,UriUtils:()=>o_,VALIDATE_EACH_NODE:()=>q_,ValidationCategory:()=>L_,ValidationRegistry:()=>K_,ValueConverter:()=>GN,WorkspaceCache:()=>__,assertCondition:()=>qo,assertUnreachable:()=>Ko,createCompletionParser:()=>MN,createDefaultCoreModule:()=>BI,createDefaultSharedCoreModule:()=>VI,createGrammarConfig:()=>eu,createLangiumParser:()=>jN,createParser:()=>TN,delayNextTick:()=>UN,diagnosticData:()=>F_,eagerLoad:()=>YI,getDiagnosticRange:()=>B_,indentationBuilderDefaultOptions:()=>rP,inject:()=>WI,interruptAndCheck:()=>ZN,isAstNode:()=>Ga,isAstNodeDescription:()=>qa,isAstNodeWithComment:()=>P_,isCompositeCstNode:()=>Va,isIMultiModeLexerDefinition:()=>lI,isJSDoc:()=>pI,isLeafCstNode:()=>Wa,isLinkingError:()=>Ua,isMultiReference:()=>Ka,isNamed:()=>g_,isOperationCancelled:()=>XN,isReference:()=>za,isRootCstNode:()=>Ha,isTokenTypeArray:()=>oI,isTokenTypeDictionary:()=>uI,loadGrammarFromJson:()=>pP,parseJSDoc:()=>cI,prepareLangiumParser:()=>FN,setInterruptionPeriod:()=>HN,startCancelableOperation:()=>WN,stream:()=>ei,toDiagnosticData:()=>W_,toDiagnosticSeverity:()=>V_});var Fa={};function Ga(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function za(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"ref"in e}function Ka(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"items"in e}function qa(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function Ua(e){return"object"==typeof e&&null!==e&&"object"==typeof e.info&&"string"==typeof e.message}Fn(Fa,{DefaultNameRegexp:()=>ko,RangeComparison:()=>ho,compareRange:()=>Co,findCommentNode:()=>wo,findDeclarationNodeAtOffset:()=>xo,findLeafNodeAtOffset:()=>_o,findLeafNodeBeforeOffset:()=>Io,flattenCst:()=>Ro,getDatatypeNode:()=>To,getInteriorNodes:()=>Mo,getNextNode:()=>Lo,getPreviousNode:()=>Oo,getStartlineNode:()=>Do,inRange:()=>So,isChildNode:()=>Eo,isCommentNode:()=>No,streamCst:()=>$o,toDocumentSegment:()=>Ao,tokenToRange:()=>bo}),Mn(Ga,"isAstNode"),Mn(za,"isReference"),Mn(Ka,"isMultiReference"),Mn(qa,"isAstNodeDescription"),Mn(Ua,"isLinkingError");var Ba=(Mn(e=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var t;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=null==(t=r.properties[e.property])?void 0:t.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const t=this.types[e];return t||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return Ga(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const n=r[t];if(void 0!==n)return n;{const n=this.types[e],a=!!n&&n.superTypes.some(e=>this.isSubtype(e,t));return r[t]=a,a}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const t=this.getAllTypes(),r=[];for(const n of t)this.isSubtype(n,e)&&r.push(n);return this.allSubtypes[e]=r,r}}},"AbstractAstReflection"),e);function Va(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function Wa(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function Ha(e){return Va(e)&&"string"==typeof e.fullText}Mn(Va,"isCompositeCstNode"),Mn(Wa,"isLeafCstNode"),Mn(Ha,"isRootCstNode");var Ya=(t=class{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:Mn(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0,r=e.next();for(;!r.done;)t++,r=e.next();return t}toArray(){const e=[],t=this.iterator();let r;do{r=t.next(),void 0!==r.value&&e.push(r.value)}while(!r.done);return e}toSet(){return new Set(this)}toMap(e,t){const r=this.map(r=>[e?e(r):r,t?t(r):r]);return new Map(r)}toString(){return this.join()}concat(e){return new t(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do{if(t=this.nextFn(e.first),!t.done)return t}while(!t.done);e.firstDone=!0}do{if(t=e.iterator.next(),!t.done)return t}while(!t.done);return Qa})}join(e=","){const t=this.iterator();let r,n="",a=!1;do{r=t.next(),r.done||(a&&(n+=e),n+=Xa(r.value)),a=!0}while(!r.done);return n}indexOf(e,t=0){const r=this.iterator();let n=0,a=r.next();for(;!a.done;){if(n>=t&&a.value===e)return n;a=r.next(),n++}return-1}every(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(!e(r.value))return!1;r=t.next()}return!0}some(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return!0;r=t.next()}return!1}forEach(e){const t=this.iterator();let r=0,n=t.next();for(;!n.done;)e(n.value,r),n=t.next(),r++}map(e){return new t(this.startFn,t=>{const{done:r,value:n}=this.nextFn(t);return r?Qa:{done:!1,value:e(n)}})}filter(e){return new t(this.startFn,t=>{let r;do{if(r=this.nextFn(t),!r.done&&e(r.value))return r}while(!r.done);return Qa})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){const r=this.iterator();let n=t,a=r.next();for(;!a.done;)n=void 0===n?a.value:e(n,a.value),a=r.next();return n}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){const n=e.next();if(n.done)return r;const a=this.recursiveReduce(e,t,r);return void 0===a?n.value:t(a,n.value)}find(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return r.value;r=t.next()}}findIndex(e){const t=this.iterator();let r=0,n=t.next();for(;!n.done;){if(e(n.value))return r;n=t.next(),r++}return-1}includes(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(r.value===e)return!0;r=t.next()}return!1}flatMap(e){return new t(()=>({this:this.startFn()}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:r,value:n}=this.nextFn(t.this);if(!r){const r=e(n);if(!Za(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return Qa})}flat(e){if(void 0===e&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new t(()=>({this:r.startFn()}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:t,value:n}=r.nextFn(e.this);if(!t){if(!Za(n))return{done:!1,value:n};e.iterator=n[Symbol.iterator]()}}while(e.iterator);return Qa})}head(){const e=this.iterator().next();if(!e.done)return e.value}tail(e=1){return new t(()=>{const t=this.startFn();for(let r=0;r<e;r++){if(this.nextFn(t).done)return t}return t},this.nextFn)}limit(e){return new t(()=>({size:0,state:this.startFn()}),t=>(t.size++,t.size>e?Qa:this.nextFn(t.state)))}distinct(e){return new t(()=>({set:new Set,internalState:this.startFn()}),t=>{let r;do{if(r=this.nextFn(t.internalState),!r.done){const n=e?e(r.value):r.value;if(!t.set.has(n))return t.set.add(n),r}}while(!r.done);return Qa})}exclude(e,t){const r=new Set;for(const n of e){const e=t?t(n):n;r.add(e)}return this.filter(e=>{const n=t?t(e):e;return!r.has(n)})}},Mn(t,"StreamImpl"),t);function Xa(e){return"string"==typeof e?e:void 0===e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function Za(e){return!!e&&"function"==typeof e[Symbol.iterator]}Mn(Xa,"toString"),Mn(Za,"isIterable");var Ja=new Ya(()=>{},()=>Qa),Qa=Object.freeze({done:!0,value:void 0});function ei(...e){if(1===e.length){const t=e[0];if(t instanceof Ya)return t;if(Za(t))return new Ya(()=>t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new Ya(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:Qa)}return e.length>1?new Ya(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){const r=e[t.collIndex++];Za(r)?t.iterator=r[Symbol.iterator]():r&&"number"==typeof r.length&&(t.array=r)}}while(t.iterator||t.array||t.collIndex<e.length);return Qa}):Ja}Mn(ei,"stream");var ti,ri=(Mn(r=class extends Ya{constructor(e,t,r){super(()=>({iterators:(null==r?void 0:r.includeRoot)?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);e.iterators.length>0;){const r=e.iterators[e.iterators.length-1].next();if(!r.done)return e.iterators.push(t(r.value)[Symbol.iterator]()),r;e.iterators.pop()}return Qa})}iterator(){const e={state:this.startFn(),next:Mn(()=>this.nextFn(e.state),"next"),prune:Mn(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},"TreeStreamImpl"),r);!function(e){function t(e){return e.reduce((e,t)=>e+t,0)}function r(e){return e.reduce((e,t)=>e*t,0)}function n(e){return e.reduce((e,t)=>Math.min(e,t))}function a(e){return e.reduce((e,t)=>Math.max(e,t))}Mn(t,"sum"),e.sum=t,Mn(r,"product"),e.product=r,Mn(n,"min"),e.min=n,Mn(a,"max"),e.max=a}(ti||(ti={}));var ni={};function ai(e,t={}){for(const[r,n]of Object.entries(e))r.startsWith("$")||(Array.isArray(n)?n.forEach((n,a)=>{Ga(n)&&(n.$container=e,n.$containerProperty=r,n.$containerIndex=a,t.deep&&ai(n,t))}):Ga(n)&&(n.$container=e,n.$containerProperty=r,t.deep&&ai(n,t)))}function ii(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function si(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function oi(e){const t=li(e).$document;if(!t)throw new Error("AST node has no document.");return t}function li(e){for(;e.$container;)e=e.$container;return e}function ui(e){return za(e)?e.ref?[e.ref]:[]:Ka(e)?e.items.map(e=>e.ref):[]}function ci(e,t){if(!e)throw new Error("Node must be an AstNode.");const r=null==t?void 0:t.range;return new Ya(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){const n=t.keys[t.keyIndex];if(!n.startsWith("$")){const a=e[n];if(Ga(a)){if(t.keyIndex++,fi(a,r))return{done:!1,value:a}}else if(Array.isArray(a)){for(;t.arrayIndex<a.length;){const e=a[t.arrayIndex++];if(Ga(e)&&fi(e,r))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return Qa})}function pi(e,t){if(!e)throw new Error("Root node must be an AstNode.");return new ri(e,e=>ci(e,t))}function di(e,t){if(!e)throw new Error("Root node must be an AstNode.");return(null==t?void 0:t.range)&&!fi(e,t.range)?new ri(e,()=>[]):new ri(e,e=>ci(e,t),{includeRoot:!0})}function fi(e,t){var r;if(!t)return!0;const n=null==(r=e.$cstNode)?void 0:r.range;return!!n&&So(n,t)}function mi(e){return new Ya(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){const r=t.keys[t.keyIndex];if(!r.startsWith("$")){const n=e[r];if(za(n)||Ka(n))return t.keyIndex++,{done:!1,value:{reference:n,container:e,property:r}};if(Array.isArray(n)){for(;t.arrayIndex<n.length;){const a=t.arrayIndex++,i=n[a];if(za(i)||Ka(n))return{done:!1,value:{reference:i,container:e,property:r,index:a}}}t.arrayIndex=0}}t.keyIndex++}return Qa})}function hi(e,t){const r=e.getTypeMetaData(t.$type),n=t;for(const a of Object.values(r.properties))void 0!==a.defaultValue&&void 0===n[a.name]&&(n[a.name]=yi(a.defaultValue))}function yi(e){return Array.isArray(e)?[...e.map(yi)]:e}function gi(e,t,r){const n={$type:e.$type};r&&(r.set(e,n),r.set(n,e));for(const[a,i]of Object.entries(e))if(!a.startsWith("$"))if(Ga(i))n[a]=gi(i,t,r);else if(za(i))n[a]=t(n,a,i.$refNode,i.$refText,i);else if(Array.isArray(i)){const e=[];for(const s of i)Ga(s)?e.push(gi(s,t,r)):za(s)?e.push(t(n,a,s.$refNode,s.$refText,s)):e.push(s);n[a]=e}else n[a]=i;return ai(n,{deep:!0}),n}Fn(ni,{assignMandatoryProperties:()=>hi,copyAstNode:()=>gi,findRootNode:()=>li,getContainerOfType:()=>ii,getDocument:()=>oi,getReferenceNodes:()=>ui,hasContainerOfType:()=>si,linkContentToContainer:()=>ai,streamAllContents:()=>pi,streamAst:()=>di,streamContents:()=>ci,streamReferences:()=>mi}),Mn(ai,"linkContentToContainer"),Mn(ii,"getContainerOfType"),Mn(si,"hasContainerOfType"),Mn(oi,"getDocument"),Mn(li,"findRootNode"),Mn(ui,"getReferenceNodes"),Mn(ci,"streamContents"),Mn(pi,"streamAllContents"),Mn(di,"streamAst"),Mn(fi,"isAstNodeInRange"),Mn(mi,"streamReferences"),Mn(hi,"assignMandatoryProperties"),Mn(yi,"copyDefaultValue"),Mn(gi,"copyAstNode");var vi={};Fn(vi,{AbstractElement:()=>$i,AbstractParserRule:()=>Ei,AbstractRule:()=>Ai,AbstractType:()=>Si,Action:()=>xi,Alternatives:()=>Ni,ArrayLiteral:()=>Ii,ArrayType:()=>Oi,Assignment:()=>Di,BooleanLiteral:()=>ji,CharacterRange:()=>Gi,Condition:()=>Ki,Conjunction:()=>Ui,CrossReference:()=>Vi,Disjunction:()=>Hi,EndOfFile:()=>Xi,Grammar:()=>Ji,GrammarImport:()=>es,Group:()=>rs,InferredType:()=>as,InfixRule:()=>ss,InfixRuleOperatorList:()=>ls,InfixRuleOperators:()=>cs,Interface:()=>ds,Keyword:()=>ms,LangiumGrammarAstReflection:()=>go,LangiumGrammarTerminals:()=>Ti,NamedArgument:()=>ys,NegatedToken:()=>vs,Negation:()=>$s,NumberLiteral:()=>Es,Parameter:()=>As,ParameterReference:()=>Ss,ParserRule:()=>xs,ReferenceType:()=>Ns,RegexToken:()=>Is,ReturnType:()=>Os,RuleCall:()=>Ds,SimpleType:()=>js,StringLiteral:()=>Gs,TerminalAlternatives:()=>Ks,TerminalElement:()=>Us,TerminalGroup:()=>Vs,TerminalRule:()=>Hs,TerminalRuleCall:()=>Xs,Type:()=>Js,TypeAttribute:()=>eo,TypeDefinition:()=>ro,UnionType:()=>ao,UnorderedGroup:()=>so,UntilToken:()=>lo,ValueLiteral:()=>co,Wildcard:()=>fo,isAbstractElement:()=>Ri,isAbstractParserRule:()=>bi,isAbstractRule:()=>Ci,isAbstractType:()=>ki,isAction:()=>wi,isAlternatives:()=>_i,isArrayLiteral:()=>Pi,isArrayType:()=>Li,isAssignment:()=>Mi,isBooleanLiteral:()=>Fi,isCharacterRange:()=>zi,isCondition:()=>qi,isConjunction:()=>Bi,isCrossReference:()=>Wi,isDisjunction:()=>Yi,isEndOfFile:()=>Zi,isGrammar:()=>Qi,isGrammarImport:()=>ts,isGroup:()=>ns,isInferredType:()=>is,isInfixRule:()=>os,isInfixRuleOperatorList:()=>us,isInfixRuleOperators:()=>ps,isInterface:()=>fs,isKeyword:()=>hs,isNamedArgument:()=>gs,isNegatedToken:()=>Ts,isNegation:()=>Rs,isNumberLiteral:()=>bs,isParameter:()=>Cs,isParameterReference:()=>ks,isParserRule:()=>ws,isReferenceType:()=>_s,isRegexToken:()=>Ps,isReturnType:()=>Ls,isRuleCall:()=>Ms,isSimpleType:()=>Fs,isStringLiteral:()=>zs,isTerminalAlternatives:()=>qs,isTerminalElement:()=>Bs,isTerminalGroup:()=>Ws,isTerminalRule:()=>Ys,isTerminalRuleCall:()=>Zs,isType:()=>Qs,isTypeAttribute:()=>to,isTypeDefinition:()=>no,isUnionType:()=>io,isUnorderedGroup:()=>oo,isUntilToken:()=>uo,isValueLiteral:()=>po,isWildcard:()=>mo,reflection:()=>vo});var Ti={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]*/},$i={$type:"AbstractElement",cardinality:"cardinality"};function Ri(e){return vo.isInstance(e,$i.$type)}Mn(Ri,"isAbstractElement");var Ei={$type:"AbstractParserRule"};function bi(e){return vo.isInstance(e,Ei.$type)}Mn(bi,"isAbstractParserRule");var Ai={$type:"AbstractRule"};function Ci(e){return vo.isInstance(e,Ai.$type)}Mn(Ci,"isAbstractRule");var Si={$type:"AbstractType"};function ki(e){return vo.isInstance(e,Si.$type)}Mn(ki,"isAbstractType");var xi={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function wi(e){return vo.isInstance(e,xi.$type)}Mn(wi,"isAction");var Ni={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function _i(e){return vo.isInstance(e,Ni.$type)}Mn(_i,"isAlternatives");var Ii={$type:"ArrayLiteral",elements:"elements"};function Pi(e){return vo.isInstance(e,Ii.$type)}Mn(Pi,"isArrayLiteral");var Oi={$type:"ArrayType",elementType:"elementType"};function Li(e){return vo.isInstance(e,Oi.$type)}Mn(Li,"isArrayType");var Di={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Mi(e){return vo.isInstance(e,Di.$type)}Mn(Mi,"isAssignment");var ji={$type:"BooleanLiteral",true:"true"};function Fi(e){return vo.isInstance(e,ji.$type)}Mn(Fi,"isBooleanLiteral");var Gi={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function zi(e){return vo.isInstance(e,Gi.$type)}Mn(zi,"isCharacterRange");var Ki={$type:"Condition"};function qi(e){return vo.isInstance(e,Ki.$type)}Mn(qi,"isCondition");var Ui={$type:"Conjunction",left:"left",right:"right"};function Bi(e){return vo.isInstance(e,Ui.$type)}Mn(Bi,"isConjunction");var Vi={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Wi(e){return vo.isInstance(e,Vi.$type)}Mn(Wi,"isCrossReference");var Hi={$type:"Disjunction",left:"left",right:"right"};function Yi(e){return vo.isInstance(e,Hi.$type)}Mn(Yi,"isDisjunction");var Xi={$type:"EndOfFile",cardinality:"cardinality"};function Zi(e){return vo.isInstance(e,Xi.$type)}Mn(Zi,"isEndOfFile");var Ji={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function Qi(e){return vo.isInstance(e,Ji.$type)}Mn(Qi,"isGrammar");var es={$type:"GrammarImport",path:"path"};function ts(e){return vo.isInstance(e,es.$type)}Mn(ts,"isGrammarImport");var rs={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function ns(e){return vo.isInstance(e,rs.$type)}Mn(ns,"isGroup");var as={$type:"InferredType",name:"name"};function is(e){return vo.isInstance(e,as.$type)}Mn(is,"isInferredType");var ss={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function os(e){return vo.isInstance(e,ss.$type)}Mn(os,"isInfixRule");var ls={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function us(e){return vo.isInstance(e,ls.$type)}Mn(us,"isInfixRuleOperatorList");var cs={$type:"InfixRuleOperators",precedences:"precedences"};function ps(e){return vo.isInstance(e,cs.$type)}Mn(ps,"isInfixRuleOperators");var ds={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function fs(e){return vo.isInstance(e,ds.$type)}Mn(fs,"isInterface");var ms={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function hs(e){return vo.isInstance(e,ms.$type)}Mn(hs,"isKeyword");var ys={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function gs(e){return vo.isInstance(e,ys.$type)}Mn(gs,"isNamedArgument");var vs={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Ts(e){return vo.isInstance(e,vs.$type)}Mn(Ts,"isNegatedToken");var $s={$type:"Negation",value:"value"};function Rs(e){return vo.isInstance(e,$s.$type)}Mn(Rs,"isNegation");var Es={$type:"NumberLiteral",value:"value"};function bs(e){return vo.isInstance(e,Es.$type)}Mn(bs,"isNumberLiteral");var As={$type:"Parameter",name:"name"};function Cs(e){return vo.isInstance(e,As.$type)}Mn(Cs,"isParameter");var Ss={$type:"ParameterReference",parameter:"parameter"};function ks(e){return vo.isInstance(e,Ss.$type)}Mn(ks,"isParameterReference");var xs={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function ws(e){return vo.isInstance(e,xs.$type)}Mn(ws,"isParserRule");var Ns={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function _s(e){return vo.isInstance(e,Ns.$type)}Mn(_s,"isReferenceType");var Is={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Ps(e){return vo.isInstance(e,Is.$type)}Mn(Ps,"isRegexToken");var Os={$type:"ReturnType",name:"name"};function Ls(e){return vo.isInstance(e,Os.$type)}Mn(Ls,"isReturnType");var Ds={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Ms(e){return vo.isInstance(e,Ds.$type)}Mn(Ms,"isRuleCall");var js={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Fs(e){return vo.isInstance(e,js.$type)}Mn(Fs,"isSimpleType");var Gs={$type:"StringLiteral",value:"value"};function zs(e){return vo.isInstance(e,Gs.$type)}Mn(zs,"isStringLiteral");var Ks={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function qs(e){return vo.isInstance(e,Ks.$type)}Mn(qs,"isTerminalAlternatives");var Us={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Bs(e){return vo.isInstance(e,Us.$type)}Mn(Bs,"isTerminalElement");var Vs={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Ws(e){return vo.isInstance(e,Vs.$type)}Mn(Ws,"isTerminalGroup");var Hs={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Ys(e){return vo.isInstance(e,Hs.$type)}Mn(Ys,"isTerminalRule");var Xs={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Zs(e){return vo.isInstance(e,Xs.$type)}Mn(Zs,"isTerminalRuleCall");var Js={$type:"Type",name:"name",type:"type"};function Qs(e){return vo.isInstance(e,Js.$type)}Mn(Qs,"isType");var eo={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function to(e){return vo.isInstance(e,eo.$type)}Mn(to,"isTypeAttribute");var ro={$type:"TypeDefinition"};function no(e){return vo.isInstance(e,ro.$type)}Mn(no,"isTypeDefinition");var ao={$type:"UnionType",types:"types"};function io(e){return vo.isInstance(e,ao.$type)}Mn(io,"isUnionType");var so={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function oo(e){return vo.isInstance(e,so.$type)}Mn(oo,"isUnorderedGroup");var lo={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function uo(e){return vo.isInstance(e,lo.$type)}Mn(uo,"isUntilToken");var co={$type:"ValueLiteral"};function po(e){return vo.isInstance(e,co.$type)}Mn(po,"isValueLiteral");var fo={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function mo(e){return vo.isInstance(e,fo.$type)}Mn(mo,"isWildcard");var ho,yo,go=(Mn(n=class extends Ba{constructor(){super(...arguments),this.types={AbstractElement:{name:$i.$type,properties:{cardinality:{name:$i.cardinality}},superTypes:[]},AbstractParserRule:{name:Ei.$type,properties:{},superTypes:[Ai.$type,Si.$type]},AbstractRule:{name:Ai.$type,properties:{},superTypes:[]},AbstractType:{name:Si.$type,properties:{},superTypes:[]},Action:{name:xi.$type,properties:{cardinality:{name:xi.cardinality},feature:{name:xi.feature},inferredType:{name:xi.inferredType},operator:{name:xi.operator},type:{name:xi.type,referenceType:Si.$type}},superTypes:[$i.$type]},Alternatives:{name:Ni.$type,properties:{cardinality:{name:Ni.cardinality},elements:{name:Ni.elements,defaultValue:[]}},superTypes:[$i.$type]},ArrayLiteral:{name:Ii.$type,properties:{elements:{name:Ii.elements,defaultValue:[]}},superTypes:[co.$type]},ArrayType:{name:Oi.$type,properties:{elementType:{name:Oi.elementType}},superTypes:[ro.$type]},Assignment:{name:Di.$type,properties:{cardinality:{name:Di.cardinality},feature:{name:Di.feature},operator:{name:Di.operator},predicate:{name:Di.predicate},terminal:{name:Di.terminal}},superTypes:[$i.$type]},BooleanLiteral:{name:ji.$type,properties:{true:{name:ji.true,defaultValue:!1}},superTypes:[Ki.$type,co.$type]},CharacterRange:{name:Gi.$type,properties:{cardinality:{name:Gi.cardinality},left:{name:Gi.left},lookahead:{name:Gi.lookahead},parenthesized:{name:Gi.parenthesized,defaultValue:!1},right:{name:Gi.right}},superTypes:[Us.$type]},Condition:{name:Ki.$type,properties:{},superTypes:[]},Conjunction:{name:Ui.$type,properties:{left:{name:Ui.left},right:{name:Ui.right}},superTypes:[Ki.$type]},CrossReference:{name:Vi.$type,properties:{cardinality:{name:Vi.cardinality},deprecatedSyntax:{name:Vi.deprecatedSyntax,defaultValue:!1},isMulti:{name:Vi.isMulti,defaultValue:!1},terminal:{name:Vi.terminal},type:{name:Vi.type,referenceType:Si.$type}},superTypes:[$i.$type]},Disjunction:{name:Hi.$type,properties:{left:{name:Hi.left},right:{name:Hi.right}},superTypes:[Ki.$type]},EndOfFile:{name:Xi.$type,properties:{cardinality:{name:Xi.cardinality}},superTypes:[$i.$type]},Grammar:{name:Ji.$type,properties:{imports:{name:Ji.imports,defaultValue:[]},interfaces:{name:Ji.interfaces,defaultValue:[]},isDeclared:{name:Ji.isDeclared,defaultValue:!1},name:{name:Ji.name},rules:{name:Ji.rules,defaultValue:[]},types:{name:Ji.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:es.$type,properties:{path:{name:es.path}},superTypes:[]},Group:{name:rs.$type,properties:{cardinality:{name:rs.cardinality},elements:{name:rs.elements,defaultValue:[]},guardCondition:{name:rs.guardCondition},predicate:{name:rs.predicate}},superTypes:[$i.$type]},InferredType:{name:as.$type,properties:{name:{name:as.name}},superTypes:[Si.$type]},InfixRule:{name:ss.$type,properties:{call:{name:ss.call},dataType:{name:ss.dataType},inferredType:{name:ss.inferredType},name:{name:ss.name},operators:{name:ss.operators},parameters:{name:ss.parameters,defaultValue:[]},returnType:{name:ss.returnType,referenceType:Si.$type}},superTypes:[Ei.$type]},InfixRuleOperatorList:{name:ls.$type,properties:{associativity:{name:ls.associativity},operators:{name:ls.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:cs.$type,properties:{precedences:{name:cs.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:ds.$type,properties:{attributes:{name:ds.attributes,defaultValue:[]},name:{name:ds.name},superTypes:{name:ds.superTypes,defaultValue:[],referenceType:Si.$type}},superTypes:[Si.$type]},Keyword:{name:ms.$type,properties:{cardinality:{name:ms.cardinality},predicate:{name:ms.predicate},value:{name:ms.value}},superTypes:[$i.$type]},NamedArgument:{name:ys.$type,properties:{calledByName:{name:ys.calledByName,defaultValue:!1},parameter:{name:ys.parameter,referenceType:As.$type},value:{name:ys.value}},superTypes:[]},NegatedToken:{name:vs.$type,properties:{cardinality:{name:vs.cardinality},lookahead:{name:vs.lookahead},parenthesized:{name:vs.parenthesized,defaultValue:!1},terminal:{name:vs.terminal}},superTypes:[Us.$type]},Negation:{name:$s.$type,properties:{value:{name:$s.value}},superTypes:[Ki.$type]},NumberLiteral:{name:Es.$type,properties:{value:{name:Es.value}},superTypes:[co.$type]},Parameter:{name:As.$type,properties:{name:{name:As.name}},superTypes:[]},ParameterReference:{name:Ss.$type,properties:{parameter:{name:Ss.parameter,referenceType:As.$type}},superTypes:[Ki.$type]},ParserRule:{name:xs.$type,properties:{dataType:{name:xs.dataType},definition:{name:xs.definition},entry:{name:xs.entry,defaultValue:!1},fragment:{name:xs.fragment,defaultValue:!1},inferredType:{name:xs.inferredType},name:{name:xs.name},parameters:{name:xs.parameters,defaultValue:[]},returnType:{name:xs.returnType,referenceType:Si.$type}},superTypes:[Ei.$type]},ReferenceType:{name:Ns.$type,properties:{isMulti:{name:Ns.isMulti,defaultValue:!1},referenceType:{name:Ns.referenceType}},superTypes:[ro.$type]},RegexToken:{name:Is.$type,properties:{cardinality:{name:Is.cardinality},lookahead:{name:Is.lookahead},parenthesized:{name:Is.parenthesized,defaultValue:!1},regex:{name:Is.regex}},superTypes:[Us.$type]},ReturnType:{name:Os.$type,properties:{name:{name:Os.name}},superTypes:[]},RuleCall:{name:Ds.$type,properties:{arguments:{name:Ds.arguments,defaultValue:[]},cardinality:{name:Ds.cardinality},predicate:{name:Ds.predicate},rule:{name:Ds.rule,referenceType:Ai.$type}},superTypes:[$i.$type]},SimpleType:{name:js.$type,properties:{primitiveType:{name:js.primitiveType},stringType:{name:js.stringType},typeRef:{name:js.typeRef,referenceType:Si.$type}},superTypes:[ro.$type]},StringLiteral:{name:Gs.$type,properties:{value:{name:Gs.value}},superTypes:[co.$type]},TerminalAlternatives:{name:Ks.$type,properties:{cardinality:{name:Ks.cardinality},elements:{name:Ks.elements,defaultValue:[]},lookahead:{name:Ks.lookahead},parenthesized:{name:Ks.parenthesized,defaultValue:!1}},superTypes:[Us.$type]},TerminalElement:{name:Us.$type,properties:{cardinality:{name:Us.cardinality},lookahead:{name:Us.lookahead},parenthesized:{name:Us.parenthesized,defaultValue:!1}},superTypes:[$i.$type]},TerminalGroup:{name:Vs.$type,properties:{cardinality:{name:Vs.cardinality},elements:{name:Vs.elements,defaultValue:[]},lookahead:{name:Vs.lookahead},parenthesized:{name:Vs.parenthesized,defaultValue:!1}},superTypes:[Us.$type]},TerminalRule:{name:Hs.$type,properties:{definition:{name:Hs.definition},fragment:{name:Hs.fragment,defaultValue:!1},hidden:{name:Hs.hidden,defaultValue:!1},name:{name:Hs.name},type:{name:Hs.type}},superTypes:[Ai.$type]},TerminalRuleCall:{name:Xs.$type,properties:{cardinality:{name:Xs.cardinality},lookahead:{name:Xs.lookahead},parenthesized:{name:Xs.parenthesized,defaultValue:!1},rule:{name:Xs.rule,referenceType:Hs.$type}},superTypes:[Us.$type]},Type:{name:Js.$type,properties:{name:{name:Js.name},type:{name:Js.type}},superTypes:[Si.$type]},TypeAttribute:{name:eo.$type,properties:{defaultValue:{name:eo.defaultValue},isOptional:{name:eo.isOptional,defaultValue:!1},name:{name:eo.name},type:{name:eo.type}},superTypes:[]},TypeDefinition:{name:ro.$type,properties:{},superTypes:[]},UnionType:{name:ao.$type,properties:{types:{name:ao.types,defaultValue:[]}},superTypes:[ro.$type]},UnorderedGroup:{name:so.$type,properties:{cardinality:{name:so.cardinality},elements:{name:so.elements,defaultValue:[]}},superTypes:[$i.$type]},UntilToken:{name:lo.$type,properties:{cardinality:{name:lo.cardinality},lookahead:{name:lo.lookahead},parenthesized:{name:lo.parenthesized,defaultValue:!1},terminal:{name:lo.terminal}},superTypes:[Us.$type]},ValueLiteral:{name:co.$type,properties:{},superTypes:[]},Wildcard:{name:fo.$type,properties:{cardinality:{name:fo.cardinality},lookahead:{name:fo.lookahead},parenthesized:{name:fo.parenthesized,defaultValue:!1}},superTypes:[Us.$type]}}}},"LangiumGrammarAstReflection"),n),vo=new go;function To(e){let t=e,r=!1;for(;t;){const e=ii(t.grammarSource,ws);if(!e||!e.dataType)return r?t:void 0;t=t.container,r=!0}}function $o(e){return new ri(e,e=>Va(e)?e.content:[],{includeRoot:!0})}function Ro(e){return $o(e).filter(Wa)}function Eo(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function bo(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function Ao(e){if(!e)return;const{offset:t,end:r,range:n}=e;return{range:n,offset:t,end:r,length:r-t}}function Co(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return ho.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return ho.After;const r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,n=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return r&&n?ho.Inside:r?ho.OverlapBack:n?ho.OverlapFront:ho.Outside}function So(e,t){return Co(e,t)>ho.After}Mn(To,"getDatatypeNode"),Mn($o,"streamCst"),Mn(Ro,"flattenCst"),Mn(Eo,"isChildNode"),Mn(bo,"tokenToRange"),Mn(Ao,"toDocumentSegment"),(yo=ho||(ho={}))[yo.Before=0]="Before",yo[yo.After=1]="After",yo[yo.OverlapFront=2]="OverlapFront",yo[yo.OverlapBack=3]="OverlapBack",yo[yo.Inside=4]="Inside",yo[yo.Outside=5]="Outside",Mn(Co,"compareRange"),Mn(So,"inRange");var ko=/^[\w\p{L}]$/u;function xo(e,t,r=ko){if(e){if(t>0){const n=t-e.offset,a=e.text.charAt(n);r.test(a)||t--}return _o(e,t)}}function wo(e,t){if(e){const r=Oo(e,!0);if(r&&No(r,t))return r;if(Ha(e)){for(let r=e.content.findIndex(e=>!e.hidden)-1;r>=0;r--){const n=e.content[r];if(No(n,t))return n}}}}function No(e,t){return Wa(e)&&t.includes(e.tokenType.name)}function _o(e,t){if(Wa(e))return e;if(Va(e)){const r=Po(e,t,!1);if(r)return _o(r,t)}}function Io(e,t){if(Wa(e))return e;if(Va(e)){const r=Po(e,t,!0);if(r)return Io(r,t)}}function Po(e,t,r){let n,a=0,i=e.content.length-1;for(;a<=i;){const s=Math.floor((a+i)/2),o=e.content[s];if(o.offset<=t&&o.end>t)return o;o.end<=t?(n=r?o:void 0,a=s+1):i=s-1}return n}function Oo(e,t=!0){for(;e.container;){const r=e.container;let n=r.content.indexOf(e);for(;n>0;){n--;const e=r.content[n];if(t||!e.hidden)return e}e=r}}function Lo(e,t=!0){for(;e.container;){const r=e.container;let n=r.content.indexOf(e);const a=r.content.length-1;for(;n<a;){n++;const e=r.content[n];if(t||!e.hidden)return e}e=r}}function Do(e){if(0===e.range.start.character)return e;const t=e.range.start.line;let r,n=e;for(;e.container;){const a=e.container,i=r??a.content.indexOf(e);if(0===i?(e=a,r=void 0):(r=i-1,e=a.content[r]),e.range.start.line!==t)break;n=e}return n}function Mo(e,t){const r=jo(e,t);return r?r.parent.content.slice(r.a+1,r.b):[]}function jo(e,t){const r=Fo(e),n=Fo(t);let a;for(let i=0;i<r.length&&i<n.length;i++){const e=r[i],t=n[i];if(e.parent!==t.parent)break;a={parent:e.parent,a:e.index,b:t.index}}return a}function Fo(e){const t=[];for(;e.container;){const r=e.container,n=r.content.indexOf(e);t.push({parent:r,index:n}),e=r}return t.reverse()}Mn(xo,"findDeclarationNodeAtOffset"),Mn(wo,"findCommentNode"),Mn(No,"isCommentNode"),Mn(_o,"findLeafNodeAtOffset"),Mn(Io,"findLeafNodeBeforeOffset"),Mn(Po,"binarySearch"),Mn(Oo,"getPreviousNode"),Mn(Lo,"getNextNode"),Mn(Do,"getStartlineNode"),Mn(Mo,"getInteriorNodes"),Mn(jo,"getCommonParent"),Mn(Fo,"getParentChain");var Go={};Fn(Go,{findAssignment:()=>xl,findNameAssignment:()=>wl,findNodeForKeyword:()=>Sl,findNodeForProperty:()=>bl,findNodesForKeyword:()=>Cl,findNodesForKeywordInternal:()=>kl,findNodesForProperty:()=>El,getActionAtElement:()=>_l,getActionType:()=>zl,getAllReachableRules:()=>gl,getAllRulesUsedForCrossReferences:()=>Tl,getCrossReferenceTerminal:()=>$l,getEntryRule:()=>hl,getExplicitRuleType:()=>Fl,getHiddenRules:()=>yl,getRuleType:()=>ql,getRuleTypeName:()=>Kl,getTypeName:()=>Gl,isArrayCardinality:()=>Pl,isArrayOperator:()=>Ol,isCommentTerminal:()=>Rl,isDataType:()=>Ml,isDataTypeRule:()=>Ll,isOptionalCardinality:()=>Il,terminalRegex:()=>Ul});var zo=(a=class extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}},Mn(a,"ErrorWithLocation"),a);function Ko(e,t="Error: Got unexpected value."){throw new Error(t)}function qo(e,t="Error: Condition is violated."){if(!e)throw new Error(t)}Mn(Ko,"assertUnreachable"),Mn(qo,"assertCondition");var Uo={};function Bo(e){return e.charCodeAt(0)}function Vo(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function Wo(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t],e[t]=!0}function Ho(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function Yo(){throw Error("Internal Error - Should never get here!")}function Xo(e){return"Character"===e.type}Fn(Uo,{NEWLINE_REGEXP:()=>il,escapeRegExp:()=>dl,getTerminalParts:()=>ll,isMultilineComment:()=>ul,isWhitespace:()=>pl,partialMatches:()=>fl,partialRegExp:()=>ml,whitespaceCharacters:()=>cl}),Mn(Bo,"cc"),Mn(Vo,"insertToSet"),Mn(Wo,"addFlag"),Mn(Ho,"ASSERT_EXISTS"),Mn(Yo,"ASSERT_NEVER_REACH_HERE"),Mn(Xo,"isCharacter");var Zo=[];for(let zq=Bo("0");zq<=Bo("9");zq++)Zo.push(zq);var Jo=[Bo("_")].concat(Zo);for(let zq=Bo("a");zq<=Bo("z");zq++)Jo.push(zq);for(let zq=Bo("A");zq<=Bo("Z");zq++)Jo.push(zq);var Qo=[Bo(" "),Bo("\f"),Bo("\n"),Bo("\r"),Bo("\t"),Bo("\v"),Bo("\t"),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo("\u2028"),Bo("\u2029"),Bo(" "),Bo(" "),Bo(" "),Bo("\ufeff")],el=/[0-9a-fA-F]/,tl=/[0-9]/,rl=/[1-9]/,nl=(Mn(i=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Wo(r,"global");break;case"i":Wo(r,"ignoreCase");break;case"m":Wo(r,"multiLine");break;case"u":Wo(r,"unicode");break;case"y":Wo(r,"sticky")}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(){const 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(){const 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(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":let t;switch(this.consumeChar("?"),this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}}Ho(t);const r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return Yo()}quantifier(e=!1){let t;const 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"{":const r=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:r,atMost:r};break;case",":let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:r,atMost:e}):t={atLeast:r,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;Ho(t)}if(!0!==e||void 0!==t)return Ho(t)?("?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(r),t):void 0}atom(){let e;const 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()}if(void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),Ho(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Bo("\n"),Bo("\r"),Bo("\u2028"),Bo("\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=Zo;break;case"D":e=Zo,t=!0;break;case"s":e=Qo;break;case"S":e=Qo,t=!0;break;case"w":e=Jo;break;case"W":e=Jo,t=!0}if(Ho(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Bo("\f");break;case"n":e=Bo("\n");break;case"r":e=Bo("\r");break;case"t":e=Bo("\t");break;case"v":e=Bo("\v")}if(Ho(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Bo("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:Bo(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:Bo(this.popChar())}}}characterClass(){const e=[];let t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){const t=this.classAtom();if(t.type,Xo(t)&&this.isRangeDash()){this.consumeChar("-");const r=this.classAtom();if(r.type,Xo(r)){if(r.value<t.value)throw Error("Range out of order in character class");e.push({from:t.value,to:r.value})}else Vo(t.value,e),e.push(Bo("-")),Vo(r.value,e)}else Vo(t.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:Bo("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;if(this.consumeChar("("),"?"===this.peekChar(0))this.consumeChar("?"),this.consumeChar(":"),e=!1;else this.groupIdx++;const t=this.disjunction();this.consumeChar(")");const r={type:"Group",capturing:e,value:t};return e&&(r.idx=this.groupIdx),r}positiveInteger(){let e=this.popChar();if(!1===rl.test(e))throw Error("Expecting a positive integer");for(;tl.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(!1===tl.test(e))throw Error("Expecting an integer");for(;tl.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:Bo(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return tl.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2)||"<"===this.peekChar(2)&&("="===this.peekChar(3)||"!"===this.peekChar(3)));default:return!1}}isQuantifier(){const e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(t){return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let t="";for(let r=0;r<e;r++){const e=this.popChar();if(!1===el.test(e))throw Error("Expecting a HexDecimal digits");t+=e}return{type:"Character",value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){const e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},"RegExpParser"),i),al=(Mn(s=class{visitChildren(e){for(const t in e){const r=e[t];e.hasOwnProperty(t)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(e=>{this.visit(e)},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)}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){}},"BaseRegExpVisitor"),s),il=/\r?\n/gm,sl=new nl,ol=new(Mn(o=class extends al{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){const t=String.fromCharCode(e.value);if(this.multiline||"\n"!==t||(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=dl(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=Boolean("\n".match(r))}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){if("Group"===e.type){if(e.quantifier)return}super.visitChildren(e)}},"TerminalRegExpVisitor"),o);function ll(e){try{"string"!=typeof e&&(e=e.source),e=`/${e}/`;const t=sl.pattern(e),r=[];for(const n of t.value.value)ol.reset(e),ol.visit(n),r.push({start:ol.startRegexp,end:ol.endRegex});return r}catch{return[]}}function ul(e){try{return"string"==typeof e&&(e=new RegExp(e)),e=e.toString(),ol.reset(e),ol.visit(sl.pattern(e)),ol.multiline}catch{return!1}}Mn(ll,"getTerminalParts"),Mn(ul,"isMultilineComment");var cl="\f\n\r\t\v              \u2028\u2029   \ufeff".split("");function pl(e){const t="string"==typeof e?new RegExp(e):e;return cl.some(e=>t.test(e))}function dl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fl(e,t){const r=ml(e),n=t.match(r);return!!n&&n[0].length>0}function ml(e){"string"==typeof e&&(e=new RegExp(e));const t=e,r=e.source;let n=0;function a(){let e,i="";function s(e){i+=r.substr(n,e),n+=e}function o(e){i+="(?:"+r.substr(n,e)+"|$)",n+=e}for(Mn(s,"appendRaw"),Mn(o,"appendOptional");n<r.length;)switch(r[n]){case"\\":switch(r[n+1]){case"c":o(3);break;case"x":o(4);break;case"u":t.unicode?"{"===r[n+2]?o(r.indexOf("}",n)-n+1):o(6):o(2);break;case"p":case"P":t.unicode?o(r.indexOf("}",n)-n+1):o(2);break;case"k":o(r.indexOf(">",n)-n+1);break;default:o(2)}break;case"[":e=/\[(?:\\.|.)*?\]/g,e.lastIndex=n,e=e.exec(r)||[],o(e[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":s(1);break;case"{":e=/\{\d+,?\d*\}/g,e.lastIndex=n,e=e.exec(r),e?s(e[0].length):o(1);break;case"(":if("?"===r[n+1])switch(r[n+2]){case":":i+="(?:",n+=3,i+=a()+"|$)";break;case"=":i+="(?=",n+=3,i+=a()+")";break;case"!":e=n,n+=3,a(),i+=r.substr(e,n-e);break;case"<":switch(r[n+3]){case"=":case"!":e=n,n+=4,a(),i+=r.substr(e,n-e);break;default:s(r.indexOf(">",n)-n+1),i+=a()+"|$)"}}else s(1),i+=a()+"|$)";break;case")":return++n,i;default:o(1)}return i}return Mn(a,"process"),new RegExp(a(),e.flags)}function hl(e){return e.rules.find(e=>ws(e)&&e.entry)}function yl(e){return e.rules.filter(e=>Ys(e)&&e.hidden)}function gl(e,t){const r=new Set,n=hl(e);if(!n)return new Set(e.rules);const a=[n].concat(yl(e));for(const s of a)vl(s,r,t);const i=new Set;for(const s of e.rules)(r.has(s.name)||Ys(s)&&s.hidden)&&i.add(s);return i}function vl(e,t,r){t.add(e.name),pi(e).forEach(e=>{if(Ms(e)||r&&Zs(e)){const n=e.rule.ref;n&&!t.has(n.name)&&vl(n,t,r)}})}function Tl(e){const t=new Set;return pi(e).forEach(e=>{Wi(e)&&(ws(e.type.ref)&&t.add(e.type.ref),is(e.type.ref)&&ws(e.type.ref.$container)&&t.add(e.type.ref.$container))}),t}function $l(e){if(e.terminal)return e.terminal;if(e.type.ref){const t=wl(e.type.ref);return null==t?void 0:t.terminal}}function Rl(e){return e.hidden&&!pl(Ul(e))}function El(e,t){return e&&t?Al(e,t,e.astNode,!0):[]}function bl(e,t,r){if(!e||!t)return;const n=Al(e,t,e.astNode,!0);return 0!==n.length?n[r=void 0!==r?Math.max(0,Math.min(r,n.length-1)):0]:void 0}function Al(e,t,r,n){if(!n){const r=ii(e.grammarSource,Mi);if(r&&r.feature===t)return[e]}return Va(e)&&e.astNode===r?e.content.flatMap(e=>Al(e,t,r,!1)):[]}function Cl(e,t){return e?kl(e,t,null==e?void 0:e.astNode):[]}function Sl(e,t,r){if(!e)return;const n=kl(e,t,null==e?void 0:e.astNode);return 0!==n.length?n[r=void 0!==r?Math.max(0,Math.min(r,n.length-1)):0]:void 0}function kl(e,t,r){if(e.astNode!==r)return[];if(hs(e.grammarSource)&&e.grammarSource.value===t)return[e];const n=$o(e).iterator();let a;const i=[];do{if(a=n.next(),!a.done){const e=a.value;e.astNode===r?hs(e.grammarSource)&&e.grammarSource.value===t&&i.push(e):n.prune()}}while(!a.done);return i}function xl(e){var t;const r=e.astNode;for(;r===(null==(t=e.container)?void 0:t.astNode);){const t=ii(e.grammarSource,Mi);if(t)return t;e=e.container}}function wl(e){let t=e;return is(t)&&(wi(t.$container)?t=t.$container.$container:bi(t.$container)?t=t.$container:Ko(t.$container)),Nl(e,t,new Map)}function Nl(e,t,r){var n;function a(t,n){let a;return ii(t,Mi)||(a=Nl(n,n,r)),r.set(e,a),a}if(Mn(a,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(const i of pi(t)){if(Mi(i)&&"name"===i.feature.toLowerCase())return r.set(e,i),i;if(Ms(i)&&ws(i.rule.ref))return a(i,i.rule.ref);if(Fs(i)&&(null==(n=i.typeRef)?void 0:n.ref))return a(i,i.typeRef.ref)}}function _l(e){const t=e.$container;if(ns(t)){const r=t.elements;for(let t=r.indexOf(e)-1;t>=0;t--){const e=r[t];if(wi(e))return e;{const e=pi(r[t]).find(wi);if(e)return e}}}return Ri(t)?_l(t):void 0}function Il(e,t){return"?"===e||"*"===e||ns(t)&&Boolean(t.guardCondition)}function Pl(e){return"*"===e||"+"===e}function Ol(e){return"+="===e}function Ll(e){return Dl(e,new Set)}function Dl(e,t){if(t.has(e))return!0;t.add(e);for(const r of pi(e))if(Ms(r)){if(!r.rule.ref)return!1;if(ws(r.rule.ref)&&!Dl(r.rule.ref,t))return!1;if(os(r.rule.ref))return!1}else{if(Mi(r))return!1;if(wi(r))return!1}return Boolean(e.definition)}function Ml(e){return jl(e.type,new Set)}function jl(e,t){if(t.has(e))return!0;if(t.add(e),Li(e))return!1;if(_s(e))return!1;if(io(e))return e.types.every(e=>jl(e,t));if(Fs(e)){if(void 0!==e.primitiveType)return!0;if(void 0!==e.stringType)return!0;if(void 0!==e.typeRef){const r=e.typeRef.ref;return!!Qs(r)&&jl(r.type,t)}return!1}return!1}function Fl(e){if(!Ys(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){const t=e.returnType.ref;if(t)return t.name}}}function Gl(e){if(bi(e))return ws(e)&&Ll(e)?e.name:Fl(e)??e.name;if(fs(e)||Qs(e)||Ls(e))return e.name;if(wi(e)){const t=zl(e);if(t)return t}else if(is(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function zl(e){var t;return e.inferredType?e.inferredType.name:(null==(t=e.type)?void 0:t.ref)?Gl(e.type.ref):void 0}function Kl(e){var t;return Ys(e)?(null==(t=e.type)?void 0:t.name)??"string":ws(e)&&Ll(e)?e.name:Fl(e)??e.name}function ql(e){var t;return Ys(e)?(null==(t=e.type)?void 0:t.name)??"string":Fl(e)??e.name}function Ul(e){const t={s:!1,i:!1,u:!1},r=Vl(e.definition,t),n=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join("");return new RegExp(r,n)}Mn(pl,"isWhitespace"),Mn(dl,"escapeRegExp"),Mn(fl,"partialMatches"),Mn(ml,"partialRegExp"),Mn(hl,"getEntryRule"),Mn(yl,"getHiddenRules"),Mn(gl,"getAllReachableRules"),Mn(vl,"ruleDfs"),Mn(Tl,"getAllRulesUsedForCrossReferences"),Mn($l,"getCrossReferenceTerminal"),Mn(Rl,"isCommentTerminal"),Mn(El,"findNodesForProperty"),Mn(bl,"findNodeForProperty"),Mn(Al,"findNodesForPropertyInternal"),Mn(Cl,"findNodesForKeyword"),Mn(Sl,"findNodeForKeyword"),Mn(kl,"findNodesForKeywordInternal"),Mn(xl,"findAssignment"),Mn(wl,"findNameAssignment"),Mn(Nl,"findNameAssignmentInternal"),Mn(_l,"getActionAtElement"),Mn(Il,"isOptionalCardinality"),Mn(Pl,"isArrayCardinality"),Mn(Ol,"isArrayOperator"),Mn(Ll,"isDataTypeRule"),Mn(Dl,"isDataTypeRuleInternal"),Mn(Ml,"isDataType"),Mn(jl,"isDataTypeInternal"),Mn(Fl,"getExplicitRuleType"),Mn(Gl,"getTypeName"),Mn(zl,"getActionType"),Mn(Kl,"getRuleTypeName"),Mn(ql,"getRuleType"),Mn(Ul,"terminalRegex");var Bl=/[\s\S]/.source;function Vl(e,t){var r;if(qs(e))return Wl(e);if(Ws(e))return Hl(e);if(zi(e))return Zl(e);if(Zs(e)){const t=e.rule.ref;if(!t)throw new Error("Missing rule reference.");return Ql(Vl(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}if(Ts(e))return Xl(e);if(uo(e))return Yl(e);if(Ps(e)){const 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")),Ql(n,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}if(mo(e))return Ql(Bl,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${null==e?void 0:e.$type}, ${null==(r=null==e?void 0:e.$cstNode)?void 0:r.text}`)}function Wl(e){return Ql(e.elements.map(e=>Vl(e)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Hl(e){return Ql(e.elements.map(e=>Vl(e)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Yl(e){return Ql(`${Bl}*?${Vl(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Xl(e){return Ql(`(?!${Vl(e.terminal)})${Bl}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Zl(e){return e.right?Ql(`[${Jl(e.left)}-${Jl(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):Ql(Jl(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Jl(e){return dl(e.value)}function Ql(e,t){if(t.parenthesized||t.lookahead||!1!==t.wrap){e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`}return t.cardinality?`${e}${t.cardinality}`:e}function eu(e){const t=[],r=e.Grammar;for(const n of r.rules)Ys(n)&&Rl(n)&&ul(Ul(n))&&t.push(n.name);return{multilineCommentRules:t,nameRegexp:ko}}Mn(Vl,"abstractElementToRegex"),Mn(Wl,"terminalAlternativesToRegex"),Mn(Hl,"terminalGroupToRegex"),Mn(Yl,"untilTokenToRegex"),Mn(Xl,"negateTokenToRegex"),Mn(Zl,"characterRangeToRegex"),Mn(Jl,"keywordToRegex"),Mn(Ql,"withCardinality"),Mn(eu,"createGrammarConfig");var tu="object"==typeof global&&global&&global.Object===Object&&global,ru="object"==typeof self&&self&&self.Object===Object&&self,nu=tu||ru||Function("return this")(),au=nu.Symbol,iu=Object.prototype,su=iu.hasOwnProperty,ou=iu.toString,lu=au?au.toStringTag:void 0;function uu(e){var t=su.call(e,lu),r=e[lu];try{e[lu]=void 0;var n=!0}catch(i){}var a=ou.call(e);return n&&(t?e[lu]=r:delete e[lu]),a}Mn(uu,"getRawTag");var cu=uu,pu=Object.prototype.toString;function du(e){return pu.call(e)}Mn(du,"objectToString");var fu=du,mu=au?au.toStringTag:void 0;function hu(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":mu&&mu in Object(e)?cu(e):fu(e)}Mn(hu,"baseGetTag");var yu=hu;function gu(e){return null!=e&&"object"==typeof e}Mn(gu,"isObjectLike");var vu=gu;function Tu(e){return"symbol"==typeof e||vu(e)&&"[object Symbol]"==yu(e)}Mn(Tu,"isSymbol");var $u=Tu;function Ru(e,t){for(var r=-1,n=null==e?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}Mn(Ru,"arrayMap");var Eu=Ru,bu=Array.isArray,Au=au?au.prototype:void 0,Cu=Au?Au.toString:void 0;function Su(e){if("string"==typeof e)return e;if(bu(e))return Eu(e,Su)+"";if($u(e))return Cu?Cu.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}Mn(Su,"baseToString");var ku=Su,xu=/\s/;function wu(e){for(var t=e.length;t--&&xu.test(e.charAt(t)););return t}Mn(wu,"trimmedEndIndex");var Nu=wu,_u=/^\s+/;function Iu(e){return e?e.slice(0,Nu(e)+1).replace(_u,""):e}Mn(Iu,"baseTrim");var Pu=Iu;function Ou(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}Mn(Ou,"isObject");var Lu=Ou,Du=/^[-+]0x[0-9a-f]+$/i,Mu=/^0b[01]+$/i,ju=/^0o[0-7]+$/i,Fu=parseInt;function Gu(e){if("number"==typeof e)return e;if($u(e))return NaN;if(Lu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Lu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Pu(e);var r=Mu.test(e);return r||ju.test(e)?Fu(e.slice(2),r?2:8):Du.test(e)?NaN:+e}Mn(Gu,"toNumber");var zu=Gu,Ku=1/0;function qu(e){return e?(e=zu(e))===Ku||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}Mn(qu,"toFinite");var Uu=qu;function Bu(e){var t=Uu(e),r=t%1;return t==t?r?t-r:t:0}Mn(Bu,"toInteger");var Vu=Bu;function Wu(e){return e}Mn(Wu,"identity");var Hu=Wu;function Yu(e){if(!Lu(e))return!1;var t=yu(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}Mn(Yu,"isFunction");var Xu,Zu=Yu,Ju=nu["__core-js_shared__"],Qu=(Xu=/[^.]+$/.exec(Ju&&Ju.keys&&Ju.keys.IE_PROTO||""))?"Symbol(src)_1."+Xu:"";function ec(e){return!!Qu&&Qu in e}Mn(ec,"isMasked");var tc=ec,rc=Function.prototype.toString;function nc(e){if(null!=e){try{return rc.call(e)}catch(t){}try{return e+""}catch(t){}}return""}Mn(nc,"toSource");var ac=nc,ic=/^\[object .+?Constructor\]$/,sc=Function.prototype,oc=Object.prototype,lc=sc.toString,uc=oc.hasOwnProperty,cc=RegExp("^"+lc.call(uc).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pc(e){return!(!Lu(e)||tc(e))&&(Zu(e)?cc:ic).test(ac(e))}Mn(pc,"baseIsNative");var dc=pc;function fc(e,t){return null==e?void 0:e[t]}Mn(fc,"getValue");var mc=fc;function hc(e,t){var r=mc(e,t);return dc(r)?r:void 0}Mn(hc,"getNative");var yc=hc,gc=yc(nu,"WeakMap"),vc=Object.create,Tc=function(){function e(){}return Mn(e,"object"),function(t){if(!Lu(t))return{};if(vc)return vc(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function $c(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}Mn($c,"apply");var Rc=$c;function Ec(){}Mn(Ec,"noop");var bc=Ec;function Ac(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}Mn(Ac,"copyArray");var Cc=Ac,Sc=Date.now;function kc(e){var t=0,r=0;return function(){var n=Sc(),a=16-(n-r);if(r=n,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}Mn(kc,"shortOut");var xc=kc;function wc(e){return function(){return e}}Mn(wc,"constant");var Nc=wc,_c=function(){try{var e=yc(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ic=xc(_c?function(e,t){return _c(e,"toString",{configurable:!0,enumerable:!1,value:Nc(t),writable:!0})}:Hu);function Pc(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}Mn(Pc,"arrayEach");var Oc=Pc;function Lc(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}Mn(Lc,"baseFindIndex");var Dc=Lc;function Mc(e){return e!=e}Mn(Mc,"baseIsNaN");var jc=Mc;function Fc(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}Mn(Fc,"strictIndexOf");var Gc=Fc;function zc(e,t,r){return t==t?Gc(e,t,r):Dc(e,jc,r)}Mn(zc,"baseIndexOf");var Kc=zc;function qc(e,t){return!!(null==e?0:e.length)&&Kc(e,t,0)>-1}Mn(qc,"arrayIncludes");var Uc=qc,Bc=/^(?:0|[1-9]\d*)$/;function Vc(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Bc.test(e))&&e>-1&&e%1==0&&e<t}Mn(Vc,"isIndex");var Wc=Vc;function Hc(e,t,r){"__proto__"==t&&_c?_c(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}Mn(Hc,"baseAssignValue");var Yc=Hc;function Xc(e,t){return e===t||e!=e&&t!=t}Mn(Xc,"eq");var Zc=Xc,Jc=Object.prototype.hasOwnProperty;function Qc(e,t,r){var n=e[t];Jc.call(e,t)&&Zc(n,r)&&(void 0!==r||t in e)||Yc(e,t,r)}Mn(Qc,"assignValue");var ep=Qc;function tp(e,t,r,n){var a=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var o=t[i],l=n?n(r[o],e[o],o,r,e):void 0;void 0===l&&(l=e[o]),a?Yc(r,o,l):ep(r,o,l)}return r}Mn(tp,"copyObject");var rp=tp,np=Math.max;function ap(e,t,r){return t=np(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=np(n.length-t,0),s=Array(i);++a<i;)s[a]=n[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=n[a];return o[t]=r(s),Rc(e,this,o)}}Mn(ap,"overRest");var ip=ap;function sp(e,t){return Ic(ip(e,t,Hu),e+"")}Mn(sp,"baseRest");var op=sp;function lp(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}Mn(lp,"isLength");var up=lp;function cp(e){return null!=e&&up(e.length)&&!Zu(e)}Mn(cp,"isArrayLike");var pp=cp;function dp(e,t,r){if(!Lu(r))return!1;var n=typeof t;return!!("number"==n?pp(r)&&Wc(t,r.length):"string"==n&&t in r)&&Zc(r[t],e)}Mn(dp,"isIterateeCall");var fp=dp;function mp(e){return op(function(t,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(a--,i):void 0,s&&fp(r[0],r[1],s)&&(i=a<3?void 0:i,a=1),t=Object(t);++n<a;){var o=r[n];o&&e(t,o,n,i)}return t})}Mn(mp,"createAssigner");var hp=mp,yp=Object.prototype;function gp(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yp)}Mn(gp,"isPrototype");var vp=gp;function Tp(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}Mn(Tp,"baseTimes");var $p=Tp;function Rp(e){return vu(e)&&"[object Arguments]"==yu(e)}Mn(Rp,"baseIsArguments");var Ep=Rp,bp=Object.prototype,Ap=bp.hasOwnProperty,Cp=bp.propertyIsEnumerable,Sp=Ep(function(){return arguments}())?Ep:function(e){return vu(e)&&Ap.call(e,"callee")&&!Cp.call(e,"callee")};function kp(){return!1}Mn(kp,"stubFalse");var xp=kp,wp="object"==typeof exports&&exports&&!exports.nodeType&&exports,Np=wp&&"object"==typeof module&&module&&!module.nodeType&&module,_p=Np&&Np.exports===wp?nu.Buffer:void 0,Ip=(_p?_p.isBuffer:void 0)||xp,Pp={};function Op(e){return vu(e)&&up(e.length)&&!!Pp[yu(e)]}Pp["[object Float32Array]"]=Pp["[object Float64Array]"]=Pp["[object Int8Array]"]=Pp["[object Int16Array]"]=Pp["[object Int32Array]"]=Pp["[object Uint8Array]"]=Pp["[object Uint8ClampedArray]"]=Pp["[object Uint16Array]"]=Pp["[object Uint32Array]"]=!0,Pp["[object Arguments]"]=Pp["[object Array]"]=Pp["[object ArrayBuffer]"]=Pp["[object Boolean]"]=Pp["[object DataView]"]=Pp["[object Date]"]=Pp["[object Error]"]=Pp["[object Function]"]=Pp["[object Map]"]=Pp["[object Number]"]=Pp["[object Object]"]=Pp["[object RegExp]"]=Pp["[object Set]"]=Pp["[object String]"]=Pp["[object WeakMap]"]=!1,Mn(Op,"baseIsTypedArray");var Lp=Op;function Dp(e){return function(t){return e(t)}}Mn(Dp,"baseUnary");var Mp=Dp,jp="object"==typeof exports&&exports&&!exports.nodeType&&exports,Fp=jp&&"object"==typeof module&&module&&!module.nodeType&&module,Gp=Fp&&Fp.exports===jp&&tu.process,zp=function(){try{var e=Fp&&Fp.require&&Fp.require("util").types;return e||Gp&&Gp.binding&&Gp.binding("util")}catch(t){}}(),Kp=zp&&zp.isTypedArray,qp=Kp?Mp(Kp):Lp,Up=Object.prototype.hasOwnProperty;function Bp(e,t){var r=bu(e),n=!r&&Sp(e),a=!r&&!n&&Ip(e),i=!r&&!n&&!a&&qp(e),s=r||n||a||i,o=s?$p(e.length,String):[],l=o.length;for(var u in e)!t&&!Up.call(e,u)||s&&("length"==u||a&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Wc(u,l))||o.push(u);return o}Mn(Bp,"arrayLikeKeys");var Vp=Bp;function Wp(e,t){return function(r){return e(t(r))}}Mn(Wp,"overArg");var Hp=Wp,Yp=Hp(Object.keys,Object),Xp=Object.prototype.hasOwnProperty;function Zp(e){if(!vp(e))return Yp(e);var t=[];for(var r in Object(e))Xp.call(e,r)&&"constructor"!=r&&t.push(r);return t}Mn(Zp,"baseKeys");var Jp=Zp;function Qp(e){return pp(e)?Vp(e):Jp(e)}Mn(Qp,"keys");var ed=Qp,td=Object.prototype.hasOwnProperty,rd=hp(function(e,t){if(vp(t)||pp(t))rp(t,ed(t),e);else for(var r in t)td.call(t,r)&&ep(e,r,t[r])});function nd(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}Mn(nd,"nativeKeysIn");var ad=nd,id=Object.prototype.hasOwnProperty;function sd(e){if(!Lu(e))return ad(e);var t=vp(e),r=[];for(var n in e)("constructor"!=n||!t&&id.call(e,n))&&r.push(n);return r}Mn(sd,"baseKeysIn");var od=sd;function ld(e){return pp(e)?Vp(e,!0):od(e)}Mn(ld,"keysIn");var ud=ld,cd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pd=/^\w*$/;function dd(e,t){if(bu(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!$u(e))||(pd.test(e)||!cd.test(e)||null!=t&&e in Object(t))}Mn(dd,"isKey");var fd=dd,md=yc(Object,"create");function hd(){this.__data__=md?md(null):{},this.size=0}Mn(hd,"hashClear");var yd=hd;function gd(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}Mn(gd,"hashDelete");var vd=gd,Td=Object.prototype.hasOwnProperty;function $d(e){var t=this.__data__;if(md){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return Td.call(t,e)?t[e]:void 0}Mn($d,"hashGet");var Rd=$d,Ed=Object.prototype.hasOwnProperty;function bd(e){var t=this.__data__;return md?void 0!==t[e]:Ed.call(t,e)}Mn(bd,"hashHas");var Ad=bd;function Cd(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=md&&void 0===t?"__lodash_hash_undefined__":t,this}Mn(Cd,"hashSet");var Sd=Cd;function kd(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mn(kd,"Hash"),kd.prototype.clear=yd,kd.prototype.delete=vd,kd.prototype.get=Rd,kd.prototype.has=Ad,kd.prototype.set=Sd;var xd=kd;function wd(){this.__data__=[],this.size=0}Mn(wd,"listCacheClear");var Nd=wd;function _d(e,t){for(var r=e.length;r--;)if(Zc(e[r][0],t))return r;return-1}Mn(_d,"assocIndexOf");var Id=_d,Pd=Array.prototype.splice;function Od(e){var t=this.__data__,r=Id(t,e);return!(r<0)&&(r==t.length-1?t.pop():Pd.call(t,r,1),--this.size,!0)}Mn(Od,"listCacheDelete");var Ld=Od;function Dd(e){var t=this.__data__,r=Id(t,e);return r<0?void 0:t[r][1]}Mn(Dd,"listCacheGet");var Md=Dd;function jd(e){return Id(this.__data__,e)>-1}Mn(jd,"listCacheHas");var Fd=jd;function Gd(e,t){var r=this.__data__,n=Id(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}Mn(Gd,"listCacheSet");var zd=Gd;function Kd(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mn(Kd,"ListCache"),Kd.prototype.clear=Nd,Kd.prototype.delete=Ld,Kd.prototype.get=Md,Kd.prototype.has=Fd,Kd.prototype.set=zd;var qd=Kd,Ud=yc(nu,"Map");function Bd(){this.size=0,this.__data__={hash:new xd,map:new(Ud||qd),string:new xd}}Mn(Bd,"mapCacheClear");var Vd=Bd;function Wd(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}Mn(Wd,"isKeyable");var Hd=Wd;function Yd(e,t){var r=e.__data__;return Hd(t)?r["string"==typeof t?"string":"hash"]:r.map}Mn(Yd,"getMapData");var Xd=Yd;function Zd(e){var t=Xd(this,e).delete(e);return this.size-=t?1:0,t}Mn(Zd,"mapCacheDelete");var Jd=Zd;function Qd(e){return Xd(this,e).get(e)}Mn(Qd,"mapCacheGet");var ef=Qd;function tf(e){return Xd(this,e).has(e)}Mn(tf,"mapCacheHas");var rf=tf;function nf(e,t){var r=Xd(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}Mn(nf,"mapCacheSet");var af=nf;function sf(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mn(sf,"MapCache"),sf.prototype.clear=Vd,sf.prototype.delete=Jd,sf.prototype.get=ef,sf.prototype.has=rf,sf.prototype.set=af;var of=sf;function lf(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=Mn(function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=e.apply(this,n);return r.cache=i.set(a,s)||i,s},"memoized");return r.cache=new(lf.Cache||of),r}Mn(lf,"memoize"),lf.Cache=of;var uf=lf;function cf(e){var t=uf(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}Mn(cf,"memoizeCapped");var pf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,df=/\\(\\)?/g,ff=cf(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(pf,function(e,r,n,a){t.push(n?a.replace(df,"$1"):r||e)}),t});function mf(e){return null==e?"":ku(e)}Mn(mf,"toString");var hf=mf;function yf(e,t){return bu(e)?e:fd(e,t)?[e]:ff(hf(e))}Mn(yf,"castPath");var gf=yf;function vf(e){if("string"==typeof e||$u(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}Mn(vf,"toKey");var Tf=vf;function $f(e,t){for(var r=0,n=(t=gf(t,e)).length;null!=e&&r<n;)e=e[Tf(t[r++])];return r&&r==n?e:void 0}Mn($f,"baseGet");var Rf=$f;function Ef(e,t,r){var n=null==e?void 0:Rf(e,t);return void 0===n?r:n}Mn(Ef,"get");var bf=Ef;function Af(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}Mn(Af,"arrayPush");var Cf=Af,Sf=au?au.isConcatSpreadable:void 0;function kf(e){return bu(e)||Sp(e)||!!(Sf&&e&&e[Sf])}Mn(kf,"isFlattenable");var xf=kf;function wf(e,t,r,n,a){var i=-1,s=e.length;for(r||(r=xf),a||(a=[]);++i<s;){var o=e[i];t>0&&r(o)?t>1?wf(o,t-1,r,n,a):Cf(a,o):n||(a[a.length]=o)}return a}Mn(wf,"baseFlatten");var Nf=wf;function _f(e){return(null==e?0:e.length)?Nf(e,1):[]}Mn(_f,"flatten");var If=_f,Pf=Hp(Object.getPrototypeOf,Object);function Of(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(r=r>a?a:r)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}Mn(Of,"baseSlice");var Lf=Of;function Df(e,t,r,n){var a=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++a]);++a<i;)r=t(r,e[a],a,e);return r}Mn(Df,"arrayReduce");var Mf=Df;function jf(){this.__data__=new qd,this.size=0}Mn(jf,"stackClear");var Ff=jf;function Gf(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}Mn(Gf,"stackDelete");var zf=Gf;function Kf(e){return this.__data__.get(e)}Mn(Kf,"stackGet");var qf=Kf;function Uf(e){return this.__data__.has(e)}Mn(Uf,"stackHas");var Bf=Uf;function Vf(e,t){var r=this.__data__;if(r instanceof qd){var n=r.__data__;if(!Ud||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new of(n)}return r.set(e,t),this.size=r.size,this}Mn(Vf,"stackSet");var Wf=Vf;function Hf(e){var t=this.__data__=new qd(e);this.size=t.size}Mn(Hf,"Stack"),Hf.prototype.clear=Ff,Hf.prototype.delete=zf,Hf.prototype.get=qf,Hf.prototype.has=Bf,Hf.prototype.set=Wf;var Yf=Hf;function Xf(e,t){return e&&rp(t,ed(t),e)}Mn(Xf,"baseAssign");var Zf=Xf;function Jf(e,t){return e&&rp(t,ud(t),e)}Mn(Jf,"baseAssignIn");var Qf=Jf,em="object"==typeof exports&&exports&&!exports.nodeType&&exports,tm=em&&"object"==typeof module&&module&&!module.nodeType&&module,rm=tm&&tm.exports===em?nu.Buffer:void 0,nm=rm?rm.allocUnsafe:void 0;function am(e,t){if(t)return e.slice();var r=e.length,n=nm?nm(r):new e.constructor(r);return e.copy(n),n}Mn(am,"cloneBuffer");var im=am;function sm(e,t){for(var r=-1,n=null==e?0:e.length,a=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[a++]=s)}return i}Mn(sm,"arrayFilter");var om=sm;function lm(){return[]}Mn(lm,"stubArray");var um=lm,cm=Object.prototype.propertyIsEnumerable,pm=Object.getOwnPropertySymbols,dm=pm?function(e){return null==e?[]:(e=Object(e),om(pm(e),function(t){return cm.call(e,t)}))}:um;function fm(e,t){return rp(e,dm(e),t)}Mn(fm,"copySymbols");var mm=fm,hm=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Cf(t,dm(e)),e=Pf(e);return t}:um;function ym(e,t){return rp(e,hm(e),t)}Mn(ym,"copySymbolsIn");var gm=ym;function vm(e,t,r){var n=t(e);return bu(e)?n:Cf(n,r(e))}Mn(vm,"baseGetAllKeys");var Tm=vm;function $m(e){return Tm(e,ed,dm)}Mn($m,"getAllKeys");var Rm=$m;function Em(e){return Tm(e,ud,hm)}Mn(Em,"getAllKeysIn");var bm=Em,Am=yc(nu,"DataView"),Cm=yc(nu,"Promise"),Sm=yc(nu,"Set"),km="[object Map]",xm="[object Promise]",wm="[object Set]",Nm="[object WeakMap]",_m="[object DataView]",Im=ac(Am),Pm=ac(Ud),Om=ac(Cm),Lm=ac(Sm),Dm=ac(gc),Mm=yu;(Am&&Mm(new Am(new ArrayBuffer(1)))!=_m||Ud&&Mm(new Ud)!=km||Cm&&Mm(Cm.resolve())!=xm||Sm&&Mm(new Sm)!=wm||gc&&Mm(new gc)!=Nm)&&(Mm=Mn(function(e){var t=yu(e),r="[object Object]"==t?e.constructor:void 0,n=r?ac(r):"";if(n)switch(n){case Im:return _m;case Pm:return km;case Om:return xm;case Lm:return wm;case Dm:return Nm}return t},"getTag"));var jm=Mm,Fm=Object.prototype.hasOwnProperty;function Gm(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Fm.call(e,"index")&&(r.index=e.index,r.input=e.input),r}Mn(Gm,"initCloneArray");var zm=Gm,Km=nu.Uint8Array;function qm(e){var t=new e.constructor(e.byteLength);return new Km(t).set(new Km(e)),t}Mn(qm,"cloneArrayBuffer");var Um=qm;function Bm(e,t){var r=t?Um(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}Mn(Bm,"cloneDataView");var Vm=Bm,Wm=/\w*$/;function Hm(e){var t=new e.constructor(e.source,Wm.exec(e));return t.lastIndex=e.lastIndex,t}Mn(Hm,"cloneRegExp");var Ym=Hm,Xm=au?au.prototype:void 0,Zm=Xm?Xm.valueOf:void 0;function Jm(e){return Zm?Object(Zm.call(e)):{}}Mn(Jm,"cloneSymbol");var Qm=Jm;function eh(e,t){var r=t?Um(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}Mn(eh,"cloneTypedArray");var th=eh;function rh(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return Um(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return Vm(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return th(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return Ym(e);case"[object Symbol]":return Qm(e)}}Mn(rh,"initCloneByTag");var nh=rh;function ah(e){return"function"!=typeof e.constructor||vp(e)?{}:Tc(Pf(e))}Mn(ah,"initCloneObject");var ih=ah;function sh(e){return vu(e)&&"[object Map]"==jm(e)}Mn(sh,"baseIsMap");var oh=sh,lh=zp&&zp.isMap,uh=lh?Mp(lh):oh;function ch(e){return vu(e)&&"[object Set]"==jm(e)}Mn(ch,"baseIsSet");var ph=ch,dh=zp&&zp.isSet,fh=dh?Mp(dh):ph,mh="[object Arguments]",hh="[object Function]",yh="[object Object]",gh={};function vh(e,t,r,n,a,i){var s,o=1&t,l=2&t,u=4&t;if(r&&(s=a?r(e,n,a,i):r(e)),void 0!==s)return s;if(!Lu(e))return e;var c=bu(e);if(c){if(s=zm(e),!o)return Cc(e,s)}else{var p=jm(e),d=p==hh||"[object GeneratorFunction]"==p;if(Ip(e))return im(e,o);if(p==yh||p==mh||d&&!a){if(s=l||d?{}:ih(e),!o)return l?gm(e,Qf(s,e)):mm(e,Zf(s,e))}else{if(!gh[p])return a?e:{};s=nh(e,p,o)}}i||(i=new Yf);var f=i.get(e);if(f)return f;i.set(e,s),fh(e)?e.forEach(function(n){s.add(vh(n,t,r,n,e,i))}):uh(e)&&e.forEach(function(n,a){s.set(a,vh(n,t,r,a,e,i))});var m=c?void 0:(u?l?bm:Rm:l?ud:ed)(e);return Oc(m||e,function(n,a){m&&(n=e[a=n]),ep(s,a,vh(n,t,r,a,e,i))}),s}gh[mh]=gh["[object Array]"]=gh["[object ArrayBuffer]"]=gh["[object DataView]"]=gh["[object Boolean]"]=gh["[object Date]"]=gh["[object Float32Array]"]=gh["[object Float64Array]"]=gh["[object Int8Array]"]=gh["[object Int16Array]"]=gh["[object Int32Array]"]=gh["[object Map]"]=gh["[object Number]"]=gh[yh]=gh["[object RegExp]"]=gh["[object Set]"]=gh["[object String]"]=gh["[object Symbol]"]=gh["[object Uint8Array]"]=gh["[object Uint8ClampedArray]"]=gh["[object Uint16Array]"]=gh["[object Uint32Array]"]=!0,gh["[object Error]"]=gh[hh]=gh["[object WeakMap]"]=!1,Mn(vh,"baseClone");var Th=vh;function $h(e){return Th(e,4)}Mn($h,"clone");var Rh=$h;function Eh(e){for(var t=-1,r=null==e?0:e.length,n=0,a=[];++t<r;){var i=e[t];i&&(a[n++]=i)}return a}Mn(Eh,"compact");var bh=Eh;function Ah(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}Mn(Ah,"setCacheAdd");var Ch=Ah;function Sh(e){return this.__data__.has(e)}Mn(Sh,"setCacheHas");var kh=Sh;function xh(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new of;++t<r;)this.add(e[t])}Mn(xh,"SetCache"),xh.prototype.add=xh.prototype.push=Ch,xh.prototype.has=kh;var wh=xh;function Nh(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}Mn(Nh,"arraySome");var _h=Nh;function Ih(e,t){return e.has(t)}Mn(Ih,"cacheHas");var Ph=Ih;function Oh(e,t,r,n,a,i){var s=1&r,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var p=-1,d=!0,f=2&r?new wh:void 0;for(i.set(e,t),i.set(t,e);++p<o;){var m=e[p],h=t[p];if(n)var y=s?n(h,m,p,t,e,i):n(m,h,p,e,t,i);if(void 0!==y){if(y)continue;d=!1;break}if(f){if(!_h(t,function(e,t){if(!Ph(f,t)&&(m===e||a(m,e,r,n,i)))return f.push(t)})){d=!1;break}}else if(m!==h&&!a(m,h,r,n,i)){d=!1;break}}return i.delete(e),i.delete(t),d}Mn(Oh,"equalArrays");var Lh=Oh;function Dh(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}Mn(Dh,"mapToArray");var Mh=Dh;function jh(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}Mn(jh,"setToArray");var Fh=jh,Gh=au?au.prototype:void 0,zh=Gh?Gh.valueOf:void 0;function Kh(e,t,r,n,a,i,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Km(e),new Km(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Zc(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=Mh;case"[object Set]":var l=1&n;if(o||(o=Fh),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var c=Lh(o(e),o(t),n,a,i,s);return s.delete(e),c;case"[object Symbol]":if(zh)return zh.call(e)==zh.call(t)}return!1}Mn(Kh,"equalByTag");var qh=Kh,Uh=Object.prototype.hasOwnProperty;function Bh(e,t,r,n,a,i){var s=1&r,o=Rm(e),l=o.length;if(l!=Rm(t).length&&!s)return!1;for(var u=l;u--;){var c=o[u];if(!(s?c in t:Uh.call(t,c)))return!1}var p=i.get(e),d=i.get(t);if(p&&d)return p==t&&d==e;var f=!0;i.set(e,t),i.set(t,e);for(var m=s;++u<l;){var h=e[c=o[u]],y=t[c];if(n)var g=s?n(y,h,c,t,e,i):n(h,y,c,e,t,i);if(!(void 0===g?h===y||a(h,y,r,n,i):g)){f=!1;break}m||(m="constructor"==c)}if(f&&!m){var v=e.constructor,T=t.constructor;v==T||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof T&&T instanceof T||(f=!1)}return i.delete(e),i.delete(t),f}Mn(Bh,"equalObjects");var Vh=Bh,Wh="[object Arguments]",Hh="[object Array]",Yh="[object Object]",Xh=Object.prototype.hasOwnProperty;function Zh(e,t,r,n,a,i){var s=bu(e),o=bu(t),l=s?Hh:jm(e),u=o?Hh:jm(t),c=(l=l==Wh?Yh:l)==Yh,p=(u=u==Wh?Yh:u)==Yh,d=l==u;if(d&&Ip(e)){if(!Ip(t))return!1;s=!0,c=!1}if(d&&!c)return i||(i=new Yf),s||qp(e)?Lh(e,t,r,n,a,i):qh(e,t,l,r,n,a,i);if(!(1&r)){var f=c&&Xh.call(e,"__wrapped__"),m=p&&Xh.call(t,"__wrapped__");if(f||m){var h=f?e.value():e,y=m?t.value():t;return i||(i=new Yf),a(h,y,r,n,i)}}return!!d&&(i||(i=new Yf),Vh(e,t,r,n,a,i))}Mn(Zh,"baseIsEqualDeep");var Jh=Zh;function Qh(e,t,r,n,a){return e===t||(null==e||null==t||!vu(e)&&!vu(t)?e!=e&&t!=t:Jh(e,t,r,n,Qh,a))}Mn(Qh,"baseIsEqual");var ey=Qh;function ty(e,t,r,n){var a=r.length,i=a,s=!n;if(null==e)return!i;for(e=Object(e);a--;){var o=r[a];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<i;){var l=(o=r[a])[0],u=e[l],c=o[1];if(s&&o[2]){if(void 0===u&&!(l in e))return!1}else{var p=new Yf;if(n)var d=n(u,c,l,e,t,p);if(!(void 0===d?ey(c,u,3,n,p):d))return!1}}return!0}Mn(ty,"baseIsMatch");var ry=ty;function ny(e){return e==e&&!Lu(e)}Mn(ny,"isStrictComparable");var ay=ny;function iy(e){for(var t=ed(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,ay(a)]}return t}Mn(iy,"getMatchData");var sy=iy;function oy(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}Mn(oy,"matchesStrictComparable");var ly=oy;function uy(e){var t=sy(e);return 1==t.length&&t[0][2]?ly(t[0][0],t[0][1]):function(r){return r===e||ry(r,e,t)}}Mn(uy,"baseMatches");var cy=uy;function py(e,t){return null!=e&&t in Object(e)}Mn(py,"baseHasIn");var dy=py;function fy(e,t,r){for(var n=-1,a=(t=gf(t,e)).length,i=!1;++n<a;){var s=Tf(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=a?i:!!(a=null==e?0:e.length)&&up(a)&&Wc(s,a)&&(bu(e)||Sp(e))}Mn(fy,"hasPath");var my=fy;function hy(e,t){return null!=e&&my(e,t,dy)}Mn(hy,"hasIn");var yy=hy;function gy(e,t){return fd(e)&&ay(t)?ly(Tf(e),t):function(r){var n=bf(r,e);return void 0===n&&n===t?yy(r,e):ey(t,n,3)}}Mn(gy,"baseMatchesProperty");var vy=gy;function Ty(e){return function(t){return null==t?void 0:t[e]}}Mn(Ty,"baseProperty");var $y=Ty;function Ry(e){return function(t){return Rf(t,e)}}Mn(Ry,"basePropertyDeep");var Ey=Ry;function by(e){return fd(e)?$y(Tf(e)):Ey(e)}Mn(by,"property");var Ay=by;function Cy(e){return"function"==typeof e?e:null==e?Hu:"object"==typeof e?bu(e)?vy(e[0],e[1]):cy(e):Ay(e)}Mn(Cy,"baseIteratee");var Sy=Cy;function ky(e,t,r,n){for(var a=-1,i=null==e?0:e.length;++a<i;){var s=e[a];t(n,s,r(s),e)}return n}Mn(ky,"arrayAggregator");var xy=ky;function wy(e){return function(t,r,n){for(var a=-1,i=Object(t),s=n(t),o=s.length;o--;){var l=s[e?o:++a];if(!1===r(i[l],l,i))break}return t}}Mn(wy,"createBaseFor");var Ny=wy();function _y(e,t){return e&&Ny(e,t,ed)}Mn(_y,"baseForOwn");var Iy=_y;function Py(e,t){return function(r,n){if(null==r)return r;if(!pp(r))return e(r,n);for(var a=r.length,i=t?a:-1,s=Object(r);(t?i--:++i<a)&&!1!==n(s[i],i,s););return r}}Mn(Py,"createBaseEach");var Oy=Py(Iy);function Ly(e,t,r,n){return Oy(e,function(e,a,i){t(n,e,r(e),i)}),n}Mn(Ly,"baseAggregator");var Dy=Ly;function My(e,t){return function(r,n){var a=bu(r)?xy:Dy,i=t?t():{};return a(r,e,Sy(n),i)}}Mn(My,"createAggregator");var jy=My,Fy=Object.prototype,Gy=Fy.hasOwnProperty,zy=op(function(e,t){e=Object(e);var r=-1,n=t.length,a=n>2?t[2]:void 0;for(a&&fp(t[0],t[1],a)&&(n=1);++r<n;)for(var i=t[r],s=ud(i),o=-1,l=s.length;++o<l;){var u=s[o],c=e[u];(void 0===c||Zc(c,Fy[u])&&!Gy.call(e,u))&&(e[u]=i[u])}return e});function Ky(e){return vu(e)&&pp(e)}Mn(Ky,"isArrayLikeObject");var qy=Ky;function Uy(e,t,r){for(var n=-1,a=null==e?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}Mn(Uy,"arrayIncludesWith");var By=Uy;function Vy(e,t,r,n){var a=-1,i=Uc,s=!0,o=e.length,l=[],u=t.length;if(!o)return l;r&&(t=Eu(t,Mp(r))),n?(i=By,s=!1):t.length>=200&&(i=Ph,s=!1,t=new wh(t));e:for(;++a<o;){var c=e[a],p=null==r?c:r(c);if(c=n||0!==c?c:0,s&&p==p){for(var d=u;d--;)if(t[d]===p)continue e;l.push(c)}else i(t,p,n)||l.push(c)}return l}Mn(Vy,"baseDifference");var Wy=Vy,Hy=op(function(e,t){return qy(e)?Wy(e,Nf(t,1,qy,!0)):[]});function Yy(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}Mn(Yy,"last");var Xy=Yy;function Zy(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:Vu(t),Lf(e,t<0?0:t,n)):[]}Mn(Zy,"drop");var Jy=Zy;function Qy(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:Vu(t),Lf(e,0,(t=n-t)<0?0:t)):[]}Mn(Qy,"dropRight");var eg=Qy;function tg(e){return"function"==typeof e?e:Hu}Mn(tg,"castFunction");var rg=tg;function ng(e,t){return(bu(e)?Oc:Oy)(e,rg(t))}Mn(ng,"forEach");var ag=ng;function ig(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}Mn(ig,"arrayEvery");var sg=ig;function og(e,t){var r=!0;return Oy(e,function(e,n,a){return r=!!t(e,n,a)}),r}Mn(og,"baseEvery");var lg=og;function ug(e,t,r){var n=bu(e)?sg:lg;return r&&fp(e,t,r)&&(t=void 0),n(e,Sy(t))}Mn(ug,"every");var cg=ug;function pg(e,t){var r=[];return Oy(e,function(e,n,a){t(e,n,a)&&r.push(e)}),r}Mn(pg,"baseFilter");var dg=pg;function fg(e,t){return(bu(e)?om:dg)(e,Sy(t))}Mn(fg,"filter");var mg=fg;function hg(e){return function(t,r,n){var a=Object(t);if(!pp(t)){var i=Sy(r);t=ed(t),r=Mn(function(e){return i(a[e],e,a)},"predicate")}var s=e(t,r,n);return s>-1?a[i?t[s]:s]:void 0}}Mn(hg,"createFind");var yg=hg,gg=Math.max;function vg(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=null==r?0:Vu(r);return a<0&&(a=gg(n+a,0)),Dc(e,Sy(t),a)}Mn(vg,"findIndex");var Tg=yg(vg);function $g(e){return e&&e.length?e[0]:void 0}Mn($g,"head");var Rg=$g;function Eg(e,t){var r=-1,n=pp(e)?Array(e.length):[];return Oy(e,function(e,a,i){n[++r]=t(e,a,i)}),n}Mn(Eg,"baseMap");var bg=Eg;function Ag(e,t){return(bu(e)?Eu:bg)(e,Sy(t))}Mn(Ag,"map");var Cg=Ag;function Sg(e,t){return Nf(Cg(e,t),1)}Mn(Sg,"flatMap");var kg=Sg,xg=Object.prototype.hasOwnProperty,wg=jy(function(e,t,r){xg.call(e,r)?e[r].push(t):Yc(e,r,[t])}),Ng=Object.prototype.hasOwnProperty;function _g(e,t){return null!=e&&Ng.call(e,t)}Mn(_g,"baseHas");var Ig=_g;function Pg(e,t){return null!=e&&my(e,t,Ig)}Mn(Pg,"has");var Og=Pg;function Lg(e){return"string"==typeof e||!bu(e)&&vu(e)&&"[object String]"==yu(e)}Mn(Lg,"isString");var Dg=Lg;function Mg(e,t){return Eu(t,function(t){return e[t]})}Mn(Mg,"baseValues");var jg=Mg;function Fg(e){return null==e?[]:jg(e,ed(e))}Mn(Fg,"values");var Gg=Fg,zg=Math.max;function Kg(e,t,r,n){e=pp(e)?e:Gg(e),r=r&&!n?Vu(r):0;var a=e.length;return r<0&&(r=zg(a+r,0)),Dg(e)?r<=a&&e.indexOf(t,r)>-1:!!a&&Kc(e,t,r)>-1}Mn(Kg,"includes");var qg=Kg,Ug=Math.max;function Bg(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=null==r?0:Vu(r);return a<0&&(a=Ug(n+a,0)),Kc(e,t,a)}Mn(Bg,"indexOf");var Vg=Bg,Wg=Object.prototype.hasOwnProperty;function Hg(e){if(null==e)return!0;if(pp(e)&&(bu(e)||"string"==typeof e||"function"==typeof e.splice||Ip(e)||qp(e)||Sp(e)))return!e.length;var t=jm(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(vp(e))return!Jp(e).length;for(var r in e)if(Wg.call(e,r))return!1;return!0}Mn(Hg,"isEmpty");var Yg=Hg;function Xg(e){return vu(e)&&"[object RegExp]"==yu(e)}Mn(Xg,"baseIsRegExp");var Zg=Xg,Jg=zp&&zp.isRegExp,Qg=Jg?Mp(Jg):Zg;function ev(e){return void 0===e}Mn(ev,"isUndefined");var tv=ev;function rv(e){if("function"!=typeof e)throw new TypeError("Expected a function");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)}}Mn(rv,"negate");var nv=rv;function av(e,t,r,n){if(!Lu(e))return e;for(var a=-1,i=(t=gf(t,e)).length,s=i-1,o=e;null!=o&&++a<i;){var l=Tf(t[a]),u=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(a!=s){var c=o[l];void 0===(u=n?n(c,l,o):void 0)&&(u=Lu(c)?c:Wc(t[a+1])?[]:{})}ep(o,l,u),o=o[l]}return e}Mn(av,"baseSet");var iv=av;function sv(e,t,r){for(var n=-1,a=t.length,i={};++n<a;){var s=t[n],o=Rf(e,s);r(o,s)&&iv(i,gf(s,e),o)}return i}Mn(sv,"basePickBy");var ov=sv;function lv(e,t){if(null==e)return{};var r=Eu(bm(e),function(e){return[e]});return t=Sy(t),ov(e,r,function(e,r){return t(e,r[0])})}Mn(lv,"pickBy");var uv=lv;function cv(e,t,r,n,a){return a(e,function(e,a,i){r=n?(n=!1,e):t(r,e,a,i)}),r}Mn(cv,"baseReduce");var pv=cv;function dv(e,t,r){var n=bu(e)?Mf:pv,a=arguments.length<3;return n(e,Sy(t),r,a,Oy)}Mn(dv,"reduce");var fv=dv;function mv(e,t){return(bu(e)?om:dg)(e,nv(Sy(t)))}Mn(mv,"reject");var hv=mv;function yv(e,t){var r;return Oy(e,function(e,n,a){return!(r=t(e,n,a))}),!!r}Mn(yv,"baseSome");var gv=yv;function vv(e,t,r){var n=bu(e)?_h:gv;return r&&fp(e,t,r)&&(t=void 0),n(e,Sy(t))}Mn(vv,"some");var Tv=vv,$v=Sm&&1/Fh(new Sm([,-0]))[1]==1/0?function(e){return new Sm(e)}:bc;function Rv(e,t,r){var n=-1,a=Uc,i=e.length,s=!0,o=[],l=o;if(r)s=!1,a=By;else if(i>=200){var u=t?null:$v(e);if(u)return Fh(u);s=!1,a=Ph,l=new wh}else l=t?[]:o;e:for(;++n<i;){var c=e[n],p=t?t(c):c;if(c=r||0!==c?c:0,s&&p==p){for(var d=l.length;d--;)if(l[d]===p)continue e;t&&l.push(p),o.push(c)}else a(l,p,r)||(l!==o&&l.push(p),o.push(c))}return o}Mn(Rv,"baseUniq");var Ev=Rv;function bv(e){return e&&e.length?Ev(e):[]}Mn(bv,"uniq");var Av=bv;function Cv(e){console&&console.error}function Sv(e){console&&console.warn}function kv(e){const t=(new Date).getTime(),r=e();return{time:(new Date).getTime()-t,value:r}}function xv(e){function t(){}Mn(t,"FakeConstructor"),t.prototype=e;const r=new t;function n(){return typeof r.bar}return Mn(n,"fakeAccess"),n(),n(),e}function wv(e){return Nv(e)?e.LABEL:e.name}function Nv(e){return Dg(e.LABEL)&&""!==e.LABEL}Mn(Cv,"PRINT_ERROR"),Mn(Sv,"PRINT_WARNING"),Mn(kv,"timer"),Mn(xv,"toFastProperties"),Mn(wv,"tokenLabel"),Mn(Nv,"hasTokenLabel");var _v=(Mn(l=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),ag(this.definition,t=>{t.accept(e)})}},"AbstractProduction"),l),Iv=(Mn(u=class extends _v{constructor(e){super([]),this.idx=1,rd(this,uv(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}},"NonTerminal"),u),Pv=(Mn(c=class extends _v{constructor(e){super(e.definition),this.orgText="",rd(this,uv(e,e=>void 0!==e))}},"Rule"),c),Ov=(Mn(p=class extends _v{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,rd(this,uv(e,e=>void 0!==e))}},"Alternative"),p),Lv=(Mn(d=class extends _v{constructor(e){super(e.definition),this.idx=1,rd(this,uv(e,e=>void 0!==e))}},"Option"),d),Dv=(Mn(f=class extends _v{constructor(e){super(e.definition),this.idx=1,rd(this,uv(e,e=>void 0!==e))}},"RepetitionMandatory"),f),Mv=(Mn(m=class extends _v{constructor(e){super(e.definition),this.idx=1,rd(this,uv(e,e=>void 0!==e))}},"RepetitionMandatoryWithSeparator"),m),jv=(Mn(h=class extends _v{constructor(e){super(e.definition),this.idx=1,rd(this,uv(e,e=>void 0!==e))}},"Repetition"),h),Fv=(Mn(y=class extends _v{constructor(e){super(e.definition),this.idx=1,rd(this,uv(e,e=>void 0!==e))}},"RepetitionWithSeparator"),y),Gv=(Mn(g=class extends _v{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,rd(this,uv(e,e=>void 0!==e))}},"Alternation"),g),zv=(Mn(v=class{constructor(e){this.idx=1,rd(this,uv(e,e=>void 0!==e))}accept(e){e.visit(this)}},"Terminal"),v);function Kv(e){return Cg(e,qv)}function qv(e){function t(e){return Cg(e,qv)}if(Mn(t,"convertDefinition"),e instanceof Iv){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return Dg(e.label)&&(t.label=e.label),t}if(e instanceof Ov)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Lv)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Dv)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Mv)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:qv(new zv({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Fv)return{type:"RepetitionWithSeparator",idx:e.idx,separator:qv(new zv({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof jv)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Gv)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof zv){const t={type:"Terminal",name:e.terminalType.name,label:wv(e.terminalType),idx:e.idx};Dg(e.label)&&(t.terminalLabel=e.label);const r=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=Qg(r)?r.source:r),t}if(e instanceof Pv)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}Mn(Kv,"serializeGrammar"),Mn(qv,"serializeProduction");var Uv=(Mn(T=class{visit(e){const t=e;switch(t.constructor){case Iv:return this.visitNonTerminal(t);case Ov:return this.visitAlternative(t);case Lv:return this.visitOption(t);case Dv:return this.visitRepetitionMandatory(t);case Mv:return this.visitRepetitionMandatoryWithSeparator(t);case Fv:return this.visitRepetitionWithSeparator(t);case jv:return this.visitRepetition(t);case Gv:return this.visitAlternation(t);case zv:return this.visitTerminal(t);case Pv: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){}},"GAstVisitor"),T);function Bv(e){return e instanceof Ov||e instanceof Lv||e instanceof jv||e instanceof Dv||e instanceof Mv||e instanceof Fv||e instanceof zv||e instanceof Pv}function Vv(e,t=[]){return!!(e instanceof Lv||e instanceof jv||e instanceof Fv)||(e instanceof Gv?Tv(e.definition,e=>Vv(e,t)):!(e instanceof Iv&&qg(t,e))&&(e instanceof _v&&(e instanceof Iv&&t.push(e),cg(e.definition,e=>Vv(e,t)))))}function Wv(e){return e instanceof Gv}function Hv(e){if(e instanceof Iv)return"SUBRULE";if(e instanceof Lv)return"OPTION";if(e instanceof Gv)return"OR";if(e instanceof Dv)return"AT_LEAST_ONE";if(e instanceof Mv)return"AT_LEAST_ONE_SEP";if(e instanceof Fv)return"MANY_SEP";if(e instanceof jv)return"MANY";if(e instanceof zv)return"CONSUME";throw Error("non exhaustive match")}Mn(Bv,"isSequenceProd"),Mn(Vv,"isOptionalProd"),Mn(Wv,"isBranchingProd"),Mn(Hv,"getProductionDslName");var Yv=(Mn($=class{walk(e,t=[]){ag(e.definition,(r,n)=>{const a=Jy(e.definition,n+1);if(r instanceof Iv)this.walkProdRef(r,a,t);else if(r instanceof zv)this.walkTerminal(r,a,t);else if(r instanceof Ov)this.walkFlat(r,a,t);else if(r instanceof Lv)this.walkOption(r,a,t);else if(r instanceof Dv)this.walkAtLeastOne(r,a,t);else if(r instanceof Mv)this.walkAtLeastOneSep(r,a,t);else if(r instanceof Fv)this.walkManySep(r,a,t);else if(r instanceof jv)this.walkMany(r,a,t);else{if(!(r instanceof Gv))throw Error("non exhaustive match");this.walkOr(r,a,t)}})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){const n=t.concat(r);this.walk(e,n)}walkOption(e,t,r){const n=t.concat(r);this.walk(e,n)}walkAtLeastOne(e,t,r){const n=[new Lv({definition:e.definition})].concat(t,r);this.walk(e,n)}walkAtLeastOneSep(e,t,r){const n=Xv(e,t,r);this.walk(e,n)}walkMany(e,t,r){const n=[new Lv({definition:e.definition})].concat(t,r);this.walk(e,n)}walkManySep(e,t,r){const n=Xv(e,t,r);this.walk(e,n)}walkOr(e,t,r){const n=t.concat(r);ag(e.definition,e=>{const t=new Ov({definition:[e]});this.walk(t,n)})}},"RestWalker"),$);function Xv(e,t,r){return[new Lv({definition:[new zv({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function Zv(e){if(e instanceof Iv)return Zv(e.referencedRule);if(e instanceof zv)return eT(e);if(Bv(e))return Jv(e);if(Wv(e))return Qv(e);throw Error("non exhaustive match")}function Jv(e){let t=[];const r=e.definition;let n,a=0,i=r.length>a,s=!0;for(;i&&s;)n=r[a],s=Vv(n),t=t.concat(Zv(n)),a+=1,i=r.length>a;return Av(t)}function Qv(e){const t=Cg(e.definition,e=>Zv(e));return Av(If(t))}function eT(e){return[e.terminalType]}Mn(Xv,"restForRepetitionWithSeparator"),Mn(Zv,"first"),Mn(Jv,"firstForSequence"),Mn(Qv,"firstForBranching"),Mn(eT,"firstForTerminal");var tT="_~IN~_",rT=(Mn(R=class extends Yv{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){const n=aT(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(r),i=Zv(new Ov({definition:a}));this.follows[n]=i}},"ResyncFollowsWalker"),R);function nT(e){const t={};return ag(e,e=>{const r=new rT(e).startWalking();rd(t,r)}),t}function aT(e,t){return e.name+t+tT}Mn(nT,"computeAllProdsFollows"),Mn(aT,"buildBetweenProdsFollowPrefix");var iT={},sT=new nl;function oT(e){const t=e.toString();if(iT.hasOwnProperty(t))return iT[t];{const e=sT.pattern(t);return iT[t]=e,e}}function lT(){iT={}}Mn(oT,"getRegExpAst"),Mn(lT,"clearRegExpParserCache");var uT="Complement Sets are not supported for first char optimization";function cT(e,t=!1){try{const t=oT(e);return pT(t.value,{},t.flags.ignoreCase)}catch(r){if(r.message===uT)t&&Sv(e.toString());else{let r="";t&&(r="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Cv(e.toString())}}return[]}function pT(e,t,r){switch(e.type){case"Disjunction":for(let a=0;a<e.value.length;a++)pT(e.value[a],t,r);break;case"Alternative":const n=e.value;for(let e=0;e<n.length;e++){const a=n[e];switch(a.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const i=a;switch(i.type){case"Character":dT(i.value,t,r);break;case"Set":if(!0===i.complement)throw Error(uT);ag(i.value,e=>{if("number"==typeof e)dT(e,t,r);else{const n=e;if(!0===r)for(let e=n.from;e<=n.to;e++)dT(e,t,r);else{for(let e=n.from;e<=n.to&&e<XT;e++)dT(e,t,r);if(n.to>=XT){const e=n.from>=XT?n.from:XT,r=n.to,a=JT(e),i=JT(r);for(let n=a;n<=i;n++)t[n]=n}}}});break;case"Group":pT(i.value,t,r);break;default:throw Error("Non Exhaustive Match")}const s=void 0!==i.quantifier&&0===i.quantifier.atLeast;if("Group"===i.type&&!1===hT(i)||"Group"!==i.type&&!1===s)break}break;default:throw Error("non exhaustive match!")}return Gg(t)}function dT(e,t,r){const n=JT(e);t[n]=n,!0===r&&fT(e,t)}function fT(e,t){const r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){const e=JT(n.charCodeAt(0));t[e]=e}else{const e=r.toLowerCase();if(e!==r){const r=JT(e.charCodeAt(0));t[r]=r}}}function mT(e,t){return Tg(e.value,e=>{if("number"==typeof e)return qg(t,e);{const r=e;return void 0!==Tg(t,e=>r.from<=e&&e<=r.to)}})}function hT(e){const t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(bu(e.value)?cg(e.value,hT):hT(e.value))}Mn(cT,"getOptimizedStartCodesIndices"),Mn(pT,"firstCharOptimizedIndices"),Mn(dT,"addOptimizedIdxToResult"),Mn(fT,"handleIgnoreCase"),Mn(mT,"findCode"),Mn(hT,"isWholeOptional");var yT=(Mn(E=class extends al{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e);case"Lookbehind":return void this.visitLookbehind(e);case"NegativeLookbehind":return void this.visitNegativeLookbehind(e)}super.visitChildren(e)}}visitCharacter(e){qg(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===mT(e,this.targetCharCodes)&&(this.found=!0):void 0!==mT(e,this.targetCharCodes)&&(this.found=!0)}},"CharCodeFinder"),E);function gT(e,t){if(t instanceof RegExp){const r=oT(t),n=new yT(e);return n.visit(r),n.found}return void 0!==Tg(t,t=>qg(e,t.charCodeAt(0)))}Mn(gT,"canMatchCharCode");var vT="PATTERN",TT="defaultMode",$T="modes";function RT(e,t){const r=(t=zy(t,{debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:Mn((e,t)=>t(),"tracer")})).tracer;let n;r("initCharCodeToOptimizedIndexMap",()=>{QT()}),r("Reject Lexer.NA",()=>{n=hv(e,e=>e[vT]===T$.NA)});let a,i,s,o,l,u,c,p,d,f,m,h=!1;r("Transform Patterns",()=>{h=!1,a=Cg(n,e=>{const t=e[vT];if(Qg(t)){const e=t.source;return 1!==e.length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||qg(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?FT(t):e[1]:e}if(Zu(t))return h=!0,{exec:t};if("object"==typeof t)return h=!0,t;if("string"==typeof t){if(1===t.length)return t;{const e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&");return FT(new RegExp(e))}}throw Error("non exhaustive match")})}),r("misc mapping",()=>{i=Cg(n,e=>e.tokenTypeIdx),s=Cg(n,e=>{const t=e.GROUP;if(t!==T$.SKIPPED){if(Dg(t))return t;if(tv(t))return!1;throw Error("non exhaustive match")}}),o=Cg(n,e=>{const t=e.LONGER_ALT;if(t){return bu(t)?Cg(t,e=>Vg(n,e)):[Vg(n,t)]}}),l=Cg(n,e=>e.PUSH_MODE),u=Cg(n,e=>Og(e,"POP_MODE"))}),r("Line Terminator Handling",()=>{const e=HT(t.lineTerminatorCharacters);c=Cg(n,e=>!1),"onlyOffset"!==t.positionTracking&&(c=Cg(n,t=>Og(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===VT(t,e)&&gT(e,t.PATTERN)))}),r("Misc Mapping #2",()=>{p=Cg(n,qT),d=Cg(a,UT),f=fv(n,(e,t)=>{const r=t.GROUP;return Dg(r)&&r!==T$.SKIPPED&&(e[r]=[]),e},{}),m=Cg(a,(e,t)=>({pattern:a[t],longerAlt:o[t],canLineTerminator:c[t],isCustom:p[t],short:d[t],group:s[t],push:l[t],pop:u[t],tokenTypeIdx:i[t],tokenType:n[t]}))});let y=!0,g=[];return t.safeMode||r("First Char Optimization",()=>{g=fv(n,(e,r,n)=>{if("string"==typeof r.PATTERN){const t=JT(r.PATTERN.charCodeAt(0));YT(e,t,m[n])}else if(bu(r.START_CHARS_HINT)){let t;ag(r.START_CHARS_HINT,r=>{const a=JT("string"==typeof r?r.charCodeAt(0):r);t!==a&&(t=a,YT(e,a,m[n]))})}else if(Qg(r.PATTERN))if(r.PATTERN.unicode)y=!1,t.ensureOptimizations&&Cv(r.PATTERN.toString());else{const a=cT(r.PATTERN,t.ensureOptimizations);Yg(a)&&(y=!1),ag(a,t=>{YT(e,t,m[n])})}else t.ensureOptimizations&&Cv(r.name),y=!1;return e},[])}),{emptyGroups:f,patternIdxToConfig:m,charCodeToPatternIdxToConfig:g,hasCustom:h,canBeOptimized:y}}function ET(e,t){let r=[];const n=AT(e);r=r.concat(n.errors);const a=CT(n.valid),i=a.valid;return r=r.concat(a.errors),r=r.concat(bT(i)),r=r.concat(PT(i)),r=r.concat(OT(i,t)),r=r.concat(LT(i)),r}function bT(e){let t=[];const r=mg(e,e=>Qg(e[vT]));return t=t.concat(kT(r)),t=t.concat(NT(r)),t=t.concat(_T(r)),t=t.concat(IT(r)),t=t.concat(xT(r)),t}function AT(e){const t=mg(e,e=>!Og(e,vT));return{errors:Cg(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:h$.MISSING_PATTERN,tokenTypes:[e]})),valid:Hy(e,t)}}function CT(e){const t=mg(e,e=>{const t=e[vT];return!(Qg(t)||Zu(t)||Og(t,"exec")||Dg(t))});return{errors:Cg(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:h$.INVALID_PATTERN,tokenTypes:[e]})),valid:Hy(e,t)}}Mn(RT,"analyzeTokenTypes"),Mn(ET,"validatePatterns"),Mn(bT,"validateRegExpPattern"),Mn(AT,"findMissingPatterns"),Mn(CT,"findInvalidPatterns");var ST=/[^\\][$]/;function kT(e){const t=class extends al{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}};Mn(t,"EndAnchorFinder");let r=t;const n=mg(e,e=>{const t=e.PATTERN;try{const e=oT(t),n=new r;return n.visit(e),n.found}catch(n){return ST.test(t.source)}});return Cg(n,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:h$.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function xT(e){const t=mg(e,e=>e.PATTERN.test(""));return Cg(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:h$.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}Mn(kT,"findEndOfInputAnchor"),Mn(xT,"findEmptyMatchRegExps");var wT=/[^\\[][\^]|^\^/;function NT(e){const t=class extends al{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}};Mn(t,"StartAnchorFinder");let r=t;const n=mg(e,e=>{const t=e.PATTERN;try{const e=oT(t),n=new r;return n.visit(e),n.found}catch(n){return wT.test(t.source)}});return Cg(n,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:h$.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function _T(e){const t=mg(e,e=>{const t=e[vT];return t instanceof RegExp&&(t.multiline||t.global)});return Cg(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:h$.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function IT(e){const t=[];let r=Cg(e,r=>fv(e,(e,n)=>(r.PATTERN.source!==n.PATTERN.source||qg(t,n)||n.PATTERN===T$.NA||(t.push(n),e.push(n)),e),[]));r=bh(r);const n=mg(r,e=>e.length>1);return Cg(n,e=>{const t=Cg(e,e=>e.name);return{message:`The same RegExp pattern ->${Rg(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:h$.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function PT(e){const t=mg(e,e=>{if(!Og(e,"GROUP"))return!1;const t=e.GROUP;return t!==T$.SKIPPED&&t!==T$.NA&&!Dg(t)});return Cg(t,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:h$.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function OT(e,t){const r=mg(e,e=>void 0!==e.PUSH_MODE&&!qg(t,e.PUSH_MODE));return Cg(r,e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:h$.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function LT(e){const t=[],r=fv(e,(e,t,r)=>{const n=t.PATTERN;return n===T$.NA||(Dg(n)?e.push({str:n,idx:r,tokenType:t}):Qg(n)&&MT(n)&&e.push({str:n.source,idx:r,tokenType:t})),e},[]);return ag(e,(e,n)=>{ag(r,({str:r,idx:a,tokenType:i})=>{if(n<a&&DT(r,e.PATTERN)){const r=`Token: ->${i.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:r,type:h$.UNREACHABLE_PATTERN,tokenTypes:[e,i]})}})}),t}function DT(e,t){if(Qg(t)){if(jT(t))return!1;const r=t.exec(e);return null!==r&&0===r.index}if(Zu(t))return t(e,0,[],{});if(Og(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}function MT(e){return void 0===Tg([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function jT(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}function FT(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function GT(e,t,r){const n=[];return Og(e,TT)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+TT+"> property in its definition\n",type:h$.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Og(e,$T)||n.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:h$.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Og(e,$T)&&Og(e,TT)&&!Og(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${TT}: <${e.defaultMode}>which does not exist\n`,type:h$.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Og(e,$T)&&ag(e.modes,(e,t)=>{ag(e,(r,a)=>{if(tv(r))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${t}> at index: <${a}>\n`,type:h$.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Og(r,"LONGER_ALT")){const a=bu(r.LONGER_ALT)?r.LONGER_ALT:[r.LONGER_ALT];ag(a,a=>{tv(a)||qg(e,a)||n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${a.name}> on token <${r.name}> outside of mode <${t}>\n`,type:h$.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function zT(e,t,r){const n=[];let a=!1;const i=bh(If(Gg(e.modes))),s=hv(i,e=>e[vT]===T$.NA),o=HT(r);return t&&ag(s,e=>{const t=VT(e,o);if(!1!==t){const r={message:WT(e,t),type:t.issue,tokenType:e};n.push(r)}else Og(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(a=!0):gT(o,e.PATTERN)&&(a=!0)}),t&&!a&&n.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:h$.NO_LINE_BREAKS_FLAGS}),n}function KT(e){const t={},r=ed(e);return ag(r,r=>{const n=e[r];if(!bu(n))throw Error("non exhaustive match");t[r]=[]}),t}function qT(e){const t=e.PATTERN;if(Qg(t))return!1;if(Zu(t))return!0;if(Og(t,"exec"))return!0;if(Dg(t))return!1;throw Error("non exhaustive match")}function UT(e){return!(!Dg(e)||1!==e.length)&&e.charCodeAt(0)}Mn(NT,"findStartOfInputAnchor"),Mn(_T,"findUnsupportedFlags"),Mn(IT,"findDuplicatePatterns"),Mn(PT,"findInvalidGroupType"),Mn(OT,"findModesThatDoNotExist"),Mn(LT,"findUnreachablePatterns"),Mn(DT,"tryToMatchStrToPattern"),Mn(MT,"noMetaChar"),Mn(jT,"usesLookAheadOrBehind"),Mn(FT,"addStickyFlag"),Mn(GT,"performRuntimeChecks"),Mn(zT,"performWarningRuntimeChecks"),Mn(KT,"cloneEmptyGroups"),Mn(qT,"isCustomPattern"),Mn(UT,"isShortPattern");var BT={test:Mn(function(e){const t=e.length;for(let r=this.lastIndex;r<t;r++){const t=e.charCodeAt(r);if(10===t)return this.lastIndex=r+1,!0;if(13===t)return 10===e.charCodeAt(r+1)?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};function VT(e,t){if(Og(e,"LINE_BREAKS"))return!1;if(Qg(e.PATTERN)){try{gT(t,e.PATTERN)}catch(r){return{issue:h$.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}if(Dg(e.PATTERN))return!1;if(qT(e))return{issue:h$.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function WT(e,t){if(t.issue===h$.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===h$.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function HT(e){return Cg(e,e=>Dg(e)?e.charCodeAt(0):e)}function YT(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}Mn(VT,"checkLineBreaksIssues"),Mn(WT,"buildLineBreakIssueMessage"),Mn(HT,"getCharCodes"),Mn(YT,"addToMapOfArrays");var XT=256,ZT=[];function JT(e){return e<XT?e:ZT[e]}function QT(){if(Yg(ZT)){ZT=new Array(65536);for(let e=0;e<65536;e++)ZT[e]=e>255?255+~~(e/255):e}}function e$(e,t){const r=e.tokenTypeIdx;return r===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[r]}function t$(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}Mn(JT,"charCodeToOptimizedIndex"),Mn(QT,"initCharCodeToOptimizedIndexMap"),Mn(e$,"tokenStructuredMatcher"),Mn(t$,"tokenStructuredMatcherNoCategories");var r$=1,n$={};function a$(e){const t=i$(e);s$(t),l$(t),o$(t),ag(t,e=>{e.isParent=e.categoryMatches.length>0})}function i$(e){let t=Rh(e),r=e,n=!0;for(;n;){r=bh(If(Cg(r,e=>e.CATEGORIES)));const e=Hy(r,t);t=t.concat(e),Yg(e)?n=!1:r=e}return t}function s$(e){ag(e,e=>{c$(e)||(n$[r$]=e,e.tokenTypeIdx=r$++),p$(e)&&!bu(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),p$(e)||(e.CATEGORIES=[]),d$(e)||(e.categoryMatches=[]),f$(e)||(e.categoryMatchesMap={})})}function o$(e){ag(e,e=>{e.categoryMatches=[],ag(e.categoryMatchesMap,(t,r)=>{e.categoryMatches.push(n$[r].tokenTypeIdx)})})}function l$(e){ag(e,e=>{u$([],e)})}function u$(e,t){ag(e,e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),ag(t.CATEGORIES,r=>{const n=e.concat(t);qg(n,r)||u$(n,r)})}function c$(e){return Og(e,"tokenTypeIdx")}function p$(e){return Og(e,"CATEGORIES")}function d$(e){return Og(e,"categoryMatches")}function f$(e){return Og(e,"categoryMatchesMap")}function m$(e){return Og(e,"tokenTypeIdx")}Mn(a$,"augmentTokenTypes"),Mn(i$,"expandCategories"),Mn(s$,"assignTokenDefaultProps"),Mn(o$,"assignCategoriesTokensProp"),Mn(l$,"assignCategoriesMapProp"),Mn(u$,"singleAssignCategoriesToksMap"),Mn(c$,"hasShortKeyProperty"),Mn(p$,"hasCategoriesProperty"),Mn(d$,"hasExtendingTokensTypesProperty"),Mn(f$,"hasExtendingTokensTypesMapProperty"),Mn(m$,"isTokenType");var h$,y$,g$={buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,r,n,a,i)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`};(y$=h$||(h$={}))[y$.MISSING_PATTERN=0]="MISSING_PATTERN",y$[y$.INVALID_PATTERN=1]="INVALID_PATTERN",y$[y$.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",y$[y$.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",y$[y$.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",y$[y$.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",y$[y$.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",y$[y$.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",y$[y$.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",y$[y$.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",y$[y$.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",y$[y$.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",y$[y$.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",y$[y$.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",y$[y$.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",y$[y$.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",y$[y$.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",y$[y$.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE";var v$={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:g$,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(v$);var T$=(b=class{constructor(e,t=v$){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=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent,this.traceInitMaxIdent;const{time:n,value:a}=kv(t),i=n>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&i(`${r}<-- <${e}> time: ${n}ms`),this.traceInitIndent--,a}return t()},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=rd({},v$,t);const r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,n=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===v$.lineTerminatorsPattern)this.config.lineTerminatorsPattern=BT;else if(this.config.lineTerminatorCharacters===v$.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor 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),bu(e)?r={modes:{defaultMode:Rh(e)},defaultMode:TT}:(n=!1,r=Rh(e))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(GT(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(zT(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes?r.modes:{},ag(r.modes,(e,t)=>{r.modes[t]=hv(e,e=>tv(e))});const a=ed(r.modes);if(ag(r.modes,(e,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(ET(e,a))}),Yg(this.lexerDefinitionErrors)){let n;a$(e),this.TRACE_INIT("analyzeTokenTypes",()=>{n=RT(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=n.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=n.charCodeToPatternIdxToConfig,this.emptyGroups=rd({},this.emptyGroups,n.emptyGroups),this.hasCustom=n.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=n.canBeOptimized}})}),this.defaultMode=r.defaultMode,!Yg(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=Cg(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}ag(this.lexerDefinitionWarning,e=>{Sv(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(n&&(this.handleModes=bc),!1===this.trackStartLines&&(this.computeNewColumn=Hu),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=bc),/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))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const e=fv(this.canModeBeOptimized,(e,t,r)=>(!1===t&&e.push(r),e),[]);if(t.ensureOptimizations&&!Yg(e))throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{lT()}),this.TRACE_INIT("toFastProperties",()=>{xv(this)})})}tokenize(e,t=this.defaultMode){if(!Yg(this.lexerDefinitionErrors)){const e=Cg(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,n,a,i,s,o,l,u,c,p,d,f,m,h,y;const g=e,v=g.length;let T=0,$=0;const R=this.hasCustom?0:Math.floor(e.length/10),E=new Array(R),b=[];let A=this.trackStartLines?1:void 0,C=this.trackStartLines?1:void 0;const S=KT(this.emptyGroups),k=this.trackStartLines,x=this.config.lineTerminatorsPattern;let w=0,N=[],_=[];const I=[],P=[];Object.freeze(P);let O=!1;const L=Mn(e=>{if(1===I.length&&void 0===e.tokenType.PUSH_MODE){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);b.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{I.pop();const e=Xy(I);N=this.patternIdxToConfig[e],_=this.charCodeToPatternIdxToConfig[e],w=N.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;O=!(!_||!t)}},"pop_mode");function D(e){I.push(e),_=this.charCodeToPatternIdxToConfig[e],N=this.patternIdxToConfig[e],w=N.length,w=N.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;O=!(!_||!t)}let M;Mn(D,"push_mode"),D.call(this,t);const j=this.config.recoveryEnabled;for(;T<v;){o=null,c=-1;const t=g.charCodeAt(T);let R;if(O){const e=JT(t),r=_[e];R=void 0!==r?r:P}else R=N;const F=R.length;for(r=0;r<F;r++){M=R[r];const n=M.pattern;l=null;const p=M.short;if(!1!==p?t===p&&(c=1,o=n):!0===M.isCustom?(y=n.exec(g,T,E,S),null!==y?(o=y[0],c=o.length,void 0!==y.payload&&(l=y.payload)):o=null):(n.lastIndex=T,c=this.matchLength(n,e,T)),-1!==c){if(s=M.longerAlt,void 0!==s){o=e.substring(T,T+c);const t=s.length;for(a=0;a<t;a++){const t=N[s[a]],r=t.pattern;if(u=null,!0===t.isCustom?(y=r.exec(g,T,E,S),null!==y?(i=y[0],void 0!==y.payload&&(u=y.payload)):i=null):(r.lastIndex=T,i=this.match(r,e,T)),i&&i.length>o.length){o=i,c=i.length,l=u,M=t;break}}}break}}if(-1!==c){if(p=M.group,void 0!==p&&(o=null!==o?o:e.substring(T,T+c),d=M.tokenTypeIdx,f=this.createTokenInstance(o,T,d,M.tokenType,A,C,c),this.handlePayload(f,l),!1===p?$=this.addToken(E,$,f):S[p].push(f)),!0===k&&!0===M.canLineTerminator){let t,r,n=0;x.lastIndex=0;do{o=null!==o?o:e.substring(T,T+c),t=x.test(o),!0===t&&(r=x.lastIndex-1,n++)}while(!0===t);0!==n?(A+=n,C=c-r,this.updateTokenEndLineColumnLocation(f,p,r,n,A,C,c)):C=this.computeNewColumn(C,c)}else C=this.computeNewColumn(C,c);T+=c,this.handleModes(M,L,D,f)}else{const t=T,r=A,a=C;let i=!1===j;for(;!1===i&&T<v;)for(T++,n=0;n<w;n++){const t=N[n],r=t.pattern,a=t.short;if(!1!==a?g.charCodeAt(T)===a&&(i=!0):!0===t.isCustom?i=null!==r.exec(g,T,E,S):(r.lastIndex=T,i=null!==r.exec(e)),!0===i)break}if(m=T-t,C=this.computeNewColumn(C,m),h=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(g,t,m,r,a,Xy(I)),b.push({offset:t,line:r,column:a,length:m,message:h}),!1===j)break}}return this.hasCustom||(E.length=$),{tokens:E,groups:S,errors:b}}handleModes(e,t,r,n){if(!0===e.pop){const a=e.push;t(n),void 0!==a&&r.call(this,a)}else void 0!==e.push&&r.call(this,e.push)}updateTokenEndLineColumnLocation(e,t,r,n,a,i,s){let o,l;void 0!==t&&(o=r===s-1,l=o?-1:0,1===n&&!0===o||(e.endLine=a+l,e.endColumn=i-1-l))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,r,n){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:n}}createStartOnlyToken(e,t,r,n,a,i){return{image:e,startOffset:t,startLine:a,startColumn:i,tokenTypeIdx:r,tokenType:n}}createFullToken(e,t,r,n,a,i,s){return{image:e,startOffset:t,endOffset:t+s-1,startLine:a,endLine:a,startColumn:i,endColumn:i+s-1,tokenTypeIdx:r,tokenType:n}}addTokenUsingPush(e,t,r){return e.push(r),t}addTokenUsingMemberAccess(e,t,r){return e[t]=r,++t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){null!==t&&(e.payload=t)}match(e,t,r){return!0===e.test(t)?t.substring(r,e.lastIndex):null}matchLength(e,t,r){return!0===e.test(t)?e.lastIndex-r:-1}},Mn(b,"Lexer"),b);function $$(e){return R$(e)?e.LABEL:e.name}function R$(e){return Dg(e.LABEL)&&""!==e.LABEL}T$.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",T$.NA=/NOT_APPLICABLE/,Mn($$,"tokenLabel"),Mn(R$,"hasTokenLabel");var E$="categories",b$="label",A$="group",C$="push_mode",S$="pop_mode",k$="longer_alt",x$="line_breaks",w$="start_chars_hint";function N$(e){return _$(e)}function _$(e){const t=e.pattern,r={};if(r.name=e.name,tv(t)||(r.PATTERN=t),Og(e,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.";return Og(e,E$)&&(r.CATEGORIES=e[E$]),a$([r]),Og(e,b$)&&(r.LABEL=e[b$]),Og(e,A$)&&(r.GROUP=e[A$]),Og(e,S$)&&(r.POP_MODE=e[S$]),Og(e,C$)&&(r.PUSH_MODE=e[C$]),Og(e,k$)&&(r.LONGER_ALT=e[k$]),Og(e,x$)&&(r.LINE_BREAKS=e[x$]),Og(e,w$)&&(r.START_CHARS_HINT=e[w$]),r}Mn(N$,"createToken"),Mn(_$,"createTokenInternal");var I$=N$({name:"EOF",pattern:T$.NA});function P$(e,t,r,n,a,i,s,o){return{image:t,startOffset:r,endOffset:n,startLine:a,endLine:i,startColumn:s,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function O$(e,t){return e$(e,t)}a$([I$]),Mn(P$,"createTokenInstance"),Mn(O$,"tokenMatcher");var L$={buildMismatchTokenMessage:({expected:e,actual:t,previous:r,ruleName:n})=>`Expecting ${R$(e)?`--\x3e ${$$(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:a}){const i="Expecting: ",s="\nbut found: '"+Rg(t).image+"'";if(n)return i+n+s;{const t=fv(e,(e,t)=>e.concat(t),[]),r=Cg(t,e=>`[${Cg(e,e=>$$(e)).join(", ")}]`);return i+`one of these possible Token sequences:\n${Cg(r,(e,t)=>` ${t+1}. ${e}`).join("\n")}`+s}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){const a="Expecting: ",i="\nbut found: '"+Rg(t).image+"'";if(r)return a+r+i;return a+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${Cg(e,e=>`[${Cg(e,e=>$$(e)).join(",")}]`).join(" ,")}>`+i}};Object.freeze(L$);var D$={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},M$={buildDuplicateFoundError(e,t){function r(e){return e instanceof zv?e.terminalType.name:e instanceof Iv?e.nonTerminalName:""}Mn(r,"getExtraProductionArgument");const n=e.name,a=Rg(t),i=a.idx,s=Hv(a),o=r(a);let l=`->${s}${i>0?i:""}<- ${o?`with argument: ->${o}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,"\n"),l},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){const t=Cg(e.prefixPath,e=>$$(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin <OR${r}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){const t=0===e.alternation.idx?"":e.alternation.idx,r=0===e.prefixPath.length;let n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${t}> inside <${e.topLevelRule.name}> Rule,\n`;if(r)n+="These alternatives are all empty (match no tokens), making them indistinguishable.\nOnly the last alternative may be empty.\n";else{n+=`<${Cg(e.prefixPath,e=>$$(e)).join(", ")}> may appears as a prefix path in all these alternatives.\n`}return n+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",n},buildEmptyRepetitionError(e){let t=Hv(e.repetition);0!==e.repetition.idx&&(t+=e.repetition.idx);return`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){const t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${t} --\x3e ${Cg(e.leftRecursionPath,e=>e.name).concat([t]).join(" --\x3e ")}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>"deprecated",buildDuplicateRuleNameError(e){let t;t=e.topLevelRule instanceof Pv?e.topLevelRule.name:e.topLevelRule;return`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function j$(e,t){const r=new z$(e,t);return r.resolveRefs(),r.errors}Mn(j$,"resolveGrammar");var F$,G$,z$=(Mn(A=class extends Uv{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){ag(Gg(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:jE.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},"GastRefResolverVisitor"),A),K$=(Mn(C=class extends Yv{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=Rh(this.path.ruleStack).reverse(),this.occurrenceStack=Rh(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){const n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}}updateExpectedNext(){Yg(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},"AbstractNextPossibleTokensWalker"),C),q$=(Mn(S=class extends K${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){const e=t.concat(r),n=new Ov({definition:e});this.possibleTokTypes=Zv(n),this.found=!0}}},"NextAfterTokenWalker"),S),U$=(Mn(k=class extends Yv{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}},"AbstractNextTerminalAfterProductionWalker"),k),B$=(Mn(x=class extends U${walkMany(e,t,r){if(e.idx===this.occurrence){const e=Rg(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof zv&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,r)}},"NextTerminalAfterManyWalker"),x),V$=(Mn(w=class extends U${walkManySep(e,t,r){if(e.idx===this.occurrence){const e=Rg(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof zv&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,r)}},"NextTerminalAfterManySepWalker"),w),W$=(Mn(N=class extends U${walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){const e=Rg(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof zv&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,r)}},"NextTerminalAfterAtLeastOneWalker"),N),H$=(Mn(_=class extends U${walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){const e=Rg(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof zv&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,r)}},"NextTerminalAfterAtLeastOneSepWalker"),_);function Y$(e,t,r=[]){r=Rh(r);let n=[],a=0;function i(t){return t.concat(Jy(e,a+1))}function s(e){const a=Y$(i(e),t,r);return n.concat(a)}for(Mn(i,"remainingPathWith"),Mn(s,"getAlternativesForProd");r.length<t&&a<e.length;){const t=e[a];if(t instanceof Ov)return s(t.definition);if(t instanceof Iv)return s(t.definition);if(t instanceof Lv)n=s(t.definition);else{if(t instanceof Dv){return s(t.definition.concat([new jv({definition:t.definition})]))}if(t instanceof Mv){return s([new Ov({definition:t.definition}),new jv({definition:[new zv({terminalType:t.separator})].concat(t.definition)})])}if(t instanceof Fv){const e=t.definition.concat([new jv({definition:[new zv({terminalType:t.separator})].concat(t.definition)})]);n=s(e)}else if(t instanceof jv){const e=t.definition.concat([new jv({definition:t.definition})]);n=s(e)}else{if(t instanceof Gv)return ag(t.definition,e=>{!1===Yg(e.definition)&&(n=s(e.definition))}),n;if(!(t instanceof zv))throw Error("non exhaustive match");r.push(t.terminalType)}}a++}return n.push({partialPath:r,suffixDef:Jy(e,a)}),n}function X$(e,t,r,n){const a="EXIT_NONE_TERMINAL",i=[a],s="EXIT_ALTERNATIVE";let o=!1;const l=t.length,u=l-n-1,c=[],p=[];for(p.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!Yg(p);){const e=p.pop();if(e===s){o&&Xy(p).idx<=u&&p.pop();continue}const n=e.def,d=e.idx,f=e.ruleStack,m=e.occurrenceStack;if(Yg(n))continue;const h=n[0];if(h===a){const e={idx:d,def:Jy(n),ruleStack:eg(f),occurrenceStack:eg(m)};p.push(e)}else if(h instanceof zv)if(d<l-1){const e=d+1;if(r(t[e],h.terminalType)){const t={idx:e,def:Jy(n),ruleStack:f,occurrenceStack:m};p.push(t)}}else{if(d!==l-1)throw Error("non exhaustive match");c.push({nextTokenType:h.terminalType,nextTokenOccurrence:h.idx,ruleStack:f,occurrenceStack:m}),o=!0}else if(h instanceof Iv){const e=Rh(f);e.push(h.nonTerminalName);const t=Rh(m);t.push(h.idx);const r={idx:d,def:h.definition.concat(i,Jy(n)),ruleStack:e,occurrenceStack:t};p.push(r)}else if(h instanceof Lv){const e={idx:d,def:Jy(n),ruleStack:f,occurrenceStack:m};p.push(e),p.push(s);const t={idx:d,def:h.definition.concat(Jy(n)),ruleStack:f,occurrenceStack:m};p.push(t)}else if(h instanceof Dv){const e=new jv({definition:h.definition,idx:h.idx}),t={idx:d,def:h.definition.concat([e],Jy(n)),ruleStack:f,occurrenceStack:m};p.push(t)}else if(h instanceof Mv){const e=new zv({terminalType:h.separator}),t=new jv({definition:[e].concat(h.definition),idx:h.idx}),r={idx:d,def:h.definition.concat([t],Jy(n)),ruleStack:f,occurrenceStack:m};p.push(r)}else if(h instanceof Fv){const e={idx:d,def:Jy(n),ruleStack:f,occurrenceStack:m};p.push(e),p.push(s);const t=new zv({terminalType:h.separator}),r=new jv({definition:[t].concat(h.definition),idx:h.idx}),a={idx:d,def:h.definition.concat([r],Jy(n)),ruleStack:f,occurrenceStack:m};p.push(a)}else if(h instanceof jv){const e={idx:d,def:Jy(n),ruleStack:f,occurrenceStack:m};p.push(e),p.push(s);const t=new jv({definition:h.definition,idx:h.idx}),r={idx:d,def:h.definition.concat([t],Jy(n)),ruleStack:f,occurrenceStack:m};p.push(r)}else if(h instanceof Gv)for(let t=h.definition.length-1;t>=0;t--){const e={idx:d,def:h.definition[t].definition.concat(Jy(n)),ruleStack:f,occurrenceStack:m};p.push(e),p.push(s)}else if(h instanceof Ov)p.push({idx:d,def:h.definition.concat(Jy(n)),ruleStack:f,occurrenceStack:m});else{if(!(h instanceof Pv))throw Error("non exhaustive match");p.push(Z$(h,d,f,m))}}return c}function Z$(e,t,r,n){const a=Rh(r);a.push(e.name);const i=Rh(n);return i.push(1),{idx:t,def:e.definition,ruleStack:a,occurrenceStack:i}}function J$(e){if(e instanceof Lv||"Option"===e)return F$.OPTION;if(e instanceof jv||"Repetition"===e)return F$.REPETITION;if(e instanceof Dv||"RepetitionMandatory"===e)return F$.REPETITION_MANDATORY;if(e instanceof Mv||"RepetitionMandatoryWithSeparator"===e)return F$.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Fv||"RepetitionWithSeparator"===e)return F$.REPETITION_WITH_SEPARATOR;if(e instanceof Gv||"Alternation"===e)return F$.ALTERNATION;throw Error("non exhaustive match")}function Q$(e){const{occurrence:t,rule:r,prodType:n,maxLookahead:a}=e,i=J$(n);return i===F$.ALTERNATION?cR(t,r,a):pR(t,r,i,a)}function eR(e,t,r,n,a,i){const s=cR(e,t,r);return i(s,n,mR(s)?t$:e$,a)}function tR(e,t,r,n,a,i){const s=pR(e,t,a,r),o=mR(s)?t$:e$;return i(s[0],o,n)}function rR(e,t,r,n){const a=e.length,i=cg(e,e=>cg(e,e=>1===e.length));if(t)return function(t){const n=Cg(t,e=>e.GATE);for(let i=0;i<a;i++){const t=e[i],a=t.length,s=n[i];if(void 0===s||!1!==s.call(this))e:for(let e=0;e<a;e++){const n=t[e],a=n.length;for(let e=0;e<a;e++){const t=this.LA(e+1);if(!1===r(t,n[e]))continue e}return i}}};if(i&&!n){const t=Cg(e,e=>If(e)),r=fv(t,(e,t,r)=>(ag(t,t=>{Og(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),ag(t.categoryMatches,t=>{Og(e,t)||(e[t]=r)})}),e),{});return function(){const e=this.LA(1);return r[e.tokenTypeIdx]}}return function(){for(let t=0;t<a;t++){const n=e[t],a=n.length;e:for(let e=0;e<a;e++){const a=n[e],i=a.length;for(let e=0;e<i;e++){const t=this.LA(e+1);if(!1===r(t,a[e]))continue e}return t}}}}function nR(e,t,r){const n=cg(e,e=>1===e.length),a=e.length;if(n&&!r){const t=If(e);if(1===t.length&&Yg(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=fv(t,(e,t,r)=>(e[t.tokenTypeIdx]=!0,ag(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let r=0;r<a;r++){const n=e[r],a=n.length;for(let e=0;e<a;e++){const r=this.LA(e+1);if(!1===t(r,n[e]))continue e}return!0}return!1}}Mn(Y$,"possiblePathsFrom"),Mn(X$,"nextPossibleTokensAfter"),Mn(Z$,"expandTopLevelRule"),(G$=F$||(F$={}))[G$.OPTION=0]="OPTION",G$[G$.REPETITION=1]="REPETITION",G$[G$.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",G$[G$.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",G$[G$.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",G$[G$.ALTERNATION=5]="ALTERNATION",Mn(J$,"getProdType"),Mn(Q$,"getLookaheadPaths"),Mn(eR,"buildLookaheadFuncForOr"),Mn(tR,"buildLookaheadFuncForOptionalProd"),Mn(rR,"buildAlternativesLookAheadFunc"),Mn(nR,"buildSingleAlternativeLookaheadFunction");var aR=(Mn(I=class extends Yv{constructor(e,t,r){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,r,n){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=r.concat(n),!0)}walkOption(e,t,r){this.checkIsTarget(e,F$.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,F$.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,F$.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,F$.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,F$.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},"RestDefinitionFinderWalker"),I),iR=(Mn(P=class extends Uv{constructor(e,t,r){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=r,this.result=[]}checkIsTarget(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,F$.OPTION)}visitRepetition(e){this.checkIsTarget(e,F$.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,F$.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,F$.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,F$.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,F$.ALTERNATION)}},"InsideDefinitionFinderVisitor"),P);function sR(e){const t=new Array(e);for(let r=0;r<e;r++)t[r]=[];return t}function oR(e){let t=[""];for(let r=0;r<e.length;r++){const n=e[r],a=[];for(let e=0;e<t.length;e++){const r=t[e];a.push(r+"_"+n.tokenTypeIdx);for(let e=0;e<n.categoryMatches.length;e++){const t="_"+n.categoryMatches[e];a.push(r+t)}}t=a}return t}function lR(e,t,r){for(let n=0;n<e.length;n++){if(n===r)continue;const a=e[n];for(let e=0;e<t.length;e++){if(!0===a[t[e]])return!1}}return!0}function uR(e,t){const r=Cg(e,e=>Y$([e],1)),n=sR(r.length),a=Cg(r,e=>{const t={};return ag(e,e=>{const r=oR(e.partialPath);ag(r,e=>{t[e]=!0})}),t});let i=r;for(let s=1;s<=t;s++){const e=i;i=sR(e.length);for(let r=0;r<e.length;r++){const o=e[r];for(let e=0;e<o.length;e++){const l=o[e].partialPath,u=o[e].suffixDef,c=oR(l);if(lR(a,c,r)||Yg(u)||l.length===t){const e=n[r];if(!1===dR(e,l)){e.push(l);for(let e=0;e<c.length;e++){const t=c[e];a[r][t]=!0}}}else{const e=Y$(u,s+1,l);i[r]=i[r].concat(e),ag(e,e=>{const t=oR(e.partialPath);ag(t,e=>{a[r][e]=!0})})}}}}return n}function cR(e,t,r,n){const a=new iR(e,F$.ALTERNATION,n);return t.accept(a),uR(a.result,r)}function pR(e,t,r,n){const a=new iR(e,r);t.accept(a);const i=a.result,s=new aR(t,e,r).startWalking();return uR([new Ov({definition:i}),new Ov({definition:s})],n)}function dR(e,t){e:for(let r=0;r<e.length;r++){const n=e[r];if(n.length===t.length){for(let e=0;e<n.length;e++){const r=t[e],a=n[e];if(!1===(r===a||void 0!==a.categoryMatchesMap[r.tokenTypeIdx]))continue e}return!0}}return!1}function fR(e,t){return e.length<t.length&&cg(e,(e,r)=>{const n=t[r];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]})}function mR(e){return cg(e,e=>cg(e,e=>cg(e,e=>Yg(e.categoryMatches))))}function hR(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return Cg(t,e=>Object.assign({type:jE.CUSTOM_LOOKAHEAD_VALIDATION},e))}function yR(e,t,r,n){const a=kg(e,e=>gR(e,r)),i=PR(e,t,r),s=kg(e,e=>wR(e,r)),o=kg(e,t=>RR(t,e,n,r));return a.concat(i,s,o)}function gR(e,t){const r=new $R;e.accept(r);const n=r.allProductions,a=wg(n,vR),i=uv(a,e=>e.length>1);return Cg(Gg(i),r=>{const n=Rg(r),a=t.buildDuplicateFoundError(e,r),i=Hv(n),s={message:a,type:jE.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:i,occurrence:n.idx},o=TR(n);return o&&(s.parameter=o),s})}function vR(e){return`${Hv(e)}_#_${e.idx}_#_${TR(e)}`}function TR(e){return e instanceof zv?e.terminalType.name:e instanceof Iv?e.nonTerminalName:""}Mn(sR,"initializeArrayOfArrays"),Mn(oR,"pathToHashKeys"),Mn(lR,"isUniquePrefixHash"),Mn(uR,"lookAheadSequenceFromAlternatives"),Mn(cR,"getLookaheadPathsForOr"),Mn(pR,"getLookaheadPathsForOptionalProd"),Mn(dR,"containsPath"),Mn(fR,"isStrictPrefixOfPath"),Mn(mR,"areTokenCategoriesNotUsed"),Mn(hR,"validateLookahead"),Mn(yR,"validateGrammar"),Mn(gR,"validateDuplicateProductions"),Mn(vR,"identifyProductionForDuplicates"),Mn(TR,"getExtraProductionArgument");var $R=(Mn(O=class extends Uv{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)}},"OccurrenceValidationCollector"),O);function RR(e,t,r,n){const a=[];if(fv(t,(t,r)=>r.name===e.name?t+1:t,0)>1){const t=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});a.push({message:t,type:jE.DUPLICATE_RULE_NAME,ruleName:e.name})}return a}function ER(e,t,r){const n=[];let a;return qg(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:jE.INVALID_RULE_OVERRIDE,ruleName:e})),n}function bR(e,t,r,n=[]){const a=[],i=AR(t.definition);if(Yg(i))return[];{const t=e.name;qg(i,e)&&a.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:jE.LEFT_RECURSION,ruleName:t});const s=Hy(i,n.concat([e])),o=kg(s,t=>{const a=Rh(n);return a.push(t),bR(e,t,r,a)});return a.concat(o)}}function AR(e){let t=[];if(Yg(e))return t;const r=Rg(e);if(r instanceof Iv)t.push(r.referencedRule);else if(r instanceof Ov||r instanceof Lv||r instanceof Dv||r instanceof Mv||r instanceof Fv||r instanceof jv)t=t.concat(AR(r.definition));else if(r instanceof Gv)t=If(Cg(r.definition,e=>AR(e.definition)));else if(!(r instanceof zv))throw Error("non exhaustive match");const n=Vv(r),a=e.length>1;if(n&&a){const r=Jy(e);return t.concat(AR(r))}return t}Mn(RR,"validateRuleDoesNotAlreadyExist"),Mn(ER,"validateRuleIsOverridden"),Mn(bR,"validateNoLeftRecursion"),Mn(AR,"getFirstNoneTerminal");var CR=(Mn(L=class extends Uv{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},"OrCollector"),L);function SR(e,t){const r=new CR;e.accept(r);const n=r.alternations;return kg(n,r=>{const n=eg(r.definition);return kg(n,(n,a)=>{const i=X$([n],[],e$,1);return Yg(i)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:r,emptyChoiceIdx:a}),type:jE.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:r.idx,alternative:a+1}]:[]})})}function kR(e,t,r){const n=new CR;e.accept(n);let a=n.alternations;a=hv(a,e=>!0===e.ignoreAmbiguities);return kg(a,n=>{const a=n.idx,i=n.maxLookahead||t,s=cR(a,e,i,n),o=_R(s,n,e,r),l=IR(s,n,e,r);return o.concat(l)})}Mn(SR,"validateEmptyOrAlternative"),Mn(kR,"validateAmbiguousAlternationAlternatives");var xR=(Mn(D=class extends Uv{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)}},"RepetitionCollector"),D);function wR(e,t){const r=new CR;e.accept(r);const n=r.alternations;return kg(n,r=>r.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:r}),type:jE.TOO_MANY_ALTS,ruleName:e.name,occurrence:r.idx}]:[])}function NR(e,t,r){const n=[];return ag(e,e=>{const a=new xR;e.accept(a);const i=a.allProductions;ag(i,a=>{const i=J$(a),s=a.maxLookahead||t,o=pR(a.idx,e,i,s)[0];if(Yg(If(o))){const t=r.buildEmptyRepetitionError({topLevelRule:e,repetition:a});n.push({message:t,type:jE.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),n}function _R(e,t,r,n){const a=[],i=fv(e,(r,n,i)=>(!0===t.definition[i].ignoreAmbiguities||ag(n,n=>{const s=[i];ag(e,(e,r)=>{i!==r&&dR(e,n)&&!0!==t.definition[r].ignoreAmbiguities&&s.push(r)}),s.length>1&&!dR(a,n)&&(a.push(n),r.push({alts:s,path:n}))}),r),[]);return Cg(i,e=>{const a=Cg(e.alts,e=>e+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:a,prefixPath:e.path}),type:jE.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:e.alts}})}function IR(e,t,r,n){const a=fv(e,(e,t,r)=>{const n=Cg(t,e=>({idx:r,path:e}));return e.concat(n)},[]);return bh(kg(a,e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];const i=e.idx,s=e.path,o=mg(a,e=>!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<i&&fR(e.path,s));return Cg(o,e=>{const a=[e.idx+1,i+1],s=0===t.idx?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:a,prefixPath:e.path}),type:jE.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:s,alternatives:a}})}))}function PR(e,t,r){const n=[],a=Cg(t,e=>e.name);return ag(e,e=>{const t=e.name;if(qg(a,t)){const a=r.buildNamespaceConflictError(e);n.push({message:a,type:jE.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),n}function OR(e){const t=zy(e,{errMsgProvider:D$}),r={};return ag(e.rules,e=>{r[e.name]=e}),j$(r,t.errMsgProvider)}function LR(e){return yR((e=zy(e,{errMsgProvider:M$})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}Mn(wR,"validateTooManyAlts"),Mn(NR,"validateSomeNonEmptyLookaheadPath"),Mn(_R,"checkAlternativesAmbiguities"),Mn(IR,"checkPrefixAlternativesAmbiguities"),Mn(PR,"checkTerminalAndNoneTerminalsNameSpace"),Mn(OR,"resolveGrammar"),Mn(LR,"validateGrammar");var DR="MismatchedTokenException",MR="NoViableAltException",jR="EarlyExitException",FR="NotAllInputParsedException",GR=[DR,MR,jR,FR];function zR(e){return qg(GR,e.name)}Object.freeze(GR),Mn(zR,"isRecognitionException");var KR=(M=class extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Mn(M,"RecognitionException"),M),qR=(Mn(j=class extends KR{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=DR}},"MismatchedTokenException"),j),UR=(Mn(F=class extends KR{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=MR}},"NoViableAltException"),F),BR=(Mn(G=class extends KR{constructor(e,t){super(e,t),this.name=FR}},"NotAllInputParsedException"),G),VR=(Mn(z=class extends KR{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=jR}},"EarlyExitException"),z),WR={},HR="InRuleRecoveryException",YR=(K=class extends Error{constructor(e){super(e),this.name=HR}},Mn(K,"InRuleRecoveryException"),K),XR=(Mn(q=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Og(e,"recoveryEnabled")?e.recoveryEnabled:GE.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=ZR)}getTokenToInsert(e){const t=P$(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){const a=this.findReSyncTokenType(),i=this.exportLexerState(),s=[];let o=!1;const l=this.LA(1);let u=this.LA(1);const c=Mn(()=>{const e=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),r=new qR(t,l,this.LA(0));r.resyncedTokens=eg(s),this.SAVE_ERROR(r)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(u,n))return void c();if(r.call(this))return c(),void e.apply(this,t);this.tokenMatcher(u,a)?o=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,s))}this.importLexerState(i)}shouldInRepetitionRecoveryBeTried(e,t,r){return!1!==r&&(!this.tokenMatcher(this.LA(1),e)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))))}getFollowsForInRuleRecovery(e,t){const 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)){const e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new YR("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if(Yg(t))return!1;const r=this.LA(1);return void 0!==Tg(t,e=>this.tokenMatcher(r,e))}canRecoverWithSingleTokenDeletion(e){if(!this.canTokenTypeBeDeletedInRecovery(e))return!1;return this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return qg(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),r=2;for(;;){const n=Tg(e,e=>O$(t,e));if(void 0!==n)return n;t=this.LA(r),r++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return WR;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return Cg(e,(r,n)=>0===n?WR:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[n],inRule:this.shortRuleNameToFullName(e[n-1])})}flattenFollowSet(){const e=Cg(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return If(e)}getFollowSetFromFollowKey(e){if(e===WR)return[I$];const t=e.ruleName+e.idxInCallingRule+tT+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,I$)||t.push(e),t}reSyncTo(e){const t=[];let r=this.LA(1);for(;!1===this.tokenMatcher(r,e);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return eg(t)}attemptInRepetitionRecovery(e,t,r,n,a,i,s){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Rh(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return Cg(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},"Recoverable"),q);function ZR(e,t,r,n,a,i,s){const o=this.getKeyForAutomaticLookahead(n,a);let l=this.firstAfterRepMap[o];if(void 0===l){const e=this.getCurrRuleFullName();l=new i(this.getGAstProductions()[e],a).startWalking(),this.firstAfterRepMap[o]=l}let u=l.token,c=l.occurrence;const p=l.isEndOfRule;1===this.RULE_STACK.length&&p&&void 0===u&&(u=I$,c=1),void 0!==u&&void 0!==c&&this.shouldInRepetitionRecoveryBeTried(u,c,s)&&this.tryInRepetitionRecovery(e,t,r,u)}Mn(ZR,"attemptInRepetitionRecovery");var JR=1024,QR=1280,eE=1536;function tE(e,t,r){return r|t|e}Mn(tE,"getKeyForAutomaticLookahead");var rE=(Mn(U=class{constructor(e){var t;this.maxLookahead=null!==(t=null==e?void 0:e.maxLookahead)&&void 0!==t?t:GE.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if(Yg(t)){const r=this.validateEmptyOrAlternatives(e.rules),n=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),a=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...r,...n,...a]}return t}validateNoLeftRecursion(e){return kg(e,e=>bR(e,e,M$))}validateEmptyOrAlternatives(e){return kg(e,e=>SR(e,M$))}validateAmbiguousAlternationAlternatives(e,t){return kg(e,e=>kR(e,t,M$))}validateSomeNonEmptyLookaheadPath(e,t){return NR(e,t,M$)}buildLookaheadForAlternation(e){return eR(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,rR)}buildLookaheadForOptional(e){return tR(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,J$(e.prodType),nR)}},"LLkLookaheadStrategy"),U),nE=(Mn(B=class{initLooksAhead(e){this.dynamicTokensEnabled=Og(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:GE.dynamicTokensEnabled,this.maxLookahead=Og(e,"maxLookahead")?e.maxLookahead:GE.maxLookahead,this.lookaheadStrategy=Og(e,"lookaheadStrategy")?e.lookaheadStrategy:new rE({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){ag(e,e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{const{alternation:t,repetition:r,option:n,repetitionMandatory:a,repetitionMandatoryWithSeparator:i,repetitionWithSeparator:s}=iE(e);ag(t,t=>{const r=0===t.idx?"":t.idx;this.TRACE_INIT(`${Hv(t)}${r}`,()=>{const r=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),n=tE(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(n,r)})}),ag(r,t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,Hv(t))}),ag(n,t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,Hv(t))}),ag(a,t=>{this.computeLookaheadFunc(e,t.idx,JR,"RepetitionMandatory",t.maxLookahead,Hv(t))}),ag(i,t=>{this.computeLookaheadFunc(e,t.idx,eE,"RepetitionMandatoryWithSeparator",t.maxLookahead,Hv(t))}),ag(s,t=>{this.computeLookaheadFunc(e,t.idx,QR,"RepetitionWithSeparator",t.maxLookahead,Hv(t))})})})}computeLookaheadFunc(e,t,r,n,a,i){this.TRACE_INIT(`${i}${0===t?"":t}`,()=>{const i=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),s=tE(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(s,i)})}getKeyForAutomaticLookahead(e,t){return tE(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},"LooksAhead"),B),aE=new(Mn(V=class extends Uv{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)}},"DslMethodsCollectorVisitor"),V);function iE(e){aE.reset(),e.accept(aE);const t=aE.dslMethods;return aE.reset(),t}function sE(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset)}function oE(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function lE(e,t,r){void 0===e.children[r]?e.children[r]=[t]:e.children[r].push(t)}function uE(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}Mn(iE,"collectMethods"),Mn(sE,"setNodeLocationOnlyOffset"),Mn(oE,"setNodeLocationFull"),Mn(lE,"addTerminalToCst"),Mn(uE,"addNoneTerminalToCst");var cE,pE;function dE(e,t){Object.defineProperty(e,"name",{enumerable:!1,configurable:!0,writable:!1,value:t})}function fE(e,t){const r=ed(e),n=r.length;for(let a=0;a<n;a++){const n=e[r[a]],i=n.length;for(let e=0;e<i;e++){const r=n[e];void 0===r.tokenTypeIdx&&this[r.name](r.children,t)}}}function mE(e,t){const r=Mn(function(){},"derivedConstructor");dE(r,e+"BaseSemantics");const n={visit:Mn(function(e,t){if(bu(e)&&(e=e[0]),!tv(e))return this[e.name](e.children,t)},"visit"),validateVisitor:Mn(function(){const e=yE(this,t);if(!Yg(e)){const t=Cg(e,e=>e.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g,"\n\t")}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function hE(e,t,r){const n=Mn(function(){},"derivedConstructor");dE(n,e+"BaseSemanticsWithDefaults");const a=Object.create(r.prototype);return ag(t,e=>{a[e]=fE}),n.prototype=a,n.prototype.constructor=n,n}function yE(e,t){return gE(e,t)}function gE(e,t){const r=mg(t,t=>!1===Zu(e[t])),n=Cg(r,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:cE.MISSING_METHOD,methodName:t}));return bh(n)}Mn(dE,"defineNameProp"),Mn(fE,"defaultVisit"),Mn(mE,"createBaseSemanticVisitorConstructor"),Mn(hE,"createBaseVisitorConstructorWithDefaults"),(pE=cE||(cE={}))[pE.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",pE[pE.MISSING_METHOD=1]="MISSING_METHOD",Mn(yE,"validateVisitor"),Mn(gE,"validateMissingCstMethods");var vE=(Mn(W=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Og(e,"nodeLocationTracking")?e.nodeLocationTracking:GE.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=oE,this.setNodeLocationFromNode=oE,this.cstPostRule=bc,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=bc,this.setNodeLocationFromNode=bc,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=sE,this.setNodeLocationFromNode=sE,this.cstPostRule=bc,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=bc,this.setNodeLocationFromNode=bc,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=bc,this.setNodeLocationFromNode=bc,this.cstPostRule=bc,this.setInitialNodeLocation=bc}else this.cstInvocationStateUpdate=bc,this.cstFinallyStateUpdate=bc,this.cstPostTerminal=bc,this.cstPostNonTerminal=bc,this.cstPostRule=bc}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){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];lE(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];uE(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(tv(this.baseCstVisitorConstructor)){const e=mE(this.className,ed(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(tv(this.baseCstVisitorWithDefaultsConstructor)){const e=hE(this.className,ed(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},"TreeBuilder"),W),TE=(Mn(H=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):ME}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?ME: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()}},"LexerAdapter"),H),$E=(Mn(Y=class{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=zE){if(qg(this.definedRulesNames,e)){const t={message:M$.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:jE.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);const n=this.defineRule(e,t,r);return this[e]=n,n}OVERRIDE_RULE(e,t,r=zE){const n=ER(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);const a=this.defineRule(e,t,r);return this[e]=a,a}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const r=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if(zR(n))return!1;throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Kv(Gg(this.gastProductionsCache))}},"RecognizerApi"),Y),RE=(Mn(X=class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=t$,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Og(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(bu(e)){if(Yg(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(bu(e))this.tokensMap=fv(e,(e,t)=>(e[t.name]=t,e),{});else if(Og(e,"modes")&&cg(If(Gg(e.modes)),m$)){const t=If(Gg(e.modes)),r=Av(t);this.tokensMap=fv(r,(e,t)=>(e[t.name]=t,e),{})}else{if(!Lu(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Rh(e)}this.tokensMap.EOF=I$;const r=Og(e,"modes")?If(Gg(e.modes)):Gg(e),n=cg(r,e=>Yg(e.categoryMatches));this.tokenMatcher=n?t$:e$,a$(Gg(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'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const n=Og(r,"resyncEnabled")?r.resyncEnabled:zE.resyncEnabled,a=Og(r,"recoveryValueFunc")?r.recoveryValueFunc:zE.recoveryValueFunc,i=this.ruleShortNameIdx<<12;let s;this.ruleShortNameIdx++,this.shortRuleNameToFull[i]=e,this.fullRuleNameToShort[e]=i,s=!0===this.outputCst?Mn(function(...r){try{this.ruleInvocationStateUpdate(i,e,this.subruleIdx),t.apply(this,r);const n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}catch(s){return this.invokeRuleCatch(s,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):Mn(function(...r){try{return this.ruleInvocationStateUpdate(i,e,this.subruleIdx),t.apply(this,r)}catch(s){return this.invokeRuleCatch(s,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst");return Object.assign(s,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,r){const n=1===this.RULE_STACK.length,a=t&&!this.isBackTracking()&&this.recoveryEnabled;if(zR(e)){const t=e;if(a){const n=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(n)){if(t.resyncedTokens=this.reSyncTo(n),this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return r(e)}if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(n)return this.moveToTerminatedState(),r(e);throw t}throw e}optionInternal(e,t){const r=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let n,a=this.getLaFuncFromCache(r);if("function"!=typeof e){n=e.DEF;const t=e.GATE;if(void 0!==t){const e=a;a=Mn(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else n=e;if(!0===a.call(this))return n.call(this)}atLeastOneInternal(e,t){const r=this.getKeyForAutomaticLookahead(JR,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let n,a=this.getLaFuncFromCache(r);if("function"!=typeof t){n=t.DEF;const e=t.GATE;if(void 0!==e){const t=a;a=Mn(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else n=t;if(!0!==a.call(this))throw this.raiseEarlyExitException(e,F$.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(n);for(;!0===a.call(this)&&!0===e;)e=this.doSingleRepetition(n)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],a,JR,e,W$)}atLeastOneSepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(eE,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){const n=t.DEF,a=t.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(e,F$.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{n.call(this);const t=Mn(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;!0===this.tokenMatcher(this.LA(1),a);)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,t,n,H$],t,eE,e,H$)}}manyInternal(e,t){const r=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let n,a=this.getLaFuncFromCache(r);if("function"!=typeof t){n=t.DEF;const e=t.GATE;if(void 0!==e){const t=a;a=Mn(()=>e.call(this)&&t.call(this),"lookaheadFunction")}}else n=t;let i=!0;for(;!0===a.call(this)&&!0===i;)i=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],a,768,e,B$,i)}manySepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(QR,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){const n=t.DEF,a=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){n.call(this);const t=Mn(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;!0===this.tokenMatcher(this.LA(1),a);)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,t,n,V$],t,QR,e,V$)}}repetitionSepSecondInternal(e,t,r,n,a){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,a],r,eE,e,a)}doSingleRepetition(e){const t=this.getLexerPosition();e.call(this);return this.getLexerPosition()>t}orInternal(e,t){const r=this.getKeyForAutomaticLookahead(256,t),n=bu(e)?e:e.DEF,a=this.getLaFuncFromCache(r).call(this,n);if(void 0!==a){return n[a].ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new BR(t,e))}}subruleInternal(e,t,r){let n;try{const a=void 0!==r?r.ARGS:void 0;return this.subruleIdx=t,n=e.apply(this,a),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),n}catch(a){throw this.subruleInternalError(a,r,e.ruleName)}}subruleInternalError(e,t,r){throw zR(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let n;try{const t=this.LA(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),n=t):this.consumeInternalError(e,t,r)}catch(a){n=this.consumeInternalRecovery(e,t,a)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){let n;const a=this.LA(0);throw n=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new qR(n,t,a))}consumeInternalRecovery(e,t,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;{const a=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,a)}catch(n){throw n.name===HR?r:n}}}saveRecogState(){const e=this.errors,t=Rh(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 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),I$)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},"RecognizerEngine"),X),EE=(Mn(Z=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Og(e,"errorMessageProvider")?e.errorMessageProvider:GE.errorMessageProvider}SAVE_ERROR(e){if(zR(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Rh(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Rh(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){const n=this.getCurrRuleFullName(),a=pR(e,this.getGAstProductions()[n],t,this.maxLookahead)[0],i=[];for(let o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));const s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new VR(s,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const r=this.getCurrRuleFullName(),n=cR(e,this.getGAstProductions()[r],this.maxLookahead),a=[];for(let o=1;o<=this.maxLookahead;o++)a.push(this.LA(o));const i=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:n,actual:a,previous:i,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new UR(s,this.LA(1),i))}},"ErrorHandler"),Z),bE=(Mn(J=class{initContentAssist(){}computeContentAssist(e,t){const r=this.gastProductionsCache[e];if(tv(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return X$([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=Rg(e.ruleStack),r=this.getGAstProductions()[t];return new q$(r,e).startWalking()}},"ContentAssist"),J),AE={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(AE);var CE=!0,SE=Math.pow(2,8)-1,kE=N$({name:"RECORDING_PHASE_TOKEN",pattern:T$.NA});a$([kE]);var xE=P$(kE,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(xE);var wE={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}},NE=(Mn(Q=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,r){return this.consumeInternalRecord(t,e,r)},this[`SUBRULE${t}`]=function(t,r){return this.subruleInternalRecord(t,e,r)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}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",()=>{const e=this;for(let t=0;t<10;t++){const 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 ME}topLevelRuleRecord(e,t){try{const r=new Pv({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(r){if(!0!==r.KNOWN_RECORDER_ERROR)try{r.message=r.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(n){throw r}throw r}}optionInternalRecord(e,t){return _E.call(this,Lv,e,t)}atLeastOneInternalRecord(e,t){_E.call(this,Dv,t,e)}atLeastOneSepFirstInternalRecord(e,t){_E.call(this,Mv,t,e,CE)}manyInternalRecord(e,t){_E.call(this,jv,t,e)}manySepFirstInternalRecord(e,t){_E.call(this,Fv,t,e,CE)}orInternalRecord(e,t){return IE.call(this,e,t)}subruleInternalRecord(e,t,r){if(OE(t),!e||!1===Og(e,"ruleName")){const r=new Error(`<SUBRULE${PE(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw r.KNOWN_RECORDER_ERROR=!0,r}const n=Xy(this.recordingProdStack),a=e.ruleName,i=new Iv({idx:t,nonTerminalName:a,label:null==r?void 0:r.LABEL,referencedRule:void 0});return n.definition.push(i),this.outputCst?wE:AE}consumeInternalRecord(e,t,r){if(OE(t),!c$(e)){const r=new Error(`<CONSUME${PE(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw r.KNOWN_RECORDER_ERROR=!0,r}const n=Xy(this.recordingProdStack),a=new zv({idx:t,terminalType:e,label:null==r?void 0:r.LABEL});return n.definition.push(a),xE}},"GastRecorder"),Q);function _E(e,t,r,n=!1){OE(r);const a=Xy(this.recordingProdStack),i=Zu(t)?t:t.DEF,s=new e({definition:[],idx:r});return n&&(s.separator=t.SEP),Og(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),i.call(this),a.definition.push(s),this.recordingProdStack.pop(),AE}function IE(e,t){OE(t);const r=Xy(this.recordingProdStack),n=!1===bu(e),a=!1===n?e:e.DEF,i=new Gv({definition:[],idx:t,ignoreAmbiguities:n&&!0===e.IGNORE_AMBIGUITIES});Og(e,"MAX_LOOKAHEAD")&&(i.maxLookahead=e.MAX_LOOKAHEAD);const s=Tv(a,e=>Zu(e.GATE));return i.hasPredicates=s,r.definition.push(i),ag(a,e=>{const t=new Ov({definition:[]});i.definition.push(t),Og(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:Og(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),AE}function PE(e){return 0===e?"":`${e}`}function OE(e){if(e<0||e>SE){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${SE+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}Mn(_E,"recordProd"),Mn(IE,"recordOrProd"),Mn(PE,"getIdxSuffix"),Mn(OE,"assertMethodIdxIsValid");var LE=(Mn(ee=class{initPerformanceTracer(e){if(Og(e,"traceInitPerf")){const t=e.traceInitPerf,r="number"==typeof t;this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=GE.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent,this.traceInitMaxIdent;const{time:n,value:a}=kv(t),i=n>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&i(`${r}<-- <${e}> time: ${n}ms`),this.traceInitIndent--,a}return t()}},"PerformanceTracer"),ee);function DE(e,t){t.forEach(t=>{const r=t.prototype;Object.getOwnPropertyNames(r).forEach(n=>{if("constructor"===n)return;const a=Object.getOwnPropertyDescriptor(r,n);a&&(a.get||a.set)?Object.defineProperty(e.prototype,n,a):e.prototype[n]=t.prototype[n]})})}Mn(DE,"applyMixins");var ME=P$(I$,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(ME);var jE,FE,GE=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:L$,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),zE=Object.freeze({recoveryValueFunc:Mn(()=>{},"recoveryValueFunc"),resyncEnabled:!0});function KE(e=void 0){return function(){return e}}(FE=jE||(jE={}))[FE.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",FE[FE.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",FE[FE.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",FE[FE.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",FE[FE.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",FE[FE.LEFT_RECURSION=5]="LEFT_RECURSION",FE[FE.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",FE[FE.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",FE[FE.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",FE[FE.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",FE[FE.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",FE[FE.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",FE[FE.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",FE[FE.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",Mn(KE,"EMPTY_ALT");var qE=(Mn(te=class{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",()=>{xv(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),ag(this.definedRulesNames,e=>{const t=this[e].originalGrammarAction;let r;this.TRACE_INIT(`${e} Rule`,()=>{r=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=r})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT("Grammar Resolving",()=>{r=OR({rules:Gg(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(Yg(r)&&!1===this.skipValidations){const e=LR({rules:Gg(this.gastProductionsCache),tokenTypes:Gg(this.tokensMap),errMsgProvider:M$,grammarName:t}),r=hR({lookaheadStrategy:this.lookaheadStrategy,rules:Gg(this.gastProductionsCache),tokenTypes:Gg(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(e,r)}}),Yg(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const e=nT(Gg(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null===(t=(e=this.lookaheadStrategy).initialize)||void 0===t||t.call(e,{rules:Gg(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Gg(this.gastProductionsCache))})),!te.DEFER_DEFINITION_ERRORS_HANDLING&&!Yg(this.definitionErrors))throw e=Cg(this.definitionErrors,e=>e.message),new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const r=this;if(r.initErrorHandler(t),r.initLexerAdapter(),r.initLooksAhead(t),r.initRecognizerEngine(e,t),r.initRecoverable(t),r.initTreeBuilder(t),r.initContentAssist(),r.initGastRecorder(t),r.initPerformanceTracer(t),Og(t,"ignoredIssues"))throw new Error("The <ignoredIssues> IParserConfig property has been deprecated.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=Og(t,"skipValidations")?t.skipValidations:GE.skipValidations}},"Parser"),te);qE.DEFER_DEFINITION_ERRORS_HANDLING=!1,DE(qE,[XR,nE,vE,TE,RE,$E,EE,bE,NE,LE]);var UE=(Mn(re=class extends qE{constructor(e,t=GE){const r=Rh(t);r.outputCst=!1,super(e,r)}},"EmbeddedActionsParser"),re);function BE(e,t){for(var r=-1,n=null==e?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}Mn(BE,"arrayMap");var VE=BE;function WE(){this.__data__=[],this.size=0}Mn(WE,"listCacheClear");var HE=WE;function YE(e,t){return e===t||e!=e&&t!=t}Mn(YE,"eq");var XE=YE;function ZE(e,t){for(var r=e.length;r--;)if(XE(e[r][0],t))return r;return-1}Mn(ZE,"assocIndexOf");var JE=ZE,QE=Array.prototype.splice;function eb(e){var t=this.__data__,r=JE(t,e);return!(r<0)&&(r==t.length-1?t.pop():QE.call(t,r,1),--this.size,!0)}Mn(eb,"listCacheDelete");var tb=eb;function rb(e){var t=this.__data__,r=JE(t,e);return r<0?void 0:t[r][1]}Mn(rb,"listCacheGet");var nb=rb;function ab(e){return JE(this.__data__,e)>-1}Mn(ab,"listCacheHas");var ib=ab;function sb(e,t){var r=this.__data__,n=JE(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}Mn(sb,"listCacheSet");var ob=sb;function lb(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mn(lb,"ListCache"),lb.prototype.clear=HE,lb.prototype.delete=tb,lb.prototype.get=nb,lb.prototype.has=ib,lb.prototype.set=ob;var ub=lb;function cb(){this.__data__=new ub,this.size=0}Mn(cb,"stackClear");var pb=cb;function db(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}Mn(db,"stackDelete");var fb=db;function mb(e){return this.__data__.get(e)}Mn(mb,"stackGet");var hb=mb;function yb(e){return this.__data__.has(e)}Mn(yb,"stackHas");var gb=yb,vb="object"==typeof global&&global&&global.Object===Object&&global,Tb="object"==typeof self&&self&&self.Object===Object&&self,$b=vb||Tb||Function("return this")(),Rb=$b.Symbol,Eb=Object.prototype,bb=Eb.hasOwnProperty,Ab=Eb.toString,Cb=Rb?Rb.toStringTag:void 0;function Sb(e){var t=bb.call(e,Cb),r=e[Cb];try{e[Cb]=void 0;var n=!0}catch(i){}var a=Ab.call(e);return n&&(t?e[Cb]=r:delete e[Cb]),a}Mn(Sb,"getRawTag");var kb=Sb,xb=Object.prototype.toString;function wb(e){return xb.call(e)}Mn(wb,"objectToString");var Nb=wb,_b=Rb?Rb.toStringTag:void 0;function Ib(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":_b&&_b in Object(e)?kb(e):Nb(e)}Mn(Ib,"baseGetTag");var Pb=Ib;function Ob(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}Mn(Ob,"isObject");var Lb=Ob;function Db(e){if(!Lb(e))return!1;var t=Pb(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}Mn(Db,"isFunction");var Mb=Db,jb=$b["__core-js_shared__"],Fb=function(){var e=/[^.]+$/.exec(jb&&jb.keys&&jb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Gb(e){return!!Fb&&Fb in e}Mn(Gb,"isMasked");var zb=Gb,Kb=Function.prototype.toString;function qb(e){if(null!=e){try{return Kb.call(e)}catch(t){}try{return e+""}catch(t){}}return""}Mn(qb,"toSource");var Ub=qb,Bb=/^\[object .+?Constructor\]$/,Vb=Function.prototype,Wb=Object.prototype,Hb=Vb.toString,Yb=Wb.hasOwnProperty,Xb=RegExp("^"+Hb.call(Yb).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zb(e){return!(!Lb(e)||zb(e))&&(Mb(e)?Xb:Bb).test(Ub(e))}Mn(Zb,"baseIsNative");var Jb=Zb;function Qb(e,t){return null==e?void 0:e[t]}Mn(Qb,"getValue");var eA=Qb;function tA(e,t){var r=eA(e,t);return Jb(r)?r:void 0}Mn(tA,"getNative");var rA=tA,nA=rA($b,"Map"),aA=rA(Object,"create");function iA(){this.__data__=aA?aA(null):{},this.size=0}Mn(iA,"hashClear");var sA=iA;function oA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}Mn(oA,"hashDelete");var lA=oA,uA=Object.prototype.hasOwnProperty;function cA(e){var t=this.__data__;if(aA){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return uA.call(t,e)?t[e]:void 0}Mn(cA,"hashGet");var pA=cA,dA=Object.prototype.hasOwnProperty;function fA(e){var t=this.__data__;return aA?void 0!==t[e]:dA.call(t,e)}Mn(fA,"hashHas");var mA=fA;function hA(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=aA&&void 0===t?"__lodash_hash_undefined__":t,this}Mn(hA,"hashSet");var yA=hA;function gA(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mn(gA,"Hash"),gA.prototype.clear=sA,gA.prototype.delete=lA,gA.prototype.get=pA,gA.prototype.has=mA,gA.prototype.set=yA;var vA=gA;function TA(){this.size=0,this.__data__={hash:new vA,map:new(nA||ub),string:new vA}}Mn(TA,"mapCacheClear");var $A=TA;function RA(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}Mn(RA,"isKeyable");var EA=RA;function bA(e,t){var r=e.__data__;return EA(t)?r["string"==typeof t?"string":"hash"]:r.map}Mn(bA,"getMapData");var AA=bA;function CA(e){var t=AA(this,e).delete(e);return this.size-=t?1:0,t}Mn(CA,"mapCacheDelete");var SA=CA;function kA(e){return AA(this,e).get(e)}Mn(kA,"mapCacheGet");var xA=kA;function wA(e){return AA(this,e).has(e)}Mn(wA,"mapCacheHas");var NA=wA;function _A(e,t){var r=AA(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}Mn(_A,"mapCacheSet");var IA=_A;function PA(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mn(PA,"MapCache"),PA.prototype.clear=$A,PA.prototype.delete=SA,PA.prototype.get=xA,PA.prototype.has=NA,PA.prototype.set=IA;var OA=PA;function LA(e,t){var r=this.__data__;if(r instanceof ub){var n=r.__data__;if(!nA||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new OA(n)}return r.set(e,t),this.size=r.size,this}Mn(LA,"stackSet");var DA=LA;function MA(e){var t=this.__data__=new ub(e);this.size=t.size}Mn(MA,"Stack"),MA.prototype.clear=pb,MA.prototype.delete=fb,MA.prototype.get=hb,MA.prototype.has=gb,MA.prototype.set=DA;var jA=MA;function FA(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}Mn(FA,"setCacheAdd");var GA=FA;function zA(e){return this.__data__.has(e)}Mn(zA,"setCacheHas");var KA=zA;function qA(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new OA;++t<r;)this.add(e[t])}Mn(qA,"SetCache"),qA.prototype.add=qA.prototype.push=GA,qA.prototype.has=KA;var UA=qA;function BA(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}Mn(BA,"arraySome");var VA=BA;function WA(e,t){return e.has(t)}Mn(WA,"cacheHas");var HA=WA;function YA(e,t,r,n,a,i){var s=1&r,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var p=-1,d=!0,f=2&r?new UA:void 0;for(i.set(e,t),i.set(t,e);++p<o;){var m=e[p],h=t[p];if(n)var y=s?n(h,m,p,t,e,i):n(m,h,p,e,t,i);if(void 0!==y){if(y)continue;d=!1;break}if(f){if(!VA(t,function(e,t){if(!HA(f,t)&&(m===e||a(m,e,r,n,i)))return f.push(t)})){d=!1;break}}else if(m!==h&&!a(m,h,r,n,i)){d=!1;break}}return i.delete(e),i.delete(t),d}Mn(YA,"equalArrays");var XA=YA,ZA=$b.Uint8Array;function JA(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}Mn(JA,"mapToArray");var QA=JA;function eC(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}Mn(eC,"setToArray");var tC=eC,rC=Rb?Rb.prototype:void 0,nC=rC?rC.valueOf:void 0;function aC(e,t,r,n,a,i,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new ZA(e),new ZA(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return XE(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=QA;case"[object Set]":var l=1&n;if(o||(o=tC),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var c=XA(o(e),o(t),n,a,i,s);return s.delete(e),c;case"[object Symbol]":if(nC)return nC.call(e)==nC.call(t)}return!1}Mn(aC,"equalByTag");var iC=aC;function sC(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}Mn(sC,"arrayPush");var oC=sC,lC=Array.isArray;function uC(e,t,r){var n=t(e);return lC(e)?n:oC(n,r(e))}Mn(uC,"baseGetAllKeys");var cC=uC;function pC(e,t){for(var r=-1,n=null==e?0:e.length,a=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[a++]=s)}return i}Mn(pC,"arrayFilter");var dC=pC;function fC(){return[]}Mn(fC,"stubArray");var mC=fC,hC=Object.prototype.propertyIsEnumerable,yC=Object.getOwnPropertySymbols,gC=yC?function(e){return null==e?[]:(e=Object(e),dC(yC(e),function(t){return hC.call(e,t)}))}:mC;function vC(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}Mn(vC,"baseTimes");var TC=vC;function $C(e){return null!=e&&"object"==typeof e}Mn($C,"isObjectLike");var RC=$C;function EC(e){return RC(e)&&"[object Arguments]"==Pb(e)}Mn(EC,"baseIsArguments");var bC=EC,AC=Object.prototype,CC=AC.hasOwnProperty,SC=AC.propertyIsEnumerable,kC=bC(function(){return arguments}())?bC:function(e){return RC(e)&&CC.call(e,"callee")&&!SC.call(e,"callee")};function xC(){return!1}Mn(xC,"stubFalse");var wC=xC,NC="object"==typeof exports&&exports&&!exports.nodeType&&exports,_C=NC&&"object"==typeof module&&module&&!module.nodeType&&module,IC=_C&&_C.exports===NC?$b.Buffer:void 0,PC=(IC?IC.isBuffer:void 0)||wC,OC=/^(?:0|[1-9]\d*)$/;function LC(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&OC.test(e))&&e>-1&&e%1==0&&e<t}Mn(LC,"isIndex");var DC=LC;function MC(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}Mn(MC,"isLength");var jC=MC,FC={};function GC(e){return RC(e)&&jC(e.length)&&!!FC[Pb(e)]}FC["[object Float32Array]"]=FC["[object Float64Array]"]=FC["[object Int8Array]"]=FC["[object Int16Array]"]=FC["[object Int32Array]"]=FC["[object Uint8Array]"]=FC["[object Uint8ClampedArray]"]=FC["[object Uint16Array]"]=FC["[object Uint32Array]"]=!0,FC["[object Arguments]"]=FC["[object Array]"]=FC["[object ArrayBuffer]"]=FC["[object Boolean]"]=FC["[object DataView]"]=FC["[object Date]"]=FC["[object Error]"]=FC["[object Function]"]=FC["[object Map]"]=FC["[object Number]"]=FC["[object Object]"]=FC["[object RegExp]"]=FC["[object Set]"]=FC["[object String]"]=FC["[object WeakMap]"]=!1,Mn(GC,"baseIsTypedArray");var zC=GC;function KC(e){return function(t){return e(t)}}Mn(KC,"baseUnary");var qC=KC,UC="object"==typeof exports&&exports&&!exports.nodeType&&exports,BC=UC&&"object"==typeof module&&module&&!module.nodeType&&module,VC=BC&&BC.exports===UC&&vb.process,WC=function(){try{var e=BC&&BC.require&&BC.require("util").types;return e||VC&&VC.binding&&VC.binding("util")}catch(t){}}(),HC=WC&&WC.isTypedArray,YC=HC?qC(HC):zC,XC=Object.prototype.hasOwnProperty;function ZC(e,t){var r=lC(e),n=!r&&kC(e),a=!r&&!n&&PC(e),i=!r&&!n&&!a&&YC(e),s=r||n||a||i,o=s?TC(e.length,String):[],l=o.length;for(var u in e)!t&&!XC.call(e,u)||s&&("length"==u||a&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||DC(u,l))||o.push(u);return o}Mn(ZC,"arrayLikeKeys");var JC=ZC,QC=Object.prototype;function eS(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||QC)}Mn(eS,"isPrototype");var tS=eS;function rS(e,t){return function(r){return e(t(r))}}Mn(rS,"overArg");var nS=rS(Object.keys,Object),aS=Object.prototype.hasOwnProperty;function iS(e){if(!tS(e))return nS(e);var t=[];for(var r in Object(e))aS.call(e,r)&&"constructor"!=r&&t.push(r);return t}Mn(iS,"baseKeys");var sS=iS;function oS(e){return null!=e&&jC(e.length)&&!Mb(e)}Mn(oS,"isArrayLike");var lS=oS;function uS(e){return lS(e)?JC(e):sS(e)}Mn(uS,"keys");var cS=uS;function pS(e){return cC(e,cS,gC)}Mn(pS,"getAllKeys");var dS=pS,fS=Object.prototype.hasOwnProperty;function mS(e,t,r,n,a,i){var s=1&r,o=dS(e),l=o.length;if(l!=dS(t).length&&!s)return!1;for(var u=l;u--;){var c=o[u];if(!(s?c in t:fS.call(t,c)))return!1}var p=i.get(e),d=i.get(t);if(p&&d)return p==t&&d==e;var f=!0;i.set(e,t),i.set(t,e);for(var m=s;++u<l;){var h=e[c=o[u]],y=t[c];if(n)var g=s?n(y,h,c,t,e,i):n(h,y,c,e,t,i);if(!(void 0===g?h===y||a(h,y,r,n,i):g)){f=!1;break}m||(m="constructor"==c)}if(f&&!m){var v=e.constructor,T=t.constructor;v==T||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof T&&T instanceof T||(f=!1)}return i.delete(e),i.delete(t),f}Mn(mS,"equalObjects");var hS=mS,yS=rA($b,"DataView"),gS=rA($b,"Promise"),vS=rA($b,"Set"),TS=rA($b,"WeakMap"),$S="[object Map]",RS="[object Promise]",ES="[object Set]",bS="[object WeakMap]",AS="[object DataView]",CS=Ub(yS),SS=Ub(nA),kS=Ub(gS),xS=Ub(vS),wS=Ub(TS),NS=Pb;(yS&&NS(new yS(new ArrayBuffer(1)))!=AS||nA&&NS(new nA)!=$S||gS&&NS(gS.resolve())!=RS||vS&&NS(new vS)!=ES||TS&&NS(new TS)!=bS)&&(NS=Mn(function(e){var t=Pb(e),r="[object Object]"==t?e.constructor:void 0,n=r?Ub(r):"";if(n)switch(n){case CS:return AS;case SS:return $S;case kS:return RS;case xS:return ES;case wS:return bS}return t},"getTag"));var _S=NS,IS="[object Arguments]",PS="[object Array]",OS="[object Object]",LS=Object.prototype.hasOwnProperty;function DS(e,t,r,n,a,i){var s=lC(e),o=lC(t),l=s?PS:_S(e),u=o?PS:_S(t),c=(l=l==IS?OS:l)==OS,p=(u=u==IS?OS:u)==OS,d=l==u;if(d&&PC(e)){if(!PC(t))return!1;s=!0,c=!1}if(d&&!c)return i||(i=new jA),s||YC(e)?XA(e,t,r,n,a,i):iC(e,t,l,r,n,a,i);if(!(1&r)){var f=c&&LS.call(e,"__wrapped__"),m=p&&LS.call(t,"__wrapped__");if(f||m){var h=f?e.value():e,y=m?t.value():t;return i||(i=new jA),a(h,y,r,n,i)}}return!!d&&(i||(i=new jA),hS(e,t,r,n,a,i))}Mn(DS,"baseIsEqualDeep");var MS=DS;function jS(e,t,r,n,a){return e===t||(null==e||null==t||!RC(e)&&!RC(t)?e!=e&&t!=t:MS(e,t,r,n,jS,a))}Mn(jS,"baseIsEqual");var FS=jS;function GS(e,t,r,n){var a=r.length,i=a,s=!n;if(null==e)return!i;for(e=Object(e);a--;){var o=r[a];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<i;){var l=(o=r[a])[0],u=e[l],c=o[1];if(s&&o[2]){if(void 0===u&&!(l in e))return!1}else{var p=new jA;if(n)var d=n(u,c,l,e,t,p);if(!(void 0===d?FS(c,u,3,n,p):d))return!1}}return!0}Mn(GS,"baseIsMatch");var zS=GS;function KS(e){return e==e&&!Lb(e)}Mn(KS,"isStrictComparable");var qS=KS;function US(e){for(var t=cS(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,qS(a)]}return t}Mn(US,"getMatchData");var BS=US;function VS(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}Mn(VS,"matchesStrictComparable");var WS=VS;function HS(e){var t=BS(e);return 1==t.length&&t[0][2]?WS(t[0][0],t[0][1]):function(r){return r===e||zS(r,e,t)}}Mn(HS,"baseMatches");var YS=HS;function XS(e){return"symbol"==typeof e||RC(e)&&"[object Symbol]"==Pb(e)}Mn(XS,"isSymbol");var ZS=XS,JS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,QS=/^\w*$/;function ek(e,t){if(lC(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ZS(e))||(QS.test(e)||!JS.test(e)||null!=t&&e in Object(t))}Mn(ek,"isKey");var tk=ek;function rk(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=Mn(function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=e.apply(this,n);return r.cache=i.set(a,s)||i,s},"memoized");return r.cache=new(rk.Cache||OA),r}Mn(rk,"memoize"),rk.Cache=OA;var nk=rk;function ak(e){var t=nk(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}Mn(ak,"memoizeCapped");var ik=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sk=/\\(\\)?/g,ok=ak(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ik,function(e,r,n,a){t.push(n?a.replace(sk,"$1"):r||e)}),t}),lk=Rb?Rb.prototype:void 0,uk=lk?lk.toString:void 0;function ck(e){if("string"==typeof e)return e;if(lC(e))return VE(e,ck)+"";if(ZS(e))return uk?uk.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}Mn(ck,"baseToString");var pk=ck;function dk(e){return null==e?"":pk(e)}Mn(dk,"toString");var fk=dk;function mk(e,t){return lC(e)?e:tk(e,t)?[e]:ok(fk(e))}Mn(mk,"castPath");var hk=mk;function yk(e){if("string"==typeof e||ZS(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}Mn(yk,"toKey");var gk=yk;function vk(e,t){for(var r=0,n=(t=hk(t,e)).length;null!=e&&r<n;)e=e[gk(t[r++])];return r&&r==n?e:void 0}Mn(vk,"baseGet");var Tk=vk;function $k(e,t,r){var n=null==e?void 0:Tk(e,t);return void 0===n?r:n}Mn($k,"get");var Rk=$k;function Ek(e,t){return null!=e&&t in Object(e)}Mn(Ek,"baseHasIn");var bk=Ek;function Ak(e,t,r){for(var n=-1,a=(t=hk(t,e)).length,i=!1;++n<a;){var s=gk(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=a?i:!!(a=null==e?0:e.length)&&jC(a)&&DC(s,a)&&(lC(e)||kC(e))}Mn(Ak,"hasPath");var Ck=Ak;function Sk(e,t){return null!=e&&Ck(e,t,bk)}Mn(Sk,"hasIn");var kk=Sk;function xk(e,t){return tk(e)&&qS(t)?WS(gk(e),t):function(r){var n=Rk(r,e);return void 0===n&&n===t?kk(r,e):FS(t,n,3)}}Mn(xk,"baseMatchesProperty");var wk=xk;function Nk(e){return e}Mn(Nk,"identity");var _k=Nk;function Ik(e){return function(t){return null==t?void 0:t[e]}}Mn(Ik,"baseProperty");var Pk=Ik;function Ok(e){return function(t){return Tk(t,e)}}Mn(Ok,"basePropertyDeep");var Lk=Ok;function Dk(e){return tk(e)?Pk(gk(e)):Lk(e)}Mn(Dk,"property");var Mk=Dk;function jk(e){return"function"==typeof e?e:null==e?_k:"object"==typeof e?lC(e)?wk(e[0],e[1]):YS(e):Mk(e)}Mn(jk,"baseIteratee");var Fk=jk;function Gk(e){return function(t,r,n){for(var a=-1,i=Object(t),s=n(t),o=s.length;o--;){var l=s[e?o:++a];if(!1===r(i[l],l,i))break}return t}}Mn(Gk,"createBaseFor");var zk=Gk();function Kk(e,t){return e&&zk(e,t,cS)}Mn(Kk,"baseForOwn");var qk=Kk;function Uk(e,t){return function(r,n){if(null==r)return r;if(!lS(r))return e(r,n);for(var a=r.length,i=t?a:-1,s=Object(r);(t?i--:++i<a)&&!1!==n(s[i],i,s););return r}}Mn(Uk,"createBaseEach");var Bk=Uk(qk);function Vk(e,t){var r=-1,n=lS(e)?Array(e.length):[];return Bk(e,function(e,a,i){n[++r]=t(e,a,i)}),n}Mn(Vk,"baseMap");var Wk=Vk;function Hk(e,t){return(lC(e)?VE:Wk)(e,Fk(t))}Mn(Hk,"map");var Yk=Hk;function Xk(e,t){var r=[];return Bk(e,function(e,n,a){t(e,n,a)&&r.push(e)}),r}Mn(Xk,"baseFilter");var Zk=Xk;function Jk(e,t){return(lC(e)?dC:Zk)(e,Fk(t))}Mn(Jk,"filter");var Qk=Jk;function ex(e,t,r){return`${e.name}_${t}_${r}`}Mn(ex,"buildATNKey");var tx=(Mn(ne=class{constructor(e){this.target=e}isEpsilon(){return!1}},"AbstractTransition"),ne),rx=(Mn(ae=class extends tx{constructor(e,t){super(e),this.tokenType=t}},"AtomTransition"),ae),nx=(Mn(ie=class extends tx{constructor(e){super(e)}isEpsilon(){return!0}},"EpsilonTransition"),ie),ax=(Mn(se=class extends tx{constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}},"RuleTransition"),se);function ix(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};sx(t,e);const r=e.length;for(let n=0;n<r;n++){const r=e[n],a=mx(t,r,r);void 0!==a&&Ax(t,r,a)}return t}function sx(e,t){const r=t.length;for(let n=0;n<r;n++){const r=t[n],a=Sx(e,r,void 0,{type:2}),i=Sx(e,r,void 0,{type:7});a.stop=i,e.ruleToStartState.set(r,a),e.ruleToStopState.set(r,i)}}function ox(e,t,r){return r instanceof zv?Ex(e,t,r.terminalType,r):r instanceof Iv?bx(e,t,r):r instanceof Gv?dx(e,t,r):r instanceof Lv?fx(e,t,r):r instanceof jv?lx(e,t,r):r instanceof Fv?ux(e,t,r):r instanceof Dv?cx(e,t,r):r instanceof Mv?px(e,t,r):mx(e,t,r)}function lx(e,t,r){const n=Sx(e,t,r,{type:5});vx(e,n);return yx(e,t,r,Tx(e,t,n,r,mx(e,t,r)))}function ux(e,t,r){const n=Sx(e,t,r,{type:5});vx(e,n);return yx(e,t,r,Tx(e,t,n,r,mx(e,t,r)),Ex(e,t,r.separator,r))}function cx(e,t,r){const n=Sx(e,t,r,{type:4});vx(e,n);return hx(e,t,r,Tx(e,t,n,r,mx(e,t,r)))}function px(e,t,r){const n=Sx(e,t,r,{type:4});vx(e,n);return hx(e,t,r,Tx(e,t,n,r,mx(e,t,r)),Ex(e,t,r.separator,r))}function dx(e,t,r){const n=Sx(e,t,r,{type:1});vx(e,n);const a=Yk(r.definition,r=>ox(e,t,r));return Tx(e,t,n,r,...a)}function fx(e,t,r){const n=Sx(e,t,r,{type:1});vx(e,n);return gx(e,t,r,Tx(e,t,n,r,mx(e,t,r)))}function mx(e,t,r){const n=Qk(Yk(r.definition,r=>ox(e,t,r)),e=>void 0!==e);return 1===n.length?n[0]:0===n.length?void 0:Rx(e,n)}function hx(e,t,r,n,a){const i=n.left,s=n.right,o=Sx(e,t,r,{type:11});vx(e,o);const l=Sx(e,t,r,{type:12});return i.loopback=o,l.loopback=o,e.decisionMap[ex(t,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o,Cx(s,o),void 0===a?(Cx(o,i),Cx(o,l)):(Cx(o,l),Cx(o,a.left),Cx(a.right,i)),{left:i,right:l}}function yx(e,t,r,n,a){const i=n.left,s=n.right,o=Sx(e,t,r,{type:10});vx(e,o);const l=Sx(e,t,r,{type:12}),u=Sx(e,t,r,{type:9});return o.loopback=u,l.loopback=u,Cx(o,i),Cx(o,l),Cx(s,u),void 0!==a?(Cx(u,l),Cx(u,a.left),Cx(a.right,i)):Cx(u,o),e.decisionMap[ex(t,a?"RepetitionWithSeparator":"Repetition",r.idx)]=o,{left:o,right:l}}function gx(e,t,r,n){const a=n.left;return Cx(a,n.right),e.decisionMap[ex(t,"Option",r.idx)]=a,n}function vx(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function Tx(e,t,r,n,...a){const i=Sx(e,t,n,{type:8,start:r});r.end=i;for(const o of a)void 0!==o?(Cx(r,o.left),Cx(o.right,i)):Cx(r,i);const s={left:r,right:i};return e.decisionMap[ex(t,$x(n),n.idx)]=r,s}function $x(e){if(e instanceof Gv)return"Alternation";if(e instanceof Lv)return"Option";if(e instanceof jv)return"Repetition";if(e instanceof Fv)return"RepetitionWithSeparator";if(e instanceof Dv)return"RepetitionMandatory";if(e instanceof Mv)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function Rx(e,t){const r=t.length;for(let i=0;i<r-1;i++){const r=t[i];let n;1===r.left.transitions.length&&(n=r.left.transitions[0]);const a=n instanceof ax,s=n,o=t[i+1].left;1===r.left.type&&1===r.right.type&&void 0!==n&&(a&&s.followState===r.right||n.target===r.right)?(a?s.followState=o:n.target=o,xx(e,r.right)):Cx(r.right,o)}const n=t[0],a=t[r-1];return{left:n.left,right:a.right}}function Ex(e,t,r,n){const a=Sx(e,t,n,{type:1}),i=Sx(e,t,n,{type:1});return kx(a,new rx(i,r)),{left:a,right:i}}function bx(e,t,r){const n=r.referencedRule,a=e.ruleToStartState.get(n),i=Sx(e,t,r,{type:1}),s=Sx(e,t,r,{type:1});return kx(i,new ax(a,n,s)),{left:i,right:s}}function Ax(e,t,r){const n=e.ruleToStartState.get(t);Cx(n,r.left);const a=e.ruleToStopState.get(t);Cx(r.right,a);return{left:n,right:a}}function Cx(e,t){kx(e,new nx(t))}function Sx(e,t,r,n){const a=Object.assign({atn:e,production:r,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},n);return e.states.push(a),a}function kx(e,t){0===e.transitions.length&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function xx(e,t){e.states.splice(e.states.indexOf(t),1)}Mn(ix,"createATN"),Mn(sx,"createRuleStartAndStopATNStates"),Mn(ox,"atom"),Mn(lx,"repetition"),Mn(ux,"repetitionSep"),Mn(cx,"repetitionMandatory"),Mn(px,"repetitionMandatorySep"),Mn(dx,"alternation"),Mn(fx,"option"),Mn(mx,"block"),Mn(hx,"plus"),Mn(yx,"star"),Mn(gx,"optional"),Mn(vx,"defineDecisionState"),Mn(Tx,"makeAlts"),Mn($x,"getProdType"),Mn(Rx,"makeBlock"),Mn(Ex,"tokenRef"),Mn(bx,"ruleRef"),Mn(Ax,"buildRuleHandle"),Mn(Cx,"epsilon"),Mn(Sx,"newState"),Mn(kx,"addTransition"),Mn(xx,"removeState");var wx={},Nx=(Mn(oe=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const t=_x(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return Yk(this.configs,e=>e.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}},"ATNConfigSet"),oe);function _x(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join("_")}`}function Ix(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],s=t(i);if(null!=s&&(void 0===o?s==s&&!ZS(s):r(s,o)))var o=s,l=i}return l}Mn(_x,"getATNConfigKey"),Mn(Ix,"baseExtremum");var Px=Ix;function Ox(e,t){return e<t}Mn(Ox,"baseLt");var Lx=Ox;function Dx(e){return e&&e.length?Px(e,_k,Lx):void 0}Mn(Dx,"min");var Mx=Dx,jx=Rb?Rb.isConcatSpreadable:void 0;function Fx(e){return lC(e)||kC(e)||!!(jx&&e&&e[jx])}Mn(Fx,"isFlattenable");var Gx=Fx;function zx(e,t,r,n,a){var i=-1,s=e.length;for(r||(r=Gx),a||(a=[]);++i<s;){var o=e[i];t>0&&r(o)?t>1?zx(o,t-1,r,n,a):oC(a,o):n||(a[a.length]=o)}return a}Mn(zx,"baseFlatten");var Kx=zx;function qx(e,t){return Kx(Yk(e,t),1)}Mn(qx,"flatMap");var Ux=qx;function Bx(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}Mn(Bx,"baseFindIndex");var Vx=Bx;function Wx(e){return e!=e}Mn(Wx,"baseIsNaN");var Hx=Wx;function Yx(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}Mn(Yx,"strictIndexOf");var Xx=Yx;function Zx(e,t,r){return t==t?Xx(e,t,r):Vx(e,Hx,r)}Mn(Zx,"baseIndexOf");var Jx=Zx;function Qx(e,t){return!!(null==e?0:e.length)&&Jx(e,t,0)>-1}Mn(Qx,"arrayIncludes");var ew=Qx;function tw(e,t,r){for(var n=-1,a=null==e?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}Mn(tw,"arrayIncludesWith");var rw=tw;function nw(){}Mn(nw,"noop");var aw=nw,iw=vS&&1/tC(new vS([,-0]))[1]==1/0?function(e){return new vS(e)}:aw;function sw(e,t,r){var n=-1,a=ew,i=e.length,s=!0,o=[],l=o;if(r)s=!1,a=rw;else if(i>=200){var u=t?null:iw(e);if(u)return tC(u);s=!1,a=HA,l=new UA}else l=t?[]:o;e:for(;++n<i;){var c=e[n],p=t?t(c):c;if(c=r||0!==c?c:0,s&&p==p){for(var d=l.length;d--;)if(l[d]===p)continue e;t&&l.push(p),o.push(c)}else a(l,p,r)||(l!==o&&l.push(p),o.push(c))}return o}Mn(sw,"baseUniq");var ow=sw;function lw(e,t){return e&&e.length?ow(e,Fk(t)):[]}Mn(lw,"uniqBy");var uw=lw;function cw(e){return(null==e?0:e.length)?Kx(e,1):[]}Mn(cw,"flatten");var pw=cw;function dw(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}Mn(dw,"arrayEach");var fw=dw;function mw(e){return"function"==typeof e?e:_k}Mn(mw,"castFunction");var hw=mw;function yw(e,t){return(lC(e)?fw:Bk)(e,hw(t))}Mn(yw,"forEach");var gw=yw,vw=Object.prototype.hasOwnProperty;function Tw(e){if(null==e)return!0;if(lS(e)&&(lC(e)||"string"==typeof e||"function"==typeof e.splice||PC(e)||YC(e)||kC(e)))return!e.length;var t=_S(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(tS(e))return!sS(e).length;for(var r in e)if(vw.call(e,r))return!1;return!0}Mn(Tw,"isEmpty");var $w=Tw;function Rw(e,t,r,n){var a=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++a]);++a<i;)r=t(r,e[a],a,e);return r}Mn(Rw,"arrayReduce");var Ew=Rw;function bw(e,t,r,n,a){return a(e,function(e,a,i){r=n?(n=!1,e):t(r,e,a,i)}),r}Mn(bw,"baseReduce");var Aw=bw;function Cw(e,t,r){var n=lC(e)?Ew:Aw,a=arguments.length<3;return n(e,Fk(t),r,a,Bk)}Mn(Cw,"reduce");var Sw=Cw;function kw(e,t){const r={};return n=>{const a=n.toString();let i=r[a];return void 0!==i||(i={atnStartState:e,decision:t,states:{}},r[a]=i),i}}Mn(kw,"createDFACache");var xw=(Mn(le=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let r=0;r<t;r++)e+=!0===this.predicates[r]?"1":"0";return e}},"PredicateSet"),le),ww=new xw,Nw=(Mn(ue=class extends rE{constructor(e){var t;super(),this.logging=null!==(t=null==e?void 0:e.logging)&&void 0!==t?t:e=>{}}initialize(e){this.atn=ix(e.rules),this.dfas=Iw(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:a}=e,i=this.dfas,s=this.logging,o=ex(r,"Alternation",t),l=this.atn.decisionMap[o].decision,u=Yk(Q$({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),e=>Yk(e,e=>e[0]));if(_w(u,!1)&&!a){const e=Sw(u,(e,t,r)=>(gw(t,t=>{t&&(e[t.tokenTypeIdx]=r,gw(t.categoryMatches,t=>{e[t]=r}))}),e),{});return n?function(t){var r;const n=this.LA(1),a=e[n.tokenTypeIdx];if(void 0!==t&&void 0!==a){const e=null===(r=t[a])||void 0===r?void 0:r.GATE;if(void 0!==e&&!1===e.call(this))return}return a}:function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}return n?function(e){const t=new xw,r=void 0===e?0:e.length;for(let a=0;a<r;a++){const r=null==e?void 0:e[a].GATE;t.set(a,void 0===r||r.call(this))}const n=Pw.call(this,i,l,t,s);return"number"==typeof n?n:void 0}:function(){const e=Pw.call(this,i,l,ww,s);return"number"==typeof e?e:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:t,rule:r,prodType:n,dynamicTokensEnabled:a}=e,i=this.dfas,s=this.logging,o=ex(r,n,t),l=this.atn.decisionMap[o].decision,u=Yk(Q$({maxLookahead:1,occurrence:t,prodType:n,rule:r}),e=>Yk(e,e=>e[0]));if(_w(u)&&u[0][0]&&!a){const e=u[0],t=pw(e);if(1===t.length&&$w(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=Sw(t,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,gw(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){const e=Pw.call(this,i,l,ww,s);return"object"!=typeof e&&0===e}}},"LLStarLookaheadStrategy"),ue);function _w(e,t=!0){const r=new Set;for(const n of e){const e=new Set;for(const a of n){if(void 0===a){if(t)break;return!1}const n=[a.tokenTypeIdx].concat(a.categoryMatches);for(const t of n)if(r.has(t)){if(!e.has(t))return!1}else r.add(t),e.add(t)}}return!0}function Iw(e){const t=e.decisionStates.length,r=Array(t);for(let n=0;n<t;n++)r[n]=kw(e.decisionStates[n],n);return r}function Pw(e,t,r,n){const a=e[t](r);let i=a.start;if(void 0===i){i=Vw(a,Uw(Ww(a.atnStartState))),a.start=i}return Ow.apply(this,[a,i,r,n])}function Ow(e,t,r,n){let a=t,i=1;const s=[];let o=this.LA(i++);for(;;){let t=Gw(a,o);if(void 0===t&&(t=Lw.apply(this,[e,a,o,i,r,n])),t===wx)return Fw(s,a,o);if(!0===t.isAcceptState)return t.prediction;a=t,s.push(o),o=this.LA(i++)}}function Lw(e,t,r,n,a,i){const s=zw(t.configs,r,a);if(0===s.size)return Bw(e,t,r,wx),wx;let o=Uw(s);const l=qw(s,a);if(void 0!==l)o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l;else if(Jw(s)){const t=Mx(s.alts);o.isAcceptState=!0,o.prediction=t,o.configs.uniqueAlt=t,Dw.apply(this,[e,n,s.alts,i])}return o=Bw(e,t,r,o),o}function Dw(e,t,r,n){const a=[];for(let s=1;s<=t;s++)a.push(this.LA(s).tokenType);const i=e.atnStartState;n(Mw({topLevelRule:i.rule,ambiguityIndices:r,production:i.production,prefixPath:a}))}function Mw(e){const t=Yk(e.prefixPath,e=>$$(e)).join(", "),r=0===e.production.idx?"":e.production.idx;let n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${jw(e.production)}${r}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return n+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",n}function jw(e){if(e instanceof Iv)return"SUBRULE";if(e instanceof Lv)return"OPTION";if(e instanceof Gv)return"OR";if(e instanceof Dv)return"AT_LEAST_ONE";if(e instanceof Mv)return"AT_LEAST_ONE_SEP";if(e instanceof Fv)return"MANY_SEP";if(e instanceof jv)return"MANY";if(e instanceof zv)return"CONSUME";throw Error("non exhaustive match")}function Fw(e,t,r){const n=Ux(t.configs.elements,e=>e.state.transitions);return{actualToken:r,possibleTokenTypes:uw(n.filter(e=>e instanceof rx).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function Gw(e,t){return e.edges[t.tokenTypeIdx]}function zw(e,t,r){const n=new Nx,a=[];for(const s of e.elements){if(!1===r.is(s.alt))continue;if(7===s.state.type){a.push(s);continue}const e=s.state.transitions.length;for(let r=0;r<e;r++){const e=Kw(s.state.transitions[r],t);void 0!==e&&n.add({state:e,alt:s.alt,stack:s.stack})}}let i;if(0===a.length&&1===n.size&&(i=n),void 0===i){i=new Nx;for(const e of n.elements)Hw(e,i)}if(a.length>0&&!Xw(i))for(const s of a)i.add(s);return i}function Kw(e,t){if(e instanceof rx&&O$(t,e.tokenType))return e.target}function qw(e,t){let r;for(const n of e.elements)if(!0===t.is(n.alt))if(void 0===r)r=n.alt;else if(r!==n.alt)return;return r}function Uw(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function Bw(e,t,r,n){return n=Vw(e,n),t.edges[r.tokenTypeIdx]=n,n}function Vw(e,t){if(t===wx)return t;const r=t.configs.key,n=e.states[r];return void 0!==n?n:(t.configs.finalize(),e.states[r]=t,t)}function Ww(e){const t=new Nx,r=e.transitions.length;for(let n=0;n<r;n++){Hw({state:e.transitions[n].target,alt:n,stack:[]},t)}return t}function Hw(e,t){const r=e.state;if(7===r.type){if(e.stack.length>0){const r=[...e.stack];Hw({state:r.pop(),alt:e.alt,stack:r},t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);const n=r.transitions.length;for(let a=0;a<n;a++){const n=Yw(e,r.transitions[a]);void 0!==n&&Hw(n,t)}}function Yw(e,t){if(t instanceof nx)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof ax){const r=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:r}}}function Xw(e){for(const t of e.elements)if(7===t.state.type)return!0;return!1}function Zw(e){for(const t of e.elements)if(7!==t.state.type)return!1;return!0}function Jw(e){if(Zw(e))return!0;const t=Qw(e.elements);return eN(t)&&!tN(t)}function Qw(e){const t=new Map;for(const r of e){const e=_x(r,!1);let n=t.get(e);void 0===n&&(n={},t.set(e,n)),n[r.alt]=!0}return t}function eN(e){for(const t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}function tN(e){for(const t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}Mn(_w,"isLL1Sequence"),Mn(Iw,"initATNSimulator"),Mn(Pw,"adaptivePredict"),Mn(Ow,"performLookahead"),Mn(Lw,"computeLookaheadTarget"),Mn(Dw,"reportLookaheadAmbiguity"),Mn(Mw,"buildAmbiguityError"),Mn(jw,"getProductionDslName"),Mn(Fw,"buildAdaptivePredictError"),Mn(Gw,"getExistingTargetState"),Mn(zw,"computeReachSet"),Mn(Kw,"getReachableTarget"),Mn(qw,"getUniqueAlt"),Mn(Uw,"newDFAState"),Mn(Bw,"addDFAEdge"),Mn(Vw,"addDFAState"),Mn(Ww,"computeStartState"),Mn(Hw,"closure"),Mn(Yw,"getEpsilonTarget"),Mn(Xw,"hasConfigInRuleStopState"),Mn(Zw,"allConfigsInRuleStopStates"),Mn(Jw,"hasConflictTerminatingPrediction"),Mn(Qw,"getConflictingAltSets"),Mn(eN,"hasConflictingAltSet"),Mn(tN,"hasStateAssociatedWithOneAlt"),Wn();var rN=(Mn(ce=class{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new oN(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const t=new iN;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){const r=new aN(e.startOffset,e.image.length,bo(e),e.tokenType,!t);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){const t=e.container;if(t){const r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}addHiddenNodes(e){const t=[];for(const a of e){const e=new aN(a.startOffset,a.image.length,bo(a),a.tokenType,!0);e.root=this.rootNode,t.push(e)}let r=this.current,n=!1;if(r.content.length>0)r.content.push(...t);else{for(;r.container;){const e=r.container.content.indexOf(r);if(e>0){r.container.content.splice(e,0,...t),n=!0;break}r=r.container}n||this.rootNode.content.unshift(...t)}}construct(e){const t=this.current;"string"!=typeof e.$type||e.$infix||(this.current.astNode=e),e.$cstNode=t;const r=this.nodeStack.pop();0===(null==r?void 0:r.content.length)&&this.removeNode(r)}},"CstNodeBuilder"),ce),nN=(Mn(pe=class{get hidden(){return!1}get astNode(){var e,t;const r="string"==typeof(null==(e=this._astNode)?void 0:e.$type)?this._astNode:null==(t=this.container)?void 0:t.astNode;if(!r)throw new Error("This node has no associated AST element");return r}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},"AbstractCstNode"),pe),aN=(Mn(de=class extends nN{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}},"LeafCstNodeImpl"),de),iN=(Mn(fe=class extends nN{constructor(){super(...arguments),this.content=new sN(this)}get offset(){var e;return(null==(e=this.firstNonHiddenNode)?void 0:e.offset)??0}get length(){return this.end-this.offset}get end(){var e;return(null==(e=this.lastNonHiddenNode)?void 0:e.end)??0}get range(){const e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(void 0===this._rangeCache){const{range:r}=e,{range:n}=t;this._rangeCache={start:r.start,end:n.end.line<r.start.line?r.start:n.end}}return this._rangeCache}return{start:nr.create(0,0),end:nr.create(0,0)}}get firstNonHiddenNode(){for(const e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},"CompositeCstNodeImpl"),fe),sN=(Mn(me=class extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,me.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...r){return this.addParents(r),super.splice(e,t,...r)}addParents(e){for(const t of e)t.container=this.parent}},"CstNodeContainer"),me),oN=(Mn(he=class extends iN{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}},"RootCstNodeImpl"),he),lN=Symbol("Datatype");function uN(e){return e.$type===lN}Mn(uN,"isDataTypeNode");var cN=Mn(e=>e.endsWith("​")?e:e+"​","withRuleSuffix"),pN=(Mn(ye=class{constructor(e){var t;this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const r=this.lexer.definition,n="production"===e.LanguageMetaData.mode;(null==(t=e.shared.profilers.LangiumProfiler)?void 0:t.isActive("parsing"))?this.wrapper=new vN(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new gN(r,{...e.parser.ParserConfig,skipValidations:n,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()}},"AbstractLangiumParser"),ye),dN=(Mn(ge=class extends pN{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new rN,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){const r=this.computeRuleType(e);let n;os(e)&&(n=e.name,this.registerPrecedenceMap(e));const a=this.wrapper.DEFINE_RULE(cN(e.name),this.startImplementation(r,n,t).bind(this));return this.allRules.set(e.name,a),ws(e)&&e.entry&&(this.mainRule=a),a}registerPrecedenceMap(e){const t=e.name,r=new Map;for(let n=0;n<e.operators.precedences.length;n++){const t=e.operators.precedences[n];for(const e of t.operators)r.set(e.value,{precedence:n,rightAssoc:"right"===t.associativity})}this.operatorPrecedence.set(t,r)}computeRuleType(e){return os(e)?Gl(e):e.fragment?void 0:Ll(e)?lN:Gl(e)}parse(e,t={}){this.nodeBuilder.buildRootNode(e);const r=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=r.tokens;const n=t.rule?this.allRules.get(t.rule):this.mainRule;if(!n)throw new Error(t.rule?`No rule found with name '${t.rule}'`:"No main rule available.");const a=this.doParse(n);return this.nodeBuilder.addHiddenNodes(r.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,ai(a,{deep:!0}),{value:a,lexerErrors:r.errors,lexerReport:r.report,parserErrors:this.wrapper.errors}}doParse(e){let t=this.wrapper.rule(e);if(this.stack.length>0&&(t=this.construct()),void 0===t)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=>{const a=!this.isRecording()&&void 0!==e;if(a){const r={$type:e};this.stack.push(r),e===lN?r.value="":void 0!==t&&(r.$infixName=t)}return r(n),a?this.construct():void 0}}extractHiddenTokens(e){const t=this.lexerResult.hidden;if(!t.length)return[];const r=e.startOffset;for(let n=0;n<t.length;n++){if(t[n].startOffset>r)return t.splice(0,n)}return t.splice(0,t.length)}consume(e,t,r){const n=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(n)){const e=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(e);const t=this.nodeBuilder.buildLeafNode(n,r),{assignment:a,crossRef:i}=this.getAssignment(r),s=this.current;if(a){const e=hs(r)?n.image:this.converter.convert(n.image,t);this.assign(a.operator,a.feature,e,t,i)}else if(uN(s)){let e=n.image;hs(r)||(e=this.converter.convert(e,t).toString()),s.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,r,n,a){let i,s;this.isRecording()||r||(i=this.nodeBuilder.buildCompositeNode(n));try{s=this.wrapper.wrapSubrule(e,t,a)}finally{this.isRecording()||(void 0!==s||r||(s=this.construct()),void 0!==s&&i&&i.length>0&&this.performSubruleAssignment(s,n,i))}}performSubruleAssignment(e,t,r){const{assignment:n,crossRef:a}=this.getAssignment(t);if(n)this.assign(n.operator,n.feature,e,r,a);else if(!n){const t=this.current;if(uN(t))t.value+=e.toString();else if("object"==typeof e&&e){const r=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(r)}}}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);const n={$type:e};this.stack.push(n),this.assign(t.operator,t.feature,r,r.$cstNode)}else r.$type=e}}construct(){if(this.isRecording())return;const e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):uN(e)?this.converter.convert(e.value,e.$cstNode):(hi(this.astReflection,e),e)}constructInfix(e,t){const r=e.parts;if(!Array.isArray(r)||0===r.length)return;const n=e.operators;if(!Array.isArray(n)||r.length<2)return r[0];let a=0,i=-1;for(let m=0;m<n.length;m++){const e=n[m],r=t.get(e)??{precedence:1/0,rightAssoc:!1};r.precedence>i?(i=r.precedence,a=m):r.precedence===i&&(r.rightAssoc||(a=m))}const s=n.slice(0,a),o=n.slice(a+1),l=r.slice(0,a+1),u=r.slice(a+1),c={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:s},p={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:o},d=this.constructInfix(c,t),f=this.constructInfix(p,t);return{$type:e.$type,$cstNode:e.$cstNode,left:d,operator:n[a],right:f}}getAssignment(e){if(!this.assignmentMap.has(e)){const t=ii(e,Mi);this.assignmentMap.set(e,{assignment:t,crossRef:t&&Wi(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,r,n,a){const i=this.current;let s;switch(s="single"===a&&"string"==typeof r?this.linker.buildReference(i,t,n,r):"multi"===a&&"string"==typeof r?this.linker.buildMultiReference(i,t,n,r):r,e){case"=":i[t]=s;break;case"?=":i[t]=!0;break;case"+=":Array.isArray(i[t])||(i[t]=[]),i[t].push(s)}}assignWithoutOverride(e,t){for(const[n,a]of Object.entries(t)){const t=e[n];void 0===t?e[n]=a:Array.isArray(t)&&Array.isArray(a)&&(a.push(...t),e[n]=a)}const r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},"LangiumParser"),ge),fN=(Mn(ve=class{buildMismatchTokenMessage(e){return L$.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return L$.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return L$.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return L$.buildEarlyExitMessage(e)}},"AbstractParserErrorMessageProvider"),ve),mN=(Mn(Te=class extends fN{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}\`.`}},"LangiumParserErrorMessageProvider"),Te),hN=(Mn($e=class extends pN{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const 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){const r=this.wrapper.DEFINE_RULE(cN(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=>{const r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const 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()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},"LangiumCompletionParser"),$e),yN={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new mN},gN=(Mn(Re=class extends UE{constructor(e,t){super(e,{...yN,lookaheadStrategy:t&&"maxLookahead"in t?new rE({maxLookahead:t.maxLookahead}):new Nw({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,{})}},"ChevrotainWrapper"),Re),vN=(Mn(Ee=class extends gN{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))}}},"ProfilerWrapper"),Ee);function TN(e,t,r){return $N({parser:t,tokens:r,ruleNames:new Map},e),t}function $N(e,t){const r=gl(t,!1),n=ei(t.rules).filter(ws).filter(e=>r.has(e));for(const i of n){const t={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(i,EN(t,i.definition))}const a=ei(t.rules).filter(os).filter(e=>r.has(e));for(const i of a)e.parser.rule(i,RN(e,i))}function RN(e,t){const r=t.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if(Ys(r))throw new Error("Cannot use terminal rule in infix expression");const n=t.operators.precedences.flatMap(e=>e.operators),a={$type:"Group",elements:[]},i={$container:a,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},s={$container:a,$type:"Group",elements:[],cardinality:"*"};a.elements.push(i,s);const o={$container:s,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},l={...i,$container:s};s.elements.push(o,l);const u=n.map(t=>e.tokens[t.value]).map((t,r)=>({ALT:Mn(()=>e.parser.consume(r,t,o),"ALT")}));let c;return t=>{c??(c=ON(e,r)),e.parser.subrule(0,c,!1,i,t),e.parser.many(0,{DEF:Mn(()=>{e.parser.alternatives(0,u),e.parser.subrule(1,c,!1,l,t)},"DEF")})}}function EN(e,t,r=!1){let n;if(hs(t))n=IN(e,t);else if(wi(t))n=bN(e,t);else if(Mi(t))n=EN(e,t.terminal);else if(Wi(t))n=_N(e,t);else if(Ms(t))n=AN(e,t);else if(_i(t))n=kN(e,t);else if(oo(t))n=xN(e,t);else if(ns(t))n=wN(e,t);else{if(!Zi(t))throw new zo(t.$cstNode,`Unexpected element type: ${t.$type}`);{const r=e.consume++;n=Mn(()=>e.parser.consume(r,I$,t),"method")}}return PN(e,r?void 0:NN(t),n,t.cardinality)}function bN(e,t){const r=Gl(t);return()=>e.parser.action(r,t)}function AN(e,t){const r=t.rule.ref;if(bi(r)){const n=e.subrule++,a=ws(r)&&r.fragment,i=t.arguments.length>0?CN(r,t.arguments):()=>({});let s;return o=>{s??(s=ON(e,r)),e.parser.subrule(n,s,a,t,i(o))}}if(Ys(r)){const n=e.consume++,a=DN(e,r.name);return()=>e.parser.consume(n,a,t)}if(!r)throw new zo(t.$cstNode,`Undefined rule: ${t.rule.$refText}`);Ko()}function CN(e,t){if(t.some(e=>e.calledByName)){const e=t.map(e=>{var t,r;return{parameterName:null==(r=null==(t=e.parameter)?void 0:t.ref)?void 0:r.name,predicate:SN(e.value)}});return t=>{const r={};for(const{parameterName:n,predicate:a}of e)n&&(r[n]=a(t));return r}}{const r=t.map(e=>SN(e.value));return t=>{const n={};for(let a=0;a<r.length;a++)if(a<e.parameters.length){const i=e.parameters[a].name,s=r[a];n[i]=s(t)}return n}}}function SN(e){if(Yi(e)){const t=SN(e.left),r=SN(e.right);return e=>t(e)||r(e)}if(Bi(e)){const t=SN(e.left),r=SN(e.right);return e=>t(e)&&r(e)}if(Rs(e)){const t=SN(e.value);return e=>!t(e)}if(ks(e)){const t=e.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(Fi(e)){const t=Boolean(e.true);return()=>t}Ko()}function kN(e,t){if(1===t.elements.length)return EN(e,t.elements[0]);{const r=[];for(const a of t.elements){const t={ALT:EN(e,a,!0)},n=NN(a);n&&(t.GATE=SN(n)),r.push(t)}const n=e.or++;return t=>e.parser.alternatives(n,r.map(e=>{const r={ALT:Mn(()=>e.ALT(t),"ALT")},n=e.GATE;return n&&(r.GATE=()=>n(t)),r}))}}function xN(e,t){if(1===t.elements.length)return EN(e,t.elements[0]);const r=[];for(const o of t.elements){const t={ALT:EN(e,o,!0)},n=NN(o);n&&(t.GATE=SN(n)),r.push(t)}const n=e.or++,a=Mn((e,t)=>`uGroup_${e}_${t.getRuleStack().join("-")}`,"idFunc"),i=Mn(t=>e.parser.alternatives(n,r.map((r,i)=>{const s={ALT:Mn(()=>!0,"ALT")},o=e.parser;s.ALT=()=>{if(r.ALT(t),!o.isRecording()){const e=a(n,o);o.unorderedGroups.get(e)||o.unorderedGroups.set(e,[]);const t=o.unorderedGroups.get(e);void 0===(null==t?void 0:t[i])&&(t[i]=!0)}};const l=r.GATE;return s.GATE=l?()=>l(t):()=>{const e=o.unorderedGroups.get(a(n,o));return!(null==e?void 0:e[i])},s})),"alternatives"),s=PN(e,NN(t),i,"*");return t=>{s(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(a(n,e.parser))}}function wN(e,t){const r=t.elements.map(t=>EN(e,t));return e=>r.forEach(t=>t(e))}function NN(e){if(ns(e))return e.guardCondition}function _N(e,t,r=t.terminal){if(r){if(Ms(r)&&ws(r.rule.ref)){const n=r.rule.ref,a=e.subrule++;let i;return r=>{i??(i=ON(e,n)),e.parser.subrule(a,i,!1,t,r)}}if(Ms(r)&&Ys(r.rule.ref)){const n=e.consume++,a=DN(e,r.rule.ref.name);return()=>e.parser.consume(n,a,t)}if(hs(r)){const n=e.consume++,a=DN(e,r.value);return()=>e.parser.consume(n,a,t)}throw new Error("Could not build cross reference parser")}{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);const r=wl(t.type.ref),n=null==r?void 0:r.terminal;if(!n)throw new Error("Could not find name assignment for type: "+Gl(t.type.ref));return _N(e,t,n)}}function IN(e,t){const 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)}function PN(e,t,r,n){const a=t&&SN(t);if(!n){if(a){const t=e.or++;return n=>e.parser.alternatives(t,[{ALT:Mn(()=>r(n),"ALT"),GATE:Mn(()=>a(n),"GATE")},{ALT:KE(),GATE:Mn(()=>!a(n),"GATE")}])}return r}if("*"===n){const t=e.many++;return n=>e.parser.many(t,{DEF:Mn(()=>r(n),"DEF"),GATE:a?()=>a(n):void 0})}if("+"===n){const t=e.many++;if(a){const n=e.or++;return i=>e.parser.alternatives(n,[{ALT:Mn(()=>e.parser.atLeastOne(t,{DEF:Mn(()=>r(i),"DEF")}),"ALT"),GATE:Mn(()=>a(i),"GATE")},{ALT:KE(),GATE:Mn(()=>!a(i),"GATE")}])}return n=>e.parser.atLeastOne(t,{DEF:Mn(()=>r(n),"DEF")})}if("?"===n){const t=e.optional++;return n=>e.parser.optional(t,{DEF:Mn(()=>r(n),"DEF"),GATE:a?()=>a(n):void 0})}Ko()}function ON(e,t){const r=LN(e,t),n=e.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function LN(e,t){if(bi(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,n=r.$container,a=t.$type;for(;!ws(n);){if(ns(n)||_i(n)||oo(n)){a=n.elements.indexOf(r).toString()+":"+a}r=n,n=n.$container}return a=n.name+":"+a,e.ruleNames.set(t,a),a}}function DN(e,t){const r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}function MN(e){const t=e.Grammar,r=e.parser.Lexer,n=new hN(e);return TN(t,n,r.definition),n.finalize(),n}function jN(e){const t=FN(e);return t.finalize(),t}function FN(e){const t=e.Grammar,r=e.parser.Lexer;return TN(t,new dN(e),r.definition)}Mn(TN,"createParser"),Mn($N,"buildRules"),Mn(RN,"buildInfixRule"),Mn(EN,"buildElement"),Mn(bN,"buildAction"),Mn(AN,"buildRuleCall"),Mn(CN,"buildRuleCallPredicate"),Mn(SN,"buildPredicate"),Mn(kN,"buildAlternatives"),Mn(xN,"buildUnorderedGroup"),Mn(wN,"buildGroup"),Mn(NN,"getGuardCondition"),Mn(_N,"buildCrossReference"),Mn(IN,"buildKeyword"),Mn(PN,"wrap"),Mn(ON,"getRule"),Mn(LN,"getRuleName"),Mn(DN,"getToken"),Mn(MN,"createCompletionParser"),Mn(jN,"createLangiumParser"),Mn(FN,"prepareLangiumParser");var GN,zN=(Mn(be=class{constructor(){this.diagnostics=[]}buildTokens(e,t){const r=ei(gl(e,!1)),n=this.buildTerminalTokens(r),a=this.buildKeywordTokens(r,n,t);return a.push(...n),a}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Ys).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){const t=Ul(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,n={name:e.name,PATTERN:r};return"function"==typeof r&&(n.LINE_BREAKS=!0),e.hidden&&(n.GROUP=pl(t)?T$.SKIPPED:"hidden"),n}requiresCustomPattern(e){return!(!e.flags.includes("u")&&!e.flags.includes("s"))}regexPatternFunction(e){const t=new RegExp(e,e.flags+"y");return(e,r)=>{t.lastIndex=r;return t.exec(e)}}buildKeywordTokens(e,t,r){return e.filter(bi).flatMap(e=>pi(e).filter(hs)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,Boolean(null==r?void 0:r.caseInsensitive)))}buildKeywordToken(e,t,r){const n=this.buildKeywordPattern(e,r),a={name:e.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(e,t)};return"function"==typeof n&&(a.LINE_BREAKS=!0),a}buildKeywordPattern(e,t){return t?new RegExp(dl(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((t,r)=>{const n=null==r?void 0:r.PATTERN;return(null==n?void 0:n.source)&&fl("^"+n.source+"$",e.value)&&t.push(r),t},[])}},"DefaultTokenBuilder"),be),KN=(Mn(Ae=class{convert(e,t){let r=t.grammarSource;if(Wi(r)&&(r=$l(r)),Ms(r)){const 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){var n;switch(e.name.toUpperCase()){case"INT":return GN.convertInt(t);case"STRING":return GN.convertString(t);case"ID":return GN.convertID(t)}switch(null==(n=ql(e))?void 0:n.toLowerCase()){case"number":return GN.convertNumber(t);case"boolean":return GN.convertBoolean(t);case"bigint":return GN.convertBigint(t);case"date":return GN.convertDate(t);default:return t}}},"DefaultValueConverter"),Ae);!function(e){function t(e){let t="";for(let n=1;n<e.length-1;n++){const a=e.charAt(n);if("\\"===a){t+=r(e.charAt(++n))}else t+=a}return t}function r(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}function n(e){return"^"===e.charAt(0)?e.substring(1):e}function a(e){return parseInt(e)}function i(e){return BigInt(e)}function s(e){return new Date(e)}function o(e){return Number(e)}function l(e){return"true"===e.toLowerCase()}Mn(t,"convertString"),e.convertString=t,Mn(r,"convertEscapeCharacter"),Mn(n,"convertID"),e.convertID=n,Mn(a,"convertInt"),e.convertInt=a,Mn(i,"convertBigint"),e.convertBigint=i,Mn(s,"convertDate"),e.convertDate=s,Mn(o,"convertNumber"),e.convertNumber=o,Mn(l,"convertBoolean"),e.convertBoolean=l}(GN||(GN={}));var qN={};function UN(){return new Promise(e=>{"undefined"==typeof setImmediate?setTimeout(e,0):setImmediate(e)})}zn(qN,Kn(Zn())),Mn(UN,"delayNextTick");var BN=0,VN=10;function WN(){return BN=performance.now(),new qN.CancellationTokenSource}function HN(e){VN=e}Mn(WN,"startCancelableOperation"),Mn(HN,"setInterruptionPeriod");var YN=Symbol("OperationCancelled");function XN(e){return e===YN}async function ZN(e){if(e===qN.CancellationToken.None)return;const t=performance.now();if(t-BN>=VN&&(BN=t,await UN(),BN=performance.now()),e.isCancellationRequested)throw YN}Mn(XN,"isOperationCancelled"),Mn(ZN,"interruptAndCheck");var JN,QN,e_=(Mn(Ce=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},"Deferred"),Ce),t_=(Mn(Se=class{constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(const r of e)if(Se.isIncremental(r)){const e=i_(r.range),t=this.offsetAt(e.start),n=this.offsetAt(e.end);this._content=this._content.substring(0,t)+r.text+this._content.substring(n,this._content.length);const a=Math.max(e.start.line,0),i=Math.max(e.end.line,0);let s=this._lineOffsets;const o=n_(r.text,!1,t);if(i-a===o.length)for(let r=0,u=o.length;r<u;r++)s[r+a+1]=o[r];else o.length<1e4?s.splice(a+1,i-a,...o):this._lineOffsets=s=s.slice(0,a+1).concat(o,s.slice(i+1));const l=r.text.length-(n-t);if(0!==l)for(let r=a+1+o.length,u=s.length;r<u;r++)s[r]=s[r]+l}else{if(!Se.isFull(r))throw new Error("Unknown change event received");this._content=r.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=n_(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let r=0,n=t.length;if(0===n)return{line:0,character:e};for(;r<n;){const a=Math.floor((r+n)/2);t[a]>e?n=a:r=a+1}const a=r-1;return{line:a,character:(e=this.ensureBeforeEOL(e,t[a]))-t[a]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const r=t[e.line];if(e.character<=0)return r;const n=e.line+1<t.length?t[e.line+1]:this._content.length,a=Math.min(r+e.character,n);return this.ensureBeforeEOL(a,r)}ensureBeforeEOL(e,t){for(;e>t&&a_(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}},"FullTextDocument"),Se);function r_(e,t){if(e.length<=1)return e;const r=e.length/2|0,n=e.slice(0,r),a=e.slice(r);r_(n,t),r_(a,t);let i=0,s=0,o=0;for(;i<n.length&&s<a.length;){const r=t(n[i],a[s]);e[o++]=r<=0?n[i++]:a[s++]}for(;i<n.length;)e[o++]=n[i++];for(;s<a.length;)e[o++]=a[s++];return e}function n_(e,t,r=0){const n=t?[r]:[];for(let a=0;a<e.length;a++){const t=e.charCodeAt(a);a_(t)&&(13===t&&a+1<e.length&&10===e.charCodeAt(a+1)&&a++,n.push(r+a+1))}return n}function a_(e){return 13===e||10===e}function i_(e){const t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function s_(e){const t=i_(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){function t(e,t,r,n){return new t_(e,t,r,n)}function r(e,t,r){if(e instanceof t_)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function n(e,t){const r=e.getText(),n=r_(t.map(s_),(e,t)=>{const r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r});let a=0;const i=[];for(const s of n){const t=e.offsetAt(s.range.start);if(t<a)throw new Error("Overlapping edit");t>a&&i.push(r.substring(a,t)),s.newText.length&&i.push(s.newText),a=e.offsetAt(s.range.end)}return i.push(r.substr(a)),i.join("")}Mn(t,"create"),e.create=t,Mn(r,"update"),e.update=r,Mn(n,"applyEdits"),e.applyEdits=n}(JN||(JN={})),Mn(r_,"mergeSort"),Mn(n_,"computeLineOffsets"),Mn(a_,"isEOL"),Mn(i_,"getWellformedRange"),Mn(s_,"getWellformedEdit"),(()=>{var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",a=0,i=-1,s=0,o=0;o<=e.length;++o){if(o<e.length)r=e.charCodeAt(o);else{if(47===r)break;r=47}if(47===r){if(i===o-1||1===s);else if(i!==o-1&&2===s){if(n.length<2||2!==a||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",a=0):a=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=o,s=0;continue}}else if(2===n.length||1===n.length){n="",a=0,i=o,s=0;continue}t&&(n.length>0?n+="/..":n="..",a=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),a=o-i-1;i=o,s=0}else 46===r&&-1!==s?++s:s=-1}return n}Mn(t,"e"),Mn(r,"r");var n={resolve:Mn(function(){for(var e,n="",a=!1,i=arguments.length-1;i>=-1&&!a;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(n=s+"/"+n,a=47===s.charCodeAt(0))}return n=r(n,!a),a?n.length>0?"/"+n:"/":n.length>0?n:"."},"resolve"),normalize:Mn(function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),a=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&a&&(e+="/"),n?"/"+e:e},"normalize"),isAbsolute:Mn(function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},"isAbsolute"),join:Mn(function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var a=arguments[r];t(a),a.length>0&&(void 0===e?e=a:e+="/"+a)}return void 0===e?".":n.normalize(e)},"join"),relative:Mn(function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var i=e.length,s=i-a,o=1;o<r.length&&47===r.charCodeAt(o);++o);for(var l=r.length-o,u=s<l?s:l,c=-1,p=0;p<=u;++p){if(p===u){if(l>u){if(47===r.charCodeAt(o+p))return r.slice(o+p+1);if(0===p)return r.slice(o+p)}else s>u&&(47===e.charCodeAt(a+p)?c=p:0===p&&(c=0));break}var d=e.charCodeAt(a+p);if(d!==r.charCodeAt(o+p))break;47===d&&(c=p)}var f="";for(p=a+c+1;p<=i;++p)p!==i&&47!==e.charCodeAt(p)||(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(o+c):(o+=c,47===r.charCodeAt(o)&&++o,r.slice(o))},"relative"),_makeLong:Mn(function(e){return e},"_makeLong"),dirname:Mn(function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,a=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(r=e.charCodeAt(s))){if(!i){a=s;break}}else i=!1;return-1===a?n?"/":".":n&&1===a?"//":e.slice(0,a)},"dirname"),basename:Mn(function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,a=0,i=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var o=r.length-1,l=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(47===u){if(!s){a=n+1;break}}else-1===l&&(s=!1,l=n+1),o>=0&&(u===r.charCodeAt(o)?-1==--o&&(i=n):(o=-1,i=l))}return a===i?i=l:-1===i&&(i=e.length),e.slice(a,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){a=n+1;break}}else-1===i&&(s=!1,i=n+1);return-1===i?"":e.slice(a,i)},"basename"),extname:Mn(function(e){t(e);for(var r=-1,n=0,a=-1,i=!0,s=0,o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(47!==l)-1===a&&(i=!1,a=o+1),46===l?-1===r?r=o:1!==s&&(s=1):-1!==r&&(s=-1);else if(!i){n=o+1;break}}return-1===r||-1===a||0===s||1===s&&r===a-1&&r===n+1?"":e.slice(r,a)},"extname"),format:Mn(function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return r=(t=e).dir||t.root,n=t.base||(t.name||"")+(t.ext||""),r?r===t.root?r+n:r+"/"+n:n;var t,r,n},"format"),parse:Mn(function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,a=e.charCodeAt(0),i=47===a;i?(r.root="/",n=1):n=0;for(var s=-1,o=0,l=-1,u=!0,c=e.length-1,p=0;c>=n;--c)if(47!==(a=e.charCodeAt(c)))-1===l&&(u=!1,l=c+1),46===a?-1===s?s=c:1!==p&&(p=1):-1!==s&&(p=-1);else if(!u){o=c+1;break}return-1===s||-1===l||0===p||1===p&&s===l-1&&s===o+1?-1!==l&&(r.base=r.name=0===o&&i?e.slice(1,l):e.slice(o,l)):(0===o&&i?(r.name=e.slice(1,s),r.base=e.slice(1,l)):(r.name=e.slice(o,s),r.base=e.slice(o,l)),r.ext=e.slice(s,l)),o>0?r.dir=e.slice(0,o-1):i&&(r.dir="/"),r},"parse"),sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}Mn(r,"r"),r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};let a;if(r.r(n),r.d(n,{URI:Mn(()=>f,"URI"),Utils:Mn(()=>x,"Utils")}),"object"==typeof process)a="win32"===process.platform;else if("object"==typeof navigator){let e=navigator.userAgent;a=e.indexOf("Windows")>=0}const i=/^\w[\w\d+.-]*$/,s=/^\//,o=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!i.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!s.test(e.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(o.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}Mn(l,"a");const u="",c="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,d=class e{constructor(e,t,r,n,a,i=!1){Zt(this,"scheme"),Zt(this,"authority"),Zt(this,"path"),Zt(this,"query"),Zt(this,"fragment"),"object"==typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=function(e,t){return e||t?e:"file"}(e,i),this.authority=t||u,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,r||u),this.query=n||u,this.fragment=a||u,l(this,i))}static isUri(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}get fsPath(){return $(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:r,path:n,query:a,fragment:i}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===r?r=this.authority:null===r&&(r=u),void 0===n?n=this.path:null===n&&(n=u),void 0===a?a=this.query:null===a&&(a=u),void 0===i?i=this.fragment:null===i&&(i=u),t===this.scheme&&r===this.authority&&n===this.path&&a===this.query&&i===this.fragment?this:new y(t,r,n,a,i)}static parse(e,t=!1){const r=p.exec(e);return r?new y(r[2]||u,A(r[4]||u),A(r[5]||u),A(r[7]||u),A(r[9]||u),t):new y(u,u,u,u,u)}static file(e){let t=u;if(a&&(e=e.replace(/\\/g,c)),e[0]===c&&e[1]===c){const r=e.indexOf(c,2);-1===r?(t=e.substring(2),e=c):(t=e.substring(2,r),e=e.substring(r)||c)}return new y("file",t,e,u,u)}static from(e){const t=new y(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}toString(e=!1){return R(this,e)}toJSON(){return this}static revive(t){if(t){if(t instanceof e)return t;{const e=new y(t);return e._formatted=t.external,e._fsPath=t._sep===m?t.fsPath:null,e}}return t}};Mn(d,"l");let f=d;const m=a?1:void 0,h=class extends f{constructor(){super(...arguments),Zt(this,"_formatted",null),Zt(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=$(this,!1)),this._fsPath}toString(e=!1){return e?R(this,!0):(this._formatted||(this._formatted=R(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}};Mn(h,"d");let y=h;const g={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 v(e,t,r){let n,a=-1;for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==a&&(n+=encodeURIComponent(e.substring(a,i)),a=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));const t=g[s];void 0!==t?(-1!==a&&(n+=encodeURIComponent(e.substring(a,i)),a=-1),n+=t):-1===a&&(a=i)}}return-1!==a&&(n+=encodeURIComponent(e.substring(a))),void 0!==n?n:e}function T(e){let t;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);35===n||63===n?(void 0===t&&(t=e.substr(0,r)),t+=g[n]):void 0!==t&&(t+=e[r])}return void 0!==t?t:e}function $(e,t){let r;return r=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,a&&(r=r.replace(/\//g,"\\")),r}function R(e,t){const r=t?T:v;let n="",{scheme:a,authority:i,path:s,query:o,fragment:l}=e;if(a&&(n+=a,n+=":"),(i||"file"===a)&&(n+=c,n+=c),i){let e=i.indexOf("@");if(-1!==e){const t=i.substr(0,e);i=i.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=r(t,!1,!1):(n+=r(t.substr(0,e),!1,!1),n+=":",n+=r(t.substr(e+1),!1,!0)),n+="@"}i=i.toLowerCase(),e=i.lastIndexOf(":"),-1===e?n+=r(i,!1,!0):(n+=r(i.substr(0,e),!1,!0),n+=i.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}n+=r(s,!0,!1)}return o&&(n+="?",n+=r(o,!1,!1)),l&&(n+="#",n+=t?l:v(l,!1,!1)),n}function E(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+E(e.substr(3)):e}}Mn(v,"m"),Mn(T,"y"),Mn($,"v"),Mn(R,"b"),Mn(E,"C");const b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function A(e){return e.match(b)?e.replace(b,e=>E(e)):e}Mn(A,"w");var C=r(975);const S=C.posix||C,k="/";var x,w;(w=x||(x={})).joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},w.resolvePath=function(e,...t){let r=e.path,n=!1;r[0]!==k&&(r=k+r,n=!0);let a=S.resolve(r,...t);return n&&a[0]===k&&!e.authority&&(a=a.substring(1)),e.with({path:a})},w.dirname=function(e){if(0===e.path.length||e.path===k)return e;let t=S.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},w.basename=function(e){return S.basename(e.path)},w.extname=function(e){return S.extname(e.path)},QN=n})();var o_,{URI:l_,Utils:u_}=QN;!function(e){e.basename=u_.basename,e.dirname=u_.dirname,e.extname=u_.extname,e.joinPath=u_.joinPath,e.resolvePath=u_.resolvePath;const t="object"==typeof process&&"win32"===(null==process?void 0:process.platform);function r(e,t){return(null==e?void 0:e.toString())===(null==t?void 0:t.toString())}function n(e,r){const n="string"==typeof e?l_.parse(e).path:e.path,a="string"==typeof r?l_.parse(r).path:r.path,i=n.split("/").filter(e=>e.length>0),s=a.split("/").filter(e=>e.length>0);if(t){const e=/^[A-Z]:$/;if(i[0]&&e.test(i[0])&&(i[0]=i[0].toLowerCase()),s[0]&&e.test(s[0])&&(s[0]=s[0].toLowerCase()),i[0]!==s[0])return a.substring(1)}let o=0;for(;o<i.length&&i[o]===s[o];o++);return"../".repeat(i.length-o)+s.slice(o).join("/")}function a(e){return l_.parse(e.toString()).toString()}function i(e,t){let r="string"==typeof e?e:e.path,n="string"==typeof t?t:t.path;return"/"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),"/"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),n===r||!(n.length<r.length)&&("/"===n.charAt(r.length)&&n.startsWith(r))}Mn(r,"equals"),e.equals=r,Mn(n,"relative"),e.relative=n,Mn(a,"normalize"),e.normalize=a,Mn(i,"contains"),e.contains=i}(o_||(o_={}));var c_,p_,d_=(Mn(ke=class{constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return o_.normalize(e)}clear(){this.root.children.clear()}insert(e,t){this.getNode(this.normalizeUri(e),!0).element=t}delete(e){const t=this.getNode(this.normalizeUri(e),!1);(null==t?void 0:t.parent)&&t.parent.children.delete(t.name)}has(e){var t;return void 0!==(null==(t=this.getNode(this.normalizeUri(e),!1))?void 0:t.element)}hasNode(e){return void 0!==this.getNode(this.normalizeUri(e),!1)}find(e){var t;return null==(t=this.getNode(this.normalizeUri(e),!1))?void 0:t.element}findNode(e){const t=this.normalizeUri(e),r=this.getNode(t,!1);if(r)return{name:r.name,uri:o_.joinPath(l_.parse(t),r.name).toString(),element:r.element}}findChildren(e){const t=this.normalizeUri(e),r=this.getNode(t,!1);return r?Array.from(r.children.values()).map(e=>({name:e.name,uri:o_.joinPath(l_.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const t=this.getNode(o_.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){const r=e.split("/");"/"===e.charAt(e.length-1)&&r.pop();let n=this.root;for(const a of r){let e=n.children.get(a);if(!e){if(!t)return;e={name:a,children:new Map,parent:n},n.children.set(a,e)}n=e}return n}collectValues(e){const t=[];e.element&&t.push(e.element);for(const r of e.children.values())t.push(...this.collectValues(r));return t}},"UriTrie"),ke);(p_=c_||(c_={}))[p_.Changed=0]="Changed",p_[p_.Parsed=1]="Parsed",p_[p_.IndexedContent=2]="IndexedContent",p_[p_.ComputedScopes=3]="ComputedScopes",p_[p_.Linked=4]="Linked",p_[p_.IndexedReferences=5]="IndexedReferences",p_[p_.Validated=6]="Validated";var f_=(Mn(xe=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=qN.CancellationToken.None){const r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??l_.parse(e.uri),qN.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return qN.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("string"==typeof t){const n=this.parse(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}if("$model"in t){const r={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(r,e)}{const n=this.parse(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}async createAsync(e,t,r){if("string"==typeof t){const n=await this.parseAsync(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}{const 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:c_.Parsed,references:[],textDocument:r};else{const r=this.createTextDocumentGetter(t,n);a={parseResult:e,uri:t,state:c_.Parsed,references:[],get textDocument(){return r()}}}return e.value.$document=a,a}async update(e,t){var r,n;const a=null==(r=e.parseResult.value.$cstNode)?void 0:r.root.fullText,i=null==(n=this.textDocuments)?void 0:n.get(e.uri.toString()),s=i?i.getText():await this.fileSystemProvider.readFile(e.uri);if(i)Object.defineProperty(e,"textDocument",{value:i});else{const t=this.createTextDocumentGetter(e.uri,s);Object.defineProperty(e,"textDocument",{get:t})}return a!==s&&(e.parseResult=await this.parseAsync(e.uri,s,t),e.parseResult.value.$document=e),e.state=c_.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){const r=this.serviceRegistry;let n;return()=>n??(n=JN.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},"DefaultLangiumDocumentFactory"),xe),m_=(Mn(we=class{constructor(e){this.documentTrie=new d_,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return ei(this.documentTrie.all())}addDocument(e){const 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){const t=e.toString();return this.documentTrie.find(t)}getDocuments(e){const 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(e=>(this.addDocument(e),e));{const r=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(r),r}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const t=e.toString(),r=this.documentTrie.find(t);return r&&this.documentBuilder().resetToState(r,c_.Changed),r}deleteDocument(e){const t=e.toString(),r=this.documentTrie.find(t);return r&&(r.state=c_.Changed,this.documentTrie.delete(t)),r}deleteDocuments(e){const t=e.toString(),r=this.documentTrie.findAll(t);for(const n of r)n.state=c_.Changed;return this.documentTrie.delete(t),r}},"DefaultLangiumDocuments"),we),h_=Symbol("RefResolving"),y_=(Mn(Ne=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=qN.CancellationToken.None){var r;if(null==(r=this.profiler)?void 0:r.isActive("linking")){const r=this.profiler.createTask("linking",this.languageId);r.start();try{for(const n of di(e.parseResult.value))await ZN(t),mi(n).forEach(t=>{const a=`${n.$type}:${t.property}`;r.startSubTask(a);try{this.doLink(t,e)}finally{r.stopSubTask(a)}})}finally{r.stop()}}else for(const n of di(e.parseResult.value))await ZN(t),mi(n).forEach(t=>this.doLink(t,e))}doLink(e,t){const r=e.reference;if("_ref"in r&&void 0===r._ref){r._ref=h_;try{const t=this.getCandidate(e);if(Ua(t))r._ref=t;else{r._nodeDescription=t;const n=this.loadAstNode(t);r._ref=n??this.createLinkingError(e,t)}}catch(n){const t=n.message??String(n);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${t}`}}t.references.push(r)}else if("_items"in r&&void 0===r._items){r._items=h_;try{const t=this.getCandidates(e),n=[];if(Ua(t))r._linkingError=t;else for(const e of t){const t=this.loadAstNode(e);t&&n.push({ref:t,$nodeDescription:e})}r._items=n}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(const 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){const t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,r,n){const a=this,i={$refNode:r,$refText:n,_ref:void 0,get ref(){if(Ga(this._ref))return this._ref;if(qa(this._nodeDescription)){const r=a.loadAstNode(this._nodeDescription);this._ref=r??a.createLinkingError({reference:i,container:e,property:t},this._nodeDescription)}else if(void 0===this._ref){this._ref=h_;const r=li(e).$document,n=a.getLinkedNode({reference:i,container:e,property:t});if(n.error&&r&&r.state<c_.ComputedScopes)return this._ref=void 0;this._ref=n.node??n.error,this._nodeDescription=n.descr,null==r||r.references.push(this)}else this._ref===h_&&a.throwCyclicReferenceError(e,t,n);return Ga(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return Ua(this._ref)?this._ref:void 0}};return i}buildMultiReference(e,t,r,n){const a=this,i={$refNode:r,$refText:n,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(void 0===this._items){this._items=h_;const r=li(e).$document,n=a.getCandidates({reference:i,container:e,property:t}),s=[];if(Ua(n))this._linkingError=n;else for(const e of n){const t=a.loadAstNode(e);t&&s.push({ref:t,$nodeDescription:e})}this._items=s,null==r||r.references.push(this)}else this._items===h_&&a.throwCyclicReferenceError(e,t,n);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;return this.items.length>0?void 0:this._linkingError=a.createLinkingError({reference:i,container:e,property:t})}};return i}throwCyclicReferenceError(e,t,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${r}')`)}getLinkedNode(e){try{const t=this.getCandidate(e);if(Ua(t))return{error:t};const r=this.loadAstNode(t);return r?{node:r,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){const 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;const t=this.langiumDocuments().getDocument(e.documentUri);return t?this.astNodeLocator.getAstNode(t.parseResult.value,e.path):void 0}createLinkingError(e,t){const r=li(e.container).$document;r&&(r.state,c_.ComputedScopes);return{info:e,message:`Could not resolve reference to ${this.reflection.getReferenceType(e)} named '${e.reference.$refText}'.`,targetDescription:t}}},"DefaultLinker"),Ne);function g_(e){return"string"==typeof e.name}Mn(g_,"isNamed");var v_=(Mn(_e=class{getName(e){if(g_(e))return e.name}getNameNode(e){return bl(e.$cstNode,"name")}},"DefaultNameProvider"),_e),T_=(Mn(Ie=class{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=di(e.Grammar).some(e=>Wi(e)&&e.isMulti)}findDeclarations(e){if(e){const t=xl(e),r=e.astNode;if(t&&r){const n=r[t.feature];if(za(n)||Ka(n))return ui(n);if(Array.isArray(n))for(const t of n)if((za(t)||Ka(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return ui(t)}if(r){const t=this.nameProvider.getNameNode(r);if(t&&(t===e||Eo(e,t)))return this.getSelfNodes(r)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),r=this.getNodeFromReferenceDescription(t.head());if(r)for(const n of mi(r))if(Ka(n.reference)&&n.reference.items.some(t=>t.ref===e))return n.reference.items.map(e=>e.ref);return[e]}return[e]}getNodeFromReferenceDescription(e){if(!e)return;const t=this.documents.getDocument(e.sourceUri);return t?this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath):void 0}findDeclarationNodes(e){const t=this.findDeclarations(e),r=[];for(const n of t){const e=this.nameProvider.getNameNode(n)??n.$cstNode;e&&r.push(e)}return r}findReferences(e,t){const r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let n=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(n=n.filter(e=>o_.equals(e.sourceUri,t.documentUri))),r.push(...n),ei(r)}getSelfReferences(e){const t=this.getSelfNodes(e),r=[];for(const n of t){const e=this.nameProvider.getNameNode(n);if(e){const t=oi(n),a=this.nodeLocator.getAstNodePath(n);r.push({sourceUri:t.uri,sourcePath:a,targetUri:t.uri,targetPath:a,segment:Ao(e),local:!0})}}return r}},"DefaultReferences"),Ie),$_=(Pe=class{constructor(e){if(this.map=new Map,e)for(const[t,r]of e)this.add(t,r)}get size(){return ti.sum(ei(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(void 0===t)return this.map.delete(e);{const r=this.map.get(e);if(r){const n=r.indexOf(t);if(n>=0)return 1===r.length?this.map.delete(e):r.splice(n,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){const t=this.map.get(e);return t?ei(t):Ja}has(e,t){if(void 0===t)return this.map.has(e);{const r=this.map.get(e);return!!r&&r.indexOf(t)>=0}}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(t=>e(t,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return ei(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return ei(this.map.keys())}values(){return ei(this.map.values()).flat()}entriesGroupedByKey(){return ei(this.map.entries())}},Mn(Pe,"MultiMap"),Pe),R_=(Mn(Oe=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[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){const t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}},"BiMap"),Oe),E_=(Mn(Le=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=qN.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=ci,n=qN.CancellationToken.None){const a=[];this.addExportedSymbol(e,a,t);for(const i of r(e))await ZN(n),this.addExportedSymbol(i,a,t);return a}addExportedSymbol(e,t,r){const n=this.nameProvider.getName(e);n&&t.push(this.descriptions.createDescription(e,n,r))}async collectLocalSymbols(e,t=qN.CancellationToken.None){const r=e.parseResult.value,n=new $_;for(const a of pi(r))await ZN(t),this.addLocalSymbol(a,e,n);return n}addLocalSymbol(e,t,r){const n=e.$container;if(n){const a=this.nameProvider.getName(e);a&&r.add(n,this.descriptions.createDescription(e,a,t))}}},"DefaultScopeComputation"),Le),b_=(Mn(De=class{constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=(null==r?void 0:r.caseInsensitive)??!1,this.concatOuterScope=(null==r?void 0:r.concatOuterScope)??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);return r||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(e)):r}},"StreamScope"),De),A_=(Mn(Me=class{constructor(e,t,r){this.elements=new Map,this.caseInsensitive=(null==r?void 0:r.caseInsensitive)??!1,this.concatOuterScope=(null==r?void 0:r.concatOuterScope)??!0;for(const n of e){const e=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(e,n)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return r||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t),n=r?[r]:[];return(this.concatOuterScope||n.length>0)&&this.outerScope?ei(n).concat(this.outerScope.getElements(e)):ei(n)}getAllElements(){let e=ei(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},"MapScope"),Me),C_=(Mn(je=class{constructor(e,t,r){this.elements=new $_,this.caseInsensitive=(null==r?void 0:r.caseInsensitive)??!1,this.concatOuterScope=(null==r?void 0:r.concatOuterScope)??!0;for(const n of e){const e=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(e,n)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t)[0];return r||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return(this.concatOuterScope||0===r.length)&&this.outerScope?ei(r).concat(this.outerScope.getElements(e)):ei(r)}getAllElements(){let e=ei(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},"MultiMapScope"),je),S_={getElement(){},getElements:()=>Ja,getAllElements:()=>Ja},k_=(Mn(Fe=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},"DisposableCache"),Fe),x_=(Mn(Ge=class extends k_{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){const r=t();return this.cache.set(e,r),r}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},"SimpleCache"),Ge),w_=(Mn(ze=class extends k_{constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}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();const n=this.cacheForContext(e);if(n.has(t))return n.get(t);if(r){const e=r();return n.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}},"ContextCache"),ze),N_=(Mn(Ke=class extends w_{constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(const r of t)this.clear(r)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{const r=e.concat(t);for(const n of r)this.clear(n)}))}},"DocumentCache"),Ke),__=(Mn(qe=class extends x_{constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},"WorkspaceCache"),qe),I_=(Mn(Ue=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new __(e.shared)}getScope(e){const t=[],r=this.reflection.getReferenceType(e),n=oi(e.container).localSymbols;if(n){let a=e.container;do{n.has(a)&&t.push(n.getStream(a).filter(e=>this.reflection.isSubtype(e.type,r))),a=a.$container}while(a)}let a=this.getGlobalScope(r,e);for(let i=t.length-1;i>=0;i--)a=this.createScope(t[i],a);return a}createScope(e,t,r){return new b_(ei(e),t,r)}createScopeForNodes(e,t,r){const n=ei(e).map(e=>{const t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable();return new b_(n,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new C_(this.indexManager.allElements(e)))}},"DefaultScopeProvider"),Ue);function P_(e){return"string"==typeof e.$comment}function O_(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}Mn(P_,"isAstNodeWithComment"),Mn(O_,"isIntermediateReference");var L_,D_,M_=(Mn(Be=class{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){const r=t??{},n=null==t?void 0:t.replacer,a=Mn((e,t)=>this.replacer(e,t,r),"defaultReplacer"),i=n?(e,t)=>n(e,t,a):a;try{return this.currentDocument=oi(e),JSON.stringify(e,i,null==t?void 0:t.space)}finally{this.currentDocument=void 0}}deserialize(e,t){const r=t??{},n=JSON.parse(e);return this.linkNode(n,n,r),n}replacer(e,t,{refText:r,sourceText:n,textRegions:a,comments:i,uriConverter:s}){var o,l,u;if(!this.ignoreProperties.has(e)){if(za(t)){const e=t.ref,n=r?t.$refText:void 0;if(e){const t=oi(e);let r="";this.currentDocument&&this.currentDocument!==t&&(r=s?s(t.uri,e):t.uri.toString());return{$ref:`${r}#${this.astNodeLocator.getAstNodePath(e)}`,$refText:n}}return{$error:(null==(o=t.error)?void 0:o.message)??"Could not resolve reference",$refText:n}}if(Ka(t)){const e=r?t.$refText:void 0,n=[];for(const r of t.items){const e=r.ref,t=oi(r.ref);let a="";this.currentDocument&&this.currentDocument!==t&&(a=s?s(t.uri,e):t.uri.toString());const i=this.astNodeLocator.getAstNodePath(e);n.push(`${a}#${i}`)}return{$refs:n,$refText:e}}if(Ga(t)){let r;if(a&&(r=this.addAstNodeRegionWithAssignmentsTo({...t}),e&&!t.$document||!(null==r?void 0:r.$textRegion)||(r.$textRegion.documentURI=null==(l=this.currentDocument)?void 0:l.uri.toString())),n&&!e&&(r??(r={...t}),r.$sourceText=null==(u=t.$cstNode)?void 0:u.text),i){r??(r={...t});const e=this.commentProvider.getComment(t);e&&(r.$comment=e.replace(/\r/g,""))}return r??t}return t}}addAstNodeRegionWithAssignmentsTo(e){const t=Mn(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),"createDocumentSegment");if(e.$cstNode){const r=(e.$textRegion=t(e.$cstNode)).assignments={};return Object.keys(e).filter(e=>!e.startsWith("$")).forEach(n=>{const a=El(e.$cstNode,n).map(t);0!==a.length&&(r[n]=a)}),e}}linkNode(e,t,r,n,a,i){for(const[o,l]of Object.entries(e))if(Array.isArray(l))for(let n=0;n<l.length;n++){const a=l[n];O_(a)?l[n]=this.reviveReference(e,o,t,a,r):Ga(a)&&this.linkNode(a,t,r,e,o,n)}else O_(l)?e[o]=this.reviveReference(e,o,t,l,r):Ga(l)&&this.linkNode(l,t,r,e,o);const s=e;s.$container=n,s.$containerProperty=a,s.$containerIndex=i}reviveReference(e,t,r,n,a){let i,s=n.$refText,o=n.$error;if(n.$ref){const e=this.getRefNode(r,n.$ref,a.uriConverter);if(Ga(e))return s||(s=this.nameProvider.getName(e)),{$refText:s??"",ref:e};o=e}else if(n.$refs){const e=[];for(const t of n.$refs){const n=this.getRefNode(r,t,a.uriConverter);Ga(n)&&e.push({ref:n})}if(0!==e.length)return{$refText:s??"",items:e};i={$refText:s??"",items:e},o??(o="Could not resolve multi-reference")}return o?(i??(i={$refText:s??"",ref:void 0}),i.error={info:{container:e,property:t,reference:i},message:o},i):void 0}getRefNode(e,t,r){try{const n=t.indexOf("#");if(0===n){const r=this.astNodeLocator.getAstNode(e,t.substring(1));return r||"Could not resolve path: "+t}if(n<0){const e=r?r(t):l_.parse(t),n=this.langiumDocuments.getDocument(e);return n?n.parseResult.value:"Could not find document for URI: "+t}const a=r?r(t.substring(0,n)):l_.parse(t.substring(0,n)),i=this.langiumDocuments.getDocument(a);if(!i)return"Could not find document for URI: "+t;if(n===t.length-1)return i.parseResult.value;const s=this.astNodeLocator.getAstNode(i.parseResult.value,t.substring(n+1));return s||"Could not resolve URI: "+t}catch(n){return String(n)}}},"DefaultJsonSerializer"),Be),j_=(Mn(Ve=class{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=null==e?void 0:e.workspace.TextDocuments}register(e){const t=e.LanguageMetaData;for(const r of t.fileExtensions)this.fileExtensionMap.has(r),this.fileExtensionMap.set(r,e);if(t.fileNames)for(const r of t.fileNames)this.fileNameMap.has(r),this.fileNameMap.set(r,e);this.languageIdMap.set(t.languageId,e)}getServices(e){var t,r;if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const n=null==(r=null==(t=this.textDocuments)?void 0:t.get(e))?void 0:r.languageId;if(void 0!==n){const e=this.languageIdMap.get(n);if(e)return e}const a=o_.extname(e),i=o_.basename(e),s=this.fileNameMap.get(i)??this.fileExtensionMap.get(a);if(!s)throw n?new Error(`The service registry contains no services for the extension '${a}' for language '${n}'.`):new Error(`The service registry contains no services for the extension '${a}'.`);return s}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}},"DefaultServiceRegistry"),Ve);function F_(e){return{code:e}}Mn(F_,"diagnosticData"),(D_=L_||(L_={})).defaults=["fast","slow","built-in"],D_.all=D_.defaults;var G_,z_,K_=(Mn(We=class{constructor(e){this.entries=new $_,this.knownCategories=new Set(L_.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,r="fast"){if("built-in"===r)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(r);for(const[n,a]of Object.entries(e)){const e=a;if(Array.isArray(e))for(const a of e){const e={check:this.wrapValidationException(a,t),category:r};this.addEntry(n,e)}else if("function"==typeof e){const a={check:this.wrapValidationException(e,t),category:r};this.addEntry(n,a)}else Ko()}}wrapValidationException(e,t){return async(r,n,a)=>{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(XN(a))throw a;a instanceof Error&&a.stack;r("error",`${t}: ${a instanceof Error?a.message:String(a)}`,{node:n})}}addEntry(e,t){if("AstNode"!==e)for(const r of this.reflection.getAllSubTypes(e))this.entries.add(r,t);else this.entries.add("AstNode",t)}getChecks(e,t){let r=ei(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(e=>t.includes(e.category))),r.map(e=>e.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,i,s)=>{await this.handleException(()=>e.call(r,n,a,i,s),t,a,n)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},"ValidationRegistry"),We),q_=Object.freeze({validateNode:!0,validateChildren:!0}),U_=(Mn(He=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},r=qN.CancellationToken.None){const n=e.parseResult,a=[];if(await ZN(r),!t.categories||t.categories.includes("built-in")){if(this.processLexingErrors(n,a,t),t.stopAfterLexingErrors&&a.some(e=>{var t;return(null==(t=e.data)?void 0:t.code)===G_.LexingError}))return a;if(this.processParsingErrors(n,a,t),t.stopAfterParsingErrors&&a.some(e=>{var t;return(null==(t=e.data)?void 0:t.code)===G_.ParsingError}))return a;if(this.processLinkingErrors(e,a,t),t.stopAfterLinkingErrors&&a.some(e=>{var t;return(null==(t=e.data)?void 0:t.code)===G_.LinkingError}))return a}try{a.push(...await this.validateAst(n.value,t,r))}catch(i){if(XN(i))throw i}return await ZN(r),a}processLexingErrors(e,t,r){var n;const a=[...e.lexerErrors,...(null==(n=e.lexerReport)?void 0:n.diagnostics)??[]];for(const i of a){const e=i.severity??"error",r={severity:V_(e),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:W_(e),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,r){for(const n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if("previousToken"in n){const t=n.previousToken;if(isNaN(t.startOffset)){const t={line:0,character:0};e={start:t,end:t}}else{const r={line:t.endLine-1,character:t.endColumn};e={start:r,end:r}}}}else e=bo(n.token);if(e){const r={severity:V_("error"),range:e,message:n.message,data:F_(G_.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,r){var n;for(const a of e.references){const e=a.error;if(e){const r={node:e.info.container,range:null==(n=a.$refNode)?void 0:n.range,property:e.info.property,index:e.info.index,data:{code:G_.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic("error",e.message,r))}}}async validateAst(e,t,r=qN.CancellationToken.None){const n=[],a=Mn((e,t,r)=>{n.push(this.toDiagnostic(e,t,r))},"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=qN.CancellationToken.None){const a=this.validationRegistry.checksBefore;for(const i of a)await ZN(n),await i(e,r,t.categories??[],n)}async validateAstNodes(e,t,r,n=qN.CancellationToken.None){var a;if(null==(a=this.profiler)?void 0:a.isActive("validating")){const a=this.profiler.createTask("validating",this.languageId);a.start();try{const i=di(e).iterator();for(const e of i){a.startSubTask(e.$type);const s=this.validateSingleNodeOptions(e,t);if(s.validateNode)try{const a=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of a)await t(e,r,n)}finally{a.stopSubTask(e.$type)}s.validateChildren||i.prune()}}finally{a.stop()}}else{const a=di(e).iterator();for(const e of a){await ZN(n);const i=this.validateSingleNodeOptions(e,t);if(i.validateNode){const a=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of a)await t(e,r,n)}i.validateChildren||a.prune()}}}validateSingleNodeOptions(e,t){return q_}async validateAstAfter(e,t,r,n=qN.CancellationToken.None){const a=this.validationRegistry.checksAfter;for(const i of a)await ZN(n),await i(e,r,t.categories??[],n)}toDiagnostic(e,t,r){return{message:t,range:B_(r),severity:V_(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},"DefaultDocumentValidator"),He);function B_(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=bl(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=Sl(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}}}function V_(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)}}function W_(e){switch(e){case"error":return F_(G_.LexingError);case"warning":return F_(G_.LexingWarning);case"info":return F_(G_.LexingInfo);case"hint":return F_(G_.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}Mn(B_,"getDiagnosticRange"),Mn(V_,"toDiagnosticSeverity"),Mn(W_,"toDiagnosticData"),(z_=G_||(G_={})).LexingError="lexing-error",z_.LexingWarning="lexing-warning",z_.LexingInfo="lexing-info",z_.LexingHint="lexing-hint",z_.ParsingError="parsing-error",z_.LinkingError="linking-error";var H_=(Mn(Ye=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){const n=r??oi(e);t??(t=this.nameProvider.getName(e));const a=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${a} has no name.`);let i;const s=Mn(()=>i??(i=Ao(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return s()},selectionSegment:Ao(e.$cstNode),type:e.$type,documentUri:n.uri,path:a}}},"DefaultAstNodeDescriptionProvider"),Ye),Y_=(Mn(Xe=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=qN.CancellationToken.None){const r=[],n=e.parseResult.value;for(const a of di(n))await ZN(t),mi(a).forEach(e=>{e.reference.error||r.push(...this.createInfoDescriptions(e))});return r}createInfoDescriptions(e){const t=e.reference;if(t.error||!t.$refNode)return[];let r=[];za(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Ka(t)&&(r=t.items.map(e=>e.$nodeDescription).filter(e=>void 0!==e));const n=oi(e.container).uri,a=this.nodeLocator.getAstNodePath(e.container),i=[],s=Ao(t.$refNode);for(const o of r)i.push({sourceUri:n,sourcePath:a,targetUri:o.documentUri,targetPath:o.path,segment:s,local:o_.equals(o.documentUri,n)});return i}},"DefaultReferenceDescriptionProvider"),Xe),X_=(Mn(Ze=class{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const 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 void 0!==t?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||0===t.length)return e;const r=t.indexOf(this.indexSeparator);if(r>0){const n=t.substring(0,r),a=parseInt(t.substring(r+1)),i=e[n];return null==i?void 0:i[a]}return e[t]},e)}},"DefaultAstNodeLocator"),Ze),Z_={};zn(Z_,Kn(Xn()));var J_,Q_=(Mn(Je=class{constructor(e){this._ready=new e_,this.onConfigurationSectionUpdateEmitter=new Z_.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var t;this.workspaceConfig=(null==(t=e.capabilities.workspace)?void 0:t.configuration)??!1}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,r[t])})}}this._ready.resolve()}updateConfiguration(e){"object"==typeof e.settings&&null!==e.settings&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},"DefaultConfigurationProvider"),Je),eI=Kn(Ma());!function(e){function t(e){return{dispose:Mn(async()=>await e(),"dispose")}}Mn(t,"create"),e.create=t}(J_||(J_={}));var tI=(Mn(Qe=class{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new $_,this.documentPhaseListeners=new $_,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=c_.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=qN.CancellationToken.None){var n;for(const a of e){const e=a.uri.toString();if(a.state===c_.Validated){if("boolean"==typeof t.validation&&t.validation)this.resetToState(a,c_.IndexedReferences);else if("object"==typeof t.validation){const r=this.findMissingValidationCategories(a,t);r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:r}},result:null==(n=this.buildState.get(e))?void 0:n.result}),a.state=c_.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=c_.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=qN.CancellationToken.None){this.currentState=c_.Changed;const n=[];for(const o of t){const e=this.langiumDocuments.deleteDocuments(o);for(const t of e)n.push(t.uri),this.cleanUpDeleted(t)}const a=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(const o of a){let e=this.langiumDocuments.getDocument(o);void 0===e&&(e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o),e.state=c_.Changed,this.langiumDocuments.addDocument(e)),this.resetToState(e,c_.Changed)}const i=ei(a).concat(n).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!i.has(e.uri.toString())&&this.shouldRelink(e,i)).forEach(e=>this.resetToState(e,c_.ComputedScopes)),await this.emitUpdate(a,n),await ZN(r);const s=this.sortDocuments(this.langiumDocuments.all.filter(e=>{var t;return e.state<c_.Validated||!(null==(t=this.buildState.get(e.uri.toString()))?void 0:t.completed)||this.resultsAreIncomplete(e,this.updateBuildOptions)}).toArray());await this.buildDocuments(s,this.updateBuildOptions,r)}resultsAreIncomplete(e,t){return this.findMissingValidationCategories(e,t).length>=1}findMissingValidationCategories(e,t){var r,n;const a=this.buildState.get(e.uri.toString()),i=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),s=(null==(r=null==a?void 0:a.result)?void 0:r.validationChecks)?new Set(null==(n=null==a?void 0:a.result)?void 0:n.validationChecks):(null==a?void 0:a.completed)?i:new Set;return ei(void 0===t||!0===t.validation?i:"object"==typeof t.validation?t.validation.categories??i:[]).filter(e=>!s.has(e)).toArray()}async findChangedUris(e){var t;if(this.langiumDocuments.getDocument(e)??(null==(t=this.textDocuments)?void 0:t.get(e)))return[e];try{const t=await this.fileSystemProvider.stat(e);if(t.isDirectory){return await this.workspaceManager().searchFolder(e)}if(this.workspaceManager().shouldIncludeEntry(t))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<r;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;r>=0&&!this.hasTextDocument(e[r]);)r--;t<r&&([e[t],e[r]]=[e[r],e[t]])}return e}hasTextDocument(e){var t;return Boolean(null==(t=this.textDocuments)?void 0:t.get(e.uri))}shouldRelink(e,t){return!!e.references.some(e=>void 0!==e.error)||this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),J_.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case c_.Changed:case c_.Parsed:this.indexManager.removeContent(e.uri);case c_.IndexedContent:e.localSymbols=void 0;case c_.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case c_.Linked:this.indexManager.removeReferences(e.uri);case c_.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case c_.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=c_.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,c_.Parsed,r,e=>this.langiumDocumentFactory.update(e,r)),await this.runCancelable(e,c_.IndexedContent,r,e=>this.indexManager.updateContent(e,r)),await this.runCancelable(e,c_.ComputedScopes,r,async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.localSymbols=await t.collectLocalSymbols(e,r)});const n=e.filter(e=>this.shouldLink(e));await this.runCancelable(n,c_.Linked,r,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,r)),await this.runCancelable(n,c_.IndexedReferences,r,e=>this.indexManager.updateReferences(e,r));const a=e.filter(e=>!!this.shouldValidate(e)||(this.markAsCompleted(e),!1));await this.runCancelable(a,c_.Validated,r,async e=>{await this.validate(e,r),this.markAsCompleted(e)})}markAsCompleted(e){const t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(const r of e){const e=r.uri.toString(),n=this.buildState.get(e);n&&!n.completed||this.buildState.set(e,{completed:!1,options:t,result:null==n?void 0:n.result})}}async runCancelable(e,t,r,n){for(const i of e)i.state<t&&(await ZN(r),await n(i),i.state=t,await this.notifyDocumentPhase(i,t,r));const a=e.filter(e=>e.state===t);await this.notifyBuildPhase(a,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),J_.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),J_.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let n;return t&&"path"in t?n=t:r=t,r??(r=qN.CancellationToken.None),n?this.awaitDocumentState(e,n,r):this.awaitBuilderState(e,r)}awaitDocumentState(e,t,r){const n=this.langiumDocuments.getDocument(t);return n?n.state>=e?Promise.resolve(t):r.isCancellationRequested?Promise.reject(YN):this.currentState>=e&&e>n.state?Promise.reject(new eI.ResponseError(eI.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${c_[n.state]}, requiring ${c_[e]}, but workspace state is already ${c_[this.currentState]}. Returning undefined.`)):new Promise((n,a)=>{const i=this.onDocumentPhase(e,e=>{o_.equals(e.uri,t)&&(i.dispose(),s.dispose(),n(e.uri))}),s=r.onCancellationRequested(()=>{i.dispose(),s.dispose(),a(YN)})}):Promise.reject(new eI.ResponseError(eI.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(YN):new Promise((r,n)=>{const a=this.onBuildPhase(e,()=>{a.dispose(),i.dispose(),r()}),i=t.onCancellationRequested(()=>{a.dispose(),i.dispose(),n(YN)})})}async notifyDocumentPhase(e,t,r){const n=this.documentPhaseListeners.get(t).slice();for(const i of n)try{await ZN(r),await i(e,r)}catch(a){if(!XN(a))throw a}}async notifyBuildPhase(e,t,r){if(0===e.length)return;const n=this.buildPhaseListeners.get(t).slice();for(const a of n)await ZN(r),await a(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){const r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,n=this.getBuildOptions(e),a="object"==typeof n.validation?{...n.validation}:{};a.categories=this.findMissingValidationCategories(e,n);const i=await r.validateDocument(e,a,t);e.diagnostics?e.diagnostics.push(...i):e.diagnostics=i;const s=this.buildState.get(e.uri.toString());s&&(s.result??(s.result={}),s.result.validationChecks?s.result.validationChecks=ei(s.result.validationChecks).concat(a.categories).distinct().toArray():s.result.validationChecks=[...a.categories])}getBuildOptions(e){var t;return(null==(t=this.buildState.get(e.uri.toString()))?void 0:t.options)??{}}},"DefaultDocumentBuilder"),Qe),rI=(Mn(et=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new w_,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const r=oi(e).uri,n=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{o_.equals(e.targetUri,r)&&e.targetPath===t&&n.push(e)})}),ei(n)}allElements(e,t){let r=ei(this.symbolIndex.keys());return t&&(r=r.filter(e=>!t||t.has(e))),r.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){if(!t)return this.symbolIndex.get(e)??[];return this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t)))}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){const t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=qN.CancellationToken.None){const r=this.serviceRegistry.getServices(e.uri),n=await r.references.ScopeComputation.collectExportedSymbols(e,t),a=e.uri.toString();this.symbolIndex.set(a,n),this.symbolByTypeIndex.clear(a)}async updateReferences(e,t=qN.CancellationToken.None){const r=this.serviceRegistry.getServices(e.uri),n=await r.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){const r=this.referenceIndex.get(e.uri.toString());return!!r&&r.some(e=>!e.local&&t.has(e.targetUri.toString()))}},"DefaultIndexManager"),et),nI=(Mn(tt=class{constructor(e){this.initialBuildOptions={},this._ready=new e_,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(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=qN.CancellationToken.None){const r=await this.performStartup(e);await ZN(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){const t=[],r=Mn(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},"collector");await this.loadAdditionalDocuments(e,r);const n=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,n)));const a=ei(n).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(a,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{const r=await this.langiumDocuments.getOrCreateDocument(e);t(r)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return l_.parse(e.uri)}async traverseFolder(e,t){try{const r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(r){}}async searchFolder(e){const t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){const t=o_.basename(e.uri);return!t.startsWith(".")&&(e.isDirectory?"node_modules"!==t&&"out"!==t:!!e.isFile&&this.serviceRegistry.hasServices(e.uri))}},"DefaultWorkspaceManager"),tt),aI=(Mn(rt=class{buildUnexpectedCharactersMessage(e,t,r,n,a){return g$.buildUnexpectedCharactersMessage(e,t,r,n,a)}buildUnableToPopLexerModeMessage(e){return g$.buildUnableToPopLexerModeMessage(e)}},"DefaultLexerErrorMessageProvider"),rt),iI={mode:"full"},sI=(nt=class{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const r=uI(t)?Object.values(t):t,n="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new T$(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=iI){var r,n;const a=this.chevrotainLexer.tokenize(e);return{tokens:a.tokens,errors:a.errors,hidden:a.groups.hidden??[],report:null==(n=(r=this.tokenBuilder).flushLexingReport)?void 0:n.call(r,e)}}toTokenTypeDictionary(e){if(uI(e))return e;const t=lI(e)?Object.values(e.modes).flat():e,r={};return t.forEach(e=>r[e.name]=e),r}},Mn(nt,"DefaultLexer"),nt);function oI(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}function lI(e){return e&&"modes"in e&&"defaultMode"in e}function uI(e){return!oI(e)&&!lI(e)}function cI(e,t,r){let n,a;"string"==typeof e?(a=t,n=r):(a=e.range.start,n=t),a||(a=nr.create(0,0));return RI({index:0,tokens:hI({lines:dI(e),position:a,options:xI(n)}),position:a})}function pI(e,t){const r=xI(t),n=dI(e);if(0===n.length)return!1;const a=n[0],i=n[n.length-1],s=r.start,o=r.end;return Boolean(null==s?void 0:s.exec(a))&&Boolean(null==o?void 0:o.exec(i))}function dI(e){let t="";t="string"==typeof e?e:e.text;return t.split(il)}Mn(oI,"isTokenTypeArray"),Mn(lI,"isIMultiModeLexerDefinition"),Mn(uI,"isTokenTypeDictionary"),Wn(),Mn(cI,"parseJSDoc"),Mn(pI,"isJSDoc"),Mn(dI,"getLines");var fI=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,mI=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function hI(e){var t,r,n;const a=[];let i=e.position.line,s=e.position.character;for(let o=0;o<e.lines.length;o++){const l=0===o,u=o===e.lines.length-1;let c=e.lines[o],p=0;if(l&&e.options.start){const r=null==(t=e.options.start)?void 0:t.exec(c);r&&(p=r.index+r[0].length)}else{const t=null==(r=e.options.line)?void 0:r.exec(c);t&&(p=t.index+t[0].length)}if(u){const t=null==(n=e.options.end)?void 0:n.exec(c);t&&(c=c.substring(0,t.index))}c=c.substring(0,$I(c));if(TI(c,p)>=c.length){if(a.length>0){const e=nr.create(i,s);a.push({type:"break",content:"",range:ar.create(e,e)})}}else{fI.lastIndex=p;const e=fI.exec(c);if(e){const t=e[0],r=e[1],n=nr.create(i,s+p),o=nr.create(i,s+p+t.length);a.push({type:"tag",content:r,range:ar.create(n,o)}),p+=t.length,p=TI(c,p)}if(p<c.length){const e=c.substring(p),t=Array.from(e.matchAll(mI));a.push(...yI(t,e,i,s+p))}}i++,s=0}return a.length>0&&"break"===a[a.length-1].type?a.slice(0,-1):a}function yI(e,t,r,n){const a=[];if(0===e.length){const e=nr.create(r,n),i=nr.create(r,n+t.length);a.push({type:"text",content:t,range:ar.create(e,i)})}else{let i=0;for(const o of e){const e=o.index,s=t.substring(i,e);s.length>0&&a.push({type:"text",content:t.substring(i,e),range:ar.create(nr.create(r,i+n),nr.create(r,e+n))});let l=s.length+1;const u=o[1];if(a.push({type:"inline-tag",content:u,range:ar.create(nr.create(r,i+l+n),nr.create(r,i+l+u.length+n))}),l+=u.length,4===o.length){l+=o[2].length;const e=o[3];a.push({type:"text",content:e,range:ar.create(nr.create(r,i+l+n),nr.create(r,i+l+e.length+n))})}else a.push({type:"text",content:"",range:ar.create(nr.create(r,i+l+n),nr.create(r,i+l+n))});i=e+o[0].length}const s=t.substring(i);s.length>0&&a.push({type:"text",content:s,range:ar.create(nr.create(r,i+n),nr.create(r,i+n+s.length))})}return a}Mn(hI,"tokenize"),Mn(yI,"buildInlineTokens");var gI=/\S/,vI=/\s*$/;function TI(e,t){const r=e.substring(t).match(gI);return r?t+r.index:e.length}function $I(e){const t=e.match(vI);if(t&&"number"==typeof t.index)return t.index}function RI(e){var t,r;const n=nr.create(e.position.line,e.position.character);if(0===e.tokens.length)return new NI([],ar.create(n,n));const a=[];for(;e.index<e.tokens.length;){const t=EI(e,a[a.length-1]);t&&a.push(t)}const i=(null==(t=a[0])?void 0:t.range.start)??n,s=(null==(r=a[a.length-1])?void 0:r.range.end)??n;return new NI(a,ar.create(i,s))}function EI(e,t){const r=e.tokens[e.index];return"tag"===r.type?SI(e,!1):"text"===r.type||"inline-tag"===r.type?AI(e):(bI(r,t),void e.index++)}function bI(e,t){if(t){const r=new LI("",e.range);"inlines"in t?t.inlines.push(r):t.content.inlines.push(r)}}function AI(e){let t=e.tokens[e.index];const r=t;let n=t;const a=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)a.push(CI(e)),n=t,t=e.tokens[e.index];return new OI(a,ar.create(r.range.start,n.range.end))}function CI(e){return"inline-tag"===e.tokens[e.index].type?SI(e,!0):kI(e)}function SI(e,t){const r=e.tokens[e.index++],n=r.content.substring(1),a=e.tokens[e.index];if("text"===(null==a?void 0:a.type)){if(t){const a=kI(e);return new _I(n,new OI([a],a.range),t,ar.create(r.range.start,a.range.end))}{const a=AI(e);return new _I(n,a,t,ar.create(r.range.start,a.range.end))}}{const e=r.range;return new _I(n,new OI([],e),t,e)}}function kI(e){const t=e.tokens[e.index++];return new LI(t.content,t.range)}function xI(e){if(!e)return xI({start:"/**",end:"*/",line:"*"});const{start:t,end:r,line:n}=e;return{start:wI(t,!0),end:wI(r,!1),line:wI(n,!0)}}function wI(e,t){if("string"==typeof e||"object"==typeof e){const r="string"==typeof e?dl(e):e.source;return t?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`)}return e}Mn(TI,"skipWhitespace"),Mn($I,"lastCharacter"),Mn(RI,"parseJSDocComment"),Mn(EI,"parseJSDocElement"),Mn(bI,"appendEmptyLine"),Mn(AI,"parseJSDocText"),Mn(CI,"parseJSDocInline"),Mn(SI,"parseJSDocTag"),Mn(kI,"parseJSDocLine"),Mn(xI,"normalizeOptions"),Mn(wI,"normalizeOption");var NI=(Mn(at=class{constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.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(const t of this.elements)if(0===e.length)e=t.toString();else{const r=t.toString();e+=DI(e)+r}return e.trim()}toMarkdown(e){let t="";for(const r of this.elements)if(0===t.length)t=r.toMarkdown(e);else{const n=r.toMarkdown(e);t+=DI(t)+n}return t.trim()}},"JSDocCommentImpl"),at),_I=(Mn(it=class{constructor(e,t,r,n){this.name=e,this.content=t,this.inline=r,this.range=n}toString(){let e=`@${this.name}`;const t=this.content.toString();return 1===this.content.inlines.length?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){var t;return(null==(t=null==e?void 0:e.renderTag)?void 0:t.call(e,this))??this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const r=II(this.name,t,e??{});if("string"==typeof r)return r}let r="";"italic"===(null==e?void 0:e.tag)||void 0===(null==e?void 0:e.tag)?r="*":"bold"===(null==e?void 0:e.tag)?r="**":"bold-italic"===(null==e?void 0:e.tag)&&(r="***");let n=`${r}@${this.name}${r}`;return 1===this.content.inlines.length?n=`${n} — ${t}`:this.content.inlines.length>1&&(n=`${n}\n${t}`),this.inline?`{${n}}`:n}},"JSDocTagImpl"),it);function II(e,t,r){var n;if("linkplain"===e||"linkcode"===e||"link"===e){const a=t.indexOf(" ");let i=t;if(a>0){const e=TI(t,a);i=t.substring(e),t=t.substring(0,a)}("linkcode"===e||"link"===e&&"code"===r.link)&&(i=`\`${i}\``);return(null==(n=r.renderLink)?void 0:n.call(r,t,i))??PI(t,i)}}function PI(e,t){try{return l_.parse(e,!0),`[${t}](${e})`}catch{return e}}Mn(II,"renderInlineTag"),Mn(PI,"renderLinkDefault");var OI=(Mn(st=class{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;t<this.inlines.length;t++){const r=this.inlines[t],n=this.inlines[t+1];e+=r.toString(),n&&n.range.start.line>r.range.start.line&&(e+="\n")}return e}toMarkdown(e){let t="";for(let r=0;r<this.inlines.length;r++){const n=this.inlines[r],a=this.inlines[r+1];t+=n.toMarkdown(e),a&&a.range.start.line>n.range.start.line&&(t+="\n")}return t}},"JSDocTextImpl"),st),LI=(Mn(ot=class{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}},"JSDocLineImpl"),ot);function DI(e){return e.endsWith("\n")?"\n":"\n\n"}Mn(DI,"fillNewlines");var MI,jI=(Mn(lt=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&pI(t)){return cI(t).toMarkdown({renderLink:Mn((t,r)=>this.documentationLinkRenderer(e,t,r),"renderLink"),renderTag:Mn(t=>this.documentationTagRenderer(e,t),"renderTag")})}}documentationLinkRenderer(e,t,r){const n=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(n&&n.nameSegment){const e=n.nameSegment.range.start.line+1,t=n.nameSegment.range.start.character+1;return`[${r}](${n.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){const r=oi(e).localSymbols;if(!r)return;let n=e;do{const e=r.getStream(n).find(e=>e.name===t);if(e)return e;n=n.$container}while(n)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}},"JSDocDocumentationProvider"),lt),FI=(Mn(ut=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var t;return P_(e)?e.$comment:null==(t=wo(e.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:t.text}},"DefaultCommentProvider"),ut),GI=(Mn(ct=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},"DefaultAsyncParser"),ct),zI=(Mn(pt=class{constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){const e=this.createWorker();e.onReady(()=>{if(this.queue.length>0){const t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){const r=await this.acquireParserWorker(t),n=new e_;let a;const i=t.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(e=>{const t=this.hydrator.hydrate(e);n.resolve(t)}).catch(e=>{n.reject(e)}).finally(()=>{i.dispose(),clearTimeout(a)}),n.promise}terminateWorker(e){e.terminate();const t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(const r of this.workerPool)if(r.ready)return r.lock(),r;const t=new e_;return e.onCancellationRequested(()=>{const e=this.queue.indexOf(t);e>=0&&this.queue.splice(e,1),t.reject(YN)}),this.queue.push(t),t.promise}},"AbstractThreadedAsyncParser"),pt),KI=(Mn(dt=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new Z_.Emitter,this.deferred=new e_,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=n,t(e=>{const t=e;this.deferred.resolve(t),this.unlock()}),r(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(YN),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 e_,this.sendMessage(e),this.deferred.promise}},"ParserWorker"),dt),qI=(Mn(ft=class{constructor(){this.previousTokenSource=new qN.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=WN();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=qN.CancellationToken.None){const n=new e_,a={action:t,deferred:n,cancellationToken:r};return e.push(a),this.performNextOperation(),n.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:r})=>{try{const n=await Promise.resolve().then(()=>e(r));t.resolve(n)}catch(n){XN(n)?t.resolve(void 0):t.reject(n)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},"DefaultWorkspaceLock"),ft),UI=(Mn(mt=class{constructor(e){this.grammarElementIdMap=new R_,this.tokenTypeIdMap=new R_,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(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const t=new Map,r=new Map;for(const n of di(e))t.set(n,{});if(e.$cstNode)for(const n of $o(e.$cstNode))r.set(n,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[n,a]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(a)){const e=[];r[n]=e;for(const r of a)Ga(r)?e.push(this.dehydrateAstNode(r,t)):za(r)?e.push(this.dehydrateReference(r,t)):e.push(r)}else Ga(a)?r[n]=this.dehydrateAstNode(a,t):za(a)?r[n]=this.dehydrateReference(a,t):void 0!==a&&(r[n]=a);return r}dehydrateReference(e,t){const r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){const r=t.cstNodes.get(e);return Ha(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Va(e)?r.content=e.content.map(e=>this.dehydrateCstNode(e,t)):Wa(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){const 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){const t=new Map,r=new Map;for(const a of di(e))t.set(a,{});let n;if(e.$cstNode)for(const a of $o(e.$cstNode)){let e;"fullText"in a?(e=new oN(a.fullText),n=e):"content"in a?e=new iN:"tokenType"in a&&(e=this.hydrateCstLeafNode(a)),e&&(r.set(a,e),e.root=n)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){const 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(const[n,a]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(a)){const e=[];r[n]=e;for(const i of a)Ga(i)?e.push(this.setParent(this.hydrateAstNode(i,t),r)):za(i)?e.push(this.hydrateReference(i,r,n,t)):e.push(i)}else Ga(a)?r[n]=this.setParent(this.hydrateAstNode(a,t),r):za(a)?r[n]=this.hydrateReference(a,r,n,t):void 0!==a&&(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){const n=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(n.grammarSource=this.getGrammarElement(e.grammarSource)),n.astNode=t.astNodes.get(e.astNode),Va(n))for(const a of e.content){const e=this.hydrateCstNode(a,t,r++);n.content.push(e)}return n}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),r=e.offset,n=e.length,a=e.startLine,i=e.startColumn,s=e.endLine,o=e.endColumn,l=e.hidden;return new aN(r,n,{start:{line:a,character:i},end:{line:s,character:o}},t,l)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();return this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const t of di(this.grammar))Ri(t)&&this.grammarElementIdMap.set(t,e++)}},"DefaultHydrator"),mt);function BI(e){return{documentation:{CommentProvider:Mn(e=>new FI(e),"CommentProvider"),DocumentationProvider:Mn(e=>new jI(e),"DocumentationProvider")},parser:{AsyncParser:Mn(e=>new GI(e),"AsyncParser"),GrammarConfig:Mn(e=>eu(e),"GrammarConfig"),LangiumParser:Mn(e=>jN(e),"LangiumParser"),CompletionParser:Mn(e=>MN(e),"CompletionParser"),ValueConverter:Mn(()=>new KN,"ValueConverter"),TokenBuilder:Mn(()=>new zN,"TokenBuilder"),Lexer:Mn(e=>new sI(e),"Lexer"),ParserErrorMessageProvider:Mn(()=>new mN,"ParserErrorMessageProvider"),LexerErrorMessageProvider:Mn(()=>new aI,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:Mn(()=>new X_,"AstNodeLocator"),AstNodeDescriptionProvider:Mn(e=>new H_(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:Mn(e=>new Y_(e),"ReferenceDescriptionProvider")},references:{Linker:Mn(e=>new y_(e),"Linker"),NameProvider:Mn(()=>new v_,"NameProvider"),ScopeProvider:Mn(e=>new I_(e),"ScopeProvider"),ScopeComputation:Mn(e=>new E_(e),"ScopeComputation"),References:Mn(e=>new T_(e),"References")},serializer:{Hydrator:Mn(e=>new UI(e),"Hydrator"),JsonSerializer:Mn(e=>new M_(e),"JsonSerializer")},validation:{DocumentValidator:Mn(e=>new U_(e),"DocumentValidator"),ValidationRegistry:Mn(e=>new K_(e),"ValidationRegistry")},shared:Mn(()=>e.shared,"shared")}}function VI(e){return{ServiceRegistry:Mn(e=>new j_(e),"ServiceRegistry"),workspace:{LangiumDocuments:Mn(e=>new m_(e),"LangiumDocuments"),LangiumDocumentFactory:Mn(e=>new f_(e),"LangiumDocumentFactory"),DocumentBuilder:Mn(e=>new tI(e),"DocumentBuilder"),IndexManager:Mn(e=>new rI(e),"IndexManager"),WorkspaceManager:Mn(e=>new nI(e),"WorkspaceManager"),FileSystemProvider:Mn(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:Mn(()=>new qI,"WorkspaceLock"),ConfigurationProvider:Mn(e=>new Q_(e),"ConfigurationProvider")},profilers:{}}}function WI(e,t,r,n,a,i,s,o,l){return XI([e,t,r,n,a,i,s,o,l].reduce(QI,{}))}Mn(BI,"createDefaultCoreModule"),Mn(VI,"createDefaultSharedCoreModule"),(MI||(MI={})).merge=(e,t)=>QI(QI({},e),t),Mn(WI,"inject");var HI=Symbol("isProxy");function YI(e){if(e&&e[HI])for(const t of Object.values(e))YI(t);return e}function XI(e,t){const r=new Proxy({},{deleteProperty:Mn(()=>!1,"deleteProperty"),set:Mn(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:Mn((n,a)=>a===HI||JI(n,a,e,t||r),"get"),getOwnPropertyDescriptor:Mn((n,a)=>(JI(n,a,e,t||r),Object.getOwnPropertyDescriptor(n,a)),"getOwnPropertyDescriptor"),has:Mn((t,r)=>r in e,"has"),ownKeys:Mn(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}Mn(YI,"eagerLoad"),Mn(XI,"_inject");var ZI=Symbol();function JI(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]===ZI)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in r){const i=r[t];e[t]=ZI;try{e[t]="function"==typeof i?i(n):XI(i,n)}catch(a){throw e[t]=a instanceof Error?a:void 0,a}return e[t]}}function QI(e,t){if(t)for(const[r,n]of Object.entries(t))if(null!=n)if("object"==typeof n){const t=e[r];e[r]=QI("object"==typeof t&&null!==t?t:{},n)}else e[r]=n;return e}Mn(JI,"_resolve"),Mn(QI,"_merge");var eP,tP,rP={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(tP=eP||(eP={})).REGULAR="indentation-sensitive",tP.IGNORE_INDENTATION="ignore-indentation";var nP=(Mn(ht=class extends zN{constructor(e=rP){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...rP,...e},this.indentTokenType=N$({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=N$({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){const r=super.buildTokens(e,t);if(!oI(r))throw new Error("Invalid tokens built by default builder");const{indentTokenName:n,dedentTokenName:a,whitespaceTokenName:i,ignoreIndentationDelimiters:s}=this.options;let o,l,u;const c=[];for(const p of r){for(const[e,t]of s)p.name===e?p.PUSH_MODE=eP.IGNORE_INDENTATION:p.name===t&&(p.POP_MODE=!0);p.name===a?o=p:p.name===n?l=p:p.name===i?u=p:c.push(p)}if(!o||!l||!u)throw new Error("Some indentation/whitespace tokens not found!");if(s.length>0){return{modes:{[eP.REGULAR]:[o,l,...c,u],[eP.IGNORE_INDENTATION]:[...c,u]},defaultMode:eP.REGULAR}}return[o,l,u,...c]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return 0===t||"\r\n".includes(e[t-1])}matchWhitespace(e,t,r,n){this.whitespaceRegExp.lastIndex=t;const a=this.whitespaceRegExp.exec(e);return{currIndentLevel:(null==a?void 0:a[0].length)??0,prevIndentLevel:this.indentationStack.at(-1),match:a}}createIndentationTokenInstance(e,t,r,n){const a=this.getLineNumber(t,n);return P$(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;const{currIndentLevel:a,prevIndentLevel:i,match:s}=this.matchWhitespace(e,t,r,n);return a<=i?null:(this.indentationStack.push(a),s)}dedentMatcher(e,t,r,n){var a,i;if(!this.isStartOfLine(e,t))return null;const{currIndentLevel:s,prevIndentLevel:o,match:l}=this.matchWhitespace(e,t,r,n);if(s>=o)return null;const u=this.indentationStack.lastIndexOf(s);if(-1===u)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${s} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:(null==(a=null==l?void 0:l[0])?void 0:a.length)??0,line:this.getLineNumber(e,t),column:1}),null;const c=this.indentationStack.length-u-1,p=(null==(i=e.substring(0,t).match(/[\r\n]+$/))?void 0:i[0].length)??1;for(let d=0;d<c;d++){const n=this.createIndentationTokenInstance(this.dedentTokenType,e,"",t-(p-1));r.push(n),this.indentationStack.pop()}return null}buildTerminalToken(e){const t=super.buildTerminalToken(e),{indentTokenName:r,dedentTokenName:n,whitespaceTokenName:a}=this.options;return t.name===r?this.indentTokenType:t.name===n?this.dedentTokenType:t.name===a?N$({name:a,pattern:this.whitespaceRegExp,group:T$.SKIPPED}):t}flushRemainingDedents(e){const t=[];for(;this.indentationStack.length>1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},"IndentationAwareTokenBuilder"),ht),aP=(Mn(yt=class extends sI{constructor(e){if(super(e),!(e.parser.TokenBuilder instanceof nP))throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder");this.indentationTokenBuilder=e.parser.TokenBuilder}tokenize(e,t=iI){const r=super.tokenize(e),n=r.report;"full"===(null==t?void 0:t.mode)&&r.tokens.push(...n.remainingDedents),n.remainingDedents=[];const{indentTokenType:a,dedentTokenType:i}=this.indentationTokenBuilder,s=a.tokenTypeIdx,o=i.tokenTypeIdx,l=[],u=r.tokens.length-1;for(let c=0;c<u;c++){const e=r.tokens[c],t=r.tokens[c+1];e.tokenTypeIdx!==s||t.tokenTypeIdx!==o?l.push(e):c++}return u>=0&&l.push(r.tokens[u]),r.tokens=l,r}},"IndentationAwareLexer"),yt),iP={};Fn(iP,{AstUtils:()=>ni,BiMap:()=>R_,Cancellation:()=>qN,ContextCache:()=>w_,CstUtils:()=>Fa,DONE_RESULT:()=>Qa,Deferred:()=>e_,Disposable:()=>J_,DisposableCache:()=>k_,DocumentCache:()=>N_,EMPTY_STREAM:()=>Ja,ErrorWithLocation:()=>zo,GrammarUtils:()=>Go,MultiMap:()=>$_,OperationCancelled:()=>YN,Reduction:()=>ti,RegExpUtils:()=>Uo,SimpleCache:()=>x_,StreamImpl:()=>Ya,TreeStreamImpl:()=>ri,URI:()=>l_,UriTrie:()=>d_,UriUtils:()=>o_,WorkspaceCache:()=>__,assertCondition:()=>qo,assertUnreachable:()=>Ko,delayNextTick:()=>UN,interruptAndCheck:()=>ZN,isOperationCancelled:()=>XN,loadGrammarFromJson:()=>pP,setInterruptionPeriod:()=>HN,startCancelableOperation:()=>WN,stream:()=>ei}),zn(iP,Z_);var sP=(Mn(gt=class{stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},"EmptyFileSystemProvider"),gt),oP={fileSystemProvider:Mn(()=>new sP,"fileSystemProvider")},lP={Grammar:Mn(()=>{},"Grammar"),LanguageMetaData:Mn(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},uP={AstReflection:Mn(()=>new go,"AstReflection")};function cP(){const e=WI(VI(oP),uP),t=WI(BI({shared:e}),lP);return e.ServiceRegistry.register(t),t}function pP(e){const t=cP(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,l_.parse(`memory:/${r.name??"grammar"}.langium`)),r}Mn(cP,"createMinimalGrammarServices"),Mn(pP,"loadGrammarFromJson"),zn(ja,iP);var dP,fP,mP,hP,yP,gP,vP,TP,$P,RP,EP,bP,AP,CP,SP,kP=(vt=class{constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new $_}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(e=>this.activeCategories.add(e)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(e=>this.activeCategories.delete(e)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return new xP(t=>this.records.add(e,this.dumpRecord(e,t)),t)}dumpRecord(e,t){const r=[];for(const a of t.entries.keys()){const e=t.entries.get(a),n=e.reduce((e,t)=>e+t);r.push({name:`${t.identifier}.${a}`,count:e.length,duration:n})}const n=t.duration-r.map(e=>e.duration).reduce((e,t)=>e+t,0);return r.push({name:t.identifier,count:1,duration:n}),r.sort((e,t)=>t.duration-e.duration),Mn(function(e){return Math.round(100*e)/100},"Round"),t}getRecords(...e){return 0===e.length?this.records.values():this.records.entries().filter(t=>e.some(e=>e===t[0])).flatMap(e=>e[1])}},Mn(vt,"DefaultLangiumProfiler"),vt),xP=(Mn(Tt=class{constructor(e,t){this.stack=[],this.entries=new $_,this.addRecord=e,this.identifier=t}start(){if(void 0!==this.startTime)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(void 0===this.startTime)throw new Error(`Task "${this.identifier}" was not started.`);if(0!==this.stack.length)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(e=>e.id).join(", ")}.`);const 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){const 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.`);const r=performance.now()-t.start;void 0!==this.stack.at(-1)&&(this.stack[this.stack.length-1].content+=r);const n=r-t.content;this.entries.add(e,n)}},"ProfilingTask"),Tt);(dP||(dP={})).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 ]+)\]/},(fP||(fP={})).Terminals={DOMAIN_NAME:/complex|complicated|clear|chaotic|confusion/,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]*/},(mP||(mP={})).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]*/},(hP||(hP={})).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])?/},(yP||(yP={})).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]*/},(gP||(gP={})).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]*/},(vP||(vP={})).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]*/},(TP||(TP={})).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]*/},($P||($P={})).Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ABNF_RULENAME:/[A-Za-z][A-Za-z0-9-]*/,ABNF_STRING:/"[^"]*"/,ABNF_NUMVAL:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/,ABNF_REPEAT:/[0-9]*\*[0-9]*/,ABNF_EXACT_REPEAT:/[0-9]+/,ABNF_WHITESPACE:/[\t \r\n]+/,ABNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,ABNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,ABNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ABNF_COMMENT:/;[^\n\r]*/},(RP||(RP={})).Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EBNF_ID:/[A-Z_a-z][\w-]*/,EBNF_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,EBNF_SPECIAL_SEQUENCE:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/,EBNF_WHITESPACE:/[\t \r\n]+/,EBNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EBNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EBNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EBNF_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//,EBNF_ISO_COMMENT:/\(\*[\s\S]*?\*\)/},(EP||(EP={})).Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,RR_ID:/[A-Z_a-z][\w-]*/,RR_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,RR_WHITESPACE:/[\t \r\n]+/,RR_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,RR_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,RR_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,RR_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//},(bP||(bP={})).Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,PEG_ID:/[A-Z_a-z][\w-]*/,PEG_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,PEG_WHITESPACE:/[\t \r\n]+/,PEG_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,PEG_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,PEG_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,PEG_LINE_COMMENT:/#[^\n\r]*/},(AP||(AP={})).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:/"[^"]*"|'[^']*'/},(CP||(CP={})).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]*|)/,CLASS_ANNOTATION:/[ \t]+:::[ \t]*[A-Za-z_][\w-]*/,ICON_ANNOTATION:/[ \t]+icon\([\w-]*(?::[\w-]+)?\)/,DESC_ANNOTATION:/[ \t]+##[^\n\r]*/,INDENTATION:/[ \t]{1,}/,QUOTED_NAME:/"[^"]*"|'[^']*'/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,BARE_NAME:/(?!:::|icon\(|##)[^ \t\n\r"'](?:(?![ \t]+:::[ \t]*[A-Za-z_]|[ \t]+icon\(|[ \t]+##)[^\n\r])*/},(SP||(SP={})).Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+</,LINK_ARROW:/-->|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,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]*/},dP.Terminals,fP.Terminals,mP.Terminals,hP.Terminals,yP.Terminals,gP.Terminals,vP.Terminals,TP.Terminals,$P.Terminals,RP.Terminals,EP.Terminals,bP.Terminals,CP.Terminals,AP.Terminals,SP.Terminals;var wP="AbnfAlternation",NP="alternatives",_P="AbnfConcatenation",IP="elements",PP="AbnfElement",OP="primary",LP="repeat",DP="AbnfGroup",MP="element",jP="AbnfNumVal",FP="value",GP="AbnfOptionalGroup",zP="element",KP="AbnfPrimary",qP="AbnfRule",UP="definition",BP="name",VP="AbnfRuleName",WP="name",HP="AbnfStringLiteral",YP="value",XP="Accelerator",ZP="name",JP="x",QP="y",eO="Alignment",tO="direction",rO="members",nO="Anchor",aO="evolution",iO="name",sO="visibility",oO="Annotation",lO="number",uO="text",cO="x",pO="y",dO="Annotations",fO="x",mO="y",hO="Architecture",yO="accDescr",gO="accTitle",vO="alignments",TO="edges",$O="groups",RO="junctions",EO="services",bO="title";Mn(function(e){return fz.isInstance(e,hO)},"isArchitecture");var AO="Axis",CO="label",SO="name",kO="Branch",xO="name",wO="order";Mn(function(e){return fz.isInstance(e,kO)},"isBranch");var NO="Checkout",_O="branch",IO="CherryPicking",PO="id",OO="parent",LO="tags",DO="ClassDefStatement",MO="className",jO="styleText",FO="Commit",GO="id",zO="message",KO="tags",qO="type";Mn(function(e){return fz.isInstance(e,FO)},"isCommit");var UO="Common",BO="accDescr",VO="accTitle",WO="title",HO="Component",YO="decorator",XO="evolution",ZO="inertia",JO="label",QO="name",eL="visibility",tL="Curve",rL="entries",nL="label",aL="name",iL="Cynefin",sL="accDescr",oL="accTitle",lL="domains",uL="title",cL="transitions";Mn(function(e){return fz.isInstance(e,iL)},"isCynefin");var pL="Deaccelerator",dL="name",fL="x",mL="y",hL="Decorator",yL="strategy",gL="Direction",vL="accDescr",TL="accTitle",$L="dir",RL="statements",EL="title",bL="DomainBlock",AL="domain",CL="items";Mn(function(e){return fz.isInstance(e,bL)},"isDomainBlock");var SL="DomainItem",kL="label";Mn(function(e){return fz.isInstance(e,SL)},"isDomainItem");var xL="EbnfChoice",wL="alternatives",NL="EbnfExceptionPostfix",_L="except",IL="EbnfGroup",PL="element",OL="EbnfNonTerminal",LL="name",DL="EbnfOneOrMorePostfix",ML="operator",jL="EbnfOptional",FL="element",GL="EbnfOptionalPostfix",zL="operator",KL="EbnfPostfix",qL="EbnfPrimary",UL="EbnfRepetition",BL="element",VL="EbnfRule",WL="definition",HL="name",YL="EbnfSequence",XL="elements",ZL="EbnfSpecial",JL="text",QL="EbnfTerm",eD="base",tD="postfixes",rD="EbnfTerminal",nD="value",aD="EbnfZeroOrMorePostfix",iD="operator",sD="Edge",oD="lhsDir",lD="lhsGroup",uD="lhsId",cD="lhsInto",pD="rhsDir",dD="rhsGroup",fD="rhsId",mD="rhsInto",hD="title",yD="EmDataEntity",gD="dataBlockValue",vD="dataType",TD="name",$D="EmFrame",RD="EmGwt",ED="givenStatements",bD="sourceFrame",AD="thenStatements",CD="whenStatements",SD="EmGwtStatement",kD="entityIdentifier",xD="EmModelEntity",wD="name";Mn(function(e){return"rmo"===e||"readmodel"===e||"ui"===e||"cmd"===e||"command"===e||"evt"===e||"event"===e||"pcr"===e||"processor"===e},"isEmModelEntityType");var ND="EmNoteEntity",_D="dataBlockValue",ID="dataType",PD="sourceFrame",OD="EmResetFrame",LD="dataInlineValue",DD="dataReference",MD="dataType",jD="entityIdentifier",FD="modelEntityType",GD="name",zD="sourceFrames";function KD(e){return fz.isInstance(e,OD)}Mn(KD,"isEmResetFrame");var qD="EmTimeFrame",UD="dataInlineValue",BD="dataReference",VD="dataType",WD="entityIdentifier",HD="modelEntityType",YD="name",XD="sourceFrames",ZD="Entry",JD="axis",QD="value",eM="EventModel",tM="accDescr",rM="accTitle",nM="dataEntities",aM="frames",iM="gwtEntities",sM="modelEntities",oM="noteEntities",lM="title",uM="Evolution",cM="stages",pM="EvolutionStage",dM="boundary",fM="name",mM="secondName",hM="Evolve",yM="component",gM="target",vM="GitGraph",TM="accDescr",$M="accTitle",RM="statements",EM="title";Mn(function(e){return fz.isInstance(e,vM)},"isGitGraph");var bM="Group",AM="icon",CM="id",SM="in",kM="title",xM="Info",wM="accDescr",NM="accTitle",_M="title";Mn(function(e){return fz.isInstance(e,xM)},"isInfo");var IM="Item",PM="classSelector",OM="name",LM="Junction",DM="id",MM="in",jM="Label",FM="negX",GM="negY",zM="offsetX",KM="offsetY",qM="Leaf",UM="classSelector",BM="name",VM="value",WM="Link",HM="arrow",YM="from",XM="fromPort",ZM="linkLabel",JM="to",QM="toPort",ej="Merge",tj="branch",rj="id",nj="tags",aj="type";Mn(function(e){return fz.isInstance(e,ej)},"isMerge");var ij="Note",sj="evolution",oj="text",lj="visibility",uj="Option",cj="name",pj="value",dj="Packet",fj="accDescr",mj="accTitle",hj="blocks",yj="title";Mn(function(e){return fz.isInstance(e,dj)},"isPacket");var gj="PacketBlock",vj="bits",Tj="end",$j="label",Rj="start";Mn(function(e){return fz.isInstance(e,gj)},"isPacketBlock");var Ej="PegAny",bj="dot",Aj="PegGroup",Cj="element",Sj="PegIdentifier",kj="name",xj="PegLiteral",wj="value",Nj="PegOrderedChoice",_j="alternatives",Ij="PegPrefix",Pj="operator",Oj="suffix",Lj="PegPrimary",Dj="PegRule",Mj="definition",jj="name",Fj="PegSequence",Gj="elements",zj="PegSuffix",Kj="operator",qj="primary",Uj="Pie",Bj="accDescr",Vj="accTitle",Wj="sections",Hj="showData",Yj="title";Mn(function(e){return fz.isInstance(e,Uj)},"isPie");var Xj="PieSection",Zj="label",Jj="value";Mn(function(e){return fz.isInstance(e,Xj)},"isPieSection");var Qj="Pipeline",eF="components",tF="parent",rF="PipelineComponent",nF="evolution",aF="label",iF="name",sF="Radar",oF="accDescr",lF="accTitle",uF="axes",cF="curves",pF="options",dF="title",fF="Railroad",mF="accDescr",hF="accTitle",yF="rules",gF="title";Mn(function(e){return fz.isInstance(e,fF)},"isRailroad");var vF="RailroadAbnf",TF="accDescr",$F="accTitle",RF="rules",EF="title";Mn(function(e){return fz.isInstance(e,vF)},"isRailroadAbnf");var bF="RailroadChoiceExpr",AF="alternatives",CF="RailroadEbnf",SF="accDescr",kF="accTitle",xF="rules",wF="title";Mn(function(e){return fz.isInstance(e,CF)},"isRailroadEbnf");var NF="RailroadExpression",_F="RailroadNonTerminalExpr",IF="name",PF="RailroadOneOrMoreExpr",OF="element",LF="RailroadOptionalExpr",DF="element",MF="RailroadPeg",jF="accDescr",FF="accTitle",GF="rules",zF="title";Mn(function(e){return fz.isInstance(e,MF)},"isRailroadPeg");var KF="RailroadRule",qF="definition",UF="name",BF="RailroadSequenceExpr",VF="elements",WF="RailroadSpecialExpr",HF="text",YF="RailroadTerminalExpr",XF="value",ZF="RailroadZeroOrMoreExpr",JF="element",QF="Section",eG="classSelector",tG="name",rG="Service",nG="icon",aG="iconText",iG="id",sG="in",oG="title",lG="Size",uG="height",cG="width",pG="Statement",dG="Transition",fG="from",mG="label",hG="to";Mn(function(e){return fz.isInstance(e,dG)},"isTransition");var yG="Treemap",gG="accDescr",vG="accTitle",TG="title",$G="TreemapRows";Mn(function(e){return fz.isInstance(e,yG)},"isTreemap");var RG="TreemapRow",EG="indent",bG="item",AG="TreeNode",CG="classAnnotation",SG="descAnnotation",kG="iconAnnotation",xG="indent",wG="name",NG="TreeView",_G="accDescr",IG="accTitle",PG="nodes",OG="title",LG="Wardley",DG="accDescr",MG="accelerators",jG="accTitle",FG="anchors",GG="annotation",zG="annotations",KG="components",qG="deaccelerators",UG="evolution",BG="evolves",VG="links",WG="notes",HG="pipelines",YG="size",XG="title";Mn(function(e){return fz.isInstance(e,LG)},"isWardley");var ZG,JG,QG,ez,tz,rz,nz,az,iz,sz,oz,lz,uz,cz,pz,dz=(Mn($t=class extends Ba{constructor(){super(...arguments),this.types={AbnfAlternation:{name:wP,properties:{alternatives:{name:NP,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:_P,properties:{elements:{name:IP,defaultValue:[]}},superTypes:[]},AbnfElement:{name:PP,properties:{primary:{name:OP},repeat:{name:LP}},superTypes:[]},AbnfGroup:{name:DP,properties:{element:{name:MP}},superTypes:[KP]},AbnfNumVal:{name:jP,properties:{value:{name:FP}},superTypes:[KP]},AbnfOptionalGroup:{name:GP,properties:{element:{name:zP}},superTypes:[KP]},AbnfPrimary:{name:KP,properties:{},superTypes:[]},AbnfRule:{name:qP,properties:{definition:{name:UP},name:{name:BP}},superTypes:[]},AbnfRuleName:{name:VP,properties:{name:{name:WP}},superTypes:[KP]},AbnfStringLiteral:{name:HP,properties:{value:{name:YP}},superTypes:[KP]},Accelerator:{name:XP,properties:{name:{name:ZP},x:{name:JP},y:{name:QP}},superTypes:[]},Alignment:{name:eO,properties:{direction:{name:tO},members:{name:rO,defaultValue:[]}},superTypes:[]},Anchor:{name:nO,properties:{evolution:{name:aO},name:{name:iO},visibility:{name:sO}},superTypes:[]},Annotation:{name:oO,properties:{number:{name:lO},text:{name:uO},x:{name:cO},y:{name:pO}},superTypes:[]},Annotations:{name:dO,properties:{x:{name:fO},y:{name:mO}},superTypes:[]},Architecture:{name:hO,properties:{accDescr:{name:yO},accTitle:{name:gO},alignments:{name:vO,defaultValue:[]},edges:{name:TO,defaultValue:[]},groups:{name:$O,defaultValue:[]},junctions:{name:RO,defaultValue:[]},services:{name:EO,defaultValue:[]},title:{name:bO}},superTypes:[]},Axis:{name:AO,properties:{label:{name:CO},name:{name:SO}},superTypes:[]},Branch:{name:kO,properties:{name:{name:xO},order:{name:wO}},superTypes:[pG]},Checkout:{name:NO,properties:{branch:{name:_O}},superTypes:[pG]},CherryPicking:{name:IO,properties:{id:{name:PO},parent:{name:OO},tags:{name:LO,defaultValue:[]}},superTypes:[pG]},ClassDefStatement:{name:DO,properties:{className:{name:MO},styleText:{name:jO}},superTypes:[]},Commit:{name:FO,properties:{id:{name:GO},message:{name:zO},tags:{name:KO,defaultValue:[]},type:{name:qO}},superTypes:[pG]},Common:{name:UO,properties:{accDescr:{name:BO},accTitle:{name:VO},title:{name:WO}},superTypes:[]},Component:{name:HO,properties:{decorator:{name:YO},evolution:{name:XO},inertia:{name:ZO,defaultValue:!1},label:{name:JO},name:{name:QO},visibility:{name:eL}},superTypes:[]},Curve:{name:tL,properties:{entries:{name:rL,defaultValue:[]},label:{name:nL},name:{name:aL}},superTypes:[]},Cynefin:{name:iL,properties:{accDescr:{name:sL},accTitle:{name:oL},domains:{name:lL,defaultValue:[]},title:{name:uL},transitions:{name:cL,defaultValue:[]}},superTypes:[]},Deaccelerator:{name:pL,properties:{name:{name:dL},x:{name:fL},y:{name:mL}},superTypes:[]},Decorator:{name:hL,properties:{strategy:{name:yL}},superTypes:[]},Direction:{name:gL,properties:{accDescr:{name:vL},accTitle:{name:TL},dir:{name:$L},statements:{name:RL,defaultValue:[]},title:{name:EL}},superTypes:[vM]},DomainBlock:{name:bL,properties:{domain:{name:AL},items:{name:CL,defaultValue:[]}},superTypes:[]},DomainItem:{name:SL,properties:{label:{name:kL}},superTypes:[]},EbnfChoice:{name:xL,properties:{alternatives:{name:wL,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:NL,properties:{except:{name:_L}},superTypes:[KL]},EbnfGroup:{name:IL,properties:{element:{name:PL}},superTypes:[qL]},EbnfNonTerminal:{name:OL,properties:{name:{name:LL}},superTypes:[qL]},EbnfOneOrMorePostfix:{name:DL,properties:{operator:{name:ML}},superTypes:[KL]},EbnfOptional:{name:jL,properties:{element:{name:FL}},superTypes:[qL]},EbnfOptionalPostfix:{name:GL,properties:{operator:{name:zL}},superTypes:[KL]},EbnfPostfix:{name:KL,properties:{},superTypes:[]},EbnfPrimary:{name:qL,properties:{},superTypes:[]},EbnfRepetition:{name:UL,properties:{element:{name:BL}},superTypes:[qL]},EbnfRule:{name:VL,properties:{definition:{name:WL},name:{name:HL}},superTypes:[]},EbnfSequence:{name:YL,properties:{elements:{name:XL,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:ZL,properties:{text:{name:JL}},superTypes:[qL]},EbnfTerm:{name:QL,properties:{base:{name:eD},postfixes:{name:tD,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:rD,properties:{value:{name:nD}},superTypes:[qL]},EbnfZeroOrMorePostfix:{name:aD,properties:{operator:{name:iD}},superTypes:[KL]},Edge:{name:sD,properties:{lhsDir:{name:oD},lhsGroup:{name:lD,defaultValue:!1},lhsId:{name:uD},lhsInto:{name:cD,defaultValue:!1},rhsDir:{name:pD},rhsGroup:{name:dD,defaultValue:!1},rhsId:{name:fD},rhsInto:{name:mD,defaultValue:!1},title:{name:hD}},superTypes:[]},EmDataEntity:{name:yD,properties:{dataBlockValue:{name:gD},dataType:{name:vD},name:{name:TD}},superTypes:[]},EmFrame:{name:$D,properties:{},superTypes:[]},EmGwt:{name:RD,properties:{givenStatements:{name:ED,defaultValue:[]},sourceFrame:{name:bD,referenceType:$D},thenStatements:{name:AD,defaultValue:[]},whenStatements:{name:CD,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:SD,properties:{entityIdentifier:{name:kD,referenceType:xD}},superTypes:[]},EmModelEntity:{name:xD,properties:{name:{name:wD}},superTypes:[]},EmNoteEntity:{name:ND,properties:{dataBlockValue:{name:_D},dataType:{name:ID},sourceFrame:{name:PD,referenceType:$D}},superTypes:[]},EmResetFrame:{name:OD,properties:{dataInlineValue:{name:LD},dataReference:{name:DD,referenceType:yD},dataType:{name:MD},entityIdentifier:{name:jD},modelEntityType:{name:FD},name:{name:GD},sourceFrames:{name:zD,defaultValue:[],referenceType:$D}},superTypes:[$D]},EmTimeFrame:{name:qD,properties:{dataInlineValue:{name:UD},dataReference:{name:BD,referenceType:yD},dataType:{name:VD},entityIdentifier:{name:WD},modelEntityType:{name:HD},name:{name:YD},sourceFrames:{name:XD,defaultValue:[],referenceType:$D}},superTypes:[$D]},Entry:{name:ZD,properties:{axis:{name:JD,referenceType:AO},value:{name:QD}},superTypes:[]},EventModel:{name:eM,properties:{accDescr:{name:tM},accTitle:{name:rM},dataEntities:{name:nM,defaultValue:[]},frames:{name:aM,defaultValue:[]},gwtEntities:{name:iM,defaultValue:[]},modelEntities:{name:sM,defaultValue:[]},noteEntities:{name:oM,defaultValue:[]},title:{name:lM}},superTypes:[]},Evolution:{name:uM,properties:{stages:{name:cM,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:pM,properties:{boundary:{name:dM},name:{name:fM},secondName:{name:mM}},superTypes:[]},Evolve:{name:hM,properties:{component:{name:yM},target:{name:gM}},superTypes:[]},GitGraph:{name:vM,properties:{accDescr:{name:TM},accTitle:{name:$M},statements:{name:RM,defaultValue:[]},title:{name:EM}},superTypes:[]},Group:{name:bM,properties:{icon:{name:AM},id:{name:CM},in:{name:SM},title:{name:kM}},superTypes:[]},Info:{name:xM,properties:{accDescr:{name:wM},accTitle:{name:NM},title:{name:_M}},superTypes:[]},Item:{name:IM,properties:{classSelector:{name:PM},name:{name:OM}},superTypes:[]},Junction:{name:LM,properties:{id:{name:DM},in:{name:MM}},superTypes:[]},Label:{name:jM,properties:{negX:{name:FM,defaultValue:!1},negY:{name:GM,defaultValue:!1},offsetX:{name:zM},offsetY:{name:KM}},superTypes:[]},Leaf:{name:qM,properties:{classSelector:{name:UM},name:{name:BM},value:{name:VM}},superTypes:[IM]},Link:{name:WM,properties:{arrow:{name:HM},from:{name:YM},fromPort:{name:XM},linkLabel:{name:ZM},to:{name:JM},toPort:{name:QM}},superTypes:[]},Merge:{name:ej,properties:{branch:{name:tj},id:{name:rj},tags:{name:nj,defaultValue:[]},type:{name:aj}},superTypes:[pG]},Note:{name:ij,properties:{evolution:{name:sj},text:{name:oj},visibility:{name:lj}},superTypes:[]},Option:{name:uj,properties:{name:{name:cj},value:{name:pj,defaultValue:!1}},superTypes:[]},Packet:{name:dj,properties:{accDescr:{name:fj},accTitle:{name:mj},blocks:{name:hj,defaultValue:[]},title:{name:yj}},superTypes:[]},PacketBlock:{name:gj,properties:{bits:{name:vj},end:{name:Tj},label:{name:$j},start:{name:Rj}},superTypes:[]},PegAny:{name:Ej,properties:{dot:{name:bj}},superTypes:[Lj]},PegGroup:{name:Aj,properties:{element:{name:Cj}},superTypes:[Lj]},PegIdentifier:{name:Sj,properties:{name:{name:kj}},superTypes:[Lj]},PegLiteral:{name:xj,properties:{value:{name:wj}},superTypes:[Lj]},PegOrderedChoice:{name:Nj,properties:{alternatives:{name:_j,defaultValue:[]}},superTypes:[]},PegPrefix:{name:Ij,properties:{operator:{name:Pj},suffix:{name:Oj}},superTypes:[]},PegPrimary:{name:Lj,properties:{},superTypes:[]},PegRule:{name:Dj,properties:{definition:{name:Mj},name:{name:jj}},superTypes:[]},PegSequence:{name:Fj,properties:{elements:{name:Gj,defaultValue:[]}},superTypes:[]},PegSuffix:{name:zj,properties:{operator:{name:Kj},primary:{name:qj}},superTypes:[]},Pie:{name:Uj,properties:{accDescr:{name:Bj},accTitle:{name:Vj},sections:{name:Wj,defaultValue:[]},showData:{name:Hj,defaultValue:!1},title:{name:Yj}},superTypes:[]},PieSection:{name:Xj,properties:{label:{name:Zj},value:{name:Jj}},superTypes:[]},Pipeline:{name:Qj,properties:{components:{name:eF,defaultValue:[]},parent:{name:tF}},superTypes:[]},PipelineComponent:{name:rF,properties:{evolution:{name:nF},label:{name:aF},name:{name:iF}},superTypes:[]},Radar:{name:sF,properties:{accDescr:{name:oF},accTitle:{name:lF},axes:{name:uF,defaultValue:[]},curves:{name:cF,defaultValue:[]},options:{name:pF,defaultValue:[]},title:{name:dF}},superTypes:[]},Railroad:{name:fF,properties:{accDescr:{name:mF},accTitle:{name:hF},rules:{name:yF,defaultValue:[]},title:{name:gF}},superTypes:[]},RailroadAbnf:{name:vF,properties:{accDescr:{name:TF},accTitle:{name:$F},rules:{name:RF,defaultValue:[]},title:{name:EF}},superTypes:[]},RailroadChoiceExpr:{name:bF,properties:{alternatives:{name:AF,defaultValue:[]}},superTypes:[NF]},RailroadEbnf:{name:CF,properties:{accDescr:{name:SF},accTitle:{name:kF},rules:{name:xF,defaultValue:[]},title:{name:wF}},superTypes:[]},RailroadExpression:{name:NF,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:_F,properties:{name:{name:IF}},superTypes:[NF]},RailroadOneOrMoreExpr:{name:PF,properties:{element:{name:OF}},superTypes:[NF]},RailroadOptionalExpr:{name:LF,properties:{element:{name:DF}},superTypes:[NF]},RailroadPeg:{name:MF,properties:{accDescr:{name:jF},accTitle:{name:FF},rules:{name:GF,defaultValue:[]},title:{name:zF}},superTypes:[]},RailroadRule:{name:KF,properties:{definition:{name:qF},name:{name:UF}},superTypes:[]},RailroadSequenceExpr:{name:BF,properties:{elements:{name:VF,defaultValue:[]}},superTypes:[NF]},RailroadSpecialExpr:{name:WF,properties:{text:{name:HF}},superTypes:[NF]},RailroadTerminalExpr:{name:YF,properties:{value:{name:XF}},superTypes:[NF]},RailroadZeroOrMoreExpr:{name:ZF,properties:{element:{name:JF}},superTypes:[NF]},Section:{name:QF,properties:{classSelector:{name:eG},name:{name:tG}},superTypes:[IM]},Service:{name:rG,properties:{icon:{name:nG},iconText:{name:aG},id:{name:iG},in:{name:sG},title:{name:oG}},superTypes:[]},Size:{name:lG,properties:{height:{name:uG},width:{name:cG}},superTypes:[]},Statement:{name:pG,properties:{},superTypes:[]},Transition:{name:dG,properties:{from:{name:fG},label:{name:mG},to:{name:hG}},superTypes:[]},TreeNode:{name:AG,properties:{classAnnotation:{name:CG},descAnnotation:{name:SG},iconAnnotation:{name:kG},indent:{name:xG},name:{name:wG}},superTypes:[]},TreeView:{name:NG,properties:{accDescr:{name:_G},accTitle:{name:IG},nodes:{name:PG,defaultValue:[]},title:{name:OG}},superTypes:[]},Treemap:{name:yG,properties:{accDescr:{name:gG},accTitle:{name:vG},title:{name:TG},TreemapRows:{name:$G,defaultValue:[]}},superTypes:[]},TreemapRow:{name:RG,properties:{indent:{name:EG},item:{name:bG}},superTypes:[]},Wardley:{name:LG,properties:{accDescr:{name:DG},accelerators:{name:MG,defaultValue:[]},accTitle:{name:jG},anchors:{name:FG,defaultValue:[]},annotation:{name:GG,defaultValue:[]},annotations:{name:zG,defaultValue:[]},components:{name:KG,defaultValue:[]},deaccelerators:{name:qG,defaultValue:[]},evolution:{name:UG},evolves:{name:BG,defaultValue:[]},links:{name:VG,defaultValue:[]},notes:{name:WG,defaultValue:[]},pipelines:{name:HG,defaultValue:[]},size:{name:YG},title:{name:XG}},superTypes:[]}}}},"MermaidAstReflection"),$t),fz=new dz,mz=Mn(()=>ZG??(ZG=pP('{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"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":[]}},{"$type":"Assignment","feature":"alignments","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"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@10"},"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@10"},"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@12"},"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@30"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"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@23"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@23"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@23"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Alignment","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"align"},{"$type":"Assignment","feature":"direction","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"row"},{"$type":"Keyword","value":"column"}]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@24"},"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@16"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@19"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@20"},"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"),hz=Mn(()=>JG??(JG=pP('{"$type":"Grammar","isDeclared":true,"name":"CynefinGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Cynefin","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"cynefin-beta"},{"$type":"Keyword","value":"cynefin-beta:"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"domains","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"transitions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"domain","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"items","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainItem","definition":{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Transition","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":"--\x3e"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"DOMAIN_NAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complex"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complicated"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"clear"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"chaotic"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"confusion"},"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":[]}')),"CynefinGrammarGrammar"),yz=Mn(()=>QG??(QG=pP('{"$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"),gz=Mn(()=>ez??(ez=pP('{"$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"),vz=Mn(()=>tz??(tz=pP('{"$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"),Tz=Mn(()=>rz??(rz=pP('{"$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"),$z=Mn(()=>nz??(nz=pP('{"$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"),Rz=Mn(()=>az??(az=pP('{"$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"),Ez=Mn(()=>iz??(iz=pP('{"$type":"Grammar","isDeclared":true,"name":"RailroadAbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_RULENAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Za-z][A-Za-z0-9-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_NUMVAL","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\\\\.[0-9A-Fa-f]+)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]*\\\\*[0-9]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_EXACT_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_COMMENT","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadAbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-abnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","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":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfAlternation","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfConcatenation","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfElement","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfStringLiteral","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfNumVal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRuleName","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfOptionalGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadAbnf","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfAlternation","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfConcatenation","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfElement","attributes":[{"$type":"TypeAttribute","name":"repeat","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"AbnfStringLiteral","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfNumVal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfRuleName","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"AbnfOptionalGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadAbnfGrammarGrammar"),bz=Mn(()=>sz??(sz=pP('{"$type":"Grammar","isDeclared":true,"name":"RailroadEbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_SPECIAL_SEQUENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\?(?=[^?;]*[^?\\\\s;][^?;]*\\\\?)[^?;]*\\\\?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_ISO_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\(\\\\*[\\\\s\\\\S]*?\\\\*\\\\)/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadEbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-ebnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","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":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"="},{"$type":"Keyword","value":"::="}]},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"|"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":",","cardinality":"?"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerm","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"base","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"postfixes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerminal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfNonTerminal","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSpecial","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptional","returnType":{"$ref":"#/interfaces@11"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRepetition","returnType":{"$ref":"#/interfaces@12"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPostfix","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptionalPostfix","returnType":{"$ref":"#/interfaces@13"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfZeroOrMorePostfix","returnType":{"$ref":"#/interfaces@14"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOneOrMorePostfix","returnType":{"$ref":"#/interfaces@15"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfExceptionPostfix","returnType":{"$ref":"#/interfaces@16"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"except","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadEbnf","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfTerm","attributes":[{"$type":"TypeAttribute","name":"base","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false},{"$type":"TypeAttribute","name":"postfixes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfPostfix","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfNonTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfSpecial","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptional","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfRepetition","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptionalPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfZeroOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfOneOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfExceptionPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"except","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadEbnfGrammarGrammar"),Az=Mn(()=>oz??(oz=pP('{"$type":"Grammar","isDeclared":true,"name":"RailroadGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"RR_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Railroad","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","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":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadExpression","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSequenceExpr","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"sequence"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadChoiceExpr","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"choice"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOptionalExpr","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"optional"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOneOrMoreExpr","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"oneOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadZeroOrMoreExpr","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"zeroOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadTerminalExpr","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"terminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadNonTerminalExpr","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"nonterminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSpecialExpr","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"special"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"Railroad","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadExpression","attributes":[],"superTypes":[]},{"$type":"Interface","name":"RailroadSequenceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadChoiceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOptionalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOneOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadZeroOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadNonTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadSpecialExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadGrammarGrammar"),Cz=Mn(()=>lz??(lz=pP('{"$type":"Grammar","isDeclared":true,"name":"RailroadPegGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/#[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadPeg","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-peg-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","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":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"<-"},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegOrderedChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrefix","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"&"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"!"}}],"cardinality":"?"},{"$type":"Assignment","feature":"suffix","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSuffix","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrimary","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegLiteral","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegIdentifier","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegAny","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Assignment","feature":"dot","operator":"=","terminal":{"$type":"Keyword","value":"."}},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadPeg","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegOrderedChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegPrefix","attributes":[{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"suffix","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSuffix","attributes":[{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}},"isOptional":false},{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"PegPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"PegLiteral","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegIdentifier","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegGroup","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"PegAny","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"dot","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadPegGrammarGrammar"),Sz=Mn(()=>uz??(uz=pP('{"$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"),kz=Mn(()=>cz??(cz=pP('{"$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@14"},"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":"CLASS_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+:::[ \\\\t]*[A-Za-z_][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ICON_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+icon\\\\([\\\\w-]*(?::[\\\\w-]+)?\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DESC_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+##[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"QUOTED_NAME","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","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":"TerminalRule","name":"BARE_NAME","definition":{"$type":"RegexToken","regex":"/(?!:::|icon\\\\(|##)[^ \\\\t\\\\n\\\\r\\"\'](?:(?![ \\\\t]+:::[ \\\\t]*[A-Za-z_]|[ \\\\t]+icon\\\\(|[ \\\\t]+##)[^\\\\n\\\\r])*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"classAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"iconAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"descAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"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 *\\n * Supports both quoted labels (\\"my file\\") and bare labels (index.js).\\n * Annotations (:::class, icon(), ## description) are parsed directly into\\n * AST fields by the grammar. Value conversion for stripping quotes, extracting\\n * class names, icon names, and description text happens in valueConverter.ts.\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treeView keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}')),"TreeViewGrammarGrammar"),xz=Mn(()=>pz??(pz=pP('{"$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":"--\x3e"},"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},{"$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"),wz={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Nz={languageId:"cynefin",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},_z={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Iz={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Pz={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Oz={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Lz={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Dz={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Mz={languageId:"railroadAbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},jz={languageId:"railroadEbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Fz={languageId:"railroad",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Gz={languageId:"railroadPeg",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},zz={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Kz={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},qz={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Uz={AstReflection:Mn(()=>new dz,"AstReflection")},Bz={Grammar:Mn(()=>mz(),"Grammar"),LanguageMetaData:Mn(()=>wz,"LanguageMetaData"),parser:{}},Vz={Grammar:Mn(()=>hz(),"Grammar"),LanguageMetaData:Mn(()=>Nz,"LanguageMetaData"),parser:{}},Wz={Grammar:Mn(()=>yz(),"Grammar"),LanguageMetaData:Mn(()=>_z,"LanguageMetaData"),parser:{}},Hz={Grammar:Mn(()=>gz(),"Grammar"),LanguageMetaData:Mn(()=>Iz,"LanguageMetaData"),parser:{}},Yz={Grammar:Mn(()=>vz(),"Grammar"),LanguageMetaData:Mn(()=>Pz,"LanguageMetaData"),parser:{}},Xz={Grammar:Mn(()=>Tz(),"Grammar"),LanguageMetaData:Mn(()=>Oz,"LanguageMetaData"),parser:{}},Zz={Grammar:Mn(()=>$z(),"Grammar"),LanguageMetaData:Mn(()=>Lz,"LanguageMetaData"),parser:{}},Jz={Grammar:Mn(()=>Rz(),"Grammar"),LanguageMetaData:Mn(()=>Dz,"LanguageMetaData"),parser:{}},Qz={Grammar:Mn(()=>Ez(),"Grammar"),LanguageMetaData:Mn(()=>Mz,"LanguageMetaData"),parser:{}},eK={Grammar:Mn(()=>bz(),"Grammar"),LanguageMetaData:Mn(()=>jz,"LanguageMetaData"),parser:{}},tK={Grammar:Mn(()=>Az(),"Grammar"),LanguageMetaData:Mn(()=>Fz,"LanguageMetaData"),parser:{}},rK={Grammar:Mn(()=>Cz(),"Grammar"),LanguageMetaData:Mn(()=>Gz,"LanguageMetaData"),parser:{}},nK={Grammar:Mn(()=>Sz(),"Grammar"),LanguageMetaData:Mn(()=>zz,"LanguageMetaData"),parser:{}},aK={Grammar:Mn(()=>kz(),"Grammar"),LanguageMetaData:Mn(()=>Kz,"LanguageMetaData"),parser:{}},iK={Grammar:Mn(()=>xz(),"Grammar"),LanguageMetaData:Mn(()=>qz,"LanguageMetaData"),parser:{}},sK={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},oK=(Mn(Rt=class extends KN{runConverter(e,t,r){let n=this.runCommonConverter(e,t,r);return void 0===n&&(n=this.runCustomConverter(e,t,r)),void 0===n?super.runConverter(e,t,r):n}runCommonConverter(e,t,r){const n=sK[e.name];if(void 0===n)return;const a=n.exec(t);return null!==a?void 0!==a[1]?a[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==a[2]?a[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},"AbstractMermaidValueConverter"),Rt),lK=(Mn(Et=class extends oK{runCustomConverter(e,t,r){}},"CommonValueConverter"),Et),uK=(Mn(bt=class extends zN{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){const n=super.buildKeywordTokens(e,t,r);return n.forEach(e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}},"AbstractMermaidTokenBuilder"),bt);Mn(class extends uK{},"CommonTokenBuilder");
1
+ var e,t,r,n,a,i,s,o,l,u,c,p,d,f,m,h,y,g,v,T,$,R,E,b,A,C,S,k,x,w,N,_,I,P,O,L,D,M,j,F,G,z,K,q,U,B,V,W,H,Y,X,Z,J,Q,ee,te,re,ne,ae,ie,se,oe,le,ue,ce,pe,de,fe,me,he,ye,ge,ve,Te,$e,Re,Ee,be,Ae,Ce,Se,ke,xe,we,Ne,_e,Ie,Pe,Oe,Le,De,Me,je,Fe,Ge,ze,Ke,qe,Ue,Be,Ve,We,He,Ye,Xe,Ze,Je,Qe,et,tt,rt,nt,at,it,st,ot,lt,ut,ct,pt,dt,ft,mt,ht,yt,gt,vt,Tt,$t,Rt,Et,bt,At,Ct,St,kt,xt,wt,Nt,_t,It,Pt,Ot,Lt,Dt,Mt,jt,Ft,Gt,zt,Kt,qt,Ut,Bt,Vt,Wt,Ht,Yt,Xt=Object.defineProperty,Zt=(e,t,r)=>((e,t,r)=>t in e?Xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);import{_ as Jt}from"./index-CA5N4n3x.js";var Qt,er,tr,rr,nr,ar,ir,sr,or,lr,ur,cr,pr,dr,fr,mr,hr,yr,gr,vr,Tr,$r,Rr,Er,br,Ar,Cr,Sr,kr,xr,wr,Nr,_r,Ir,Pr,Or,Lr,Dr,Mr,jr,Fr,Gr,zr,Kr,qr,Ur,Br,Vr,Wr,Hr,Yr,Xr,Zr,Jr,Qr,en,tn,rn,nn,an,sn,on,ln,un,cn,pn,dn,fn,mn,hn,yn,gn,vn,Tn,$n,Rn,En,bn,An,Cn,Sn,kn,xn,wn,Nn,_n=Object.create,In=Object.defineProperty,Pn=Object.getOwnPropertyDescriptor,On=Object.getOwnPropertyNames,Ln=Object.getPrototypeOf,Dn=Object.prototype.hasOwnProperty,Mn=(e,t)=>In(e,"name",{value:t,configurable:!0}),jn=(e,t)=>function(){return t||(0,e[On(e)[0]])((t={exports:{}}).exports,t),t.exports},Fn=(e,t)=>{for(var r in t)In(e,r,{get:t[r],enumerable:!0})},Gn=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of On(t))Dn.call(e,a)||a===r||In(e,a,{get:()=>t[a],enumerable:!(n=Pn(t,a))||n.enumerable});return e},zn=(e,t,r)=>(Gn(e,t,"default"),r),Kn=(e,t,r)=>(r=null!=e?_n(Ln(e)):{},Gn(In(r,"default",{value:e,enumerable:!0}),e)),qn=e=>Gn(In({},"__esModule",{value:!0}),e),Un={};Fn(Un,{AnnotatedTextEdit:()=>Rr,ChangeAnnotation:()=>Tr,ChangeAnnotationIdentifier:()=>$r,CodeAction:()=>an,CodeActionContext:()=>nn,CodeActionKind:()=>tn,CodeActionTriggerKind:()=>rn,CodeDescription:()=>hr,CodeLens:()=>sn,Color:()=>or,ColorInformation:()=>lr,ColorPresentation:()=>ur,Command:()=>gr,CompletionItem:()=>Kr,CompletionItemKind:()=>Dr,CompletionItemLabelDetails:()=>zr,CompletionItemTag:()=>jr,CompletionList:()=>qr,CreateFile:()=>br,DeleteFile:()=>Cr,Diagnostic:()=>yr,DiagnosticRelatedInformation:()=>dr,DiagnosticSeverity:()=>fr,DiagnosticTag:()=>mr,DocumentHighlight:()=>Yr,DocumentHighlightKind:()=>Hr,DocumentLink:()=>ln,DocumentSymbol:()=>en,DocumentUri:()=>Qt,EOL:()=>kn,FoldingRange:()=>pr,FoldingRangeKind:()=>cr,FormattingOptions:()=>on,Hover:()=>Br,InlayHint:()=>Tn,InlayHintKind:()=>gn,InlayHintLabelPart:()=>vn,InlineCompletionContext:()=>Cn,InlineCompletionItem:()=>Rn,InlineCompletionList:()=>En,InlineCompletionTriggerKind:()=>bn,InlineValueContext:()=>yn,InlineValueEvaluatableExpression:()=>hn,InlineValueText:()=>fn,InlineValueVariableLookup:()=>mn,InsertReplaceEdit:()=>Fr,InsertTextFormat:()=>Mr,InsertTextMode:()=>Gr,Location:()=>ir,LocationLink:()=>sr,MarkedString:()=>Ur,MarkupContent:()=>Lr,MarkupKind:()=>Or,OptionalVersionedTextDocumentIdentifier:()=>Ir,ParameterInformation:()=>Vr,Position:()=>nr,Range:()=>ar,RenameFile:()=>Ar,SelectedCompletionInfo:()=>An,SelectionRange:()=>un,SemanticTokenModifiers:()=>pn,SemanticTokenTypes:()=>cn,SemanticTokens:()=>dn,SignatureInformation:()=>Wr,StringValue:()=>$n,SymbolInformation:()=>Jr,SymbolKind:()=>Xr,SymbolTag:()=>Zr,TextDocument:()=>xn,TextDocumentEdit:()=>Er,TextDocumentIdentifier:()=>Nr,TextDocumentItem:()=>Pr,TextEdit:()=>vr,URI:()=>er,VersionedTextDocumentIdentifier:()=>_r,WorkspaceChange:()=>wr,WorkspaceEdit:()=>Sr,WorkspaceFolder:()=>Sn,WorkspaceSymbol:()=>Qr,integer:()=>tr,uinteger:()=>rr});var Bn,Vn,Wn=(Bn={"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var e,t,r,n,a,i,s,o,l,u,c,p,d,f,m,h,y;!function(e){function t(e){return"string"==typeof e}Mn(t,"is"),e.is=t}(Qt||(Qt={})),function(e){function t(e){return"string"==typeof e}Mn(t,"is"),e.is=t}(er||(er={})),function(e){function t(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,Mn(t,"is"),e.is=t}(tr||(tr={})),function(e){function t(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=0,e.MAX_VALUE=2147483647,Mn(t,"is"),e.is=t}(rr||(rr={})),function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=rr.MAX_VALUE),t===Number.MAX_VALUE&&(t=rr.MAX_VALUE),{line:e,character:t}}function r(e){let t=e;return Nn.objectLiteral(t)&&Nn.uinteger(t.line)&&Nn.uinteger(t.character)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(nr||(nr={})),function(e){function t(e,t,r,n){if(Nn.uinteger(e)&&Nn.uinteger(t)&&Nn.uinteger(r)&&Nn.uinteger(n))return{start:nr.create(e,t),end:nr.create(r,n)};if(nr.is(e)&&nr.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${r}, ${n}]`)}function r(e){let t=e;return Nn.objectLiteral(t)&&nr.is(t.start)&&nr.is(t.end)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(ar||(ar={})),function(e){function t(e,t){return{uri:e,range:t}}function r(e){let t=e;return Nn.objectLiteral(t)&&ar.is(t.range)&&(Nn.string(t.uri)||Nn.undefined(t.uri))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(ir||(ir={})),function(e){function t(e,t,r,n){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:n}}function r(e){let t=e;return Nn.objectLiteral(t)&&ar.is(t.targetRange)&&Nn.string(t.targetUri)&&ar.is(t.targetSelectionRange)&&(ar.is(t.originSelectionRange)||Nn.undefined(t.originSelectionRange))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(sr||(sr={})),function(e){function t(e,t,r,n){return{red:e,green:t,blue:r,alpha:n}}function r(e){const t=e;return Nn.objectLiteral(t)&&Nn.numberRange(t.red,0,1)&&Nn.numberRange(t.green,0,1)&&Nn.numberRange(t.blue,0,1)&&Nn.numberRange(t.alpha,0,1)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(or||(or={})),function(e){function t(e,t){return{range:e,color:t}}function r(e){const t=e;return Nn.objectLiteral(t)&&ar.is(t.range)&&or.is(t.color)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(lr||(lr={})),function(e){function t(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}}function r(e){const t=e;return Nn.objectLiteral(t)&&Nn.string(t.label)&&(Nn.undefined(t.textEdit)||vr.is(t))&&(Nn.undefined(t.additionalTextEdits)||Nn.typedArray(t.additionalTextEdits,vr.is))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(ur||(ur={})),(a=cr||(cr={})).Comment="comment",a.Imports="imports",a.Region="region",function(e){function t(e,t,r,n,a,i){const s={startLine:e,endLine:t};return Nn.defined(r)&&(s.startCharacter=r),Nn.defined(n)&&(s.endCharacter=n),Nn.defined(a)&&(s.kind=a),Nn.defined(i)&&(s.collapsedText=i),s}function r(e){const t=e;return Nn.objectLiteral(t)&&Nn.uinteger(t.startLine)&&Nn.uinteger(t.startLine)&&(Nn.undefined(t.startCharacter)||Nn.uinteger(t.startCharacter))&&(Nn.undefined(t.endCharacter)||Nn.uinteger(t.endCharacter))&&(Nn.undefined(t.kind)||Nn.string(t.kind))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(pr||(pr={})),function(e){function t(e,t){return{location:e,message:t}}function r(e){let t=e;return Nn.defined(t)&&ir.is(t.location)&&Nn.string(t.message)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(dr||(dr={})),(i=fr||(fr={})).Error=1,i.Warning=2,i.Information=3,i.Hint=4,(s=mr||(mr={})).Unnecessary=1,s.Deprecated=2,function(e){function t(e){const t=e;return Nn.objectLiteral(t)&&Nn.string(t.href)}Mn(t,"is"),e.is=t}(hr||(hr={})),function(e){function t(e,t,r,n,a,i){let s={range:e,message:t};return Nn.defined(r)&&(s.severity=r),Nn.defined(n)&&(s.code=n),Nn.defined(a)&&(s.source=a),Nn.defined(i)&&(s.relatedInformation=i),s}function r(e){var t;let r=e;return Nn.defined(r)&&ar.is(r.range)&&Nn.string(r.message)&&(Nn.number(r.severity)||Nn.undefined(r.severity))&&(Nn.integer(r.code)||Nn.string(r.code)||Nn.undefined(r.code))&&(Nn.undefined(r.codeDescription)||Nn.string(null===(t=r.codeDescription)||void 0===t?void 0:t.href))&&(Nn.string(r.source)||Nn.undefined(r.source))&&(Nn.undefined(r.relatedInformation)||Nn.typedArray(r.relatedInformation,dr.is))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(yr||(yr={})),function(e){function t(e,t,...r){let n={title:e,command:t};return Nn.defined(r)&&r.length>0&&(n.arguments=r),n}function r(e){let t=e;return Nn.defined(t)&&Nn.string(t.title)&&Nn.string(t.command)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(gr||(gr={})),function(e){function t(e,t){return{range:e,newText:t}}function r(e,t){return{range:{start:e,end:e},newText:t}}function n(e){return{range:e,newText:""}}function a(e){const t=e;return Nn.objectLiteral(t)&&Nn.string(t.newText)&&ar.is(t.range)}Mn(t,"replace"),e.replace=t,Mn(r,"insert"),e.insert=r,Mn(n,"del"),e.del=n,Mn(a,"is"),e.is=a}(vr||(vr={})),function(e){function t(e,t,r){const n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==r&&(n.description=r),n}function r(e){const t=e;return Nn.objectLiteral(t)&&Nn.string(t.label)&&(Nn.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Nn.string(t.description)||void 0===t.description)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Tr||(Tr={})),function(e){function t(e){const t=e;return Nn.string(t)}Mn(t,"is"),e.is=t}($r||($r={})),function(e){function t(e,t,r){return{range:e,newText:t,annotationId:r}}function r(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}}function n(e,t){return{range:e,newText:"",annotationId:t}}function a(e){const t=e;return vr.is(t)&&(Tr.is(t.annotationId)||$r.is(t.annotationId))}Mn(t,"replace"),e.replace=t,Mn(r,"insert"),e.insert=r,Mn(n,"del"),e.del=n,Mn(a,"is"),e.is=a}(Rr||(Rr={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function r(e){let t=e;return Nn.defined(t)&&Ir.is(t.textDocument)&&Array.isArray(t.edits)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Er||(Er={})),function(e){function t(e,t,r){let n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==r&&(n.annotationId=r),n}function r(e){let t=e;return t&&"create"===t.kind&&Nn.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Nn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Nn.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||$r.is(t.annotationId))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(br||(br={})),function(e){function t(e,t,r,n){let a={kind:"rename",oldUri:e,newUri:t};return void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(a.options=r),void 0!==n&&(a.annotationId=n),a}function r(e){let t=e;return t&&"rename"===t.kind&&Nn.string(t.oldUri)&&Nn.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Nn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Nn.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||$r.is(t.annotationId))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Ar||(Ar={})),function(e){function t(e,t,r){let n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==r&&(n.annotationId=r),n}function r(e){let t=e;return t&&"delete"===t.kind&&Nn.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Nn.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Nn.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||$r.is(t.annotationId))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Cr||(Cr={})),function(e){function t(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>Nn.string(e.kind)?br.is(e)||Ar.is(e)||Cr.is(e):Er.is(e)))}Mn(t,"is"),e.is=t}(Sr||(Sr={})),Mn(e=class{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(void 0===r?n=vr.insert(e,t):$r.is(r)?(a=r,n=Rr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=Rr.insert(e,t,a)),this.edits.push(n),void 0!==a)return a}replace(e,t,r){let n,a;if(void 0===r?n=vr.replace(e,t):$r.is(r)?(a=r,n=Rr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=Rr.replace(e,t,a)),this.edits.push(n),void 0!==a)return a}delete(e,t){let r,n;if(void 0===t?r=vr.del(e):$r.is(t)?(n=t,r=Rr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=Rr.del(e,n)),this.edits.push(r),void 0!==n)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}},"TextEditChangeImpl"),kr=e,Mn(t=class{constructor(e){this._annotations=void 0===e?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($r.is(e)?r=e:(r=this.nextId(),t=e),void 0!==this._annotations[r])throw new Error(`Id ${r} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},"ChangeAnnotations"),xr=t,Mn(r=class{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new xr(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(Er.is(e)){const t=new kr(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new kr(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Ir.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const e=[],n={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(n),r=new kr(e,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}{if(this.initChanges(),void 0===this._workspaceEdit.changes)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 kr(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new xr,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,a,i;if(Tr.is(t)||$r.is(t)?n=t:r=t,void 0===n?a=br.create(e,r):(i=$r.is(n)?n:this._changeAnnotations.manage(n),a=br.create(e,r,i)),this._workspaceEdit.documentChanges.push(a),void 0!==i)return i}renameFile(e,t,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let a,i,s;if(Tr.is(r)||$r.is(r)?a=r:n=r,void 0===a?i=Ar.create(e,t,n):(s=$r.is(a)?a:this._changeAnnotations.manage(a),i=Ar.create(e,t,n,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}deleteFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,a,i;if(Tr.is(t)||$r.is(t)?n=t:r=t,void 0===n?a=Cr.create(e,r):(i=$r.is(n)?n:this._changeAnnotations.manage(n),a=Cr.create(e,r,i)),this._workspaceEdit.documentChanges.push(a),void 0!==i)return i}},"WorkspaceChange"),wr=r,function(e){function t(e){return{uri:e}}function r(e){let t=e;return Nn.defined(t)&&Nn.string(t.uri)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Nr||(Nr={})),function(e){function t(e,t){return{uri:e,version:t}}function r(e){let t=e;return Nn.defined(t)&&Nn.string(t.uri)&&Nn.integer(t.version)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(_r||(_r={})),function(e){function t(e,t){return{uri:e,version:t}}function r(e){let t=e;return Nn.defined(t)&&Nn.string(t.uri)&&(null===t.version||Nn.integer(t.version))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Ir||(Ir={})),function(e){function t(e,t,r,n){return{uri:e,languageId:t,version:r,text:n}}function r(e){let t=e;return Nn.defined(t)&&Nn.string(t.uri)&&Nn.string(t.languageId)&&Nn.integer(t.version)&&Nn.string(t.text)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Pr||(Pr={})),function(e){function t(t){const r=t;return r===e.PlainText||r===e.Markdown}e.PlainText="plaintext",e.Markdown="markdown",Mn(t,"is"),e.is=t}(Or||(Or={})),function(e){function t(e){const t=e;return Nn.objectLiteral(e)&&Or.is(t.kind)&&Nn.string(t.value)}Mn(t,"is"),e.is=t}(Lr||(Lr={})),(o=Dr||(Dr={})).Text=1,o.Method=2,o.Function=3,o.Constructor=4,o.Field=5,o.Variable=6,o.Class=7,o.Interface=8,o.Module=9,o.Property=10,o.Unit=11,o.Value=12,o.Enum=13,o.Keyword=14,o.Snippet=15,o.Color=16,o.File=17,o.Reference=18,o.Folder=19,o.EnumMember=20,o.Constant=21,o.Struct=22,o.Event=23,o.Operator=24,o.TypeParameter=25,(l=Mr||(Mr={})).PlainText=1,l.Snippet=2,(jr||(jr={})).Deprecated=1,function(e){function t(e,t,r){return{newText:e,insert:t,replace:r}}function r(e){const t=e;return t&&Nn.string(t.newText)&&ar.is(t.insert)&&ar.is(t.replace)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Fr||(Fr={})),(u=Gr||(Gr={})).asIs=1,u.adjustIndentation=2,function(e){function t(e){const t=e;return t&&(Nn.string(t.detail)||void 0===t.detail)&&(Nn.string(t.description)||void 0===t.description)}Mn(t,"is"),e.is=t}(zr||(zr={})),function(e){function t(e){return{label:e}}Mn(t,"create"),e.create=t}(Kr||(Kr={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}Mn(t,"create"),e.create=t}(qr||(qr={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function r(e){const t=e;return Nn.string(t)||Nn.objectLiteral(t)&&Nn.string(t.language)&&Nn.string(t.value)}Mn(t,"fromPlainText"),e.fromPlainText=t,Mn(r,"is"),e.is=r}(Ur||(Ur={})),function(e){function t(e){let t=e;return!!t&&Nn.objectLiteral(t)&&(Lr.is(t.contents)||Ur.is(t.contents)||Nn.typedArray(t.contents,Ur.is))&&(void 0===e.range||ar.is(e.range))}Mn(t,"is"),e.is=t}(Br||(Br={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}Mn(t,"create"),e.create=t}(Vr||(Vr={})),function(e){function t(e,t,...r){let n={label:e};return Nn.defined(t)&&(n.documentation=t),Nn.defined(r)?n.parameters=r:n.parameters=[],n}Mn(t,"create"),e.create=t}(Wr||(Wr={})),(c=Hr||(Hr={})).Text=1,c.Read=2,c.Write=3,function(e){function t(e,t){let r={range:e};return Nn.number(t)&&(r.kind=t),r}Mn(t,"create"),e.create=t}(Yr||(Yr={})),(p=Xr||(Xr={})).File=1,p.Module=2,p.Namespace=3,p.Package=4,p.Class=5,p.Method=6,p.Property=7,p.Field=8,p.Constructor=9,p.Enum=10,p.Interface=11,p.Function=12,p.Variable=13,p.Constant=14,p.String=15,p.Number=16,p.Boolean=17,p.Array=18,p.Object=19,p.Key=20,p.Null=21,p.EnumMember=22,p.Struct=23,p.Event=24,p.Operator=25,p.TypeParameter=26,(Zr||(Zr={})).Deprecated=1,function(e){function t(e,t,r,n,a){let i={name:e,kind:t,location:{uri:n,range:r}};return a&&(i.containerName=a),i}Mn(t,"create"),e.create=t}(Jr||(Jr={})),function(e){function t(e,t,r,n){return void 0!==n?{name:e,kind:t,location:{uri:r,range:n}}:{name:e,kind:t,location:{uri:r}}}Mn(t,"create"),e.create=t}(Qr||(Qr={})),function(e){function t(e,t,r,n,a,i){let s={name:e,detail:t,kind:r,range:n,selectionRange:a};return void 0!==i&&(s.children=i),s}function r(e){let t=e;return t&&Nn.string(t.name)&&Nn.number(t.kind)&&ar.is(t.range)&&ar.is(t.selectionRange)&&(void 0===t.detail||Nn.string(t.detail))&&(void 0===t.deprecated||Nn.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(en||(en={})),(d=tn||(tn={})).Empty="",d.QuickFix="quickfix",d.Refactor="refactor",d.RefactorExtract="refactor.extract",d.RefactorInline="refactor.inline",d.RefactorRewrite="refactor.rewrite",d.Source="source",d.SourceOrganizeImports="source.organizeImports",d.SourceFixAll="source.fixAll",(f=rn||(rn={})).Invoked=1,f.Automatic=2,function(e){function t(e,t,r){let n={diagnostics:e};return null!=t&&(n.only=t),null!=r&&(n.triggerKind=r),n}function r(e){let t=e;return Nn.defined(t)&&Nn.typedArray(t.diagnostics,yr.is)&&(void 0===t.only||Nn.typedArray(t.only,Nn.string))&&(void 0===t.triggerKind||t.triggerKind===rn.Invoked||t.triggerKind===rn.Automatic)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(nn||(nn={})),function(e){function t(e,t,r){let n={title:e},a=!0;return"string"==typeof t?(a=!1,n.kind=t):gr.is(t)?n.command=t:n.edit=t,a&&void 0!==r&&(n.kind=r),n}function r(e){let t=e;return t&&Nn.string(t.title)&&(void 0===t.diagnostics||Nn.typedArray(t.diagnostics,yr.is))&&(void 0===t.kind||Nn.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||gr.is(t.command))&&(void 0===t.isPreferred||Nn.boolean(t.isPreferred))&&(void 0===t.edit||Sr.is(t.edit))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(an||(an={})),function(e){function t(e,t){let r={range:e};return Nn.defined(t)&&(r.data=t),r}function r(e){let t=e;return Nn.defined(t)&&ar.is(t.range)&&(Nn.undefined(t.command)||gr.is(t.command))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(sn||(sn={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function r(e){let t=e;return Nn.defined(t)&&Nn.uinteger(t.tabSize)&&Nn.boolean(t.insertSpaces)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(on||(on={})),function(e){function t(e,t,r){return{range:e,target:t,data:r}}function r(e){let t=e;return Nn.defined(t)&&ar.is(t.range)&&(Nn.undefined(t.target)||Nn.string(t.target))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(ln||(ln={})),function(e){function t(e,t){return{range:e,parent:t}}function r(t){let r=t;return Nn.objectLiteral(r)&&ar.is(r.range)&&(void 0===r.parent||e.is(r.parent))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(un||(un={})),(m=cn||(cn={})).namespace="namespace",m.type="type",m.class="class",m.enum="enum",m.interface="interface",m.struct="struct",m.typeParameter="typeParameter",m.parameter="parameter",m.variable="variable",m.property="property",m.enumMember="enumMember",m.event="event",m.function="function",m.method="method",m.macro="macro",m.keyword="keyword",m.modifier="modifier",m.comment="comment",m.string="string",m.number="number",m.regexp="regexp",m.operator="operator",m.decorator="decorator",(h=pn||(pn={})).declaration="declaration",h.definition="definition",h.readonly="readonly",h.static="static",h.deprecated="deprecated",h.abstract="abstract",h.async="async",h.modification="modification",h.documentation="documentation",h.defaultLibrary="defaultLibrary",function(e){function t(e){const t=e;return Nn.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}Mn(t,"is"),e.is=t}(dn||(dn={})),function(e){function t(e,t){return{range:e,text:t}}function r(e){const t=e;return null!=t&&ar.is(t.range)&&Nn.string(t.text)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(fn||(fn={})),function(e){function t(e,t,r){return{range:e,variableName:t,caseSensitiveLookup:r}}function r(e){const t=e;return null!=t&&ar.is(t.range)&&Nn.boolean(t.caseSensitiveLookup)&&(Nn.string(t.variableName)||void 0===t.variableName)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(mn||(mn={})),function(e){function t(e,t){return{range:e,expression:t}}function r(e){const t=e;return null!=t&&ar.is(t.range)&&(Nn.string(t.expression)||void 0===t.expression)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(hn||(hn={})),function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}function r(e){const t=e;return Nn.defined(t)&&ar.is(e.stoppedLocation)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(yn||(yn={})),function(e){function t(e){return 1===e||2===e}e.Type=1,e.Parameter=2,Mn(t,"is"),e.is=t}(gn||(gn={})),function(e){function t(e){return{value:e}}function r(e){const t=e;return Nn.objectLiteral(t)&&(void 0===t.tooltip||Nn.string(t.tooltip)||Lr.is(t.tooltip))&&(void 0===t.location||ir.is(t.location))&&(void 0===t.command||gr.is(t.command))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(vn||(vn={})),function(e){function t(e,t,r){const n={position:e,label:t};return void 0!==r&&(n.kind=r),n}function r(e){const t=e;return Nn.objectLiteral(t)&&nr.is(t.position)&&(Nn.string(t.label)||Nn.typedArray(t.label,vn.is))&&(void 0===t.kind||gn.is(t.kind))&&void 0===t.textEdits||Nn.typedArray(t.textEdits,vr.is)&&(void 0===t.tooltip||Nn.string(t.tooltip)||Lr.is(t.tooltip))&&(void 0===t.paddingLeft||Nn.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Nn.boolean(t.paddingRight))}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(Tn||(Tn={})),function(e){function t(e){return{kind:"snippet",value:e}}Mn(t,"createSnippet"),e.createSnippet=t}($n||($n={})),function(e){function t(e,t,r,n){return{insertText:e,filterText:t,range:r,command:n}}Mn(t,"create"),e.create=t}(Rn||(Rn={})),function(e){function t(e){return{items:e}}Mn(t,"create"),e.create=t}(En||(En={})),(y=bn||(bn={})).Invoked=0,y.Automatic=1,function(e){function t(e,t){return{range:e,text:t}}Mn(t,"create"),e.create=t}(An||(An={})),function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}Mn(t,"create"),e.create=t}(Cn||(Cn={})),function(e){function t(e){const t=e;return Nn.objectLiteral(t)&&er.is(t.uri)&&Nn.string(t.name)}Mn(t,"is"),e.is=t}(Sn||(Sn={})),kn=["\n","\r\n","\r"],function(e){function t(e,t,r,n){return new wn(e,t,r,n)}function r(e){let t=e;return!!(Nn.defined(t)&&Nn.string(t.uri)&&(Nn.undefined(t.languageId)||Nn.string(t.languageId))&&Nn.uinteger(t.lineCount)&&Nn.func(t.getText)&&Nn.func(t.positionAt)&&Nn.func(t.offsetAt))}function n(e,t){let r=e.getText(),n=a(t,(e,t)=>{let r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r}),i=r.length;for(let a=n.length-1;a>=0;a--){let t=n[a],s=e.offsetAt(t.range.start),o=e.offsetAt(t.range.end);if(!(o<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+t.newText+r.substring(o,r.length),i=s}return r}function a(e,t){if(e.length<=1)return e;const r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);a(n,t),a(i,t);let s=0,o=0,l=0;for(;s<n.length&&o<i.length;){let r=t(n[s],i[o]);e[l++]=r<=0?n[s++]:i[o++]}for(;s<n.length;)e[l++]=n[s++];for(;o<i.length;)e[l++]=i[o++];return e}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r,Mn(n,"applyEdits"),e.applyEdits=n,Mn(a,"mergeSort")}(xn||(xn={})),Mn(n=class{constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,r=!0;for(let n=0;n<t.length;n++){r&&(e.push(n),r=!1);let a=t.charAt(n);r="\r"===a||"\n"===a,"\r"===a&&n+1<t.length&&"\n"===t.charAt(n+1)&&n++}r&&t.length>0&&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(0===n)return nr.create(0,e);for(;r<n;){let a=Math.floor((r+n)/2);t[a]>e?n=a:r=a+1}let a=r-1;return nr.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<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,n),r)}get lineCount(){return this.getLineOffsets().length}},"FullTextDocument"),wn=n,function(e){const t=Object.prototype.toString;function r(e){return void 0!==e}function n(e){return void 0===e}function a(e){return!0===e||!1===e}function i(e){return"[object String]"===t.call(e)}function s(e){return"[object Number]"===t.call(e)}function o(e,r,n){return"[object Number]"===t.call(e)&&r<=e&&e<=n}function l(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647}function u(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647}function c(e){return"[object Function]"===t.call(e)}function p(e){return null!==e&&"object"==typeof e}function d(e,t){return Array.isArray(e)&&e.every(t)}Mn(r,"defined"),e.defined=r,Mn(n,"undefined"),e.undefined=n,Mn(a,"boolean"),e.boolean=a,Mn(i,"string"),e.string=i,Mn(s,"number"),e.number=s,Mn(o,"numberRange"),e.numberRange=o,Mn(l,"integer"),e.integer=l,Mn(u,"uinteger"),e.uinteger=u,Mn(c,"func"),e.func=c,Mn(p,"objectLiteral"),e.objectLiteral=p,Mn(d,"typedArray"),e.typedArray=d}(Nn||(Nn={}))}},function(){return Bn&&(Vn=(0,Bn[On(Bn)[0]])(Bn=0)),Vn}),Hn=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){var t;function r(){if(void 0===t)throw new Error("No runtime abstraction layer installed");return t}Object.defineProperty(e,"__esModule",{value:!0}),Mn(r,"RAL"),function(e){function r(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");t=e}Mn(r,"install"),e.install=r}(r||(r={})),e.default=r}}),Yn=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(e){function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function n(e){return"number"==typeof e||e instanceof Number}function a(e){return e instanceof Error}function i(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,Mn(t,"boolean"),e.boolean=t,Mn(r,"string"),e.string=r,Mn(n,"number"),e.number=n,Mn(a,"error"),e.error=a,Mn(i,"func"),e.func=i,Mn(s,"array"),e.array=s,Mn(o,"stringArray"),e.stringArray=o}}),Xn=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var n,a=Hn();!function(e){const t={dispose(){}};e.None=function(){return t}}(n||(e.Event=n={}));var i=(Mn(t=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:Mn(()=>this.remove(e,t),"dispose")})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let n=0,a=this._callbacks.length;n<a;n++)if(this._callbacks[n]===e){if(this._contexts[n]===t)return this._callbacks.splice(n,1),void this._contexts.splice(n,1);r=!0}if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],r=this._callbacks.slice(0),n=this._contexts.slice(0);for(let s=0,o=r.length;s<o;s++)try{t.push(r[s].apply(n[s],e))}catch(i){(0,a.default)().console.error(i)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}},"CallbackList"),t),s=(Mn(r=class{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const a={dispose:Mn(()=>{this._callbacks&&(this._callbacks.remove(e,t),a.dispose=r._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(n)&&n.push(a),a}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}},"Emitter"),r);e.Emitter=s,s._noop=function(){}}}),Zn=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var n,a=Hn(),i=Yn(),s=Xn();!function(e){function t(t){const r=t;return r&&(r===e.None||r===e.Cancelled||i.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:s.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s.Event.None}),Mn(t,"is"),e.is=t}(n||(e.CancellationToken=n={}));var o=Object.freeze(function(e,t){const r=(0,a.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}}),l=(Mn(t=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new s.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},"MutableToken"),t),u=(Mn(r=class{get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=n.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=n.None}},"CancellationTokenSource"),r);e.CancellationTokenSource=u}}),Jn=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){var t,r,n,a,i,s,o,l,u,c,p,d,f,m,h,y,g,v,T,$,R,E,b,A,C;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 S,k,x=Yn();(k=S||(e.ErrorCodes=S={})).ParseError=-32700,k.InvalidRequest=-32600,k.MethodNotFound=-32601,k.InvalidParams=-32602,k.InternalError=-32603,k.jsonrpcReservedErrorRangeStart=-32099,k.serverErrorStart=-32099,k.MessageWriteError=-32099,k.MessageReadError=-32098,k.PendingResponseRejected=-32097,k.ConnectionInactive=-32096,k.ServerNotInitialized=-32002,k.UnknownErrorCode=-32001,k.jsonrpcReservedErrorRangeEnd=-32e3,k.serverErrorEnd=-32e3;var w=(t=class extends Error{constructor(e,r,n){super(r),this.code=x.number(e)?e:S.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,t.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}},Mn(t,"ResponseError"),t);e.ResponseError=w;var N=(Mn(r=class{constructor(e){this.kind=e}static is(e){return e===r.auto||e===r.byName||e===r.byPosition}toString(){return this.kind}},"ParameterStructures"),r);e.ParameterStructures=N,N.auto=new N("auto"),N.byPosition=new N("byPosition"),N.byName=new N("byName");var _=(Mn(n=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return N.auto}},"AbstractMessageSignature"),n);e.AbstractMessageSignature=_;var I=(Mn(a=class extends _{constructor(e){super(e,0)}},"RequestType0"),a);e.RequestType0=I;var P=(Mn(i=class extends _{constructor(e,t=N.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},"RequestType"),i);e.RequestType=P;var O=(Mn(s=class extends _{constructor(e,t=N.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},"RequestType1"),s);e.RequestType1=O;var L=(Mn(o=class extends _{constructor(e){super(e,2)}},"RequestType2"),o);e.RequestType2=L;var D=(Mn(l=class extends _{constructor(e){super(e,3)}},"RequestType3"),l);e.RequestType3=D;var M=(Mn(u=class extends _{constructor(e){super(e,4)}},"RequestType4"),u);e.RequestType4=M;var j=(Mn(c=class extends _{constructor(e){super(e,5)}},"RequestType5"),c);e.RequestType5=j;var F=(Mn(p=class extends _{constructor(e){super(e,6)}},"RequestType6"),p);e.RequestType6=F;var G=(Mn(d=class extends _{constructor(e){super(e,7)}},"RequestType7"),d);e.RequestType7=G;var z=(Mn(f=class extends _{constructor(e){super(e,8)}},"RequestType8"),f);e.RequestType8=z;var K=(Mn(m=class extends _{constructor(e){super(e,9)}},"RequestType9"),m);e.RequestType9=K;var q=(Mn(h=class extends _{constructor(e,t=N.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},"NotificationType"),h);e.NotificationType=q;var U=(Mn(y=class extends _{constructor(e){super(e,0)}},"NotificationType0"),y);e.NotificationType0=U;var B=(Mn(g=class extends _{constructor(e,t=N.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},"NotificationType1"),g);e.NotificationType1=B;var V=(Mn(v=class extends _{constructor(e){super(e,2)}},"NotificationType2"),v);e.NotificationType2=V;var W=(Mn(T=class extends _{constructor(e){super(e,3)}},"NotificationType3"),T);e.NotificationType3=W;var H=(Mn($=class extends _{constructor(e){super(e,4)}},"NotificationType4"),$);e.NotificationType4=H;var Y=(Mn(R=class extends _{constructor(e){super(e,5)}},"NotificationType5"),R);e.NotificationType5=Y;var X=(Mn(E=class extends _{constructor(e){super(e,6)}},"NotificationType6"),E);e.NotificationType6=X;var Z=(Mn(b=class extends _{constructor(e){super(e,7)}},"NotificationType7"),b);e.NotificationType7=Z;var J=(Mn(A=class extends _{constructor(e){super(e,8)}},"NotificationType8"),A);e.NotificationType8=J;var Q,ee=(Mn(C=class extends _{constructor(e){super(e,9)}},"NotificationType9"),C);e.NotificationType9=ee,function(e){function t(e){const t=e;return t&&x.string(t.method)&&(x.string(t.id)||x.number(t.id))}function r(e){const t=e;return t&&x.string(t.method)&&void 0===e.id}function n(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(x.string(t.id)||x.number(t.id)||null===t.id)}Mn(t,"isRequest"),e.isRequest=t,Mn(r,"isNotification"),e.isNotification=r,Mn(n,"isResponse"),e.isResponse=n}(Q||(e.Message=Q={}))}}),Qn=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){var t,r,n,a,i;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0,(i=a||(e.Touch=a={})).None=0,i.First=1,i.AsOld=i.First,i.Last=2,i.AsNew=i.Last;var s=(t=class{constructor(){this[n]="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(){var e;return null==(e=this._head)?void 0:e.value}get last(){var e;return null==(e=this._tail)?void 0:e.value}has(e){return this._map.has(e)}get(e,t=a.None){const r=this._map.get(e);if(r)return t!==a.None&&this.touch(r,t),r.value}set(e,t,r=a.None){let n=this._map.get(e);if(n)n.value=t,r!==a.None&&this.touch(n,r);else{switch(n={key:e,value:t,next:void 0,previous:void 0},r){case a.None:this.addItemLast(n);break;case a.First:this.addItemFirst(n);break;case a.Last:default:this.addItemLast(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const r=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:Mn(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}},"next")};return r}values(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:Mn(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}},"next")};return r}entries(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:Mn(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}},"next")};return r}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===a.First||t===a.Last)if(t===a.First){if(e===this._head)return;const t=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(t.previous=r,r.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===a.Last){if(e===this._tail)return;const t=e.next,r=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=r,r.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}},Mn(t,"LinkedMap"),t);e.LinkedMap=s;var o=(Mn(r=class extends s{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=a.AsNew){return super.get(e,t)}peek(e){return super.get(e,a.None)}set(e,t){return super.set(e,t,a.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}},"LRUCache"),r);e.LRUCache=o}}),ea=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0,function(e){function t(e){return{dispose:e}}Mn(t,"create"),e.create=t}(t||(e.Disposable=t={}))}}),ta=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){var t,r,n,a;Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var i,s,o=Zn();(s=i||(i={})).Continue=0,s.Cancelled=1;var l=(Mn(t=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=i.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const r=this.buffers.get(t);if(void 0===r)return;const n=new Int32Array(r,0,1);Atomics.store(n,0,i.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}},"SharedArraySenderStrategy"),t);e.SharedArraySenderStrategy=l;var u=(Mn(r=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===i.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},"SharedArrayBufferCancellationToken"),r),c=(Mn(n=class{constructor(e){this.token=new u(e)}cancel(){}dispose(){}},"SharedArrayBufferCancellationTokenSource"),n),p=(Mn(a=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new o.CancellationTokenSource:new c(t)}},"SharedArrayReceiverStrategy"),a);e.SharedArrayReceiverStrategy=p}}),ra=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var r=Hn(),n=(Mn(t=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}},"Semaphore"),t);e.Semaphore=n}}),na=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var n,a=Hn(),i=Yn(),s=Xn(),o=ra();!function(e){function t(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)}Mn(t,"is"),e.is=t}(n||(e.MessageReader=n={}));var l,u=(Mn(t=class{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter,this.partialMessageEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}},"AbstractMessageReader"),t);e.AbstractMessageReader=u,function(e){function t(e){let t,r;const n=new Map;let i;const s=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(r=e.contentDecoder,n.set(r.name,r)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)n.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(i=e.contentTypeDecoder,s.set(i.name,i)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===i&&(i=(0,a.default)().applicationJson.decoder,s.set(i.name,i)),{charset:t,contentDecoder:r,contentDecoders:n,contentTypeDecoder:i,contentTypeDecoders:s}}Mn(t,"fromOptions"),e.fromOptions=t}(l||(l={}));var c=(Mn(r=class extends u{constructor(e,t){super(),this.readable=e,this.options=l.fromOptions(t),this.buffer=(0,a.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new o.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const r=parseInt(t);if(isNaN(r))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=r}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,r=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(r)}).catch(e=>{this.fireError(e)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,a.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}},"ReadableStreamMessageReader"),r);e.ReadableStreamMessageReader=c}}),aa=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var n,a=Hn(),i=Yn(),s=ra(),o=Xn();!function(e){function t(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}Mn(t,"is"),e.is=t}(n||(e.MessageWriter=n={}));var l,u=(Mn(t=class{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}},"AbstractMessageWriter"),t);e.AbstractMessageWriter=u,function(e){function t(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,a.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,a.default)().applicationJson.encoder}}Mn(t,"fromOptions"),e.fromOptions=t}(l||(l={}));var c=(Mn(r=class extends u{constructor(e,t){super(),this.writable=e,this.options=l.fromOptions(t),this.errorCount=0,this.writeSemaphore=new s.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const r=[];return r.push("Content-Length: ",t.byteLength.toString(),"\r\n"),r.push("\r\n"),this.doWrite(e,r,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(n){return this.handleError(n,e),Promise.reject(n)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}},"WriteableStreamMessageWriter"),r);e.WriteableStreamMessageWriter=c}}),ia=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var r=(Mn(t=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,r=0,n=0,a=0;e:for(;r<this._chunks.length;){const e=this._chunks[r];for(n=0;n<e.length;){switch(e[n]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,n++;break e;default:t=0}break;default:t=0}n++}a+=e.byteLength,r++}if(4!==t)return;const i=this._read(a+n),s=new Map,o=this.toString(i,"ascii").split("\r\n");if(o.length<2)return s;for(let l=0;l<o.length-2;l++){const t=o[l],r=t.indexOf(":");if(-1===r)throw new Error(`Message header must separate key and value using ':'\n${t}`);const n=t.substr(0,r),a=t.substr(r+1).trim();s.set(e?n.toLowerCase():n,a)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],r=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,r}const t=this.allocNative(e);let r=0;for(;e>0;){const n=this._chunks[0];if(n.byteLength>e){const a=n.slice(0,e);t.set(a,r),r+=e,this._chunks[0]=n.slice(e),this._totalLength-=e,e-=e}else t.set(n,r),r+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,e-=n.byteLength}return t}},"AbstractMessageBuffer"),t);e.AbstractMessageBuffer=r}}),sa=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){var t,r;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 n,a,i,s=Hn(),o=Yn(),l=Jn(),u=Qn(),c=Xn(),p=Zn();(n||(n={})).type=new l.NotificationType("$/cancelRequest"),function(e){function t(e){return"string"==typeof e||"number"==typeof e}Mn(t,"is"),e.is=t}(a||(e.ProgressToken=a={})),(i||(i={})).type=new l.NotificationType("$/progress");var d,f,m,h,y,g,v,T,$,R,E,b=(Mn(t=class{constructor(){}},"ProgressType"),t);e.ProgressType=b,function(e){function t(e){return o.func(e)}Mn(t,"is"),e.is=t}(d||(d={})),e.NullLogger=Object.freeze({error:Mn(()=>{},"error"),warn:Mn(()=>{},"warn"),info:Mn(()=>{},"info"),log:Mn(()=>{},"log")}),(m=f||(e.Trace=f={}))[m.Off=0]="Off",m[m.Messages=1]="Messages",m[m.Compact=2]="Compact",m[m.Verbose=3]="Verbose",(y=h||(e.TraceValues=h={})).Off="off",y.Messages="messages",y.Compact="compact",y.Verbose="verbose",function(e){function t(t){if(!o.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}}function r(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}Mn(t,"fromString"),e.fromString=t,Mn(r,"toString"),e.toString=r}(f||(e.Trace=f={})),(v=g||(e.TraceFormat=g={})).Text="text",v.JSON="json",function(e){function t(t){return o.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}Mn(t,"fromString"),e.fromString=t}(g||(e.TraceFormat=g={})),(T||(e.SetTraceNotification=T={})).type=new l.NotificationType("$/setTrace"),($||(e.LogTraceNotification=$={})).type=new l.NotificationType("$/logTrace"),(E=R||(e.ConnectionErrors=R={}))[E.Closed=1]="Closed",E[E.Disposed=2]="Disposed",E[E.AlreadyListening=3]="AlreadyListening";var A,C,S,k,x,w,N,_,I,P,O=(r=class extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,r.prototype)}},Mn(r,"ConnectionError"),r);function L(t,r,m,h){const y=void 0!==m?m:e.NullLogger;let v=0,E=0,b=0;const A="2.0";let S;const k=new Map;let x;const _=new Map,P=new Map;let L,D,M=new u.LinkedMap,j=new Map,F=new Set,G=new Map,z=f.Off,K=g.Text,q=I.New;const U=new c.Emitter,B=new c.Emitter,V=new c.Emitter,W=new c.Emitter,H=new c.Emitter,Y=h&&h.cancellationStrategy?h.cancellationStrategy:w.Message;function X(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function Z(e){return null===e?"res-unknown-"+(++b).toString():"res-"+e.toString()}function J(){return"not-"+(++E).toString()}function Q(e,t){l.Message.isRequest(t)?e.set(X(t.id),t):l.Message.isResponse(t)?e.set(Z(t.id),t):e.set(J(),t)}function ee(e){}function te(){return q===I.Listening}function re(){return q===I.Closed}function ne(){return q===I.Disposed}function ae(){q!==I.New&&q!==I.Listening||(q=I.Closed,B.fire(void 0))}function ie(e){U.fire([e,void 0,void 0])}function se(e){U.fire(e)}function oe(){L||0===M.size||(L=(0,s.default)().timer.setImmediate(()=>{L=void 0,ue()}))}function le(e){l.Message.isRequest(e)?pe(e):l.Message.isNotification(e)?fe(e):l.Message.isResponse(e)?de(e):me(e)}function ue(){if(0===M.size)return;const e=M.shift();try{const t=null==h?void 0:h.messageStrategy;N.is(t)?t.handleMessage(e,le):le(e)}finally{oe()}}Mn(X,"createRequestQueueKey"),Mn(Z,"createResponseQueueKey"),Mn(J,"createNotificationQueueKey"),Mn(Q,"addMessageToQueue"),Mn(ee,"cancelUndispatched"),Mn(te,"isListening"),Mn(re,"isClosed"),Mn(ne,"isDisposed"),Mn(ae,"closeHandler"),Mn(ie,"readErrorHandler"),Mn(se,"writeErrorHandler"),t.onClose(ae),t.onError(ie),r.onClose(ae),r.onError(se),Mn(oe,"triggerMessageQueue"),Mn(le,"handleMessage"),Mn(ue,"processMessageQueue");const ce=Mn(e=>{try{if(l.Message.isNotification(e)&&e.method===n.type.method){const t=e.params.id,n=X(t),a=M.get(n);if(l.Message.isRequest(a)){const i=null==h?void 0:h.connectionStrategy,s=i&&i.cancelUndispatched?i.cancelUndispatched(a,ee):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return M.delete(n),G.delete(t),s.id=a.id,ve(s,e.method,Date.now()),void r.write(s).catch(()=>y.error("Sending response for canceled message failed."))}const i=G.get(t);if(void 0!==i)return i.cancel(),void $e(e);F.add(t)}Q(M,e)}finally{oe()}},"callback");function pe(e){if(ne())return;function t(t,n,a){const i={jsonrpc:A,id:e.id};t instanceof l.ResponseError?i.error=t.toJson():i.result=void 0===t?null:t,ve(i,n,a),r.write(i).catch(()=>y.error("Sending response failed."))}function n(t,n,a){const i={jsonrpc:A,id:e.id,error:t.toJson()};ve(i,n,a),r.write(i).catch(()=>y.error("Sending response failed."))}function a(t,n,a){void 0===t&&(t=null);const i={jsonrpc:A,id:e.id,result:t};ve(i,n,a),r.write(i).catch(()=>y.error("Sending response failed."))}Mn(t,"reply"),Mn(n,"replyError"),Mn(a,"replySuccess"),Te(e);const i=k.get(e.method);let s,u;i&&(s=i.type,u=i.handler);const c=Date.now();if(u||S){const r=e.id??String(Date.now()),i=C.is(Y.receiver)?Y.receiver.createCancellationTokenSource(r):Y.receiver.createCancellationTokenSource(e);null!==e.id&&F.has(e.id)&&i.cancel(),null!==e.id&&G.set(r,i);try{let p;if(u)if(void 0===e.params){if(void 0!==s&&0!==s.numberOfParams)return void n(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${e.method} defines ${s.numberOfParams} params but received none.`),e.method,c);p=u(i.token)}else if(Array.isArray(e.params)){if(void 0!==s&&s.parameterStructures===l.ParameterStructures.byName)return void n(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,c);p=u(...e.params,i.token)}else{if(void 0!==s&&s.parameterStructures===l.ParameterStructures.byPosition)return void n(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,c);p=u(e.params,i.token)}else S&&(p=S(e.method,e.params,i.token));const d=p;p?d.then?d.then(n=>{G.delete(r),t(n,e.method,c)},t=>{G.delete(r),t instanceof l.ResponseError?n(t,e.method,c):t&&o.string(t.message)?n(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,c):n(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}):(G.delete(r),t(p,e.method,c)):(G.delete(r),a(p,e.method,c))}catch(p){G.delete(r),p instanceof l.ResponseError?t(p,e.method,c):p&&o.string(p.message)?n(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${p.message}`),e.method,c):n(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}}else n(new l.ResponseError(l.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,c)}function de(e){if(!ne())if(null===e.id)e.error?y.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):y.error("Received response message without id. No further error information provided.");else{const r=e.id,n=j.get(r);if(Re(e,n),void 0!==n){j.delete(r);try{if(e.error){const t=e.error;n.reject(new l.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(t){t.message?y.error(`Response handler '${n.method}' failed with message: ${t.message}`):y.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}function fe(e){if(ne())return;let t,r;if(e.method===n.type.method){const t=e.params.id;return F.delete(t),void $e(e)}{const n=_.get(e.method);n&&(r=n.handler,t=n.type)}if(r||x)try{if($e(e),r)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==l.ParameterStructures.byName&&y.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),r();else if(Array.isArray(e.params)){const n=e.params;e.method===i.type.method&&2===n.length&&a.is(n[0])?r({token:n[0],value:n[1]}):(void 0!==t&&(t.parameterStructures===l.ParameterStructures.byName&&y.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&y.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${n.length} arguments`)),r(...n))}else void 0!==t&&t.parameterStructures===l.ParameterStructures.byPosition&&y.error(`Notification ${e.method} defines parameters by position but received parameters by name`),r(e.params);else x&&x(e.method,e.params)}catch(s){s.message?y.error(`Notification handler '${e.method}' failed with message: ${s.message}`):y.error(`Notification handler '${e.method}' failed unexpectedly.`)}else V.fire(e)}function me(e){if(!e)return void y.error("Received empty message.");y.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(o.string(t.id)||o.number(t.id)){const e=t.id,r=j.get(e);r&&r.reject(new Error("The received response has neither a result nor an error property."))}}function he(e){if(null!=e)switch(z){case f.Verbose:return JSON.stringify(e,null,4);case f.Compact:return JSON.stringify(e);default:return}}function ye(e){if(z!==f.Off&&D)if(K===g.Text){let t;z!==f.Verbose&&z!==f.Compact||!e.params||(t=`Params: ${he(e.params)}\n\n`),D.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Ee("send-request",e)}function ge(e){if(z!==f.Off&&D)if(K===g.Text){let t;z!==f.Verbose&&z!==f.Compact||(t=e.params?`Params: ${he(e.params)}\n\n`:"No parameters provided.\n\n"),D.log(`Sending notification '${e.method}'.`,t)}else Ee("send-notification",e)}function ve(e,t,r){if(z!==f.Off&&D)if(K===g.Text){let n;z!==f.Verbose&&z!==f.Compact||(e.error&&e.error.data?n=`Error data: ${he(e.error.data)}\n\n`:e.result?n=`Result: ${he(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),D.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-r}ms`,n)}else Ee("send-response",e)}function Te(e){if(z!==f.Off&&D)if(K===g.Text){let t;z!==f.Verbose&&z!==f.Compact||!e.params||(t=`Params: ${he(e.params)}\n\n`),D.log(`Received request '${e.method} - (${e.id})'.`,t)}else Ee("receive-request",e)}function $e(e){if(z!==f.Off&&D&&e.method!==$.type.method)if(K===g.Text){let t;z!==f.Verbose&&z!==f.Compact||(t=e.params?`Params: ${he(e.params)}\n\n`:"No parameters provided.\n\n"),D.log(`Received notification '${e.method}'.`,t)}else Ee("receive-notification",e)}function Re(e,t){if(z!==f.Off&&D)if(K===g.Text){let r;if(z!==f.Verbose&&z!==f.Compact||(e.error&&e.error.data?r=`Error data: ${he(e.error.data)}\n\n`:e.result?r=`Result: ${he(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),t){const n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";D.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,r)}else D.log(`Received response ${e.id} without active response promise.`,r)}else Ee("receive-response",e)}function Ee(e,t){if(!D||z===f.Off)return;const r={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};D.log(r)}function be(){if(re())throw new O(R.Closed,"Connection is closed.");if(ne())throw new O(R.Disposed,"Connection is disposed.")}function Ae(){if(te())throw new O(R.AlreadyListening,"Connection is already listening")}function Ce(){if(!te())throw new Error("Call listen() first.")}function Se(e){return void 0===e?null:e}function ke(e){return null===e?void 0:e}function xe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function we(e,t){switch(e){case l.ParameterStructures.auto:return xe(t)?ke(t):[Se(t)];case l.ParameterStructures.byName:if(!xe(t))throw new Error("Received parameters by name but param is not an object literal.");return ke(t);case l.ParameterStructures.byPosition:return[Se(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function Ne(e,t){let r;const n=e.numberOfParams;switch(n){case 0:r=void 0;break;case 1:r=we(e.parameterStructures,t[0]);break;default:r=[];for(let e=0;e<t.length&&e<n;e++)r.push(Se(t[e]));if(t.length<n)for(let e=t.length;e<n;e++)r.push(null)}return r}Mn(pe,"handleRequest"),Mn(de,"handleResponse"),Mn(fe,"handleNotification"),Mn(me,"handleInvalidMessage"),Mn(he,"stringifyTrace"),Mn(ye,"traceSendingRequest"),Mn(ge,"traceSendingNotification"),Mn(ve,"traceSendingResponse"),Mn(Te,"traceReceivedRequest"),Mn($e,"traceReceivedNotification"),Mn(Re,"traceReceivedResponse"),Mn(Ee,"logLSPMessage"),Mn(be,"throwIfClosedOrDisposed"),Mn(Ae,"throwIfListening"),Mn(Ce,"throwIfNotListening"),Mn(Se,"undefinedToNull"),Mn(ke,"nullToUndefined"),Mn(xe,"isNamedParam"),Mn(we,"computeSingleParam"),Mn(Ne,"computeMessageParams");const _e={sendNotification:Mn((e,...t)=>{let n,a;if(be(),o.string(e)){n=e;const r=t[0];let i=0,s=l.ParameterStructures.auto;l.ParameterStructures.is(r)&&(i=1,s=r);let o=t.length;const u=o-i;switch(u){case 0:a=void 0;break;case 1:a=we(s,t[i]);break;default:if(s===l.ParameterStructures.byName)throw new Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);a=t.slice(i,o).map(e=>Se(e))}}else{const r=t;n=e.method,a=Ne(e,r)}const i={jsonrpc:A,method:n,params:a};return ge(i),r.write(i).catch(e=>{throw y.error("Sending notification failed."),e})},"sendNotification"),onNotification:Mn((e,t)=>{let r;return be(),o.func(e)?x=e:t&&(o.string(e)?(r=e,_.set(e,{type:void 0,handler:t})):(r=e.method,_.set(e.method,{type:e,handler:t}))),{dispose:Mn(()=>{void 0!==r?_.delete(r):x=void 0},"dispose")}},"onNotification"),onProgress:Mn((e,t,r)=>{if(P.has(t))throw new Error(`Progress handler for token ${t} already registered`);return P.set(t,r),{dispose:Mn(()=>{P.delete(t)},"dispose")}},"onProgress"),sendProgress:Mn((e,t,r)=>_e.sendNotification(i.type,{token:t,value:r}),"sendProgress"),onUnhandledProgress:W.event,sendRequest:Mn((e,...t)=>{let n,a,i;if(be(),Ce(),o.string(e)){n=e;const r=t[0],s=t[t.length-1];let o=0,u=l.ParameterStructures.auto;l.ParameterStructures.is(r)&&(o=1,u=r);let c=t.length;p.CancellationToken.is(s)&&(c-=1,i=s);const d=c-o;switch(d){case 0:a=void 0;break;case 1:a=we(u,t[o]);break;default:if(u===l.ParameterStructures.byName)throw new Error(`Received ${d} parameters for 'by Name' request parameter structure.`);a=t.slice(o,c).map(e=>Se(e))}}else{const r=t;n=e.method,a=Ne(e,r);const s=e.numberOfParams;i=p.CancellationToken.is(r[s])?r[s]:void 0}const s=v++;let u;i&&(u=i.onCancellationRequested(()=>{const e=Y.sender.sendCancellation(_e,s);return void 0===e?(y.log(`Received no promise from cancellation strategy when cancelling id ${s}`),Promise.resolve()):e.catch(()=>{y.log(`Sending cancellation messages for id ${s} failed`)})}));const c={jsonrpc:A,id:s,method:n,params:a};return ye(c),"function"==typeof Y.sender.enableCancellation&&Y.sender.enableCancellation(c),new Promise(async(e,t)=>{const a=Mn(t=>{e(t),Y.sender.cleanup(s),null==u||u.dispose()},"resolveWithCleanup"),i=Mn(e=>{t(e),Y.sender.cleanup(s),null==u||u.dispose()},"rejectWithCleanup"),o={method:n,timerStart:Date.now(),resolve:a,reject:i};try{await r.write(c),j.set(s,o)}catch(p){throw y.error("Sending request failed."),o.reject(new l.ResponseError(l.ErrorCodes.MessageWriteError,p.message?p.message:"Unknown reason")),p}})},"sendRequest"),onRequest:Mn((e,t)=>{be();let r=null;return d.is(e)?(r=void 0,S=e):o.string(e)?(r=null,void 0!==t&&(r=e,k.set(e,{handler:t,type:void 0}))):void 0!==t&&(r=e.method,k.set(e.method,{type:e,handler:t})),{dispose:Mn(()=>{null!==r&&(void 0!==r?k.delete(r):S=void 0)},"dispose")}},"onRequest"),hasPendingResponse:Mn(()=>j.size>0,"hasPendingResponse"),trace:Mn(async(e,t,r)=>{let n=!1,a=g.Text;void 0!==r&&(o.boolean(r)?n=r:(n=r.sendNotification||!1,a=r.traceFormat||g.Text)),z=e,K=a,D=z===f.Off?void 0:t,!n||re()||ne()||await _e.sendNotification(T.type,{value:f.toString(e)})},"trace"),onError:U.event,onClose:B.event,onUnhandledNotification:V.event,onDispose:H.event,end:Mn(()=>{r.end()},"end"),dispose:Mn(()=>{if(ne())return;q=I.Disposed,H.fire(void 0);const e=new l.ResponseError(l.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const t of j.values())t.reject(e);j=new Map,G=new Map,F=new Set,M=new u.LinkedMap,o.func(r.dispose)&&r.dispose(),o.func(t.dispose)&&t.dispose()},"dispose"),listen:Mn(()=>{be(),Ae(),q=I.Listening,t.listen(ce)},"listen"),inspect:Mn(()=>{(0,s.default)().console.log("inspect")},"inspect")};return _e.onNotification($.type,e=>{if(z===f.Off||!D)return;const t=z===f.Verbose||z===f.Compact;D.log(e.message,t?e.verbose:void 0)}),_e.onNotification(i.type,e=>{const t=P.get(e.token);t?t(e.value):W.fire(e)}),_e}e.ConnectionError=O,function(e){function t(e){const t=e;return t&&o.func(t.cancelUndispatched)}Mn(t,"is"),e.is=t}(A||(e.ConnectionStrategy=A={})),function(e){function t(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}Mn(t,"is"),e.is=t}(C||(e.IdCancellationReceiverStrategy=C={})),function(e){function t(e){const t=e;return t&&"request"===t.kind&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}Mn(t,"is"),e.is=t}(S||(e.RequestCancellationReceiverStrategy=S={})),function(e){function t(e){return C.is(e)||S.is(e)}e.Message=Object.freeze({createCancellationTokenSource:e=>new p.CancellationTokenSource}),Mn(t,"is"),e.is=t}(k||(e.CancellationReceiverStrategy=k={})),function(e){function t(e){const t=e;return t&&o.func(t.sendCancellation)&&o.func(t.cleanup)}e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(n.type,{id:t}),cleanup(e){}}),Mn(t,"is"),e.is=t}(x||(e.CancellationSenderStrategy=x={})),function(e){function t(e){const t=e;return t&&k.is(t.receiver)&&x.is(t.sender)}e.Message=Object.freeze({receiver:k.Message,sender:x.Message}),Mn(t,"is"),e.is=t}(w||(e.CancellationStrategy=w={})),function(e){function t(e){const t=e;return t&&o.func(t.handleMessage)}Mn(t,"is"),e.is=t}(N||(e.MessageStrategy=N={})),function(e){function t(e){const t=e;return t&&(w.is(t.cancellationStrategy)||A.is(t.connectionStrategy)||N.is(t.messageStrategy))}Mn(t,"is"),e.is=t}(_||(e.ConnectionOptions=_={})),(P=I||(I={}))[P.New=1]="New",P[P.Listening=2]="Listening",P[P.Closed=3]="Closed",P[P.Disposed=4]="Disposed",Mn(L,"createMessageConnection"),e.createMessageConnection=L}}),oa=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){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=Jn();Object.defineProperty(e,"Message",{enumerable:!0,get:Mn(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:Mn(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:Mn(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:Mn(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:Mn(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:Mn(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:Mn(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:Mn(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:Mn(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:Mn(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:Mn(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:Mn(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:Mn(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:Mn(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:Mn(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:Mn(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:Mn(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:Mn(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:Mn(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:Mn(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:Mn(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:Mn(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:Mn(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:Mn(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:Mn(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:Mn(function(){return t.ParameterStructures},"get")});var r=Qn();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:Mn(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:Mn(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:Mn(function(){return r.Touch},"get")});var n=ea();Object.defineProperty(e,"Disposable",{enumerable:!0,get:Mn(function(){return n.Disposable},"get")});var a=Xn();Object.defineProperty(e,"Event",{enumerable:!0,get:Mn(function(){return a.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:Mn(function(){return a.Emitter},"get")});var i=Zn();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:Mn(function(){return i.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:Mn(function(){return i.CancellationToken},"get")});var s=ta();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:Mn(function(){return s.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:Mn(function(){return s.SharedArrayReceiverStrategy},"get")});var o=na();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:Mn(function(){return o.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:Mn(function(){return o.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:Mn(function(){return o.ReadableStreamMessageReader},"get")});var l=aa();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:Mn(function(){return l.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:Mn(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:Mn(function(){return l.WriteableStreamMessageWriter},"get")});var u=ia();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:Mn(function(){return u.AbstractMessageBuffer},"get")});var c=sa();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:Mn(function(){return c.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:Mn(function(){return c.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:Mn(function(){return c.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:Mn(function(){return c.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:Mn(function(){return c.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:Mn(function(){return c.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:Mn(function(){return c.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:Mn(function(){return c.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:Mn(function(){return c.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:Mn(function(){return c.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:Mn(function(){return c.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:Mn(function(){return c.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:Mn(function(){return c.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:Mn(function(){return c.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:Mn(function(){return c.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:Mn(function(){return c.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:Mn(function(){return c.MessageStrategy},"get")});var p=Hn();e.RAL=p.default}}),la=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){var t,r,n;Object.defineProperty(e,"__esModule",{value:!0});var a=oa(),i=(t=class extends a.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return t.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}},Mn(t,"MessageBuffer"),t);i.emptyBuffer=new Uint8Array(0);var s=(Mn(r=class{constructor(e){this.socket=e,this._onData=new a.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,a.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),a.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),a.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),a.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}},"ReadableStreamWrapper"),r),o=(Mn(n=class{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),a.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),a.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),a.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},"WritableStreamWrapper"),n),l=new TextEncoder,u=Object.freeze({messageBuffer:Object.freeze({create:Mn(e=>new i(e),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:Mn((e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(l.encode(JSON.stringify(e,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:Mn((e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))},"decode")})}),stream:Object.freeze({asReadableStream:Mn(e=>new s(e),"asReadableStream"),asWritableStream:Mn(e=>new o(e),"asWritableStream")}),console:console,timer:Object.freeze({setTimeout(e,t,...r){const n=setTimeout(e,t,...r);return{dispose:Mn(()=>clearTimeout(n),"dispose")}},setImmediate(e,...t){const r=setTimeout(e,0,...t);return{dispose:Mn(()=>clearTimeout(r),"dispose")}},setInterval(e,t,...r){const n=setInterval(e,t,...r);return{dispose:Mn(()=>clearInterval(n),"dispose")}}})});function c(){return u}Mn(c,"RIL"),function(e){function t(){a.RAL.install(u)}Mn(t,"install"),e.install=t}(c||(c={})),e.default=c}}),ua=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){var t,r,n=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:Mn(function(){return t[r]},"get")}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,la().default.install();var i=oa();a(oa(),e);var s=(t=class extends i.AbstractMessageReader{constructor(e){super(),this._onData=new i.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}},Mn(t,"BrowserMessageReader"),t);e.BrowserMessageReader=s;var o=(r=class extends i.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}},Mn(r,"BrowserMessageWriter"),r);function l(e,t,r,n){return void 0===r&&(r=i.NullLogger),i.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,i.createMessageConnection)(e,t,r,n)}e.BrowserMessageWriter=o,Mn(l,"createMessageConnection"),e.createMessageConnection=l}}),ca=jn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=ua()}}),pa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){var t,r,n,a,i;Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var s,o,l=ua();(o=s||(e.MessageDirection=s={})).clientToServer="clientToServer",o.serverToClient="serverToClient",o.both="both";var u=(Mn(t=class{constructor(e){this.method=e}},"RegistrationType"),t);e.RegistrationType=u;var c=(r=class extends l.RequestType0{constructor(e){super(e)}},Mn(r,"ProtocolRequestType0"),r);e.ProtocolRequestType0=c;var p=(n=class extends l.RequestType{constructor(e){super(e,l.ParameterStructures.byName)}},Mn(n,"ProtocolRequestType"),n);e.ProtocolRequestType=p;var d=(a=class extends l.NotificationType0{constructor(e){super(e)}},Mn(a,"ProtocolNotificationType0"),a);e.ProtocolNotificationType0=d;var f=(i=class extends l.NotificationType{constructor(e){super(e,l.ParameterStructures.byName)}},Mn(i,"ProtocolNotificationType"),i);e.ProtocolNotificationType=f}}),da=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function n(e){return"number"==typeof e||e instanceof Number}function a(e){return e instanceof Error}function i(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}function l(e,t){return Array.isArray(e)&&e.every(t)}function u(e){return null!==e&&"object"==typeof e}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,Mn(t,"boolean"),e.boolean=t,Mn(r,"string"),e.string=r,Mn(n,"number"),e.number=n,Mn(a,"error"),e.error=a,Mn(i,"func"),e.func=i,Mn(s,"array"),e.array=s,Mn(o,"stringArray"),e.stringArray=o,Mn(l,"typedArray"),e.typedArray=l,Mn(u,"objectLiteral"),e.objectLiteral=u}}),fa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t,r,n=pa();(r=t||(e.ImplementationRequest=t={})).method="textDocument/implementation",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),ma=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t,r,n=pa();(r=t||(e.TypeDefinitionRequest=t={})).method="textDocument/typeDefinition",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),ha=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t,r,n,a,i=pa();(r=t||(e.WorkspaceFoldersRequest=t={})).method="workspace/workspaceFolders",r.messageDirection=i.MessageDirection.serverToClient,r.type=new i.ProtocolRequestType0(r.method),(a=n||(e.DidChangeWorkspaceFoldersNotification=n={})).method="workspace/didChangeWorkspaceFolders",a.messageDirection=i.MessageDirection.clientToServer,a.type=new i.ProtocolNotificationType(a.method)}}),ya=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t,r,n=pa();(r=t||(e.ConfigurationRequest=t={})).method="workspace/configuration",r.messageDirection=n.MessageDirection.serverToClient,r.type=new n.ProtocolRequestType(r.method)}}),ga=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t,r,n,a,i=pa();(r=t||(e.DocumentColorRequest=t={})).method="textDocument/documentColor",r.messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),(a=n||(e.ColorPresentationRequest=n={})).method="textDocument/colorPresentation",a.messageDirection=i.MessageDirection.clientToServer,a.type=new i.ProtocolRequestType(a.method)}}),va=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t,r,n,a,i=pa();(r=t||(e.FoldingRangeRequest=t={})).method="textDocument/foldingRange",r.messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),(a=n||(e.FoldingRangeRefreshRequest=n={})).method="workspace/foldingRange/refresh",a.messageDirection=i.MessageDirection.serverToClient,a.type=new i.ProtocolRequestType0(a.method)}}),Ta=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t,r,n=pa();(r=t||(e.DeclarationRequest=t={})).method="textDocument/declaration",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),$a=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t,r,n=pa();(r=t||(e.SelectionRangeRequest=t={})).method="textDocument/selectionRange",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),Ra=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t,r,n,a,i,s=ua(),o=pa();!function(e){function t(t){return t===e.type}e.type=new s.ProgressType,Mn(t,"is"),e.is=t}(t||(e.WorkDoneProgress=t={})),(n=r||(e.WorkDoneProgressCreateRequest=r={})).method="window/workDoneProgress/create",n.messageDirection=o.MessageDirection.serverToClient,n.type=new o.ProtocolRequestType(n.method),(i=a||(e.WorkDoneProgressCancelNotification=a={})).method="window/workDoneProgress/cancel",i.messageDirection=o.MessageDirection.clientToServer,i.type=new o.ProtocolNotificationType(i.method)}}),Ea=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t,r,n,a,i,s,o=pa();(r=t||(e.CallHierarchyPrepareRequest=t={})).method="textDocument/prepareCallHierarchy",r.messageDirection=o.MessageDirection.clientToServer,r.type=new o.ProtocolRequestType(r.method),(a=n||(e.CallHierarchyIncomingCallsRequest=n={})).method="callHierarchy/incomingCalls",a.messageDirection=o.MessageDirection.clientToServer,a.type=new o.ProtocolRequestType(a.method),(s=i||(e.CallHierarchyOutgoingCallsRequest=i={})).method="callHierarchy/outgoingCalls",s.messageDirection=o.MessageDirection.clientToServer,s.type=new o.ProtocolRequestType(s.method)}}),ba=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t,r,n,a,i,s,o,l,u,c,p,d=pa();(t||(e.TokenFormat=t={})).Relative="relative",(n=r||(e.SemanticTokensRegistrationType=r={})).method="textDocument/semanticTokens",n.type=new d.RegistrationType(n.method),(i=a||(e.SemanticTokensRequest=a={})).method="textDocument/semanticTokens/full",i.messageDirection=d.MessageDirection.clientToServer,i.type=new d.ProtocolRequestType(i.method),i.registrationMethod=r.method,(o=s||(e.SemanticTokensDeltaRequest=s={})).method="textDocument/semanticTokens/full/delta",o.messageDirection=d.MessageDirection.clientToServer,o.type=new d.ProtocolRequestType(o.method),o.registrationMethod=r.method,(u=l||(e.SemanticTokensRangeRequest=l={})).method="textDocument/semanticTokens/range",u.messageDirection=d.MessageDirection.clientToServer,u.type=new d.ProtocolRequestType(u.method),u.registrationMethod=r.method,(p=c||(e.SemanticTokensRefreshRequest=c={})).method="workspace/semanticTokens/refresh",p.messageDirection=d.MessageDirection.serverToClient,p.type=new d.ProtocolRequestType0(p.method)}}),Aa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t,r,n=pa();(r=t||(e.ShowDocumentRequest=t={})).method="window/showDocument",r.messageDirection=n.MessageDirection.serverToClient,r.type=new n.ProtocolRequestType(r.method)}}),Ca=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t,r,n=pa();(r=t||(e.LinkedEditingRangeRequest=t={})).method="textDocument/linkedEditingRange",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),Sa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t,r,n,a,i,s,o,l,u,c,p,d,f,m,h=pa();(r=t||(e.FileOperationPatternKind=t={})).file="file",r.folder="folder",(a=n||(e.WillCreateFilesRequest=n={})).method="workspace/willCreateFiles",a.messageDirection=h.MessageDirection.clientToServer,a.type=new h.ProtocolRequestType(a.method),(s=i||(e.DidCreateFilesNotification=i={})).method="workspace/didCreateFiles",s.messageDirection=h.MessageDirection.clientToServer,s.type=new h.ProtocolNotificationType(s.method),(l=o||(e.WillRenameFilesRequest=o={})).method="workspace/willRenameFiles",l.messageDirection=h.MessageDirection.clientToServer,l.type=new h.ProtocolRequestType(l.method),(c=u||(e.DidRenameFilesNotification=u={})).method="workspace/didRenameFiles",c.messageDirection=h.MessageDirection.clientToServer,c.type=new h.ProtocolNotificationType(c.method),(d=p||(e.DidDeleteFilesNotification=p={})).method="workspace/didDeleteFiles",d.messageDirection=h.MessageDirection.clientToServer,d.type=new h.ProtocolNotificationType(d.method),(m=f||(e.WillDeleteFilesRequest=f={})).method="workspace/willDeleteFiles",m.messageDirection=h.MessageDirection.clientToServer,m.type=new h.ProtocolRequestType(m.method)}}),ka=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t,r,n,a,i,s,o=pa();(r=t||(e.UniquenessLevel=t={})).document="document",r.project="project",r.group="group",r.scheme="scheme",r.global="global",(a=n||(e.MonikerKind=n={})).$import="import",a.$export="export",a.local="local",(s=i||(e.MonikerRequest=i={})).method="textDocument/moniker",s.messageDirection=o.MessageDirection.clientToServer,s.type=new o.ProtocolRequestType(s.method)}}),xa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t,r,n,a,i,s,o=pa();(r=t||(e.TypeHierarchyPrepareRequest=t={})).method="textDocument/prepareTypeHierarchy",r.messageDirection=o.MessageDirection.clientToServer,r.type=new o.ProtocolRequestType(r.method),(a=n||(e.TypeHierarchySupertypesRequest=n={})).method="typeHierarchy/supertypes",a.messageDirection=o.MessageDirection.clientToServer,a.type=new o.ProtocolRequestType(a.method),(s=i||(e.TypeHierarchySubtypesRequest=i={})).method="typeHierarchy/subtypes",s.messageDirection=o.MessageDirection.clientToServer,s.type=new o.ProtocolRequestType(s.method)}}),wa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t,r,n,a,i=pa();(r=t||(e.InlineValueRequest=t={})).method="textDocument/inlineValue",r.messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),(a=n||(e.InlineValueRefreshRequest=n={})).method="workspace/inlineValue/refresh",a.messageDirection=i.MessageDirection.serverToClient,a.type=new i.ProtocolRequestType0(a.method)}}),Na=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t,r,n,a,i,s,o=pa();(r=t||(e.InlayHintRequest=t={})).method="textDocument/inlayHint",r.messageDirection=o.MessageDirection.clientToServer,r.type=new o.ProtocolRequestType(r.method),(a=n||(e.InlayHintResolveRequest=n={})).method="inlayHint/resolve",a.messageDirection=o.MessageDirection.clientToServer,a.type=new o.ProtocolRequestType(a.method),(s=i||(e.InlayHintRefreshRequest=i={})).method="workspace/inlayHint/refresh",s.messageDirection=o.MessageDirection.serverToClient,s.type=new o.ProtocolRequestType0(s.method)}}),_a=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t,r,n,a,i,s,o,l,u,c=ua(),p=da(),d=pa();!function(e){function t(e){const t=e;return t&&p.boolean(t.retriggerRequest)}Mn(t,"is"),e.is=t}(t||(e.DiagnosticServerCancellationData=t={})),(n=r||(e.DocumentDiagnosticReportKind=r={})).Full="full",n.Unchanged="unchanged",(i=a||(e.DocumentDiagnosticRequest=a={})).method="textDocument/diagnostic",i.messageDirection=d.MessageDirection.clientToServer,i.type=new d.ProtocolRequestType(i.method),i.partialResult=new c.ProgressType,(o=s||(e.WorkspaceDiagnosticRequest=s={})).method="workspace/diagnostic",o.messageDirection=d.MessageDirection.clientToServer,o.type=new d.ProtocolRequestType(o.method),o.partialResult=new c.ProgressType,(u=l||(e.DiagnosticRefreshRequest=l={})).method="workspace/diagnostic/refresh",u.messageDirection=d.MessageDirection.serverToClient,u.type=new d.ProtocolRequestType0(u.method)}}),Ia=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){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,r,n,a,i,s,o,l,u,c,p,d,f,m,h,y=(Wn(),qn(Un)),g=da(),v=pa();!function(e){function t(e){return 1===e||2===e}e.Markup=1,e.Code=2,Mn(t,"is"),e.is=t}(t||(e.NotebookCellKind=t={})),function(e){function t(e,t){const r={executionOrder:e};return!0!==t&&!1!==t||(r.success=t),r}function r(e){const t=e;return g.objectLiteral(t)&&y.uinteger.is(t.executionOrder)&&(void 0===t.success||g.boolean(t.success))}function n(e,t){return e===t||null!=e&&null!=t&&(e.executionOrder===t.executionOrder&&e.success===t.success)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r,Mn(n,"equals"),e.equals=n}(r||(e.ExecutionSummary=r={})),function(e){function n(e,t){return{kind:e,document:t}}function a(e){const r=e;return g.objectLiteral(r)&&t.is(r.kind)&&y.DocumentUri.is(r.document)&&(void 0===r.metadata||g.objectLiteral(r.metadata))}function i(e,t){const n=new Set;return e.document!==t.document&&n.add("document"),e.kind!==t.kind&&n.add("kind"),e.executionSummary!==t.executionSummary&&n.add("executionSummary"),void 0===e.metadata&&void 0===t.metadata||s(e.metadata,t.metadata)||n.add("metadata"),void 0===e.executionSummary&&void 0===t.executionSummary||r.equals(e.executionSummary,t.executionSummary)||n.add("executionSummary"),n}function s(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),n=Array.isArray(t);if(r!==n)return!1;if(r&&n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!s(e[r],t[r]))return!1}if(g.objectLiteral(e)&&g.objectLiteral(t)){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;if(r.sort(),n.sort(),!s(r,n))return!1;for(let a=0;a<r.length;a++){const n=r[a];if(!s(e[n],t[n]))return!1}}return!0}Mn(n,"create"),e.create=n,Mn(a,"is"),e.is=a,Mn(i,"diff"),e.diff=i,Mn(s,"equalsMetadata")}(n||(e.NotebookCell=n={})),function(e){function t(e,t,r,n){return{uri:e,notebookType:t,version:r,cells:n}}function r(e){const t=e;return g.objectLiteral(t)&&g.string(t.uri)&&y.integer.is(t.version)&&g.typedArray(t.cells,n.is)}Mn(t,"create"),e.create=t,Mn(r,"is"),e.is=r}(a||(e.NotebookDocument=a={})),(s=i||(e.NotebookDocumentSyncRegistrationType=i={})).method="notebookDocument/sync",s.messageDirection=v.MessageDirection.clientToServer,s.type=new v.RegistrationType(s.method),(l=o||(e.DidOpenNotebookDocumentNotification=o={})).method="notebookDocument/didOpen",l.messageDirection=v.MessageDirection.clientToServer,l.type=new v.ProtocolNotificationType(l.method),l.registrationMethod=i.method,function(e){function t(e){const t=e;return g.objectLiteral(t)&&y.uinteger.is(t.start)&&y.uinteger.is(t.deleteCount)&&(void 0===t.cells||g.typedArray(t.cells,n.is))}function r(e,t,r){const n={start:e,deleteCount:t};return void 0!==r&&(n.cells=r),n}Mn(t,"is"),e.is=t,Mn(r,"create"),e.create=r}(u||(e.NotebookCellArrayChange=u={})),(p=c||(e.DidChangeNotebookDocumentNotification=c={})).method="notebookDocument/didChange",p.messageDirection=v.MessageDirection.clientToServer,p.type=new v.ProtocolNotificationType(p.method),p.registrationMethod=i.method,(f=d||(e.DidSaveNotebookDocumentNotification=d={})).method="notebookDocument/didSave",f.messageDirection=v.MessageDirection.clientToServer,f.type=new v.ProtocolNotificationType(f.method),f.registrationMethod=i.method,(h=m||(e.DidCloseNotebookDocumentNotification=m={})).method="notebookDocument/didClose",h.messageDirection=v.MessageDirection.clientToServer,h.type=new v.ProtocolNotificationType(h.method),h.registrationMethod=i.method}}),Pa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;var t,r,n=pa();(r=t||(e.InlineCompletionRequest=t={})).method="textDocument/inlineCompletion",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),Oa=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=pa(),r=(Wn(),qn(Un)),n=da(),a=fa();Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:Mn(function(){return a.ImplementationRequest},"get")});var i=ma();Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:Mn(function(){return i.TypeDefinitionRequest},"get")});var s=ha();Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:Mn(function(){return s.WorkspaceFoldersRequest},"get")}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:Mn(function(){return s.DidChangeWorkspaceFoldersNotification},"get")});var o=ya();Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:Mn(function(){return o.ConfigurationRequest},"get")});var l=ga();Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:Mn(function(){return l.DocumentColorRequest},"get")}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:Mn(function(){return l.ColorPresentationRequest},"get")});var u=va();Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:Mn(function(){return u.FoldingRangeRequest},"get")}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:Mn(function(){return u.FoldingRangeRefreshRequest},"get")});var c=Ta();Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:Mn(function(){return c.DeclarationRequest},"get")});var p=$a();Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:Mn(function(){return p.SelectionRangeRequest},"get")});var d=Ra();Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:Mn(function(){return d.WorkDoneProgress},"get")}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:Mn(function(){return d.WorkDoneProgressCreateRequest},"get")}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:Mn(function(){return d.WorkDoneProgressCancelNotification},"get")});var f=Ea();Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:Mn(function(){return f.CallHierarchyIncomingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:Mn(function(){return f.CallHierarchyOutgoingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:Mn(function(){return f.CallHierarchyPrepareRequest},"get")});var m=ba();Object.defineProperty(e,"TokenFormat",{enumerable:!0,get:Mn(function(){return m.TokenFormat},"get")}),Object.defineProperty(e,"SemanticTokensRequest",{enumerable:!0,get:Mn(function(){return m.SemanticTokensRequest},"get")}),Object.defineProperty(e,"SemanticTokensDeltaRequest",{enumerable:!0,get:Mn(function(){return m.SemanticTokensDeltaRequest},"get")}),Object.defineProperty(e,"SemanticTokensRangeRequest",{enumerable:!0,get:Mn(function(){return m.SemanticTokensRangeRequest},"get")}),Object.defineProperty(e,"SemanticTokensRefreshRequest",{enumerable:!0,get:Mn(function(){return m.SemanticTokensRefreshRequest},"get")}),Object.defineProperty(e,"SemanticTokensRegistrationType",{enumerable:!0,get:Mn(function(){return m.SemanticTokensRegistrationType},"get")});var h=Aa();Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:Mn(function(){return h.ShowDocumentRequest},"get")});var y=Ca();Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:Mn(function(){return y.LinkedEditingRangeRequest},"get")});var g=Sa();Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:Mn(function(){return g.FileOperationPatternKind},"get")}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:Mn(function(){return g.DidCreateFilesNotification},"get")}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:Mn(function(){return g.WillCreateFilesRequest},"get")}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:Mn(function(){return g.DidRenameFilesNotification},"get")}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:Mn(function(){return g.WillRenameFilesRequest},"get")}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:Mn(function(){return g.DidDeleteFilesNotification},"get")}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:Mn(function(){return g.WillDeleteFilesRequest},"get")});var v=ka();Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:Mn(function(){return v.UniquenessLevel},"get")}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:Mn(function(){return v.MonikerKind},"get")}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:Mn(function(){return v.MonikerRequest},"get")});var T=xa();Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:Mn(function(){return T.TypeHierarchyPrepareRequest},"get")}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:Mn(function(){return T.TypeHierarchySubtypesRequest},"get")}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:Mn(function(){return T.TypeHierarchySupertypesRequest},"get")});var $=wa();Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:Mn(function(){return $.InlineValueRequest},"get")}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:Mn(function(){return $.InlineValueRefreshRequest},"get")});var R=Na();Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:Mn(function(){return R.InlayHintRequest},"get")}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:Mn(function(){return R.InlayHintResolveRequest},"get")}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:Mn(function(){return R.InlayHintRefreshRequest},"get")});var E=_a();Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:Mn(function(){return E.DiagnosticServerCancellationData},"get")}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:Mn(function(){return E.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:Mn(function(){return E.DocumentDiagnosticRequest},"get")}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:Mn(function(){return E.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:Mn(function(){return E.DiagnosticRefreshRequest},"get")});var b=Ia();Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:Mn(function(){return b.NotebookCellKind},"get")}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:Mn(function(){return b.ExecutionSummary},"get")}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:Mn(function(){return b.NotebookCell},"get")}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:Mn(function(){return b.NotebookDocument},"get")}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:Mn(function(){return b.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:Mn(function(){return b.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:Mn(function(){return b.NotebookCellArrayChange},"get")}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:Mn(function(){return b.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:Mn(function(){return b.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:Mn(function(){return b.DidCloseNotebookDocumentNotification},"get")});var A,C,S,k,x,w,N,_,I,P,O,L,D,M,j,F,G,z,K,q,U,B,V,W,H,Y,X,Z,J,Q,ee,te,re,ne,ae,ie,se,oe,le,ue,ce,pe,de,fe,me,he,ye,ge,ve,Te,$e,Re,Ee,be,Ae,Ce,Se,ke,xe,we,Ne,_e,Ie,Pe,Oe,Le,De,Me,je,Fe,Ge,ze,Ke,qe,Ue,Be,Ve,We,He,Ye,Xe,Ze,Je,Qe,et,tt,rt,nt,at,it,st,ot,lt,ut,ct,pt,dt,ft,mt,ht,yt,gt,vt,Tt,$t,Rt,Et,bt,At,Ct,St,kt,xt,wt,Nt,_t,It,Pt,Ot,Lt=Pa();Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:Mn(function(){return Lt.InlineCompletionRequest},"get")}),function(e){function t(e){const t=e;return n.string(t)||n.string(t.language)||n.string(t.scheme)||n.string(t.pattern)}Mn(t,"is"),e.is=t}(A||(e.TextDocumentFilter=A={})),function(e){function t(e){const t=e;return n.objectLiteral(t)&&(n.string(t.notebookType)||n.string(t.scheme)||n.string(t.pattern))}Mn(t,"is"),e.is=t}(C||(e.NotebookDocumentFilter=C={})),function(e){function t(e){const t=e;return n.objectLiteral(t)&&(n.string(t.notebook)||C.is(t.notebook))&&(void 0===t.language||n.string(t.language))}Mn(t,"is"),e.is=t}(S||(e.NotebookCellTextDocumentFilter=S={})),function(e){function t(e){if(!Array.isArray(e))return!1;for(let t of e)if(!n.string(t)&&!A.is(t)&&!S.is(t))return!1;return!0}Mn(t,"is"),e.is=t}(k||(e.DocumentSelector=k={})),(w=x||(e.RegistrationRequest=x={})).method="client/registerCapability",w.messageDirection=t.MessageDirection.serverToClient,w.type=new t.ProtocolRequestType(w.method),(_=N||(e.UnregistrationRequest=N={})).method="client/unregisterCapability",_.messageDirection=t.MessageDirection.serverToClient,_.type=new t.ProtocolRequestType(_.method),(P=I||(e.ResourceOperationKind=I={})).Create="create",P.Rename="rename",P.Delete="delete",(L=O||(e.FailureHandlingKind=O={})).Abort="abort",L.Transactional="transactional",L.TextOnlyTransactional="textOnlyTransactional",L.Undo="undo",(M=D||(e.PositionEncodingKind=D={})).UTF8="utf-8",M.UTF16="utf-16",M.UTF32="utf-32",function(e){function t(e){const t=e;return t&&n.string(t.id)&&t.id.length>0}Mn(t,"hasId"),e.hasId=t}(j||(e.StaticRegistrationOptions=j={})),function(e){function t(e){const t=e;return t&&(null===t.documentSelector||k.is(t.documentSelector))}Mn(t,"is"),e.is=t}(F||(e.TextDocumentRegistrationOptions=F={})),function(e){function t(e){const t=e;return n.objectLiteral(t)&&(void 0===t.workDoneProgress||n.boolean(t.workDoneProgress))}function r(e){const t=e;return t&&n.boolean(t.workDoneProgress)}Mn(t,"is"),e.is=t,Mn(r,"hasWorkDoneProgress"),e.hasWorkDoneProgress=r}(G||(e.WorkDoneProgressOptions=G={})),(K=z||(e.InitializeRequest=z={})).method="initialize",K.messageDirection=t.MessageDirection.clientToServer,K.type=new t.ProtocolRequestType(K.method),(q||(e.InitializeErrorCodes=q={})).unknownProtocolVersion=1,(B=U||(e.InitializedNotification=U={})).method="initialized",B.messageDirection=t.MessageDirection.clientToServer,B.type=new t.ProtocolNotificationType(B.method),(W=V||(e.ShutdownRequest=V={})).method="shutdown",W.messageDirection=t.MessageDirection.clientToServer,W.type=new t.ProtocolRequestType0(W.method),(Y=H||(e.ExitNotification=H={})).method="exit",Y.messageDirection=t.MessageDirection.clientToServer,Y.type=new t.ProtocolNotificationType0(Y.method),(Z=X||(e.DidChangeConfigurationNotification=X={})).method="workspace/didChangeConfiguration",Z.messageDirection=t.MessageDirection.clientToServer,Z.type=new t.ProtocolNotificationType(Z.method),(Q=J||(e.MessageType=J={})).Error=1,Q.Warning=2,Q.Info=3,Q.Log=4,Q.Debug=5,(te=ee||(e.ShowMessageNotification=ee={})).method="window/showMessage",te.messageDirection=t.MessageDirection.serverToClient,te.type=new t.ProtocolNotificationType(te.method),(ne=re||(e.ShowMessageRequest=re={})).method="window/showMessageRequest",ne.messageDirection=t.MessageDirection.serverToClient,ne.type=new t.ProtocolRequestType(ne.method),(ie=ae||(e.LogMessageNotification=ae={})).method="window/logMessage",ie.messageDirection=t.MessageDirection.serverToClient,ie.type=new t.ProtocolNotificationType(ie.method),(oe=se||(e.TelemetryEventNotification=se={})).method="telemetry/event",oe.messageDirection=t.MessageDirection.serverToClient,oe.type=new t.ProtocolNotificationType(oe.method),(ue=le||(e.TextDocumentSyncKind=le={})).None=0,ue.Full=1,ue.Incremental=2,(pe=ce||(e.DidOpenTextDocumentNotification=ce={})).method="textDocument/didOpen",pe.messageDirection=t.MessageDirection.clientToServer,pe.type=new t.ProtocolNotificationType(pe.method),function(e){function t(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}function r(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}Mn(t,"isIncremental"),e.isIncremental=t,Mn(r,"isFull"),e.isFull=r}(de||(e.TextDocumentContentChangeEvent=de={})),(me=fe||(e.DidChangeTextDocumentNotification=fe={})).method="textDocument/didChange",me.messageDirection=t.MessageDirection.clientToServer,me.type=new t.ProtocolNotificationType(me.method),(ye=he||(e.DidCloseTextDocumentNotification=he={})).method="textDocument/didClose",ye.messageDirection=t.MessageDirection.clientToServer,ye.type=new t.ProtocolNotificationType(ye.method),(ve=ge||(e.DidSaveTextDocumentNotification=ge={})).method="textDocument/didSave",ve.messageDirection=t.MessageDirection.clientToServer,ve.type=new t.ProtocolNotificationType(ve.method),($e=Te||(e.TextDocumentSaveReason=Te={})).Manual=1,$e.AfterDelay=2,$e.FocusOut=3,(Ee=Re||(e.WillSaveTextDocumentNotification=Re={})).method="textDocument/willSave",Ee.messageDirection=t.MessageDirection.clientToServer,Ee.type=new t.ProtocolNotificationType(Ee.method),(Ae=be||(e.WillSaveTextDocumentWaitUntilRequest=be={})).method="textDocument/willSaveWaitUntil",Ae.messageDirection=t.MessageDirection.clientToServer,Ae.type=new t.ProtocolRequestType(Ae.method),(Se=Ce||(e.DidChangeWatchedFilesNotification=Ce={})).method="workspace/didChangeWatchedFiles",Se.messageDirection=t.MessageDirection.clientToServer,Se.type=new t.ProtocolNotificationType(Se.method),(xe=ke||(e.FileChangeType=ke={})).Created=1,xe.Changed=2,xe.Deleted=3,function(e){function t(e){const t=e;return n.objectLiteral(t)&&(r.URI.is(t.baseUri)||r.WorkspaceFolder.is(t.baseUri))&&n.string(t.pattern)}Mn(t,"is"),e.is=t}(we||(e.RelativePattern=we={})),(_e=Ne||(e.WatchKind=Ne={})).Create=1,_e.Change=2,_e.Delete=4,(Pe=Ie||(e.PublishDiagnosticsNotification=Ie={})).method="textDocument/publishDiagnostics",Pe.messageDirection=t.MessageDirection.serverToClient,Pe.type=new t.ProtocolNotificationType(Pe.method),(Le=Oe||(e.CompletionTriggerKind=Oe={})).Invoked=1,Le.TriggerCharacter=2,Le.TriggerForIncompleteCompletions=3,(Me=De||(e.CompletionRequest=De={})).method="textDocument/completion",Me.messageDirection=t.MessageDirection.clientToServer,Me.type=new t.ProtocolRequestType(Me.method),(Fe=je||(e.CompletionResolveRequest=je={})).method="completionItem/resolve",Fe.messageDirection=t.MessageDirection.clientToServer,Fe.type=new t.ProtocolRequestType(Fe.method),(ze=Ge||(e.HoverRequest=Ge={})).method="textDocument/hover",ze.messageDirection=t.MessageDirection.clientToServer,ze.type=new t.ProtocolRequestType(ze.method),(qe=Ke||(e.SignatureHelpTriggerKind=Ke={})).Invoked=1,qe.TriggerCharacter=2,qe.ContentChange=3,(Be=Ue||(e.SignatureHelpRequest=Ue={})).method="textDocument/signatureHelp",Be.messageDirection=t.MessageDirection.clientToServer,Be.type=new t.ProtocolRequestType(Be.method),(We=Ve||(e.DefinitionRequest=Ve={})).method="textDocument/definition",We.messageDirection=t.MessageDirection.clientToServer,We.type=new t.ProtocolRequestType(We.method),(Ye=He||(e.ReferencesRequest=He={})).method="textDocument/references",Ye.messageDirection=t.MessageDirection.clientToServer,Ye.type=new t.ProtocolRequestType(Ye.method),(Ze=Xe||(e.DocumentHighlightRequest=Xe={})).method="textDocument/documentHighlight",Ze.messageDirection=t.MessageDirection.clientToServer,Ze.type=new t.ProtocolRequestType(Ze.method),(Qe=Je||(e.DocumentSymbolRequest=Je={})).method="textDocument/documentSymbol",Qe.messageDirection=t.MessageDirection.clientToServer,Qe.type=new t.ProtocolRequestType(Qe.method),(tt=et||(e.CodeActionRequest=et={})).method="textDocument/codeAction",tt.messageDirection=t.MessageDirection.clientToServer,tt.type=new t.ProtocolRequestType(tt.method),(nt=rt||(e.CodeActionResolveRequest=rt={})).method="codeAction/resolve",nt.messageDirection=t.MessageDirection.clientToServer,nt.type=new t.ProtocolRequestType(nt.method),(it=at||(e.WorkspaceSymbolRequest=at={})).method="workspace/symbol",it.messageDirection=t.MessageDirection.clientToServer,it.type=new t.ProtocolRequestType(it.method),(ot=st||(e.WorkspaceSymbolResolveRequest=st={})).method="workspaceSymbol/resolve",ot.messageDirection=t.MessageDirection.clientToServer,ot.type=new t.ProtocolRequestType(ot.method),(ut=lt||(e.CodeLensRequest=lt={})).method="textDocument/codeLens",ut.messageDirection=t.MessageDirection.clientToServer,ut.type=new t.ProtocolRequestType(ut.method),(pt=ct||(e.CodeLensResolveRequest=ct={})).method="codeLens/resolve",pt.messageDirection=t.MessageDirection.clientToServer,pt.type=new t.ProtocolRequestType(pt.method),(ft=dt||(e.CodeLensRefreshRequest=dt={})).method="workspace/codeLens/refresh",ft.messageDirection=t.MessageDirection.serverToClient,ft.type=new t.ProtocolRequestType0(ft.method),(ht=mt||(e.DocumentLinkRequest=mt={})).method="textDocument/documentLink",ht.messageDirection=t.MessageDirection.clientToServer,ht.type=new t.ProtocolRequestType(ht.method),(gt=yt||(e.DocumentLinkResolveRequest=yt={})).method="documentLink/resolve",gt.messageDirection=t.MessageDirection.clientToServer,gt.type=new t.ProtocolRequestType(gt.method),(Tt=vt||(e.DocumentFormattingRequest=vt={})).method="textDocument/formatting",Tt.messageDirection=t.MessageDirection.clientToServer,Tt.type=new t.ProtocolRequestType(Tt.method),(Rt=$t||(e.DocumentRangeFormattingRequest=$t={})).method="textDocument/rangeFormatting",Rt.messageDirection=t.MessageDirection.clientToServer,Rt.type=new t.ProtocolRequestType(Rt.method),(bt=Et||(e.DocumentRangesFormattingRequest=Et={})).method="textDocument/rangesFormatting",bt.messageDirection=t.MessageDirection.clientToServer,bt.type=new t.ProtocolRequestType(bt.method),(Ct=At||(e.DocumentOnTypeFormattingRequest=At={})).method="textDocument/onTypeFormatting",Ct.messageDirection=t.MessageDirection.clientToServer,Ct.type=new t.ProtocolRequestType(Ct.method),(St||(e.PrepareSupportDefaultBehavior=St={})).Identifier=1,(xt=kt||(e.RenameRequest=kt={})).method="textDocument/rename",xt.messageDirection=t.MessageDirection.clientToServer,xt.type=new t.ProtocolRequestType(xt.method),(Nt=wt||(e.PrepareRenameRequest=wt={})).method="textDocument/prepareRename",Nt.messageDirection=t.MessageDirection.clientToServer,Nt.type=new t.ProtocolRequestType(Nt.method),(It=_t||(e.ExecuteCommandRequest=_t={})).method="workspace/executeCommand",It.messageDirection=t.MessageDirection.clientToServer,It.type=new t.ProtocolRequestType(It.method),(Ot=Pt||(e.ApplyWorkspaceEditRequest=Pt={})).method="workspace/applyEdit",Ot.messageDirection=t.MessageDirection.serverToClient,Ot.type=new t.ProtocolRequestType("workspace/applyEdit")}}),La=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=ua();function r(e,r,n,a){return t.ConnectionStrategy.is(a)&&(a={connectionStrategy:a}),(0,t.createMessageConnection)(e,r,n,a)}Mn(r,"createProtocolConnection"),e.createProtocolConnection=r}}),Da=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:Mn(function(){return t[r]},"get")}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,r(ua(),e),r((Wn(),qn(Un)),e),r(pa(),e),r(Oa(),e);var n,a,i=La();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:Mn(function(){return i.createProtocolConnection},"get")}),(a=n||(e.LSPErrorCodes=n={})).lspReservedErrorRangeStart=-32899,a.RequestFailed=-32803,a.ServerCancelled=-32802,a.ContentModified=-32801,a.RequestCancelled=-32800,a.lspReservedErrorRangeEnd=-32800}}),Ma=jn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:Mn(function(){return t[r]},"get")}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=ca();function a(e,t,r,a){return(0,n.createMessageConnection)(e,t,r,a)}r(ca(),e),r(Da(),e),Mn(a,"createProtocolConnection"),e.createProtocolConnection=a}}),ja={};Fn(ja,{AbstractAstReflection:()=>Ba,AbstractCstNode:()=>nN,AbstractLangiumParser:()=>pN,AbstractParserErrorMessageProvider:()=>fN,AbstractThreadedAsyncParser:()=>zI,AstUtils:()=>ni,BiMap:()=>R_,Cancellation:()=>qN,CompositeCstNodeImpl:()=>iN,ContextCache:()=>w_,CstNodeBuilder:()=>rN,CstUtils:()=>Fa,DEFAULT_TOKENIZE_OPTIONS:()=>iI,DONE_RESULT:()=>Qa,DatatypeSymbol:()=>lN,DefaultAstNodeDescriptionProvider:()=>H_,DefaultAstNodeLocator:()=>X_,DefaultAsyncParser:()=>GI,DefaultCommentProvider:()=>FI,DefaultConfigurationProvider:()=>Q_,DefaultDocumentBuilder:()=>tI,DefaultDocumentValidator:()=>U_,DefaultHydrator:()=>UI,DefaultIndexManager:()=>rI,DefaultJsonSerializer:()=>M_,DefaultLangiumDocumentFactory:()=>f_,DefaultLangiumDocuments:()=>m_,DefaultLangiumProfiler:()=>kP,DefaultLexer:()=>sI,DefaultLexerErrorMessageProvider:()=>aI,DefaultLinker:()=>y_,DefaultNameProvider:()=>v_,DefaultReferenceDescriptionProvider:()=>Y_,DefaultReferences:()=>T_,DefaultScopeComputation:()=>E_,DefaultScopeProvider:()=>I_,DefaultServiceRegistry:()=>j_,DefaultTokenBuilder:()=>zN,DefaultValueConverter:()=>KN,DefaultWorkspaceLock:()=>qI,DefaultWorkspaceManager:()=>nI,Deferred:()=>e_,Disposable:()=>J_,DisposableCache:()=>k_,DocumentCache:()=>N_,DocumentState:()=>c_,DocumentValidator:()=>G_,EMPTY_SCOPE:()=>S_,EMPTY_STREAM:()=>Ja,EmptyFileSystem:()=>oP,EmptyFileSystemProvider:()=>sP,ErrorWithLocation:()=>zo,GrammarAST:()=>vi,GrammarUtils:()=>Go,IndentationAwareLexer:()=>aP,IndentationAwareTokenBuilder:()=>nP,JSDocDocumentationProvider:()=>jI,LangiumCompletionParser:()=>hN,LangiumParser:()=>dN,LangiumParserErrorMessageProvider:()=>mN,LeafCstNodeImpl:()=>aN,LexingMode:()=>eP,MapScope:()=>A_,Module:()=>MI,MultiMap:()=>$_,MultiMapScope:()=>C_,OperationCancelled:()=>YN,ParserWorker:()=>KI,ProfilingTask:()=>xP,Reduction:()=>ti,RefResolving:()=>h_,RegExpUtils:()=>Uo,RootCstNodeImpl:()=>oN,SimpleCache:()=>x_,StreamImpl:()=>Ya,StreamScope:()=>b_,TextDocument:()=>JN,TreeStreamImpl:()=>ri,URI:()=>l_,UriTrie:()=>d_,UriUtils:()=>o_,VALIDATE_EACH_NODE:()=>q_,ValidationCategory:()=>L_,ValidationRegistry:()=>K_,ValueConverter:()=>GN,WorkspaceCache:()=>__,assertCondition:()=>qo,assertUnreachable:()=>Ko,createCompletionParser:()=>MN,createDefaultCoreModule:()=>BI,createDefaultSharedCoreModule:()=>VI,createGrammarConfig:()=>eu,createLangiumParser:()=>jN,createParser:()=>TN,delayNextTick:()=>UN,diagnosticData:()=>F_,eagerLoad:()=>YI,getDiagnosticRange:()=>B_,indentationBuilderDefaultOptions:()=>rP,inject:()=>WI,interruptAndCheck:()=>ZN,isAstNode:()=>Ga,isAstNodeDescription:()=>qa,isAstNodeWithComment:()=>P_,isCompositeCstNode:()=>Va,isIMultiModeLexerDefinition:()=>lI,isJSDoc:()=>pI,isLeafCstNode:()=>Wa,isLinkingError:()=>Ua,isMultiReference:()=>Ka,isNamed:()=>g_,isOperationCancelled:()=>XN,isReference:()=>za,isRootCstNode:()=>Ha,isTokenTypeArray:()=>oI,isTokenTypeDictionary:()=>uI,loadGrammarFromJson:()=>pP,parseJSDoc:()=>cI,prepareLangiumParser:()=>FN,setInterruptionPeriod:()=>HN,startCancelableOperation:()=>WN,stream:()=>ei,toDiagnosticData:()=>W_,toDiagnosticSeverity:()=>V_});var Fa={};function Ga(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function za(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"ref"in e}function Ka(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"items"in e}function qa(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function Ua(e){return"object"==typeof e&&null!==e&&"object"==typeof e.info&&"string"==typeof e.message}Fn(Fa,{DefaultNameRegexp:()=>ko,RangeComparison:()=>ho,compareRange:()=>Co,findCommentNode:()=>wo,findDeclarationNodeAtOffset:()=>xo,findLeafNodeAtOffset:()=>_o,findLeafNodeBeforeOffset:()=>Io,flattenCst:()=>Ro,getDatatypeNode:()=>To,getInteriorNodes:()=>Mo,getNextNode:()=>Lo,getPreviousNode:()=>Oo,getStartlineNode:()=>Do,inRange:()=>So,isChildNode:()=>Eo,isCommentNode:()=>No,streamCst:()=>$o,toDocumentSegment:()=>Ao,tokenToRange:()=>bo}),Mn(Ga,"isAstNode"),Mn(za,"isReference"),Mn(Ka,"isMultiReference"),Mn(qa,"isAstNodeDescription"),Mn(Ua,"isLinkingError");var Ba=(Mn(e=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var t;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=null==(t=r.properties[e.property])?void 0:t.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const t=this.types[e];return t||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return Ga(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const n=r[t];if(void 0!==n)return n;{const n=this.types[e],a=!!n&&n.superTypes.some(e=>this.isSubtype(e,t));return r[t]=a,a}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const t=this.getAllTypes(),r=[];for(const n of t)this.isSubtype(n,e)&&r.push(n);return this.allSubtypes[e]=r,r}}},"AbstractAstReflection"),e);function Va(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function Wa(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function Ha(e){return Va(e)&&"string"==typeof e.fullText}Mn(Va,"isCompositeCstNode"),Mn(Wa,"isLeafCstNode"),Mn(Ha,"isRootCstNode");var Ya=(t=class{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:Mn(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0,r=e.next();for(;!r.done;)t++,r=e.next();return t}toArray(){const e=[],t=this.iterator();let r;do{r=t.next(),void 0!==r.value&&e.push(r.value)}while(!r.done);return e}toSet(){return new Set(this)}toMap(e,t){const r=this.map(r=>[e?e(r):r,t?t(r):r]);return new Map(r)}toString(){return this.join()}concat(e){return new t(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do{if(t=this.nextFn(e.first),!t.done)return t}while(!t.done);e.firstDone=!0}do{if(t=e.iterator.next(),!t.done)return t}while(!t.done);return Qa})}join(e=","){const t=this.iterator();let r,n="",a=!1;do{r=t.next(),r.done||(a&&(n+=e),n+=Xa(r.value)),a=!0}while(!r.done);return n}indexOf(e,t=0){const r=this.iterator();let n=0,a=r.next();for(;!a.done;){if(n>=t&&a.value===e)return n;a=r.next(),n++}return-1}every(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(!e(r.value))return!1;r=t.next()}return!0}some(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return!0;r=t.next()}return!1}forEach(e){const t=this.iterator();let r=0,n=t.next();for(;!n.done;)e(n.value,r),n=t.next(),r++}map(e){return new t(this.startFn,t=>{const{done:r,value:n}=this.nextFn(t);return r?Qa:{done:!1,value:e(n)}})}filter(e){return new t(this.startFn,t=>{let r;do{if(r=this.nextFn(t),!r.done&&e(r.value))return r}while(!r.done);return Qa})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){const r=this.iterator();let n=t,a=r.next();for(;!a.done;)n=void 0===n?a.value:e(n,a.value),a=r.next();return n}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){const n=e.next();if(n.done)return r;const a=this.recursiveReduce(e,t,r);return void 0===a?n.value:t(a,n.value)}find(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return r.value;r=t.next()}}findIndex(e){const t=this.iterator();let r=0,n=t.next();for(;!n.done;){if(e(n.value))return r;n=t.next(),r++}return-1}includes(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(r.value===e)return!0;r=t.next()}return!1}flatMap(e){return new t(()=>({this:this.startFn()}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:r,value:n}=this.nextFn(t.this);if(!r){const r=e(n);if(!Za(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return Qa})}flat(e){if(void 0===e&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new t(()=>({this:r.startFn()}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:t,value:n}=r.nextFn(e.this);if(!t){if(!Za(n))return{done:!1,value:n};e.iterator=n[Symbol.iterator]()}}while(e.iterator);return Qa})}head(){const e=this.iterator().next();if(!e.done)return e.value}tail(e=1){return new t(()=>{const t=this.startFn();for(let r=0;r<e;r++){if(this.nextFn(t).done)return t}return t},this.nextFn)}limit(e){return new t(()=>({size:0,state:this.startFn()}),t=>(t.size++,t.size>e?Qa:this.nextFn(t.state)))}distinct(e){return new t(()=>({set:new Set,internalState:this.startFn()}),t=>{let r;do{if(r=this.nextFn(t.internalState),!r.done){const n=e?e(r.value):r.value;if(!t.set.has(n))return t.set.add(n),r}}while(!r.done);return Qa})}exclude(e,t){const r=new Set;for(const n of e){const e=t?t(n):n;r.add(e)}return this.filter(e=>{const n=t?t(e):e;return!r.has(n)})}},Mn(t,"StreamImpl"),t);function Xa(e){return"string"==typeof e?e:void 0===e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function Za(e){return!!e&&"function"==typeof e[Symbol.iterator]}Mn(Xa,"toString"),Mn(Za,"isIterable");var Ja=new Ya(()=>{},()=>Qa),Qa=Object.freeze({done:!0,value:void 0});function ei(...e){if(1===e.length){const t=e[0];if(t instanceof Ya)return t;if(Za(t))return new Ya(()=>t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new Ya(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:Qa)}return e.length>1?new Ya(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){const r=e[t.collIndex++];Za(r)?t.iterator=r[Symbol.iterator]():r&&"number"==typeof r.length&&(t.array=r)}}while(t.iterator||t.array||t.collIndex<e.length);return Qa}):Ja}Mn(ei,"stream");var ti,ri=(Mn(r=class extends Ya{constructor(e,t,r){super(()=>({iterators:(null==r?void 0:r.includeRoot)?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);e.iterators.length>0;){const r=e.iterators[e.iterators.length-1].next();if(!r.done)return e.iterators.push(t(r.value)[Symbol.iterator]()),r;e.iterators.pop()}return Qa})}iterator(){const e={state:this.startFn(),next:Mn(()=>this.nextFn(e.state),"next"),prune:Mn(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},"TreeStreamImpl"),r);!function(e){function t(e){return e.reduce((e,t)=>e+t,0)}function r(e){return e.reduce((e,t)=>e*t,0)}function n(e){return e.reduce((e,t)=>Math.min(e,t))}function a(e){return e.reduce((e,t)=>Math.max(e,t))}Mn(t,"sum"),e.sum=t,Mn(r,"product"),e.product=r,Mn(n,"min"),e.min=n,Mn(a,"max"),e.max=a}(ti||(ti={}));var ni={};function ai(e,t={}){for(const[r,n]of Object.entries(e))r.startsWith("$")||(Array.isArray(n)?n.forEach((n,a)=>{Ga(n)&&(n.$container=e,n.$containerProperty=r,n.$containerIndex=a,t.deep&&ai(n,t))}):Ga(n)&&(n.$container=e,n.$containerProperty=r,t.deep&&ai(n,t)))}function ii(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function si(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function oi(e){const t=li(e).$document;if(!t)throw new Error("AST node has no document.");return t}function li(e){for(;e.$container;)e=e.$container;return e}function ui(e){return za(e)?e.ref?[e.ref]:[]:Ka(e)?e.items.map(e=>e.ref):[]}function ci(e,t){if(!e)throw new Error("Node must be an AstNode.");const r=null==t?void 0:t.range;return new Ya(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){const n=t.keys[t.keyIndex];if(!n.startsWith("$")){const a=e[n];if(Ga(a)){if(t.keyIndex++,fi(a,r))return{done:!1,value:a}}else if(Array.isArray(a)){for(;t.arrayIndex<a.length;){const e=a[t.arrayIndex++];if(Ga(e)&&fi(e,r))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return Qa})}function pi(e,t){if(!e)throw new Error("Root node must be an AstNode.");return new ri(e,e=>ci(e,t))}function di(e,t){if(!e)throw new Error("Root node must be an AstNode.");return(null==t?void 0:t.range)&&!fi(e,t.range)?new ri(e,()=>[]):new ri(e,e=>ci(e,t),{includeRoot:!0})}function fi(e,t){var r;if(!t)return!0;const n=null==(r=e.$cstNode)?void 0:r.range;return!!n&&So(n,t)}function mi(e){return new Ya(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){const r=t.keys[t.keyIndex];if(!r.startsWith("$")){const n=e[r];if(za(n)||Ka(n))return t.keyIndex++,{done:!1,value:{reference:n,container:e,property:r}};if(Array.isArray(n)){for(;t.arrayIndex<n.length;){const a=t.arrayIndex++,i=n[a];if(za(i)||Ka(n))return{done:!1,value:{reference:i,container:e,property:r,index:a}}}t.arrayIndex=0}}t.keyIndex++}return Qa})}function hi(e,t){const r=e.getTypeMetaData(t.$type),n=t;for(const a of Object.values(r.properties))void 0!==a.defaultValue&&void 0===n[a.name]&&(n[a.name]=yi(a.defaultValue))}function yi(e){return Array.isArray(e)?[...e.map(yi)]:e}function gi(e,t,r){const n={$type:e.$type};r&&(r.set(e,n),r.set(n,e));for(const[a,i]of Object.entries(e))if(!a.startsWith("$"))if(Ga(i))n[a]=gi(i,t,r);else if(za(i))n[a]=t(n,a,i.$refNode,i.$refText,i);else if(Array.isArray(i)){const e=[];for(const s of i)Ga(s)?e.push(gi(s,t,r)):za(s)?e.push(t(n,a,s.$refNode,s.$refText,s)):e.push(s);n[a]=e}else n[a]=i;return ai(n,{deep:!0}),n}Fn(ni,{assignMandatoryProperties:()=>hi,copyAstNode:()=>gi,findRootNode:()=>li,getContainerOfType:()=>ii,getDocument:()=>oi,getReferenceNodes:()=>ui,hasContainerOfType:()=>si,linkContentToContainer:()=>ai,streamAllContents:()=>pi,streamAst:()=>di,streamContents:()=>ci,streamReferences:()=>mi}),Mn(ai,"linkContentToContainer"),Mn(ii,"getContainerOfType"),Mn(si,"hasContainerOfType"),Mn(oi,"getDocument"),Mn(li,"findRootNode"),Mn(ui,"getReferenceNodes"),Mn(ci,"streamContents"),Mn(pi,"streamAllContents"),Mn(di,"streamAst"),Mn(fi,"isAstNodeInRange"),Mn(mi,"streamReferences"),Mn(hi,"assignMandatoryProperties"),Mn(yi,"copyDefaultValue"),Mn(gi,"copyAstNode");var vi={};Fn(vi,{AbstractElement:()=>$i,AbstractParserRule:()=>Ei,AbstractRule:()=>Ai,AbstractType:()=>Si,Action:()=>xi,Alternatives:()=>Ni,ArrayLiteral:()=>Ii,ArrayType:()=>Oi,Assignment:()=>Di,BooleanLiteral:()=>ji,CharacterRange:()=>Gi,Condition:()=>Ki,Conjunction:()=>Ui,CrossReference:()=>Vi,Disjunction:()=>Hi,EndOfFile:()=>Xi,Grammar:()=>Ji,GrammarImport:()=>es,Group:()=>rs,InferredType:()=>as,InfixRule:()=>ss,InfixRuleOperatorList:()=>ls,InfixRuleOperators:()=>cs,Interface:()=>ds,Keyword:()=>ms,LangiumGrammarAstReflection:()=>go,LangiumGrammarTerminals:()=>Ti,NamedArgument:()=>ys,NegatedToken:()=>vs,Negation:()=>$s,NumberLiteral:()=>Es,Parameter:()=>As,ParameterReference:()=>Ss,ParserRule:()=>xs,ReferenceType:()=>Ns,RegexToken:()=>Is,ReturnType:()=>Os,RuleCall:()=>Ds,SimpleType:()=>js,StringLiteral:()=>Gs,TerminalAlternatives:()=>Ks,TerminalElement:()=>Us,TerminalGroup:()=>Vs,TerminalRule:()=>Hs,TerminalRuleCall:()=>Xs,Type:()=>Js,TypeAttribute:()=>eo,TypeDefinition:()=>ro,UnionType:()=>ao,UnorderedGroup:()=>so,UntilToken:()=>lo,ValueLiteral:()=>co,Wildcard:()=>fo,isAbstractElement:()=>Ri,isAbstractParserRule:()=>bi,isAbstractRule:()=>Ci,isAbstractType:()=>ki,isAction:()=>wi,isAlternatives:()=>_i,isArrayLiteral:()=>Pi,isArrayType:()=>Li,isAssignment:()=>Mi,isBooleanLiteral:()=>Fi,isCharacterRange:()=>zi,isCondition:()=>qi,isConjunction:()=>Bi,isCrossReference:()=>Wi,isDisjunction:()=>Yi,isEndOfFile:()=>Zi,isGrammar:()=>Qi,isGrammarImport:()=>ts,isGroup:()=>ns,isInferredType:()=>is,isInfixRule:()=>os,isInfixRuleOperatorList:()=>us,isInfixRuleOperators:()=>ps,isInterface:()=>fs,isKeyword:()=>hs,isNamedArgument:()=>gs,isNegatedToken:()=>Ts,isNegation:()=>Rs,isNumberLiteral:()=>bs,isParameter:()=>Cs,isParameterReference:()=>ks,isParserRule:()=>ws,isReferenceType:()=>_s,isRegexToken:()=>Ps,isReturnType:()=>Ls,isRuleCall:()=>Ms,isSimpleType:()=>Fs,isStringLiteral:()=>zs,isTerminalAlternatives:()=>qs,isTerminalElement:()=>Bs,isTerminalGroup:()=>Ws,isTerminalRule:()=>Ys,isTerminalRuleCall:()=>Zs,isType:()=>Qs,isTypeAttribute:()=>to,isTypeDefinition:()=>no,isUnionType:()=>io,isUnorderedGroup:()=>oo,isUntilToken:()=>uo,isValueLiteral:()=>po,isWildcard:()=>mo,reflection:()=>vo});var Ti={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]*/},$i={$type:"AbstractElement",cardinality:"cardinality"};function Ri(e){return vo.isInstance(e,$i.$type)}Mn(Ri,"isAbstractElement");var Ei={$type:"AbstractParserRule"};function bi(e){return vo.isInstance(e,Ei.$type)}Mn(bi,"isAbstractParserRule");var Ai={$type:"AbstractRule"};function Ci(e){return vo.isInstance(e,Ai.$type)}Mn(Ci,"isAbstractRule");var Si={$type:"AbstractType"};function ki(e){return vo.isInstance(e,Si.$type)}Mn(ki,"isAbstractType");var xi={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function wi(e){return vo.isInstance(e,xi.$type)}Mn(wi,"isAction");var Ni={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function _i(e){return vo.isInstance(e,Ni.$type)}Mn(_i,"isAlternatives");var Ii={$type:"ArrayLiteral",elements:"elements"};function Pi(e){return vo.isInstance(e,Ii.$type)}Mn(Pi,"isArrayLiteral");var Oi={$type:"ArrayType",elementType:"elementType"};function Li(e){return vo.isInstance(e,Oi.$type)}Mn(Li,"isArrayType");var Di={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Mi(e){return vo.isInstance(e,Di.$type)}Mn(Mi,"isAssignment");var ji={$type:"BooleanLiteral",true:"true"};function Fi(e){return vo.isInstance(e,ji.$type)}Mn(Fi,"isBooleanLiteral");var Gi={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function zi(e){return vo.isInstance(e,Gi.$type)}Mn(zi,"isCharacterRange");var Ki={$type:"Condition"};function qi(e){return vo.isInstance(e,Ki.$type)}Mn(qi,"isCondition");var Ui={$type:"Conjunction",left:"left",right:"right"};function Bi(e){return vo.isInstance(e,Ui.$type)}Mn(Bi,"isConjunction");var Vi={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Wi(e){return vo.isInstance(e,Vi.$type)}Mn(Wi,"isCrossReference");var Hi={$type:"Disjunction",left:"left",right:"right"};function Yi(e){return vo.isInstance(e,Hi.$type)}Mn(Yi,"isDisjunction");var Xi={$type:"EndOfFile",cardinality:"cardinality"};function Zi(e){return vo.isInstance(e,Xi.$type)}Mn(Zi,"isEndOfFile");var Ji={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function Qi(e){return vo.isInstance(e,Ji.$type)}Mn(Qi,"isGrammar");var es={$type:"GrammarImport",path:"path"};function ts(e){return vo.isInstance(e,es.$type)}Mn(ts,"isGrammarImport");var rs={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function ns(e){return vo.isInstance(e,rs.$type)}Mn(ns,"isGroup");var as={$type:"InferredType",name:"name"};function is(e){return vo.isInstance(e,as.$type)}Mn(is,"isInferredType");var ss={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function os(e){return vo.isInstance(e,ss.$type)}Mn(os,"isInfixRule");var ls={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function us(e){return vo.isInstance(e,ls.$type)}Mn(us,"isInfixRuleOperatorList");var cs={$type:"InfixRuleOperators",precedences:"precedences"};function ps(e){return vo.isInstance(e,cs.$type)}Mn(ps,"isInfixRuleOperators");var ds={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function fs(e){return vo.isInstance(e,ds.$type)}Mn(fs,"isInterface");var ms={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function hs(e){return vo.isInstance(e,ms.$type)}Mn(hs,"isKeyword");var ys={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function gs(e){return vo.isInstance(e,ys.$type)}Mn(gs,"isNamedArgument");var vs={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Ts(e){return vo.isInstance(e,vs.$type)}Mn(Ts,"isNegatedToken");var $s={$type:"Negation",value:"value"};function Rs(e){return vo.isInstance(e,$s.$type)}Mn(Rs,"isNegation");var Es={$type:"NumberLiteral",value:"value"};function bs(e){return vo.isInstance(e,Es.$type)}Mn(bs,"isNumberLiteral");var As={$type:"Parameter",name:"name"};function Cs(e){return vo.isInstance(e,As.$type)}Mn(Cs,"isParameter");var Ss={$type:"ParameterReference",parameter:"parameter"};function ks(e){return vo.isInstance(e,Ss.$type)}Mn(ks,"isParameterReference");var xs={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function ws(e){return vo.isInstance(e,xs.$type)}Mn(ws,"isParserRule");var Ns={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function _s(e){return vo.isInstance(e,Ns.$type)}Mn(_s,"isReferenceType");var Is={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Ps(e){return vo.isInstance(e,Is.$type)}Mn(Ps,"isRegexToken");var Os={$type:"ReturnType",name:"name"};function Ls(e){return vo.isInstance(e,Os.$type)}Mn(Ls,"isReturnType");var Ds={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Ms(e){return vo.isInstance(e,Ds.$type)}Mn(Ms,"isRuleCall");var js={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Fs(e){return vo.isInstance(e,js.$type)}Mn(Fs,"isSimpleType");var Gs={$type:"StringLiteral",value:"value"};function zs(e){return vo.isInstance(e,Gs.$type)}Mn(zs,"isStringLiteral");var Ks={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function qs(e){return vo.isInstance(e,Ks.$type)}Mn(qs,"isTerminalAlternatives");var Us={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Bs(e){return vo.isInstance(e,Us.$type)}Mn(Bs,"isTerminalElement");var Vs={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Ws(e){return vo.isInstance(e,Vs.$type)}Mn(Ws,"isTerminalGroup");var Hs={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Ys(e){return vo.isInstance(e,Hs.$type)}Mn(Ys,"isTerminalRule");var Xs={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Zs(e){return vo.isInstance(e,Xs.$type)}Mn(Zs,"isTerminalRuleCall");var Js={$type:"Type",name:"name",type:"type"};function Qs(e){return vo.isInstance(e,Js.$type)}Mn(Qs,"isType");var eo={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function to(e){return vo.isInstance(e,eo.$type)}Mn(to,"isTypeAttribute");var ro={$type:"TypeDefinition"};function no(e){return vo.isInstance(e,ro.$type)}Mn(no,"isTypeDefinition");var ao={$type:"UnionType",types:"types"};function io(e){return vo.isInstance(e,ao.$type)}Mn(io,"isUnionType");var so={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function oo(e){return vo.isInstance(e,so.$type)}Mn(oo,"isUnorderedGroup");var lo={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function uo(e){return vo.isInstance(e,lo.$type)}Mn(uo,"isUntilToken");var co={$type:"ValueLiteral"};function po(e){return vo.isInstance(e,co.$type)}Mn(po,"isValueLiteral");var fo={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function mo(e){return vo.isInstance(e,fo.$type)}Mn(mo,"isWildcard");var ho,yo,go=(Mn(n=class extends Ba{constructor(){super(...arguments),this.types={AbstractElement:{name:$i.$type,properties:{cardinality:{name:$i.cardinality}},superTypes:[]},AbstractParserRule:{name:Ei.$type,properties:{},superTypes:[Ai.$type,Si.$type]},AbstractRule:{name:Ai.$type,properties:{},superTypes:[]},AbstractType:{name:Si.$type,properties:{},superTypes:[]},Action:{name:xi.$type,properties:{cardinality:{name:xi.cardinality},feature:{name:xi.feature},inferredType:{name:xi.inferredType},operator:{name:xi.operator},type:{name:xi.type,referenceType:Si.$type}},superTypes:[$i.$type]},Alternatives:{name:Ni.$type,properties:{cardinality:{name:Ni.cardinality},elements:{name:Ni.elements,defaultValue:[]}},superTypes:[$i.$type]},ArrayLiteral:{name:Ii.$type,properties:{elements:{name:Ii.elements,defaultValue:[]}},superTypes:[co.$type]},ArrayType:{name:Oi.$type,properties:{elementType:{name:Oi.elementType}},superTypes:[ro.$type]},Assignment:{name:Di.$type,properties:{cardinality:{name:Di.cardinality},feature:{name:Di.feature},operator:{name:Di.operator},predicate:{name:Di.predicate},terminal:{name:Di.terminal}},superTypes:[$i.$type]},BooleanLiteral:{name:ji.$type,properties:{true:{name:ji.true,defaultValue:!1}},superTypes:[Ki.$type,co.$type]},CharacterRange:{name:Gi.$type,properties:{cardinality:{name:Gi.cardinality},left:{name:Gi.left},lookahead:{name:Gi.lookahead},parenthesized:{name:Gi.parenthesized,defaultValue:!1},right:{name:Gi.right}},superTypes:[Us.$type]},Condition:{name:Ki.$type,properties:{},superTypes:[]},Conjunction:{name:Ui.$type,properties:{left:{name:Ui.left},right:{name:Ui.right}},superTypes:[Ki.$type]},CrossReference:{name:Vi.$type,properties:{cardinality:{name:Vi.cardinality},deprecatedSyntax:{name:Vi.deprecatedSyntax,defaultValue:!1},isMulti:{name:Vi.isMulti,defaultValue:!1},terminal:{name:Vi.terminal},type:{name:Vi.type,referenceType:Si.$type}},superTypes:[$i.$type]},Disjunction:{name:Hi.$type,properties:{left:{name:Hi.left},right:{name:Hi.right}},superTypes:[Ki.$type]},EndOfFile:{name:Xi.$type,properties:{cardinality:{name:Xi.cardinality}},superTypes:[$i.$type]},Grammar:{name:Ji.$type,properties:{imports:{name:Ji.imports,defaultValue:[]},interfaces:{name:Ji.interfaces,defaultValue:[]},isDeclared:{name:Ji.isDeclared,defaultValue:!1},name:{name:Ji.name},rules:{name:Ji.rules,defaultValue:[]},types:{name:Ji.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:es.$type,properties:{path:{name:es.path}},superTypes:[]},Group:{name:rs.$type,properties:{cardinality:{name:rs.cardinality},elements:{name:rs.elements,defaultValue:[]},guardCondition:{name:rs.guardCondition},predicate:{name:rs.predicate}},superTypes:[$i.$type]},InferredType:{name:as.$type,properties:{name:{name:as.name}},superTypes:[Si.$type]},InfixRule:{name:ss.$type,properties:{call:{name:ss.call},dataType:{name:ss.dataType},inferredType:{name:ss.inferredType},name:{name:ss.name},operators:{name:ss.operators},parameters:{name:ss.parameters,defaultValue:[]},returnType:{name:ss.returnType,referenceType:Si.$type}},superTypes:[Ei.$type]},InfixRuleOperatorList:{name:ls.$type,properties:{associativity:{name:ls.associativity},operators:{name:ls.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:cs.$type,properties:{precedences:{name:cs.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:ds.$type,properties:{attributes:{name:ds.attributes,defaultValue:[]},name:{name:ds.name},superTypes:{name:ds.superTypes,defaultValue:[],referenceType:Si.$type}},superTypes:[Si.$type]},Keyword:{name:ms.$type,properties:{cardinality:{name:ms.cardinality},predicate:{name:ms.predicate},value:{name:ms.value}},superTypes:[$i.$type]},NamedArgument:{name:ys.$type,properties:{calledByName:{name:ys.calledByName,defaultValue:!1},parameter:{name:ys.parameter,referenceType:As.$type},value:{name:ys.value}},superTypes:[]},NegatedToken:{name:vs.$type,properties:{cardinality:{name:vs.cardinality},lookahead:{name:vs.lookahead},parenthesized:{name:vs.parenthesized,defaultValue:!1},terminal:{name:vs.terminal}},superTypes:[Us.$type]},Negation:{name:$s.$type,properties:{value:{name:$s.value}},superTypes:[Ki.$type]},NumberLiteral:{name:Es.$type,properties:{value:{name:Es.value}},superTypes:[co.$type]},Parameter:{name:As.$type,properties:{name:{name:As.name}},superTypes:[]},ParameterReference:{name:Ss.$type,properties:{parameter:{name:Ss.parameter,referenceType:As.$type}},superTypes:[Ki.$type]},ParserRule:{name:xs.$type,properties:{dataType:{name:xs.dataType},definition:{name:xs.definition},entry:{name:xs.entry,defaultValue:!1},fragment:{name:xs.fragment,defaultValue:!1},inferredType:{name:xs.inferredType},name:{name:xs.name},parameters:{name:xs.parameters,defaultValue:[]},returnType:{name:xs.returnType,referenceType:Si.$type}},superTypes:[Ei.$type]},ReferenceType:{name:Ns.$type,properties:{isMulti:{name:Ns.isMulti,defaultValue:!1},referenceType:{name:Ns.referenceType}},superTypes:[ro.$type]},RegexToken:{name:Is.$type,properties:{cardinality:{name:Is.cardinality},lookahead:{name:Is.lookahead},parenthesized:{name:Is.parenthesized,defaultValue:!1},regex:{name:Is.regex}},superTypes:[Us.$type]},ReturnType:{name:Os.$type,properties:{name:{name:Os.name}},superTypes:[]},RuleCall:{name:Ds.$type,properties:{arguments:{name:Ds.arguments,defaultValue:[]},cardinality:{name:Ds.cardinality},predicate:{name:Ds.predicate},rule:{name:Ds.rule,referenceType:Ai.$type}},superTypes:[$i.$type]},SimpleType:{name:js.$type,properties:{primitiveType:{name:js.primitiveType},stringType:{name:js.stringType},typeRef:{name:js.typeRef,referenceType:Si.$type}},superTypes:[ro.$type]},StringLiteral:{name:Gs.$type,properties:{value:{name:Gs.value}},superTypes:[co.$type]},TerminalAlternatives:{name:Ks.$type,properties:{cardinality:{name:Ks.cardinality},elements:{name:Ks.elements,defaultValue:[]},lookahead:{name:Ks.lookahead},parenthesized:{name:Ks.parenthesized,defaultValue:!1}},superTypes:[Us.$type]},TerminalElement:{name:Us.$type,properties:{cardinality:{name:Us.cardinality},lookahead:{name:Us.lookahead},parenthesized:{name:Us.parenthesized,defaultValue:!1}},superTypes:[$i.$type]},TerminalGroup:{name:Vs.$type,properties:{cardinality:{name:Vs.cardinality},elements:{name:Vs.elements,defaultValue:[]},lookahead:{name:Vs.lookahead},parenthesized:{name:Vs.parenthesized,defaultValue:!1}},superTypes:[Us.$type]},TerminalRule:{name:Hs.$type,properties:{definition:{name:Hs.definition},fragment:{name:Hs.fragment,defaultValue:!1},hidden:{name:Hs.hidden,defaultValue:!1},name:{name:Hs.name},type:{name:Hs.type}},superTypes:[Ai.$type]},TerminalRuleCall:{name:Xs.$type,properties:{cardinality:{name:Xs.cardinality},lookahead:{name:Xs.lookahead},parenthesized:{name:Xs.parenthesized,defaultValue:!1},rule:{name:Xs.rule,referenceType:Hs.$type}},superTypes:[Us.$type]},Type:{name:Js.$type,properties:{name:{name:Js.name},type:{name:Js.type}},superTypes:[Si.$type]},TypeAttribute:{name:eo.$type,properties:{defaultValue:{name:eo.defaultValue},isOptional:{name:eo.isOptional,defaultValue:!1},name:{name:eo.name},type:{name:eo.type}},superTypes:[]},TypeDefinition:{name:ro.$type,properties:{},superTypes:[]},UnionType:{name:ao.$type,properties:{types:{name:ao.types,defaultValue:[]}},superTypes:[ro.$type]},UnorderedGroup:{name:so.$type,properties:{cardinality:{name:so.cardinality},elements:{name:so.elements,defaultValue:[]}},superTypes:[$i.$type]},UntilToken:{name:lo.$type,properties:{cardinality:{name:lo.cardinality},lookahead:{name:lo.lookahead},parenthesized:{name:lo.parenthesized,defaultValue:!1},terminal:{name:lo.terminal}},superTypes:[Us.$type]},ValueLiteral:{name:co.$type,properties:{},superTypes:[]},Wildcard:{name:fo.$type,properties:{cardinality:{name:fo.cardinality},lookahead:{name:fo.lookahead},parenthesized:{name:fo.parenthesized,defaultValue:!1}},superTypes:[Us.$type]}}}},"LangiumGrammarAstReflection"),n),vo=new go;function To(e){let t=e,r=!1;for(;t;){const e=ii(t.grammarSource,ws);if(!e||!e.dataType)return r?t:void 0;t=t.container,r=!0}}function $o(e){return new ri(e,e=>Va(e)?e.content:[],{includeRoot:!0})}function Ro(e){return $o(e).filter(Wa)}function Eo(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function bo(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function Ao(e){if(!e)return;const{offset:t,end:r,range:n}=e;return{range:n,offset:t,end:r,length:r-t}}function Co(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return ho.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return ho.After;const r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,n=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return r&&n?ho.Inside:r?ho.OverlapBack:n?ho.OverlapFront:ho.Outside}function So(e,t){return Co(e,t)>ho.After}Mn(To,"getDatatypeNode"),Mn($o,"streamCst"),Mn(Ro,"flattenCst"),Mn(Eo,"isChildNode"),Mn(bo,"tokenToRange"),Mn(Ao,"toDocumentSegment"),(yo=ho||(ho={}))[yo.Before=0]="Before",yo[yo.After=1]="After",yo[yo.OverlapFront=2]="OverlapFront",yo[yo.OverlapBack=3]="OverlapBack",yo[yo.Inside=4]="Inside",yo[yo.Outside=5]="Outside",Mn(Co,"compareRange"),Mn(So,"inRange");var ko=/^[\w\p{L}]$/u;function xo(e,t,r=ko){if(e){if(t>0){const n=t-e.offset,a=e.text.charAt(n);r.test(a)||t--}return _o(e,t)}}function wo(e,t){if(e){const r=Oo(e,!0);if(r&&No(r,t))return r;if(Ha(e)){for(let r=e.content.findIndex(e=>!e.hidden)-1;r>=0;r--){const n=e.content[r];if(No(n,t))return n}}}}function No(e,t){return Wa(e)&&t.includes(e.tokenType.name)}function _o(e,t){if(Wa(e))return e;if(Va(e)){const r=Po(e,t,!1);if(r)return _o(r,t)}}function Io(e,t){if(Wa(e))return e;if(Va(e)){const r=Po(e,t,!0);if(r)return Io(r,t)}}function Po(e,t,r){let n,a=0,i=e.content.length-1;for(;a<=i;){const s=Math.floor((a+i)/2),o=e.content[s];if(o.offset<=t&&o.end>t)return o;o.end<=t?(n=r?o:void 0,a=s+1):i=s-1}return n}function Oo(e,t=!0){for(;e.container;){const r=e.container;let n=r.content.indexOf(e);for(;n>0;){n--;const e=r.content[n];if(t||!e.hidden)return e}e=r}}function Lo(e,t=!0){for(;e.container;){const r=e.container;let n=r.content.indexOf(e);const a=r.content.length-1;for(;n<a;){n++;const e=r.content[n];if(t||!e.hidden)return e}e=r}}function Do(e){if(0===e.range.start.character)return e;const t=e.range.start.line;let r,n=e;for(;e.container;){const a=e.container,i=r??a.content.indexOf(e);if(0===i?(e=a,r=void 0):(r=i-1,e=a.content[r]),e.range.start.line!==t)break;n=e}return n}function Mo(e,t){const r=jo(e,t);return r?r.parent.content.slice(r.a+1,r.b):[]}function jo(e,t){const r=Fo(e),n=Fo(t);let a;for(let i=0;i<r.length&&i<n.length;i++){const e=r[i],t=n[i];if(e.parent!==t.parent)break;a={parent:e.parent,a:e.index,b:t.index}}return a}function Fo(e){const t=[];for(;e.container;){const r=e.container,n=r.content.indexOf(e);t.push({parent:r,index:n}),e=r}return t.reverse()}Mn(xo,"findDeclarationNodeAtOffset"),Mn(wo,"findCommentNode"),Mn(No,"isCommentNode"),Mn(_o,"findLeafNodeAtOffset"),Mn(Io,"findLeafNodeBeforeOffset"),Mn(Po,"binarySearch"),Mn(Oo,"getPreviousNode"),Mn(Lo,"getNextNode"),Mn(Do,"getStartlineNode"),Mn(Mo,"getInteriorNodes"),Mn(jo,"getCommonParent"),Mn(Fo,"getParentChain");var Go={};Fn(Go,{findAssignment:()=>xl,findNameAssignment:()=>wl,findNodeForKeyword:()=>Sl,findNodeForProperty:()=>bl,findNodesForKeyword:()=>Cl,findNodesForKeywordInternal:()=>kl,findNodesForProperty:()=>El,getActionAtElement:()=>_l,getActionType:()=>zl,getAllReachableRules:()=>gl,getAllRulesUsedForCrossReferences:()=>Tl,getCrossReferenceTerminal:()=>$l,getEntryRule:()=>hl,getExplicitRuleType:()=>Fl,getHiddenRules:()=>yl,getRuleType:()=>ql,getRuleTypeName:()=>Kl,getTypeName:()=>Gl,isArrayCardinality:()=>Pl,isArrayOperator:()=>Ol,isCommentTerminal:()=>Rl,isDataType:()=>Ml,isDataTypeRule:()=>Ll,isOptionalCardinality:()=>Il,terminalRegex:()=>Ul});var zo=(a=class extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}},Mn(a,"ErrorWithLocation"),a);function Ko(e,t="Error: Got unexpected value."){throw new Error(t)}function qo(e,t="Error: Condition is violated."){if(!e)throw new Error(t)}Mn(Ko,"assertUnreachable"),Mn(qo,"assertCondition");var Uo={};function Bo(e){return e.charCodeAt(0)}function Vo(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function Wo(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t],e[t]=!0}function Ho(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function Yo(){throw Error("Internal Error - Should never get here!")}function Xo(e){return"Character"===e.type}Fn(Uo,{NEWLINE_REGEXP:()=>il,escapeRegExp:()=>dl,getTerminalParts:()=>ll,isMultilineComment:()=>ul,isWhitespace:()=>pl,partialMatches:()=>fl,partialRegExp:()=>ml,whitespaceCharacters:()=>cl}),Mn(Bo,"cc"),Mn(Vo,"insertToSet"),Mn(Wo,"addFlag"),Mn(Ho,"ASSERT_EXISTS"),Mn(Yo,"ASSERT_NEVER_REACH_HERE"),Mn(Xo,"isCharacter");var Zo=[];for(let zq=Bo("0");zq<=Bo("9");zq++)Zo.push(zq);var Jo=[Bo("_")].concat(Zo);for(let zq=Bo("a");zq<=Bo("z");zq++)Jo.push(zq);for(let zq=Bo("A");zq<=Bo("Z");zq++)Jo.push(zq);var Qo=[Bo(" "),Bo("\f"),Bo("\n"),Bo("\r"),Bo("\t"),Bo("\v"),Bo("\t"),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo(" "),Bo("\u2028"),Bo("\u2029"),Bo(" "),Bo(" "),Bo(" "),Bo("\ufeff")],el=/[0-9a-fA-F]/,tl=/[0-9]/,rl=/[1-9]/,nl=(Mn(i=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Wo(r,"global");break;case"i":Wo(r,"ignoreCase");break;case"m":Wo(r,"multiLine");break;case"u":Wo(r,"unicode");break;case"y":Wo(r,"sticky")}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(){const 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(){const 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(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":let t;switch(this.consumeChar("?"),this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}}Ho(t);const r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return Yo()}quantifier(e=!1){let t;const 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"{":const r=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:r,atMost:r};break;case",":let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:r,atMost:e}):t={atLeast:r,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;Ho(t)}if(!0!==e||void 0!==t)return Ho(t)?("?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(r),t):void 0}atom(){let e;const 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()}if(void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),Ho(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Bo("\n"),Bo("\r"),Bo("\u2028"),Bo("\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=Zo;break;case"D":e=Zo,t=!0;break;case"s":e=Qo;break;case"S":e=Qo,t=!0;break;case"w":e=Jo;break;case"W":e=Jo,t=!0}if(Ho(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Bo("\f");break;case"n":e=Bo("\n");break;case"r":e=Bo("\r");break;case"t":e=Bo("\t");break;case"v":e=Bo("\v")}if(Ho(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Bo("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:Bo(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:Bo(this.popChar())}}}characterClass(){const e=[];let t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){const t=this.classAtom();if(t.type,Xo(t)&&this.isRangeDash()){this.consumeChar("-");const r=this.classAtom();if(r.type,Xo(r)){if(r.value<t.value)throw Error("Range out of order in character class");e.push({from:t.value,to:r.value})}else Vo(t.value,e),e.push(Bo("-")),Vo(r.value,e)}else Vo(t.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:Bo("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;if(this.consumeChar("("),"?"===this.peekChar(0))this.consumeChar("?"),this.consumeChar(":"),e=!1;else this.groupIdx++;const t=this.disjunction();this.consumeChar(")");const r={type:"Group",capturing:e,value:t};return e&&(r.idx=this.groupIdx),r}positiveInteger(){let e=this.popChar();if(!1===rl.test(e))throw Error("Expecting a positive integer");for(;tl.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(!1===tl.test(e))throw Error("Expecting an integer");for(;tl.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:Bo(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return tl.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2)||"<"===this.peekChar(2)&&("="===this.peekChar(3)||"!"===this.peekChar(3)));default:return!1}}isQuantifier(){const e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(t){return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let t="";for(let r=0;r<e;r++){const e=this.popChar();if(!1===el.test(e))throw Error("Expecting a HexDecimal digits");t+=e}return{type:"Character",value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){const e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},"RegExpParser"),i),al=(Mn(s=class{visitChildren(e){for(const t in e){const r=e[t];e.hasOwnProperty(t)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(e=>{this.visit(e)},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)}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){}},"BaseRegExpVisitor"),s),il=/\r?\n/gm,sl=new nl,ol=new(Mn(o=class extends al{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){const t=String.fromCharCode(e.value);if(this.multiline||"\n"!==t||(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=dl(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=Boolean("\n".match(r))}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){if("Group"===e.type){if(e.quantifier)return}super.visitChildren(e)}},"TerminalRegExpVisitor"),o);function ll(e){try{"string"!=typeof e&&(e=e.source),e=`/${e}/`;const t=sl.pattern(e),r=[];for(const n of t.value.value)ol.reset(e),ol.visit(n),r.push({start:ol.startRegexp,end:ol.endRegex});return r}catch{return[]}}function ul(e){try{return"string"==typeof e&&(e=new RegExp(e)),e=e.toString(),ol.reset(e),ol.visit(sl.pattern(e)),ol.multiline}catch{return!1}}Mn(ll,"getTerminalParts"),Mn(ul,"isMultilineComment");var cl="\f\n\r\t\v              \u2028\u2029   \ufeff".split("");function pl(e){const t="string"==typeof e?new RegExp(e):e;return cl.some(e=>t.test(e))}function dl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fl(e,t){const r=ml(e),n=t.match(r);return!!n&&n[0].length>0}function ml(e){"string"==typeof e&&(e=new RegExp(e));const t=e,r=e.source;let n=0;function a(){let e,i="";function s(e){i+=r.substr(n,e),n+=e}function o(e){i+="(?:"+r.substr(n,e)+"|$)",n+=e}for(Mn(s,"appendRaw"),Mn(o,"appendOptional");n<r.length;)switch(r[n]){case"\\":switch(r[n+1]){case"c":o(3);break;case"x":o(4);break;case"u":t.unicode?"{"===r[n+2]?o(r.indexOf("}",n)-n+1):o(6):o(2);break;case"p":case"P":t.unicode?o(r.indexOf("}",n)-n+1):o(2);break;case"k":o(r.indexOf(">",n)-n+1);break;default:o(2)}break;case"[":e=/\[(?:\\.|.)*?\]/g,e.lastIndex=n,e=e.exec(r)||[],o(e[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":s(1);break;case"{":e=/\{\d+,?\d*\}/g,e.lastIndex=n,e=e.exec(r),e?s(e[0].length):o(1);break;case"(":if("?"===r[n+1])switch(r[n+2]){case":":i+="(?:",n+=3,i+=a()+"|$)";break;case"=":i+="(?=",n+=3,i+=a()+")";break;case"!":e=n,n+=3,a(),i+=r.substr(e,n-e);break;case"<":switch(r[n+3]){case"=":case"!":e=n,n+=4,a(),i+=r.substr(e,n-e);break;default:s(r.indexOf(">",n)-n+1),i+=a()+"|$)"}}else s(1),i+=a()+"|$)";break;case")":return++n,i;default:o(1)}return i}return Mn(a,"process"),new RegExp(a(),e.flags)}function hl(e){return e.rules.find(e=>ws(e)&&e.entry)}function yl(e){return e.rules.filter(e=>Ys(e)&&e.hidden)}function gl(e,t){const r=new Set,n=hl(e);if(!n)return new Set(e.rules);const a=[n].concat(yl(e));for(const s of a)vl(s,r,t);const i=new Set;for(const s of e.rules)(r.has(s.name)||Ys(s)&&s.hidden)&&i.add(s);return i}function vl(e,t,r){t.add(e.name),pi(e).forEach(e=>{if(Ms(e)||r&&Zs(e)){const n=e.rule.ref;n&&!t.has(n.name)&&vl(n,t,r)}})}function Tl(e){const t=new Set;return pi(e).forEach(e=>{Wi(e)&&(ws(e.type.ref)&&t.add(e.type.ref),is(e.type.ref)&&ws(e.type.ref.$container)&&t.add(e.type.ref.$container))}),t}function $l(e){if(e.terminal)return e.terminal;if(e.type.ref){const t=wl(e.type.ref);return null==t?void 0:t.terminal}}function Rl(e){return e.hidden&&!pl(Ul(e))}function El(e,t){return e&&t?Al(e,t,e.astNode,!0):[]}function bl(e,t,r){if(!e||!t)return;const n=Al(e,t,e.astNode,!0);return 0!==n.length?n[r=void 0!==r?Math.max(0,Math.min(r,n.length-1)):0]:void 0}function Al(e,t,r,n){if(!n){const r=ii(e.grammarSource,Mi);if(r&&r.feature===t)return[e]}return Va(e)&&e.astNode===r?e.content.flatMap(e=>Al(e,t,r,!1)):[]}function Cl(e,t){return e?kl(e,t,null==e?void 0:e.astNode):[]}function Sl(e,t,r){if(!e)return;const n=kl(e,t,null==e?void 0:e.astNode);return 0!==n.length?n[r=void 0!==r?Math.max(0,Math.min(r,n.length-1)):0]:void 0}function kl(e,t,r){if(e.astNode!==r)return[];if(hs(e.grammarSource)&&e.grammarSource.value===t)return[e];const n=$o(e).iterator();let a;const i=[];do{if(a=n.next(),!a.done){const e=a.value;e.astNode===r?hs(e.grammarSource)&&e.grammarSource.value===t&&i.push(e):n.prune()}}while(!a.done);return i}function xl(e){var t;const r=e.astNode;for(;r===(null==(t=e.container)?void 0:t.astNode);){const t=ii(e.grammarSource,Mi);if(t)return t;e=e.container}}function wl(e){let t=e;return is(t)&&(wi(t.$container)?t=t.$container.$container:bi(t.$container)?t=t.$container:Ko(t.$container)),Nl(e,t,new Map)}function Nl(e,t,r){var n;function a(t,n){let a;return ii(t,Mi)||(a=Nl(n,n,r)),r.set(e,a),a}if(Mn(a,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(const i of pi(t)){if(Mi(i)&&"name"===i.feature.toLowerCase())return r.set(e,i),i;if(Ms(i)&&ws(i.rule.ref))return a(i,i.rule.ref);if(Fs(i)&&(null==(n=i.typeRef)?void 0:n.ref))return a(i,i.typeRef.ref)}}function _l(e){const t=e.$container;if(ns(t)){const r=t.elements;for(let t=r.indexOf(e)-1;t>=0;t--){const e=r[t];if(wi(e))return e;{const e=pi(r[t]).find(wi);if(e)return e}}}return Ri(t)?_l(t):void 0}function Il(e,t){return"?"===e||"*"===e||ns(t)&&Boolean(t.guardCondition)}function Pl(e){return"*"===e||"+"===e}function Ol(e){return"+="===e}function Ll(e){return Dl(e,new Set)}function Dl(e,t){if(t.has(e))return!0;t.add(e);for(const r of pi(e))if(Ms(r)){if(!r.rule.ref)return!1;if(ws(r.rule.ref)&&!Dl(r.rule.ref,t))return!1;if(os(r.rule.ref))return!1}else{if(Mi(r))return!1;if(wi(r))return!1}return Boolean(e.definition)}function Ml(e){return jl(e.type,new Set)}function jl(e,t){if(t.has(e))return!0;if(t.add(e),Li(e))return!1;if(_s(e))return!1;if(io(e))return e.types.every(e=>jl(e,t));if(Fs(e)){if(void 0!==e.primitiveType)return!0;if(void 0!==e.stringType)return!0;if(void 0!==e.typeRef){const r=e.typeRef.ref;return!!Qs(r)&&jl(r.type,t)}return!1}return!1}function Fl(e){if(!Ys(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){const t=e.returnType.ref;if(t)return t.name}}}function Gl(e){if(bi(e))return ws(e)&&Ll(e)?e.name:Fl(e)??e.name;if(fs(e)||Qs(e)||Ls(e))return e.name;if(wi(e)){const t=zl(e);if(t)return t}else if(is(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function zl(e){var t;return e.inferredType?e.inferredType.name:(null==(t=e.type)?void 0:t.ref)?Gl(e.type.ref):void 0}function Kl(e){var t;return Ys(e)?(null==(t=e.type)?void 0:t.name)??"string":ws(e)&&Ll(e)?e.name:Fl(e)??e.name}function ql(e){var t;return Ys(e)?(null==(t=e.type)?void 0:t.name)??"string":Fl(e)??e.name}function Ul(e){const t={s:!1,i:!1,u:!1},r=Vl(e.definition,t),n=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join("");return new RegExp(r,n)}Mn(pl,"isWhitespace"),Mn(dl,"escapeRegExp"),Mn(fl,"partialMatches"),Mn(ml,"partialRegExp"),Mn(hl,"getEntryRule"),Mn(yl,"getHiddenRules"),Mn(gl,"getAllReachableRules"),Mn(vl,"ruleDfs"),Mn(Tl,"getAllRulesUsedForCrossReferences"),Mn($l,"getCrossReferenceTerminal"),Mn(Rl,"isCommentTerminal"),Mn(El,"findNodesForProperty"),Mn(bl,"findNodeForProperty"),Mn(Al,"findNodesForPropertyInternal"),Mn(Cl,"findNodesForKeyword"),Mn(Sl,"findNodeForKeyword"),Mn(kl,"findNodesForKeywordInternal"),Mn(xl,"findAssignment"),Mn(wl,"findNameAssignment"),Mn(Nl,"findNameAssignmentInternal"),Mn(_l,"getActionAtElement"),Mn(Il,"isOptionalCardinality"),Mn(Pl,"isArrayCardinality"),Mn(Ol,"isArrayOperator"),Mn(Ll,"isDataTypeRule"),Mn(Dl,"isDataTypeRuleInternal"),Mn(Ml,"isDataType"),Mn(jl,"isDataTypeInternal"),Mn(Fl,"getExplicitRuleType"),Mn(Gl,"getTypeName"),Mn(zl,"getActionType"),Mn(Kl,"getRuleTypeName"),Mn(ql,"getRuleType"),Mn(Ul,"terminalRegex");var Bl=/[\s\S]/.source;function Vl(e,t){var r;if(qs(e))return Wl(e);if(Ws(e))return Hl(e);if(zi(e))return Zl(e);if(Zs(e)){const t=e.rule.ref;if(!t)throw new Error("Missing rule reference.");return Ql(Vl(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}if(Ts(e))return Xl(e);if(uo(e))return Yl(e);if(Ps(e)){const 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")),Ql(n,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}if(mo(e))return Ql(Bl,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${null==e?void 0:e.$type}, ${null==(r=null==e?void 0:e.$cstNode)?void 0:r.text}`)}function Wl(e){return Ql(e.elements.map(e=>Vl(e)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Hl(e){return Ql(e.elements.map(e=>Vl(e)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Yl(e){return Ql(`${Bl}*?${Vl(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Xl(e){return Ql(`(?!${Vl(e.terminal)})${Bl}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Zl(e){return e.right?Ql(`[${Jl(e.left)}-${Jl(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):Ql(Jl(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Jl(e){return dl(e.value)}function Ql(e,t){if(t.parenthesized||t.lookahead||!1!==t.wrap){e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`}return t.cardinality?`${e}${t.cardinality}`:e}function eu(e){const t=[],r=e.Grammar;for(const n of r.rules)Ys(n)&&Rl(n)&&ul(Ul(n))&&t.push(n.name);return{multilineCommentRules:t,nameRegexp:ko}}Mn(Vl,"abstractElementToRegex"),Mn(Wl,"terminalAlternativesToRegex"),Mn(Hl,"terminalGroupToRegex"),Mn(Yl,"untilTokenToRegex"),Mn(Xl,"negateTokenToRegex"),Mn(Zl,"characterRangeToRegex"),Mn(Jl,"keywordToRegex"),Mn(Ql,"withCardinality"),Mn(eu,"createGrammarConfig");var tu="object"==typeof global&&global&&global.Object===Object&&global,ru="object"==typeof self&&self&&self.Object===Object&&self,nu=tu||ru||Function("return this")(),au=nu.Symbol,iu=Object.prototype,su=iu.hasOwnProperty,ou=iu.toString,lu=au?au.toStringTag:void 0;function uu(e){var t=su.call(e,lu),r=e[lu];try{e[lu]=void 0;var n=!0}catch(i){}var a=ou.call(e);return n&&(t?e[lu]=r:delete e[lu]),a}Mn(uu,"getRawTag");var cu=uu,pu=Object.prototype.toString;function du(e){return pu.call(e)}Mn(du,"objectToString");var fu=du,mu=au?au.toStringTag:void 0;function hu(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":mu&&mu in Object(e)?cu(e):fu(e)}Mn(hu,"baseGetTag");var yu=hu;function gu(e){return null!=e&&"object"==typeof e}Mn(gu,"isObjectLike");var vu=gu;function Tu(e){return"symbol"==typeof e||vu(e)&&"[object Symbol]"==yu(e)}Mn(Tu,"isSymbol");var $u=Tu;function Ru(e,t){for(var r=-1,n=null==e?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}Mn(Ru,"arrayMap");var Eu=Ru,bu=Array.isArray,Au=au?au.prototype:void 0,Cu=Au?Au.toString:void 0;function Su(e){if("string"==typeof e)return e;if(bu(e))return Eu(e,Su)+"";if($u(e))return Cu?Cu.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}Mn(Su,"baseToString");var ku=Su,xu=/\s/;function wu(e){for(var t=e.length;t--&&xu.test(e.charAt(t)););return t}Mn(wu,"trimmedEndIndex");var Nu=wu,_u=/^\s+/;function Iu(e){return e?e.slice(0,Nu(e)+1).replace(_u,""):e}Mn(Iu,"baseTrim");var Pu=Iu;function Ou(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}Mn(Ou,"isObject");var Lu=Ou,Du=/^[-+]0x[0-9a-f]+$/i,Mu=/^0b[01]+$/i,ju=/^0o[0-7]+$/i,Fu=parseInt;function Gu(e){if("number"==typeof e)return e;if($u(e))return NaN;if(Lu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Lu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Pu(e);var r=Mu.test(e);return r||ju.test(e)?Fu(e.slice(2),r?2:8):Du.test(e)?NaN:+e}Mn(Gu,"toNumber");var zu=Gu,Ku=1/0;function qu(e){return e?(e=zu(e))===Ku||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}Mn(qu,"toFinite");var Uu=qu;function Bu(e){var t=Uu(e),r=t%1;return t==t?r?t-r:t:0}Mn(Bu,"toInteger");var Vu=Bu;function Wu(e){return e}Mn(Wu,"identity");var Hu=Wu;function Yu(e){if(!Lu(e))return!1;var t=yu(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}Mn(Yu,"isFunction");var Xu,Zu=Yu,Ju=nu["__core-js_shared__"],Qu=(Xu=/[^.]+$/.exec(Ju&&Ju.keys&&Ju.keys.IE_PROTO||""))?"Symbol(src)_1."+Xu:"";function ec(e){return!!Qu&&Qu in e}Mn(ec,"isMasked");var tc=ec,rc=Function.prototype.toString;function nc(e){if(null!=e){try{return rc.call(e)}catch(t){}try{return e+""}catch(t){}}return""}Mn(nc,"toSource");var ac=nc,ic=/^\[object .+?Constructor\]$/,sc=Function.prototype,oc=Object.prototype,lc=sc.toString,uc=oc.hasOwnProperty,cc=RegExp("^"+lc.call(uc).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pc(e){return!(!Lu(e)||tc(e))&&(Zu(e)?cc:ic).test(ac(e))}Mn(pc,"baseIsNative");var dc=pc;function fc(e,t){return null==e?void 0:e[t]}Mn(fc,"getValue");var mc=fc;function hc(e,t){var r=mc(e,t);return dc(r)?r:void 0}Mn(hc,"getNative");var yc=hc,gc=yc(nu,"WeakMap"),vc=Object.create,Tc=function(){function e(){}return Mn(e,"object"),function(t){if(!Lu(t))return{};if(vc)return vc(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function $c(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}Mn($c,"apply");var Rc=$c;function Ec(){}Mn(Ec,"noop");var bc=Ec;function Ac(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}Mn(Ac,"copyArray");var Cc=Ac,Sc=Date.now;function kc(e){var t=0,r=0;return function(){var n=Sc(),a=16-(n-r);if(r=n,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}Mn(kc,"shortOut");var xc=kc;function wc(e){return function(){return e}}Mn(wc,"constant");var Nc=wc,_c=function(){try{var e=yc(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ic=xc(_c?function(e,t){return _c(e,"toString",{configurable:!0,enumerable:!1,value:Nc(t),writable:!0})}:Hu);function Pc(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}Mn(Pc,"arrayEach");var Oc=Pc;function Lc(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}Mn(Lc,"baseFindIndex");var Dc=Lc;function Mc(e){return e!=e}Mn(Mc,"baseIsNaN");var jc=Mc;function Fc(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}Mn(Fc,"strictIndexOf");var Gc=Fc;function zc(e,t,r){return t==t?Gc(e,t,r):Dc(e,jc,r)}Mn(zc,"baseIndexOf");var Kc=zc;function qc(e,t){return!!(null==e?0:e.length)&&Kc(e,t,0)>-1}Mn(qc,"arrayIncludes");var Uc=qc,Bc=/^(?:0|[1-9]\d*)$/;function Vc(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Bc.test(e))&&e>-1&&e%1==0&&e<t}Mn(Vc,"isIndex");var Wc=Vc;function Hc(e,t,r){"__proto__"==t&&_c?_c(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}Mn(Hc,"baseAssignValue");var Yc=Hc;function Xc(e,t){return e===t||e!=e&&t!=t}Mn(Xc,"eq");var Zc=Xc,Jc=Object.prototype.hasOwnProperty;function Qc(e,t,r){var n=e[t];Jc.call(e,t)&&Zc(n,r)&&(void 0!==r||t in e)||Yc(e,t,r)}Mn(Qc,"assignValue");var ep=Qc;function tp(e,t,r,n){var a=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var o=t[i],l=n?n(r[o],e[o],o,r,e):void 0;void 0===l&&(l=e[o]),a?Yc(r,o,l):ep(r,o,l)}return r}Mn(tp,"copyObject");var rp=tp,np=Math.max;function ap(e,t,r){return t=np(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=np(n.length-t,0),s=Array(i);++a<i;)s[a]=n[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=n[a];return o[t]=r(s),Rc(e,this,o)}}Mn(ap,"overRest");var ip=ap;function sp(e,t){return Ic(ip(e,t,Hu),e+"")}Mn(sp,"baseRest");var op=sp;function lp(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}Mn(lp,"isLength");var up=lp;function cp(e){return null!=e&&up(e.length)&&!Zu(e)}Mn(cp,"isArrayLike");var pp=cp;function dp(e,t,r){if(!Lu(r))return!1;var n=typeof t;return!!("number"==n?pp(r)&&Wc(t,r.length):"string"==n&&t in r)&&Zc(r[t],e)}Mn(dp,"isIterateeCall");var fp=dp;function mp(e){return op(function(t,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(a--,i):void 0,s&&fp(r[0],r[1],s)&&(i=a<3?void 0:i,a=1),t=Object(t);++n<a;){var o=r[n];o&&e(t,o,n,i)}return t})}Mn(mp,"createAssigner");var hp=mp,yp=Object.prototype;function gp(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yp)}Mn(gp,"isPrototype");var vp=gp;function Tp(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}Mn(Tp,"baseTimes");var $p=Tp;function Rp(e){return vu(e)&&"[object Arguments]"==yu(e)}Mn(Rp,"baseIsArguments");var Ep=Rp,bp=Object.prototype,Ap=bp.hasOwnProperty,Cp=bp.propertyIsEnumerable,Sp=Ep(function(){return arguments}())?Ep:function(e){return vu(e)&&Ap.call(e,"callee")&&!Cp.call(e,"callee")};function kp(){return!1}Mn(kp,"stubFalse");var xp=kp,wp="object"==typeof exports&&exports&&!exports.nodeType&&exports,Np=wp&&"object"==typeof module&&module&&!module.nodeType&&module,_p=Np&&Np.exports===wp?nu.Buffer:void 0,Ip=(_p?_p.isBuffer:void 0)||xp,Pp={};function Op(e){return vu(e)&&up(e.length)&&!!Pp[yu(e)]}Pp["[object Float32Array]"]=Pp["[object Float64Array]"]=Pp["[object Int8Array]"]=Pp["[object Int16Array]"]=Pp["[object Int32Array]"]=Pp["[object Uint8Array]"]=Pp["[object Uint8ClampedArray]"]=Pp["[object Uint16Array]"]=Pp["[object Uint32Array]"]=!0,Pp["[object Arguments]"]=Pp["[object Array]"]=Pp["[object ArrayBuffer]"]=Pp["[object Boolean]"]=Pp["[object DataView]"]=Pp["[object Date]"]=Pp["[object Error]"]=Pp["[object Function]"]=Pp["[object Map]"]=Pp["[object Number]"]=Pp["[object Object]"]=Pp["[object RegExp]"]=Pp["[object Set]"]=Pp["[object String]"]=Pp["[object WeakMap]"]=!1,Mn(Op,"baseIsTypedArray");var Lp=Op;function Dp(e){return function(t){return e(t)}}Mn(Dp,"baseUnary");var Mp=Dp,jp="object"==typeof exports&&exports&&!exports.nodeType&&exports,Fp=jp&&"object"==typeof module&&module&&!module.nodeType&&module,Gp=Fp&&Fp.exports===jp&&tu.process,zp=function(){try{var e=Fp&&Fp.require&&Fp.require("util").types;return e||Gp&&Gp.binding&&Gp.binding("util")}catch(t){}}(),Kp=zp&&zp.isTypedArray,qp=Kp?Mp(Kp):Lp,Up=Object.prototype.hasOwnProperty;function Bp(e,t){var r=bu(e),n=!r&&Sp(e),a=!r&&!n&&Ip(e),i=!r&&!n&&!a&&qp(e),s=r||n||a||i,o=s?$p(e.length,String):[],l=o.length;for(var u in e)!t&&!Up.call(e,u)||s&&("length"==u||a&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Wc(u,l))||o.push(u);return o}Mn(Bp,"arrayLikeKeys");var Vp=Bp;function Wp(e,t){return function(r){return e(t(r))}}Mn(Wp,"overArg");var Hp=Wp,Yp=Hp(Object.keys,Object),Xp=Object.prototype.hasOwnProperty;function Zp(e){if(!vp(e))return Yp(e);var t=[];for(var r in Object(e))Xp.call(e,r)&&"constructor"!=r&&t.push(r);return t}Mn(Zp,"baseKeys");var Jp=Zp;function Qp(e){return pp(e)?Vp(e):Jp(e)}Mn(Qp,"keys");var ed=Qp,td=Object.prototype.hasOwnProperty,rd=hp(function(e,t){if(vp(t)||pp(t))rp(t,ed(t),e);else for(var r in t)td.call(t,r)&&ep(e,r,t[r])});function nd(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}Mn(nd,"nativeKeysIn");var ad=nd,id=Object.prototype.hasOwnProperty;function sd(e){if(!Lu(e))return ad(e);var t=vp(e),r=[];for(var n in e)("constructor"!=n||!t&&id.call(e,n))&&r.push(n);return r}Mn(sd,"baseKeysIn");var od=sd;function ld(e){return pp(e)?Vp(e,!0):od(e)}Mn(ld,"keysIn");var ud=ld,cd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pd=/^\w*$/;function dd(e,t){if(bu(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!$u(e))||(pd.test(e)||!cd.test(e)||null!=t&&e in Object(t))}Mn(dd,"isKey");var fd=dd,md=yc(Object,"create");function hd(){this.__data__=md?md(null):{},this.size=0}Mn(hd,"hashClear");var yd=hd;function gd(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}Mn(gd,"hashDelete");var vd=gd,Td=Object.prototype.hasOwnProperty;function $d(e){var t=this.__data__;if(md){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return Td.call(t,e)?t[e]:void 0}Mn($d,"hashGet");var Rd=$d,Ed=Object.prototype.hasOwnProperty;function bd(e){var t=this.__data__;return md?void 0!==t[e]:Ed.call(t,e)}Mn(bd,"hashHas");var Ad=bd;function Cd(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=md&&void 0===t?"__lodash_hash_undefined__":t,this}Mn(Cd,"hashSet");var Sd=Cd;function kd(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mn(kd,"Hash"),kd.prototype.clear=yd,kd.prototype.delete=vd,kd.prototype.get=Rd,kd.prototype.has=Ad,kd.prototype.set=Sd;var xd=kd;function wd(){this.__data__=[],this.size=0}Mn(wd,"listCacheClear");var Nd=wd;function _d(e,t){for(var r=e.length;r--;)if(Zc(e[r][0],t))return r;return-1}Mn(_d,"assocIndexOf");var Id=_d,Pd=Array.prototype.splice;function Od(e){var t=this.__data__,r=Id(t,e);return!(r<0)&&(r==t.length-1?t.pop():Pd.call(t,r,1),--this.size,!0)}Mn(Od,"listCacheDelete");var Ld=Od;function Dd(e){var t=this.__data__,r=Id(t,e);return r<0?void 0:t[r][1]}Mn(Dd,"listCacheGet");var Md=Dd;function jd(e){return Id(this.__data__,e)>-1}Mn(jd,"listCacheHas");var Fd=jd;function Gd(e,t){var r=this.__data__,n=Id(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}Mn(Gd,"listCacheSet");var zd=Gd;function Kd(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mn(Kd,"ListCache"),Kd.prototype.clear=Nd,Kd.prototype.delete=Ld,Kd.prototype.get=Md,Kd.prototype.has=Fd,Kd.prototype.set=zd;var qd=Kd,Ud=yc(nu,"Map");function Bd(){this.size=0,this.__data__={hash:new xd,map:new(Ud||qd),string:new xd}}Mn(Bd,"mapCacheClear");var Vd=Bd;function Wd(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}Mn(Wd,"isKeyable");var Hd=Wd;function Yd(e,t){var r=e.__data__;return Hd(t)?r["string"==typeof t?"string":"hash"]:r.map}Mn(Yd,"getMapData");var Xd=Yd;function Zd(e){var t=Xd(this,e).delete(e);return this.size-=t?1:0,t}Mn(Zd,"mapCacheDelete");var Jd=Zd;function Qd(e){return Xd(this,e).get(e)}Mn(Qd,"mapCacheGet");var ef=Qd;function tf(e){return Xd(this,e).has(e)}Mn(tf,"mapCacheHas");var rf=tf;function nf(e,t){var r=Xd(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}Mn(nf,"mapCacheSet");var af=nf;function sf(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mn(sf,"MapCache"),sf.prototype.clear=Vd,sf.prototype.delete=Jd,sf.prototype.get=ef,sf.prototype.has=rf,sf.prototype.set=af;var of=sf;function lf(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=Mn(function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=e.apply(this,n);return r.cache=i.set(a,s)||i,s},"memoized");return r.cache=new(lf.Cache||of),r}Mn(lf,"memoize"),lf.Cache=of;var uf=lf;function cf(e){var t=uf(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}Mn(cf,"memoizeCapped");var pf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,df=/\\(\\)?/g,ff=cf(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(pf,function(e,r,n,a){t.push(n?a.replace(df,"$1"):r||e)}),t});function mf(e){return null==e?"":ku(e)}Mn(mf,"toString");var hf=mf;function yf(e,t){return bu(e)?e:fd(e,t)?[e]:ff(hf(e))}Mn(yf,"castPath");var gf=yf;function vf(e){if("string"==typeof e||$u(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}Mn(vf,"toKey");var Tf=vf;function $f(e,t){for(var r=0,n=(t=gf(t,e)).length;null!=e&&r<n;)e=e[Tf(t[r++])];return r&&r==n?e:void 0}Mn($f,"baseGet");var Rf=$f;function Ef(e,t,r){var n=null==e?void 0:Rf(e,t);return void 0===n?r:n}Mn(Ef,"get");var bf=Ef;function Af(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}Mn(Af,"arrayPush");var Cf=Af,Sf=au?au.isConcatSpreadable:void 0;function kf(e){return bu(e)||Sp(e)||!!(Sf&&e&&e[Sf])}Mn(kf,"isFlattenable");var xf=kf;function wf(e,t,r,n,a){var i=-1,s=e.length;for(r||(r=xf),a||(a=[]);++i<s;){var o=e[i];t>0&&r(o)?t>1?wf(o,t-1,r,n,a):Cf(a,o):n||(a[a.length]=o)}return a}Mn(wf,"baseFlatten");var Nf=wf;function _f(e){return(null==e?0:e.length)?Nf(e,1):[]}Mn(_f,"flatten");var If=_f,Pf=Hp(Object.getPrototypeOf,Object);function Of(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(r=r>a?a:r)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}Mn(Of,"baseSlice");var Lf=Of;function Df(e,t,r,n){var a=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++a]);++a<i;)r=t(r,e[a],a,e);return r}Mn(Df,"arrayReduce");var Mf=Df;function jf(){this.__data__=new qd,this.size=0}Mn(jf,"stackClear");var Ff=jf;function Gf(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}Mn(Gf,"stackDelete");var zf=Gf;function Kf(e){return this.__data__.get(e)}Mn(Kf,"stackGet");var qf=Kf;function Uf(e){return this.__data__.has(e)}Mn(Uf,"stackHas");var Bf=Uf;function Vf(e,t){var r=this.__data__;if(r instanceof qd){var n=r.__data__;if(!Ud||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new of(n)}return r.set(e,t),this.size=r.size,this}Mn(Vf,"stackSet");var Wf=Vf;function Hf(e){var t=this.__data__=new qd(e);this.size=t.size}Mn(Hf,"Stack"),Hf.prototype.clear=Ff,Hf.prototype.delete=zf,Hf.prototype.get=qf,Hf.prototype.has=Bf,Hf.prototype.set=Wf;var Yf=Hf;function Xf(e,t){return e&&rp(t,ed(t),e)}Mn(Xf,"baseAssign");var Zf=Xf;function Jf(e,t){return e&&rp(t,ud(t),e)}Mn(Jf,"baseAssignIn");var Qf=Jf,em="object"==typeof exports&&exports&&!exports.nodeType&&exports,tm=em&&"object"==typeof module&&module&&!module.nodeType&&module,rm=tm&&tm.exports===em?nu.Buffer:void 0,nm=rm?rm.allocUnsafe:void 0;function am(e,t){if(t)return e.slice();var r=e.length,n=nm?nm(r):new e.constructor(r);return e.copy(n),n}Mn(am,"cloneBuffer");var im=am;function sm(e,t){for(var r=-1,n=null==e?0:e.length,a=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[a++]=s)}return i}Mn(sm,"arrayFilter");var om=sm;function lm(){return[]}Mn(lm,"stubArray");var um=lm,cm=Object.prototype.propertyIsEnumerable,pm=Object.getOwnPropertySymbols,dm=pm?function(e){return null==e?[]:(e=Object(e),om(pm(e),function(t){return cm.call(e,t)}))}:um;function fm(e,t){return rp(e,dm(e),t)}Mn(fm,"copySymbols");var mm=fm,hm=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Cf(t,dm(e)),e=Pf(e);return t}:um;function ym(e,t){return rp(e,hm(e),t)}Mn(ym,"copySymbolsIn");var gm=ym;function vm(e,t,r){var n=t(e);return bu(e)?n:Cf(n,r(e))}Mn(vm,"baseGetAllKeys");var Tm=vm;function $m(e){return Tm(e,ed,dm)}Mn($m,"getAllKeys");var Rm=$m;function Em(e){return Tm(e,ud,hm)}Mn(Em,"getAllKeysIn");var bm=Em,Am=yc(nu,"DataView"),Cm=yc(nu,"Promise"),Sm=yc(nu,"Set"),km="[object Map]",xm="[object Promise]",wm="[object Set]",Nm="[object WeakMap]",_m="[object DataView]",Im=ac(Am),Pm=ac(Ud),Om=ac(Cm),Lm=ac(Sm),Dm=ac(gc),Mm=yu;(Am&&Mm(new Am(new ArrayBuffer(1)))!=_m||Ud&&Mm(new Ud)!=km||Cm&&Mm(Cm.resolve())!=xm||Sm&&Mm(new Sm)!=wm||gc&&Mm(new gc)!=Nm)&&(Mm=Mn(function(e){var t=yu(e),r="[object Object]"==t?e.constructor:void 0,n=r?ac(r):"";if(n)switch(n){case Im:return _m;case Pm:return km;case Om:return xm;case Lm:return wm;case Dm:return Nm}return t},"getTag"));var jm=Mm,Fm=Object.prototype.hasOwnProperty;function Gm(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Fm.call(e,"index")&&(r.index=e.index,r.input=e.input),r}Mn(Gm,"initCloneArray");var zm=Gm,Km=nu.Uint8Array;function qm(e){var t=new e.constructor(e.byteLength);return new Km(t).set(new Km(e)),t}Mn(qm,"cloneArrayBuffer");var Um=qm;function Bm(e,t){var r=t?Um(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}Mn(Bm,"cloneDataView");var Vm=Bm,Wm=/\w*$/;function Hm(e){var t=new e.constructor(e.source,Wm.exec(e));return t.lastIndex=e.lastIndex,t}Mn(Hm,"cloneRegExp");var Ym=Hm,Xm=au?au.prototype:void 0,Zm=Xm?Xm.valueOf:void 0;function Jm(e){return Zm?Object(Zm.call(e)):{}}Mn(Jm,"cloneSymbol");var Qm=Jm;function eh(e,t){var r=t?Um(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}Mn(eh,"cloneTypedArray");var th=eh;function rh(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return Um(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return Vm(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return th(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return Ym(e);case"[object Symbol]":return Qm(e)}}Mn(rh,"initCloneByTag");var nh=rh;function ah(e){return"function"!=typeof e.constructor||vp(e)?{}:Tc(Pf(e))}Mn(ah,"initCloneObject");var ih=ah;function sh(e){return vu(e)&&"[object Map]"==jm(e)}Mn(sh,"baseIsMap");var oh=sh,lh=zp&&zp.isMap,uh=lh?Mp(lh):oh;function ch(e){return vu(e)&&"[object Set]"==jm(e)}Mn(ch,"baseIsSet");var ph=ch,dh=zp&&zp.isSet,fh=dh?Mp(dh):ph,mh="[object Arguments]",hh="[object Function]",yh="[object Object]",gh={};function vh(e,t,r,n,a,i){var s,o=1&t,l=2&t,u=4&t;if(r&&(s=a?r(e,n,a,i):r(e)),void 0!==s)return s;if(!Lu(e))return e;var c=bu(e);if(c){if(s=zm(e),!o)return Cc(e,s)}else{var p=jm(e),d=p==hh||"[object GeneratorFunction]"==p;if(Ip(e))return im(e,o);if(p==yh||p==mh||d&&!a){if(s=l||d?{}:ih(e),!o)return l?gm(e,Qf(s,e)):mm(e,Zf(s,e))}else{if(!gh[p])return a?e:{};s=nh(e,p,o)}}i||(i=new Yf);var f=i.get(e);if(f)return f;i.set(e,s),fh(e)?e.forEach(function(n){s.add(vh(n,t,r,n,e,i))}):uh(e)&&e.forEach(function(n,a){s.set(a,vh(n,t,r,a,e,i))});var m=c?void 0:(u?l?bm:Rm:l?ud:ed)(e);return Oc(m||e,function(n,a){m&&(n=e[a=n]),ep(s,a,vh(n,t,r,a,e,i))}),s}gh[mh]=gh["[object Array]"]=gh["[object ArrayBuffer]"]=gh["[object DataView]"]=gh["[object Boolean]"]=gh["[object Date]"]=gh["[object Float32Array]"]=gh["[object Float64Array]"]=gh["[object Int8Array]"]=gh["[object Int16Array]"]=gh["[object Int32Array]"]=gh["[object Map]"]=gh["[object Number]"]=gh[yh]=gh["[object RegExp]"]=gh["[object Set]"]=gh["[object String]"]=gh["[object Symbol]"]=gh["[object Uint8Array]"]=gh["[object Uint8ClampedArray]"]=gh["[object Uint16Array]"]=gh["[object Uint32Array]"]=!0,gh["[object Error]"]=gh[hh]=gh["[object WeakMap]"]=!1,Mn(vh,"baseClone");var Th=vh;function $h(e){return Th(e,4)}Mn($h,"clone");var Rh=$h;function Eh(e){for(var t=-1,r=null==e?0:e.length,n=0,a=[];++t<r;){var i=e[t];i&&(a[n++]=i)}return a}Mn(Eh,"compact");var bh=Eh;function Ah(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}Mn(Ah,"setCacheAdd");var Ch=Ah;function Sh(e){return this.__data__.has(e)}Mn(Sh,"setCacheHas");var kh=Sh;function xh(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new of;++t<r;)this.add(e[t])}Mn(xh,"SetCache"),xh.prototype.add=xh.prototype.push=Ch,xh.prototype.has=kh;var wh=xh;function Nh(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}Mn(Nh,"arraySome");var _h=Nh;function Ih(e,t){return e.has(t)}Mn(Ih,"cacheHas");var Ph=Ih;function Oh(e,t,r,n,a,i){var s=1&r,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var p=-1,d=!0,f=2&r?new wh:void 0;for(i.set(e,t),i.set(t,e);++p<o;){var m=e[p],h=t[p];if(n)var y=s?n(h,m,p,t,e,i):n(m,h,p,e,t,i);if(void 0!==y){if(y)continue;d=!1;break}if(f){if(!_h(t,function(e,t){if(!Ph(f,t)&&(m===e||a(m,e,r,n,i)))return f.push(t)})){d=!1;break}}else if(m!==h&&!a(m,h,r,n,i)){d=!1;break}}return i.delete(e),i.delete(t),d}Mn(Oh,"equalArrays");var Lh=Oh;function Dh(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}Mn(Dh,"mapToArray");var Mh=Dh;function jh(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}Mn(jh,"setToArray");var Fh=jh,Gh=au?au.prototype:void 0,zh=Gh?Gh.valueOf:void 0;function Kh(e,t,r,n,a,i,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Km(e),new Km(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Zc(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=Mh;case"[object Set]":var l=1&n;if(o||(o=Fh),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var c=Lh(o(e),o(t),n,a,i,s);return s.delete(e),c;case"[object Symbol]":if(zh)return zh.call(e)==zh.call(t)}return!1}Mn(Kh,"equalByTag");var qh=Kh,Uh=Object.prototype.hasOwnProperty;function Bh(e,t,r,n,a,i){var s=1&r,o=Rm(e),l=o.length;if(l!=Rm(t).length&&!s)return!1;for(var u=l;u--;){var c=o[u];if(!(s?c in t:Uh.call(t,c)))return!1}var p=i.get(e),d=i.get(t);if(p&&d)return p==t&&d==e;var f=!0;i.set(e,t),i.set(t,e);for(var m=s;++u<l;){var h=e[c=o[u]],y=t[c];if(n)var g=s?n(y,h,c,t,e,i):n(h,y,c,e,t,i);if(!(void 0===g?h===y||a(h,y,r,n,i):g)){f=!1;break}m||(m="constructor"==c)}if(f&&!m){var v=e.constructor,T=t.constructor;v==T||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof T&&T instanceof T||(f=!1)}return i.delete(e),i.delete(t),f}Mn(Bh,"equalObjects");var Vh=Bh,Wh="[object Arguments]",Hh="[object Array]",Yh="[object Object]",Xh=Object.prototype.hasOwnProperty;function Zh(e,t,r,n,a,i){var s=bu(e),o=bu(t),l=s?Hh:jm(e),u=o?Hh:jm(t),c=(l=l==Wh?Yh:l)==Yh,p=(u=u==Wh?Yh:u)==Yh,d=l==u;if(d&&Ip(e)){if(!Ip(t))return!1;s=!0,c=!1}if(d&&!c)return i||(i=new Yf),s||qp(e)?Lh(e,t,r,n,a,i):qh(e,t,l,r,n,a,i);if(!(1&r)){var f=c&&Xh.call(e,"__wrapped__"),m=p&&Xh.call(t,"__wrapped__");if(f||m){var h=f?e.value():e,y=m?t.value():t;return i||(i=new Yf),a(h,y,r,n,i)}}return!!d&&(i||(i=new Yf),Vh(e,t,r,n,a,i))}Mn(Zh,"baseIsEqualDeep");var Jh=Zh;function Qh(e,t,r,n,a){return e===t||(null==e||null==t||!vu(e)&&!vu(t)?e!=e&&t!=t:Jh(e,t,r,n,Qh,a))}Mn(Qh,"baseIsEqual");var ey=Qh;function ty(e,t,r,n){var a=r.length,i=a,s=!n;if(null==e)return!i;for(e=Object(e);a--;){var o=r[a];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<i;){var l=(o=r[a])[0],u=e[l],c=o[1];if(s&&o[2]){if(void 0===u&&!(l in e))return!1}else{var p=new Yf;if(n)var d=n(u,c,l,e,t,p);if(!(void 0===d?ey(c,u,3,n,p):d))return!1}}return!0}Mn(ty,"baseIsMatch");var ry=ty;function ny(e){return e==e&&!Lu(e)}Mn(ny,"isStrictComparable");var ay=ny;function iy(e){for(var t=ed(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,ay(a)]}return t}Mn(iy,"getMatchData");var sy=iy;function oy(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}Mn(oy,"matchesStrictComparable");var ly=oy;function uy(e){var t=sy(e);return 1==t.length&&t[0][2]?ly(t[0][0],t[0][1]):function(r){return r===e||ry(r,e,t)}}Mn(uy,"baseMatches");var cy=uy;function py(e,t){return null!=e&&t in Object(e)}Mn(py,"baseHasIn");var dy=py;function fy(e,t,r){for(var n=-1,a=(t=gf(t,e)).length,i=!1;++n<a;){var s=Tf(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=a?i:!!(a=null==e?0:e.length)&&up(a)&&Wc(s,a)&&(bu(e)||Sp(e))}Mn(fy,"hasPath");var my=fy;function hy(e,t){return null!=e&&my(e,t,dy)}Mn(hy,"hasIn");var yy=hy;function gy(e,t){return fd(e)&&ay(t)?ly(Tf(e),t):function(r){var n=bf(r,e);return void 0===n&&n===t?yy(r,e):ey(t,n,3)}}Mn(gy,"baseMatchesProperty");var vy=gy;function Ty(e){return function(t){return null==t?void 0:t[e]}}Mn(Ty,"baseProperty");var $y=Ty;function Ry(e){return function(t){return Rf(t,e)}}Mn(Ry,"basePropertyDeep");var Ey=Ry;function by(e){return fd(e)?$y(Tf(e)):Ey(e)}Mn(by,"property");var Ay=by;function Cy(e){return"function"==typeof e?e:null==e?Hu:"object"==typeof e?bu(e)?vy(e[0],e[1]):cy(e):Ay(e)}Mn(Cy,"baseIteratee");var Sy=Cy;function ky(e,t,r,n){for(var a=-1,i=null==e?0:e.length;++a<i;){var s=e[a];t(n,s,r(s),e)}return n}Mn(ky,"arrayAggregator");var xy=ky;function wy(e){return function(t,r,n){for(var a=-1,i=Object(t),s=n(t),o=s.length;o--;){var l=s[e?o:++a];if(!1===r(i[l],l,i))break}return t}}Mn(wy,"createBaseFor");var Ny=wy();function _y(e,t){return e&&Ny(e,t,ed)}Mn(_y,"baseForOwn");var Iy=_y;function Py(e,t){return function(r,n){if(null==r)return r;if(!pp(r))return e(r,n);for(var a=r.length,i=t?a:-1,s=Object(r);(t?i--:++i<a)&&!1!==n(s[i],i,s););return r}}Mn(Py,"createBaseEach");var Oy=Py(Iy);function Ly(e,t,r,n){return Oy(e,function(e,a,i){t(n,e,r(e),i)}),n}Mn(Ly,"baseAggregator");var Dy=Ly;function My(e,t){return function(r,n){var a=bu(r)?xy:Dy,i=t?t():{};return a(r,e,Sy(n),i)}}Mn(My,"createAggregator");var jy=My,Fy=Object.prototype,Gy=Fy.hasOwnProperty,zy=op(function(e,t){e=Object(e);var r=-1,n=t.length,a=n>2?t[2]:void 0;for(a&&fp(t[0],t[1],a)&&(n=1);++r<n;)for(var i=t[r],s=ud(i),o=-1,l=s.length;++o<l;){var u=s[o],c=e[u];(void 0===c||Zc(c,Fy[u])&&!Gy.call(e,u))&&(e[u]=i[u])}return e});function Ky(e){return vu(e)&&pp(e)}Mn(Ky,"isArrayLikeObject");var qy=Ky;function Uy(e,t,r){for(var n=-1,a=null==e?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}Mn(Uy,"arrayIncludesWith");var By=Uy;function Vy(e,t,r,n){var a=-1,i=Uc,s=!0,o=e.length,l=[],u=t.length;if(!o)return l;r&&(t=Eu(t,Mp(r))),n?(i=By,s=!1):t.length>=200&&(i=Ph,s=!1,t=new wh(t));e:for(;++a<o;){var c=e[a],p=null==r?c:r(c);if(c=n||0!==c?c:0,s&&p==p){for(var d=u;d--;)if(t[d]===p)continue e;l.push(c)}else i(t,p,n)||l.push(c)}return l}Mn(Vy,"baseDifference");var Wy=Vy,Hy=op(function(e,t){return qy(e)?Wy(e,Nf(t,1,qy,!0)):[]});function Yy(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}Mn(Yy,"last");var Xy=Yy;function Zy(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:Vu(t),Lf(e,t<0?0:t,n)):[]}Mn(Zy,"drop");var Jy=Zy;function Qy(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:Vu(t),Lf(e,0,(t=n-t)<0?0:t)):[]}Mn(Qy,"dropRight");var eg=Qy;function tg(e){return"function"==typeof e?e:Hu}Mn(tg,"castFunction");var rg=tg;function ng(e,t){return(bu(e)?Oc:Oy)(e,rg(t))}Mn(ng,"forEach");var ag=ng;function ig(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}Mn(ig,"arrayEvery");var sg=ig;function og(e,t){var r=!0;return Oy(e,function(e,n,a){return r=!!t(e,n,a)}),r}Mn(og,"baseEvery");var lg=og;function ug(e,t,r){var n=bu(e)?sg:lg;return r&&fp(e,t,r)&&(t=void 0),n(e,Sy(t))}Mn(ug,"every");var cg=ug;function pg(e,t){var r=[];return Oy(e,function(e,n,a){t(e,n,a)&&r.push(e)}),r}Mn(pg,"baseFilter");var dg=pg;function fg(e,t){return(bu(e)?om:dg)(e,Sy(t))}Mn(fg,"filter");var mg=fg;function hg(e){return function(t,r,n){var a=Object(t);if(!pp(t)){var i=Sy(r);t=ed(t),r=Mn(function(e){return i(a[e],e,a)},"predicate")}var s=e(t,r,n);return s>-1?a[i?t[s]:s]:void 0}}Mn(hg,"createFind");var yg=hg,gg=Math.max;function vg(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=null==r?0:Vu(r);return a<0&&(a=gg(n+a,0)),Dc(e,Sy(t),a)}Mn(vg,"findIndex");var Tg=yg(vg);function $g(e){return e&&e.length?e[0]:void 0}Mn($g,"head");var Rg=$g;function Eg(e,t){var r=-1,n=pp(e)?Array(e.length):[];return Oy(e,function(e,a,i){n[++r]=t(e,a,i)}),n}Mn(Eg,"baseMap");var bg=Eg;function Ag(e,t){return(bu(e)?Eu:bg)(e,Sy(t))}Mn(Ag,"map");var Cg=Ag;function Sg(e,t){return Nf(Cg(e,t),1)}Mn(Sg,"flatMap");var kg=Sg,xg=Object.prototype.hasOwnProperty,wg=jy(function(e,t,r){xg.call(e,r)?e[r].push(t):Yc(e,r,[t])}),Ng=Object.prototype.hasOwnProperty;function _g(e,t){return null!=e&&Ng.call(e,t)}Mn(_g,"baseHas");var Ig=_g;function Pg(e,t){return null!=e&&my(e,t,Ig)}Mn(Pg,"has");var Og=Pg;function Lg(e){return"string"==typeof e||!bu(e)&&vu(e)&&"[object String]"==yu(e)}Mn(Lg,"isString");var Dg=Lg;function Mg(e,t){return Eu(t,function(t){return e[t]})}Mn(Mg,"baseValues");var jg=Mg;function Fg(e){return null==e?[]:jg(e,ed(e))}Mn(Fg,"values");var Gg=Fg,zg=Math.max;function Kg(e,t,r,n){e=pp(e)?e:Gg(e),r=r&&!n?Vu(r):0;var a=e.length;return r<0&&(r=zg(a+r,0)),Dg(e)?r<=a&&e.indexOf(t,r)>-1:!!a&&Kc(e,t,r)>-1}Mn(Kg,"includes");var qg=Kg,Ug=Math.max;function Bg(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=null==r?0:Vu(r);return a<0&&(a=Ug(n+a,0)),Kc(e,t,a)}Mn(Bg,"indexOf");var Vg=Bg,Wg=Object.prototype.hasOwnProperty;function Hg(e){if(null==e)return!0;if(pp(e)&&(bu(e)||"string"==typeof e||"function"==typeof e.splice||Ip(e)||qp(e)||Sp(e)))return!e.length;var t=jm(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(vp(e))return!Jp(e).length;for(var r in e)if(Wg.call(e,r))return!1;return!0}Mn(Hg,"isEmpty");var Yg=Hg;function Xg(e){return vu(e)&&"[object RegExp]"==yu(e)}Mn(Xg,"baseIsRegExp");var Zg=Xg,Jg=zp&&zp.isRegExp,Qg=Jg?Mp(Jg):Zg;function ev(e){return void 0===e}Mn(ev,"isUndefined");var tv=ev;function rv(e){if("function"!=typeof e)throw new TypeError("Expected a function");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)}}Mn(rv,"negate");var nv=rv;function av(e,t,r,n){if(!Lu(e))return e;for(var a=-1,i=(t=gf(t,e)).length,s=i-1,o=e;null!=o&&++a<i;){var l=Tf(t[a]),u=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(a!=s){var c=o[l];void 0===(u=n?n(c,l,o):void 0)&&(u=Lu(c)?c:Wc(t[a+1])?[]:{})}ep(o,l,u),o=o[l]}return e}Mn(av,"baseSet");var iv=av;function sv(e,t,r){for(var n=-1,a=t.length,i={};++n<a;){var s=t[n],o=Rf(e,s);r(o,s)&&iv(i,gf(s,e),o)}return i}Mn(sv,"basePickBy");var ov=sv;function lv(e,t){if(null==e)return{};var r=Eu(bm(e),function(e){return[e]});return t=Sy(t),ov(e,r,function(e,r){return t(e,r[0])})}Mn(lv,"pickBy");var uv=lv;function cv(e,t,r,n,a){return a(e,function(e,a,i){r=n?(n=!1,e):t(r,e,a,i)}),r}Mn(cv,"baseReduce");var pv=cv;function dv(e,t,r){var n=bu(e)?Mf:pv,a=arguments.length<3;return n(e,Sy(t),r,a,Oy)}Mn(dv,"reduce");var fv=dv;function mv(e,t){return(bu(e)?om:dg)(e,nv(Sy(t)))}Mn(mv,"reject");var hv=mv;function yv(e,t){var r;return Oy(e,function(e,n,a){return!(r=t(e,n,a))}),!!r}Mn(yv,"baseSome");var gv=yv;function vv(e,t,r){var n=bu(e)?_h:gv;return r&&fp(e,t,r)&&(t=void 0),n(e,Sy(t))}Mn(vv,"some");var Tv=vv,$v=Sm&&1/Fh(new Sm([,-0]))[1]==1/0?function(e){return new Sm(e)}:bc;function Rv(e,t,r){var n=-1,a=Uc,i=e.length,s=!0,o=[],l=o;if(r)s=!1,a=By;else if(i>=200){var u=t?null:$v(e);if(u)return Fh(u);s=!1,a=Ph,l=new wh}else l=t?[]:o;e:for(;++n<i;){var c=e[n],p=t?t(c):c;if(c=r||0!==c?c:0,s&&p==p){for(var d=l.length;d--;)if(l[d]===p)continue e;t&&l.push(p),o.push(c)}else a(l,p,r)||(l!==o&&l.push(p),o.push(c))}return o}Mn(Rv,"baseUniq");var Ev=Rv;function bv(e){return e&&e.length?Ev(e):[]}Mn(bv,"uniq");var Av=bv;function Cv(e){console&&console.error}function Sv(e){console&&console.warn}function kv(e){const t=(new Date).getTime(),r=e();return{time:(new Date).getTime()-t,value:r}}function xv(e){function t(){}Mn(t,"FakeConstructor"),t.prototype=e;const r=new t;function n(){return typeof r.bar}return Mn(n,"fakeAccess"),n(),n(),e}function wv(e){return Nv(e)?e.LABEL:e.name}function Nv(e){return Dg(e.LABEL)&&""!==e.LABEL}Mn(Cv,"PRINT_ERROR"),Mn(Sv,"PRINT_WARNING"),Mn(kv,"timer"),Mn(xv,"toFastProperties"),Mn(wv,"tokenLabel"),Mn(Nv,"hasTokenLabel");var _v=(Mn(l=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),ag(this.definition,t=>{t.accept(e)})}},"AbstractProduction"),l),Iv=(Mn(u=class extends _v{constructor(e){super([]),this.idx=1,rd(this,uv(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}},"NonTerminal"),u),Pv=(Mn(c=class extends _v{constructor(e){super(e.definition),this.orgText="",rd(this,uv(e,e=>void 0!==e))}},"Rule"),c),Ov=(Mn(p=class extends _v{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,rd(this,uv(e,e=>void 0!==e))}},"Alternative"),p),Lv=(Mn(d=class extends _v{constructor(e){super(e.definition),this.idx=1,rd(this,uv(e,e=>void 0!==e))}},"Option"),d),Dv=(Mn(f=class extends _v{constructor(e){super(e.definition),this.idx=1,rd(this,uv(e,e=>void 0!==e))}},"RepetitionMandatory"),f),Mv=(Mn(m=class extends _v{constructor(e){super(e.definition),this.idx=1,rd(this,uv(e,e=>void 0!==e))}},"RepetitionMandatoryWithSeparator"),m),jv=(Mn(h=class extends _v{constructor(e){super(e.definition),this.idx=1,rd(this,uv(e,e=>void 0!==e))}},"Repetition"),h),Fv=(Mn(y=class extends _v{constructor(e){super(e.definition),this.idx=1,rd(this,uv(e,e=>void 0!==e))}},"RepetitionWithSeparator"),y),Gv=(Mn(g=class extends _v{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,rd(this,uv(e,e=>void 0!==e))}},"Alternation"),g),zv=(Mn(v=class{constructor(e){this.idx=1,rd(this,uv(e,e=>void 0!==e))}accept(e){e.visit(this)}},"Terminal"),v);function Kv(e){return Cg(e,qv)}function qv(e){function t(e){return Cg(e,qv)}if(Mn(t,"convertDefinition"),e instanceof Iv){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return Dg(e.label)&&(t.label=e.label),t}if(e instanceof Ov)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Lv)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Dv)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Mv)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:qv(new zv({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Fv)return{type:"RepetitionWithSeparator",idx:e.idx,separator:qv(new zv({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof jv)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Gv)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof zv){const t={type:"Terminal",name:e.terminalType.name,label:wv(e.terminalType),idx:e.idx};Dg(e.label)&&(t.terminalLabel=e.label);const r=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=Qg(r)?r.source:r),t}if(e instanceof Pv)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}Mn(Kv,"serializeGrammar"),Mn(qv,"serializeProduction");var Uv=(Mn(T=class{visit(e){const t=e;switch(t.constructor){case Iv:return this.visitNonTerminal(t);case Ov:return this.visitAlternative(t);case Lv:return this.visitOption(t);case Dv:return this.visitRepetitionMandatory(t);case Mv:return this.visitRepetitionMandatoryWithSeparator(t);case Fv:return this.visitRepetitionWithSeparator(t);case jv:return this.visitRepetition(t);case Gv:return this.visitAlternation(t);case zv:return this.visitTerminal(t);case Pv: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){}},"GAstVisitor"),T);function Bv(e){return e instanceof Ov||e instanceof Lv||e instanceof jv||e instanceof Dv||e instanceof Mv||e instanceof Fv||e instanceof zv||e instanceof Pv}function Vv(e,t=[]){return!!(e instanceof Lv||e instanceof jv||e instanceof Fv)||(e instanceof Gv?Tv(e.definition,e=>Vv(e,t)):!(e instanceof Iv&&qg(t,e))&&(e instanceof _v&&(e instanceof Iv&&t.push(e),cg(e.definition,e=>Vv(e,t)))))}function Wv(e){return e instanceof Gv}function Hv(e){if(e instanceof Iv)return"SUBRULE";if(e instanceof Lv)return"OPTION";if(e instanceof Gv)return"OR";if(e instanceof Dv)return"AT_LEAST_ONE";if(e instanceof Mv)return"AT_LEAST_ONE_SEP";if(e instanceof Fv)return"MANY_SEP";if(e instanceof jv)return"MANY";if(e instanceof zv)return"CONSUME";throw Error("non exhaustive match")}Mn(Bv,"isSequenceProd"),Mn(Vv,"isOptionalProd"),Mn(Wv,"isBranchingProd"),Mn(Hv,"getProductionDslName");var Yv=(Mn($=class{walk(e,t=[]){ag(e.definition,(r,n)=>{const a=Jy(e.definition,n+1);if(r instanceof Iv)this.walkProdRef(r,a,t);else if(r instanceof zv)this.walkTerminal(r,a,t);else if(r instanceof Ov)this.walkFlat(r,a,t);else if(r instanceof Lv)this.walkOption(r,a,t);else if(r instanceof Dv)this.walkAtLeastOne(r,a,t);else if(r instanceof Mv)this.walkAtLeastOneSep(r,a,t);else if(r instanceof Fv)this.walkManySep(r,a,t);else if(r instanceof jv)this.walkMany(r,a,t);else{if(!(r instanceof Gv))throw Error("non exhaustive match");this.walkOr(r,a,t)}})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){const n=t.concat(r);this.walk(e,n)}walkOption(e,t,r){const n=t.concat(r);this.walk(e,n)}walkAtLeastOne(e,t,r){const n=[new Lv({definition:e.definition})].concat(t,r);this.walk(e,n)}walkAtLeastOneSep(e,t,r){const n=Xv(e,t,r);this.walk(e,n)}walkMany(e,t,r){const n=[new Lv({definition:e.definition})].concat(t,r);this.walk(e,n)}walkManySep(e,t,r){const n=Xv(e,t,r);this.walk(e,n)}walkOr(e,t,r){const n=t.concat(r);ag(e.definition,e=>{const t=new Ov({definition:[e]});this.walk(t,n)})}},"RestWalker"),$);function Xv(e,t,r){return[new Lv({definition:[new zv({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function Zv(e){if(e instanceof Iv)return Zv(e.referencedRule);if(e instanceof zv)return eT(e);if(Bv(e))return Jv(e);if(Wv(e))return Qv(e);throw Error("non exhaustive match")}function Jv(e){let t=[];const r=e.definition;let n,a=0,i=r.length>a,s=!0;for(;i&&s;)n=r[a],s=Vv(n),t=t.concat(Zv(n)),a+=1,i=r.length>a;return Av(t)}function Qv(e){const t=Cg(e.definition,e=>Zv(e));return Av(If(t))}function eT(e){return[e.terminalType]}Mn(Xv,"restForRepetitionWithSeparator"),Mn(Zv,"first"),Mn(Jv,"firstForSequence"),Mn(Qv,"firstForBranching"),Mn(eT,"firstForTerminal");var tT="_~IN~_",rT=(Mn(R=class extends Yv{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){const n=aT(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(r),i=Zv(new Ov({definition:a}));this.follows[n]=i}},"ResyncFollowsWalker"),R);function nT(e){const t={};return ag(e,e=>{const r=new rT(e).startWalking();rd(t,r)}),t}function aT(e,t){return e.name+t+tT}Mn(nT,"computeAllProdsFollows"),Mn(aT,"buildBetweenProdsFollowPrefix");var iT={},sT=new nl;function oT(e){const t=e.toString();if(iT.hasOwnProperty(t))return iT[t];{const e=sT.pattern(t);return iT[t]=e,e}}function lT(){iT={}}Mn(oT,"getRegExpAst"),Mn(lT,"clearRegExpParserCache");var uT="Complement Sets are not supported for first char optimization";function cT(e,t=!1){try{const t=oT(e);return pT(t.value,{},t.flags.ignoreCase)}catch(r){if(r.message===uT)t&&Sv(e.toString());else{let r="";t&&(r="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Cv(e.toString())}}return[]}function pT(e,t,r){switch(e.type){case"Disjunction":for(let a=0;a<e.value.length;a++)pT(e.value[a],t,r);break;case"Alternative":const n=e.value;for(let e=0;e<n.length;e++){const a=n[e];switch(a.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const i=a;switch(i.type){case"Character":dT(i.value,t,r);break;case"Set":if(!0===i.complement)throw Error(uT);ag(i.value,e=>{if("number"==typeof e)dT(e,t,r);else{const n=e;if(!0===r)for(let e=n.from;e<=n.to;e++)dT(e,t,r);else{for(let e=n.from;e<=n.to&&e<XT;e++)dT(e,t,r);if(n.to>=XT){const e=n.from>=XT?n.from:XT,r=n.to,a=JT(e),i=JT(r);for(let n=a;n<=i;n++)t[n]=n}}}});break;case"Group":pT(i.value,t,r);break;default:throw Error("Non Exhaustive Match")}const s=void 0!==i.quantifier&&0===i.quantifier.atLeast;if("Group"===i.type&&!1===hT(i)||"Group"!==i.type&&!1===s)break}break;default:throw Error("non exhaustive match!")}return Gg(t)}function dT(e,t,r){const n=JT(e);t[n]=n,!0===r&&fT(e,t)}function fT(e,t){const r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){const e=JT(n.charCodeAt(0));t[e]=e}else{const e=r.toLowerCase();if(e!==r){const r=JT(e.charCodeAt(0));t[r]=r}}}function mT(e,t){return Tg(e.value,e=>{if("number"==typeof e)return qg(t,e);{const r=e;return void 0!==Tg(t,e=>r.from<=e&&e<=r.to)}})}function hT(e){const t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(bu(e.value)?cg(e.value,hT):hT(e.value))}Mn(cT,"getOptimizedStartCodesIndices"),Mn(pT,"firstCharOptimizedIndices"),Mn(dT,"addOptimizedIdxToResult"),Mn(fT,"handleIgnoreCase"),Mn(mT,"findCode"),Mn(hT,"isWholeOptional");var yT=(Mn(E=class extends al{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e);case"Lookbehind":return void this.visitLookbehind(e);case"NegativeLookbehind":return void this.visitNegativeLookbehind(e)}super.visitChildren(e)}}visitCharacter(e){qg(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===mT(e,this.targetCharCodes)&&(this.found=!0):void 0!==mT(e,this.targetCharCodes)&&(this.found=!0)}},"CharCodeFinder"),E);function gT(e,t){if(t instanceof RegExp){const r=oT(t),n=new yT(e);return n.visit(r),n.found}return void 0!==Tg(t,t=>qg(e,t.charCodeAt(0)))}Mn(gT,"canMatchCharCode");var vT="PATTERN",TT="defaultMode",$T="modes";function RT(e,t){const r=(t=zy(t,{debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:Mn((e,t)=>t(),"tracer")})).tracer;let n;r("initCharCodeToOptimizedIndexMap",()=>{QT()}),r("Reject Lexer.NA",()=>{n=hv(e,e=>e[vT]===T$.NA)});let a,i,s,o,l,u,c,p,d,f,m,h=!1;r("Transform Patterns",()=>{h=!1,a=Cg(n,e=>{const t=e[vT];if(Qg(t)){const e=t.source;return 1!==e.length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||qg(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?FT(t):e[1]:e}if(Zu(t))return h=!0,{exec:t};if("object"==typeof t)return h=!0,t;if("string"==typeof t){if(1===t.length)return t;{const e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&");return FT(new RegExp(e))}}throw Error("non exhaustive match")})}),r("misc mapping",()=>{i=Cg(n,e=>e.tokenTypeIdx),s=Cg(n,e=>{const t=e.GROUP;if(t!==T$.SKIPPED){if(Dg(t))return t;if(tv(t))return!1;throw Error("non exhaustive match")}}),o=Cg(n,e=>{const t=e.LONGER_ALT;if(t){return bu(t)?Cg(t,e=>Vg(n,e)):[Vg(n,t)]}}),l=Cg(n,e=>e.PUSH_MODE),u=Cg(n,e=>Og(e,"POP_MODE"))}),r("Line Terminator Handling",()=>{const e=HT(t.lineTerminatorCharacters);c=Cg(n,e=>!1),"onlyOffset"!==t.positionTracking&&(c=Cg(n,t=>Og(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===VT(t,e)&&gT(e,t.PATTERN)))}),r("Misc Mapping #2",()=>{p=Cg(n,qT),d=Cg(a,UT),f=fv(n,(e,t)=>{const r=t.GROUP;return Dg(r)&&r!==T$.SKIPPED&&(e[r]=[]),e},{}),m=Cg(a,(e,t)=>({pattern:a[t],longerAlt:o[t],canLineTerminator:c[t],isCustom:p[t],short:d[t],group:s[t],push:l[t],pop:u[t],tokenTypeIdx:i[t],tokenType:n[t]}))});let y=!0,g=[];return t.safeMode||r("First Char Optimization",()=>{g=fv(n,(e,r,n)=>{if("string"==typeof r.PATTERN){const t=JT(r.PATTERN.charCodeAt(0));YT(e,t,m[n])}else if(bu(r.START_CHARS_HINT)){let t;ag(r.START_CHARS_HINT,r=>{const a=JT("string"==typeof r?r.charCodeAt(0):r);t!==a&&(t=a,YT(e,a,m[n]))})}else if(Qg(r.PATTERN))if(r.PATTERN.unicode)y=!1,t.ensureOptimizations&&Cv(r.PATTERN.toString());else{const a=cT(r.PATTERN,t.ensureOptimizations);Yg(a)&&(y=!1),ag(a,t=>{YT(e,t,m[n])})}else t.ensureOptimizations&&Cv(r.name),y=!1;return e},[])}),{emptyGroups:f,patternIdxToConfig:m,charCodeToPatternIdxToConfig:g,hasCustom:h,canBeOptimized:y}}function ET(e,t){let r=[];const n=AT(e);r=r.concat(n.errors);const a=CT(n.valid),i=a.valid;return r=r.concat(a.errors),r=r.concat(bT(i)),r=r.concat(PT(i)),r=r.concat(OT(i,t)),r=r.concat(LT(i)),r}function bT(e){let t=[];const r=mg(e,e=>Qg(e[vT]));return t=t.concat(kT(r)),t=t.concat(NT(r)),t=t.concat(_T(r)),t=t.concat(IT(r)),t=t.concat(xT(r)),t}function AT(e){const t=mg(e,e=>!Og(e,vT));return{errors:Cg(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:h$.MISSING_PATTERN,tokenTypes:[e]})),valid:Hy(e,t)}}function CT(e){const t=mg(e,e=>{const t=e[vT];return!(Qg(t)||Zu(t)||Og(t,"exec")||Dg(t))});return{errors:Cg(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:h$.INVALID_PATTERN,tokenTypes:[e]})),valid:Hy(e,t)}}Mn(RT,"analyzeTokenTypes"),Mn(ET,"validatePatterns"),Mn(bT,"validateRegExpPattern"),Mn(AT,"findMissingPatterns"),Mn(CT,"findInvalidPatterns");var ST=/[^\\][$]/;function kT(e){const t=class extends al{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}};Mn(t,"EndAnchorFinder");let r=t;const n=mg(e,e=>{const t=e.PATTERN;try{const e=oT(t),n=new r;return n.visit(e),n.found}catch(n){return ST.test(t.source)}});return Cg(n,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:h$.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function xT(e){const t=mg(e,e=>e.PATTERN.test(""));return Cg(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:h$.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}Mn(kT,"findEndOfInputAnchor"),Mn(xT,"findEmptyMatchRegExps");var wT=/[^\\[][\^]|^\^/;function NT(e){const t=class extends al{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}};Mn(t,"StartAnchorFinder");let r=t;const n=mg(e,e=>{const t=e.PATTERN;try{const e=oT(t),n=new r;return n.visit(e),n.found}catch(n){return wT.test(t.source)}});return Cg(n,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:h$.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function _T(e){const t=mg(e,e=>{const t=e[vT];return t instanceof RegExp&&(t.multiline||t.global)});return Cg(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:h$.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function IT(e){const t=[];let r=Cg(e,r=>fv(e,(e,n)=>(r.PATTERN.source!==n.PATTERN.source||qg(t,n)||n.PATTERN===T$.NA||(t.push(n),e.push(n)),e),[]));r=bh(r);const n=mg(r,e=>e.length>1);return Cg(n,e=>{const t=Cg(e,e=>e.name);return{message:`The same RegExp pattern ->${Rg(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:h$.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function PT(e){const t=mg(e,e=>{if(!Og(e,"GROUP"))return!1;const t=e.GROUP;return t!==T$.SKIPPED&&t!==T$.NA&&!Dg(t)});return Cg(t,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:h$.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function OT(e,t){const r=mg(e,e=>void 0!==e.PUSH_MODE&&!qg(t,e.PUSH_MODE));return Cg(r,e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:h$.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function LT(e){const t=[],r=fv(e,(e,t,r)=>{const n=t.PATTERN;return n===T$.NA||(Dg(n)?e.push({str:n,idx:r,tokenType:t}):Qg(n)&&MT(n)&&e.push({str:n.source,idx:r,tokenType:t})),e},[]);return ag(e,(e,n)=>{ag(r,({str:r,idx:a,tokenType:i})=>{if(n<a&&DT(r,e.PATTERN)){const r=`Token: ->${i.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:r,type:h$.UNREACHABLE_PATTERN,tokenTypes:[e,i]})}})}),t}function DT(e,t){if(Qg(t)){if(jT(t))return!1;const r=t.exec(e);return null!==r&&0===r.index}if(Zu(t))return t(e,0,[],{});if(Og(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}function MT(e){return void 0===Tg([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function jT(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}function FT(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function GT(e,t,r){const n=[];return Og(e,TT)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+TT+"> property in its definition\n",type:h$.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Og(e,$T)||n.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:h$.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Og(e,$T)&&Og(e,TT)&&!Og(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${TT}: <${e.defaultMode}>which does not exist\n`,type:h$.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Og(e,$T)&&ag(e.modes,(e,t)=>{ag(e,(r,a)=>{if(tv(r))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${t}> at index: <${a}>\n`,type:h$.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Og(r,"LONGER_ALT")){const a=bu(r.LONGER_ALT)?r.LONGER_ALT:[r.LONGER_ALT];ag(a,a=>{tv(a)||qg(e,a)||n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${a.name}> on token <${r.name}> outside of mode <${t}>\n`,type:h$.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function zT(e,t,r){const n=[];let a=!1;const i=bh(If(Gg(e.modes))),s=hv(i,e=>e[vT]===T$.NA),o=HT(r);return t&&ag(s,e=>{const t=VT(e,o);if(!1!==t){const r={message:WT(e,t),type:t.issue,tokenType:e};n.push(r)}else Og(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(a=!0):gT(o,e.PATTERN)&&(a=!0)}),t&&!a&&n.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:h$.NO_LINE_BREAKS_FLAGS}),n}function KT(e){const t={},r=ed(e);return ag(r,r=>{const n=e[r];if(!bu(n))throw Error("non exhaustive match");t[r]=[]}),t}function qT(e){const t=e.PATTERN;if(Qg(t))return!1;if(Zu(t))return!0;if(Og(t,"exec"))return!0;if(Dg(t))return!1;throw Error("non exhaustive match")}function UT(e){return!(!Dg(e)||1!==e.length)&&e.charCodeAt(0)}Mn(NT,"findStartOfInputAnchor"),Mn(_T,"findUnsupportedFlags"),Mn(IT,"findDuplicatePatterns"),Mn(PT,"findInvalidGroupType"),Mn(OT,"findModesThatDoNotExist"),Mn(LT,"findUnreachablePatterns"),Mn(DT,"tryToMatchStrToPattern"),Mn(MT,"noMetaChar"),Mn(jT,"usesLookAheadOrBehind"),Mn(FT,"addStickyFlag"),Mn(GT,"performRuntimeChecks"),Mn(zT,"performWarningRuntimeChecks"),Mn(KT,"cloneEmptyGroups"),Mn(qT,"isCustomPattern"),Mn(UT,"isShortPattern");var BT={test:Mn(function(e){const t=e.length;for(let r=this.lastIndex;r<t;r++){const t=e.charCodeAt(r);if(10===t)return this.lastIndex=r+1,!0;if(13===t)return 10===e.charCodeAt(r+1)?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};function VT(e,t){if(Og(e,"LINE_BREAKS"))return!1;if(Qg(e.PATTERN)){try{gT(t,e.PATTERN)}catch(r){return{issue:h$.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}if(Dg(e.PATTERN))return!1;if(qT(e))return{issue:h$.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function WT(e,t){if(t.issue===h$.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===h$.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function HT(e){return Cg(e,e=>Dg(e)?e.charCodeAt(0):e)}function YT(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}Mn(VT,"checkLineBreaksIssues"),Mn(WT,"buildLineBreakIssueMessage"),Mn(HT,"getCharCodes"),Mn(YT,"addToMapOfArrays");var XT=256,ZT=[];function JT(e){return e<XT?e:ZT[e]}function QT(){if(Yg(ZT)){ZT=new Array(65536);for(let e=0;e<65536;e++)ZT[e]=e>255?255+~~(e/255):e}}function e$(e,t){const r=e.tokenTypeIdx;return r===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[r]}function t$(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}Mn(JT,"charCodeToOptimizedIndex"),Mn(QT,"initCharCodeToOptimizedIndexMap"),Mn(e$,"tokenStructuredMatcher"),Mn(t$,"tokenStructuredMatcherNoCategories");var r$=1,n$={};function a$(e){const t=i$(e);s$(t),l$(t),o$(t),ag(t,e=>{e.isParent=e.categoryMatches.length>0})}function i$(e){let t=Rh(e),r=e,n=!0;for(;n;){r=bh(If(Cg(r,e=>e.CATEGORIES)));const e=Hy(r,t);t=t.concat(e),Yg(e)?n=!1:r=e}return t}function s$(e){ag(e,e=>{c$(e)||(n$[r$]=e,e.tokenTypeIdx=r$++),p$(e)&&!bu(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),p$(e)||(e.CATEGORIES=[]),d$(e)||(e.categoryMatches=[]),f$(e)||(e.categoryMatchesMap={})})}function o$(e){ag(e,e=>{e.categoryMatches=[],ag(e.categoryMatchesMap,(t,r)=>{e.categoryMatches.push(n$[r].tokenTypeIdx)})})}function l$(e){ag(e,e=>{u$([],e)})}function u$(e,t){ag(e,e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),ag(t.CATEGORIES,r=>{const n=e.concat(t);qg(n,r)||u$(n,r)})}function c$(e){return Og(e,"tokenTypeIdx")}function p$(e){return Og(e,"CATEGORIES")}function d$(e){return Og(e,"categoryMatches")}function f$(e){return Og(e,"categoryMatchesMap")}function m$(e){return Og(e,"tokenTypeIdx")}Mn(a$,"augmentTokenTypes"),Mn(i$,"expandCategories"),Mn(s$,"assignTokenDefaultProps"),Mn(o$,"assignCategoriesTokensProp"),Mn(l$,"assignCategoriesMapProp"),Mn(u$,"singleAssignCategoriesToksMap"),Mn(c$,"hasShortKeyProperty"),Mn(p$,"hasCategoriesProperty"),Mn(d$,"hasExtendingTokensTypesProperty"),Mn(f$,"hasExtendingTokensTypesMapProperty"),Mn(m$,"isTokenType");var h$,y$,g$={buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,r,n,a,i)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`};(y$=h$||(h$={}))[y$.MISSING_PATTERN=0]="MISSING_PATTERN",y$[y$.INVALID_PATTERN=1]="INVALID_PATTERN",y$[y$.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",y$[y$.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",y$[y$.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",y$[y$.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",y$[y$.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",y$[y$.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",y$[y$.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",y$[y$.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",y$[y$.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",y$[y$.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",y$[y$.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",y$[y$.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",y$[y$.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",y$[y$.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",y$[y$.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",y$[y$.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE";var v$={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:g$,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(v$);var T$=(b=class{constructor(e,t=v$){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=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent,this.traceInitMaxIdent;const{time:n,value:a}=kv(t),i=n>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&i(`${r}<-- <${e}> time: ${n}ms`),this.traceInitIndent--,a}return t()},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=rd({},v$,t);const r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,n=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===v$.lineTerminatorsPattern)this.config.lineTerminatorsPattern=BT;else if(this.config.lineTerminatorCharacters===v$.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor 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),bu(e)?r={modes:{defaultMode:Rh(e)},defaultMode:TT}:(n=!1,r=Rh(e))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(GT(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(zT(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes?r.modes:{},ag(r.modes,(e,t)=>{r.modes[t]=hv(e,e=>tv(e))});const a=ed(r.modes);if(ag(r.modes,(e,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(ET(e,a))}),Yg(this.lexerDefinitionErrors)){let n;a$(e),this.TRACE_INIT("analyzeTokenTypes",()=>{n=RT(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=n.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=n.charCodeToPatternIdxToConfig,this.emptyGroups=rd({},this.emptyGroups,n.emptyGroups),this.hasCustom=n.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=n.canBeOptimized}})}),this.defaultMode=r.defaultMode,!Yg(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=Cg(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}ag(this.lexerDefinitionWarning,e=>{Sv(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(n&&(this.handleModes=bc),!1===this.trackStartLines&&(this.computeNewColumn=Hu),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=bc),/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))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const e=fv(this.canModeBeOptimized,(e,t,r)=>(!1===t&&e.push(r),e),[]);if(t.ensureOptimizations&&!Yg(e))throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{lT()}),this.TRACE_INIT("toFastProperties",()=>{xv(this)})})}tokenize(e,t=this.defaultMode){if(!Yg(this.lexerDefinitionErrors)){const e=Cg(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,n,a,i,s,o,l,u,c,p,d,f,m,h,y;const g=e,v=g.length;let T=0,$=0;const R=this.hasCustom?0:Math.floor(e.length/10),E=new Array(R),b=[];let A=this.trackStartLines?1:void 0,C=this.trackStartLines?1:void 0;const S=KT(this.emptyGroups),k=this.trackStartLines,x=this.config.lineTerminatorsPattern;let w=0,N=[],_=[];const I=[],P=[];Object.freeze(P);let O=!1;const L=Mn(e=>{if(1===I.length&&void 0===e.tokenType.PUSH_MODE){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);b.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{I.pop();const e=Xy(I);N=this.patternIdxToConfig[e],_=this.charCodeToPatternIdxToConfig[e],w=N.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;O=!(!_||!t)}},"pop_mode");function D(e){I.push(e),_=this.charCodeToPatternIdxToConfig[e],N=this.patternIdxToConfig[e],w=N.length,w=N.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;O=!(!_||!t)}let M;Mn(D,"push_mode"),D.call(this,t);const j=this.config.recoveryEnabled;for(;T<v;){o=null,c=-1;const t=g.charCodeAt(T);let R;if(O){const e=JT(t),r=_[e];R=void 0!==r?r:P}else R=N;const F=R.length;for(r=0;r<F;r++){M=R[r];const n=M.pattern;l=null;const p=M.short;if(!1!==p?t===p&&(c=1,o=n):!0===M.isCustom?(y=n.exec(g,T,E,S),null!==y?(o=y[0],c=o.length,void 0!==y.payload&&(l=y.payload)):o=null):(n.lastIndex=T,c=this.matchLength(n,e,T)),-1!==c){if(s=M.longerAlt,void 0!==s){o=e.substring(T,T+c);const t=s.length;for(a=0;a<t;a++){const t=N[s[a]],r=t.pattern;if(u=null,!0===t.isCustom?(y=r.exec(g,T,E,S),null!==y?(i=y[0],void 0!==y.payload&&(u=y.payload)):i=null):(r.lastIndex=T,i=this.match(r,e,T)),i&&i.length>o.length){o=i,c=i.length,l=u,M=t;break}}}break}}if(-1!==c){if(p=M.group,void 0!==p&&(o=null!==o?o:e.substring(T,T+c),d=M.tokenTypeIdx,f=this.createTokenInstance(o,T,d,M.tokenType,A,C,c),this.handlePayload(f,l),!1===p?$=this.addToken(E,$,f):S[p].push(f)),!0===k&&!0===M.canLineTerminator){let t,r,n=0;x.lastIndex=0;do{o=null!==o?o:e.substring(T,T+c),t=x.test(o),!0===t&&(r=x.lastIndex-1,n++)}while(!0===t);0!==n?(A+=n,C=c-r,this.updateTokenEndLineColumnLocation(f,p,r,n,A,C,c)):C=this.computeNewColumn(C,c)}else C=this.computeNewColumn(C,c);T+=c,this.handleModes(M,L,D,f)}else{const t=T,r=A,a=C;let i=!1===j;for(;!1===i&&T<v;)for(T++,n=0;n<w;n++){const t=N[n],r=t.pattern,a=t.short;if(!1!==a?g.charCodeAt(T)===a&&(i=!0):!0===t.isCustom?i=null!==r.exec(g,T,E,S):(r.lastIndex=T,i=null!==r.exec(e)),!0===i)break}if(m=T-t,C=this.computeNewColumn(C,m),h=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(g,t,m,r,a,Xy(I)),b.push({offset:t,line:r,column:a,length:m,message:h}),!1===j)break}}return this.hasCustom||(E.length=$),{tokens:E,groups:S,errors:b}}handleModes(e,t,r,n){if(!0===e.pop){const a=e.push;t(n),void 0!==a&&r.call(this,a)}else void 0!==e.push&&r.call(this,e.push)}updateTokenEndLineColumnLocation(e,t,r,n,a,i,s){let o,l;void 0!==t&&(o=r===s-1,l=o?-1:0,1===n&&!0===o||(e.endLine=a+l,e.endColumn=i-1-l))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,r,n){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:n}}createStartOnlyToken(e,t,r,n,a,i){return{image:e,startOffset:t,startLine:a,startColumn:i,tokenTypeIdx:r,tokenType:n}}createFullToken(e,t,r,n,a,i,s){return{image:e,startOffset:t,endOffset:t+s-1,startLine:a,endLine:a,startColumn:i,endColumn:i+s-1,tokenTypeIdx:r,tokenType:n}}addTokenUsingPush(e,t,r){return e.push(r),t}addTokenUsingMemberAccess(e,t,r){return e[t]=r,++t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){null!==t&&(e.payload=t)}match(e,t,r){return!0===e.test(t)?t.substring(r,e.lastIndex):null}matchLength(e,t,r){return!0===e.test(t)?e.lastIndex-r:-1}},Mn(b,"Lexer"),b);function $$(e){return R$(e)?e.LABEL:e.name}function R$(e){return Dg(e.LABEL)&&""!==e.LABEL}T$.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",T$.NA=/NOT_APPLICABLE/,Mn($$,"tokenLabel"),Mn(R$,"hasTokenLabel");var E$="categories",b$="label",A$="group",C$="push_mode",S$="pop_mode",k$="longer_alt",x$="line_breaks",w$="start_chars_hint";function N$(e){return _$(e)}function _$(e){const t=e.pattern,r={};if(r.name=e.name,tv(t)||(r.PATTERN=t),Og(e,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.";return Og(e,E$)&&(r.CATEGORIES=e[E$]),a$([r]),Og(e,b$)&&(r.LABEL=e[b$]),Og(e,A$)&&(r.GROUP=e[A$]),Og(e,S$)&&(r.POP_MODE=e[S$]),Og(e,C$)&&(r.PUSH_MODE=e[C$]),Og(e,k$)&&(r.LONGER_ALT=e[k$]),Og(e,x$)&&(r.LINE_BREAKS=e[x$]),Og(e,w$)&&(r.START_CHARS_HINT=e[w$]),r}Mn(N$,"createToken"),Mn(_$,"createTokenInternal");var I$=N$({name:"EOF",pattern:T$.NA});function P$(e,t,r,n,a,i,s,o){return{image:t,startOffset:r,endOffset:n,startLine:a,endLine:i,startColumn:s,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function O$(e,t){return e$(e,t)}a$([I$]),Mn(P$,"createTokenInstance"),Mn(O$,"tokenMatcher");var L$={buildMismatchTokenMessage:({expected:e,actual:t,previous:r,ruleName:n})=>`Expecting ${R$(e)?`--\x3e ${$$(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:a}){const i="Expecting: ",s="\nbut found: '"+Rg(t).image+"'";if(n)return i+n+s;{const t=fv(e,(e,t)=>e.concat(t),[]),r=Cg(t,e=>`[${Cg(e,e=>$$(e)).join(", ")}]`);return i+`one of these possible Token sequences:\n${Cg(r,(e,t)=>` ${t+1}. ${e}`).join("\n")}`+s}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){const a="Expecting: ",i="\nbut found: '"+Rg(t).image+"'";if(r)return a+r+i;return a+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${Cg(e,e=>`[${Cg(e,e=>$$(e)).join(",")}]`).join(" ,")}>`+i}};Object.freeze(L$);var D$={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},M$={buildDuplicateFoundError(e,t){function r(e){return e instanceof zv?e.terminalType.name:e instanceof Iv?e.nonTerminalName:""}Mn(r,"getExtraProductionArgument");const n=e.name,a=Rg(t),i=a.idx,s=Hv(a),o=r(a);let l=`->${s}${i>0?i:""}<- ${o?`with argument: ->${o}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,"\n"),l},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){const t=Cg(e.prefixPath,e=>$$(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin <OR${r}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){const t=0===e.alternation.idx?"":e.alternation.idx,r=0===e.prefixPath.length;let n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${t}> inside <${e.topLevelRule.name}> Rule,\n`;if(r)n+="These alternatives are all empty (match no tokens), making them indistinguishable.\nOnly the last alternative may be empty.\n";else{n+=`<${Cg(e.prefixPath,e=>$$(e)).join(", ")}> may appears as a prefix path in all these alternatives.\n`}return n+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",n},buildEmptyRepetitionError(e){let t=Hv(e.repetition);0!==e.repetition.idx&&(t+=e.repetition.idx);return`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){const t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${t} --\x3e ${Cg(e.leftRecursionPath,e=>e.name).concat([t]).join(" --\x3e ")}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>"deprecated",buildDuplicateRuleNameError(e){let t;t=e.topLevelRule instanceof Pv?e.topLevelRule.name:e.topLevelRule;return`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function j$(e,t){const r=new z$(e,t);return r.resolveRefs(),r.errors}Mn(j$,"resolveGrammar");var F$,G$,z$=(Mn(A=class extends Uv{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){ag(Gg(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:jE.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},"GastRefResolverVisitor"),A),K$=(Mn(C=class extends Yv{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=Rh(this.path.ruleStack).reverse(),this.occurrenceStack=Rh(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){const n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}}updateExpectedNext(){Yg(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},"AbstractNextPossibleTokensWalker"),C),q$=(Mn(S=class extends K${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){const e=t.concat(r),n=new Ov({definition:e});this.possibleTokTypes=Zv(n),this.found=!0}}},"NextAfterTokenWalker"),S),U$=(Mn(k=class extends Yv{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}},"AbstractNextTerminalAfterProductionWalker"),k),B$=(Mn(x=class extends U${walkMany(e,t,r){if(e.idx===this.occurrence){const e=Rg(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof zv&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,r)}},"NextTerminalAfterManyWalker"),x),V$=(Mn(w=class extends U${walkManySep(e,t,r){if(e.idx===this.occurrence){const e=Rg(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof zv&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,r)}},"NextTerminalAfterManySepWalker"),w),W$=(Mn(N=class extends U${walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){const e=Rg(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof zv&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,r)}},"NextTerminalAfterAtLeastOneWalker"),N),H$=(Mn(_=class extends U${walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){const e=Rg(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof zv&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,r)}},"NextTerminalAfterAtLeastOneSepWalker"),_);function Y$(e,t,r=[]){r=Rh(r);let n=[],a=0;function i(t){return t.concat(Jy(e,a+1))}function s(e){const a=Y$(i(e),t,r);return n.concat(a)}for(Mn(i,"remainingPathWith"),Mn(s,"getAlternativesForProd");r.length<t&&a<e.length;){const t=e[a];if(t instanceof Ov)return s(t.definition);if(t instanceof Iv)return s(t.definition);if(t instanceof Lv)n=s(t.definition);else{if(t instanceof Dv){return s(t.definition.concat([new jv({definition:t.definition})]))}if(t instanceof Mv){return s([new Ov({definition:t.definition}),new jv({definition:[new zv({terminalType:t.separator})].concat(t.definition)})])}if(t instanceof Fv){const e=t.definition.concat([new jv({definition:[new zv({terminalType:t.separator})].concat(t.definition)})]);n=s(e)}else if(t instanceof jv){const e=t.definition.concat([new jv({definition:t.definition})]);n=s(e)}else{if(t instanceof Gv)return ag(t.definition,e=>{!1===Yg(e.definition)&&(n=s(e.definition))}),n;if(!(t instanceof zv))throw Error("non exhaustive match");r.push(t.terminalType)}}a++}return n.push({partialPath:r,suffixDef:Jy(e,a)}),n}function X$(e,t,r,n){const a="EXIT_NONE_TERMINAL",i=[a],s="EXIT_ALTERNATIVE";let o=!1;const l=t.length,u=l-n-1,c=[],p=[];for(p.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!Yg(p);){const e=p.pop();if(e===s){o&&Xy(p).idx<=u&&p.pop();continue}const n=e.def,d=e.idx,f=e.ruleStack,m=e.occurrenceStack;if(Yg(n))continue;const h=n[0];if(h===a){const e={idx:d,def:Jy(n),ruleStack:eg(f),occurrenceStack:eg(m)};p.push(e)}else if(h instanceof zv)if(d<l-1){const e=d+1;if(r(t[e],h.terminalType)){const t={idx:e,def:Jy(n),ruleStack:f,occurrenceStack:m};p.push(t)}}else{if(d!==l-1)throw Error("non exhaustive match");c.push({nextTokenType:h.terminalType,nextTokenOccurrence:h.idx,ruleStack:f,occurrenceStack:m}),o=!0}else if(h instanceof Iv){const e=Rh(f);e.push(h.nonTerminalName);const t=Rh(m);t.push(h.idx);const r={idx:d,def:h.definition.concat(i,Jy(n)),ruleStack:e,occurrenceStack:t};p.push(r)}else if(h instanceof Lv){const e={idx:d,def:Jy(n),ruleStack:f,occurrenceStack:m};p.push(e),p.push(s);const t={idx:d,def:h.definition.concat(Jy(n)),ruleStack:f,occurrenceStack:m};p.push(t)}else if(h instanceof Dv){const e=new jv({definition:h.definition,idx:h.idx}),t={idx:d,def:h.definition.concat([e],Jy(n)),ruleStack:f,occurrenceStack:m};p.push(t)}else if(h instanceof Mv){const e=new zv({terminalType:h.separator}),t=new jv({definition:[e].concat(h.definition),idx:h.idx}),r={idx:d,def:h.definition.concat([t],Jy(n)),ruleStack:f,occurrenceStack:m};p.push(r)}else if(h instanceof Fv){const e={idx:d,def:Jy(n),ruleStack:f,occurrenceStack:m};p.push(e),p.push(s);const t=new zv({terminalType:h.separator}),r=new jv({definition:[t].concat(h.definition),idx:h.idx}),a={idx:d,def:h.definition.concat([r],Jy(n)),ruleStack:f,occurrenceStack:m};p.push(a)}else if(h instanceof jv){const e={idx:d,def:Jy(n),ruleStack:f,occurrenceStack:m};p.push(e),p.push(s);const t=new jv({definition:h.definition,idx:h.idx}),r={idx:d,def:h.definition.concat([t],Jy(n)),ruleStack:f,occurrenceStack:m};p.push(r)}else if(h instanceof Gv)for(let t=h.definition.length-1;t>=0;t--){const e={idx:d,def:h.definition[t].definition.concat(Jy(n)),ruleStack:f,occurrenceStack:m};p.push(e),p.push(s)}else if(h instanceof Ov)p.push({idx:d,def:h.definition.concat(Jy(n)),ruleStack:f,occurrenceStack:m});else{if(!(h instanceof Pv))throw Error("non exhaustive match");p.push(Z$(h,d,f,m))}}return c}function Z$(e,t,r,n){const a=Rh(r);a.push(e.name);const i=Rh(n);return i.push(1),{idx:t,def:e.definition,ruleStack:a,occurrenceStack:i}}function J$(e){if(e instanceof Lv||"Option"===e)return F$.OPTION;if(e instanceof jv||"Repetition"===e)return F$.REPETITION;if(e instanceof Dv||"RepetitionMandatory"===e)return F$.REPETITION_MANDATORY;if(e instanceof Mv||"RepetitionMandatoryWithSeparator"===e)return F$.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Fv||"RepetitionWithSeparator"===e)return F$.REPETITION_WITH_SEPARATOR;if(e instanceof Gv||"Alternation"===e)return F$.ALTERNATION;throw Error("non exhaustive match")}function Q$(e){const{occurrence:t,rule:r,prodType:n,maxLookahead:a}=e,i=J$(n);return i===F$.ALTERNATION?cR(t,r,a):pR(t,r,i,a)}function eR(e,t,r,n,a,i){const s=cR(e,t,r);return i(s,n,mR(s)?t$:e$,a)}function tR(e,t,r,n,a,i){const s=pR(e,t,a,r),o=mR(s)?t$:e$;return i(s[0],o,n)}function rR(e,t,r,n){const a=e.length,i=cg(e,e=>cg(e,e=>1===e.length));if(t)return function(t){const n=Cg(t,e=>e.GATE);for(let i=0;i<a;i++){const t=e[i],a=t.length,s=n[i];if(void 0===s||!1!==s.call(this))e:for(let e=0;e<a;e++){const n=t[e],a=n.length;for(let e=0;e<a;e++){const t=this.LA(e+1);if(!1===r(t,n[e]))continue e}return i}}};if(i&&!n){const t=Cg(e,e=>If(e)),r=fv(t,(e,t,r)=>(ag(t,t=>{Og(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),ag(t.categoryMatches,t=>{Og(e,t)||(e[t]=r)})}),e),{});return function(){const e=this.LA(1);return r[e.tokenTypeIdx]}}return function(){for(let t=0;t<a;t++){const n=e[t],a=n.length;e:for(let e=0;e<a;e++){const a=n[e],i=a.length;for(let e=0;e<i;e++){const t=this.LA(e+1);if(!1===r(t,a[e]))continue e}return t}}}}function nR(e,t,r){const n=cg(e,e=>1===e.length),a=e.length;if(n&&!r){const t=If(e);if(1===t.length&&Yg(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=fv(t,(e,t,r)=>(e[t.tokenTypeIdx]=!0,ag(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let r=0;r<a;r++){const n=e[r],a=n.length;for(let e=0;e<a;e++){const r=this.LA(e+1);if(!1===t(r,n[e]))continue e}return!0}return!1}}Mn(Y$,"possiblePathsFrom"),Mn(X$,"nextPossibleTokensAfter"),Mn(Z$,"expandTopLevelRule"),(G$=F$||(F$={}))[G$.OPTION=0]="OPTION",G$[G$.REPETITION=1]="REPETITION",G$[G$.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",G$[G$.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",G$[G$.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",G$[G$.ALTERNATION=5]="ALTERNATION",Mn(J$,"getProdType"),Mn(Q$,"getLookaheadPaths"),Mn(eR,"buildLookaheadFuncForOr"),Mn(tR,"buildLookaheadFuncForOptionalProd"),Mn(rR,"buildAlternativesLookAheadFunc"),Mn(nR,"buildSingleAlternativeLookaheadFunction");var aR=(Mn(I=class extends Yv{constructor(e,t,r){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,r,n){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=r.concat(n),!0)}walkOption(e,t,r){this.checkIsTarget(e,F$.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,F$.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,F$.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,F$.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,F$.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},"RestDefinitionFinderWalker"),I),iR=(Mn(P=class extends Uv{constructor(e,t,r){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=r,this.result=[]}checkIsTarget(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,F$.OPTION)}visitRepetition(e){this.checkIsTarget(e,F$.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,F$.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,F$.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,F$.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,F$.ALTERNATION)}},"InsideDefinitionFinderVisitor"),P);function sR(e){const t=new Array(e);for(let r=0;r<e;r++)t[r]=[];return t}function oR(e){let t=[""];for(let r=0;r<e.length;r++){const n=e[r],a=[];for(let e=0;e<t.length;e++){const r=t[e];a.push(r+"_"+n.tokenTypeIdx);for(let e=0;e<n.categoryMatches.length;e++){const t="_"+n.categoryMatches[e];a.push(r+t)}}t=a}return t}function lR(e,t,r){for(let n=0;n<e.length;n++){if(n===r)continue;const a=e[n];for(let e=0;e<t.length;e++){if(!0===a[t[e]])return!1}}return!0}function uR(e,t){const r=Cg(e,e=>Y$([e],1)),n=sR(r.length),a=Cg(r,e=>{const t={};return ag(e,e=>{const r=oR(e.partialPath);ag(r,e=>{t[e]=!0})}),t});let i=r;for(let s=1;s<=t;s++){const e=i;i=sR(e.length);for(let r=0;r<e.length;r++){const o=e[r];for(let e=0;e<o.length;e++){const l=o[e].partialPath,u=o[e].suffixDef,c=oR(l);if(lR(a,c,r)||Yg(u)||l.length===t){const e=n[r];if(!1===dR(e,l)){e.push(l);for(let e=0;e<c.length;e++){const t=c[e];a[r][t]=!0}}}else{const e=Y$(u,s+1,l);i[r]=i[r].concat(e),ag(e,e=>{const t=oR(e.partialPath);ag(t,e=>{a[r][e]=!0})})}}}}return n}function cR(e,t,r,n){const a=new iR(e,F$.ALTERNATION,n);return t.accept(a),uR(a.result,r)}function pR(e,t,r,n){const a=new iR(e,r);t.accept(a);const i=a.result,s=new aR(t,e,r).startWalking();return uR([new Ov({definition:i}),new Ov({definition:s})],n)}function dR(e,t){e:for(let r=0;r<e.length;r++){const n=e[r];if(n.length===t.length){for(let e=0;e<n.length;e++){const r=t[e],a=n[e];if(!1===(r===a||void 0!==a.categoryMatchesMap[r.tokenTypeIdx]))continue e}return!0}}return!1}function fR(e,t){return e.length<t.length&&cg(e,(e,r)=>{const n=t[r];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]})}function mR(e){return cg(e,e=>cg(e,e=>cg(e,e=>Yg(e.categoryMatches))))}function hR(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return Cg(t,e=>Object.assign({type:jE.CUSTOM_LOOKAHEAD_VALIDATION},e))}function yR(e,t,r,n){const a=kg(e,e=>gR(e,r)),i=PR(e,t,r),s=kg(e,e=>wR(e,r)),o=kg(e,t=>RR(t,e,n,r));return a.concat(i,s,o)}function gR(e,t){const r=new $R;e.accept(r);const n=r.allProductions,a=wg(n,vR),i=uv(a,e=>e.length>1);return Cg(Gg(i),r=>{const n=Rg(r),a=t.buildDuplicateFoundError(e,r),i=Hv(n),s={message:a,type:jE.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:i,occurrence:n.idx},o=TR(n);return o&&(s.parameter=o),s})}function vR(e){return`${Hv(e)}_#_${e.idx}_#_${TR(e)}`}function TR(e){return e instanceof zv?e.terminalType.name:e instanceof Iv?e.nonTerminalName:""}Mn(sR,"initializeArrayOfArrays"),Mn(oR,"pathToHashKeys"),Mn(lR,"isUniquePrefixHash"),Mn(uR,"lookAheadSequenceFromAlternatives"),Mn(cR,"getLookaheadPathsForOr"),Mn(pR,"getLookaheadPathsForOptionalProd"),Mn(dR,"containsPath"),Mn(fR,"isStrictPrefixOfPath"),Mn(mR,"areTokenCategoriesNotUsed"),Mn(hR,"validateLookahead"),Mn(yR,"validateGrammar"),Mn(gR,"validateDuplicateProductions"),Mn(vR,"identifyProductionForDuplicates"),Mn(TR,"getExtraProductionArgument");var $R=(Mn(O=class extends Uv{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)}},"OccurrenceValidationCollector"),O);function RR(e,t,r,n){const a=[];if(fv(t,(t,r)=>r.name===e.name?t+1:t,0)>1){const t=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});a.push({message:t,type:jE.DUPLICATE_RULE_NAME,ruleName:e.name})}return a}function ER(e,t,r){const n=[];let a;return qg(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:jE.INVALID_RULE_OVERRIDE,ruleName:e})),n}function bR(e,t,r,n=[]){const a=[],i=AR(t.definition);if(Yg(i))return[];{const t=e.name;qg(i,e)&&a.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:jE.LEFT_RECURSION,ruleName:t});const s=Hy(i,n.concat([e])),o=kg(s,t=>{const a=Rh(n);return a.push(t),bR(e,t,r,a)});return a.concat(o)}}function AR(e){let t=[];if(Yg(e))return t;const r=Rg(e);if(r instanceof Iv)t.push(r.referencedRule);else if(r instanceof Ov||r instanceof Lv||r instanceof Dv||r instanceof Mv||r instanceof Fv||r instanceof jv)t=t.concat(AR(r.definition));else if(r instanceof Gv)t=If(Cg(r.definition,e=>AR(e.definition)));else if(!(r instanceof zv))throw Error("non exhaustive match");const n=Vv(r),a=e.length>1;if(n&&a){const r=Jy(e);return t.concat(AR(r))}return t}Mn(RR,"validateRuleDoesNotAlreadyExist"),Mn(ER,"validateRuleIsOverridden"),Mn(bR,"validateNoLeftRecursion"),Mn(AR,"getFirstNoneTerminal");var CR=(Mn(L=class extends Uv{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},"OrCollector"),L);function SR(e,t){const r=new CR;e.accept(r);const n=r.alternations;return kg(n,r=>{const n=eg(r.definition);return kg(n,(n,a)=>{const i=X$([n],[],e$,1);return Yg(i)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:r,emptyChoiceIdx:a}),type:jE.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:r.idx,alternative:a+1}]:[]})})}function kR(e,t,r){const n=new CR;e.accept(n);let a=n.alternations;a=hv(a,e=>!0===e.ignoreAmbiguities);return kg(a,n=>{const a=n.idx,i=n.maxLookahead||t,s=cR(a,e,i,n),o=_R(s,n,e,r),l=IR(s,n,e,r);return o.concat(l)})}Mn(SR,"validateEmptyOrAlternative"),Mn(kR,"validateAmbiguousAlternationAlternatives");var xR=(Mn(D=class extends Uv{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)}},"RepetitionCollector"),D);function wR(e,t){const r=new CR;e.accept(r);const n=r.alternations;return kg(n,r=>r.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:r}),type:jE.TOO_MANY_ALTS,ruleName:e.name,occurrence:r.idx}]:[])}function NR(e,t,r){const n=[];return ag(e,e=>{const a=new xR;e.accept(a);const i=a.allProductions;ag(i,a=>{const i=J$(a),s=a.maxLookahead||t,o=pR(a.idx,e,i,s)[0];if(Yg(If(o))){const t=r.buildEmptyRepetitionError({topLevelRule:e,repetition:a});n.push({message:t,type:jE.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),n}function _R(e,t,r,n){const a=[],i=fv(e,(r,n,i)=>(!0===t.definition[i].ignoreAmbiguities||ag(n,n=>{const s=[i];ag(e,(e,r)=>{i!==r&&dR(e,n)&&!0!==t.definition[r].ignoreAmbiguities&&s.push(r)}),s.length>1&&!dR(a,n)&&(a.push(n),r.push({alts:s,path:n}))}),r),[]);return Cg(i,e=>{const a=Cg(e.alts,e=>e+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:a,prefixPath:e.path}),type:jE.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:e.alts}})}function IR(e,t,r,n){const a=fv(e,(e,t,r)=>{const n=Cg(t,e=>({idx:r,path:e}));return e.concat(n)},[]);return bh(kg(a,e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];const i=e.idx,s=e.path,o=mg(a,e=>!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<i&&fR(e.path,s));return Cg(o,e=>{const a=[e.idx+1,i+1],s=0===t.idx?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:a,prefixPath:e.path}),type:jE.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:s,alternatives:a}})}))}function PR(e,t,r){const n=[],a=Cg(t,e=>e.name);return ag(e,e=>{const t=e.name;if(qg(a,t)){const a=r.buildNamespaceConflictError(e);n.push({message:a,type:jE.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),n}function OR(e){const t=zy(e,{errMsgProvider:D$}),r={};return ag(e.rules,e=>{r[e.name]=e}),j$(r,t.errMsgProvider)}function LR(e){return yR((e=zy(e,{errMsgProvider:M$})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}Mn(wR,"validateTooManyAlts"),Mn(NR,"validateSomeNonEmptyLookaheadPath"),Mn(_R,"checkAlternativesAmbiguities"),Mn(IR,"checkPrefixAlternativesAmbiguities"),Mn(PR,"checkTerminalAndNoneTerminalsNameSpace"),Mn(OR,"resolveGrammar"),Mn(LR,"validateGrammar");var DR="MismatchedTokenException",MR="NoViableAltException",jR="EarlyExitException",FR="NotAllInputParsedException",GR=[DR,MR,jR,FR];function zR(e){return qg(GR,e.name)}Object.freeze(GR),Mn(zR,"isRecognitionException");var KR=(M=class extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Mn(M,"RecognitionException"),M),qR=(Mn(j=class extends KR{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=DR}},"MismatchedTokenException"),j),UR=(Mn(F=class extends KR{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=MR}},"NoViableAltException"),F),BR=(Mn(G=class extends KR{constructor(e,t){super(e,t),this.name=FR}},"NotAllInputParsedException"),G),VR=(Mn(z=class extends KR{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=jR}},"EarlyExitException"),z),WR={},HR="InRuleRecoveryException",YR=(K=class extends Error{constructor(e){super(e),this.name=HR}},Mn(K,"InRuleRecoveryException"),K),XR=(Mn(q=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Og(e,"recoveryEnabled")?e.recoveryEnabled:GE.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=ZR)}getTokenToInsert(e){const t=P$(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){const a=this.findReSyncTokenType(),i=this.exportLexerState(),s=[];let o=!1;const l=this.LA(1);let u=this.LA(1);const c=Mn(()=>{const e=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),r=new qR(t,l,this.LA(0));r.resyncedTokens=eg(s),this.SAVE_ERROR(r)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(u,n))return void c();if(r.call(this))return c(),void e.apply(this,t);this.tokenMatcher(u,a)?o=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,s))}this.importLexerState(i)}shouldInRepetitionRecoveryBeTried(e,t,r){return!1!==r&&(!this.tokenMatcher(this.LA(1),e)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))))}getFollowsForInRuleRecovery(e,t){const 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)){const e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new YR("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if(Yg(t))return!1;const r=this.LA(1);return void 0!==Tg(t,e=>this.tokenMatcher(r,e))}canRecoverWithSingleTokenDeletion(e){if(!this.canTokenTypeBeDeletedInRecovery(e))return!1;return this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return qg(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),r=2;for(;;){const n=Tg(e,e=>O$(t,e));if(void 0!==n)return n;t=this.LA(r),r++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return WR;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return Cg(e,(r,n)=>0===n?WR:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[n],inRule:this.shortRuleNameToFullName(e[n-1])})}flattenFollowSet(){const e=Cg(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return If(e)}getFollowSetFromFollowKey(e){if(e===WR)return[I$];const t=e.ruleName+e.idxInCallingRule+tT+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,I$)||t.push(e),t}reSyncTo(e){const t=[];let r=this.LA(1);for(;!1===this.tokenMatcher(r,e);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return eg(t)}attemptInRepetitionRecovery(e,t,r,n,a,i,s){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Rh(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return Cg(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},"Recoverable"),q);function ZR(e,t,r,n,a,i,s){const o=this.getKeyForAutomaticLookahead(n,a);let l=this.firstAfterRepMap[o];if(void 0===l){const e=this.getCurrRuleFullName();l=new i(this.getGAstProductions()[e],a).startWalking(),this.firstAfterRepMap[o]=l}let u=l.token,c=l.occurrence;const p=l.isEndOfRule;1===this.RULE_STACK.length&&p&&void 0===u&&(u=I$,c=1),void 0!==u&&void 0!==c&&this.shouldInRepetitionRecoveryBeTried(u,c,s)&&this.tryInRepetitionRecovery(e,t,r,u)}Mn(ZR,"attemptInRepetitionRecovery");var JR=1024,QR=1280,eE=1536;function tE(e,t,r){return r|t|e}Mn(tE,"getKeyForAutomaticLookahead");var rE=(Mn(U=class{constructor(e){var t;this.maxLookahead=null!==(t=null==e?void 0:e.maxLookahead)&&void 0!==t?t:GE.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if(Yg(t)){const r=this.validateEmptyOrAlternatives(e.rules),n=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),a=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...r,...n,...a]}return t}validateNoLeftRecursion(e){return kg(e,e=>bR(e,e,M$))}validateEmptyOrAlternatives(e){return kg(e,e=>SR(e,M$))}validateAmbiguousAlternationAlternatives(e,t){return kg(e,e=>kR(e,t,M$))}validateSomeNonEmptyLookaheadPath(e,t){return NR(e,t,M$)}buildLookaheadForAlternation(e){return eR(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,rR)}buildLookaheadForOptional(e){return tR(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,J$(e.prodType),nR)}},"LLkLookaheadStrategy"),U),nE=(Mn(B=class{initLooksAhead(e){this.dynamicTokensEnabled=Og(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:GE.dynamicTokensEnabled,this.maxLookahead=Og(e,"maxLookahead")?e.maxLookahead:GE.maxLookahead,this.lookaheadStrategy=Og(e,"lookaheadStrategy")?e.lookaheadStrategy:new rE({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){ag(e,e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{const{alternation:t,repetition:r,option:n,repetitionMandatory:a,repetitionMandatoryWithSeparator:i,repetitionWithSeparator:s}=iE(e);ag(t,t=>{const r=0===t.idx?"":t.idx;this.TRACE_INIT(`${Hv(t)}${r}`,()=>{const r=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),n=tE(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(n,r)})}),ag(r,t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,Hv(t))}),ag(n,t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,Hv(t))}),ag(a,t=>{this.computeLookaheadFunc(e,t.idx,JR,"RepetitionMandatory",t.maxLookahead,Hv(t))}),ag(i,t=>{this.computeLookaheadFunc(e,t.idx,eE,"RepetitionMandatoryWithSeparator",t.maxLookahead,Hv(t))}),ag(s,t=>{this.computeLookaheadFunc(e,t.idx,QR,"RepetitionWithSeparator",t.maxLookahead,Hv(t))})})})}computeLookaheadFunc(e,t,r,n,a,i){this.TRACE_INIT(`${i}${0===t?"":t}`,()=>{const i=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),s=tE(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(s,i)})}getKeyForAutomaticLookahead(e,t){return tE(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},"LooksAhead"),B),aE=new(Mn(V=class extends Uv{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)}},"DslMethodsCollectorVisitor"),V);function iE(e){aE.reset(),e.accept(aE);const t=aE.dslMethods;return aE.reset(),t}function sE(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset)}function oE(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function lE(e,t,r){void 0===e.children[r]?e.children[r]=[t]:e.children[r].push(t)}function uE(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}Mn(iE,"collectMethods"),Mn(sE,"setNodeLocationOnlyOffset"),Mn(oE,"setNodeLocationFull"),Mn(lE,"addTerminalToCst"),Mn(uE,"addNoneTerminalToCst");var cE,pE;function dE(e,t){Object.defineProperty(e,"name",{enumerable:!1,configurable:!0,writable:!1,value:t})}function fE(e,t){const r=ed(e),n=r.length;for(let a=0;a<n;a++){const n=e[r[a]],i=n.length;for(let e=0;e<i;e++){const r=n[e];void 0===r.tokenTypeIdx&&this[r.name](r.children,t)}}}function mE(e,t){const r=Mn(function(){},"derivedConstructor");dE(r,e+"BaseSemantics");const n={visit:Mn(function(e,t){if(bu(e)&&(e=e[0]),!tv(e))return this[e.name](e.children,t)},"visit"),validateVisitor:Mn(function(){const e=yE(this,t);if(!Yg(e)){const t=Cg(e,e=>e.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g,"\n\t")}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function hE(e,t,r){const n=Mn(function(){},"derivedConstructor");dE(n,e+"BaseSemanticsWithDefaults");const a=Object.create(r.prototype);return ag(t,e=>{a[e]=fE}),n.prototype=a,n.prototype.constructor=n,n}function yE(e,t){return gE(e,t)}function gE(e,t){const r=mg(t,t=>!1===Zu(e[t])),n=Cg(r,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:cE.MISSING_METHOD,methodName:t}));return bh(n)}Mn(dE,"defineNameProp"),Mn(fE,"defaultVisit"),Mn(mE,"createBaseSemanticVisitorConstructor"),Mn(hE,"createBaseVisitorConstructorWithDefaults"),(pE=cE||(cE={}))[pE.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",pE[pE.MISSING_METHOD=1]="MISSING_METHOD",Mn(yE,"validateVisitor"),Mn(gE,"validateMissingCstMethods");var vE=(Mn(W=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Og(e,"nodeLocationTracking")?e.nodeLocationTracking:GE.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=oE,this.setNodeLocationFromNode=oE,this.cstPostRule=bc,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=bc,this.setNodeLocationFromNode=bc,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=sE,this.setNodeLocationFromNode=sE,this.cstPostRule=bc,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=bc,this.setNodeLocationFromNode=bc,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=bc,this.setNodeLocationFromNode=bc,this.cstPostRule=bc,this.setInitialNodeLocation=bc}else this.cstInvocationStateUpdate=bc,this.cstFinallyStateUpdate=bc,this.cstPostTerminal=bc,this.cstPostNonTerminal=bc,this.cstPostRule=bc}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){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];lE(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];uE(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(tv(this.baseCstVisitorConstructor)){const e=mE(this.className,ed(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(tv(this.baseCstVisitorWithDefaultsConstructor)){const e=hE(this.className,ed(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},"TreeBuilder"),W),TE=(Mn(H=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):ME}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?ME: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()}},"LexerAdapter"),H),$E=(Mn(Y=class{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=zE){if(qg(this.definedRulesNames,e)){const t={message:M$.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:jE.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);const n=this.defineRule(e,t,r);return this[e]=n,n}OVERRIDE_RULE(e,t,r=zE){const n=ER(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);const a=this.defineRule(e,t,r);return this[e]=a,a}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const r=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if(zR(n))return!1;throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Kv(Gg(this.gastProductionsCache))}},"RecognizerApi"),Y),RE=(Mn(X=class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=t$,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Og(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(bu(e)){if(Yg(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(bu(e))this.tokensMap=fv(e,(e,t)=>(e[t.name]=t,e),{});else if(Og(e,"modes")&&cg(If(Gg(e.modes)),m$)){const t=If(Gg(e.modes)),r=Av(t);this.tokensMap=fv(r,(e,t)=>(e[t.name]=t,e),{})}else{if(!Lu(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Rh(e)}this.tokensMap.EOF=I$;const r=Og(e,"modes")?If(Gg(e.modes)):Gg(e),n=cg(r,e=>Yg(e.categoryMatches));this.tokenMatcher=n?t$:e$,a$(Gg(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'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const n=Og(r,"resyncEnabled")?r.resyncEnabled:zE.resyncEnabled,a=Og(r,"recoveryValueFunc")?r.recoveryValueFunc:zE.recoveryValueFunc,i=this.ruleShortNameIdx<<12;let s;this.ruleShortNameIdx++,this.shortRuleNameToFull[i]=e,this.fullRuleNameToShort[e]=i,s=!0===this.outputCst?Mn(function(...r){try{this.ruleInvocationStateUpdate(i,e,this.subruleIdx),t.apply(this,r);const n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}catch(s){return this.invokeRuleCatch(s,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):Mn(function(...r){try{return this.ruleInvocationStateUpdate(i,e,this.subruleIdx),t.apply(this,r)}catch(s){return this.invokeRuleCatch(s,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst");return Object.assign(s,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,r){const n=1===this.RULE_STACK.length,a=t&&!this.isBackTracking()&&this.recoveryEnabled;if(zR(e)){const t=e;if(a){const n=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(n)){if(t.resyncedTokens=this.reSyncTo(n),this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return r(e)}if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(n)return this.moveToTerminatedState(),r(e);throw t}throw e}optionInternal(e,t){const r=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let n,a=this.getLaFuncFromCache(r);if("function"!=typeof e){n=e.DEF;const t=e.GATE;if(void 0!==t){const e=a;a=Mn(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else n=e;if(!0===a.call(this))return n.call(this)}atLeastOneInternal(e,t){const r=this.getKeyForAutomaticLookahead(JR,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let n,a=this.getLaFuncFromCache(r);if("function"!=typeof t){n=t.DEF;const e=t.GATE;if(void 0!==e){const t=a;a=Mn(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else n=t;if(!0!==a.call(this))throw this.raiseEarlyExitException(e,F$.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(n);for(;!0===a.call(this)&&!0===e;)e=this.doSingleRepetition(n)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],a,JR,e,W$)}atLeastOneSepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(eE,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){const n=t.DEF,a=t.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(e,F$.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{n.call(this);const t=Mn(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;!0===this.tokenMatcher(this.LA(1),a);)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,t,n,H$],t,eE,e,H$)}}manyInternal(e,t){const r=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let n,a=this.getLaFuncFromCache(r);if("function"!=typeof t){n=t.DEF;const e=t.GATE;if(void 0!==e){const t=a;a=Mn(()=>e.call(this)&&t.call(this),"lookaheadFunction")}}else n=t;let i=!0;for(;!0===a.call(this)&&!0===i;)i=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],a,768,e,B$,i)}manySepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(QR,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){const n=t.DEF,a=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){n.call(this);const t=Mn(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;!0===this.tokenMatcher(this.LA(1),a);)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,t,n,V$],t,QR,e,V$)}}repetitionSepSecondInternal(e,t,r,n,a){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,a],r,eE,e,a)}doSingleRepetition(e){const t=this.getLexerPosition();e.call(this);return this.getLexerPosition()>t}orInternal(e,t){const r=this.getKeyForAutomaticLookahead(256,t),n=bu(e)?e:e.DEF,a=this.getLaFuncFromCache(r).call(this,n);if(void 0!==a){return n[a].ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new BR(t,e))}}subruleInternal(e,t,r){let n;try{const a=void 0!==r?r.ARGS:void 0;return this.subruleIdx=t,n=e.apply(this,a),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),n}catch(a){throw this.subruleInternalError(a,r,e.ruleName)}}subruleInternalError(e,t,r){throw zR(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let n;try{const t=this.LA(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),n=t):this.consumeInternalError(e,t,r)}catch(a){n=this.consumeInternalRecovery(e,t,a)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){let n;const a=this.LA(0);throw n=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new qR(n,t,a))}consumeInternalRecovery(e,t,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;{const a=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,a)}catch(n){throw n.name===HR?r:n}}}saveRecogState(){const e=this.errors,t=Rh(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 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),I$)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},"RecognizerEngine"),X),EE=(Mn(Z=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Og(e,"errorMessageProvider")?e.errorMessageProvider:GE.errorMessageProvider}SAVE_ERROR(e){if(zR(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Rh(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Rh(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){const n=this.getCurrRuleFullName(),a=pR(e,this.getGAstProductions()[n],t,this.maxLookahead)[0],i=[];for(let o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));const s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new VR(s,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const r=this.getCurrRuleFullName(),n=cR(e,this.getGAstProductions()[r],this.maxLookahead),a=[];for(let o=1;o<=this.maxLookahead;o++)a.push(this.LA(o));const i=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:n,actual:a,previous:i,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new UR(s,this.LA(1),i))}},"ErrorHandler"),Z),bE=(Mn(J=class{initContentAssist(){}computeContentAssist(e,t){const r=this.gastProductionsCache[e];if(tv(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return X$([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=Rg(e.ruleStack),r=this.getGAstProductions()[t];return new q$(r,e).startWalking()}},"ContentAssist"),J),AE={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(AE);var CE=!0,SE=Math.pow(2,8)-1,kE=N$({name:"RECORDING_PHASE_TOKEN",pattern:T$.NA});a$([kE]);var xE=P$(kE,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(xE);var wE={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}},NE=(Mn(Q=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,r){return this.consumeInternalRecord(t,e,r)},this[`SUBRULE${t}`]=function(t,r){return this.subruleInternalRecord(t,e,r)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}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",()=>{const e=this;for(let t=0;t<10;t++){const 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 ME}topLevelRuleRecord(e,t){try{const r=new Pv({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(r){if(!0!==r.KNOWN_RECORDER_ERROR)try{r.message=r.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(n){throw r}throw r}}optionInternalRecord(e,t){return _E.call(this,Lv,e,t)}atLeastOneInternalRecord(e,t){_E.call(this,Dv,t,e)}atLeastOneSepFirstInternalRecord(e,t){_E.call(this,Mv,t,e,CE)}manyInternalRecord(e,t){_E.call(this,jv,t,e)}manySepFirstInternalRecord(e,t){_E.call(this,Fv,t,e,CE)}orInternalRecord(e,t){return IE.call(this,e,t)}subruleInternalRecord(e,t,r){if(OE(t),!e||!1===Og(e,"ruleName")){const r=new Error(`<SUBRULE${PE(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw r.KNOWN_RECORDER_ERROR=!0,r}const n=Xy(this.recordingProdStack),a=e.ruleName,i=new Iv({idx:t,nonTerminalName:a,label:null==r?void 0:r.LABEL,referencedRule:void 0});return n.definition.push(i),this.outputCst?wE:AE}consumeInternalRecord(e,t,r){if(OE(t),!c$(e)){const r=new Error(`<CONSUME${PE(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw r.KNOWN_RECORDER_ERROR=!0,r}const n=Xy(this.recordingProdStack),a=new zv({idx:t,terminalType:e,label:null==r?void 0:r.LABEL});return n.definition.push(a),xE}},"GastRecorder"),Q);function _E(e,t,r,n=!1){OE(r);const a=Xy(this.recordingProdStack),i=Zu(t)?t:t.DEF,s=new e({definition:[],idx:r});return n&&(s.separator=t.SEP),Og(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),i.call(this),a.definition.push(s),this.recordingProdStack.pop(),AE}function IE(e,t){OE(t);const r=Xy(this.recordingProdStack),n=!1===bu(e),a=!1===n?e:e.DEF,i=new Gv({definition:[],idx:t,ignoreAmbiguities:n&&!0===e.IGNORE_AMBIGUITIES});Og(e,"MAX_LOOKAHEAD")&&(i.maxLookahead=e.MAX_LOOKAHEAD);const s=Tv(a,e=>Zu(e.GATE));return i.hasPredicates=s,r.definition.push(i),ag(a,e=>{const t=new Ov({definition:[]});i.definition.push(t),Og(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:Og(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),AE}function PE(e){return 0===e?"":`${e}`}function OE(e){if(e<0||e>SE){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${SE+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}Mn(_E,"recordProd"),Mn(IE,"recordOrProd"),Mn(PE,"getIdxSuffix"),Mn(OE,"assertMethodIdxIsValid");var LE=(Mn(ee=class{initPerformanceTracer(e){if(Og(e,"traceInitPerf")){const t=e.traceInitPerf,r="number"==typeof t;this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=GE.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent,this.traceInitMaxIdent;const{time:n,value:a}=kv(t),i=n>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&i(`${r}<-- <${e}> time: ${n}ms`),this.traceInitIndent--,a}return t()}},"PerformanceTracer"),ee);function DE(e,t){t.forEach(t=>{const r=t.prototype;Object.getOwnPropertyNames(r).forEach(n=>{if("constructor"===n)return;const a=Object.getOwnPropertyDescriptor(r,n);a&&(a.get||a.set)?Object.defineProperty(e.prototype,n,a):e.prototype[n]=t.prototype[n]})})}Mn(DE,"applyMixins");var ME=P$(I$,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(ME);var jE,FE,GE=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:L$,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),zE=Object.freeze({recoveryValueFunc:Mn(()=>{},"recoveryValueFunc"),resyncEnabled:!0});function KE(e=void 0){return function(){return e}}(FE=jE||(jE={}))[FE.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",FE[FE.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",FE[FE.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",FE[FE.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",FE[FE.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",FE[FE.LEFT_RECURSION=5]="LEFT_RECURSION",FE[FE.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",FE[FE.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",FE[FE.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",FE[FE.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",FE[FE.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",FE[FE.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",FE[FE.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",FE[FE.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",Mn(KE,"EMPTY_ALT");var qE=(Mn(te=class{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",()=>{xv(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),ag(this.definedRulesNames,e=>{const t=this[e].originalGrammarAction;let r;this.TRACE_INIT(`${e} Rule`,()=>{r=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=r})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT("Grammar Resolving",()=>{r=OR({rules:Gg(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(Yg(r)&&!1===this.skipValidations){const e=LR({rules:Gg(this.gastProductionsCache),tokenTypes:Gg(this.tokensMap),errMsgProvider:M$,grammarName:t}),r=hR({lookaheadStrategy:this.lookaheadStrategy,rules:Gg(this.gastProductionsCache),tokenTypes:Gg(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(e,r)}}),Yg(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const e=nT(Gg(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null===(t=(e=this.lookaheadStrategy).initialize)||void 0===t||t.call(e,{rules:Gg(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Gg(this.gastProductionsCache))})),!te.DEFER_DEFINITION_ERRORS_HANDLING&&!Yg(this.definitionErrors))throw e=Cg(this.definitionErrors,e=>e.message),new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const r=this;if(r.initErrorHandler(t),r.initLexerAdapter(),r.initLooksAhead(t),r.initRecognizerEngine(e,t),r.initRecoverable(t),r.initTreeBuilder(t),r.initContentAssist(),r.initGastRecorder(t),r.initPerformanceTracer(t),Og(t,"ignoredIssues"))throw new Error("The <ignoredIssues> IParserConfig property has been deprecated.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=Og(t,"skipValidations")?t.skipValidations:GE.skipValidations}},"Parser"),te);qE.DEFER_DEFINITION_ERRORS_HANDLING=!1,DE(qE,[XR,nE,vE,TE,RE,$E,EE,bE,NE,LE]);var UE=(Mn(re=class extends qE{constructor(e,t=GE){const r=Rh(t);r.outputCst=!1,super(e,r)}},"EmbeddedActionsParser"),re);function BE(e,t){for(var r=-1,n=null==e?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}Mn(BE,"arrayMap");var VE=BE;function WE(){this.__data__=[],this.size=0}Mn(WE,"listCacheClear");var HE=WE;function YE(e,t){return e===t||e!=e&&t!=t}Mn(YE,"eq");var XE=YE;function ZE(e,t){for(var r=e.length;r--;)if(XE(e[r][0],t))return r;return-1}Mn(ZE,"assocIndexOf");var JE=ZE,QE=Array.prototype.splice;function eb(e){var t=this.__data__,r=JE(t,e);return!(r<0)&&(r==t.length-1?t.pop():QE.call(t,r,1),--this.size,!0)}Mn(eb,"listCacheDelete");var tb=eb;function rb(e){var t=this.__data__,r=JE(t,e);return r<0?void 0:t[r][1]}Mn(rb,"listCacheGet");var nb=rb;function ab(e){return JE(this.__data__,e)>-1}Mn(ab,"listCacheHas");var ib=ab;function sb(e,t){var r=this.__data__,n=JE(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}Mn(sb,"listCacheSet");var ob=sb;function lb(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mn(lb,"ListCache"),lb.prototype.clear=HE,lb.prototype.delete=tb,lb.prototype.get=nb,lb.prototype.has=ib,lb.prototype.set=ob;var ub=lb;function cb(){this.__data__=new ub,this.size=0}Mn(cb,"stackClear");var pb=cb;function db(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}Mn(db,"stackDelete");var fb=db;function mb(e){return this.__data__.get(e)}Mn(mb,"stackGet");var hb=mb;function yb(e){return this.__data__.has(e)}Mn(yb,"stackHas");var gb=yb,vb="object"==typeof global&&global&&global.Object===Object&&global,Tb="object"==typeof self&&self&&self.Object===Object&&self,$b=vb||Tb||Function("return this")(),Rb=$b.Symbol,Eb=Object.prototype,bb=Eb.hasOwnProperty,Ab=Eb.toString,Cb=Rb?Rb.toStringTag:void 0;function Sb(e){var t=bb.call(e,Cb),r=e[Cb];try{e[Cb]=void 0;var n=!0}catch(i){}var a=Ab.call(e);return n&&(t?e[Cb]=r:delete e[Cb]),a}Mn(Sb,"getRawTag");var kb=Sb,xb=Object.prototype.toString;function wb(e){return xb.call(e)}Mn(wb,"objectToString");var Nb=wb,_b=Rb?Rb.toStringTag:void 0;function Ib(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":_b&&_b in Object(e)?kb(e):Nb(e)}Mn(Ib,"baseGetTag");var Pb=Ib;function Ob(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}Mn(Ob,"isObject");var Lb=Ob;function Db(e){if(!Lb(e))return!1;var t=Pb(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}Mn(Db,"isFunction");var Mb=Db,jb=$b["__core-js_shared__"],Fb=function(){var e=/[^.]+$/.exec(jb&&jb.keys&&jb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Gb(e){return!!Fb&&Fb in e}Mn(Gb,"isMasked");var zb=Gb,Kb=Function.prototype.toString;function qb(e){if(null!=e){try{return Kb.call(e)}catch(t){}try{return e+""}catch(t){}}return""}Mn(qb,"toSource");var Ub=qb,Bb=/^\[object .+?Constructor\]$/,Vb=Function.prototype,Wb=Object.prototype,Hb=Vb.toString,Yb=Wb.hasOwnProperty,Xb=RegExp("^"+Hb.call(Yb).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zb(e){return!(!Lb(e)||zb(e))&&(Mb(e)?Xb:Bb).test(Ub(e))}Mn(Zb,"baseIsNative");var Jb=Zb;function Qb(e,t){return null==e?void 0:e[t]}Mn(Qb,"getValue");var eA=Qb;function tA(e,t){var r=eA(e,t);return Jb(r)?r:void 0}Mn(tA,"getNative");var rA=tA,nA=rA($b,"Map"),aA=rA(Object,"create");function iA(){this.__data__=aA?aA(null):{},this.size=0}Mn(iA,"hashClear");var sA=iA;function oA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}Mn(oA,"hashDelete");var lA=oA,uA=Object.prototype.hasOwnProperty;function cA(e){var t=this.__data__;if(aA){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return uA.call(t,e)?t[e]:void 0}Mn(cA,"hashGet");var pA=cA,dA=Object.prototype.hasOwnProperty;function fA(e){var t=this.__data__;return aA?void 0!==t[e]:dA.call(t,e)}Mn(fA,"hashHas");var mA=fA;function hA(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=aA&&void 0===t?"__lodash_hash_undefined__":t,this}Mn(hA,"hashSet");var yA=hA;function gA(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mn(gA,"Hash"),gA.prototype.clear=sA,gA.prototype.delete=lA,gA.prototype.get=pA,gA.prototype.has=mA,gA.prototype.set=yA;var vA=gA;function TA(){this.size=0,this.__data__={hash:new vA,map:new(nA||ub),string:new vA}}Mn(TA,"mapCacheClear");var $A=TA;function RA(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}Mn(RA,"isKeyable");var EA=RA;function bA(e,t){var r=e.__data__;return EA(t)?r["string"==typeof t?"string":"hash"]:r.map}Mn(bA,"getMapData");var AA=bA;function CA(e){var t=AA(this,e).delete(e);return this.size-=t?1:0,t}Mn(CA,"mapCacheDelete");var SA=CA;function kA(e){return AA(this,e).get(e)}Mn(kA,"mapCacheGet");var xA=kA;function wA(e){return AA(this,e).has(e)}Mn(wA,"mapCacheHas");var NA=wA;function _A(e,t){var r=AA(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}Mn(_A,"mapCacheSet");var IA=_A;function PA(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mn(PA,"MapCache"),PA.prototype.clear=$A,PA.prototype.delete=SA,PA.prototype.get=xA,PA.prototype.has=NA,PA.prototype.set=IA;var OA=PA;function LA(e,t){var r=this.__data__;if(r instanceof ub){var n=r.__data__;if(!nA||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new OA(n)}return r.set(e,t),this.size=r.size,this}Mn(LA,"stackSet");var DA=LA;function MA(e){var t=this.__data__=new ub(e);this.size=t.size}Mn(MA,"Stack"),MA.prototype.clear=pb,MA.prototype.delete=fb,MA.prototype.get=hb,MA.prototype.has=gb,MA.prototype.set=DA;var jA=MA;function FA(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}Mn(FA,"setCacheAdd");var GA=FA;function zA(e){return this.__data__.has(e)}Mn(zA,"setCacheHas");var KA=zA;function qA(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new OA;++t<r;)this.add(e[t])}Mn(qA,"SetCache"),qA.prototype.add=qA.prototype.push=GA,qA.prototype.has=KA;var UA=qA;function BA(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}Mn(BA,"arraySome");var VA=BA;function WA(e,t){return e.has(t)}Mn(WA,"cacheHas");var HA=WA;function YA(e,t,r,n,a,i){var s=1&r,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var p=-1,d=!0,f=2&r?new UA:void 0;for(i.set(e,t),i.set(t,e);++p<o;){var m=e[p],h=t[p];if(n)var y=s?n(h,m,p,t,e,i):n(m,h,p,e,t,i);if(void 0!==y){if(y)continue;d=!1;break}if(f){if(!VA(t,function(e,t){if(!HA(f,t)&&(m===e||a(m,e,r,n,i)))return f.push(t)})){d=!1;break}}else if(m!==h&&!a(m,h,r,n,i)){d=!1;break}}return i.delete(e),i.delete(t),d}Mn(YA,"equalArrays");var XA=YA,ZA=$b.Uint8Array;function JA(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}Mn(JA,"mapToArray");var QA=JA;function eC(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}Mn(eC,"setToArray");var tC=eC,rC=Rb?Rb.prototype:void 0,nC=rC?rC.valueOf:void 0;function aC(e,t,r,n,a,i,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new ZA(e),new ZA(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return XE(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=QA;case"[object Set]":var l=1&n;if(o||(o=tC),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var c=XA(o(e),o(t),n,a,i,s);return s.delete(e),c;case"[object Symbol]":if(nC)return nC.call(e)==nC.call(t)}return!1}Mn(aC,"equalByTag");var iC=aC;function sC(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}Mn(sC,"arrayPush");var oC=sC,lC=Array.isArray;function uC(e,t,r){var n=t(e);return lC(e)?n:oC(n,r(e))}Mn(uC,"baseGetAllKeys");var cC=uC;function pC(e,t){for(var r=-1,n=null==e?0:e.length,a=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[a++]=s)}return i}Mn(pC,"arrayFilter");var dC=pC;function fC(){return[]}Mn(fC,"stubArray");var mC=fC,hC=Object.prototype.propertyIsEnumerable,yC=Object.getOwnPropertySymbols,gC=yC?function(e){return null==e?[]:(e=Object(e),dC(yC(e),function(t){return hC.call(e,t)}))}:mC;function vC(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}Mn(vC,"baseTimes");var TC=vC;function $C(e){return null!=e&&"object"==typeof e}Mn($C,"isObjectLike");var RC=$C;function EC(e){return RC(e)&&"[object Arguments]"==Pb(e)}Mn(EC,"baseIsArguments");var bC=EC,AC=Object.prototype,CC=AC.hasOwnProperty,SC=AC.propertyIsEnumerable,kC=bC(function(){return arguments}())?bC:function(e){return RC(e)&&CC.call(e,"callee")&&!SC.call(e,"callee")};function xC(){return!1}Mn(xC,"stubFalse");var wC=xC,NC="object"==typeof exports&&exports&&!exports.nodeType&&exports,_C=NC&&"object"==typeof module&&module&&!module.nodeType&&module,IC=_C&&_C.exports===NC?$b.Buffer:void 0,PC=(IC?IC.isBuffer:void 0)||wC,OC=/^(?:0|[1-9]\d*)$/;function LC(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&OC.test(e))&&e>-1&&e%1==0&&e<t}Mn(LC,"isIndex");var DC=LC;function MC(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}Mn(MC,"isLength");var jC=MC,FC={};function GC(e){return RC(e)&&jC(e.length)&&!!FC[Pb(e)]}FC["[object Float32Array]"]=FC["[object Float64Array]"]=FC["[object Int8Array]"]=FC["[object Int16Array]"]=FC["[object Int32Array]"]=FC["[object Uint8Array]"]=FC["[object Uint8ClampedArray]"]=FC["[object Uint16Array]"]=FC["[object Uint32Array]"]=!0,FC["[object Arguments]"]=FC["[object Array]"]=FC["[object ArrayBuffer]"]=FC["[object Boolean]"]=FC["[object DataView]"]=FC["[object Date]"]=FC["[object Error]"]=FC["[object Function]"]=FC["[object Map]"]=FC["[object Number]"]=FC["[object Object]"]=FC["[object RegExp]"]=FC["[object Set]"]=FC["[object String]"]=FC["[object WeakMap]"]=!1,Mn(GC,"baseIsTypedArray");var zC=GC;function KC(e){return function(t){return e(t)}}Mn(KC,"baseUnary");var qC=KC,UC="object"==typeof exports&&exports&&!exports.nodeType&&exports,BC=UC&&"object"==typeof module&&module&&!module.nodeType&&module,VC=BC&&BC.exports===UC&&vb.process,WC=function(){try{var e=BC&&BC.require&&BC.require("util").types;return e||VC&&VC.binding&&VC.binding("util")}catch(t){}}(),HC=WC&&WC.isTypedArray,YC=HC?qC(HC):zC,XC=Object.prototype.hasOwnProperty;function ZC(e,t){var r=lC(e),n=!r&&kC(e),a=!r&&!n&&PC(e),i=!r&&!n&&!a&&YC(e),s=r||n||a||i,o=s?TC(e.length,String):[],l=o.length;for(var u in e)!t&&!XC.call(e,u)||s&&("length"==u||a&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||DC(u,l))||o.push(u);return o}Mn(ZC,"arrayLikeKeys");var JC=ZC,QC=Object.prototype;function eS(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||QC)}Mn(eS,"isPrototype");var tS=eS;function rS(e,t){return function(r){return e(t(r))}}Mn(rS,"overArg");var nS=rS(Object.keys,Object),aS=Object.prototype.hasOwnProperty;function iS(e){if(!tS(e))return nS(e);var t=[];for(var r in Object(e))aS.call(e,r)&&"constructor"!=r&&t.push(r);return t}Mn(iS,"baseKeys");var sS=iS;function oS(e){return null!=e&&jC(e.length)&&!Mb(e)}Mn(oS,"isArrayLike");var lS=oS;function uS(e){return lS(e)?JC(e):sS(e)}Mn(uS,"keys");var cS=uS;function pS(e){return cC(e,cS,gC)}Mn(pS,"getAllKeys");var dS=pS,fS=Object.prototype.hasOwnProperty;function mS(e,t,r,n,a,i){var s=1&r,o=dS(e),l=o.length;if(l!=dS(t).length&&!s)return!1;for(var u=l;u--;){var c=o[u];if(!(s?c in t:fS.call(t,c)))return!1}var p=i.get(e),d=i.get(t);if(p&&d)return p==t&&d==e;var f=!0;i.set(e,t),i.set(t,e);for(var m=s;++u<l;){var h=e[c=o[u]],y=t[c];if(n)var g=s?n(y,h,c,t,e,i):n(h,y,c,e,t,i);if(!(void 0===g?h===y||a(h,y,r,n,i):g)){f=!1;break}m||(m="constructor"==c)}if(f&&!m){var v=e.constructor,T=t.constructor;v==T||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof T&&T instanceof T||(f=!1)}return i.delete(e),i.delete(t),f}Mn(mS,"equalObjects");var hS=mS,yS=rA($b,"DataView"),gS=rA($b,"Promise"),vS=rA($b,"Set"),TS=rA($b,"WeakMap"),$S="[object Map]",RS="[object Promise]",ES="[object Set]",bS="[object WeakMap]",AS="[object DataView]",CS=Ub(yS),SS=Ub(nA),kS=Ub(gS),xS=Ub(vS),wS=Ub(TS),NS=Pb;(yS&&NS(new yS(new ArrayBuffer(1)))!=AS||nA&&NS(new nA)!=$S||gS&&NS(gS.resolve())!=RS||vS&&NS(new vS)!=ES||TS&&NS(new TS)!=bS)&&(NS=Mn(function(e){var t=Pb(e),r="[object Object]"==t?e.constructor:void 0,n=r?Ub(r):"";if(n)switch(n){case CS:return AS;case SS:return $S;case kS:return RS;case xS:return ES;case wS:return bS}return t},"getTag"));var _S=NS,IS="[object Arguments]",PS="[object Array]",OS="[object Object]",LS=Object.prototype.hasOwnProperty;function DS(e,t,r,n,a,i){var s=lC(e),o=lC(t),l=s?PS:_S(e),u=o?PS:_S(t),c=(l=l==IS?OS:l)==OS,p=(u=u==IS?OS:u)==OS,d=l==u;if(d&&PC(e)){if(!PC(t))return!1;s=!0,c=!1}if(d&&!c)return i||(i=new jA),s||YC(e)?XA(e,t,r,n,a,i):iC(e,t,l,r,n,a,i);if(!(1&r)){var f=c&&LS.call(e,"__wrapped__"),m=p&&LS.call(t,"__wrapped__");if(f||m){var h=f?e.value():e,y=m?t.value():t;return i||(i=new jA),a(h,y,r,n,i)}}return!!d&&(i||(i=new jA),hS(e,t,r,n,a,i))}Mn(DS,"baseIsEqualDeep");var MS=DS;function jS(e,t,r,n,a){return e===t||(null==e||null==t||!RC(e)&&!RC(t)?e!=e&&t!=t:MS(e,t,r,n,jS,a))}Mn(jS,"baseIsEqual");var FS=jS;function GS(e,t,r,n){var a=r.length,i=a,s=!n;if(null==e)return!i;for(e=Object(e);a--;){var o=r[a];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<i;){var l=(o=r[a])[0],u=e[l],c=o[1];if(s&&o[2]){if(void 0===u&&!(l in e))return!1}else{var p=new jA;if(n)var d=n(u,c,l,e,t,p);if(!(void 0===d?FS(c,u,3,n,p):d))return!1}}return!0}Mn(GS,"baseIsMatch");var zS=GS;function KS(e){return e==e&&!Lb(e)}Mn(KS,"isStrictComparable");var qS=KS;function US(e){for(var t=cS(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,qS(a)]}return t}Mn(US,"getMatchData");var BS=US;function VS(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}Mn(VS,"matchesStrictComparable");var WS=VS;function HS(e){var t=BS(e);return 1==t.length&&t[0][2]?WS(t[0][0],t[0][1]):function(r){return r===e||zS(r,e,t)}}Mn(HS,"baseMatches");var YS=HS;function XS(e){return"symbol"==typeof e||RC(e)&&"[object Symbol]"==Pb(e)}Mn(XS,"isSymbol");var ZS=XS,JS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,QS=/^\w*$/;function ek(e,t){if(lC(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ZS(e))||(QS.test(e)||!JS.test(e)||null!=t&&e in Object(t))}Mn(ek,"isKey");var tk=ek;function rk(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=Mn(function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=e.apply(this,n);return r.cache=i.set(a,s)||i,s},"memoized");return r.cache=new(rk.Cache||OA),r}Mn(rk,"memoize"),rk.Cache=OA;var nk=rk;function ak(e){var t=nk(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}Mn(ak,"memoizeCapped");var ik=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sk=/\\(\\)?/g,ok=ak(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ik,function(e,r,n,a){t.push(n?a.replace(sk,"$1"):r||e)}),t}),lk=Rb?Rb.prototype:void 0,uk=lk?lk.toString:void 0;function ck(e){if("string"==typeof e)return e;if(lC(e))return VE(e,ck)+"";if(ZS(e))return uk?uk.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}Mn(ck,"baseToString");var pk=ck;function dk(e){return null==e?"":pk(e)}Mn(dk,"toString");var fk=dk;function mk(e,t){return lC(e)?e:tk(e,t)?[e]:ok(fk(e))}Mn(mk,"castPath");var hk=mk;function yk(e){if("string"==typeof e||ZS(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}Mn(yk,"toKey");var gk=yk;function vk(e,t){for(var r=0,n=(t=hk(t,e)).length;null!=e&&r<n;)e=e[gk(t[r++])];return r&&r==n?e:void 0}Mn(vk,"baseGet");var Tk=vk;function $k(e,t,r){var n=null==e?void 0:Tk(e,t);return void 0===n?r:n}Mn($k,"get");var Rk=$k;function Ek(e,t){return null!=e&&t in Object(e)}Mn(Ek,"baseHasIn");var bk=Ek;function Ak(e,t,r){for(var n=-1,a=(t=hk(t,e)).length,i=!1;++n<a;){var s=gk(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=a?i:!!(a=null==e?0:e.length)&&jC(a)&&DC(s,a)&&(lC(e)||kC(e))}Mn(Ak,"hasPath");var Ck=Ak;function Sk(e,t){return null!=e&&Ck(e,t,bk)}Mn(Sk,"hasIn");var kk=Sk;function xk(e,t){return tk(e)&&qS(t)?WS(gk(e),t):function(r){var n=Rk(r,e);return void 0===n&&n===t?kk(r,e):FS(t,n,3)}}Mn(xk,"baseMatchesProperty");var wk=xk;function Nk(e){return e}Mn(Nk,"identity");var _k=Nk;function Ik(e){return function(t){return null==t?void 0:t[e]}}Mn(Ik,"baseProperty");var Pk=Ik;function Ok(e){return function(t){return Tk(t,e)}}Mn(Ok,"basePropertyDeep");var Lk=Ok;function Dk(e){return tk(e)?Pk(gk(e)):Lk(e)}Mn(Dk,"property");var Mk=Dk;function jk(e){return"function"==typeof e?e:null==e?_k:"object"==typeof e?lC(e)?wk(e[0],e[1]):YS(e):Mk(e)}Mn(jk,"baseIteratee");var Fk=jk;function Gk(e){return function(t,r,n){for(var a=-1,i=Object(t),s=n(t),o=s.length;o--;){var l=s[e?o:++a];if(!1===r(i[l],l,i))break}return t}}Mn(Gk,"createBaseFor");var zk=Gk();function Kk(e,t){return e&&zk(e,t,cS)}Mn(Kk,"baseForOwn");var qk=Kk;function Uk(e,t){return function(r,n){if(null==r)return r;if(!lS(r))return e(r,n);for(var a=r.length,i=t?a:-1,s=Object(r);(t?i--:++i<a)&&!1!==n(s[i],i,s););return r}}Mn(Uk,"createBaseEach");var Bk=Uk(qk);function Vk(e,t){var r=-1,n=lS(e)?Array(e.length):[];return Bk(e,function(e,a,i){n[++r]=t(e,a,i)}),n}Mn(Vk,"baseMap");var Wk=Vk;function Hk(e,t){return(lC(e)?VE:Wk)(e,Fk(t))}Mn(Hk,"map");var Yk=Hk;function Xk(e,t){var r=[];return Bk(e,function(e,n,a){t(e,n,a)&&r.push(e)}),r}Mn(Xk,"baseFilter");var Zk=Xk;function Jk(e,t){return(lC(e)?dC:Zk)(e,Fk(t))}Mn(Jk,"filter");var Qk=Jk;function ex(e,t,r){return`${e.name}_${t}_${r}`}Mn(ex,"buildATNKey");var tx=(Mn(ne=class{constructor(e){this.target=e}isEpsilon(){return!1}},"AbstractTransition"),ne),rx=(Mn(ae=class extends tx{constructor(e,t){super(e),this.tokenType=t}},"AtomTransition"),ae),nx=(Mn(ie=class extends tx{constructor(e){super(e)}isEpsilon(){return!0}},"EpsilonTransition"),ie),ax=(Mn(se=class extends tx{constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}},"RuleTransition"),se);function ix(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};sx(t,e);const r=e.length;for(let n=0;n<r;n++){const r=e[n],a=mx(t,r,r);void 0!==a&&Ax(t,r,a)}return t}function sx(e,t){const r=t.length;for(let n=0;n<r;n++){const r=t[n],a=Sx(e,r,void 0,{type:2}),i=Sx(e,r,void 0,{type:7});a.stop=i,e.ruleToStartState.set(r,a),e.ruleToStopState.set(r,i)}}function ox(e,t,r){return r instanceof zv?Ex(e,t,r.terminalType,r):r instanceof Iv?bx(e,t,r):r instanceof Gv?dx(e,t,r):r instanceof Lv?fx(e,t,r):r instanceof jv?lx(e,t,r):r instanceof Fv?ux(e,t,r):r instanceof Dv?cx(e,t,r):r instanceof Mv?px(e,t,r):mx(e,t,r)}function lx(e,t,r){const n=Sx(e,t,r,{type:5});vx(e,n);return yx(e,t,r,Tx(e,t,n,r,mx(e,t,r)))}function ux(e,t,r){const n=Sx(e,t,r,{type:5});vx(e,n);return yx(e,t,r,Tx(e,t,n,r,mx(e,t,r)),Ex(e,t,r.separator,r))}function cx(e,t,r){const n=Sx(e,t,r,{type:4});vx(e,n);return hx(e,t,r,Tx(e,t,n,r,mx(e,t,r)))}function px(e,t,r){const n=Sx(e,t,r,{type:4});vx(e,n);return hx(e,t,r,Tx(e,t,n,r,mx(e,t,r)),Ex(e,t,r.separator,r))}function dx(e,t,r){const n=Sx(e,t,r,{type:1});vx(e,n);const a=Yk(r.definition,r=>ox(e,t,r));return Tx(e,t,n,r,...a)}function fx(e,t,r){const n=Sx(e,t,r,{type:1});vx(e,n);return gx(e,t,r,Tx(e,t,n,r,mx(e,t,r)))}function mx(e,t,r){const n=Qk(Yk(r.definition,r=>ox(e,t,r)),e=>void 0!==e);return 1===n.length?n[0]:0===n.length?void 0:Rx(e,n)}function hx(e,t,r,n,a){const i=n.left,s=n.right,o=Sx(e,t,r,{type:11});vx(e,o);const l=Sx(e,t,r,{type:12});return i.loopback=o,l.loopback=o,e.decisionMap[ex(t,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o,Cx(s,o),void 0===a?(Cx(o,i),Cx(o,l)):(Cx(o,l),Cx(o,a.left),Cx(a.right,i)),{left:i,right:l}}function yx(e,t,r,n,a){const i=n.left,s=n.right,o=Sx(e,t,r,{type:10});vx(e,o);const l=Sx(e,t,r,{type:12}),u=Sx(e,t,r,{type:9});return o.loopback=u,l.loopback=u,Cx(o,i),Cx(o,l),Cx(s,u),void 0!==a?(Cx(u,l),Cx(u,a.left),Cx(a.right,i)):Cx(u,o),e.decisionMap[ex(t,a?"RepetitionWithSeparator":"Repetition",r.idx)]=o,{left:o,right:l}}function gx(e,t,r,n){const a=n.left;return Cx(a,n.right),e.decisionMap[ex(t,"Option",r.idx)]=a,n}function vx(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function Tx(e,t,r,n,...a){const i=Sx(e,t,n,{type:8,start:r});r.end=i;for(const o of a)void 0!==o?(Cx(r,o.left),Cx(o.right,i)):Cx(r,i);const s={left:r,right:i};return e.decisionMap[ex(t,$x(n),n.idx)]=r,s}function $x(e){if(e instanceof Gv)return"Alternation";if(e instanceof Lv)return"Option";if(e instanceof jv)return"Repetition";if(e instanceof Fv)return"RepetitionWithSeparator";if(e instanceof Dv)return"RepetitionMandatory";if(e instanceof Mv)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function Rx(e,t){const r=t.length;for(let i=0;i<r-1;i++){const r=t[i];let n;1===r.left.transitions.length&&(n=r.left.transitions[0]);const a=n instanceof ax,s=n,o=t[i+1].left;1===r.left.type&&1===r.right.type&&void 0!==n&&(a&&s.followState===r.right||n.target===r.right)?(a?s.followState=o:n.target=o,xx(e,r.right)):Cx(r.right,o)}const n=t[0],a=t[r-1];return{left:n.left,right:a.right}}function Ex(e,t,r,n){const a=Sx(e,t,n,{type:1}),i=Sx(e,t,n,{type:1});return kx(a,new rx(i,r)),{left:a,right:i}}function bx(e,t,r){const n=r.referencedRule,a=e.ruleToStartState.get(n),i=Sx(e,t,r,{type:1}),s=Sx(e,t,r,{type:1});return kx(i,new ax(a,n,s)),{left:i,right:s}}function Ax(e,t,r){const n=e.ruleToStartState.get(t);Cx(n,r.left);const a=e.ruleToStopState.get(t);Cx(r.right,a);return{left:n,right:a}}function Cx(e,t){kx(e,new nx(t))}function Sx(e,t,r,n){const a=Object.assign({atn:e,production:r,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},n);return e.states.push(a),a}function kx(e,t){0===e.transitions.length&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function xx(e,t){e.states.splice(e.states.indexOf(t),1)}Mn(ix,"createATN"),Mn(sx,"createRuleStartAndStopATNStates"),Mn(ox,"atom"),Mn(lx,"repetition"),Mn(ux,"repetitionSep"),Mn(cx,"repetitionMandatory"),Mn(px,"repetitionMandatorySep"),Mn(dx,"alternation"),Mn(fx,"option"),Mn(mx,"block"),Mn(hx,"plus"),Mn(yx,"star"),Mn(gx,"optional"),Mn(vx,"defineDecisionState"),Mn(Tx,"makeAlts"),Mn($x,"getProdType"),Mn(Rx,"makeBlock"),Mn(Ex,"tokenRef"),Mn(bx,"ruleRef"),Mn(Ax,"buildRuleHandle"),Mn(Cx,"epsilon"),Mn(Sx,"newState"),Mn(kx,"addTransition"),Mn(xx,"removeState");var wx={},Nx=(Mn(oe=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const t=_x(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return Yk(this.configs,e=>e.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}},"ATNConfigSet"),oe);function _x(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join("_")}`}function Ix(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],s=t(i);if(null!=s&&(void 0===o?s==s&&!ZS(s):r(s,o)))var o=s,l=i}return l}Mn(_x,"getATNConfigKey"),Mn(Ix,"baseExtremum");var Px=Ix;function Ox(e,t){return e<t}Mn(Ox,"baseLt");var Lx=Ox;function Dx(e){return e&&e.length?Px(e,_k,Lx):void 0}Mn(Dx,"min");var Mx=Dx,jx=Rb?Rb.isConcatSpreadable:void 0;function Fx(e){return lC(e)||kC(e)||!!(jx&&e&&e[jx])}Mn(Fx,"isFlattenable");var Gx=Fx;function zx(e,t,r,n,a){var i=-1,s=e.length;for(r||(r=Gx),a||(a=[]);++i<s;){var o=e[i];t>0&&r(o)?t>1?zx(o,t-1,r,n,a):oC(a,o):n||(a[a.length]=o)}return a}Mn(zx,"baseFlatten");var Kx=zx;function qx(e,t){return Kx(Yk(e,t),1)}Mn(qx,"flatMap");var Ux=qx;function Bx(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}Mn(Bx,"baseFindIndex");var Vx=Bx;function Wx(e){return e!=e}Mn(Wx,"baseIsNaN");var Hx=Wx;function Yx(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}Mn(Yx,"strictIndexOf");var Xx=Yx;function Zx(e,t,r){return t==t?Xx(e,t,r):Vx(e,Hx,r)}Mn(Zx,"baseIndexOf");var Jx=Zx;function Qx(e,t){return!!(null==e?0:e.length)&&Jx(e,t,0)>-1}Mn(Qx,"arrayIncludes");var ew=Qx;function tw(e,t,r){for(var n=-1,a=null==e?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}Mn(tw,"arrayIncludesWith");var rw=tw;function nw(){}Mn(nw,"noop");var aw=nw,iw=vS&&1/tC(new vS([,-0]))[1]==1/0?function(e){return new vS(e)}:aw;function sw(e,t,r){var n=-1,a=ew,i=e.length,s=!0,o=[],l=o;if(r)s=!1,a=rw;else if(i>=200){var u=t?null:iw(e);if(u)return tC(u);s=!1,a=HA,l=new UA}else l=t?[]:o;e:for(;++n<i;){var c=e[n],p=t?t(c):c;if(c=r||0!==c?c:0,s&&p==p){for(var d=l.length;d--;)if(l[d]===p)continue e;t&&l.push(p),o.push(c)}else a(l,p,r)||(l!==o&&l.push(p),o.push(c))}return o}Mn(sw,"baseUniq");var ow=sw;function lw(e,t){return e&&e.length?ow(e,Fk(t)):[]}Mn(lw,"uniqBy");var uw=lw;function cw(e){return(null==e?0:e.length)?Kx(e,1):[]}Mn(cw,"flatten");var pw=cw;function dw(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}Mn(dw,"arrayEach");var fw=dw;function mw(e){return"function"==typeof e?e:_k}Mn(mw,"castFunction");var hw=mw;function yw(e,t){return(lC(e)?fw:Bk)(e,hw(t))}Mn(yw,"forEach");var gw=yw,vw=Object.prototype.hasOwnProperty;function Tw(e){if(null==e)return!0;if(lS(e)&&(lC(e)||"string"==typeof e||"function"==typeof e.splice||PC(e)||YC(e)||kC(e)))return!e.length;var t=_S(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(tS(e))return!sS(e).length;for(var r in e)if(vw.call(e,r))return!1;return!0}Mn(Tw,"isEmpty");var $w=Tw;function Rw(e,t,r,n){var a=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++a]);++a<i;)r=t(r,e[a],a,e);return r}Mn(Rw,"arrayReduce");var Ew=Rw;function bw(e,t,r,n,a){return a(e,function(e,a,i){r=n?(n=!1,e):t(r,e,a,i)}),r}Mn(bw,"baseReduce");var Aw=bw;function Cw(e,t,r){var n=lC(e)?Ew:Aw,a=arguments.length<3;return n(e,Fk(t),r,a,Bk)}Mn(Cw,"reduce");var Sw=Cw;function kw(e,t){const r={};return n=>{const a=n.toString();let i=r[a];return void 0!==i||(i={atnStartState:e,decision:t,states:{}},r[a]=i),i}}Mn(kw,"createDFACache");var xw=(Mn(le=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let r=0;r<t;r++)e+=!0===this.predicates[r]?"1":"0";return e}},"PredicateSet"),le),ww=new xw,Nw=(Mn(ue=class extends rE{constructor(e){var t;super(),this.logging=null!==(t=null==e?void 0:e.logging)&&void 0!==t?t:e=>{}}initialize(e){this.atn=ix(e.rules),this.dfas=Iw(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:a}=e,i=this.dfas,s=this.logging,o=ex(r,"Alternation",t),l=this.atn.decisionMap[o].decision,u=Yk(Q$({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),e=>Yk(e,e=>e[0]));if(_w(u,!1)&&!a){const e=Sw(u,(e,t,r)=>(gw(t,t=>{t&&(e[t.tokenTypeIdx]=r,gw(t.categoryMatches,t=>{e[t]=r}))}),e),{});return n?function(t){var r;const n=this.LA(1),a=e[n.tokenTypeIdx];if(void 0!==t&&void 0!==a){const e=null===(r=t[a])||void 0===r?void 0:r.GATE;if(void 0!==e&&!1===e.call(this))return}return a}:function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}return n?function(e){const t=new xw,r=void 0===e?0:e.length;for(let a=0;a<r;a++){const r=null==e?void 0:e[a].GATE;t.set(a,void 0===r||r.call(this))}const n=Pw.call(this,i,l,t,s);return"number"==typeof n?n:void 0}:function(){const e=Pw.call(this,i,l,ww,s);return"number"==typeof e?e:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:t,rule:r,prodType:n,dynamicTokensEnabled:a}=e,i=this.dfas,s=this.logging,o=ex(r,n,t),l=this.atn.decisionMap[o].decision,u=Yk(Q$({maxLookahead:1,occurrence:t,prodType:n,rule:r}),e=>Yk(e,e=>e[0]));if(_w(u)&&u[0][0]&&!a){const e=u[0],t=pw(e);if(1===t.length&&$w(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=Sw(t,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,gw(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){const e=Pw.call(this,i,l,ww,s);return"object"!=typeof e&&0===e}}},"LLStarLookaheadStrategy"),ue);function _w(e,t=!0){const r=new Set;for(const n of e){const e=new Set;for(const a of n){if(void 0===a){if(t)break;return!1}const n=[a.tokenTypeIdx].concat(a.categoryMatches);for(const t of n)if(r.has(t)){if(!e.has(t))return!1}else r.add(t),e.add(t)}}return!0}function Iw(e){const t=e.decisionStates.length,r=Array(t);for(let n=0;n<t;n++)r[n]=kw(e.decisionStates[n],n);return r}function Pw(e,t,r,n){const a=e[t](r);let i=a.start;if(void 0===i){i=Vw(a,Uw(Ww(a.atnStartState))),a.start=i}return Ow.apply(this,[a,i,r,n])}function Ow(e,t,r,n){let a=t,i=1;const s=[];let o=this.LA(i++);for(;;){let t=Gw(a,o);if(void 0===t&&(t=Lw.apply(this,[e,a,o,i,r,n])),t===wx)return Fw(s,a,o);if(!0===t.isAcceptState)return t.prediction;a=t,s.push(o),o=this.LA(i++)}}function Lw(e,t,r,n,a,i){const s=zw(t.configs,r,a);if(0===s.size)return Bw(e,t,r,wx),wx;let o=Uw(s);const l=qw(s,a);if(void 0!==l)o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l;else if(Jw(s)){const t=Mx(s.alts);o.isAcceptState=!0,o.prediction=t,o.configs.uniqueAlt=t,Dw.apply(this,[e,n,s.alts,i])}return o=Bw(e,t,r,o),o}function Dw(e,t,r,n){const a=[];for(let s=1;s<=t;s++)a.push(this.LA(s).tokenType);const i=e.atnStartState;n(Mw({topLevelRule:i.rule,ambiguityIndices:r,production:i.production,prefixPath:a}))}function Mw(e){const t=Yk(e.prefixPath,e=>$$(e)).join(", "),r=0===e.production.idx?"":e.production.idx;let n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${jw(e.production)}${r}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return n+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",n}function jw(e){if(e instanceof Iv)return"SUBRULE";if(e instanceof Lv)return"OPTION";if(e instanceof Gv)return"OR";if(e instanceof Dv)return"AT_LEAST_ONE";if(e instanceof Mv)return"AT_LEAST_ONE_SEP";if(e instanceof Fv)return"MANY_SEP";if(e instanceof jv)return"MANY";if(e instanceof zv)return"CONSUME";throw Error("non exhaustive match")}function Fw(e,t,r){const n=Ux(t.configs.elements,e=>e.state.transitions);return{actualToken:r,possibleTokenTypes:uw(n.filter(e=>e instanceof rx).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function Gw(e,t){return e.edges[t.tokenTypeIdx]}function zw(e,t,r){const n=new Nx,a=[];for(const s of e.elements){if(!1===r.is(s.alt))continue;if(7===s.state.type){a.push(s);continue}const e=s.state.transitions.length;for(let r=0;r<e;r++){const e=Kw(s.state.transitions[r],t);void 0!==e&&n.add({state:e,alt:s.alt,stack:s.stack})}}let i;if(0===a.length&&1===n.size&&(i=n),void 0===i){i=new Nx;for(const e of n.elements)Hw(e,i)}if(a.length>0&&!Xw(i))for(const s of a)i.add(s);return i}function Kw(e,t){if(e instanceof rx&&O$(t,e.tokenType))return e.target}function qw(e,t){let r;for(const n of e.elements)if(!0===t.is(n.alt))if(void 0===r)r=n.alt;else if(r!==n.alt)return;return r}function Uw(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function Bw(e,t,r,n){return n=Vw(e,n),t.edges[r.tokenTypeIdx]=n,n}function Vw(e,t){if(t===wx)return t;const r=t.configs.key,n=e.states[r];return void 0!==n?n:(t.configs.finalize(),e.states[r]=t,t)}function Ww(e){const t=new Nx,r=e.transitions.length;for(let n=0;n<r;n++){Hw({state:e.transitions[n].target,alt:n,stack:[]},t)}return t}function Hw(e,t){const r=e.state;if(7===r.type){if(e.stack.length>0){const r=[...e.stack];Hw({state:r.pop(),alt:e.alt,stack:r},t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);const n=r.transitions.length;for(let a=0;a<n;a++){const n=Yw(e,r.transitions[a]);void 0!==n&&Hw(n,t)}}function Yw(e,t){if(t instanceof nx)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof ax){const r=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:r}}}function Xw(e){for(const t of e.elements)if(7===t.state.type)return!0;return!1}function Zw(e){for(const t of e.elements)if(7!==t.state.type)return!1;return!0}function Jw(e){if(Zw(e))return!0;const t=Qw(e.elements);return eN(t)&&!tN(t)}function Qw(e){const t=new Map;for(const r of e){const e=_x(r,!1);let n=t.get(e);void 0===n&&(n={},t.set(e,n)),n[r.alt]=!0}return t}function eN(e){for(const t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}function tN(e){for(const t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}Mn(_w,"isLL1Sequence"),Mn(Iw,"initATNSimulator"),Mn(Pw,"adaptivePredict"),Mn(Ow,"performLookahead"),Mn(Lw,"computeLookaheadTarget"),Mn(Dw,"reportLookaheadAmbiguity"),Mn(Mw,"buildAmbiguityError"),Mn(jw,"getProductionDslName"),Mn(Fw,"buildAdaptivePredictError"),Mn(Gw,"getExistingTargetState"),Mn(zw,"computeReachSet"),Mn(Kw,"getReachableTarget"),Mn(qw,"getUniqueAlt"),Mn(Uw,"newDFAState"),Mn(Bw,"addDFAEdge"),Mn(Vw,"addDFAState"),Mn(Ww,"computeStartState"),Mn(Hw,"closure"),Mn(Yw,"getEpsilonTarget"),Mn(Xw,"hasConfigInRuleStopState"),Mn(Zw,"allConfigsInRuleStopStates"),Mn(Jw,"hasConflictTerminatingPrediction"),Mn(Qw,"getConflictingAltSets"),Mn(eN,"hasConflictingAltSet"),Mn(tN,"hasStateAssociatedWithOneAlt"),Wn();var rN=(Mn(ce=class{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new oN(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const t=new iN;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){const r=new aN(e.startOffset,e.image.length,bo(e),e.tokenType,!t);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){const t=e.container;if(t){const r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}addHiddenNodes(e){const t=[];for(const a of e){const e=new aN(a.startOffset,a.image.length,bo(a),a.tokenType,!0);e.root=this.rootNode,t.push(e)}let r=this.current,n=!1;if(r.content.length>0)r.content.push(...t);else{for(;r.container;){const e=r.container.content.indexOf(r);if(e>0){r.container.content.splice(e,0,...t),n=!0;break}r=r.container}n||this.rootNode.content.unshift(...t)}}construct(e){const t=this.current;"string"!=typeof e.$type||e.$infix||(this.current.astNode=e),e.$cstNode=t;const r=this.nodeStack.pop();0===(null==r?void 0:r.content.length)&&this.removeNode(r)}},"CstNodeBuilder"),ce),nN=(Mn(pe=class{get hidden(){return!1}get astNode(){var e,t;const r="string"==typeof(null==(e=this._astNode)?void 0:e.$type)?this._astNode:null==(t=this.container)?void 0:t.astNode;if(!r)throw new Error("This node has no associated AST element");return r}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},"AbstractCstNode"),pe),aN=(Mn(de=class extends nN{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}},"LeafCstNodeImpl"),de),iN=(Mn(fe=class extends nN{constructor(){super(...arguments),this.content=new sN(this)}get offset(){var e;return(null==(e=this.firstNonHiddenNode)?void 0:e.offset)??0}get length(){return this.end-this.offset}get end(){var e;return(null==(e=this.lastNonHiddenNode)?void 0:e.end)??0}get range(){const e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(void 0===this._rangeCache){const{range:r}=e,{range:n}=t;this._rangeCache={start:r.start,end:n.end.line<r.start.line?r.start:n.end}}return this._rangeCache}return{start:nr.create(0,0),end:nr.create(0,0)}}get firstNonHiddenNode(){for(const e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},"CompositeCstNodeImpl"),fe),sN=(Mn(me=class extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,me.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...r){return this.addParents(r),super.splice(e,t,...r)}addParents(e){for(const t of e)t.container=this.parent}},"CstNodeContainer"),me),oN=(Mn(he=class extends iN{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}},"RootCstNodeImpl"),he),lN=Symbol("Datatype");function uN(e){return e.$type===lN}Mn(uN,"isDataTypeNode");var cN=Mn(e=>e.endsWith("​")?e:e+"​","withRuleSuffix"),pN=(Mn(ye=class{constructor(e){var t;this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const r=this.lexer.definition,n="production"===e.LanguageMetaData.mode;(null==(t=e.shared.profilers.LangiumProfiler)?void 0:t.isActive("parsing"))?this.wrapper=new vN(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new gN(r,{...e.parser.ParserConfig,skipValidations:n,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()}},"AbstractLangiumParser"),ye),dN=(Mn(ge=class extends pN{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new rN,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){const r=this.computeRuleType(e);let n;os(e)&&(n=e.name,this.registerPrecedenceMap(e));const a=this.wrapper.DEFINE_RULE(cN(e.name),this.startImplementation(r,n,t).bind(this));return this.allRules.set(e.name,a),ws(e)&&e.entry&&(this.mainRule=a),a}registerPrecedenceMap(e){const t=e.name,r=new Map;for(let n=0;n<e.operators.precedences.length;n++){const t=e.operators.precedences[n];for(const e of t.operators)r.set(e.value,{precedence:n,rightAssoc:"right"===t.associativity})}this.operatorPrecedence.set(t,r)}computeRuleType(e){return os(e)?Gl(e):e.fragment?void 0:Ll(e)?lN:Gl(e)}parse(e,t={}){this.nodeBuilder.buildRootNode(e);const r=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=r.tokens;const n=t.rule?this.allRules.get(t.rule):this.mainRule;if(!n)throw new Error(t.rule?`No rule found with name '${t.rule}'`:"No main rule available.");const a=this.doParse(n);return this.nodeBuilder.addHiddenNodes(r.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,ai(a,{deep:!0}),{value:a,lexerErrors:r.errors,lexerReport:r.report,parserErrors:this.wrapper.errors}}doParse(e){let t=this.wrapper.rule(e);if(this.stack.length>0&&(t=this.construct()),void 0===t)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=>{const a=!this.isRecording()&&void 0!==e;if(a){const r={$type:e};this.stack.push(r),e===lN?r.value="":void 0!==t&&(r.$infixName=t)}return r(n),a?this.construct():void 0}}extractHiddenTokens(e){const t=this.lexerResult.hidden;if(!t.length)return[];const r=e.startOffset;for(let n=0;n<t.length;n++){if(t[n].startOffset>r)return t.splice(0,n)}return t.splice(0,t.length)}consume(e,t,r){const n=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(n)){const e=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(e);const t=this.nodeBuilder.buildLeafNode(n,r),{assignment:a,crossRef:i}=this.getAssignment(r),s=this.current;if(a){const e=hs(r)?n.image:this.converter.convert(n.image,t);this.assign(a.operator,a.feature,e,t,i)}else if(uN(s)){let e=n.image;hs(r)||(e=this.converter.convert(e,t).toString()),s.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,r,n,a){let i,s;this.isRecording()||r||(i=this.nodeBuilder.buildCompositeNode(n));try{s=this.wrapper.wrapSubrule(e,t,a)}finally{this.isRecording()||(void 0!==s||r||(s=this.construct()),void 0!==s&&i&&i.length>0&&this.performSubruleAssignment(s,n,i))}}performSubruleAssignment(e,t,r){const{assignment:n,crossRef:a}=this.getAssignment(t);if(n)this.assign(n.operator,n.feature,e,r,a);else if(!n){const t=this.current;if(uN(t))t.value+=e.toString();else if("object"==typeof e&&e){const r=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(r)}}}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);const n={$type:e};this.stack.push(n),this.assign(t.operator,t.feature,r,r.$cstNode)}else r.$type=e}}construct(){if(this.isRecording())return;const e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):uN(e)?this.converter.convert(e.value,e.$cstNode):(hi(this.astReflection,e),e)}constructInfix(e,t){const r=e.parts;if(!Array.isArray(r)||0===r.length)return;const n=e.operators;if(!Array.isArray(n)||r.length<2)return r[0];let a=0,i=-1;for(let m=0;m<n.length;m++){const e=n[m],r=t.get(e)??{precedence:1/0,rightAssoc:!1};r.precedence>i?(i=r.precedence,a=m):r.precedence===i&&(r.rightAssoc||(a=m))}const s=n.slice(0,a),o=n.slice(a+1),l=r.slice(0,a+1),u=r.slice(a+1),c={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:s},p={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:o},d=this.constructInfix(c,t),f=this.constructInfix(p,t);return{$type:e.$type,$cstNode:e.$cstNode,left:d,operator:n[a],right:f}}getAssignment(e){if(!this.assignmentMap.has(e)){const t=ii(e,Mi);this.assignmentMap.set(e,{assignment:t,crossRef:t&&Wi(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,r,n,a){const i=this.current;let s;switch(s="single"===a&&"string"==typeof r?this.linker.buildReference(i,t,n,r):"multi"===a&&"string"==typeof r?this.linker.buildMultiReference(i,t,n,r):r,e){case"=":i[t]=s;break;case"?=":i[t]=!0;break;case"+=":Array.isArray(i[t])||(i[t]=[]),i[t].push(s)}}assignWithoutOverride(e,t){for(const[n,a]of Object.entries(t)){const t=e[n];void 0===t?e[n]=a:Array.isArray(t)&&Array.isArray(a)&&(a.push(...t),e[n]=a)}const r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},"LangiumParser"),ge),fN=(Mn(ve=class{buildMismatchTokenMessage(e){return L$.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return L$.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return L$.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return L$.buildEarlyExitMessage(e)}},"AbstractParserErrorMessageProvider"),ve),mN=(Mn(Te=class extends fN{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}\`.`}},"LangiumParserErrorMessageProvider"),Te),hN=(Mn($e=class extends pN{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const 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){const r=this.wrapper.DEFINE_RULE(cN(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=>{const r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const 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()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},"LangiumCompletionParser"),$e),yN={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new mN},gN=(Mn(Re=class extends UE{constructor(e,t){super(e,{...yN,lookaheadStrategy:t&&"maxLookahead"in t?new rE({maxLookahead:t.maxLookahead}):new Nw({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,{})}},"ChevrotainWrapper"),Re),vN=(Mn(Ee=class extends gN{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))}}},"ProfilerWrapper"),Ee);function TN(e,t,r){return $N({parser:t,tokens:r,ruleNames:new Map},e),t}function $N(e,t){const r=gl(t,!1),n=ei(t.rules).filter(ws).filter(e=>r.has(e));for(const i of n){const t={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(i,EN(t,i.definition))}const a=ei(t.rules).filter(os).filter(e=>r.has(e));for(const i of a)e.parser.rule(i,RN(e,i))}function RN(e,t){const r=t.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if(Ys(r))throw new Error("Cannot use terminal rule in infix expression");const n=t.operators.precedences.flatMap(e=>e.operators),a={$type:"Group",elements:[]},i={$container:a,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},s={$container:a,$type:"Group",elements:[],cardinality:"*"};a.elements.push(i,s);const o={$container:s,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},l={...i,$container:s};s.elements.push(o,l);const u=n.map(t=>e.tokens[t.value]).map((t,r)=>({ALT:Mn(()=>e.parser.consume(r,t,o),"ALT")}));let c;return t=>{c??(c=ON(e,r)),e.parser.subrule(0,c,!1,i,t),e.parser.many(0,{DEF:Mn(()=>{e.parser.alternatives(0,u),e.parser.subrule(1,c,!1,l,t)},"DEF")})}}function EN(e,t,r=!1){let n;if(hs(t))n=IN(e,t);else if(wi(t))n=bN(e,t);else if(Mi(t))n=EN(e,t.terminal);else if(Wi(t))n=_N(e,t);else if(Ms(t))n=AN(e,t);else if(_i(t))n=kN(e,t);else if(oo(t))n=xN(e,t);else if(ns(t))n=wN(e,t);else{if(!Zi(t))throw new zo(t.$cstNode,`Unexpected element type: ${t.$type}`);{const r=e.consume++;n=Mn(()=>e.parser.consume(r,I$,t),"method")}}return PN(e,r?void 0:NN(t),n,t.cardinality)}function bN(e,t){const r=Gl(t);return()=>e.parser.action(r,t)}function AN(e,t){const r=t.rule.ref;if(bi(r)){const n=e.subrule++,a=ws(r)&&r.fragment,i=t.arguments.length>0?CN(r,t.arguments):()=>({});let s;return o=>{s??(s=ON(e,r)),e.parser.subrule(n,s,a,t,i(o))}}if(Ys(r)){const n=e.consume++,a=DN(e,r.name);return()=>e.parser.consume(n,a,t)}if(!r)throw new zo(t.$cstNode,`Undefined rule: ${t.rule.$refText}`);Ko()}function CN(e,t){if(t.some(e=>e.calledByName)){const e=t.map(e=>{var t,r;return{parameterName:null==(r=null==(t=e.parameter)?void 0:t.ref)?void 0:r.name,predicate:SN(e.value)}});return t=>{const r={};for(const{parameterName:n,predicate:a}of e)n&&(r[n]=a(t));return r}}{const r=t.map(e=>SN(e.value));return t=>{const n={};for(let a=0;a<r.length;a++)if(a<e.parameters.length){const i=e.parameters[a].name,s=r[a];n[i]=s(t)}return n}}}function SN(e){if(Yi(e)){const t=SN(e.left),r=SN(e.right);return e=>t(e)||r(e)}if(Bi(e)){const t=SN(e.left),r=SN(e.right);return e=>t(e)&&r(e)}if(Rs(e)){const t=SN(e.value);return e=>!t(e)}if(ks(e)){const t=e.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(Fi(e)){const t=Boolean(e.true);return()=>t}Ko()}function kN(e,t){if(1===t.elements.length)return EN(e,t.elements[0]);{const r=[];for(const a of t.elements){const t={ALT:EN(e,a,!0)},n=NN(a);n&&(t.GATE=SN(n)),r.push(t)}const n=e.or++;return t=>e.parser.alternatives(n,r.map(e=>{const r={ALT:Mn(()=>e.ALT(t),"ALT")},n=e.GATE;return n&&(r.GATE=()=>n(t)),r}))}}function xN(e,t){if(1===t.elements.length)return EN(e,t.elements[0]);const r=[];for(const o of t.elements){const t={ALT:EN(e,o,!0)},n=NN(o);n&&(t.GATE=SN(n)),r.push(t)}const n=e.or++,a=Mn((e,t)=>`uGroup_${e}_${t.getRuleStack().join("-")}`,"idFunc"),i=Mn(t=>e.parser.alternatives(n,r.map((r,i)=>{const s={ALT:Mn(()=>!0,"ALT")},o=e.parser;s.ALT=()=>{if(r.ALT(t),!o.isRecording()){const e=a(n,o);o.unorderedGroups.get(e)||o.unorderedGroups.set(e,[]);const t=o.unorderedGroups.get(e);void 0===(null==t?void 0:t[i])&&(t[i]=!0)}};const l=r.GATE;return s.GATE=l?()=>l(t):()=>{const e=o.unorderedGroups.get(a(n,o));return!(null==e?void 0:e[i])},s})),"alternatives"),s=PN(e,NN(t),i,"*");return t=>{s(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(a(n,e.parser))}}function wN(e,t){const r=t.elements.map(t=>EN(e,t));return e=>r.forEach(t=>t(e))}function NN(e){if(ns(e))return e.guardCondition}function _N(e,t,r=t.terminal){if(r){if(Ms(r)&&ws(r.rule.ref)){const n=r.rule.ref,a=e.subrule++;let i;return r=>{i??(i=ON(e,n)),e.parser.subrule(a,i,!1,t,r)}}if(Ms(r)&&Ys(r.rule.ref)){const n=e.consume++,a=DN(e,r.rule.ref.name);return()=>e.parser.consume(n,a,t)}if(hs(r)){const n=e.consume++,a=DN(e,r.value);return()=>e.parser.consume(n,a,t)}throw new Error("Could not build cross reference parser")}{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);const r=wl(t.type.ref),n=null==r?void 0:r.terminal;if(!n)throw new Error("Could not find name assignment for type: "+Gl(t.type.ref));return _N(e,t,n)}}function IN(e,t){const 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)}function PN(e,t,r,n){const a=t&&SN(t);if(!n){if(a){const t=e.or++;return n=>e.parser.alternatives(t,[{ALT:Mn(()=>r(n),"ALT"),GATE:Mn(()=>a(n),"GATE")},{ALT:KE(),GATE:Mn(()=>!a(n),"GATE")}])}return r}if("*"===n){const t=e.many++;return n=>e.parser.many(t,{DEF:Mn(()=>r(n),"DEF"),GATE:a?()=>a(n):void 0})}if("+"===n){const t=e.many++;if(a){const n=e.or++;return i=>e.parser.alternatives(n,[{ALT:Mn(()=>e.parser.atLeastOne(t,{DEF:Mn(()=>r(i),"DEF")}),"ALT"),GATE:Mn(()=>a(i),"GATE")},{ALT:KE(),GATE:Mn(()=>!a(i),"GATE")}])}return n=>e.parser.atLeastOne(t,{DEF:Mn(()=>r(n),"DEF")})}if("?"===n){const t=e.optional++;return n=>e.parser.optional(t,{DEF:Mn(()=>r(n),"DEF"),GATE:a?()=>a(n):void 0})}Ko()}function ON(e,t){const r=LN(e,t),n=e.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function LN(e,t){if(bi(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,n=r.$container,a=t.$type;for(;!ws(n);){if(ns(n)||_i(n)||oo(n)){a=n.elements.indexOf(r).toString()+":"+a}r=n,n=n.$container}return a=n.name+":"+a,e.ruleNames.set(t,a),a}}function DN(e,t){const r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}function MN(e){const t=e.Grammar,r=e.parser.Lexer,n=new hN(e);return TN(t,n,r.definition),n.finalize(),n}function jN(e){const t=FN(e);return t.finalize(),t}function FN(e){const t=e.Grammar,r=e.parser.Lexer;return TN(t,new dN(e),r.definition)}Mn(TN,"createParser"),Mn($N,"buildRules"),Mn(RN,"buildInfixRule"),Mn(EN,"buildElement"),Mn(bN,"buildAction"),Mn(AN,"buildRuleCall"),Mn(CN,"buildRuleCallPredicate"),Mn(SN,"buildPredicate"),Mn(kN,"buildAlternatives"),Mn(xN,"buildUnorderedGroup"),Mn(wN,"buildGroup"),Mn(NN,"getGuardCondition"),Mn(_N,"buildCrossReference"),Mn(IN,"buildKeyword"),Mn(PN,"wrap"),Mn(ON,"getRule"),Mn(LN,"getRuleName"),Mn(DN,"getToken"),Mn(MN,"createCompletionParser"),Mn(jN,"createLangiumParser"),Mn(FN,"prepareLangiumParser");var GN,zN=(Mn(be=class{constructor(){this.diagnostics=[]}buildTokens(e,t){const r=ei(gl(e,!1)),n=this.buildTerminalTokens(r),a=this.buildKeywordTokens(r,n,t);return a.push(...n),a}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Ys).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){const t=Ul(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,n={name:e.name,PATTERN:r};return"function"==typeof r&&(n.LINE_BREAKS=!0),e.hidden&&(n.GROUP=pl(t)?T$.SKIPPED:"hidden"),n}requiresCustomPattern(e){return!(!e.flags.includes("u")&&!e.flags.includes("s"))}regexPatternFunction(e){const t=new RegExp(e,e.flags+"y");return(e,r)=>{t.lastIndex=r;return t.exec(e)}}buildKeywordTokens(e,t,r){return e.filter(bi).flatMap(e=>pi(e).filter(hs)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,Boolean(null==r?void 0:r.caseInsensitive)))}buildKeywordToken(e,t,r){const n=this.buildKeywordPattern(e,r),a={name:e.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(e,t)};return"function"==typeof n&&(a.LINE_BREAKS=!0),a}buildKeywordPattern(e,t){return t?new RegExp(dl(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((t,r)=>{const n=null==r?void 0:r.PATTERN;return(null==n?void 0:n.source)&&fl("^"+n.source+"$",e.value)&&t.push(r),t},[])}},"DefaultTokenBuilder"),be),KN=(Mn(Ae=class{convert(e,t){let r=t.grammarSource;if(Wi(r)&&(r=$l(r)),Ms(r)){const 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){var n;switch(e.name.toUpperCase()){case"INT":return GN.convertInt(t);case"STRING":return GN.convertString(t);case"ID":return GN.convertID(t)}switch(null==(n=ql(e))?void 0:n.toLowerCase()){case"number":return GN.convertNumber(t);case"boolean":return GN.convertBoolean(t);case"bigint":return GN.convertBigint(t);case"date":return GN.convertDate(t);default:return t}}},"DefaultValueConverter"),Ae);!function(e){function t(e){let t="";for(let n=1;n<e.length-1;n++){const a=e.charAt(n);if("\\"===a){t+=r(e.charAt(++n))}else t+=a}return t}function r(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}function n(e){return"^"===e.charAt(0)?e.substring(1):e}function a(e){return parseInt(e)}function i(e){return BigInt(e)}function s(e){return new Date(e)}function o(e){return Number(e)}function l(e){return"true"===e.toLowerCase()}Mn(t,"convertString"),e.convertString=t,Mn(r,"convertEscapeCharacter"),Mn(n,"convertID"),e.convertID=n,Mn(a,"convertInt"),e.convertInt=a,Mn(i,"convertBigint"),e.convertBigint=i,Mn(s,"convertDate"),e.convertDate=s,Mn(o,"convertNumber"),e.convertNumber=o,Mn(l,"convertBoolean"),e.convertBoolean=l}(GN||(GN={}));var qN={};function UN(){return new Promise(e=>{"undefined"==typeof setImmediate?setTimeout(e,0):setImmediate(e)})}zn(qN,Kn(Zn())),Mn(UN,"delayNextTick");var BN=0,VN=10;function WN(){return BN=performance.now(),new qN.CancellationTokenSource}function HN(e){VN=e}Mn(WN,"startCancelableOperation"),Mn(HN,"setInterruptionPeriod");var YN=Symbol("OperationCancelled");function XN(e){return e===YN}async function ZN(e){if(e===qN.CancellationToken.None)return;const t=performance.now();if(t-BN>=VN&&(BN=t,await UN(),BN=performance.now()),e.isCancellationRequested)throw YN}Mn(XN,"isOperationCancelled"),Mn(ZN,"interruptAndCheck");var JN,QN,e_=(Mn(Ce=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},"Deferred"),Ce),t_=(Mn(Se=class{constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(const r of e)if(Se.isIncremental(r)){const e=i_(r.range),t=this.offsetAt(e.start),n=this.offsetAt(e.end);this._content=this._content.substring(0,t)+r.text+this._content.substring(n,this._content.length);const a=Math.max(e.start.line,0),i=Math.max(e.end.line,0);let s=this._lineOffsets;const o=n_(r.text,!1,t);if(i-a===o.length)for(let r=0,u=o.length;r<u;r++)s[r+a+1]=o[r];else o.length<1e4?s.splice(a+1,i-a,...o):this._lineOffsets=s=s.slice(0,a+1).concat(o,s.slice(i+1));const l=r.text.length-(n-t);if(0!==l)for(let r=a+1+o.length,u=s.length;r<u;r++)s[r]=s[r]+l}else{if(!Se.isFull(r))throw new Error("Unknown change event received");this._content=r.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=n_(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let r=0,n=t.length;if(0===n)return{line:0,character:e};for(;r<n;){const a=Math.floor((r+n)/2);t[a]>e?n=a:r=a+1}const a=r-1;return{line:a,character:(e=this.ensureBeforeEOL(e,t[a]))-t[a]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const r=t[e.line];if(e.character<=0)return r;const n=e.line+1<t.length?t[e.line+1]:this._content.length,a=Math.min(r+e.character,n);return this.ensureBeforeEOL(a,r)}ensureBeforeEOL(e,t){for(;e>t&&a_(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}},"FullTextDocument"),Se);function r_(e,t){if(e.length<=1)return e;const r=e.length/2|0,n=e.slice(0,r),a=e.slice(r);r_(n,t),r_(a,t);let i=0,s=0,o=0;for(;i<n.length&&s<a.length;){const r=t(n[i],a[s]);e[o++]=r<=0?n[i++]:a[s++]}for(;i<n.length;)e[o++]=n[i++];for(;s<a.length;)e[o++]=a[s++];return e}function n_(e,t,r=0){const n=t?[r]:[];for(let a=0;a<e.length;a++){const t=e.charCodeAt(a);a_(t)&&(13===t&&a+1<e.length&&10===e.charCodeAt(a+1)&&a++,n.push(r+a+1))}return n}function a_(e){return 13===e||10===e}function i_(e){const t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function s_(e){const t=i_(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){function t(e,t,r,n){return new t_(e,t,r,n)}function r(e,t,r){if(e instanceof t_)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function n(e,t){const r=e.getText(),n=r_(t.map(s_),(e,t)=>{const r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r});let a=0;const i=[];for(const s of n){const t=e.offsetAt(s.range.start);if(t<a)throw new Error("Overlapping edit");t>a&&i.push(r.substring(a,t)),s.newText.length&&i.push(s.newText),a=e.offsetAt(s.range.end)}return i.push(r.substr(a)),i.join("")}Mn(t,"create"),e.create=t,Mn(r,"update"),e.update=r,Mn(n,"applyEdits"),e.applyEdits=n}(JN||(JN={})),Mn(r_,"mergeSort"),Mn(n_,"computeLineOffsets"),Mn(a_,"isEOL"),Mn(i_,"getWellformedRange"),Mn(s_,"getWellformedEdit"),(()=>{var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",a=0,i=-1,s=0,o=0;o<=e.length;++o){if(o<e.length)r=e.charCodeAt(o);else{if(47===r)break;r=47}if(47===r){if(i===o-1||1===s);else if(i!==o-1&&2===s){if(n.length<2||2!==a||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",a=0):a=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=o,s=0;continue}}else if(2===n.length||1===n.length){n="",a=0,i=o,s=0;continue}t&&(n.length>0?n+="/..":n="..",a=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),a=o-i-1;i=o,s=0}else 46===r&&-1!==s?++s:s=-1}return n}Mn(t,"e"),Mn(r,"r");var n={resolve:Mn(function(){for(var e,n="",a=!1,i=arguments.length-1;i>=-1&&!a;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(n=s+"/"+n,a=47===s.charCodeAt(0))}return n=r(n,!a),a?n.length>0?"/"+n:"/":n.length>0?n:"."},"resolve"),normalize:Mn(function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),a=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&a&&(e+="/"),n?"/"+e:e},"normalize"),isAbsolute:Mn(function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},"isAbsolute"),join:Mn(function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var a=arguments[r];t(a),a.length>0&&(void 0===e?e=a:e+="/"+a)}return void 0===e?".":n.normalize(e)},"join"),relative:Mn(function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var i=e.length,s=i-a,o=1;o<r.length&&47===r.charCodeAt(o);++o);for(var l=r.length-o,u=s<l?s:l,c=-1,p=0;p<=u;++p){if(p===u){if(l>u){if(47===r.charCodeAt(o+p))return r.slice(o+p+1);if(0===p)return r.slice(o+p)}else s>u&&(47===e.charCodeAt(a+p)?c=p:0===p&&(c=0));break}var d=e.charCodeAt(a+p);if(d!==r.charCodeAt(o+p))break;47===d&&(c=p)}var f="";for(p=a+c+1;p<=i;++p)p!==i&&47!==e.charCodeAt(p)||(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(o+c):(o+=c,47===r.charCodeAt(o)&&++o,r.slice(o))},"relative"),_makeLong:Mn(function(e){return e},"_makeLong"),dirname:Mn(function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,a=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(r=e.charCodeAt(s))){if(!i){a=s;break}}else i=!1;return-1===a?n?"/":".":n&&1===a?"//":e.slice(0,a)},"dirname"),basename:Mn(function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,a=0,i=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var o=r.length-1,l=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(47===u){if(!s){a=n+1;break}}else-1===l&&(s=!1,l=n+1),o>=0&&(u===r.charCodeAt(o)?-1==--o&&(i=n):(o=-1,i=l))}return a===i?i=l:-1===i&&(i=e.length),e.slice(a,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){a=n+1;break}}else-1===i&&(s=!1,i=n+1);return-1===i?"":e.slice(a,i)},"basename"),extname:Mn(function(e){t(e);for(var r=-1,n=0,a=-1,i=!0,s=0,o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(47!==l)-1===a&&(i=!1,a=o+1),46===l?-1===r?r=o:1!==s&&(s=1):-1!==r&&(s=-1);else if(!i){n=o+1;break}}return-1===r||-1===a||0===s||1===s&&r===a-1&&r===n+1?"":e.slice(r,a)},"extname"),format:Mn(function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return r=(t=e).dir||t.root,n=t.base||(t.name||"")+(t.ext||""),r?r===t.root?r+n:r+"/"+n:n;var t,r,n},"format"),parse:Mn(function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,a=e.charCodeAt(0),i=47===a;i?(r.root="/",n=1):n=0;for(var s=-1,o=0,l=-1,u=!0,c=e.length-1,p=0;c>=n;--c)if(47!==(a=e.charCodeAt(c)))-1===l&&(u=!1,l=c+1),46===a?-1===s?s=c:1!==p&&(p=1):-1!==s&&(p=-1);else if(!u){o=c+1;break}return-1===s||-1===l||0===p||1===p&&s===l-1&&s===o+1?-1!==l&&(r.base=r.name=0===o&&i?e.slice(1,l):e.slice(o,l)):(0===o&&i?(r.name=e.slice(1,s),r.base=e.slice(1,l)):(r.name=e.slice(o,s),r.base=e.slice(o,l)),r.ext=e.slice(s,l)),o>0?r.dir=e.slice(0,o-1):i&&(r.dir="/"),r},"parse"),sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}Mn(r,"r"),r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};let a;if(r.r(n),r.d(n,{URI:Mn(()=>f,"URI"),Utils:Mn(()=>x,"Utils")}),"object"==typeof process)a="win32"===process.platform;else if("object"==typeof navigator){let e=navigator.userAgent;a=e.indexOf("Windows")>=0}const i=/^\w[\w\d+.-]*$/,s=/^\//,o=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!i.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!s.test(e.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(o.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}Mn(l,"a");const u="",c="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,d=class e{constructor(e,t,r,n,a,i=!1){Zt(this,"scheme"),Zt(this,"authority"),Zt(this,"path"),Zt(this,"query"),Zt(this,"fragment"),"object"==typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=function(e,t){return e||t?e:"file"}(e,i),this.authority=t||u,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,r||u),this.query=n||u,this.fragment=a||u,l(this,i))}static isUri(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}get fsPath(){return $(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:r,path:n,query:a,fragment:i}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===r?r=this.authority:null===r&&(r=u),void 0===n?n=this.path:null===n&&(n=u),void 0===a?a=this.query:null===a&&(a=u),void 0===i?i=this.fragment:null===i&&(i=u),t===this.scheme&&r===this.authority&&n===this.path&&a===this.query&&i===this.fragment?this:new y(t,r,n,a,i)}static parse(e,t=!1){const r=p.exec(e);return r?new y(r[2]||u,A(r[4]||u),A(r[5]||u),A(r[7]||u),A(r[9]||u),t):new y(u,u,u,u,u)}static file(e){let t=u;if(a&&(e=e.replace(/\\/g,c)),e[0]===c&&e[1]===c){const r=e.indexOf(c,2);-1===r?(t=e.substring(2),e=c):(t=e.substring(2,r),e=e.substring(r)||c)}return new y("file",t,e,u,u)}static from(e){const t=new y(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}toString(e=!1){return R(this,e)}toJSON(){return this}static revive(t){if(t){if(t instanceof e)return t;{const e=new y(t);return e._formatted=t.external,e._fsPath=t._sep===m?t.fsPath:null,e}}return t}};Mn(d,"l");let f=d;const m=a?1:void 0,h=class extends f{constructor(){super(...arguments),Zt(this,"_formatted",null),Zt(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=$(this,!1)),this._fsPath}toString(e=!1){return e?R(this,!0):(this._formatted||(this._formatted=R(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}};Mn(h,"d");let y=h;const g={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 v(e,t,r){let n,a=-1;for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==a&&(n+=encodeURIComponent(e.substring(a,i)),a=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));const t=g[s];void 0!==t?(-1!==a&&(n+=encodeURIComponent(e.substring(a,i)),a=-1),n+=t):-1===a&&(a=i)}}return-1!==a&&(n+=encodeURIComponent(e.substring(a))),void 0!==n?n:e}function T(e){let t;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);35===n||63===n?(void 0===t&&(t=e.substr(0,r)),t+=g[n]):void 0!==t&&(t+=e[r])}return void 0!==t?t:e}function $(e,t){let r;return r=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,a&&(r=r.replace(/\//g,"\\")),r}function R(e,t){const r=t?T:v;let n="",{scheme:a,authority:i,path:s,query:o,fragment:l}=e;if(a&&(n+=a,n+=":"),(i||"file"===a)&&(n+=c,n+=c),i){let e=i.indexOf("@");if(-1!==e){const t=i.substr(0,e);i=i.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=r(t,!1,!1):(n+=r(t.substr(0,e),!1,!1),n+=":",n+=r(t.substr(e+1),!1,!0)),n+="@"}i=i.toLowerCase(),e=i.lastIndexOf(":"),-1===e?n+=r(i,!1,!0):(n+=r(i.substr(0,e),!1,!0),n+=i.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}n+=r(s,!0,!1)}return o&&(n+="?",n+=r(o,!1,!1)),l&&(n+="#",n+=t?l:v(l,!1,!1)),n}function E(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+E(e.substr(3)):e}}Mn(v,"m"),Mn(T,"y"),Mn($,"v"),Mn(R,"b"),Mn(E,"C");const b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function A(e){return e.match(b)?e.replace(b,e=>E(e)):e}Mn(A,"w");var C=r(975);const S=C.posix||C,k="/";var x,w;(w=x||(x={})).joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},w.resolvePath=function(e,...t){let r=e.path,n=!1;r[0]!==k&&(r=k+r,n=!0);let a=S.resolve(r,...t);return n&&a[0]===k&&!e.authority&&(a=a.substring(1)),e.with({path:a})},w.dirname=function(e){if(0===e.path.length||e.path===k)return e;let t=S.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},w.basename=function(e){return S.basename(e.path)},w.extname=function(e){return S.extname(e.path)},QN=n})();var o_,{URI:l_,Utils:u_}=QN;!function(e){e.basename=u_.basename,e.dirname=u_.dirname,e.extname=u_.extname,e.joinPath=u_.joinPath,e.resolvePath=u_.resolvePath;const t="object"==typeof process&&"win32"===(null==process?void 0:process.platform);function r(e,t){return(null==e?void 0:e.toString())===(null==t?void 0:t.toString())}function n(e,r){const n="string"==typeof e?l_.parse(e).path:e.path,a="string"==typeof r?l_.parse(r).path:r.path,i=n.split("/").filter(e=>e.length>0),s=a.split("/").filter(e=>e.length>0);if(t){const e=/^[A-Z]:$/;if(i[0]&&e.test(i[0])&&(i[0]=i[0].toLowerCase()),s[0]&&e.test(s[0])&&(s[0]=s[0].toLowerCase()),i[0]!==s[0])return a.substring(1)}let o=0;for(;o<i.length&&i[o]===s[o];o++);return"../".repeat(i.length-o)+s.slice(o).join("/")}function a(e){return l_.parse(e.toString()).toString()}function i(e,t){let r="string"==typeof e?e:e.path,n="string"==typeof t?t:t.path;return"/"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),"/"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),n===r||!(n.length<r.length)&&("/"===n.charAt(r.length)&&n.startsWith(r))}Mn(r,"equals"),e.equals=r,Mn(n,"relative"),e.relative=n,Mn(a,"normalize"),e.normalize=a,Mn(i,"contains"),e.contains=i}(o_||(o_={}));var c_,p_,d_=(Mn(ke=class{constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return o_.normalize(e)}clear(){this.root.children.clear()}insert(e,t){this.getNode(this.normalizeUri(e),!0).element=t}delete(e){const t=this.getNode(this.normalizeUri(e),!1);(null==t?void 0:t.parent)&&t.parent.children.delete(t.name)}has(e){var t;return void 0!==(null==(t=this.getNode(this.normalizeUri(e),!1))?void 0:t.element)}hasNode(e){return void 0!==this.getNode(this.normalizeUri(e),!1)}find(e){var t;return null==(t=this.getNode(this.normalizeUri(e),!1))?void 0:t.element}findNode(e){const t=this.normalizeUri(e),r=this.getNode(t,!1);if(r)return{name:r.name,uri:o_.joinPath(l_.parse(t),r.name).toString(),element:r.element}}findChildren(e){const t=this.normalizeUri(e),r=this.getNode(t,!1);return r?Array.from(r.children.values()).map(e=>({name:e.name,uri:o_.joinPath(l_.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const t=this.getNode(o_.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){const r=e.split("/");"/"===e.charAt(e.length-1)&&r.pop();let n=this.root;for(const a of r){let e=n.children.get(a);if(!e){if(!t)return;e={name:a,children:new Map,parent:n},n.children.set(a,e)}n=e}return n}collectValues(e){const t=[];e.element&&t.push(e.element);for(const r of e.children.values())t.push(...this.collectValues(r));return t}},"UriTrie"),ke);(p_=c_||(c_={}))[p_.Changed=0]="Changed",p_[p_.Parsed=1]="Parsed",p_[p_.IndexedContent=2]="IndexedContent",p_[p_.ComputedScopes=3]="ComputedScopes",p_[p_.Linked=4]="Linked",p_[p_.IndexedReferences=5]="IndexedReferences",p_[p_.Validated=6]="Validated";var f_=(Mn(xe=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=qN.CancellationToken.None){const r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??l_.parse(e.uri),qN.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return qN.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("string"==typeof t){const n=this.parse(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}if("$model"in t){const r={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(r,e)}{const n=this.parse(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}async createAsync(e,t,r){if("string"==typeof t){const n=await this.parseAsync(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}{const 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:c_.Parsed,references:[],textDocument:r};else{const r=this.createTextDocumentGetter(t,n);a={parseResult:e,uri:t,state:c_.Parsed,references:[],get textDocument(){return r()}}}return e.value.$document=a,a}async update(e,t){var r,n;const a=null==(r=e.parseResult.value.$cstNode)?void 0:r.root.fullText,i=null==(n=this.textDocuments)?void 0:n.get(e.uri.toString()),s=i?i.getText():await this.fileSystemProvider.readFile(e.uri);if(i)Object.defineProperty(e,"textDocument",{value:i});else{const t=this.createTextDocumentGetter(e.uri,s);Object.defineProperty(e,"textDocument",{get:t})}return a!==s&&(e.parseResult=await this.parseAsync(e.uri,s,t),e.parseResult.value.$document=e),e.state=c_.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){const r=this.serviceRegistry;let n;return()=>n??(n=JN.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},"DefaultLangiumDocumentFactory"),xe),m_=(Mn(we=class{constructor(e){this.documentTrie=new d_,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return ei(this.documentTrie.all())}addDocument(e){const 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){const t=e.toString();return this.documentTrie.find(t)}getDocuments(e){const 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(e=>(this.addDocument(e),e));{const r=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(r),r}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const t=e.toString(),r=this.documentTrie.find(t);return r&&this.documentBuilder().resetToState(r,c_.Changed),r}deleteDocument(e){const t=e.toString(),r=this.documentTrie.find(t);return r&&(r.state=c_.Changed,this.documentTrie.delete(t)),r}deleteDocuments(e){const t=e.toString(),r=this.documentTrie.findAll(t);for(const n of r)n.state=c_.Changed;return this.documentTrie.delete(t),r}},"DefaultLangiumDocuments"),we),h_=Symbol("RefResolving"),y_=(Mn(Ne=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=qN.CancellationToken.None){var r;if(null==(r=this.profiler)?void 0:r.isActive("linking")){const r=this.profiler.createTask("linking",this.languageId);r.start();try{for(const n of di(e.parseResult.value))await ZN(t),mi(n).forEach(t=>{const a=`${n.$type}:${t.property}`;r.startSubTask(a);try{this.doLink(t,e)}finally{r.stopSubTask(a)}})}finally{r.stop()}}else for(const n of di(e.parseResult.value))await ZN(t),mi(n).forEach(t=>this.doLink(t,e))}doLink(e,t){const r=e.reference;if("_ref"in r&&void 0===r._ref){r._ref=h_;try{const t=this.getCandidate(e);if(Ua(t))r._ref=t;else{r._nodeDescription=t;const n=this.loadAstNode(t);r._ref=n??this.createLinkingError(e,t)}}catch(n){const t=n.message??String(n);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${t}`}}t.references.push(r)}else if("_items"in r&&void 0===r._items){r._items=h_;try{const t=this.getCandidates(e),n=[];if(Ua(t))r._linkingError=t;else for(const e of t){const t=this.loadAstNode(e);t&&n.push({ref:t,$nodeDescription:e})}r._items=n}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(const 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){const t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,r,n){const a=this,i={$refNode:r,$refText:n,_ref:void 0,get ref(){if(Ga(this._ref))return this._ref;if(qa(this._nodeDescription)){const r=a.loadAstNode(this._nodeDescription);this._ref=r??a.createLinkingError({reference:i,container:e,property:t},this._nodeDescription)}else if(void 0===this._ref){this._ref=h_;const r=li(e).$document,n=a.getLinkedNode({reference:i,container:e,property:t});if(n.error&&r&&r.state<c_.ComputedScopes)return this._ref=void 0;this._ref=n.node??n.error,this._nodeDescription=n.descr,null==r||r.references.push(this)}else this._ref===h_&&a.throwCyclicReferenceError(e,t,n);return Ga(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return Ua(this._ref)?this._ref:void 0}};return i}buildMultiReference(e,t,r,n){const a=this,i={$refNode:r,$refText:n,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(void 0===this._items){this._items=h_;const r=li(e).$document,n=a.getCandidates({reference:i,container:e,property:t}),s=[];if(Ua(n))this._linkingError=n;else for(const e of n){const t=a.loadAstNode(e);t&&s.push({ref:t,$nodeDescription:e})}this._items=s,null==r||r.references.push(this)}else this._items===h_&&a.throwCyclicReferenceError(e,t,n);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;return this.items.length>0?void 0:this._linkingError=a.createLinkingError({reference:i,container:e,property:t})}};return i}throwCyclicReferenceError(e,t,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${r}')`)}getLinkedNode(e){try{const t=this.getCandidate(e);if(Ua(t))return{error:t};const r=this.loadAstNode(t);return r?{node:r,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){const 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;const t=this.langiumDocuments().getDocument(e.documentUri);return t?this.astNodeLocator.getAstNode(t.parseResult.value,e.path):void 0}createLinkingError(e,t){const r=li(e.container).$document;r&&(r.state,c_.ComputedScopes);return{info:e,message:`Could not resolve reference to ${this.reflection.getReferenceType(e)} named '${e.reference.$refText}'.`,targetDescription:t}}},"DefaultLinker"),Ne);function g_(e){return"string"==typeof e.name}Mn(g_,"isNamed");var v_=(Mn(_e=class{getName(e){if(g_(e))return e.name}getNameNode(e){return bl(e.$cstNode,"name")}},"DefaultNameProvider"),_e),T_=(Mn(Ie=class{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=di(e.Grammar).some(e=>Wi(e)&&e.isMulti)}findDeclarations(e){if(e){const t=xl(e),r=e.astNode;if(t&&r){const n=r[t.feature];if(za(n)||Ka(n))return ui(n);if(Array.isArray(n))for(const t of n)if((za(t)||Ka(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return ui(t)}if(r){const t=this.nameProvider.getNameNode(r);if(t&&(t===e||Eo(e,t)))return this.getSelfNodes(r)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),r=this.getNodeFromReferenceDescription(t.head());if(r)for(const n of mi(r))if(Ka(n.reference)&&n.reference.items.some(t=>t.ref===e))return n.reference.items.map(e=>e.ref);return[e]}return[e]}getNodeFromReferenceDescription(e){if(!e)return;const t=this.documents.getDocument(e.sourceUri);return t?this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath):void 0}findDeclarationNodes(e){const t=this.findDeclarations(e),r=[];for(const n of t){const e=this.nameProvider.getNameNode(n)??n.$cstNode;e&&r.push(e)}return r}findReferences(e,t){const r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let n=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(n=n.filter(e=>o_.equals(e.sourceUri,t.documentUri))),r.push(...n),ei(r)}getSelfReferences(e){const t=this.getSelfNodes(e),r=[];for(const n of t){const e=this.nameProvider.getNameNode(n);if(e){const t=oi(n),a=this.nodeLocator.getAstNodePath(n);r.push({sourceUri:t.uri,sourcePath:a,targetUri:t.uri,targetPath:a,segment:Ao(e),local:!0})}}return r}},"DefaultReferences"),Ie),$_=(Pe=class{constructor(e){if(this.map=new Map,e)for(const[t,r]of e)this.add(t,r)}get size(){return ti.sum(ei(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(void 0===t)return this.map.delete(e);{const r=this.map.get(e);if(r){const n=r.indexOf(t);if(n>=0)return 1===r.length?this.map.delete(e):r.splice(n,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){const t=this.map.get(e);return t?ei(t):Ja}has(e,t){if(void 0===t)return this.map.has(e);{const r=this.map.get(e);return!!r&&r.indexOf(t)>=0}}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(t=>e(t,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return ei(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return ei(this.map.keys())}values(){return ei(this.map.values()).flat()}entriesGroupedByKey(){return ei(this.map.entries())}},Mn(Pe,"MultiMap"),Pe),R_=(Mn(Oe=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[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){const t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}},"BiMap"),Oe),E_=(Mn(Le=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=qN.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=ci,n=qN.CancellationToken.None){const a=[];this.addExportedSymbol(e,a,t);for(const i of r(e))await ZN(n),this.addExportedSymbol(i,a,t);return a}addExportedSymbol(e,t,r){const n=this.nameProvider.getName(e);n&&t.push(this.descriptions.createDescription(e,n,r))}async collectLocalSymbols(e,t=qN.CancellationToken.None){const r=e.parseResult.value,n=new $_;for(const a of pi(r))await ZN(t),this.addLocalSymbol(a,e,n);return n}addLocalSymbol(e,t,r){const n=e.$container;if(n){const a=this.nameProvider.getName(e);a&&r.add(n,this.descriptions.createDescription(e,a,t))}}},"DefaultScopeComputation"),Le),b_=(Mn(De=class{constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=(null==r?void 0:r.caseInsensitive)??!1,this.concatOuterScope=(null==r?void 0:r.concatOuterScope)??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);return r||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(e)):r}},"StreamScope"),De),A_=(Mn(Me=class{constructor(e,t,r){this.elements=new Map,this.caseInsensitive=(null==r?void 0:r.caseInsensitive)??!1,this.concatOuterScope=(null==r?void 0:r.concatOuterScope)??!0;for(const n of e){const e=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(e,n)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return r||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t),n=r?[r]:[];return(this.concatOuterScope||n.length>0)&&this.outerScope?ei(n).concat(this.outerScope.getElements(e)):ei(n)}getAllElements(){let e=ei(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},"MapScope"),Me),C_=(Mn(je=class{constructor(e,t,r){this.elements=new $_,this.caseInsensitive=(null==r?void 0:r.caseInsensitive)??!1,this.concatOuterScope=(null==r?void 0:r.concatOuterScope)??!0;for(const n of e){const e=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(e,n)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t)[0];return r||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return(this.concatOuterScope||0===r.length)&&this.outerScope?ei(r).concat(this.outerScope.getElements(e)):ei(r)}getAllElements(){let e=ei(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},"MultiMapScope"),je),S_={getElement(){},getElements:()=>Ja,getAllElements:()=>Ja},k_=(Mn(Fe=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},"DisposableCache"),Fe),x_=(Mn(Ge=class extends k_{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){const r=t();return this.cache.set(e,r),r}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},"SimpleCache"),Ge),w_=(Mn(ze=class extends k_{constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}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();const n=this.cacheForContext(e);if(n.has(t))return n.get(t);if(r){const e=r();return n.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}},"ContextCache"),ze),N_=(Mn(Ke=class extends w_{constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(const r of t)this.clear(r)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{const r=e.concat(t);for(const n of r)this.clear(n)}))}},"DocumentCache"),Ke),__=(Mn(qe=class extends x_{constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},"WorkspaceCache"),qe),I_=(Mn(Ue=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new __(e.shared)}getScope(e){const t=[],r=this.reflection.getReferenceType(e),n=oi(e.container).localSymbols;if(n){let a=e.container;do{n.has(a)&&t.push(n.getStream(a).filter(e=>this.reflection.isSubtype(e.type,r))),a=a.$container}while(a)}let a=this.getGlobalScope(r,e);for(let i=t.length-1;i>=0;i--)a=this.createScope(t[i],a);return a}createScope(e,t,r){return new b_(ei(e),t,r)}createScopeForNodes(e,t,r){const n=ei(e).map(e=>{const t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable();return new b_(n,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new C_(this.indexManager.allElements(e)))}},"DefaultScopeProvider"),Ue);function P_(e){return"string"==typeof e.$comment}function O_(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}Mn(P_,"isAstNodeWithComment"),Mn(O_,"isIntermediateReference");var L_,D_,M_=(Mn(Be=class{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){const r=t??{},n=null==t?void 0:t.replacer,a=Mn((e,t)=>this.replacer(e,t,r),"defaultReplacer"),i=n?(e,t)=>n(e,t,a):a;try{return this.currentDocument=oi(e),JSON.stringify(e,i,null==t?void 0:t.space)}finally{this.currentDocument=void 0}}deserialize(e,t){const r=t??{},n=JSON.parse(e);return this.linkNode(n,n,r),n}replacer(e,t,{refText:r,sourceText:n,textRegions:a,comments:i,uriConverter:s}){var o,l,u;if(!this.ignoreProperties.has(e)){if(za(t)){const e=t.ref,n=r?t.$refText:void 0;if(e){const t=oi(e);let r="";this.currentDocument&&this.currentDocument!==t&&(r=s?s(t.uri,e):t.uri.toString());return{$ref:`${r}#${this.astNodeLocator.getAstNodePath(e)}`,$refText:n}}return{$error:(null==(o=t.error)?void 0:o.message)??"Could not resolve reference",$refText:n}}if(Ka(t)){const e=r?t.$refText:void 0,n=[];for(const r of t.items){const e=r.ref,t=oi(r.ref);let a="";this.currentDocument&&this.currentDocument!==t&&(a=s?s(t.uri,e):t.uri.toString());const i=this.astNodeLocator.getAstNodePath(e);n.push(`${a}#${i}`)}return{$refs:n,$refText:e}}if(Ga(t)){let r;if(a&&(r=this.addAstNodeRegionWithAssignmentsTo({...t}),e&&!t.$document||!(null==r?void 0:r.$textRegion)||(r.$textRegion.documentURI=null==(l=this.currentDocument)?void 0:l.uri.toString())),n&&!e&&(r??(r={...t}),r.$sourceText=null==(u=t.$cstNode)?void 0:u.text),i){r??(r={...t});const e=this.commentProvider.getComment(t);e&&(r.$comment=e.replace(/\r/g,""))}return r??t}return t}}addAstNodeRegionWithAssignmentsTo(e){const t=Mn(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),"createDocumentSegment");if(e.$cstNode){const r=(e.$textRegion=t(e.$cstNode)).assignments={};return Object.keys(e).filter(e=>!e.startsWith("$")).forEach(n=>{const a=El(e.$cstNode,n).map(t);0!==a.length&&(r[n]=a)}),e}}linkNode(e,t,r,n,a,i){for(const[o,l]of Object.entries(e))if(Array.isArray(l))for(let n=0;n<l.length;n++){const a=l[n];O_(a)?l[n]=this.reviveReference(e,o,t,a,r):Ga(a)&&this.linkNode(a,t,r,e,o,n)}else O_(l)?e[o]=this.reviveReference(e,o,t,l,r):Ga(l)&&this.linkNode(l,t,r,e,o);const s=e;s.$container=n,s.$containerProperty=a,s.$containerIndex=i}reviveReference(e,t,r,n,a){let i,s=n.$refText,o=n.$error;if(n.$ref){const e=this.getRefNode(r,n.$ref,a.uriConverter);if(Ga(e))return s||(s=this.nameProvider.getName(e)),{$refText:s??"",ref:e};o=e}else if(n.$refs){const e=[];for(const t of n.$refs){const n=this.getRefNode(r,t,a.uriConverter);Ga(n)&&e.push({ref:n})}if(0!==e.length)return{$refText:s??"",items:e};i={$refText:s??"",items:e},o??(o="Could not resolve multi-reference")}return o?(i??(i={$refText:s??"",ref:void 0}),i.error={info:{container:e,property:t,reference:i},message:o},i):void 0}getRefNode(e,t,r){try{const n=t.indexOf("#");if(0===n){const r=this.astNodeLocator.getAstNode(e,t.substring(1));return r||"Could not resolve path: "+t}if(n<0){const e=r?r(t):l_.parse(t),n=this.langiumDocuments.getDocument(e);return n?n.parseResult.value:"Could not find document for URI: "+t}const a=r?r(t.substring(0,n)):l_.parse(t.substring(0,n)),i=this.langiumDocuments.getDocument(a);if(!i)return"Could not find document for URI: "+t;if(n===t.length-1)return i.parseResult.value;const s=this.astNodeLocator.getAstNode(i.parseResult.value,t.substring(n+1));return s||"Could not resolve URI: "+t}catch(n){return String(n)}}},"DefaultJsonSerializer"),Be),j_=(Mn(Ve=class{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=null==e?void 0:e.workspace.TextDocuments}register(e){const t=e.LanguageMetaData;for(const r of t.fileExtensions)this.fileExtensionMap.has(r),this.fileExtensionMap.set(r,e);if(t.fileNames)for(const r of t.fileNames)this.fileNameMap.has(r),this.fileNameMap.set(r,e);this.languageIdMap.set(t.languageId,e)}getServices(e){var t,r;if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const n=null==(r=null==(t=this.textDocuments)?void 0:t.get(e))?void 0:r.languageId;if(void 0!==n){const e=this.languageIdMap.get(n);if(e)return e}const a=o_.extname(e),i=o_.basename(e),s=this.fileNameMap.get(i)??this.fileExtensionMap.get(a);if(!s)throw n?new Error(`The service registry contains no services for the extension '${a}' for language '${n}'.`):new Error(`The service registry contains no services for the extension '${a}'.`);return s}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}},"DefaultServiceRegistry"),Ve);function F_(e){return{code:e}}Mn(F_,"diagnosticData"),(D_=L_||(L_={})).defaults=["fast","slow","built-in"],D_.all=D_.defaults;var G_,z_,K_=(Mn(We=class{constructor(e){this.entries=new $_,this.knownCategories=new Set(L_.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,r="fast"){if("built-in"===r)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(r);for(const[n,a]of Object.entries(e)){const e=a;if(Array.isArray(e))for(const a of e){const e={check:this.wrapValidationException(a,t),category:r};this.addEntry(n,e)}else if("function"==typeof e){const a={check:this.wrapValidationException(e,t),category:r};this.addEntry(n,a)}else Ko()}}wrapValidationException(e,t){return async(r,n,a)=>{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(XN(a))throw a;a instanceof Error&&a.stack;r("error",`${t}: ${a instanceof Error?a.message:String(a)}`,{node:n})}}addEntry(e,t){if("AstNode"!==e)for(const r of this.reflection.getAllSubTypes(e))this.entries.add(r,t);else this.entries.add("AstNode",t)}getChecks(e,t){let r=ei(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(e=>t.includes(e.category))),r.map(e=>e.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,i,s)=>{await this.handleException(()=>e.call(r,n,a,i,s),t,a,n)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},"ValidationRegistry"),We),q_=Object.freeze({validateNode:!0,validateChildren:!0}),U_=(Mn(He=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},r=qN.CancellationToken.None){const n=e.parseResult,a=[];if(await ZN(r),!t.categories||t.categories.includes("built-in")){if(this.processLexingErrors(n,a,t),t.stopAfterLexingErrors&&a.some(e=>{var t;return(null==(t=e.data)?void 0:t.code)===G_.LexingError}))return a;if(this.processParsingErrors(n,a,t),t.stopAfterParsingErrors&&a.some(e=>{var t;return(null==(t=e.data)?void 0:t.code)===G_.ParsingError}))return a;if(this.processLinkingErrors(e,a,t),t.stopAfterLinkingErrors&&a.some(e=>{var t;return(null==(t=e.data)?void 0:t.code)===G_.LinkingError}))return a}try{a.push(...await this.validateAst(n.value,t,r))}catch(i){if(XN(i))throw i}return await ZN(r),a}processLexingErrors(e,t,r){var n;const a=[...e.lexerErrors,...(null==(n=e.lexerReport)?void 0:n.diagnostics)??[]];for(const i of a){const e=i.severity??"error",r={severity:V_(e),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:W_(e),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,r){for(const n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if("previousToken"in n){const t=n.previousToken;if(isNaN(t.startOffset)){const t={line:0,character:0};e={start:t,end:t}}else{const r={line:t.endLine-1,character:t.endColumn};e={start:r,end:r}}}}else e=bo(n.token);if(e){const r={severity:V_("error"),range:e,message:n.message,data:F_(G_.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,r){var n;for(const a of e.references){const e=a.error;if(e){const r={node:e.info.container,range:null==(n=a.$refNode)?void 0:n.range,property:e.info.property,index:e.info.index,data:{code:G_.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic("error",e.message,r))}}}async validateAst(e,t,r=qN.CancellationToken.None){const n=[],a=Mn((e,t,r)=>{n.push(this.toDiagnostic(e,t,r))},"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=qN.CancellationToken.None){const a=this.validationRegistry.checksBefore;for(const i of a)await ZN(n),await i(e,r,t.categories??[],n)}async validateAstNodes(e,t,r,n=qN.CancellationToken.None){var a;if(null==(a=this.profiler)?void 0:a.isActive("validating")){const a=this.profiler.createTask("validating",this.languageId);a.start();try{const i=di(e).iterator();for(const e of i){a.startSubTask(e.$type);const s=this.validateSingleNodeOptions(e,t);if(s.validateNode)try{const a=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of a)await t(e,r,n)}finally{a.stopSubTask(e.$type)}s.validateChildren||i.prune()}}finally{a.stop()}}else{const a=di(e).iterator();for(const e of a){await ZN(n);const i=this.validateSingleNodeOptions(e,t);if(i.validateNode){const a=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of a)await t(e,r,n)}i.validateChildren||a.prune()}}}validateSingleNodeOptions(e,t){return q_}async validateAstAfter(e,t,r,n=qN.CancellationToken.None){const a=this.validationRegistry.checksAfter;for(const i of a)await ZN(n),await i(e,r,t.categories??[],n)}toDiagnostic(e,t,r){return{message:t,range:B_(r),severity:V_(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},"DefaultDocumentValidator"),He);function B_(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=bl(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=Sl(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}}}function V_(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)}}function W_(e){switch(e){case"error":return F_(G_.LexingError);case"warning":return F_(G_.LexingWarning);case"info":return F_(G_.LexingInfo);case"hint":return F_(G_.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}Mn(B_,"getDiagnosticRange"),Mn(V_,"toDiagnosticSeverity"),Mn(W_,"toDiagnosticData"),(z_=G_||(G_={})).LexingError="lexing-error",z_.LexingWarning="lexing-warning",z_.LexingInfo="lexing-info",z_.LexingHint="lexing-hint",z_.ParsingError="parsing-error",z_.LinkingError="linking-error";var H_=(Mn(Ye=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){const n=r??oi(e);t??(t=this.nameProvider.getName(e));const a=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${a} has no name.`);let i;const s=Mn(()=>i??(i=Ao(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return s()},selectionSegment:Ao(e.$cstNode),type:e.$type,documentUri:n.uri,path:a}}},"DefaultAstNodeDescriptionProvider"),Ye),Y_=(Mn(Xe=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=qN.CancellationToken.None){const r=[],n=e.parseResult.value;for(const a of di(n))await ZN(t),mi(a).forEach(e=>{e.reference.error||r.push(...this.createInfoDescriptions(e))});return r}createInfoDescriptions(e){const t=e.reference;if(t.error||!t.$refNode)return[];let r=[];za(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Ka(t)&&(r=t.items.map(e=>e.$nodeDescription).filter(e=>void 0!==e));const n=oi(e.container).uri,a=this.nodeLocator.getAstNodePath(e.container),i=[],s=Ao(t.$refNode);for(const o of r)i.push({sourceUri:n,sourcePath:a,targetUri:o.documentUri,targetPath:o.path,segment:s,local:o_.equals(o.documentUri,n)});return i}},"DefaultReferenceDescriptionProvider"),Xe),X_=(Mn(Ze=class{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const 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 void 0!==t?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||0===t.length)return e;const r=t.indexOf(this.indexSeparator);if(r>0){const n=t.substring(0,r),a=parseInt(t.substring(r+1)),i=e[n];return null==i?void 0:i[a]}return e[t]},e)}},"DefaultAstNodeLocator"),Ze),Z_={};zn(Z_,Kn(Xn()));var J_,Q_=(Mn(Je=class{constructor(e){this._ready=new e_,this.onConfigurationSectionUpdateEmitter=new Z_.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var t;this.workspaceConfig=(null==(t=e.capabilities.workspace)?void 0:t.configuration)??!1}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,r[t])})}}this._ready.resolve()}updateConfiguration(e){"object"==typeof e.settings&&null!==e.settings&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},"DefaultConfigurationProvider"),Je),eI=Kn(Ma());!function(e){function t(e){return{dispose:Mn(async()=>await e(),"dispose")}}Mn(t,"create"),e.create=t}(J_||(J_={}));var tI=(Mn(Qe=class{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new $_,this.documentPhaseListeners=new $_,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=c_.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=qN.CancellationToken.None){var n;for(const a of e){const e=a.uri.toString();if(a.state===c_.Validated){if("boolean"==typeof t.validation&&t.validation)this.resetToState(a,c_.IndexedReferences);else if("object"==typeof t.validation){const r=this.findMissingValidationCategories(a,t);r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:r}},result:null==(n=this.buildState.get(e))?void 0:n.result}),a.state=c_.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=c_.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=qN.CancellationToken.None){this.currentState=c_.Changed;const n=[];for(const o of t){const e=this.langiumDocuments.deleteDocuments(o);for(const t of e)n.push(t.uri),this.cleanUpDeleted(t)}const a=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(const o of a){let e=this.langiumDocuments.getDocument(o);void 0===e&&(e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o),e.state=c_.Changed,this.langiumDocuments.addDocument(e)),this.resetToState(e,c_.Changed)}const i=ei(a).concat(n).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!i.has(e.uri.toString())&&this.shouldRelink(e,i)).forEach(e=>this.resetToState(e,c_.ComputedScopes)),await this.emitUpdate(a,n),await ZN(r);const s=this.sortDocuments(this.langiumDocuments.all.filter(e=>{var t;return e.state<c_.Validated||!(null==(t=this.buildState.get(e.uri.toString()))?void 0:t.completed)||this.resultsAreIncomplete(e,this.updateBuildOptions)}).toArray());await this.buildDocuments(s,this.updateBuildOptions,r)}resultsAreIncomplete(e,t){return this.findMissingValidationCategories(e,t).length>=1}findMissingValidationCategories(e,t){var r,n;const a=this.buildState.get(e.uri.toString()),i=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),s=(null==(r=null==a?void 0:a.result)?void 0:r.validationChecks)?new Set(null==(n=null==a?void 0:a.result)?void 0:n.validationChecks):(null==a?void 0:a.completed)?i:new Set;return ei(void 0===t||!0===t.validation?i:"object"==typeof t.validation?t.validation.categories??i:[]).filter(e=>!s.has(e)).toArray()}async findChangedUris(e){var t;if(this.langiumDocuments.getDocument(e)??(null==(t=this.textDocuments)?void 0:t.get(e)))return[e];try{const t=await this.fileSystemProvider.stat(e);if(t.isDirectory){return await this.workspaceManager().searchFolder(e)}if(this.workspaceManager().shouldIncludeEntry(t))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<r;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;r>=0&&!this.hasTextDocument(e[r]);)r--;t<r&&([e[t],e[r]]=[e[r],e[t]])}return e}hasTextDocument(e){var t;return Boolean(null==(t=this.textDocuments)?void 0:t.get(e.uri))}shouldRelink(e,t){return!!e.references.some(e=>void 0!==e.error)||this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),J_.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case c_.Changed:case c_.Parsed:this.indexManager.removeContent(e.uri);case c_.IndexedContent:e.localSymbols=void 0;case c_.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case c_.Linked:this.indexManager.removeReferences(e.uri);case c_.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case c_.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=c_.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,c_.Parsed,r,e=>this.langiumDocumentFactory.update(e,r)),await this.runCancelable(e,c_.IndexedContent,r,e=>this.indexManager.updateContent(e,r)),await this.runCancelable(e,c_.ComputedScopes,r,async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.localSymbols=await t.collectLocalSymbols(e,r)});const n=e.filter(e=>this.shouldLink(e));await this.runCancelable(n,c_.Linked,r,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,r)),await this.runCancelable(n,c_.IndexedReferences,r,e=>this.indexManager.updateReferences(e,r));const a=e.filter(e=>!!this.shouldValidate(e)||(this.markAsCompleted(e),!1));await this.runCancelable(a,c_.Validated,r,async e=>{await this.validate(e,r),this.markAsCompleted(e)})}markAsCompleted(e){const t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(const r of e){const e=r.uri.toString(),n=this.buildState.get(e);n&&!n.completed||this.buildState.set(e,{completed:!1,options:t,result:null==n?void 0:n.result})}}async runCancelable(e,t,r,n){for(const i of e)i.state<t&&(await ZN(r),await n(i),i.state=t,await this.notifyDocumentPhase(i,t,r));const a=e.filter(e=>e.state===t);await this.notifyBuildPhase(a,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),J_.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),J_.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let n;return t&&"path"in t?n=t:r=t,r??(r=qN.CancellationToken.None),n?this.awaitDocumentState(e,n,r):this.awaitBuilderState(e,r)}awaitDocumentState(e,t,r){const n=this.langiumDocuments.getDocument(t);return n?n.state>=e?Promise.resolve(t):r.isCancellationRequested?Promise.reject(YN):this.currentState>=e&&e>n.state?Promise.reject(new eI.ResponseError(eI.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${c_[n.state]}, requiring ${c_[e]}, but workspace state is already ${c_[this.currentState]}. Returning undefined.`)):new Promise((n,a)=>{const i=this.onDocumentPhase(e,e=>{o_.equals(e.uri,t)&&(i.dispose(),s.dispose(),n(e.uri))}),s=r.onCancellationRequested(()=>{i.dispose(),s.dispose(),a(YN)})}):Promise.reject(new eI.ResponseError(eI.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(YN):new Promise((r,n)=>{const a=this.onBuildPhase(e,()=>{a.dispose(),i.dispose(),r()}),i=t.onCancellationRequested(()=>{a.dispose(),i.dispose(),n(YN)})})}async notifyDocumentPhase(e,t,r){const n=this.documentPhaseListeners.get(t).slice();for(const i of n)try{await ZN(r),await i(e,r)}catch(a){if(!XN(a))throw a}}async notifyBuildPhase(e,t,r){if(0===e.length)return;const n=this.buildPhaseListeners.get(t).slice();for(const a of n)await ZN(r),await a(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){const r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,n=this.getBuildOptions(e),a="object"==typeof n.validation?{...n.validation}:{};a.categories=this.findMissingValidationCategories(e,n);const i=await r.validateDocument(e,a,t);e.diagnostics?e.diagnostics.push(...i):e.diagnostics=i;const s=this.buildState.get(e.uri.toString());s&&(s.result??(s.result={}),s.result.validationChecks?s.result.validationChecks=ei(s.result.validationChecks).concat(a.categories).distinct().toArray():s.result.validationChecks=[...a.categories])}getBuildOptions(e){var t;return(null==(t=this.buildState.get(e.uri.toString()))?void 0:t.options)??{}}},"DefaultDocumentBuilder"),Qe),rI=(Mn(et=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new w_,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const r=oi(e).uri,n=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{o_.equals(e.targetUri,r)&&e.targetPath===t&&n.push(e)})}),ei(n)}allElements(e,t){let r=ei(this.symbolIndex.keys());return t&&(r=r.filter(e=>!t||t.has(e))),r.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){if(!t)return this.symbolIndex.get(e)??[];return this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t)))}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){const t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=qN.CancellationToken.None){const r=this.serviceRegistry.getServices(e.uri),n=await r.references.ScopeComputation.collectExportedSymbols(e,t),a=e.uri.toString();this.symbolIndex.set(a,n),this.symbolByTypeIndex.clear(a)}async updateReferences(e,t=qN.CancellationToken.None){const r=this.serviceRegistry.getServices(e.uri),n=await r.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){const r=this.referenceIndex.get(e.uri.toString());return!!r&&r.some(e=>!e.local&&t.has(e.targetUri.toString()))}},"DefaultIndexManager"),et),nI=(Mn(tt=class{constructor(e){this.initialBuildOptions={},this._ready=new e_,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(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=qN.CancellationToken.None){const r=await this.performStartup(e);await ZN(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){const t=[],r=Mn(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},"collector");await this.loadAdditionalDocuments(e,r);const n=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,n)));const a=ei(n).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(a,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{const r=await this.langiumDocuments.getOrCreateDocument(e);t(r)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return l_.parse(e.uri)}async traverseFolder(e,t){try{const r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(r){}}async searchFolder(e){const t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){const t=o_.basename(e.uri);return!t.startsWith(".")&&(e.isDirectory?"node_modules"!==t&&"out"!==t:!!e.isFile&&this.serviceRegistry.hasServices(e.uri))}},"DefaultWorkspaceManager"),tt),aI=(Mn(rt=class{buildUnexpectedCharactersMessage(e,t,r,n,a){return g$.buildUnexpectedCharactersMessage(e,t,r,n,a)}buildUnableToPopLexerModeMessage(e){return g$.buildUnableToPopLexerModeMessage(e)}},"DefaultLexerErrorMessageProvider"),rt),iI={mode:"full"},sI=(nt=class{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const r=uI(t)?Object.values(t):t,n="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new T$(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=iI){var r,n;const a=this.chevrotainLexer.tokenize(e);return{tokens:a.tokens,errors:a.errors,hidden:a.groups.hidden??[],report:null==(n=(r=this.tokenBuilder).flushLexingReport)?void 0:n.call(r,e)}}toTokenTypeDictionary(e){if(uI(e))return e;const t=lI(e)?Object.values(e.modes).flat():e,r={};return t.forEach(e=>r[e.name]=e),r}},Mn(nt,"DefaultLexer"),nt);function oI(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}function lI(e){return e&&"modes"in e&&"defaultMode"in e}function uI(e){return!oI(e)&&!lI(e)}function cI(e,t,r){let n,a;"string"==typeof e?(a=t,n=r):(a=e.range.start,n=t),a||(a=nr.create(0,0));return RI({index:0,tokens:hI({lines:dI(e),position:a,options:xI(n)}),position:a})}function pI(e,t){const r=xI(t),n=dI(e);if(0===n.length)return!1;const a=n[0],i=n[n.length-1],s=r.start,o=r.end;return Boolean(null==s?void 0:s.exec(a))&&Boolean(null==o?void 0:o.exec(i))}function dI(e){let t="";t="string"==typeof e?e:e.text;return t.split(il)}Mn(oI,"isTokenTypeArray"),Mn(lI,"isIMultiModeLexerDefinition"),Mn(uI,"isTokenTypeDictionary"),Wn(),Mn(cI,"parseJSDoc"),Mn(pI,"isJSDoc"),Mn(dI,"getLines");var fI=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,mI=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function hI(e){var t,r,n;const a=[];let i=e.position.line,s=e.position.character;for(let o=0;o<e.lines.length;o++){const l=0===o,u=o===e.lines.length-1;let c=e.lines[o],p=0;if(l&&e.options.start){const r=null==(t=e.options.start)?void 0:t.exec(c);r&&(p=r.index+r[0].length)}else{const t=null==(r=e.options.line)?void 0:r.exec(c);t&&(p=t.index+t[0].length)}if(u){const t=null==(n=e.options.end)?void 0:n.exec(c);t&&(c=c.substring(0,t.index))}c=c.substring(0,$I(c));if(TI(c,p)>=c.length){if(a.length>0){const e=nr.create(i,s);a.push({type:"break",content:"",range:ar.create(e,e)})}}else{fI.lastIndex=p;const e=fI.exec(c);if(e){const t=e[0],r=e[1],n=nr.create(i,s+p),o=nr.create(i,s+p+t.length);a.push({type:"tag",content:r,range:ar.create(n,o)}),p+=t.length,p=TI(c,p)}if(p<c.length){const e=c.substring(p),t=Array.from(e.matchAll(mI));a.push(...yI(t,e,i,s+p))}}i++,s=0}return a.length>0&&"break"===a[a.length-1].type?a.slice(0,-1):a}function yI(e,t,r,n){const a=[];if(0===e.length){const e=nr.create(r,n),i=nr.create(r,n+t.length);a.push({type:"text",content:t,range:ar.create(e,i)})}else{let i=0;for(const o of e){const e=o.index,s=t.substring(i,e);s.length>0&&a.push({type:"text",content:t.substring(i,e),range:ar.create(nr.create(r,i+n),nr.create(r,e+n))});let l=s.length+1;const u=o[1];if(a.push({type:"inline-tag",content:u,range:ar.create(nr.create(r,i+l+n),nr.create(r,i+l+u.length+n))}),l+=u.length,4===o.length){l+=o[2].length;const e=o[3];a.push({type:"text",content:e,range:ar.create(nr.create(r,i+l+n),nr.create(r,i+l+e.length+n))})}else a.push({type:"text",content:"",range:ar.create(nr.create(r,i+l+n),nr.create(r,i+l+n))});i=e+o[0].length}const s=t.substring(i);s.length>0&&a.push({type:"text",content:s,range:ar.create(nr.create(r,i+n),nr.create(r,i+n+s.length))})}return a}Mn(hI,"tokenize"),Mn(yI,"buildInlineTokens");var gI=/\S/,vI=/\s*$/;function TI(e,t){const r=e.substring(t).match(gI);return r?t+r.index:e.length}function $I(e){const t=e.match(vI);if(t&&"number"==typeof t.index)return t.index}function RI(e){var t,r;const n=nr.create(e.position.line,e.position.character);if(0===e.tokens.length)return new NI([],ar.create(n,n));const a=[];for(;e.index<e.tokens.length;){const t=EI(e,a[a.length-1]);t&&a.push(t)}const i=(null==(t=a[0])?void 0:t.range.start)??n,s=(null==(r=a[a.length-1])?void 0:r.range.end)??n;return new NI(a,ar.create(i,s))}function EI(e,t){const r=e.tokens[e.index];return"tag"===r.type?SI(e,!1):"text"===r.type||"inline-tag"===r.type?AI(e):(bI(r,t),void e.index++)}function bI(e,t){if(t){const r=new LI("",e.range);"inlines"in t?t.inlines.push(r):t.content.inlines.push(r)}}function AI(e){let t=e.tokens[e.index];const r=t;let n=t;const a=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)a.push(CI(e)),n=t,t=e.tokens[e.index];return new OI(a,ar.create(r.range.start,n.range.end))}function CI(e){return"inline-tag"===e.tokens[e.index].type?SI(e,!0):kI(e)}function SI(e,t){const r=e.tokens[e.index++],n=r.content.substring(1),a=e.tokens[e.index];if("text"===(null==a?void 0:a.type)){if(t){const a=kI(e);return new _I(n,new OI([a],a.range),t,ar.create(r.range.start,a.range.end))}{const a=AI(e);return new _I(n,a,t,ar.create(r.range.start,a.range.end))}}{const e=r.range;return new _I(n,new OI([],e),t,e)}}function kI(e){const t=e.tokens[e.index++];return new LI(t.content,t.range)}function xI(e){if(!e)return xI({start:"/**",end:"*/",line:"*"});const{start:t,end:r,line:n}=e;return{start:wI(t,!0),end:wI(r,!1),line:wI(n,!0)}}function wI(e,t){if("string"==typeof e||"object"==typeof e){const r="string"==typeof e?dl(e):e.source;return t?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`)}return e}Mn(TI,"skipWhitespace"),Mn($I,"lastCharacter"),Mn(RI,"parseJSDocComment"),Mn(EI,"parseJSDocElement"),Mn(bI,"appendEmptyLine"),Mn(AI,"parseJSDocText"),Mn(CI,"parseJSDocInline"),Mn(SI,"parseJSDocTag"),Mn(kI,"parseJSDocLine"),Mn(xI,"normalizeOptions"),Mn(wI,"normalizeOption");var NI=(Mn(at=class{constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.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(const t of this.elements)if(0===e.length)e=t.toString();else{const r=t.toString();e+=DI(e)+r}return e.trim()}toMarkdown(e){let t="";for(const r of this.elements)if(0===t.length)t=r.toMarkdown(e);else{const n=r.toMarkdown(e);t+=DI(t)+n}return t.trim()}},"JSDocCommentImpl"),at),_I=(Mn(it=class{constructor(e,t,r,n){this.name=e,this.content=t,this.inline=r,this.range=n}toString(){let e=`@${this.name}`;const t=this.content.toString();return 1===this.content.inlines.length?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){var t;return(null==(t=null==e?void 0:e.renderTag)?void 0:t.call(e,this))??this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const r=II(this.name,t,e??{});if("string"==typeof r)return r}let r="";"italic"===(null==e?void 0:e.tag)||void 0===(null==e?void 0:e.tag)?r="*":"bold"===(null==e?void 0:e.tag)?r="**":"bold-italic"===(null==e?void 0:e.tag)&&(r="***");let n=`${r}@${this.name}${r}`;return 1===this.content.inlines.length?n=`${n} — ${t}`:this.content.inlines.length>1&&(n=`${n}\n${t}`),this.inline?`{${n}}`:n}},"JSDocTagImpl"),it);function II(e,t,r){var n;if("linkplain"===e||"linkcode"===e||"link"===e){const a=t.indexOf(" ");let i=t;if(a>0){const e=TI(t,a);i=t.substring(e),t=t.substring(0,a)}("linkcode"===e||"link"===e&&"code"===r.link)&&(i=`\`${i}\``);return(null==(n=r.renderLink)?void 0:n.call(r,t,i))??PI(t,i)}}function PI(e,t){try{return l_.parse(e,!0),`[${t}](${e})`}catch{return e}}Mn(II,"renderInlineTag"),Mn(PI,"renderLinkDefault");var OI=(Mn(st=class{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;t<this.inlines.length;t++){const r=this.inlines[t],n=this.inlines[t+1];e+=r.toString(),n&&n.range.start.line>r.range.start.line&&(e+="\n")}return e}toMarkdown(e){let t="";for(let r=0;r<this.inlines.length;r++){const n=this.inlines[r],a=this.inlines[r+1];t+=n.toMarkdown(e),a&&a.range.start.line>n.range.start.line&&(t+="\n")}return t}},"JSDocTextImpl"),st),LI=(Mn(ot=class{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}},"JSDocLineImpl"),ot);function DI(e){return e.endsWith("\n")?"\n":"\n\n"}Mn(DI,"fillNewlines");var MI,jI=(Mn(lt=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&pI(t)){return cI(t).toMarkdown({renderLink:Mn((t,r)=>this.documentationLinkRenderer(e,t,r),"renderLink"),renderTag:Mn(t=>this.documentationTagRenderer(e,t),"renderTag")})}}documentationLinkRenderer(e,t,r){const n=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(n&&n.nameSegment){const e=n.nameSegment.range.start.line+1,t=n.nameSegment.range.start.character+1;return`[${r}](${n.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){const r=oi(e).localSymbols;if(!r)return;let n=e;do{const e=r.getStream(n).find(e=>e.name===t);if(e)return e;n=n.$container}while(n)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}},"JSDocDocumentationProvider"),lt),FI=(Mn(ut=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var t;return P_(e)?e.$comment:null==(t=wo(e.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:t.text}},"DefaultCommentProvider"),ut),GI=(Mn(ct=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},"DefaultAsyncParser"),ct),zI=(Mn(pt=class{constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){const e=this.createWorker();e.onReady(()=>{if(this.queue.length>0){const t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){const r=await this.acquireParserWorker(t),n=new e_;let a;const i=t.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(e=>{const t=this.hydrator.hydrate(e);n.resolve(t)}).catch(e=>{n.reject(e)}).finally(()=>{i.dispose(),clearTimeout(a)}),n.promise}terminateWorker(e){e.terminate();const t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(const r of this.workerPool)if(r.ready)return r.lock(),r;const t=new e_;return e.onCancellationRequested(()=>{const e=this.queue.indexOf(t);e>=0&&this.queue.splice(e,1),t.reject(YN)}),this.queue.push(t),t.promise}},"AbstractThreadedAsyncParser"),pt),KI=(Mn(dt=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new Z_.Emitter,this.deferred=new e_,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=n,t(e=>{const t=e;this.deferred.resolve(t),this.unlock()}),r(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(YN),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 e_,this.sendMessage(e),this.deferred.promise}},"ParserWorker"),dt),qI=(Mn(ft=class{constructor(){this.previousTokenSource=new qN.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=WN();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=qN.CancellationToken.None){const n=new e_,a={action:t,deferred:n,cancellationToken:r};return e.push(a),this.performNextOperation(),n.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:r})=>{try{const n=await Promise.resolve().then(()=>e(r));t.resolve(n)}catch(n){XN(n)?t.resolve(void 0):t.reject(n)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},"DefaultWorkspaceLock"),ft),UI=(Mn(mt=class{constructor(e){this.grammarElementIdMap=new R_,this.tokenTypeIdMap=new R_,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(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const t=new Map,r=new Map;for(const n of di(e))t.set(n,{});if(e.$cstNode)for(const n of $o(e.$cstNode))r.set(n,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[n,a]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(a)){const e=[];r[n]=e;for(const r of a)Ga(r)?e.push(this.dehydrateAstNode(r,t)):za(r)?e.push(this.dehydrateReference(r,t)):e.push(r)}else Ga(a)?r[n]=this.dehydrateAstNode(a,t):za(a)?r[n]=this.dehydrateReference(a,t):void 0!==a&&(r[n]=a);return r}dehydrateReference(e,t){const r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){const r=t.cstNodes.get(e);return Ha(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Va(e)?r.content=e.content.map(e=>this.dehydrateCstNode(e,t)):Wa(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){const 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){const t=new Map,r=new Map;for(const a of di(e))t.set(a,{});let n;if(e.$cstNode)for(const a of $o(e.$cstNode)){let e;"fullText"in a?(e=new oN(a.fullText),n=e):"content"in a?e=new iN:"tokenType"in a&&(e=this.hydrateCstLeafNode(a)),e&&(r.set(a,e),e.root=n)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){const 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(const[n,a]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(a)){const e=[];r[n]=e;for(const i of a)Ga(i)?e.push(this.setParent(this.hydrateAstNode(i,t),r)):za(i)?e.push(this.hydrateReference(i,r,n,t)):e.push(i)}else Ga(a)?r[n]=this.setParent(this.hydrateAstNode(a,t),r):za(a)?r[n]=this.hydrateReference(a,r,n,t):void 0!==a&&(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){const n=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(n.grammarSource=this.getGrammarElement(e.grammarSource)),n.astNode=t.astNodes.get(e.astNode),Va(n))for(const a of e.content){const e=this.hydrateCstNode(a,t,r++);n.content.push(e)}return n}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),r=e.offset,n=e.length,a=e.startLine,i=e.startColumn,s=e.endLine,o=e.endColumn,l=e.hidden;return new aN(r,n,{start:{line:a,character:i},end:{line:s,character:o}},t,l)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();return this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const t of di(this.grammar))Ri(t)&&this.grammarElementIdMap.set(t,e++)}},"DefaultHydrator"),mt);function BI(e){return{documentation:{CommentProvider:Mn(e=>new FI(e),"CommentProvider"),DocumentationProvider:Mn(e=>new jI(e),"DocumentationProvider")},parser:{AsyncParser:Mn(e=>new GI(e),"AsyncParser"),GrammarConfig:Mn(e=>eu(e),"GrammarConfig"),LangiumParser:Mn(e=>jN(e),"LangiumParser"),CompletionParser:Mn(e=>MN(e),"CompletionParser"),ValueConverter:Mn(()=>new KN,"ValueConverter"),TokenBuilder:Mn(()=>new zN,"TokenBuilder"),Lexer:Mn(e=>new sI(e),"Lexer"),ParserErrorMessageProvider:Mn(()=>new mN,"ParserErrorMessageProvider"),LexerErrorMessageProvider:Mn(()=>new aI,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:Mn(()=>new X_,"AstNodeLocator"),AstNodeDescriptionProvider:Mn(e=>new H_(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:Mn(e=>new Y_(e),"ReferenceDescriptionProvider")},references:{Linker:Mn(e=>new y_(e),"Linker"),NameProvider:Mn(()=>new v_,"NameProvider"),ScopeProvider:Mn(e=>new I_(e),"ScopeProvider"),ScopeComputation:Mn(e=>new E_(e),"ScopeComputation"),References:Mn(e=>new T_(e),"References")},serializer:{Hydrator:Mn(e=>new UI(e),"Hydrator"),JsonSerializer:Mn(e=>new M_(e),"JsonSerializer")},validation:{DocumentValidator:Mn(e=>new U_(e),"DocumentValidator"),ValidationRegistry:Mn(e=>new K_(e),"ValidationRegistry")},shared:Mn(()=>e.shared,"shared")}}function VI(e){return{ServiceRegistry:Mn(e=>new j_(e),"ServiceRegistry"),workspace:{LangiumDocuments:Mn(e=>new m_(e),"LangiumDocuments"),LangiumDocumentFactory:Mn(e=>new f_(e),"LangiumDocumentFactory"),DocumentBuilder:Mn(e=>new tI(e),"DocumentBuilder"),IndexManager:Mn(e=>new rI(e),"IndexManager"),WorkspaceManager:Mn(e=>new nI(e),"WorkspaceManager"),FileSystemProvider:Mn(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:Mn(()=>new qI,"WorkspaceLock"),ConfigurationProvider:Mn(e=>new Q_(e),"ConfigurationProvider")},profilers:{}}}function WI(e,t,r,n,a,i,s,o,l){return XI([e,t,r,n,a,i,s,o,l].reduce(QI,{}))}Mn(BI,"createDefaultCoreModule"),Mn(VI,"createDefaultSharedCoreModule"),(MI||(MI={})).merge=(e,t)=>QI(QI({},e),t),Mn(WI,"inject");var HI=Symbol("isProxy");function YI(e){if(e&&e[HI])for(const t of Object.values(e))YI(t);return e}function XI(e,t){const r=new Proxy({},{deleteProperty:Mn(()=>!1,"deleteProperty"),set:Mn(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:Mn((n,a)=>a===HI||JI(n,a,e,t||r),"get"),getOwnPropertyDescriptor:Mn((n,a)=>(JI(n,a,e,t||r),Object.getOwnPropertyDescriptor(n,a)),"getOwnPropertyDescriptor"),has:Mn((t,r)=>r in e,"has"),ownKeys:Mn(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}Mn(YI,"eagerLoad"),Mn(XI,"_inject");var ZI=Symbol();function JI(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]===ZI)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in r){const i=r[t];e[t]=ZI;try{e[t]="function"==typeof i?i(n):XI(i,n)}catch(a){throw e[t]=a instanceof Error?a:void 0,a}return e[t]}}function QI(e,t){if(t)for(const[r,n]of Object.entries(t))if(null!=n)if("object"==typeof n){const t=e[r];e[r]=QI("object"==typeof t&&null!==t?t:{},n)}else e[r]=n;return e}Mn(JI,"_resolve"),Mn(QI,"_merge");var eP,tP,rP={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(tP=eP||(eP={})).REGULAR="indentation-sensitive",tP.IGNORE_INDENTATION="ignore-indentation";var nP=(Mn(ht=class extends zN{constructor(e=rP){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...rP,...e},this.indentTokenType=N$({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=N$({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){const r=super.buildTokens(e,t);if(!oI(r))throw new Error("Invalid tokens built by default builder");const{indentTokenName:n,dedentTokenName:a,whitespaceTokenName:i,ignoreIndentationDelimiters:s}=this.options;let o,l,u;const c=[];for(const p of r){for(const[e,t]of s)p.name===e?p.PUSH_MODE=eP.IGNORE_INDENTATION:p.name===t&&(p.POP_MODE=!0);p.name===a?o=p:p.name===n?l=p:p.name===i?u=p:c.push(p)}if(!o||!l||!u)throw new Error("Some indentation/whitespace tokens not found!");if(s.length>0){return{modes:{[eP.REGULAR]:[o,l,...c,u],[eP.IGNORE_INDENTATION]:[...c,u]},defaultMode:eP.REGULAR}}return[o,l,u,...c]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return 0===t||"\r\n".includes(e[t-1])}matchWhitespace(e,t,r,n){this.whitespaceRegExp.lastIndex=t;const a=this.whitespaceRegExp.exec(e);return{currIndentLevel:(null==a?void 0:a[0].length)??0,prevIndentLevel:this.indentationStack.at(-1),match:a}}createIndentationTokenInstance(e,t,r,n){const a=this.getLineNumber(t,n);return P$(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;const{currIndentLevel:a,prevIndentLevel:i,match:s}=this.matchWhitespace(e,t,r,n);return a<=i?null:(this.indentationStack.push(a),s)}dedentMatcher(e,t,r,n){var a,i;if(!this.isStartOfLine(e,t))return null;const{currIndentLevel:s,prevIndentLevel:o,match:l}=this.matchWhitespace(e,t,r,n);if(s>=o)return null;const u=this.indentationStack.lastIndexOf(s);if(-1===u)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${s} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:(null==(a=null==l?void 0:l[0])?void 0:a.length)??0,line:this.getLineNumber(e,t),column:1}),null;const c=this.indentationStack.length-u-1,p=(null==(i=e.substring(0,t).match(/[\r\n]+$/))?void 0:i[0].length)??1;for(let d=0;d<c;d++){const n=this.createIndentationTokenInstance(this.dedentTokenType,e,"",t-(p-1));r.push(n),this.indentationStack.pop()}return null}buildTerminalToken(e){const t=super.buildTerminalToken(e),{indentTokenName:r,dedentTokenName:n,whitespaceTokenName:a}=this.options;return t.name===r?this.indentTokenType:t.name===n?this.dedentTokenType:t.name===a?N$({name:a,pattern:this.whitespaceRegExp,group:T$.SKIPPED}):t}flushRemainingDedents(e){const t=[];for(;this.indentationStack.length>1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},"IndentationAwareTokenBuilder"),ht),aP=(Mn(yt=class extends sI{constructor(e){if(super(e),!(e.parser.TokenBuilder instanceof nP))throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder");this.indentationTokenBuilder=e.parser.TokenBuilder}tokenize(e,t=iI){const r=super.tokenize(e),n=r.report;"full"===(null==t?void 0:t.mode)&&r.tokens.push(...n.remainingDedents),n.remainingDedents=[];const{indentTokenType:a,dedentTokenType:i}=this.indentationTokenBuilder,s=a.tokenTypeIdx,o=i.tokenTypeIdx,l=[],u=r.tokens.length-1;for(let c=0;c<u;c++){const e=r.tokens[c],t=r.tokens[c+1];e.tokenTypeIdx!==s||t.tokenTypeIdx!==o?l.push(e):c++}return u>=0&&l.push(r.tokens[u]),r.tokens=l,r}},"IndentationAwareLexer"),yt),iP={};Fn(iP,{AstUtils:()=>ni,BiMap:()=>R_,Cancellation:()=>qN,ContextCache:()=>w_,CstUtils:()=>Fa,DONE_RESULT:()=>Qa,Deferred:()=>e_,Disposable:()=>J_,DisposableCache:()=>k_,DocumentCache:()=>N_,EMPTY_STREAM:()=>Ja,ErrorWithLocation:()=>zo,GrammarUtils:()=>Go,MultiMap:()=>$_,OperationCancelled:()=>YN,Reduction:()=>ti,RegExpUtils:()=>Uo,SimpleCache:()=>x_,StreamImpl:()=>Ya,TreeStreamImpl:()=>ri,URI:()=>l_,UriTrie:()=>d_,UriUtils:()=>o_,WorkspaceCache:()=>__,assertCondition:()=>qo,assertUnreachable:()=>Ko,delayNextTick:()=>UN,interruptAndCheck:()=>ZN,isOperationCancelled:()=>XN,loadGrammarFromJson:()=>pP,setInterruptionPeriod:()=>HN,startCancelableOperation:()=>WN,stream:()=>ei}),zn(iP,Z_);var sP=(Mn(gt=class{stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},"EmptyFileSystemProvider"),gt),oP={fileSystemProvider:Mn(()=>new sP,"fileSystemProvider")},lP={Grammar:Mn(()=>{},"Grammar"),LanguageMetaData:Mn(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},uP={AstReflection:Mn(()=>new go,"AstReflection")};function cP(){const e=WI(VI(oP),uP),t=WI(BI({shared:e}),lP);return e.ServiceRegistry.register(t),t}function pP(e){const t=cP(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,l_.parse(`memory:/${r.name??"grammar"}.langium`)),r}Mn(cP,"createMinimalGrammarServices"),Mn(pP,"loadGrammarFromJson"),zn(ja,iP);var dP,fP,mP,hP,yP,gP,vP,TP,$P,RP,EP,bP,AP,CP,SP,kP=(vt=class{constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new $_}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(e=>this.activeCategories.add(e)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(e=>this.activeCategories.delete(e)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return new xP(t=>this.records.add(e,this.dumpRecord(e,t)),t)}dumpRecord(e,t){const r=[];for(const a of t.entries.keys()){const e=t.entries.get(a),n=e.reduce((e,t)=>e+t);r.push({name:`${t.identifier}.${a}`,count:e.length,duration:n})}const n=t.duration-r.map(e=>e.duration).reduce((e,t)=>e+t,0);return r.push({name:t.identifier,count:1,duration:n}),r.sort((e,t)=>t.duration-e.duration),Mn(function(e){return Math.round(100*e)/100},"Round"),t}getRecords(...e){return 0===e.length?this.records.values():this.records.entries().filter(t=>e.some(e=>e===t[0])).flatMap(e=>e[1])}},Mn(vt,"DefaultLangiumProfiler"),vt),xP=(Mn(Tt=class{constructor(e,t){this.stack=[],this.entries=new $_,this.addRecord=e,this.identifier=t}start(){if(void 0!==this.startTime)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(void 0===this.startTime)throw new Error(`Task "${this.identifier}" was not started.`);if(0!==this.stack.length)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(e=>e.id).join(", ")}.`);const 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){const 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.`);const r=performance.now()-t.start;void 0!==this.stack.at(-1)&&(this.stack[this.stack.length-1].content+=r);const n=r-t.content;this.entries.add(e,n)}},"ProfilingTask"),Tt);(dP||(dP={})).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 ]+)\]/},(fP||(fP={})).Terminals={DOMAIN_NAME:/complex|complicated|clear|chaotic|confusion/,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]*/},(mP||(mP={})).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]*/},(hP||(hP={})).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])?/},(yP||(yP={})).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]*/},(gP||(gP={})).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]*/},(vP||(vP={})).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]*/},(TP||(TP={})).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]*/},($P||($P={})).Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ABNF_RULENAME:/[A-Za-z][A-Za-z0-9-]*/,ABNF_STRING:/"[^"]*"/,ABNF_NUMVAL:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/,ABNF_REPEAT:/[0-9]*\*[0-9]*/,ABNF_EXACT_REPEAT:/[0-9]+/,ABNF_WHITESPACE:/[\t \r\n]+/,ABNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,ABNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,ABNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ABNF_COMMENT:/;[^\n\r]*/},(RP||(RP={})).Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EBNF_ID:/[A-Z_a-z][\w-]*/,EBNF_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,EBNF_SPECIAL_SEQUENCE:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/,EBNF_WHITESPACE:/[\t \r\n]+/,EBNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EBNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EBNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EBNF_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//,EBNF_ISO_COMMENT:/\(\*[\s\S]*?\*\)/},(EP||(EP={})).Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,RR_ID:/[A-Z_a-z][\w-]*/,RR_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,RR_WHITESPACE:/[\t \r\n]+/,RR_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,RR_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,RR_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,RR_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//},(bP||(bP={})).Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,PEG_ID:/[A-Z_a-z][\w-]*/,PEG_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,PEG_WHITESPACE:/[\t \r\n]+/,PEG_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,PEG_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,PEG_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,PEG_LINE_COMMENT:/#[^\n\r]*/},(AP||(AP={})).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:/"[^"]*"|'[^']*'/},(CP||(CP={})).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]*|)/,CLASS_ANNOTATION:/[ \t]+:::[ \t]*[A-Za-z_][\w-]*/,ICON_ANNOTATION:/[ \t]+icon\([\w-]*(?::[\w-]+)?\)/,DESC_ANNOTATION:/[ \t]+##[^\n\r]*/,INDENTATION:/[ \t]{1,}/,QUOTED_NAME:/"[^"]*"|'[^']*'/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,BARE_NAME:/(?!:::|icon\(|##)[^ \t\n\r"'](?:(?![ \t]+:::[ \t]*[A-Za-z_]|[ \t]+icon\(|[ \t]+##)[^\n\r])*/},(SP||(SP={})).Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+</,LINK_ARROW:/-->|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,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]*/},dP.Terminals,fP.Terminals,mP.Terminals,hP.Terminals,yP.Terminals,gP.Terminals,vP.Terminals,TP.Terminals,$P.Terminals,RP.Terminals,EP.Terminals,bP.Terminals,CP.Terminals,AP.Terminals,SP.Terminals;var wP="AbnfAlternation",NP="alternatives",_P="AbnfConcatenation",IP="elements",PP="AbnfElement",OP="primary",LP="repeat",DP="AbnfGroup",MP="element",jP="AbnfNumVal",FP="value",GP="AbnfOptionalGroup",zP="element",KP="AbnfPrimary",qP="AbnfRule",UP="definition",BP="name",VP="AbnfRuleName",WP="name",HP="AbnfStringLiteral",YP="value",XP="Accelerator",ZP="name",JP="x",QP="y",eO="Alignment",tO="direction",rO="members",nO="Anchor",aO="evolution",iO="name",sO="visibility",oO="Annotation",lO="number",uO="text",cO="x",pO="y",dO="Annotations",fO="x",mO="y",hO="Architecture",yO="accDescr",gO="accTitle",vO="alignments",TO="edges",$O="groups",RO="junctions",EO="services",bO="title";Mn(function(e){return fz.isInstance(e,hO)},"isArchitecture");var AO="Axis",CO="label",SO="name",kO="Branch",xO="name",wO="order";Mn(function(e){return fz.isInstance(e,kO)},"isBranch");var NO="Checkout",_O="branch",IO="CherryPicking",PO="id",OO="parent",LO="tags",DO="ClassDefStatement",MO="className",jO="styleText",FO="Commit",GO="id",zO="message",KO="tags",qO="type";Mn(function(e){return fz.isInstance(e,FO)},"isCommit");var UO="Common",BO="accDescr",VO="accTitle",WO="title",HO="Component",YO="decorator",XO="evolution",ZO="inertia",JO="label",QO="name",eL="visibility",tL="Curve",rL="entries",nL="label",aL="name",iL="Cynefin",sL="accDescr",oL="accTitle",lL="domains",uL="title",cL="transitions";Mn(function(e){return fz.isInstance(e,iL)},"isCynefin");var pL="Deaccelerator",dL="name",fL="x",mL="y",hL="Decorator",yL="strategy",gL="Direction",vL="accDescr",TL="accTitle",$L="dir",RL="statements",EL="title",bL="DomainBlock",AL="domain",CL="items";Mn(function(e){return fz.isInstance(e,bL)},"isDomainBlock");var SL="DomainItem",kL="label";Mn(function(e){return fz.isInstance(e,SL)},"isDomainItem");var xL="EbnfChoice",wL="alternatives",NL="EbnfExceptionPostfix",_L="except",IL="EbnfGroup",PL="element",OL="EbnfNonTerminal",LL="name",DL="EbnfOneOrMorePostfix",ML="operator",jL="EbnfOptional",FL="element",GL="EbnfOptionalPostfix",zL="operator",KL="EbnfPostfix",qL="EbnfPrimary",UL="EbnfRepetition",BL="element",VL="EbnfRule",WL="definition",HL="name",YL="EbnfSequence",XL="elements",ZL="EbnfSpecial",JL="text",QL="EbnfTerm",eD="base",tD="postfixes",rD="EbnfTerminal",nD="value",aD="EbnfZeroOrMorePostfix",iD="operator",sD="Edge",oD="lhsDir",lD="lhsGroup",uD="lhsId",cD="lhsInto",pD="rhsDir",dD="rhsGroup",fD="rhsId",mD="rhsInto",hD="title",yD="EmDataEntity",gD="dataBlockValue",vD="dataType",TD="name",$D="EmFrame",RD="EmGwt",ED="givenStatements",bD="sourceFrame",AD="thenStatements",CD="whenStatements",SD="EmGwtStatement",kD="entityIdentifier",xD="EmModelEntity",wD="name";Mn(function(e){return"rmo"===e||"readmodel"===e||"ui"===e||"cmd"===e||"command"===e||"evt"===e||"event"===e||"pcr"===e||"processor"===e},"isEmModelEntityType");var ND="EmNoteEntity",_D="dataBlockValue",ID="dataType",PD="sourceFrame",OD="EmResetFrame",LD="dataInlineValue",DD="dataReference",MD="dataType",jD="entityIdentifier",FD="modelEntityType",GD="name",zD="sourceFrames";function KD(e){return fz.isInstance(e,OD)}Mn(KD,"isEmResetFrame");var qD="EmTimeFrame",UD="dataInlineValue",BD="dataReference",VD="dataType",WD="entityIdentifier",HD="modelEntityType",YD="name",XD="sourceFrames",ZD="Entry",JD="axis",QD="value",eM="EventModel",tM="accDescr",rM="accTitle",nM="dataEntities",aM="frames",iM="gwtEntities",sM="modelEntities",oM="noteEntities",lM="title",uM="Evolution",cM="stages",pM="EvolutionStage",dM="boundary",fM="name",mM="secondName",hM="Evolve",yM="component",gM="target",vM="GitGraph",TM="accDescr",$M="accTitle",RM="statements",EM="title";Mn(function(e){return fz.isInstance(e,vM)},"isGitGraph");var bM="Group",AM="icon",CM="id",SM="in",kM="title",xM="Info",wM="accDescr",NM="accTitle",_M="title";Mn(function(e){return fz.isInstance(e,xM)},"isInfo");var IM="Item",PM="classSelector",OM="name",LM="Junction",DM="id",MM="in",jM="Label",FM="negX",GM="negY",zM="offsetX",KM="offsetY",qM="Leaf",UM="classSelector",BM="name",VM="value",WM="Link",HM="arrow",YM="from",XM="fromPort",ZM="linkLabel",JM="to",QM="toPort",ej="Merge",tj="branch",rj="id",nj="tags",aj="type";Mn(function(e){return fz.isInstance(e,ej)},"isMerge");var ij="Note",sj="evolution",oj="text",lj="visibility",uj="Option",cj="name",pj="value",dj="Packet",fj="accDescr",mj="accTitle",hj="blocks",yj="title";Mn(function(e){return fz.isInstance(e,dj)},"isPacket");var gj="PacketBlock",vj="bits",Tj="end",$j="label",Rj="start";Mn(function(e){return fz.isInstance(e,gj)},"isPacketBlock");var Ej="PegAny",bj="dot",Aj="PegGroup",Cj="element",Sj="PegIdentifier",kj="name",xj="PegLiteral",wj="value",Nj="PegOrderedChoice",_j="alternatives",Ij="PegPrefix",Pj="operator",Oj="suffix",Lj="PegPrimary",Dj="PegRule",Mj="definition",jj="name",Fj="PegSequence",Gj="elements",zj="PegSuffix",Kj="operator",qj="primary",Uj="Pie",Bj="accDescr",Vj="accTitle",Wj="sections",Hj="showData",Yj="title";Mn(function(e){return fz.isInstance(e,Uj)},"isPie");var Xj="PieSection",Zj="label",Jj="value";Mn(function(e){return fz.isInstance(e,Xj)},"isPieSection");var Qj="Pipeline",eF="components",tF="parent",rF="PipelineComponent",nF="evolution",aF="label",iF="name",sF="Radar",oF="accDescr",lF="accTitle",uF="axes",cF="curves",pF="options",dF="title",fF="Railroad",mF="accDescr",hF="accTitle",yF="rules",gF="title";Mn(function(e){return fz.isInstance(e,fF)},"isRailroad");var vF="RailroadAbnf",TF="accDescr",$F="accTitle",RF="rules",EF="title";Mn(function(e){return fz.isInstance(e,vF)},"isRailroadAbnf");var bF="RailroadChoiceExpr",AF="alternatives",CF="RailroadEbnf",SF="accDescr",kF="accTitle",xF="rules",wF="title";Mn(function(e){return fz.isInstance(e,CF)},"isRailroadEbnf");var NF="RailroadExpression",_F="RailroadNonTerminalExpr",IF="name",PF="RailroadOneOrMoreExpr",OF="element",LF="RailroadOptionalExpr",DF="element",MF="RailroadPeg",jF="accDescr",FF="accTitle",GF="rules",zF="title";Mn(function(e){return fz.isInstance(e,MF)},"isRailroadPeg");var KF="RailroadRule",qF="definition",UF="name",BF="RailroadSequenceExpr",VF="elements",WF="RailroadSpecialExpr",HF="text",YF="RailroadTerminalExpr",XF="value",ZF="RailroadZeroOrMoreExpr",JF="element",QF="Section",eG="classSelector",tG="name",rG="Service",nG="icon",aG="iconText",iG="id",sG="in",oG="title",lG="Size",uG="height",cG="width",pG="Statement",dG="Transition",fG="from",mG="label",hG="to";Mn(function(e){return fz.isInstance(e,dG)},"isTransition");var yG="Treemap",gG="accDescr",vG="accTitle",TG="title",$G="TreemapRows";Mn(function(e){return fz.isInstance(e,yG)},"isTreemap");var RG="TreemapRow",EG="indent",bG="item",AG="TreeNode",CG="classAnnotation",SG="descAnnotation",kG="iconAnnotation",xG="indent",wG="name",NG="TreeView",_G="accDescr",IG="accTitle",PG="nodes",OG="title",LG="Wardley",DG="accDescr",MG="accelerators",jG="accTitle",FG="anchors",GG="annotation",zG="annotations",KG="components",qG="deaccelerators",UG="evolution",BG="evolves",VG="links",WG="notes",HG="pipelines",YG="size",XG="title";Mn(function(e){return fz.isInstance(e,LG)},"isWardley");var ZG,JG,QG,ez,tz,rz,nz,az,iz,sz,oz,lz,uz,cz,pz,dz=(Mn($t=class extends Ba{constructor(){super(...arguments),this.types={AbnfAlternation:{name:wP,properties:{alternatives:{name:NP,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:_P,properties:{elements:{name:IP,defaultValue:[]}},superTypes:[]},AbnfElement:{name:PP,properties:{primary:{name:OP},repeat:{name:LP}},superTypes:[]},AbnfGroup:{name:DP,properties:{element:{name:MP}},superTypes:[KP]},AbnfNumVal:{name:jP,properties:{value:{name:FP}},superTypes:[KP]},AbnfOptionalGroup:{name:GP,properties:{element:{name:zP}},superTypes:[KP]},AbnfPrimary:{name:KP,properties:{},superTypes:[]},AbnfRule:{name:qP,properties:{definition:{name:UP},name:{name:BP}},superTypes:[]},AbnfRuleName:{name:VP,properties:{name:{name:WP}},superTypes:[KP]},AbnfStringLiteral:{name:HP,properties:{value:{name:YP}},superTypes:[KP]},Accelerator:{name:XP,properties:{name:{name:ZP},x:{name:JP},y:{name:QP}},superTypes:[]},Alignment:{name:eO,properties:{direction:{name:tO},members:{name:rO,defaultValue:[]}},superTypes:[]},Anchor:{name:nO,properties:{evolution:{name:aO},name:{name:iO},visibility:{name:sO}},superTypes:[]},Annotation:{name:oO,properties:{number:{name:lO},text:{name:uO},x:{name:cO},y:{name:pO}},superTypes:[]},Annotations:{name:dO,properties:{x:{name:fO},y:{name:mO}},superTypes:[]},Architecture:{name:hO,properties:{accDescr:{name:yO},accTitle:{name:gO},alignments:{name:vO,defaultValue:[]},edges:{name:TO,defaultValue:[]},groups:{name:$O,defaultValue:[]},junctions:{name:RO,defaultValue:[]},services:{name:EO,defaultValue:[]},title:{name:bO}},superTypes:[]},Axis:{name:AO,properties:{label:{name:CO},name:{name:SO}},superTypes:[]},Branch:{name:kO,properties:{name:{name:xO},order:{name:wO}},superTypes:[pG]},Checkout:{name:NO,properties:{branch:{name:_O}},superTypes:[pG]},CherryPicking:{name:IO,properties:{id:{name:PO},parent:{name:OO},tags:{name:LO,defaultValue:[]}},superTypes:[pG]},ClassDefStatement:{name:DO,properties:{className:{name:MO},styleText:{name:jO}},superTypes:[]},Commit:{name:FO,properties:{id:{name:GO},message:{name:zO},tags:{name:KO,defaultValue:[]},type:{name:qO}},superTypes:[pG]},Common:{name:UO,properties:{accDescr:{name:BO},accTitle:{name:VO},title:{name:WO}},superTypes:[]},Component:{name:HO,properties:{decorator:{name:YO},evolution:{name:XO},inertia:{name:ZO,defaultValue:!1},label:{name:JO},name:{name:QO},visibility:{name:eL}},superTypes:[]},Curve:{name:tL,properties:{entries:{name:rL,defaultValue:[]},label:{name:nL},name:{name:aL}},superTypes:[]},Cynefin:{name:iL,properties:{accDescr:{name:sL},accTitle:{name:oL},domains:{name:lL,defaultValue:[]},title:{name:uL},transitions:{name:cL,defaultValue:[]}},superTypes:[]},Deaccelerator:{name:pL,properties:{name:{name:dL},x:{name:fL},y:{name:mL}},superTypes:[]},Decorator:{name:hL,properties:{strategy:{name:yL}},superTypes:[]},Direction:{name:gL,properties:{accDescr:{name:vL},accTitle:{name:TL},dir:{name:$L},statements:{name:RL,defaultValue:[]},title:{name:EL}},superTypes:[vM]},DomainBlock:{name:bL,properties:{domain:{name:AL},items:{name:CL,defaultValue:[]}},superTypes:[]},DomainItem:{name:SL,properties:{label:{name:kL}},superTypes:[]},EbnfChoice:{name:xL,properties:{alternatives:{name:wL,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:NL,properties:{except:{name:_L}},superTypes:[KL]},EbnfGroup:{name:IL,properties:{element:{name:PL}},superTypes:[qL]},EbnfNonTerminal:{name:OL,properties:{name:{name:LL}},superTypes:[qL]},EbnfOneOrMorePostfix:{name:DL,properties:{operator:{name:ML}},superTypes:[KL]},EbnfOptional:{name:jL,properties:{element:{name:FL}},superTypes:[qL]},EbnfOptionalPostfix:{name:GL,properties:{operator:{name:zL}},superTypes:[KL]},EbnfPostfix:{name:KL,properties:{},superTypes:[]},EbnfPrimary:{name:qL,properties:{},superTypes:[]},EbnfRepetition:{name:UL,properties:{element:{name:BL}},superTypes:[qL]},EbnfRule:{name:VL,properties:{definition:{name:WL},name:{name:HL}},superTypes:[]},EbnfSequence:{name:YL,properties:{elements:{name:XL,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:ZL,properties:{text:{name:JL}},superTypes:[qL]},EbnfTerm:{name:QL,properties:{base:{name:eD},postfixes:{name:tD,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:rD,properties:{value:{name:nD}},superTypes:[qL]},EbnfZeroOrMorePostfix:{name:aD,properties:{operator:{name:iD}},superTypes:[KL]},Edge:{name:sD,properties:{lhsDir:{name:oD},lhsGroup:{name:lD,defaultValue:!1},lhsId:{name:uD},lhsInto:{name:cD,defaultValue:!1},rhsDir:{name:pD},rhsGroup:{name:dD,defaultValue:!1},rhsId:{name:fD},rhsInto:{name:mD,defaultValue:!1},title:{name:hD}},superTypes:[]},EmDataEntity:{name:yD,properties:{dataBlockValue:{name:gD},dataType:{name:vD},name:{name:TD}},superTypes:[]},EmFrame:{name:$D,properties:{},superTypes:[]},EmGwt:{name:RD,properties:{givenStatements:{name:ED,defaultValue:[]},sourceFrame:{name:bD,referenceType:$D},thenStatements:{name:AD,defaultValue:[]},whenStatements:{name:CD,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:SD,properties:{entityIdentifier:{name:kD,referenceType:xD}},superTypes:[]},EmModelEntity:{name:xD,properties:{name:{name:wD}},superTypes:[]},EmNoteEntity:{name:ND,properties:{dataBlockValue:{name:_D},dataType:{name:ID},sourceFrame:{name:PD,referenceType:$D}},superTypes:[]},EmResetFrame:{name:OD,properties:{dataInlineValue:{name:LD},dataReference:{name:DD,referenceType:yD},dataType:{name:MD},entityIdentifier:{name:jD},modelEntityType:{name:FD},name:{name:GD},sourceFrames:{name:zD,defaultValue:[],referenceType:$D}},superTypes:[$D]},EmTimeFrame:{name:qD,properties:{dataInlineValue:{name:UD},dataReference:{name:BD,referenceType:yD},dataType:{name:VD},entityIdentifier:{name:WD},modelEntityType:{name:HD},name:{name:YD},sourceFrames:{name:XD,defaultValue:[],referenceType:$D}},superTypes:[$D]},Entry:{name:ZD,properties:{axis:{name:JD,referenceType:AO},value:{name:QD}},superTypes:[]},EventModel:{name:eM,properties:{accDescr:{name:tM},accTitle:{name:rM},dataEntities:{name:nM,defaultValue:[]},frames:{name:aM,defaultValue:[]},gwtEntities:{name:iM,defaultValue:[]},modelEntities:{name:sM,defaultValue:[]},noteEntities:{name:oM,defaultValue:[]},title:{name:lM}},superTypes:[]},Evolution:{name:uM,properties:{stages:{name:cM,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:pM,properties:{boundary:{name:dM},name:{name:fM},secondName:{name:mM}},superTypes:[]},Evolve:{name:hM,properties:{component:{name:yM},target:{name:gM}},superTypes:[]},GitGraph:{name:vM,properties:{accDescr:{name:TM},accTitle:{name:$M},statements:{name:RM,defaultValue:[]},title:{name:EM}},superTypes:[]},Group:{name:bM,properties:{icon:{name:AM},id:{name:CM},in:{name:SM},title:{name:kM}},superTypes:[]},Info:{name:xM,properties:{accDescr:{name:wM},accTitle:{name:NM},title:{name:_M}},superTypes:[]},Item:{name:IM,properties:{classSelector:{name:PM},name:{name:OM}},superTypes:[]},Junction:{name:LM,properties:{id:{name:DM},in:{name:MM}},superTypes:[]},Label:{name:jM,properties:{negX:{name:FM,defaultValue:!1},negY:{name:GM,defaultValue:!1},offsetX:{name:zM},offsetY:{name:KM}},superTypes:[]},Leaf:{name:qM,properties:{classSelector:{name:UM},name:{name:BM},value:{name:VM}},superTypes:[IM]},Link:{name:WM,properties:{arrow:{name:HM},from:{name:YM},fromPort:{name:XM},linkLabel:{name:ZM},to:{name:JM},toPort:{name:QM}},superTypes:[]},Merge:{name:ej,properties:{branch:{name:tj},id:{name:rj},tags:{name:nj,defaultValue:[]},type:{name:aj}},superTypes:[pG]},Note:{name:ij,properties:{evolution:{name:sj},text:{name:oj},visibility:{name:lj}},superTypes:[]},Option:{name:uj,properties:{name:{name:cj},value:{name:pj,defaultValue:!1}},superTypes:[]},Packet:{name:dj,properties:{accDescr:{name:fj},accTitle:{name:mj},blocks:{name:hj,defaultValue:[]},title:{name:yj}},superTypes:[]},PacketBlock:{name:gj,properties:{bits:{name:vj},end:{name:Tj},label:{name:$j},start:{name:Rj}},superTypes:[]},PegAny:{name:Ej,properties:{dot:{name:bj}},superTypes:[Lj]},PegGroup:{name:Aj,properties:{element:{name:Cj}},superTypes:[Lj]},PegIdentifier:{name:Sj,properties:{name:{name:kj}},superTypes:[Lj]},PegLiteral:{name:xj,properties:{value:{name:wj}},superTypes:[Lj]},PegOrderedChoice:{name:Nj,properties:{alternatives:{name:_j,defaultValue:[]}},superTypes:[]},PegPrefix:{name:Ij,properties:{operator:{name:Pj},suffix:{name:Oj}},superTypes:[]},PegPrimary:{name:Lj,properties:{},superTypes:[]},PegRule:{name:Dj,properties:{definition:{name:Mj},name:{name:jj}},superTypes:[]},PegSequence:{name:Fj,properties:{elements:{name:Gj,defaultValue:[]}},superTypes:[]},PegSuffix:{name:zj,properties:{operator:{name:Kj},primary:{name:qj}},superTypes:[]},Pie:{name:Uj,properties:{accDescr:{name:Bj},accTitle:{name:Vj},sections:{name:Wj,defaultValue:[]},showData:{name:Hj,defaultValue:!1},title:{name:Yj}},superTypes:[]},PieSection:{name:Xj,properties:{label:{name:Zj},value:{name:Jj}},superTypes:[]},Pipeline:{name:Qj,properties:{components:{name:eF,defaultValue:[]},parent:{name:tF}},superTypes:[]},PipelineComponent:{name:rF,properties:{evolution:{name:nF},label:{name:aF},name:{name:iF}},superTypes:[]},Radar:{name:sF,properties:{accDescr:{name:oF},accTitle:{name:lF},axes:{name:uF,defaultValue:[]},curves:{name:cF,defaultValue:[]},options:{name:pF,defaultValue:[]},title:{name:dF}},superTypes:[]},Railroad:{name:fF,properties:{accDescr:{name:mF},accTitle:{name:hF},rules:{name:yF,defaultValue:[]},title:{name:gF}},superTypes:[]},RailroadAbnf:{name:vF,properties:{accDescr:{name:TF},accTitle:{name:$F},rules:{name:RF,defaultValue:[]},title:{name:EF}},superTypes:[]},RailroadChoiceExpr:{name:bF,properties:{alternatives:{name:AF,defaultValue:[]}},superTypes:[NF]},RailroadEbnf:{name:CF,properties:{accDescr:{name:SF},accTitle:{name:kF},rules:{name:xF,defaultValue:[]},title:{name:wF}},superTypes:[]},RailroadExpression:{name:NF,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:_F,properties:{name:{name:IF}},superTypes:[NF]},RailroadOneOrMoreExpr:{name:PF,properties:{element:{name:OF}},superTypes:[NF]},RailroadOptionalExpr:{name:LF,properties:{element:{name:DF}},superTypes:[NF]},RailroadPeg:{name:MF,properties:{accDescr:{name:jF},accTitle:{name:FF},rules:{name:GF,defaultValue:[]},title:{name:zF}},superTypes:[]},RailroadRule:{name:KF,properties:{definition:{name:qF},name:{name:UF}},superTypes:[]},RailroadSequenceExpr:{name:BF,properties:{elements:{name:VF,defaultValue:[]}},superTypes:[NF]},RailroadSpecialExpr:{name:WF,properties:{text:{name:HF}},superTypes:[NF]},RailroadTerminalExpr:{name:YF,properties:{value:{name:XF}},superTypes:[NF]},RailroadZeroOrMoreExpr:{name:ZF,properties:{element:{name:JF}},superTypes:[NF]},Section:{name:QF,properties:{classSelector:{name:eG},name:{name:tG}},superTypes:[IM]},Service:{name:rG,properties:{icon:{name:nG},iconText:{name:aG},id:{name:iG},in:{name:sG},title:{name:oG}},superTypes:[]},Size:{name:lG,properties:{height:{name:uG},width:{name:cG}},superTypes:[]},Statement:{name:pG,properties:{},superTypes:[]},Transition:{name:dG,properties:{from:{name:fG},label:{name:mG},to:{name:hG}},superTypes:[]},TreeNode:{name:AG,properties:{classAnnotation:{name:CG},descAnnotation:{name:SG},iconAnnotation:{name:kG},indent:{name:xG},name:{name:wG}},superTypes:[]},TreeView:{name:NG,properties:{accDescr:{name:_G},accTitle:{name:IG},nodes:{name:PG,defaultValue:[]},title:{name:OG}},superTypes:[]},Treemap:{name:yG,properties:{accDescr:{name:gG},accTitle:{name:vG},title:{name:TG},TreemapRows:{name:$G,defaultValue:[]}},superTypes:[]},TreemapRow:{name:RG,properties:{indent:{name:EG},item:{name:bG}},superTypes:[]},Wardley:{name:LG,properties:{accDescr:{name:DG},accelerators:{name:MG,defaultValue:[]},accTitle:{name:jG},anchors:{name:FG,defaultValue:[]},annotation:{name:GG,defaultValue:[]},annotations:{name:zG,defaultValue:[]},components:{name:KG,defaultValue:[]},deaccelerators:{name:qG,defaultValue:[]},evolution:{name:UG},evolves:{name:BG,defaultValue:[]},links:{name:VG,defaultValue:[]},notes:{name:WG,defaultValue:[]},pipelines:{name:HG,defaultValue:[]},size:{name:YG},title:{name:XG}},superTypes:[]}}}},"MermaidAstReflection"),$t),fz=new dz,mz=Mn(()=>ZG??(ZG=pP('{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"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":[]}},{"$type":"Assignment","feature":"alignments","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"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@10"},"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@10"},"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@12"},"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@30"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"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@23"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@23"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@23"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Alignment","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"align"},{"$type":"Assignment","feature":"direction","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"row"},{"$type":"Keyword","value":"column"}]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@24"},"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@16"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@19"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@20"},"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"),hz=Mn(()=>JG??(JG=pP('{"$type":"Grammar","isDeclared":true,"name":"CynefinGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Cynefin","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"cynefin-beta"},{"$type":"Keyword","value":"cynefin-beta:"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"domains","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"transitions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"domain","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"items","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainItem","definition":{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Transition","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":"--\x3e"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"DOMAIN_NAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complex"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complicated"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"clear"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"chaotic"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"confusion"},"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":[]}')),"CynefinGrammarGrammar"),yz=Mn(()=>QG??(QG=pP('{"$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"),gz=Mn(()=>ez??(ez=pP('{"$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"),vz=Mn(()=>tz??(tz=pP('{"$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"),Tz=Mn(()=>rz??(rz=pP('{"$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"),$z=Mn(()=>nz??(nz=pP('{"$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"),Rz=Mn(()=>az??(az=pP('{"$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"),Ez=Mn(()=>iz??(iz=pP('{"$type":"Grammar","isDeclared":true,"name":"RailroadAbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_RULENAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Za-z][A-Za-z0-9-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_NUMVAL","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\\\\.[0-9A-Fa-f]+)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]*\\\\*[0-9]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_EXACT_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_COMMENT","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadAbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-abnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","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":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfAlternation","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfConcatenation","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfElement","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfStringLiteral","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfNumVal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRuleName","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfOptionalGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadAbnf","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfAlternation","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfConcatenation","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfElement","attributes":[{"$type":"TypeAttribute","name":"repeat","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"AbnfStringLiteral","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfNumVal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfRuleName","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"AbnfOptionalGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadAbnfGrammarGrammar"),bz=Mn(()=>sz??(sz=pP('{"$type":"Grammar","isDeclared":true,"name":"RailroadEbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_SPECIAL_SEQUENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\?(?=[^?;]*[^?\\\\s;][^?;]*\\\\?)[^?;]*\\\\?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_ISO_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\(\\\\*[\\\\s\\\\S]*?\\\\*\\\\)/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadEbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-ebnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","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":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"="},{"$type":"Keyword","value":"::="}]},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"|"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":",","cardinality":"?"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerm","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"base","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"postfixes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerminal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfNonTerminal","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSpecial","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptional","returnType":{"$ref":"#/interfaces@11"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRepetition","returnType":{"$ref":"#/interfaces@12"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPostfix","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptionalPostfix","returnType":{"$ref":"#/interfaces@13"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfZeroOrMorePostfix","returnType":{"$ref":"#/interfaces@14"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOneOrMorePostfix","returnType":{"$ref":"#/interfaces@15"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfExceptionPostfix","returnType":{"$ref":"#/interfaces@16"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"except","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadEbnf","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfTerm","attributes":[{"$type":"TypeAttribute","name":"base","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false},{"$type":"TypeAttribute","name":"postfixes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfPostfix","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfNonTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfSpecial","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptional","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfRepetition","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptionalPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfZeroOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfOneOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfExceptionPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"except","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadEbnfGrammarGrammar"),Az=Mn(()=>oz??(oz=pP('{"$type":"Grammar","isDeclared":true,"name":"RailroadGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"RR_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Railroad","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","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":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadExpression","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSequenceExpr","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"sequence"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadChoiceExpr","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"choice"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOptionalExpr","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"optional"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOneOrMoreExpr","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"oneOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadZeroOrMoreExpr","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"zeroOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadTerminalExpr","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"terminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadNonTerminalExpr","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"nonterminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSpecialExpr","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"special"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"Railroad","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadExpression","attributes":[],"superTypes":[]},{"$type":"Interface","name":"RailroadSequenceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadChoiceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOptionalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOneOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadZeroOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadNonTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadSpecialExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadGrammarGrammar"),Cz=Mn(()=>lz??(lz=pP('{"$type":"Grammar","isDeclared":true,"name":"RailroadPegGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/#[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadPeg","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-peg-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","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":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"<-"},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegOrderedChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrefix","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"&"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"!"}}],"cardinality":"?"},{"$type":"Assignment","feature":"suffix","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSuffix","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrimary","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegLiteral","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegIdentifier","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegAny","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Assignment","feature":"dot","operator":"=","terminal":{"$type":"Keyword","value":"."}},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadPeg","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegOrderedChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegPrefix","attributes":[{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"suffix","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSuffix","attributes":[{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}},"isOptional":false},{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"PegPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"PegLiteral","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegIdentifier","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegGroup","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"PegAny","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"dot","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadPegGrammarGrammar"),Sz=Mn(()=>uz??(uz=pP('{"$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"),kz=Mn(()=>cz??(cz=pP('{"$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@14"},"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":"CLASS_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+:::[ \\\\t]*[A-Za-z_][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ICON_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+icon\\\\([\\\\w-]*(?::[\\\\w-]+)?\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DESC_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+##[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"QUOTED_NAME","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","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":"TerminalRule","name":"BARE_NAME","definition":{"$type":"RegexToken","regex":"/(?!:::|icon\\\\(|##)[^ \\\\t\\\\n\\\\r\\"\'](?:(?![ \\\\t]+:::[ \\\\t]*[A-Za-z_]|[ \\\\t]+icon\\\\(|[ \\\\t]+##)[^\\\\n\\\\r])*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"classAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"iconAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"descAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"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 *\\n * Supports both quoted labels (\\"my file\\") and bare labels (index.js).\\n * Annotations (:::class, icon(), ## description) are parsed directly into\\n * AST fields by the grammar. Value conversion for stripping quotes, extracting\\n * class names, icon names, and description text happens in valueConverter.ts.\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treeView keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}')),"TreeViewGrammarGrammar"),xz=Mn(()=>pz??(pz=pP('{"$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":"--\x3e"},"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},{"$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"),wz={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Nz={languageId:"cynefin",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},_z={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Iz={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Pz={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Oz={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Lz={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Dz={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Mz={languageId:"railroadAbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},jz={languageId:"railroadEbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Fz={languageId:"railroad",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Gz={languageId:"railroadPeg",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},zz={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Kz={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},qz={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Uz={AstReflection:Mn(()=>new dz,"AstReflection")},Bz={Grammar:Mn(()=>mz(),"Grammar"),LanguageMetaData:Mn(()=>wz,"LanguageMetaData"),parser:{}},Vz={Grammar:Mn(()=>hz(),"Grammar"),LanguageMetaData:Mn(()=>Nz,"LanguageMetaData"),parser:{}},Wz={Grammar:Mn(()=>yz(),"Grammar"),LanguageMetaData:Mn(()=>_z,"LanguageMetaData"),parser:{}},Hz={Grammar:Mn(()=>gz(),"Grammar"),LanguageMetaData:Mn(()=>Iz,"LanguageMetaData"),parser:{}},Yz={Grammar:Mn(()=>vz(),"Grammar"),LanguageMetaData:Mn(()=>Pz,"LanguageMetaData"),parser:{}},Xz={Grammar:Mn(()=>Tz(),"Grammar"),LanguageMetaData:Mn(()=>Oz,"LanguageMetaData"),parser:{}},Zz={Grammar:Mn(()=>$z(),"Grammar"),LanguageMetaData:Mn(()=>Lz,"LanguageMetaData"),parser:{}},Jz={Grammar:Mn(()=>Rz(),"Grammar"),LanguageMetaData:Mn(()=>Dz,"LanguageMetaData"),parser:{}},Qz={Grammar:Mn(()=>Ez(),"Grammar"),LanguageMetaData:Mn(()=>Mz,"LanguageMetaData"),parser:{}},eK={Grammar:Mn(()=>bz(),"Grammar"),LanguageMetaData:Mn(()=>jz,"LanguageMetaData"),parser:{}},tK={Grammar:Mn(()=>Az(),"Grammar"),LanguageMetaData:Mn(()=>Fz,"LanguageMetaData"),parser:{}},rK={Grammar:Mn(()=>Cz(),"Grammar"),LanguageMetaData:Mn(()=>Gz,"LanguageMetaData"),parser:{}},nK={Grammar:Mn(()=>Sz(),"Grammar"),LanguageMetaData:Mn(()=>zz,"LanguageMetaData"),parser:{}},aK={Grammar:Mn(()=>kz(),"Grammar"),LanguageMetaData:Mn(()=>Kz,"LanguageMetaData"),parser:{}},iK={Grammar:Mn(()=>xz(),"Grammar"),LanguageMetaData:Mn(()=>qz,"LanguageMetaData"),parser:{}},sK={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},oK=(Mn(Rt=class extends KN{runConverter(e,t,r){let n=this.runCommonConverter(e,t,r);return void 0===n&&(n=this.runCustomConverter(e,t,r)),void 0===n?super.runConverter(e,t,r):n}runCommonConverter(e,t,r){const n=sK[e.name];if(void 0===n)return;const a=n.exec(t);return null!==a?void 0!==a[1]?a[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==a[2]?a[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},"AbstractMermaidValueConverter"),Rt),lK=(Mn(Et=class extends oK{runCustomConverter(e,t,r){}},"CommonValueConverter"),Et),uK=(Mn(bt=class extends zN{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){const n=super.buildKeywordTokens(e,t,r);return n.forEach(e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}},"AbstractMermaidTokenBuilder"),bt);Mn(class extends uK{},"CommonTokenBuilder");
2
2
  /*! Bundled license information:
3
3
 
4
4
  lodash-es/lodash.js: