@wandox/sdk 0.1.0

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 (114) hide show
  1. package/README.md +59 -0
  2. package/dist/arc-BJMRTG9S.cjs +1 -0
  3. package/dist/arc-Vdco0qfw.js +83 -0
  4. package/dist/architectureDiagram-3BPJPVTR-BjEqcvey.js +4695 -0
  5. package/dist/architectureDiagram-3BPJPVTR-BvjJfAkh.cjs +36 -0
  6. package/dist/blockDiagram-GPEHLZMM-B1xf7RE9.js +2427 -0
  7. package/dist/blockDiagram-GPEHLZMM-B5VqovGY.cjs +132 -0
  8. package/dist/c4Diagram-AAUBKEIU-C4kjMRea.js +1578 -0
  9. package/dist/c4Diagram-AAUBKEIU-Ck5uEnJI.cjs +10 -0
  10. package/dist/channel-DlRtLuYv.js +5 -0
  11. package/dist/channel-Dm_yrRYJ.cjs +1 -0
  12. package/dist/chunk-2J33WTMH-CG2n_n4y.cjs +1 -0
  13. package/dist/chunk-2J33WTMH-CWvmGb4H.js +20 -0
  14. package/dist/chunk-4BX2VUAB-Bq3GzsD8.js +9 -0
  15. package/dist/chunk-4BX2VUAB-CdMctZeT.cjs +1 -0
  16. package/dist/chunk-55IACEB6-BdJhzL0d.js +8 -0
  17. package/dist/chunk-55IACEB6-sHyHtvg8.cjs +1 -0
  18. package/dist/chunk-727SXJPM-D-Vmam30.cjs +206 -0
  19. package/dist/chunk-727SXJPM-DmruCqjM.js +1529 -0
  20. package/dist/chunk-AQP2D5EJ-CWhKjcV3.cjs +231 -0
  21. package/dist/chunk-AQP2D5EJ-Ca0ak6w7.js +1399 -0
  22. package/dist/chunk-FMBD7UC4-CqV0NWQQ.js +19 -0
  23. package/dist/chunk-FMBD7UC4-DOxtd0OO.cjs +15 -0
  24. package/dist/chunk-ND2GUHAM-6EMX5Mu8.js +68 -0
  25. package/dist/chunk-ND2GUHAM-BXeDBtSC.cjs +1 -0
  26. package/dist/chunk-QZHKN3VN-B7FSI55w.js +15 -0
  27. package/dist/chunk-QZHKN3VN-CbbdNKnD.cjs +1 -0
  28. package/dist/classDiagram-4FO5ZUOK-0Kaf7WfA.js +16 -0
  29. package/dist/classDiagram-4FO5ZUOK-C4it2xBI.cjs +1 -0
  30. package/dist/classDiagram-v2-Q7XG4LA2-Byom5adL.js +16 -0
  31. package/dist/classDiagram-v2-Q7XG4LA2-C4it2xBI.cjs +1 -0
  32. package/dist/cose-bilkent-S5V4N54A-CuUv9oIm.js +2606 -0
  33. package/dist/cose-bilkent-S5V4N54A-Dh6nTopA.cjs +1 -0
  34. package/dist/cytoscape.esm-Cp8cXbK2.js +18729 -0
  35. package/dist/cytoscape.esm-fcqEUasK.cjs +331 -0
  36. package/dist/dagre-BM42HDAG-CwxJjZ2n.cjs +4 -0
  37. package/dist/dagre-BM42HDAG-DMBidMxP.js +448 -0
  38. package/dist/defaultLocale-BDVPUiG2.js +171 -0
  39. package/dist/defaultLocale-k2G_58r6.cjs +1 -0
  40. package/dist/diagram-2AECGRRQ-B2a4nXgJ.js +221 -0
  41. package/dist/diagram-2AECGRRQ-r7De7taS.cjs +43 -0
  42. package/dist/diagram-5GNKFQAL-CDiO79WC.cjs +10 -0
  43. package/dist/diagram-5GNKFQAL-DrHBNZzF.js +123 -0
  44. package/dist/diagram-KO2AKTUF-BcjWCXZr.js +466 -0
  45. package/dist/diagram-KO2AKTUF-CDlJCxVO.cjs +3 -0
  46. package/dist/diagram-LMA3HP47-BXFSAyNV.cjs +24 -0
  47. package/dist/diagram-LMA3HP47-DJxmyqn0.js +143 -0
  48. package/dist/diagram-OG6HWLK6-ATK__ca8.js +531 -0
  49. package/dist/diagram-OG6HWLK6-CgIyEO8_.cjs +24 -0
  50. package/dist/erDiagram-TEJ5UH35-D4baWNzQ.js +900 -0
  51. package/dist/erDiagram-TEJ5UH35-Dyuc5EB6.cjs +85 -0
  52. package/dist/flowDiagram-I6XJVG4X-BMZOncyU.js +1635 -0
  53. package/dist/flowDiagram-I6XJVG4X-C45fICr4.cjs +162 -0
  54. package/dist/ganttDiagram-6RSMTGT7-CiYZmmke.js +2526 -0
  55. package/dist/ganttDiagram-6RSMTGT7-Cxoj6IK8.cjs +292 -0
  56. package/dist/gitGraphDiagram-PVQCEYII-CQ9bNuwN.js +828 -0
  57. package/dist/gitGraphDiagram-PVQCEYII-rlaY9dfj.cjs +106 -0
  58. package/dist/graph-CBizzZ7K.js +1545 -0
  59. package/dist/graph-V5BNIbHU.cjs +1 -0
  60. package/dist/index-jBRold1l.js +173159 -0
  61. package/dist/index-sFrjovbM.cjs +804 -0
  62. package/dist/index.d.ts +54 -0
  63. package/dist/infoDiagram-5YYISTIA-CAzYIvUX.js +24 -0
  64. package/dist/infoDiagram-5YYISTIA-zX5rQglQ.cjs +2 -0
  65. package/dist/init-CHZsXQcr.cjs +1 -0
  66. package/dist/init-DjUOC4st.js +16 -0
  67. package/dist/ishikawaDiagram-YF4QCWOH-09prKBsn.cjs +70 -0
  68. package/dist/ishikawaDiagram-YF4QCWOH-Co8BnN24.js +622 -0
  69. package/dist/journeyDiagram-JHISSGLW-DkdWRF_-.cjs +139 -0
  70. package/dist/journeyDiagram-JHISSGLW-riCLiMCC.js +836 -0
  71. package/dist/kanban-definition-UN3LZRKU-DWipOCsx.cjs +89 -0
  72. package/dist/kanban-definition-UN3LZRKU-SRyCSn2H.js +725 -0
  73. package/dist/katex-Cf_UVKIT.cjs +257 -0
  74. package/dist/katex-RNjvZ8pg.js +11681 -0
  75. package/dist/layout-CbksXFOD.js +1728 -0
  76. package/dist/layout-Dh52gsIJ.cjs +1 -0
  77. package/dist/linear-C3xSMJV8.cjs +1 -0
  78. package/dist/linear-CmUCzX9U.js +259 -0
  79. package/dist/mermaid.core-BzNKr-OJ.cjs +308 -0
  80. package/dist/mermaid.core-CdBIz6FY.js +15475 -0
  81. package/dist/mindmap-definition-RKZ34NQL-Cs63oyIX.cjs +96 -0
  82. package/dist/mindmap-definition-RKZ34NQL-Gcma5iTd.js +830 -0
  83. package/dist/ordinal-CagbB1m8.cjs +1 -0
  84. package/dist/ordinal-DfAQgscy.js +61 -0
  85. package/dist/pieDiagram-4H26LBE5-CBGkD8dp.cjs +30 -0
  86. package/dist/pieDiagram-4H26LBE5-DSL8cVK1.js +164 -0
  87. package/dist/quadrantDiagram-W4KKPZXB-D3nCWRjF.cjs +7 -0
  88. package/dist/quadrantDiagram-W4KKPZXB-uod6bhUy.js +1026 -0
  89. package/dist/requirementDiagram-4Y6WPE33-Bc_6y7SM.js +884 -0
  90. package/dist/requirementDiagram-4Y6WPE33-D2mHlh5i.cjs +84 -0
  91. package/dist/sankeyDiagram-5OEKKPKP-DL_kXejW.cjs +40 -0
  92. package/dist/sankeyDiagram-5OEKKPKP-DMsjY4G4.js +847 -0
  93. package/dist/sequenceDiagram-3UESZ5HK-CBGalGOV.cjs +162 -0
  94. package/dist/sequenceDiagram-3UESZ5HK-CH2Z-Pis.js +2901 -0
  95. package/dist/stateDiagram-AJRCARHV-gEqlAI6t.js +263 -0
  96. package/dist/stateDiagram-AJRCARHV-rNMrAI-A.cjs +1 -0
  97. package/dist/stateDiagram-v2-BHNVJYJU-CDj7L1wi.js +16 -0
  98. package/dist/stateDiagram-v2-BHNVJYJU-LLlFJ1GM.cjs +1 -0
  99. package/dist/timeline-definition-PNZ67QCA-Bbuv3uu-.cjs +120 -0
  100. package/dist/timeline-definition-PNZ67QCA-DrGFbQdC.js +1068 -0
  101. package/dist/types.d.ts +295 -0
  102. package/dist/vennDiagram-CIIHVFJN-CGcAwVxU.js +1564 -0
  103. package/dist/vennDiagram-CIIHVFJN-DsSjXluJ.cjs +34 -0
  104. package/dist/wandox.cjs +1 -0
  105. package/dist/wandox.css +1 -0
  106. package/dist/wandox.js +6 -0
  107. package/dist/wandox.umd.js +4172 -0
  108. package/dist/wardley-L42UT6IY-DUnkyH_z.js +22539 -0
  109. package/dist/wardley-L42UT6IY-tDp0NbFW.cjs +165 -0
  110. package/dist/wardleyDiagram-YWT4CUSO-CB_Qa4lR.js +684 -0
  111. package/dist/wardleyDiagram-YWT4CUSO-D0BUmvVW.cjs +78 -0
  112. package/dist/xychartDiagram-2RQKCTM6-Bcq-ACuw.js +1342 -0
  113. package/dist/xychartDiagram-2RQKCTM6-BjeAPKLo.cjs +7 -0
  114. package/package.json +42 -0
@@ -0,0 +1,165 @@
1
+ "use strict";var LN=Object.defineProperty;var DN=(t,e,r)=>e in t?LN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Gr=(t,e,r)=>DN(t,typeof e!="symbol"?e+"":e,r);var MN=Object.create,pc=Object.defineProperty,xN=Object.getOwnPropertyDescriptor,Mh=Object.getOwnPropertyNames,FN=Object.getPrototypeOf,GN=Object.prototype.hasOwnProperty,s=(t,e)=>pc(t,"name",{value:e,configurable:!0}),jN=(t,e)=>function(){return t&&(e=(0,t[Mh(t)[0]])(t=0)),e},Y=(t,e)=>function(){return e||(0,t[Mh(t)[0]])((e={exports:{}}).exports,e),e.exports},Zr=(t,e)=>{for(var r in e)pc(t,r,{get:e[r],enumerable:!0})},xh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Mh(e))!GN.call(t,a)&&a!==r&&pc(t,a,{get:()=>e[a],enumerable:!(n=xN(e,a))||n.enumerable});return t},cf=(t,e,r)=>(xh(t,e,"default"),r),Fh=(t,e,r)=>(r=t!=null?MN(FN(t)):{},xh(pc(r,"default",{value:t,enumerable:!0}),t)),Gh=t=>xh(pc({},"__esModule",{value:!0}),t),uf={};Zr(uf,{AnnotatedTextEdit:()=>vr,ChangeAnnotation:()=>un,ChangeAnnotationIdentifier:()=>Xe,CodeAction:()=>$p,CodeActionContext:()=>Rp,CodeActionKind:()=>Tp,CodeActionTriggerKind:()=>Il,CodeDescription:()=>Jd,CodeLens:()=>Ap,Color:()=>tu,ColorInformation:()=>qd,ColorPresentation:()=>Wd,Command:()=>cn,CompletionItem:()=>op,CompletionItemKind:()=>tp,CompletionItemLabelDetails:()=>sp,CompletionItemTag:()=>np,CompletionList:()=>lp,CreateFile:()=>Ta,DeleteFile:()=>$a,Diagnostic:()=>Cl,DiagnosticRelatedInformation:()=>ru,DiagnosticSeverity:()=>Yd,DiagnosticTag:()=>Xd,DocumentHighlight:()=>pp,DocumentHighlightKind:()=>dp,DocumentLink:()=>_p,DocumentSymbol:()=>vp,DocumentUri:()=>zd,EOL:()=>dT,FoldingRange:()=>Hd,FoldingRangeKind:()=>Vd,FormattingOptions:()=>Ep,Hover:()=>cp,InlayHint:()=>Op,InlayHintKind:()=>iu,InlayHintLabelPart:()=>su,InlineCompletionContext:()=>Gp,InlineCompletionItem:()=>Dp,InlineCompletionList:()=>Mp,InlineCompletionTriggerKind:()=>xp,InlineValueContext:()=>Pp,InlineValueEvaluatableExpression:()=>kp,InlineValueText:()=>Ip,InlineValueVariableLookup:()=>Np,InsertReplaceEdit:()=>ap,InsertTextFormat:()=>rp,InsertTextMode:()=>ip,Location:()=>_l,LocationLink:()=>Kd,MarkedString:()=>wl,MarkupContent:()=>Aa,MarkupKind:()=>au,OptionalVersionedTextDocumentIdentifier:()=>bl,ParameterInformation:()=>up,Position:()=>ie,Range:()=>ee,RenameFile:()=>Ra,SelectedCompletionInfo:()=>Fp,SelectionRange:()=>Cp,SemanticTokenModifiers:()=>bp,SemanticTokenTypes:()=>Sp,SemanticTokens:()=>wp,SignatureInformation:()=>fp,StringValue:()=>Lp,SymbolInformation:()=>gp,SymbolKind:()=>hp,SymbolTag:()=>mp,TextDocument:()=>Up,TextDocumentEdit:()=>Sl,TextDocumentIdentifier:()=>Zd,TextDocumentItem:()=>ep,TextEdit:()=>tr,URI:()=>eu,VersionedTextDocumentIdentifier:()=>Qd,WorkspaceChange:()=>fT,WorkspaceEdit:()=>nu,WorkspaceFolder:()=>jp,WorkspaceSymbol:()=>yp,integer:()=>Bd,uinteger:()=>El});var zd,eu,Bd,El,ie,ee,_l,Kd,tu,qd,Wd,Vd,Hd,ru,Yd,Xd,Jd,Cl,cn,tr,un,Xe,vr,Sl,Ta,Ra,$a,nu,pl,Td,fT,Zd,Qd,bl,ep,au,Aa,tp,rp,np,ap,ip,sp,op,lp,wl,cp,up,fp,dp,pp,hp,mp,gp,yp,vp,Tp,Il,Rp,$p,Ap,Ep,_p,Cp,Sp,bp,wp,Ip,Np,kp,Pp,iu,su,Op,Lp,Dp,Mp,xp,Fp,Gp,jp,dT,Up,$y,_,hc=jN({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(zd||(zd={})),function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i}(eu||(eu={})),function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(Bd||(Bd={})),function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(El||(El={})),function(a){function i(c,l){return c===Number.MAX_VALUE&&(c=El.MAX_VALUE),l===Number.MAX_VALUE&&(l=El.MAX_VALUE),{line:c,character:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&_.uinteger(l.line)&&_.uinteger(l.character)}s(o,"is"),a.is=o}(ie||(ie={})),function(a){function i(c,l,u,f){if(_.uinteger(c)&&_.uinteger(l)&&_.uinteger(u)&&_.uinteger(f))return{start:ie.create(c,l),end:ie.create(u,f)};if(ie.is(c)&&ie.is(l))return{start:c,end:l};throw new Error(`Range#create called with invalid arguments[${c}, ${l}, ${u}, ${f}]`)}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ie.is(l.start)&&ie.is(l.end)}s(o,"is"),a.is=o}(ee||(ee={})),function(a){function i(c,l){return{uri:c,range:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(_.string(l.uri)||_.undefined(l.uri))}s(o,"is"),a.is=o}(_l||(_l={})),function(a){function i(c,l,u,f){return{targetUri:c,targetRange:l,targetSelectionRange:u,originSelectionRange:f}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.targetRange)&&_.string(l.targetUri)&&ee.is(l.targetSelectionRange)&&(ee.is(l.originSelectionRange)||_.undefined(l.originSelectionRange))}s(o,"is"),a.is=o}(Kd||(Kd={})),function(a){function i(c,l,u,f){return{red:c,green:l,blue:u,alpha:f}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.numberRange(l.red,0,1)&&_.numberRange(l.green,0,1)&&_.numberRange(l.blue,0,1)&&_.numberRange(l.alpha,0,1)}s(o,"is"),a.is=o}(tu||(tu={})),function(a){function i(c,l){return{range:c,color:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ee.is(l.range)&&tu.is(l.color)}s(o,"is"),a.is=o}(qd||(qd={})),function(a){function i(c,l,u){return{label:c,textEdit:l,additionalTextEdits:u}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.string(l.label)&&(_.undefined(l.textEdit)||tr.is(l))&&(_.undefined(l.additionalTextEdits)||_.typedArray(l.additionalTextEdits,tr.is))}s(o,"is"),a.is=o}(Wd||(Wd={})),function(a){a.Comment="comment",a.Imports="imports",a.Region="region"}(Vd||(Vd={})),function(a){function i(c,l,u,f,d,p){const m={startLine:c,endLine:l};return _.defined(u)&&(m.startCharacter=u),_.defined(f)&&(m.endCharacter=f),_.defined(d)&&(m.kind=d),_.defined(p)&&(m.collapsedText=p),m}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.uinteger(l.startLine)&&_.uinteger(l.startLine)&&(_.undefined(l.startCharacter)||_.uinteger(l.startCharacter))&&(_.undefined(l.endCharacter)||_.uinteger(l.endCharacter))&&(_.undefined(l.kind)||_.string(l.kind))}s(o,"is"),a.is=o}(Hd||(Hd={})),function(a){function i(c,l){return{location:c,message:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_l.is(l.location)&&_.string(l.message)}s(o,"is"),a.is=o}(ru||(ru={})),function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4}(Yd||(Yd={})),function(a){a.Unnecessary=1,a.Deprecated=2}(Xd||(Xd={})),function(a){function i(o){const c=o;return _.objectLiteral(c)&&_.string(c.href)}s(i,"is"),a.is=i}(Jd||(Jd={})),function(a){function i(c,l,u,f,d,p){let m={range:c,message:l};return _.defined(u)&&(m.severity=u),_.defined(f)&&(m.code=f),_.defined(d)&&(m.source=d),_.defined(p)&&(m.relatedInformation=p),m}s(i,"create"),a.create=i;function o(c){var l;let u=c;return _.defined(u)&&ee.is(u.range)&&_.string(u.message)&&(_.number(u.severity)||_.undefined(u.severity))&&(_.integer(u.code)||_.string(u.code)||_.undefined(u.code))&&(_.undefined(u.codeDescription)||_.string((l=u.codeDescription)===null||l===void 0?void 0:l.href))&&(_.string(u.source)||_.undefined(u.source))&&(_.undefined(u.relatedInformation)||_.typedArray(u.relatedInformation,ru.is))}s(o,"is"),a.is=o}(Cl||(Cl={})),function(a){function i(c,l,...u){let f={title:c,command:l};return _.defined(u)&&u.length>0&&(f.arguments=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.title)&&_.string(l.command)}s(o,"is"),a.is=o}(cn||(cn={})),function(a){function i(u,f){return{range:u,newText:f}}s(i,"replace"),a.replace=i;function o(u,f){return{range:{start:u,end:u},newText:f}}s(o,"insert"),a.insert=o;function c(u){return{range:u,newText:""}}s(c,"del"),a.del=c;function l(u){const f=u;return _.objectLiteral(f)&&_.string(f.newText)&&ee.is(f.range)}s(l,"is"),a.is=l}(tr||(tr={})),function(a){function i(c,l,u){const f={label:c};return l!==void 0&&(f.needsConfirmation=l),u!==void 0&&(f.description=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.string(l.label)&&(_.boolean(l.needsConfirmation)||l.needsConfirmation===void 0)&&(_.string(l.description)||l.description===void 0)}s(o,"is"),a.is=o}(un||(un={})),function(a){function i(o){const c=o;return _.string(c)}s(i,"is"),a.is=i}(Xe||(Xe={})),function(a){function i(u,f,d){return{range:u,newText:f,annotationId:d}}s(i,"replace"),a.replace=i;function o(u,f,d){return{range:{start:u,end:u},newText:f,annotationId:d}}s(o,"insert"),a.insert=o;function c(u,f){return{range:u,newText:"",annotationId:f}}s(c,"del"),a.del=c;function l(u){const f=u;return tr.is(f)&&(un.is(f.annotationId)||Xe.is(f.annotationId))}s(l,"is"),a.is=l}(vr||(vr={})),function(a){function i(c,l){return{textDocument:c,edits:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&bl.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o}(Sl||(Sl={})),function(a){function i(c,l,u){let f={kind:"create",uri:c};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="create"&&_.string(l.uri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o}(Ta||(Ta={})),function(a){function i(c,l,u,f){let d={kind:"rename",oldUri:c,newUri:l};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(d.options=u),f!==void 0&&(d.annotationId=f),d}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="rename"&&_.string(l.oldUri)&&_.string(l.newUri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o}(Ra||(Ra={})),function(a){function i(c,l,u){let f={kind:"delete",uri:c};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="delete"&&_.string(l.uri)&&(l.options===void 0||(l.options.recursive===void 0||_.boolean(l.options.recursive))&&(l.options.ignoreIfNotExists===void 0||_.boolean(l.options.ignoreIfNotExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o}($a||($a={})),function(a){function i(o){let c=o;return c&&(c.changes!==void 0||c.documentChanges!==void 0)&&(c.documentChanges===void 0||c.documentChanges.every(l=>_.string(l.kind)?Ta.is(l)||Ra.is(l)||$a.is(l):Sl.is(l)))}s(i,"is"),a.is=i}(nu||(nu={})),pl=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,c){let l,u;if(c===void 0?l=tr.insert(i,o):Xe.is(c)?(u=c,l=vr.insert(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=vr.insert(i,o,u)),this.edits.push(l),u!==void 0)return u}replace(i,o,c){let l,u;if(c===void 0?l=tr.replace(i,o):Xe.is(c)?(u=c,l=vr.replace(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=vr.replace(i,o,u)),this.edits.push(l),u!==void 0)return u}delete(i,o){let c,l;if(o===void 0?c=tr.del(i):Xe.is(o)?(l=o,c=vr.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),c=vr.del(i,l)),this.edits.push(c),l!==void 0)return l}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},s(t,"TextEditChangeImpl"),t),Td=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,o){let c;if(Xe.is(i)?c=i:(c=this.nextId(),o=i),this._annotations[c]!==void 0)throw new Error(`Id ${c} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${c}`);return this._annotations[c]=o,this._size++,c}nextId(){return this._counter++,this._counter.toString()}},s(e,"ChangeAnnotations"),e),fT=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new Td(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(Sl.is(o)){const c=new pl(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=c}})):i.changes&&Object.keys(i.changes).forEach(o=>{const c=new pl(i.changes[o]);this._textEditChanges[o]=c})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(i){if(bl.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const o={uri:i.uri,version:i.version};let c=this._textEditChanges[o.uri];if(!c){const l=[],u={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(u),c=new pl(l,this._changeAnnotations),this._textEditChanges[o.uri]=c}return c}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let o=this._textEditChanges[i];if(!o){let c=[];this._workspaceEdit.changes[i]=c,o=new pl(c),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Td,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;un.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Ta.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=Ta.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}renameFile(i,o,c,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let u;un.is(c)||Xe.is(c)?u=c:l=c;let f,d;if(u===void 0?f=Ra.create(i,o,l):(d=Xe.is(u)?u:this._changeAnnotations.manage(u),f=Ra.create(i,o,l,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d}deleteFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;un.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=$a.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=$a.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}},s(r,"WorkspaceChange"),r),function(a){function i(c){return{uri:c}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)}s(o,"is"),a.is=o}(Zd||(Zd={})),function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.integer(l.version)}s(o,"is"),a.is=o}(Qd||(Qd={})),function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&(l.version===null||_.integer(l.version))}s(o,"is"),a.is=o}(bl||(bl={})),function(a){function i(c,l,u,f){return{uri:c,languageId:l,version:u,text:f}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.string(l.languageId)&&_.integer(l.version)&&_.string(l.text)}s(o,"is"),a.is=o}(ep||(ep={})),function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const c=o;return c===a.PlainText||c===a.Markdown}s(i,"is"),a.is=i}(au||(au={})),function(a){function i(o){const c=o;return _.objectLiteral(o)&&au.is(c.kind)&&_.string(c.value)}s(i,"is"),a.is=i}(Aa||(Aa={})),function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25}(tp||(tp={})),function(a){a.PlainText=1,a.Snippet=2}(rp||(rp={})),function(a){a.Deprecated=1}(np||(np={})),function(a){function i(c,l,u){return{newText:c,insert:l,replace:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l&&_.string(l.newText)&&ee.is(l.insert)&&ee.is(l.replace)}s(o,"is"),a.is=o}(ap||(ap={})),function(a){a.asIs=1,a.adjustIndentation=2}(ip||(ip={})),function(a){function i(o){const c=o;return c&&(_.string(c.detail)||c.detail===void 0)&&(_.string(c.description)||c.description===void 0)}s(i,"is"),a.is=i}(sp||(sp={})),function(a){function i(o){return{label:o}}s(i,"create"),a.create=i}(op||(op={})),function(a){function i(o,c){return{items:o||[],isIncomplete:!!c}}s(i,"create"),a.create=i}(lp||(lp={})),function(a){function i(c){return c.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(c){const l=c;return _.string(l)||_.objectLiteral(l)&&_.string(l.language)&&_.string(l.value)}s(o,"is"),a.is=o}(wl||(wl={})),function(a){function i(o){let c=o;return!!c&&_.objectLiteral(c)&&(Aa.is(c.contents)||wl.is(c.contents)||_.typedArray(c.contents,wl.is))&&(o.range===void 0||ee.is(o.range))}s(i,"is"),a.is=i}(cp||(cp={})),function(a){function i(o,c){return c?{label:o,documentation:c}:{label:o}}s(i,"create"),a.create=i}(up||(up={})),function(a){function i(o,c,...l){let u={label:o};return _.defined(c)&&(u.documentation=c),_.defined(l)?u.parameters=l:u.parameters=[],u}s(i,"create"),a.create=i}(fp||(fp={})),function(a){a.Text=1,a.Read=2,a.Write=3}(dp||(dp={})),function(a){function i(o,c){let l={range:o};return _.number(c)&&(l.kind=c),l}s(i,"create"),a.create=i}(pp||(pp={})),function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26}(hp||(hp={})),function(a){a.Deprecated=1}(mp||(mp={})),function(a){function i(o,c,l,u,f){let d={name:o,kind:c,location:{uri:u,range:l}};return f&&(d.containerName=f),d}s(i,"create"),a.create=i}(gp||(gp={})),function(a){function i(o,c,l,u){return u!==void 0?{name:o,kind:c,location:{uri:l,range:u}}:{name:o,kind:c,location:{uri:l}}}s(i,"create"),a.create=i}(yp||(yp={})),function(a){function i(c,l,u,f,d,p){let m={name:c,detail:l,kind:u,range:f,selectionRange:d};return p!==void 0&&(m.children=p),m}s(i,"create"),a.create=i;function o(c){let l=c;return l&&_.string(l.name)&&_.number(l.kind)&&ee.is(l.range)&&ee.is(l.selectionRange)&&(l.detail===void 0||_.string(l.detail))&&(l.deprecated===void 0||_.boolean(l.deprecated))&&(l.children===void 0||Array.isArray(l.children))&&(l.tags===void 0||Array.isArray(l.tags))}s(o,"is"),a.is=o}(vp||(vp={})),function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"}(Tp||(Tp={})),function(a){a.Invoked=1,a.Automatic=2}(Il||(Il={})),function(a){function i(c,l,u){let f={diagnostics:c};return l!=null&&(f.only=l),u!=null&&(f.triggerKind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.typedArray(l.diagnostics,Cl.is)&&(l.only===void 0||_.typedArray(l.only,_.string))&&(l.triggerKind===void 0||l.triggerKind===Il.Invoked||l.triggerKind===Il.Automatic)}s(o,"is"),a.is=o}(Rp||(Rp={})),function(a){function i(c,l,u){let f={title:c},d=!0;return typeof l=="string"?(d=!1,f.kind=l):cn.is(l)?f.command=l:f.edit=l,d&&u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&_.string(l.title)&&(l.diagnostics===void 0||_.typedArray(l.diagnostics,Cl.is))&&(l.kind===void 0||_.string(l.kind))&&(l.edit!==void 0||l.command!==void 0)&&(l.command===void 0||cn.is(l.command))&&(l.isPreferred===void 0||_.boolean(l.isPreferred))&&(l.edit===void 0||nu.is(l.edit))}s(o,"is"),a.is=o}($p||($p={})),function(a){function i(c,l){let u={range:c};return _.defined(l)&&(u.data=l),u}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.command)||cn.is(l.command))}s(o,"is"),a.is=o}(Ap||(Ap={})),function(a){function i(c,l){return{tabSize:c,insertSpaces:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.uinteger(l.tabSize)&&_.boolean(l.insertSpaces)}s(o,"is"),a.is=o}(Ep||(Ep={})),function(a){function i(c,l,u){return{range:c,target:l,data:u}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.target)||_.string(l.target))}s(o,"is"),a.is=o}(_p||(_p={})),function(a){function i(c,l){return{range:c,parent:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o}(Cp||(Cp={})),function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"}(Sp||(Sp={})),function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"}(bp||(bp={})),function(a){function i(o){const c=o;return _.objectLiteral(c)&&(c.resultId===void 0||typeof c.resultId=="string")&&Array.isArray(c.data)&&(c.data.length===0||typeof c.data[0]=="number")}s(i,"is"),a.is=i}(wp||(wp={})),function(a){function i(c,l){return{range:c,text:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.string(l.text)}s(o,"is"),a.is=o}(Ip||(Ip={})),function(a){function i(c,l,u){return{range:c,variableName:l,caseSensitiveLookup:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.boolean(l.caseSensitiveLookup)&&(_.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o}(Np||(Np={})),function(a){function i(c,l){return{range:c,expression:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&(_.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o}(kp||(kp={})),function(a){function i(c,l){return{frameId:c,stoppedLocation:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.defined(l)&&ee.is(c.stoppedLocation)}s(o,"is"),a.is=o}(Pp||(Pp={})),function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i}(iu||(iu={})),function(a){function i(c){return{value:c}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&(l.tooltip===void 0||_.string(l.tooltip)||Aa.is(l.tooltip))&&(l.location===void 0||_l.is(l.location))&&(l.command===void 0||cn.is(l.command))}s(o,"is"),a.is=o}(su||(su={})),function(a){function i(c,l,u){const f={position:c,label:l};return u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ie.is(l.position)&&(_.string(l.label)||_.typedArray(l.label,su.is))&&(l.kind===void 0||iu.is(l.kind))&&l.textEdits===void 0||_.typedArray(l.textEdits,tr.is)&&(l.tooltip===void 0||_.string(l.tooltip)||Aa.is(l.tooltip))&&(l.paddingLeft===void 0||_.boolean(l.paddingLeft))&&(l.paddingRight===void 0||_.boolean(l.paddingRight))}s(o,"is"),a.is=o}(Op||(Op={})),function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i}(Lp||(Lp={})),function(a){function i(o,c,l,u){return{insertText:o,filterText:c,range:l,command:u}}s(i,"create"),a.create=i}(Dp||(Dp={})),function(a){function i(o){return{items:o}}s(i,"create"),a.create=i}(Mp||(Mp={})),function(a){a.Invoked=0,a.Automatic=1}(xp||(xp={})),function(a){function i(o,c){return{range:o,text:c}}s(i,"create"),a.create=i}(Fp||(Fp={})),function(a){function i(o,c){return{triggerKind:o,selectedCompletionInfo:c}}s(i,"create"),a.create=i}(Gp||(Gp={})),function(a){function i(o){const c=o;return _.objectLiteral(c)&&eu.is(c.uri)&&_.string(c.name)}s(i,"is"),a.is=i}(jp||(jp={})),dT=[`
2
+ `,`\r
3
+ `,"\r"],function(a){function i(u,f,d,p){return new $y(u,f,d,p)}s(i,"create"),a.create=i;function o(u){let f=u;return!!(_.defined(f)&&_.string(f.uri)&&(_.undefined(f.languageId)||_.string(f.languageId))&&_.uinteger(f.lineCount)&&_.func(f.getText)&&_.func(f.positionAt)&&_.func(f.offsetAt))}s(o,"is"),a.is=o;function c(u,f){let d=u.getText(),p=l(f,(g,v)=>{let E=g.range.start.line-v.range.start.line;return E===0?g.range.start.character-v.range.start.character:E}),m=d.length;for(let g=p.length-1;g>=0;g--){let v=p[g],E=u.offsetAt(v.range.start),T=u.offsetAt(v.range.end);if(T<=m)d=d.substring(0,E)+v.newText+d.substring(T,d.length);else throw new Error("Overlapping edit");m=E}return d}s(c,"applyEdits"),a.applyEdits=c;function l(u,f){if(u.length<=1)return u;const d=u.length/2|0,p=u.slice(0,d),m=u.slice(d);l(p,f),l(m,f);let g=0,v=0,E=0;for(;g<p.length&&v<m.length;)f(p[g],m[v])<=0?u[E++]=p[g++]:u[E++]=m[v++];for(;g<p.length;)u[E++]=p[g++];for(;v<m.length;)u[E++]=m[v++];return u}s(l,"mergeSort")}(Up||(Up={})),$y=(n=class{constructor(i,o,c,l){this._uri=i,this._languageId=o,this._version=c,this._content=l,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(i){if(i){let o=this.offsetAt(i.start),c=this.offsetAt(i.end);return this._content.substring(o,c)}return this._content}update(i,o){this._content=i.text,this._version=o,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let i=[],o=this._content,c=!0;for(let l=0;l<o.length;l++){c&&(i.push(l),c=!1);let u=o.charAt(l);c=u==="\r"||u===`
4
+ `,u==="\r"&&l+1<o.length&&o.charAt(l+1)===`
5
+ `&&l++}c&&o.length>0&&i.push(o.length),this._lineOffsets=i}return this._lineOffsets}positionAt(i){i=Math.max(Math.min(i,this._content.length),0);let o=this.getLineOffsets(),c=0,l=o.length;if(l===0)return ie.create(0,i);for(;c<l;){let f=Math.floor((c+l)/2);o[f]>i?l=f:c=f+1}let u=c-1;return ie.create(u,i-o[u])}offsetAt(i){let o=this.getLineOffsets();if(i.line>=o.length)return this._content.length;if(i.line<0)return 0;let c=o[i.line],l=i.line+1<o.length?o[i.line+1]:this._content.length;return Math.max(Math.min(c+i.character,l),c)}get lineCount(){return this.getLineOffsets().length}},s(n,"FullTextDocument"),n),function(a){const i=Object.prototype.toString;function o(T){return typeof T<"u"}s(o,"defined"),a.defined=o;function c(T){return typeof T>"u"}s(c,"undefined"),a.undefined=c;function l(T){return T===!0||T===!1}s(l,"boolean"),a.boolean=l;function u(T){return i.call(T)==="[object String]"}s(u,"string"),a.string=u;function f(T){return i.call(T)==="[object Number]"}s(f,"number"),a.number=f;function d(T,w,C){return i.call(T)==="[object Number]"&&w<=T&&T<=C}s(d,"numberRange"),a.numberRange=d;function p(T){return i.call(T)==="[object Number]"&&-2147483648<=T&&T<=2147483647}s(p,"integer"),a.integer=p;function m(T){return i.call(T)==="[object Number]"&&0<=T&&T<=2147483647}s(m,"uinteger"),a.uinteger=m;function g(T){return i.call(T)==="[object Function]"}s(g,"func"),a.func=g;function v(T){return T!==null&&typeof T=="object"}s(v,"objectLiteral"),a.objectLiteral=v;function E(T,w){return Array.isArray(T)&&T.every(w)}s(E,"typedArray"),a.typedArray=E}(_||(_={}))}}),Un=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(t){Object.defineProperty(t,"__esModule",{value:!0});var e;function r(){if(e===void 0)throw new Error("No runtime abstraction layer installed");return e}s(r,"RAL"),function(n){function a(i){if(i===void 0)throw new Error("No runtime abstraction layer provided");e=i}s(a,"install"),n.install=a}(r||(r={})),t.default=r}}),mc=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0;function e(l){return l===!0||l===!1}s(e,"boolean"),t.boolean=e;function r(l){return typeof l=="string"||l instanceof String}s(r,"string"),t.string=r;function n(l){return typeof l=="number"||l instanceof Number}s(n,"number"),t.number=n;function a(l){return l instanceof Error}s(a,"error"),t.error=a;function i(l){return typeof l=="function"}s(i,"func"),t.func=i;function o(l){return Array.isArray(l)}s(o,"array"),t.array=o;function c(l){return o(l)&&l.every(u=>r(u))}s(c,"stringArray"),t.stringArray=c}}),Go=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(t){var i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var e=Un(),r;(function(c){const l={dispose(){}};c.None=function(){return l}})(r||(t.Event=r={}));var n=(i=class{add(l,u=null,f){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(l),this._contexts.push(u),Array.isArray(f)&&f.push({dispose:s(()=>this.remove(l,u),"dispose")})}remove(l,u=null){if(!this._callbacks)return;let f=!1;for(let d=0,p=this._callbacks.length;d<p;d++)if(this._callbacks[d]===l)if(this._contexts[d]===u){this._callbacks.splice(d,1),this._contexts.splice(d,1);return}else f=!0;if(f)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...l){if(!this._callbacks)return[];const u=[],f=this._callbacks.slice(0),d=this._contexts.slice(0);for(let p=0,m=f.length;p<m;p++)try{u.push(f[p].apply(d[p],l))}catch(g){(0,e.default)().console.error(g)}return u}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},s(i,"CallbackList"),i),a=(o=class{constructor(l){this._options=l}get event(){return this._event||(this._event=(l,u,f)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(l,u);const d={dispose:s(()=>{this._callbacks&&(this._callbacks.remove(l,u),d.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(f)&&f.push(d),d}),this._event}fire(l){this._callbacks&&this._callbacks.invoke.call(this._callbacks,l)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}},s(o,"Emitter"),o);t.Emitter=a,a._noop=function(){}}}),ff=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(t){var l,u;Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e=Un(),r=mc(),n=Go(),a;(function(f){f.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),f.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n.Event.None});function d(p){const m=p;return m&&(m===f.None||m===f.Cancelled||r.boolean(m.isCancellationRequested)&&!!m.onCancellationRequested)}s(d,"is"),f.is=d})(a||(t.CancellationToken=a={}));var i=Object.freeze(function(f,d){const p=(0,e.default)().timer.setTimeout(f.bind(d),0);return{dispose(){p.dispose()}}}),o=(l=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?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},s(l,"MutableToken"),l),c=(u=class{get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token.cancel():this._token=a.Cancelled}dispose(){this._token?this._token instanceof o&&this._token.dispose():this._token=a.None}},s(u,"CancellationTokenSource"),u);t.CancellationTokenSource=c}}),pT=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(t){var P,S,R,I,$,A,b,O,M,L,j,F,te,U,Q,fe,de,pe,ye,Ne,he,J,Ue,le,He;Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;var e=mc(),r;(function(ve){ve.ParseError=-32700,ve.InvalidRequest=-32600,ve.MethodNotFound=-32601,ve.InvalidParams=-32602,ve.InternalError=-32603,ve.jsonrpcReservedErrorRangeStart=-32099,ve.serverErrorStart=-32099,ve.MessageWriteError=-32099,ve.MessageReadError=-32098,ve.PendingResponseRejected=-32097,ve.ConnectionInactive=-32096,ve.ServerNotInitialized=-32002,ve.UnknownErrorCode=-32001,ve.jsonrpcReservedErrorRangeEnd=-32e3,ve.serverErrorEnd=-32e3})(r||(t.ErrorCodes=r={}));var n=(P=class extends Error{constructor(x,ze,Xt){super(ze),this.code=e.number(x)?x:r.UnknownErrorCode,this.data=Xt,Object.setPrototypeOf(this,P.prototype)}toJson(){const x={code:this.code,message:this.message};return this.data!==void 0&&(x.data=this.data),x}},s(P,"ResponseError"),P);t.ResponseError=n;var a=(S=class{constructor(x){this.kind=x}static is(x){return x===S.auto||x===S.byName||x===S.byPosition}toString(){return this.kind}},s(S,"ParameterStructures"),S);t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");var i=(R=class{constructor(x,ze){this.method=x,this.numberOfParams=ze}get parameterStructures(){return a.auto}},s(R,"AbstractMessageSignature"),R);t.AbstractMessageSignature=i;var o=(I=class extends i{constructor(x){super(x,0)}},s(I,"RequestType0"),I);t.RequestType0=o;var c=($=class extends i{constructor(x,ze=a.auto){super(x,1),this._parameterStructures=ze}get parameterStructures(){return this._parameterStructures}},s($,"RequestType"),$);t.RequestType=c;var l=(A=class extends i{constructor(x,ze=a.auto){super(x,1),this._parameterStructures=ze}get parameterStructures(){return this._parameterStructures}},s(A,"RequestType1"),A);t.RequestType1=l;var u=(b=class extends i{constructor(x){super(x,2)}},s(b,"RequestType2"),b);t.RequestType2=u;var f=(O=class extends i{constructor(x){super(x,3)}},s(O,"RequestType3"),O);t.RequestType3=f;var d=(M=class extends i{constructor(x){super(x,4)}},s(M,"RequestType4"),M);t.RequestType4=d;var p=(L=class extends i{constructor(x){super(x,5)}},s(L,"RequestType5"),L);t.RequestType5=p;var m=(j=class extends i{constructor(x){super(x,6)}},s(j,"RequestType6"),j);t.RequestType6=m;var g=(F=class extends i{constructor(x){super(x,7)}},s(F,"RequestType7"),F);t.RequestType7=g;var v=(te=class extends i{constructor(x){super(x,8)}},s(te,"RequestType8"),te);t.RequestType8=v;var E=(U=class extends i{constructor(x){super(x,9)}},s(U,"RequestType9"),U);t.RequestType9=E;var T=(Q=class extends i{constructor(x,ze=a.auto){super(x,1),this._parameterStructures=ze}get parameterStructures(){return this._parameterStructures}},s(Q,"NotificationType"),Q);t.NotificationType=T;var w=(fe=class extends i{constructor(x){super(x,0)}},s(fe,"NotificationType0"),fe);t.NotificationType0=w;var C=(de=class extends i{constructor(x,ze=a.auto){super(x,1),this._parameterStructures=ze}get parameterStructures(){return this._parameterStructures}},s(de,"NotificationType1"),de);t.NotificationType1=C;var k=(pe=class extends i{constructor(x){super(x,2)}},s(pe,"NotificationType2"),pe);t.NotificationType2=k;var B=(ye=class extends i{constructor(x){super(x,3)}},s(ye,"NotificationType3"),ye);t.NotificationType3=B;var re=(Ne=class extends i{constructor(x){super(x,4)}},s(Ne,"NotificationType4"),Ne);t.NotificationType4=re;var X=(he=class extends i{constructor(x){super(x,5)}},s(he,"NotificationType5"),he);t.NotificationType5=X;var ge=(J=class extends i{constructor(x){super(x,6)}},s(J,"NotificationType6"),J);t.NotificationType6=ge;var _e=(Ue=class extends i{constructor(x){super(x,7)}},s(Ue,"NotificationType7"),Ue);t.NotificationType7=_e;var Ie=(le=class extends i{constructor(x){super(x,8)}},s(le,"NotificationType8"),le);t.NotificationType8=Ie;var oe=(He=class extends i{constructor(x){super(x,9)}},s(He,"NotificationType9"),He);t.NotificationType9=oe;var tt;(function(ve){function x(Nt){const Te=Nt;return Te&&e.string(Te.method)&&(e.string(Te.id)||e.number(Te.id))}s(x,"isRequest"),ve.isRequest=x;function ze(Nt){const Te=Nt;return Te&&e.string(Te.method)&&Nt.id===void 0}s(ze,"isNotification"),ve.isNotification=ze;function Xt(Nt){const Te=Nt;return Te&&(Te.result!==void 0||!!Te.error)&&(e.string(Te.id)||e.number(Te.id)||Te.id===null)}s(Xt,"isResponse"),ve.isResponse=Xt})(tt||(t.Message=tt={}))}}),hT=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(t){var i,o;var e;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0;var r;(function(c){c.None=0,c.First=1,c.AsOld=c.First,c.Last=2,c.AsNew=c.Last})(r||(t.Touch=r={}));var n=(i=class{constructor(){this[e]="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 l;return(l=this._head)==null?void 0:l.value}get last(){var l;return(l=this._tail)==null?void 0:l.value}has(l){return this._map.has(l)}get(l,u=r.None){const f=this._map.get(l);if(f)return u!==r.None&&this.touch(f,u),f.value}set(l,u,f=r.None){let d=this._map.get(l);if(d)d.value=u,f!==r.None&&this.touch(d,f);else{switch(d={key:l,value:u,next:void 0,previous:void 0},f){case r.None:this.addItemLast(d);break;case r.First:this.addItemFirst(d);break;case r.Last:this.addItemLast(d);break;default:this.addItemLast(d);break}this._map.set(l,d),this._size++}return this}delete(l){return!!this.remove(l)}remove(l){const u=this._map.get(l);if(u)return this._map.delete(l),this.removeItem(u),this._size--,u.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const l=this._head;return this._map.delete(l.key),this.removeItem(l),this._size--,l.value}forEach(l,u){const f=this._state;let d=this._head;for(;d;){if(u?l.bind(u)(d.value,d.key,this):l(d.value,d.key,this),this._state!==f)throw new Error("LinkedMap got modified during iteration.");d=d.next}}keys(){const l=this._state;let u=this._head;const f={[Symbol.iterator]:()=>f,next:s(()=>{if(this._state!==l)throw new Error("LinkedMap got modified during iteration.");if(u){const d={value:u.key,done:!1};return u=u.next,d}else return{value:void 0,done:!0}},"next")};return f}values(){const l=this._state;let u=this._head;const f={[Symbol.iterator]:()=>f,next:s(()=>{if(this._state!==l)throw new Error("LinkedMap got modified during iteration.");if(u){const d={value:u.value,done:!1};return u=u.next,d}else return{value:void 0,done:!0}},"next")};return f}entries(){const l=this._state;let u=this._head;const f={[Symbol.iterator]:()=>f,next:s(()=>{if(this._state!==l)throw new Error("LinkedMap got modified during iteration.");if(u){const d={value:[u.key,u.value],done:!1};return u=u.next,d}else return{value:void 0,done:!0}},"next")};return f}[(e=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(l){if(l>=this.size)return;if(l===0){this.clear();return}let u=this._head,f=this.size;for(;u&&f>l;)this._map.delete(u.key),u=u.next,f--;this._head=u,this._size=f,u&&(u.previous=void 0),this._state++}addItemFirst(l){if(!this._head&&!this._tail)this._tail=l;else if(this._head)l.next=this._head,this._head.previous=l;else throw new Error("Invalid list");this._head=l,this._state++}addItemLast(l){if(!this._head&&!this._tail)this._head=l;else if(this._tail)l.previous=this._tail,this._tail.next=l;else throw new Error("Invalid list");this._tail=l,this._state++}removeItem(l){if(l===this._head&&l===this._tail)this._head=void 0,this._tail=void 0;else if(l===this._head){if(!l.next)throw new Error("Invalid list");l.next.previous=void 0,this._head=l.next}else if(l===this._tail){if(!l.previous)throw new Error("Invalid list");l.previous.next=void 0,this._tail=l.previous}else{const u=l.next,f=l.previous;if(!u||!f)throw new Error("Invalid list");u.previous=f,f.next=u}l.next=void 0,l.previous=void 0,this._state++}touch(l,u){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(u!==r.First&&u!==r.Last)){if(u===r.First){if(l===this._head)return;const f=l.next,d=l.previous;l===this._tail?(d.next=void 0,this._tail=d):(f.previous=d,d.next=f),l.previous=void 0,l.next=this._head,this._head.previous=l,this._head=l,this._state++}else if(u===r.Last){if(l===this._tail)return;const f=l.next,d=l.previous;l===this._head?(f.previous=void 0,this._head=f):(f.previous=d,d.next=f),l.next=void 0,l.previous=this._tail,this._tail.next=l,this._tail=l,this._state++}}}toJSON(){const l=[];return this.forEach((u,f)=>{l.push([f,u])}),l}fromJSON(l){this.clear();for(const[u,f]of l)this.set(u,f)}},s(i,"LinkedMap"),i);t.LinkedMap=n;var a=(o=class extends n{constructor(l,u=1){super(),this._limit=l,this._ratio=Math.min(Math.max(0,u),1)}get limit(){return this._limit}set limit(l){this._limit=l,this.checkTrim()}get ratio(){return this._ratio}set ratio(l){this._ratio=Math.min(Math.max(0,l),1),this.checkTrim()}get(l,u=r.AsNew){return super.get(l,u)}peek(l){return super.get(l,r.None)}set(l,u){return super.set(l,u,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}},s(o,"LRUCache"),o);t.LRUCache=a}}),UN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0;var e;(function(r){function n(a){return{dispose:a}}s(n,"create"),r.create=n})(e||(t.Disposable=e={}))}}),zN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(t){var c,l,u,f;Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;var e=ff(),r;(function(d){d.Continue=0,d.Cancelled=1})(r||(r={}));var n=(c=class{constructor(){this.buffers=new Map}enableCancellation(p){if(p.id===null)return;const m=new SharedArrayBuffer(4),g=new Int32Array(m,0,1);g[0]=r.Continue,this.buffers.set(p.id,m),p.$cancellationData=m}async sendCancellation(p,m){const g=this.buffers.get(m);if(g===void 0)return;const v=new Int32Array(g,0,1);Atomics.store(v,0,r.Cancelled)}cleanup(p){this.buffers.delete(p)}dispose(){this.buffers.clear()}},s(c,"SharedArraySenderStrategy"),c);t.SharedArraySenderStrategy=n;var a=(l=class{constructor(p){this.data=new Int32Array(p,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},s(l,"SharedArrayBufferCancellationToken"),l),i=(u=class{constructor(p){this.token=new a(p)}cancel(){}dispose(){}},s(u,"SharedArrayBufferCancellationTokenSource"),u),o=(f=class{constructor(){this.kind="request"}createCancellationTokenSource(p){const m=p.$cancellationData;return m===void 0?new e.CancellationTokenSource:new i(m)}},s(f,"SharedArrayReceiverStrategy"),f);t.SharedArrayReceiverStrategy=o}}),mT=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;var e=Un(),r=(n=class{constructor(i=1){if(i<=0)throw new Error("Capacity must be greater than 0");this._capacity=i,this._active=0,this._waiting=[]}lock(i){return new Promise((o,c)=>{this._waiting.push({thunk:i,resolve:o,reject:c}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,e.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;const i=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const o=i.thunk();o instanceof Promise?o.then(c=>{this._active--,i.resolve(c),this.runNext()},c=>{this._active--,i.reject(c),this.runNext()}):(this._active--,i.resolve(o),this.runNext())}catch(o){this._active--,i.reject(o),this.runNext()}}},s(n,"Semaphore"),n);t.Semaphore=r}}),BN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(t){var u,f;Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;var e=Un(),r=mc(),n=Go(),a=mT(),i;(function(d){function p(m){let g=m;return g&&r.func(g.listen)&&r.func(g.dispose)&&r.func(g.onError)&&r.func(g.onClose)&&r.func(g.onPartialMessage)}s(p,"is"),d.is=p})(i||(t.MessageReader=i={}));var o=(u=class{constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter,this.partialMessageEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(p){this.errorEmitter.fire(this.asError(p))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(p){this.partialMessageEmitter.fire(p)}asError(p){return p instanceof Error?p:new Error(`Reader received error. Reason: ${r.string(p.message)?p.message:"unknown"}`)}},s(u,"AbstractMessageReader"),u);t.AbstractMessageReader=o;var c;(function(d){function p(m){let g,v;const E=new Map;let T;const w=new Map;if(m===void 0||typeof m=="string")g=m??"utf-8";else{if(g=m.charset??"utf-8",m.contentDecoder!==void 0&&(v=m.contentDecoder,E.set(v.name,v)),m.contentDecoders!==void 0)for(const C of m.contentDecoders)E.set(C.name,C);if(m.contentTypeDecoder!==void 0&&(T=m.contentTypeDecoder,w.set(T.name,T)),m.contentTypeDecoders!==void 0)for(const C of m.contentTypeDecoders)w.set(C.name,C)}return T===void 0&&(T=(0,e.default)().applicationJson.decoder,w.set(T.name,T)),{charset:g,contentDecoder:v,contentDecoders:E,contentTypeDecoder:T,contentTypeDecoders:w}}s(p,"fromOptions"),d.fromOptions=p})(c||(c={}));var l=(f=class extends o{constructor(p,m){super(),this.readable=p,this.options=c.fromOptions(m),this.buffer=(0,e.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new a.Semaphore(1)}set partialMessageTimeout(p){this._partialMessageTimeout=p}get partialMessageTimeout(){return this._partialMessageTimeout}listen(p){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=p;const m=this.readable.onData(g=>{this.onData(g)});return this.readable.onError(g=>this.fireError(g)),this.readable.onClose(()=>this.fireClose()),m}onData(p){try{for(this.buffer.append(p);;){if(this.nextMessageLength===-1){const g=this.buffer.tryReadHeaders(!0);if(!g)return;const v=g.get("content-length");if(!v){this.fireError(new Error(`Header must provide a Content-Length property.
6
+ ${JSON.stringify(Object.fromEntries(g))}`));return}const E=parseInt(v);if(isNaN(E)){this.fireError(new Error(`Content-Length value must be a number. Got ${v}`));return}this.nextMessageLength=E}const m=this.buffer.tryReadBody(this.nextMessageLength);if(m===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const g=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(m):m,v=await this.options.contentTypeDecoder.decode(g,this.options);this.callback(v)}).catch(g=>{this.fireError(g)})}}catch(m){this.fireError(m)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,e.default)().timer.setTimeout((p,m)=>{this.partialMessageTimer=void 0,p===this.messageToken&&(this.firePartialMessage({messageToken:p,waitingTime:m}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}},s(f,"ReadableStreamMessageReader"),f);t.ReadableStreamMessageReader=l}}),KN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(t){var d,p;Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;var e=Un(),r=mc(),n=mT(),a=Go(),i="Content-Length: ",o=`\r
7
+ `,c;(function(m){function g(v){let E=v;return E&&r.func(E.dispose)&&r.func(E.onClose)&&r.func(E.onError)&&r.func(E.write)}s(g,"is"),m.is=g})(c||(t.MessageWriter=c={}));var l=(d=class{constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(g,v,E){this.errorEmitter.fire([this.asError(g),v,E])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(g){return g instanceof Error?g:new Error(`Writer received error. Reason: ${r.string(g.message)?g.message:"unknown"}`)}},s(d,"AbstractMessageWriter"),d);t.AbstractMessageWriter=l;var u;(function(m){function g(v){return v===void 0||typeof v=="string"?{charset:v??"utf-8",contentTypeEncoder:(0,e.default)().applicationJson.encoder}:{charset:v.charset??"utf-8",contentEncoder:v.contentEncoder,contentTypeEncoder:v.contentTypeEncoder??(0,e.default)().applicationJson.encoder}}s(g,"fromOptions"),m.fromOptions=g})(u||(u={}));var f=(p=class extends l{constructor(g,v){super(),this.writable=g,this.options=u.fromOptions(v),this.errorCount=0,this.writeSemaphore=new n.Semaphore(1),this.writable.onError(E=>this.fireError(E)),this.writable.onClose(()=>this.fireClose())}async write(g){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(g,this.options).then(E=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(E):E).then(E=>{const T=[];return T.push(i,E.byteLength.toString(),o),T.push(o),this.doWrite(g,T,E)},E=>{throw this.fireError(E),E}))}async doWrite(g,v,E){try{return await this.writable.write(v.join(""),"ascii"),this.writable.write(E)}catch(T){return this.handleError(T,g),Promise.reject(T)}}handleError(g,v){this.errorCount++,this.fireError(g,v,this.errorCount)}end(){this.writable.end()}},s(p,"WriteableStreamMessageWriter"),p);t.WriteableStreamMessageWriter=f}}),qN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0;var e=13,r=10,n=`\r
8
+ `,a=(i=class{constructor(c="utf-8"){this._encoding=c,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(c){const l=typeof c=="string"?this.fromString(c,this._encoding):c;this._chunks.push(l),this._totalLength+=l.byteLength}tryReadHeaders(c=!1){if(this._chunks.length===0)return;let l=0,u=0,f=0,d=0;e:for(;u<this._chunks.length;){const v=this._chunks[u];for(f=0;f<v.length;){switch(v[f]){case e:switch(l){case 0:l=1;break;case 2:l=3;break;default:l=0}break;case r:switch(l){case 1:l=2;break;case 3:l=4,f++;break e;default:l=0}break;default:l=0}f++}d+=v.byteLength,u++}if(l!==4)return;const p=this._read(d+f),m=new Map,g=this.toString(p,"ascii").split(n);if(g.length<2)return m;for(let v=0;v<g.length-2;v++){const E=g[v],T=E.indexOf(":");if(T===-1)throw new Error(`Message header must separate key and value using ':'
9
+ ${E}`);const w=E.substr(0,T),C=E.substr(T+1).trim();m.set(c?w.toLowerCase():w,C)}return m}tryReadBody(c){if(!(this._totalLength<c))return this._read(c)}get numberOfBytes(){return this._totalLength}_read(c){if(c===0)return this.emptyBuffer();if(c>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===c){const d=this._chunks[0];return this._chunks.shift(),this._totalLength-=c,this.asNative(d)}if(this._chunks[0].byteLength>c){const d=this._chunks[0],p=this.asNative(d,c);return this._chunks[0]=d.slice(c),this._totalLength-=c,p}const l=this.allocNative(c);let u=0,f=0;for(;c>0;){const d=this._chunks[f];if(d.byteLength>c){const p=d.slice(0,c);l.set(p,u),u+=c,this._chunks[f]=d.slice(c),this._totalLength-=c,c-=c}else l.set(d,u),u+=d.byteLength,this._chunks.shift(),this._totalLength-=d.byteLength,c-=d.byteLength}return l}},s(i,"AbstractMessageBuffer"),i);t.AbstractMessageBuffer=a}}),WN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(t){var P,S;Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;var e=Un(),r=mc(),n=pT(),a=hT(),i=Go(),o=ff(),c;(function(R){R.type=new n.NotificationType("$/cancelRequest")})(c||(c={}));var l;(function(R){function I($){return typeof $=="string"||typeof $=="number"}s(I,"is"),R.is=I})(l||(t.ProgressToken=l={}));var u;(function(R){R.type=new n.NotificationType("$/progress")})(u||(u={}));var f=(P=class{constructor(){}},s(P,"ProgressType"),P);t.ProgressType=f;var d;(function(R){function I($){return r.func($)}s(I,"is"),R.is=I})(d||(d={})),t.NullLogger=Object.freeze({error:s(()=>{},"error"),warn:s(()=>{},"warn"),info:s(()=>{},"info"),log:s(()=>{},"log")});var p;(function(R){R[R.Off=0]="Off",R[R.Messages=1]="Messages",R[R.Compact=2]="Compact",R[R.Verbose=3]="Verbose"})(p||(t.Trace=p={}));var m;(function(R){R.Off="off",R.Messages="messages",R.Compact="compact",R.Verbose="verbose"})(m||(t.TraceValues=m={})),function(R){function I(A){if(!r.string(A))return R.Off;switch(A=A.toLowerCase(),A){case"off":return R.Off;case"messages":return R.Messages;case"compact":return R.Compact;case"verbose":return R.Verbose;default:return R.Off}}s(I,"fromString"),R.fromString=I;function $(A){switch(A){case R.Off:return"off";case R.Messages:return"messages";case R.Compact:return"compact";case R.Verbose:return"verbose";default:return"off"}}s($,"toString"),R.toString=$}(p||(t.Trace=p={}));var g;(function(R){R.Text="text",R.JSON="json"})(g||(t.TraceFormat=g={})),function(R){function I($){return r.string($)?($=$.toLowerCase(),$==="json"?R.JSON:R.Text):R.Text}s(I,"fromString"),R.fromString=I}(g||(t.TraceFormat=g={}));var v;(function(R){R.type=new n.NotificationType("$/setTrace")})(v||(t.SetTraceNotification=v={}));var E;(function(R){R.type=new n.NotificationType("$/logTrace")})(E||(t.LogTraceNotification=E={}));var T;(function(R){R[R.Closed=1]="Closed",R[R.Disposed=2]="Disposed",R[R.AlreadyListening=3]="AlreadyListening"})(T||(t.ConnectionErrors=T={}));var w=(S=class extends Error{constructor(I,$){super($),this.code=I,Object.setPrototypeOf(this,S.prototype)}},s(S,"ConnectionError"),S);t.ConnectionError=w;var C;(function(R){function I($){const A=$;return A&&r.func(A.cancelUndispatched)}s(I,"is"),R.is=I})(C||(t.ConnectionStrategy=C={}));var k;(function(R){function I($){const A=$;return A&&(A.kind===void 0||A.kind==="id")&&r.func(A.createCancellationTokenSource)&&(A.dispose===void 0||r.func(A.dispose))}s(I,"is"),R.is=I})(k||(t.IdCancellationReceiverStrategy=k={}));var B;(function(R){function I($){const A=$;return A&&A.kind==="request"&&r.func(A.createCancellationTokenSource)&&(A.dispose===void 0||r.func(A.dispose))}s(I,"is"),R.is=I})(B||(t.RequestCancellationReceiverStrategy=B={}));var re;(function(R){R.Message=Object.freeze({createCancellationTokenSource($){return new o.CancellationTokenSource}});function I($){return k.is($)||B.is($)}s(I,"is"),R.is=I})(re||(t.CancellationReceiverStrategy=re={}));var X;(function(R){R.Message=Object.freeze({sendCancellation($,A){return $.sendNotification(c.type,{id:A})},cleanup($){}});function I($){const A=$;return A&&r.func(A.sendCancellation)&&r.func(A.cleanup)}s(I,"is"),R.is=I})(X||(t.CancellationSenderStrategy=X={}));var ge;(function(R){R.Message=Object.freeze({receiver:re.Message,sender:X.Message});function I($){const A=$;return A&&re.is(A.receiver)&&X.is(A.sender)}s(I,"is"),R.is=I})(ge||(t.CancellationStrategy=ge={}));var _e;(function(R){function I($){const A=$;return A&&r.func(A.handleMessage)}s(I,"is"),R.is=I})(_e||(t.MessageStrategy=_e={}));var Ie;(function(R){function I($){const A=$;return A&&(ge.is(A.cancellationStrategy)||C.is(A.connectionStrategy)||_e.is(A.messageStrategy))}s(I,"is"),R.is=I})(Ie||(t.ConnectionOptions=Ie={}));var oe;(function(R){R[R.New=1]="New",R[R.Listening=2]="Listening",R[R.Closed=3]="Closed",R[R.Disposed=4]="Disposed"})(oe||(oe={}));function tt(R,I,$,A){const b=$!==void 0?$:t.NullLogger;let O=0,M=0,L=0;const j="2.0";let F;const te=new Map;let U;const Q=new Map,fe=new Map;let de,pe=new a.LinkedMap,ye=new Map,Ne=new Set,he=new Map,J=p.Off,Ue=g.Text,le,He=oe.New;const ve=new i.Emitter,x=new i.Emitter,ze=new i.Emitter,Xt=new i.Emitter,Nt=new i.Emitter,Te=A&&A.cancellationStrategy?A.cancellationStrategy:ge.Message;function la(y){if(y===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+y.toString()}s(la,"createRequestQueueKey");function Xo(y){return y===null?"res-unknown-"+(++L).toString():"res-"+y.toString()}s(Xo,"createResponseQueueKey");function Jo(){return"not-"+(++M).toString()}s(Jo,"createNotificationQueueKey");function Zo(y,N){n.Message.isRequest(N)?y.set(la(N.id),N):n.Message.isResponse(N)?y.set(Xo(N.id),N):y.set(Jo(),N)}s(Zo,"addMessageToQueue");function Qo(y){}s(Qo,"cancelUndispatched");function ca(){return He===oe.Listening}s(ca,"isListening");function ua(){return He===oe.Closed}s(ua,"isClosed");function Jt(){return He===oe.Disposed}s(Jt,"isDisposed");function fa(){(He===oe.New||He===oe.Listening)&&(He=oe.Closed,x.fire(void 0))}s(fa,"closeHandler");function el(y){ve.fire([y,void 0,void 0])}s(el,"readErrorHandler");function tl(y){ve.fire(y)}s(tl,"writeErrorHandler"),R.onClose(fa),R.onError(el),I.onClose(fa),I.onError(tl);function da(){de||pe.size===0||(de=(0,e.default)().timer.setImmediate(()=>{de=void 0,rl()}))}s(da,"triggerMessageQueue");function pa(y){n.Message.isRequest(y)?nl(y):n.Message.isNotification(y)?il(y):n.Message.isResponse(y)?al(y):sl(y)}s(pa,"handleMessage");function rl(){if(pe.size===0)return;const y=pe.shift();try{const N=A==null?void 0:A.messageStrategy;_e.is(N)?N.handleMessage(y,pa):pa(y)}finally{da()}}s(rl,"processMessageQueue");const Dc=s(y=>{try{if(n.Message.isNotification(y)&&y.method===c.type.method){const N=y.params.id,D=la(N),G=pe.get(D);if(n.Message.isRequest(G)){const me=A==null?void 0:A.connectionStrategy,Re=me&&me.cancelUndispatched?me.cancelUndispatched(G,Qo):void 0;if(Re&&(Re.error!==void 0||Re.result!==void 0)){pe.delete(D),he.delete(N),Re.id=G.id,Fr(Re,y.method,Date.now()),I.write(Re).catch(()=>b.error("Sending response for canceled message failed."));return}}const Ce=he.get(N);if(Ce!==void 0){Ce.cancel(),nn(y);return}else Ne.add(N)}Zo(pe,y)}finally{da()}},"callback");function nl(y){if(Jt())return;function N(ne,Le,ce){const Ke={jsonrpc:j,id:y.id};ne instanceof n.ResponseError?Ke.error=ne.toJson():Ke.result=ne===void 0?null:ne,Fr(Ke,Le,ce),I.write(Ke).catch(()=>b.error("Sending response failed."))}s(N,"reply");function D(ne,Le,ce){const Ke={jsonrpc:j,id:y.id,error:ne.toJson()};Fr(Ke,Le,ce),I.write(Ke).catch(()=>b.error("Sending response failed."))}s(D,"replyError");function G(ne,Le,ce){ne===void 0&&(ne=null);const Ke={jsonrpc:j,id:y.id,result:ne};Fr(Ke,Le,ce),I.write(Ke).catch(()=>b.error("Sending response failed."))}s(G,"replySuccess"),cl(y);const Ce=te.get(y.method);let me,Re;Ce&&(me=Ce.type,Re=Ce.handler);const Ge=Date.now();if(Re||F){const ne=y.id??String(Date.now()),Le=k.is(Te.receiver)?Te.receiver.createCancellationTokenSource(ne):Te.receiver.createCancellationTokenSource(y);y.id!==null&&Ne.has(y.id)&&Le.cancel(),y.id!==null&&he.set(ne,Le);try{let ce;if(Re)if(y.params===void 0){if(me!==void 0&&me.numberOfParams!==0){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${y.method} defines ${me.numberOfParams} params but received none.`),y.method,Ge);return}ce=Re(Le.token)}else if(Array.isArray(y.params)){if(me!==void 0&&me.parameterStructures===n.ParameterStructures.byName){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by name but received parameters by position`),y.method,Ge);return}ce=Re(...y.params,Le.token)}else{if(me!==void 0&&me.parameterStructures===n.ParameterStructures.byPosition){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by position but received parameters by name`),y.method,Ge);return}ce=Re(y.params,Le.token)}else F&&(ce=F(y.method,y.params,Le.token));const Ke=ce;ce?Ke.then?Ke.then(rt=>{he.delete(ne),N(rt,y.method,Ge)},rt=>{he.delete(ne),rt instanceof n.ResponseError?D(rt,y.method,Ge):rt&&r.string(rt.message)?D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${rt.message}`),y.method,Ge):D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed unexpectedly without providing any details.`),y.method,Ge)}):(he.delete(ne),N(ce,y.method,Ge)):(he.delete(ne),G(ce,y.method,Ge))}catch(ce){he.delete(ne),ce instanceof n.ResponseError?N(ce,y.method,Ge):ce&&r.string(ce.message)?D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${ce.message}`),y.method,Ge):D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed unexpectedly without providing any details.`),y.method,Ge)}}else D(new n.ResponseError(n.ErrorCodes.MethodNotFound,`Unhandled method ${y.method}`),y.method,Ge)}s(nl,"handleRequest");function al(y){if(!Jt())if(y.id===null)y.error?b.error(`Received response message without id: Error is:
10
+ ${JSON.stringify(y.error,void 0,4)}`):b.error("Received response message without id. No further error information provided.");else{const N=y.id,D=ye.get(N);if(ul(y,D),D!==void 0){ye.delete(N);try{if(y.error){const G=y.error;D.reject(new n.ResponseError(G.code,G.message,G.data))}else if(y.result!==void 0)D.resolve(y.result);else throw new Error("Should never happen.")}catch(G){G.message?b.error(`Response handler '${D.method}' failed with message: ${G.message}`):b.error(`Response handler '${D.method}' failed unexpectedly.`)}}}}s(al,"handleResponse");function il(y){if(Jt())return;let N,D;if(y.method===c.type.method){const G=y.params.id;Ne.delete(G),nn(y);return}else{const G=Q.get(y.method);G&&(D=G.handler,N=G.type)}if(D||U)try{if(nn(y),D)if(y.params===void 0)N!==void 0&&N.numberOfParams!==0&&N.parameterStructures!==n.ParameterStructures.byName&&b.error(`Notification ${y.method} defines ${N.numberOfParams} params but received none.`),D();else if(Array.isArray(y.params)){const G=y.params;y.method===u.type.method&&G.length===2&&l.is(G[0])?D({token:G[0],value:G[1]}):(N!==void 0&&(N.parameterStructures===n.ParameterStructures.byName&&b.error(`Notification ${y.method} defines parameters by name but received parameters by position`),N.numberOfParams!==y.params.length&&b.error(`Notification ${y.method} defines ${N.numberOfParams} params but received ${G.length} arguments`)),D(...G))}else N!==void 0&&N.parameterStructures===n.ParameterStructures.byPosition&&b.error(`Notification ${y.method} defines parameters by position but received parameters by name`),D(y.params);else U&&U(y.method,y.params)}catch(G){G.message?b.error(`Notification handler '${y.method}' failed with message: ${G.message}`):b.error(`Notification handler '${y.method}' failed unexpectedly.`)}else ze.fire(y)}s(il,"handleNotification");function sl(y){if(!y){b.error("Received empty message.");return}b.error(`Received message which is neither a response nor a notification message:
11
+ ${JSON.stringify(y,null,4)}`);const N=y;if(r.string(N.id)||r.number(N.id)){const D=N.id,G=ye.get(D);G&&G.reject(new Error("The received response has neither a result nor an error property."))}}s(sl,"handleInvalidMessage");function kt(y){if(y!=null)switch(J){case p.Verbose:return JSON.stringify(y,null,4);case p.Compact:return JSON.stringify(y);default:return}}s(kt,"stringifyTrace");function ol(y){if(!(J===p.Off||!le))if(Ue===g.Text){let N;(J===p.Verbose||J===p.Compact)&&y.params&&(N=`Params: ${kt(y.params)}
12
+
13
+ `),le.log(`Sending request '${y.method} - (${y.id})'.`,N)}else Zt("send-request",y)}s(ol,"traceSendingRequest");function ll(y){if(!(J===p.Off||!le))if(Ue===g.Text){let N;(J===p.Verbose||J===p.Compact)&&(y.params?N=`Params: ${kt(y.params)}
14
+
15
+ `:N=`No parameters provided.
16
+
17
+ `),le.log(`Sending notification '${y.method}'.`,N)}else Zt("send-notification",y)}s(ll,"traceSendingNotification");function Fr(y,N,D){if(!(J===p.Off||!le))if(Ue===g.Text){let G;(J===p.Verbose||J===p.Compact)&&(y.error&&y.error.data?G=`Error data: ${kt(y.error.data)}
18
+
19
+ `:y.result?G=`Result: ${kt(y.result)}
20
+
21
+ `:y.error===void 0&&(G=`No result returned.
22
+
23
+ `)),le.log(`Sending response '${N} - (${y.id})'. Processing request took ${Date.now()-D}ms`,G)}else Zt("send-response",y)}s(Fr,"traceSendingResponse");function cl(y){if(!(J===p.Off||!le))if(Ue===g.Text){let N;(J===p.Verbose||J===p.Compact)&&y.params&&(N=`Params: ${kt(y.params)}
24
+
25
+ `),le.log(`Received request '${y.method} - (${y.id})'.`,N)}else Zt("receive-request",y)}s(cl,"traceReceivedRequest");function nn(y){if(!(J===p.Off||!le||y.method===E.type.method))if(Ue===g.Text){let N;(J===p.Verbose||J===p.Compact)&&(y.params?N=`Params: ${kt(y.params)}
26
+
27
+ `:N=`No parameters provided.
28
+
29
+ `),le.log(`Received notification '${y.method}'.`,N)}else Zt("receive-notification",y)}s(nn,"traceReceivedNotification");function ul(y,N){if(!(J===p.Off||!le))if(Ue===g.Text){let D;if((J===p.Verbose||J===p.Compact)&&(y.error&&y.error.data?D=`Error data: ${kt(y.error.data)}
30
+
31
+ `:y.result?D=`Result: ${kt(y.result)}
32
+
33
+ `:y.error===void 0&&(D=`No result returned.
34
+
35
+ `)),N){const G=y.error?` Request failed: ${y.error.message} (${y.error.code}).`:"";le.log(`Received response '${N.method} - (${y.id})' in ${Date.now()-N.timerStart}ms.${G}`,D)}else le.log(`Received response ${y.id} without active response promise.`,D)}else Zt("receive-response",y)}s(ul,"traceReceivedResponse");function Zt(y,N){if(!le||J===p.Off)return;const D={isLSPMessage:!0,type:y,message:N,timestamp:Date.now()};le.log(D)}s(Zt,"logLSPMessage");function gr(){if(ua())throw new w(T.Closed,"Connection is closed.");if(Jt())throw new w(T.Disposed,"Connection is disposed.")}s(gr,"throwIfClosedOrDisposed");function fl(){if(ca())throw new w(T.AlreadyListening,"Connection is already listening")}s(fl,"throwIfListening");function dl(){if(!ca())throw new Error("Call listen() first.")}s(dl,"throwIfNotListening");function h(y){return y===void 0?null:y}s(h,"undefinedToNull");function se(y){if(y!==null)return y}s(se,"nullToUndefined");function ke(y){return y!=null&&!Array.isArray(y)&&typeof y=="object"}s(ke,"isNamedParam");function H(y,N){switch(y){case n.ParameterStructures.auto:return ke(N)?se(N):[h(N)];case n.ParameterStructures.byName:if(!ke(N))throw new Error("Received parameters by name but param is not an object literal.");return se(N);case n.ParameterStructures.byPosition:return[h(N)];default:throw new Error(`Unknown parameter structure ${y.toString()}`)}}s(H,"computeSingleParam");function Oe(y,N){let D;const G=y.numberOfParams;switch(G){case 0:D=void 0;break;case 1:D=H(y.parameterStructures,N[0]);break;default:D=[];for(let Ce=0;Ce<N.length&&Ce<G;Ce++)D.push(h(N[Ce]));if(N.length<G)for(let Ce=N.length;Ce<G;Ce++)D.push(null);break}return D}s(Oe,"computeMessageParams");const ha={sendNotification:s((y,...N)=>{gr();let D,G;if(r.string(y)){D=y;const me=N[0];let Re=0,Ge=n.ParameterStructures.auto;n.ParameterStructures.is(me)&&(Re=1,Ge=me);let ne=N.length;const Le=ne-Re;switch(Le){case 0:G=void 0;break;case 1:G=H(Ge,N[Re]);break;default:if(Ge===n.ParameterStructures.byName)throw new Error(`Received ${Le} parameters for 'by Name' notification parameter structure.`);G=N.slice(Re,ne).map(ce=>h(ce));break}}else{const me=N;D=y.method,G=Oe(y,me)}const Ce={jsonrpc:j,method:D,params:G};return ll(Ce),I.write(Ce).catch(me=>{throw b.error("Sending notification failed."),me})},"sendNotification"),onNotification:s((y,N)=>{gr();let D;return r.func(y)?U=y:N&&(r.string(y)?(D=y,Q.set(y,{type:void 0,handler:N})):(D=y.method,Q.set(y.method,{type:y,handler:N}))),{dispose:s(()=>{D!==void 0?Q.delete(D):U=void 0},"dispose")}},"onNotification"),onProgress:s((y,N,D)=>{if(fe.has(N))throw new Error(`Progress handler for token ${N} already registered`);return fe.set(N,D),{dispose:s(()=>{fe.delete(N)},"dispose")}},"onProgress"),sendProgress:s((y,N,D)=>ha.sendNotification(u.type,{token:N,value:D}),"sendProgress"),onUnhandledProgress:Xt.event,sendRequest:s((y,...N)=>{gr(),dl();let D,G,Ce;if(r.string(y)){D=y;const ne=N[0],Le=N[N.length-1];let ce=0,Ke=n.ParameterStructures.auto;n.ParameterStructures.is(ne)&&(ce=1,Ke=ne);let rt=N.length;o.CancellationToken.is(Le)&&(rt=rt-1,Ce=Le);const Qt=rt-ce;switch(Qt){case 0:G=void 0;break;case 1:G=H(Ke,N[ce]);break;default:if(Ke===n.ParameterStructures.byName)throw new Error(`Received ${Qt} parameters for 'by Name' request parameter structure.`);G=N.slice(ce,rt).map(ON=>h(ON));break}}else{const ne=N;D=y.method,G=Oe(y,ne);const Le=y.numberOfParams;Ce=o.CancellationToken.is(ne[Le])?ne[Le]:void 0}const me=O++;let Re;Ce&&(Re=Ce.onCancellationRequested(()=>{const ne=Te.sender.sendCancellation(ha,me);return ne===void 0?(b.log(`Received no promise from cancellation strategy when cancelling id ${me}`),Promise.resolve()):ne.catch(()=>{b.log(`Sending cancellation messages for id ${me} failed`)})}));const Ge={jsonrpc:j,id:me,method:D,params:G};return ol(Ge),typeof Te.sender.enableCancellation=="function"&&Te.sender.enableCancellation(Ge),new Promise(async(ne,Le)=>{const ce=s(Qt=>{ne(Qt),Te.sender.cleanup(me),Re==null||Re.dispose()},"resolveWithCleanup"),Ke=s(Qt=>{Le(Qt),Te.sender.cleanup(me),Re==null||Re.dispose()},"rejectWithCleanup"),rt={method:D,timerStart:Date.now(),resolve:ce,reject:Ke};try{await I.write(Ge),ye.set(me,rt)}catch(Qt){throw b.error("Sending request failed."),rt.reject(new n.ResponseError(n.ErrorCodes.MessageWriteError,Qt.message?Qt.message:"Unknown reason")),Qt}})},"sendRequest"),onRequest:s((y,N)=>{gr();let D=null;return d.is(y)?(D=void 0,F=y):r.string(y)?(D=null,N!==void 0&&(D=y,te.set(y,{handler:N,type:void 0}))):N!==void 0&&(D=y.method,te.set(y.method,{type:y,handler:N})),{dispose:s(()=>{D!==null&&(D!==void 0?te.delete(D):F=void 0)},"dispose")}},"onRequest"),hasPendingResponse:s(()=>ye.size>0,"hasPendingResponse"),trace:s(async(y,N,D)=>{let G=!1,Ce=g.Text;D!==void 0&&(r.boolean(D)?G=D:(G=D.sendNotification||!1,Ce=D.traceFormat||g.Text)),J=y,Ue=Ce,J===p.Off?le=void 0:le=N,G&&!ua()&&!Jt()&&await ha.sendNotification(v.type,{value:p.toString(y)})},"trace"),onError:ve.event,onClose:x.event,onUnhandledNotification:ze.event,onDispose:Nt.event,end:s(()=>{I.end()},"end"),dispose:s(()=>{if(Jt())return;He=oe.Disposed,Nt.fire(void 0);const y=new n.ResponseError(n.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const N of ye.values())N.reject(y);ye=new Map,he=new Map,Ne=new Set,pe=new a.LinkedMap,r.func(I.dispose)&&I.dispose(),r.func(R.dispose)&&R.dispose()},"dispose"),listen:s(()=>{gr(),fl(),He=oe.Listening,R.listen(Dc)},"listen"),inspect:s(()=>{(0,e.default)().console.log("inspect")},"inspect")};return ha.onNotification(E.type,y=>{if(J===p.Off||!le)return;const N=J===p.Verbose||J===p.Compact;le.log(y.message,N?y.verbose:void 0)}),ha.onNotification(u.type,y=>{const N=fe.get(y.token);N?N(y.value):Xt.fire(y)}),ha}s(tt,"createMessageConnection"),t.createMessageConnection=tt}}),zp=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;var e=pT();Object.defineProperty(t,"Message",{enumerable:!0,get:s(function(){return e.Message},"get")}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:s(function(){return e.RequestType},"get")}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:s(function(){return e.RequestType0},"get")}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:s(function(){return e.RequestType1},"get")}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:s(function(){return e.RequestType2},"get")}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:s(function(){return e.RequestType3},"get")}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:s(function(){return e.RequestType4},"get")}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:s(function(){return e.RequestType5},"get")}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:s(function(){return e.RequestType6},"get")}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:s(function(){return e.RequestType7},"get")}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:s(function(){return e.RequestType8},"get")}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:s(function(){return e.RequestType9},"get")}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:s(function(){return e.ResponseError},"get")}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:s(function(){return e.ErrorCodes},"get")}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:s(function(){return e.NotificationType},"get")}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:s(function(){return e.NotificationType0},"get")}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:s(function(){return e.NotificationType1},"get")}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:s(function(){return e.NotificationType2},"get")}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:s(function(){return e.NotificationType3},"get")}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:s(function(){return e.NotificationType4},"get")}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:s(function(){return e.NotificationType5},"get")}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:s(function(){return e.NotificationType6},"get")}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:s(function(){return e.NotificationType7},"get")}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:s(function(){return e.NotificationType8},"get")}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:s(function(){return e.NotificationType9},"get")}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:s(function(){return e.ParameterStructures},"get")});var r=hT();Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:s(function(){return r.LinkedMap},"get")}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:s(function(){return r.LRUCache},"get")}),Object.defineProperty(t,"Touch",{enumerable:!0,get:s(function(){return r.Touch},"get")});var n=UN();Object.defineProperty(t,"Disposable",{enumerable:!0,get:s(function(){return n.Disposable},"get")});var a=Go();Object.defineProperty(t,"Event",{enumerable:!0,get:s(function(){return a.Event},"get")}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:s(function(){return a.Emitter},"get")});var i=ff();Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:s(function(){return i.CancellationTokenSource},"get")}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:s(function(){return i.CancellationToken},"get")});var o=zN();Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:s(function(){return o.SharedArraySenderStrategy},"get")}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:s(function(){return o.SharedArrayReceiverStrategy},"get")});var c=BN();Object.defineProperty(t,"MessageReader",{enumerable:!0,get:s(function(){return c.MessageReader},"get")}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:s(function(){return c.AbstractMessageReader},"get")}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:s(function(){return c.ReadableStreamMessageReader},"get")});var l=KN();Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:s(function(){return l.MessageWriter},"get")}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:s(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:s(function(){return l.WriteableStreamMessageWriter},"get")});var u=qN();Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:s(function(){return u.AbstractMessageBuffer},"get")});var f=WN();Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:s(function(){return f.ConnectionStrategy},"get")}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:s(function(){return f.ConnectionOptions},"get")}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:s(function(){return f.NullLogger},"get")}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:s(function(){return f.createMessageConnection},"get")}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:s(function(){return f.ProgressToken},"get")}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:s(function(){return f.ProgressType},"get")}),Object.defineProperty(t,"Trace",{enumerable:!0,get:s(function(){return f.Trace},"get")}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:s(function(){return f.TraceValues},"get")}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:s(function(){return f.TraceFormat},"get")}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:s(function(){return f.SetTraceNotification},"get")}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:s(function(){return f.LogTraceNotification},"get")}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:s(function(){return f.ConnectionErrors},"get")}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:s(function(){return f.ConnectionError},"get")}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:s(function(){return f.CancellationReceiverStrategy},"get")}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:s(function(){return f.CancellationSenderStrategy},"get")}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:s(function(){return f.CancellationStrategy},"get")}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:s(function(){return f.MessageStrategy},"get")});var d=Un();t.RAL=d.default}}),VN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(t){var l,u,f;Object.defineProperty(t,"__esModule",{value:!0});var e=zp(),r=(l=class extends e.AbstractMessageBuffer{constructor(p="utf-8"){super(p),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return l.emptyBuffer}fromString(p,m){return new TextEncoder().encode(p)}toString(p,m){return m==="ascii"?this.asciiDecoder.decode(p):new TextDecoder(m).decode(p)}asNative(p,m){return m===void 0?p:p.slice(0,m)}allocNative(p){return new Uint8Array(p)}},s(l,"MessageBuffer"),l);r.emptyBuffer=new Uint8Array(0);var n=(u=class{constructor(p){this.socket=p,this._onData=new e.Emitter,this._messageListener=m=>{m.data.arrayBuffer().then(v=>{this._onData.fire(new Uint8Array(v))},()=>{(0,e.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(p){return this.socket.addEventListener("close",p),e.Disposable.create(()=>this.socket.removeEventListener("close",p))}onError(p){return this.socket.addEventListener("error",p),e.Disposable.create(()=>this.socket.removeEventListener("error",p))}onEnd(p){return this.socket.addEventListener("end",p),e.Disposable.create(()=>this.socket.removeEventListener("end",p))}onData(p){return this._onData.event(p)}},s(u,"ReadableStreamWrapper"),u),a=(f=class{constructor(p){this.socket=p}onClose(p){return this.socket.addEventListener("close",p),e.Disposable.create(()=>this.socket.removeEventListener("close",p))}onError(p){return this.socket.addEventListener("error",p),e.Disposable.create(()=>this.socket.removeEventListener("error",p))}onEnd(p){return this.socket.addEventListener("end",p),e.Disposable.create(()=>this.socket.removeEventListener("end",p))}write(p,m){if(typeof p=="string"){if(m!==void 0&&m!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${m}`);this.socket.send(p)}else this.socket.send(p);return Promise.resolve()}end(){this.socket.close()}},s(f,"WritableStreamWrapper"),f),i=new TextEncoder,o=Object.freeze({messageBuffer:Object.freeze({create:s(d=>new r(d),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:s((d,p)=>{if(p.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${p.charset}`);return Promise.resolve(i.encode(JSON.stringify(d,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:s((d,p)=>{if(!(d instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(p.charset).decode(d)))},"decode")})}),stream:Object.freeze({asReadableStream:s(d=>new n(d),"asReadableStream"),asWritableStream:s(d=>new a(d),"asWritableStream")}),console,timer:Object.freeze({setTimeout(d,p,...m){const g=setTimeout(d,p,...m);return{dispose:s(()=>clearTimeout(g),"dispose")}},setImmediate(d,...p){const m=setTimeout(d,0,...p);return{dispose:s(()=>clearTimeout(m),"dispose")}},setInterval(d,p,...m){const g=setInterval(d,p,...m);return{dispose:s(()=>clearInterval(g),"dispose")}}})});function c(){return o}s(c,"RIL"),function(d){function p(){e.RAL.install(o)}s(p,"install"),d.install=p}(c||(c={})),t.default=c}}),jo=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(t){var l,u;var e=t&&t.__createBinding||(Object.create?function(f,d,p,m){m===void 0&&(m=p);var g=Object.getOwnPropertyDescriptor(d,p);(!g||("get"in g?!d.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:s(function(){return d[p]},"get")}),Object.defineProperty(f,m,g)}:function(f,d,p,m){m===void 0&&(m=p),f[m]=d[p]}),r=t&&t.__exportStar||function(f,d){for(var p in f)p!=="default"&&!Object.prototype.hasOwnProperty.call(d,p)&&e(d,f,p)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0;var n=VN();n.default.install();var a=zp();r(zp(),t);var i=(l=class extends a.AbstractMessageReader{constructor(d){super(),this._onData=new a.Emitter,this._messageListener=p=>{this._onData.fire(p.data)},d.addEventListener("error",p=>this.fireError(p)),d.onmessage=this._messageListener}listen(d){return this._onData.event(d)}},s(l,"BrowserMessageReader"),l);t.BrowserMessageReader=i;var o=(u=class extends a.AbstractMessageWriter{constructor(d){super(),this.port=d,this.errorCount=0,d.addEventListener("error",p=>this.fireError(p))}write(d){try{return this.port.postMessage(d),Promise.resolve()}catch(p){return this.handleError(p,d),Promise.reject(p)}}handleError(d,p){this.errorCount++,this.fireError(d,p,this.errorCount)}end(){}},s(u,"BrowserMessageWriter"),u);t.BrowserMessageWriter=o;function c(f,d,p,m){return p===void 0&&(p=a.NullLogger),a.ConnectionStrategy.is(m)&&(m={connectionStrategy:m}),(0,a.createMessageConnection)(f,d,p,m)}s(c,"createMessageConnection"),t.createMessageConnection=c}}),Ay=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(t,e){e.exports=jo()}}),Me=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(t){var l,u,f,d,p;Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;var e=jo(),r;(function(m){m.clientToServer="clientToServer",m.serverToClient="serverToClient",m.both="both"})(r||(t.MessageDirection=r={}));var n=(l=class{constructor(g){this.method=g}},s(l,"RegistrationType"),l);t.RegistrationType=n;var a=(u=class extends e.RequestType0{constructor(g){super(g)}},s(u,"ProtocolRequestType0"),u);t.ProtocolRequestType0=a;var i=(f=class extends e.RequestType{constructor(g){super(g,e.ParameterStructures.byName)}},s(f,"ProtocolRequestType"),f);t.ProtocolRequestType=i;var o=(d=class extends e.NotificationType0{constructor(g){super(g)}},s(d,"ProtocolNotificationType0"),d);t.ProtocolNotificationType0=o;var c=(p=class extends e.NotificationType{constructor(g){super(g,e.ParameterStructures.byName)}},s(p,"ProtocolNotificationType"),p);t.ProtocolNotificationType=c}}),jh=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0;function e(f){return f===!0||f===!1}s(e,"boolean"),t.boolean=e;function r(f){return typeof f=="string"||f instanceof String}s(r,"string"),t.string=r;function n(f){return typeof f=="number"||f instanceof Number}s(n,"number"),t.number=n;function a(f){return f instanceof Error}s(a,"error"),t.error=a;function i(f){return typeof f=="function"}s(i,"func"),t.func=i;function o(f){return Array.isArray(f)}s(o,"array"),t.array=o;function c(f){return o(f)&&f.every(d=>r(d))}s(c,"stringArray"),t.stringArray=c;function l(f,d){return Array.isArray(f)&&f.every(d)}s(l,"typedArray"),t.typedArray=l;function u(f){return f!==null&&typeof f=="object"}s(u,"objectLiteral"),t.objectLiteral=u}}),HN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/implementation",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.ImplementationRequest=r={}))}}),YN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.TypeDefinitionRequest=r={}))}}),XN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;var e=Me(),r;(function(a){a.method="workspace/workspaceFolders",a.messageDirection=e.MessageDirection.serverToClient,a.type=new e.ProtocolRequestType0(a.method)})(r||(t.WorkspaceFoldersRequest=r={}));var n;(function(a){a.method="workspace/didChangeWorkspaceFolders",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolNotificationType(a.method)})(n||(t.DidChangeWorkspaceFoldersNotification=n={}))}}),JN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;var e=Me(),r;(function(n){n.method="workspace/configuration",n.messageDirection=e.MessageDirection.serverToClient,n.type=new e.ProtocolRequestType(n.method)})(r||(t.ConfigurationRequest=r={}))}}),ZN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;var e=Me(),r;(function(a){a.method="textDocument/documentColor",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(r||(t.DocumentColorRequest=r={}));var n;(function(a){a.method="textDocument/colorPresentation",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(n||(t.ColorPresentationRequest=n={}))}}),QN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;var e=Me(),r;(function(a){a.method="textDocument/foldingRange",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(r||(t.FoldingRangeRequest=r={}));var n;(function(a){a.method="workspace/foldingRange/refresh",a.messageDirection=e.MessageDirection.serverToClient,a.type=new e.ProtocolRequestType0(a.method)})(n||(t.FoldingRangeRefreshRequest=n={}))}}),ek=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/declaration",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.DeclarationRequest=r={}))}}),tk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/selectionRange",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.SelectionRangeRequest=r={}))}}),rk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;var e=jo(),r=Me(),n;(function(o){o.type=new e.ProgressType;function c(l){return l===o.type}s(c,"is"),o.is=c})(n||(t.WorkDoneProgress=n={}));var a;(function(o){o.method="window/workDoneProgress/create",o.messageDirection=r.MessageDirection.serverToClient,o.type=new r.ProtocolRequestType(o.method)})(a||(t.WorkDoneProgressCreateRequest=a={}));var i;(function(o){o.method="window/workDoneProgress/cancel",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolNotificationType(o.method)})(i||(t.WorkDoneProgressCancelNotification=i={}))}}),nk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;var e=Me(),r;(function(i){i.method="textDocument/prepareCallHierarchy",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(r||(t.CallHierarchyPrepareRequest=r={}));var n;(function(i){i.method="callHierarchy/incomingCalls",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(n||(t.CallHierarchyIncomingCallsRequest=n={}));var a;(function(i){i.method="callHierarchy/outgoingCalls",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(a||(t.CallHierarchyOutgoingCallsRequest=a={}))}}),ak=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;var e=Me(),r;(function(l){l.Relative="relative"})(r||(t.TokenFormat=r={}));var n;(function(l){l.method="textDocument/semanticTokens",l.type=new e.RegistrationType(l.method)})(n||(t.SemanticTokensRegistrationType=n={}));var a;(function(l){l.method="textDocument/semanticTokens/full",l.messageDirection=e.MessageDirection.clientToServer,l.type=new e.ProtocolRequestType(l.method),l.registrationMethod=n.method})(a||(t.SemanticTokensRequest=a={}));var i;(function(l){l.method="textDocument/semanticTokens/full/delta",l.messageDirection=e.MessageDirection.clientToServer,l.type=new e.ProtocolRequestType(l.method),l.registrationMethod=n.method})(i||(t.SemanticTokensDeltaRequest=i={}));var o;(function(l){l.method="textDocument/semanticTokens/range",l.messageDirection=e.MessageDirection.clientToServer,l.type=new e.ProtocolRequestType(l.method),l.registrationMethod=n.method})(o||(t.SemanticTokensRangeRequest=o={}));var c;(function(l){l.method="workspace/semanticTokens/refresh",l.messageDirection=e.MessageDirection.serverToClient,l.type=new e.ProtocolRequestType0(l.method)})(c||(t.SemanticTokensRefreshRequest=c={}))}}),ik=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;var e=Me(),r;(function(n){n.method="window/showDocument",n.messageDirection=e.MessageDirection.serverToClient,n.type=new e.ProtocolRequestType(n.method)})(r||(t.ShowDocumentRequest=r={}))}}),sk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.LinkedEditingRangeRequest=r={}))}}),ok=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;var e=Me(),r;(function(u){u.file="file",u.folder="folder"})(r||(t.FileOperationPatternKind=r={}));var n;(function(u){u.method="workspace/willCreateFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolRequestType(u.method)})(n||(t.WillCreateFilesRequest=n={}));var a;(function(u){u.method="workspace/didCreateFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolNotificationType(u.method)})(a||(t.DidCreateFilesNotification=a={}));var i;(function(u){u.method="workspace/willRenameFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolRequestType(u.method)})(i||(t.WillRenameFilesRequest=i={}));var o;(function(u){u.method="workspace/didRenameFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolNotificationType(u.method)})(o||(t.DidRenameFilesNotification=o={}));var c;(function(u){u.method="workspace/didDeleteFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolNotificationType(u.method)})(c||(t.DidDeleteFilesNotification=c={}));var l;(function(u){u.method="workspace/willDeleteFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolRequestType(u.method)})(l||(t.WillDeleteFilesRequest=l={}))}}),lk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;var e=Me(),r;(function(i){i.document="document",i.project="project",i.group="group",i.scheme="scheme",i.global="global"})(r||(t.UniquenessLevel=r={}));var n;(function(i){i.$import="import",i.$export="export",i.local="local"})(n||(t.MonikerKind=n={}));var a;(function(i){i.method="textDocument/moniker",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(a||(t.MonikerRequest=a={}))}}),ck=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;var e=Me(),r;(function(i){i.method="textDocument/prepareTypeHierarchy",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(r||(t.TypeHierarchyPrepareRequest=r={}));var n;(function(i){i.method="typeHierarchy/supertypes",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(n||(t.TypeHierarchySupertypesRequest=n={}));var a;(function(i){i.method="typeHierarchy/subtypes",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(a||(t.TypeHierarchySubtypesRequest=a={}))}}),uk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;var e=Me(),r;(function(a){a.method="textDocument/inlineValue",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(r||(t.InlineValueRequest=r={}));var n;(function(a){a.method="workspace/inlineValue/refresh",a.messageDirection=e.MessageDirection.serverToClient,a.type=new e.ProtocolRequestType0(a.method)})(n||(t.InlineValueRefreshRequest=n={}))}}),fk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;var e=Me(),r;(function(i){i.method="textDocument/inlayHint",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(r||(t.InlayHintRequest=r={}));var n;(function(i){i.method="inlayHint/resolve",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(n||(t.InlayHintResolveRequest=n={}));var a;(function(i){i.method="workspace/inlayHint/refresh",i.messageDirection=e.MessageDirection.serverToClient,i.type=new e.ProtocolRequestType0(i.method)})(a||(t.InlayHintRefreshRequest=a={}))}}),dk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;var e=jo(),r=jh(),n=Me(),a;(function(u){function f(d){const p=d;return p&&r.boolean(p.retriggerRequest)}s(f,"is"),u.is=f})(a||(t.DiagnosticServerCancellationData=a={}));var i;(function(u){u.Full="full",u.Unchanged="unchanged"})(i||(t.DocumentDiagnosticReportKind=i={}));var o;(function(u){u.method="textDocument/diagnostic",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.partialResult=new e.ProgressType})(o||(t.DocumentDiagnosticRequest=o={}));var c;(function(u){u.method="workspace/diagnostic",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.partialResult=new e.ProgressType})(c||(t.WorkspaceDiagnosticRequest=c={}));var l;(function(u){u.method="workspace/diagnostic/refresh",u.messageDirection=n.MessageDirection.serverToClient,u.type=new n.ProtocolRequestType0(u.method)})(l||(t.DiagnosticRefreshRequest=l={}))}}),pk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;var e=(hc(),Gh(uf)),r=jh(),n=Me(),a;(function(g){g.Markup=1,g.Code=2;function v(E){return E===1||E===2}s(v,"is"),g.is=v})(a||(t.NotebookCellKind=a={}));var i;(function(g){function v(w,C){const k={executionOrder:w};return(C===!0||C===!1)&&(k.success=C),k}s(v,"create"),g.create=v;function E(w){const C=w;return r.objectLiteral(C)&&e.uinteger.is(C.executionOrder)&&(C.success===void 0||r.boolean(C.success))}s(E,"is"),g.is=E;function T(w,C){return w===C?!0:w==null||C===null||C===void 0?!1:w.executionOrder===C.executionOrder&&w.success===C.success}s(T,"equals"),g.equals=T})(i||(t.ExecutionSummary=i={}));var o;(function(g){function v(C,k){return{kind:C,document:k}}s(v,"create"),g.create=v;function E(C){const k=C;return r.objectLiteral(k)&&a.is(k.kind)&&e.DocumentUri.is(k.document)&&(k.metadata===void 0||r.objectLiteral(k.metadata))}s(E,"is"),g.is=E;function T(C,k){const B=new Set;return C.document!==k.document&&B.add("document"),C.kind!==k.kind&&B.add("kind"),C.executionSummary!==k.executionSummary&&B.add("executionSummary"),(C.metadata!==void 0||k.metadata!==void 0)&&!w(C.metadata,k.metadata)&&B.add("metadata"),(C.executionSummary!==void 0||k.executionSummary!==void 0)&&!i.equals(C.executionSummary,k.executionSummary)&&B.add("executionSummary"),B}s(T,"diff"),g.diff=T;function w(C,k){if(C===k)return!0;if(C==null||k===null||k===void 0||typeof C!=typeof k||typeof C!="object")return!1;const B=Array.isArray(C),re=Array.isArray(k);if(B!==re)return!1;if(B&&re){if(C.length!==k.length)return!1;for(let X=0;X<C.length;X++)if(!w(C[X],k[X]))return!1}if(r.objectLiteral(C)&&r.objectLiteral(k)){const X=Object.keys(C),ge=Object.keys(k);if(X.length!==ge.length||(X.sort(),ge.sort(),!w(X,ge)))return!1;for(let _e=0;_e<X.length;_e++){const Ie=X[_e];if(!w(C[Ie],k[Ie]))return!1}}return!0}s(w,"equalsMetadata")})(o||(t.NotebookCell=o={}));var c;(function(g){function v(T,w,C,k){return{uri:T,notebookType:w,version:C,cells:k}}s(v,"create"),g.create=v;function E(T){const w=T;return r.objectLiteral(w)&&r.string(w.uri)&&e.integer.is(w.version)&&r.typedArray(w.cells,o.is)}s(E,"is"),g.is=E})(c||(t.NotebookDocument=c={}));var l;(function(g){g.method="notebookDocument/sync",g.messageDirection=n.MessageDirection.clientToServer,g.type=new n.RegistrationType(g.method)})(l||(t.NotebookDocumentSyncRegistrationType=l={}));var u;(function(g){g.method="notebookDocument/didOpen",g.messageDirection=n.MessageDirection.clientToServer,g.type=new n.ProtocolNotificationType(g.method),g.registrationMethod=l.method})(u||(t.DidOpenNotebookDocumentNotification=u={}));var f;(function(g){function v(T){const w=T;return r.objectLiteral(w)&&e.uinteger.is(w.start)&&e.uinteger.is(w.deleteCount)&&(w.cells===void 0||r.typedArray(w.cells,o.is))}s(v,"is"),g.is=v;function E(T,w,C){const k={start:T,deleteCount:w};return C!==void 0&&(k.cells=C),k}s(E,"create"),g.create=E})(f||(t.NotebookCellArrayChange=f={}));var d;(function(g){g.method="notebookDocument/didChange",g.messageDirection=n.MessageDirection.clientToServer,g.type=new n.ProtocolNotificationType(g.method),g.registrationMethod=l.method})(d||(t.DidChangeNotebookDocumentNotification=d={}));var p;(function(g){g.method="notebookDocument/didSave",g.messageDirection=n.MessageDirection.clientToServer,g.type=new n.ProtocolNotificationType(g.method),g.registrationMethod=l.method})(p||(t.DidSaveNotebookDocumentNotification=p={}));var m;(function(g){g.method="notebookDocument/didClose",g.messageDirection=n.MessageDirection.clientToServer,g.type=new n.ProtocolNotificationType(g.method),g.registrationMethod=l.method})(m||(t.DidCloseNotebookDocumentNotification=m={}))}}),hk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.InlineCompletionRequest=r={}))}}),mk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;var e=Me(),r=(hc(),Gh(uf)),n=jh(),a=HN();Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:s(function(){return a.ImplementationRequest},"get")});var i=YN();Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:s(function(){return i.TypeDefinitionRequest},"get")});var o=XN();Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:s(function(){return o.WorkspaceFoldersRequest},"get")}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:s(function(){return o.DidChangeWorkspaceFoldersNotification},"get")});var c=JN();Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:s(function(){return c.ConfigurationRequest},"get")});var l=ZN();Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:s(function(){return l.DocumentColorRequest},"get")}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:s(function(){return l.ColorPresentationRequest},"get")});var u=QN();Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:s(function(){return u.FoldingRangeRequest},"get")}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:s(function(){return u.FoldingRangeRefreshRequest},"get")});var f=ek();Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:s(function(){return f.DeclarationRequest},"get")});var d=tk();Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:s(function(){return d.SelectionRangeRequest},"get")});var p=rk();Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:s(function(){return p.WorkDoneProgress},"get")}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:s(function(){return p.WorkDoneProgressCreateRequest},"get")}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:s(function(){return p.WorkDoneProgressCancelNotification},"get")});var m=nk();Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:s(function(){return m.CallHierarchyIncomingCallsRequest},"get")}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:s(function(){return m.CallHierarchyOutgoingCallsRequest},"get")}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:s(function(){return m.CallHierarchyPrepareRequest},"get")});var g=ak();Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:s(function(){return g.TokenFormat},"get")}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:s(function(){return g.SemanticTokensRequest},"get")}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:s(function(){return g.SemanticTokensDeltaRequest},"get")}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:s(function(){return g.SemanticTokensRangeRequest},"get")}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:s(function(){return g.SemanticTokensRefreshRequest},"get")}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:s(function(){return g.SemanticTokensRegistrationType},"get")});var v=ik();Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:s(function(){return v.ShowDocumentRequest},"get")});var E=sk();Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:s(function(){return E.LinkedEditingRangeRequest},"get")});var T=ok();Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:s(function(){return T.FileOperationPatternKind},"get")}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:s(function(){return T.DidCreateFilesNotification},"get")}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:s(function(){return T.WillCreateFilesRequest},"get")}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:s(function(){return T.DidRenameFilesNotification},"get")}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:s(function(){return T.WillRenameFilesRequest},"get")}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:s(function(){return T.DidDeleteFilesNotification},"get")}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:s(function(){return T.WillDeleteFilesRequest},"get")});var w=lk();Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:s(function(){return w.UniquenessLevel},"get")}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:s(function(){return w.MonikerKind},"get")}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:s(function(){return w.MonikerRequest},"get")});var C=ck();Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:s(function(){return C.TypeHierarchyPrepareRequest},"get")}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:s(function(){return C.TypeHierarchySubtypesRequest},"get")}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:s(function(){return C.TypeHierarchySupertypesRequest},"get")});var k=uk();Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:s(function(){return k.InlineValueRequest},"get")}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:s(function(){return k.InlineValueRefreshRequest},"get")});var B=fk();Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:s(function(){return B.InlayHintRequest},"get")}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:s(function(){return B.InlayHintResolveRequest},"get")}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:s(function(){return B.InlayHintRefreshRequest},"get")});var re=dk();Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:s(function(){return re.DiagnosticServerCancellationData},"get")}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:s(function(){return re.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:s(function(){return re.DocumentDiagnosticRequest},"get")}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:s(function(){return re.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:s(function(){return re.DiagnosticRefreshRequest},"get")});var X=pk();Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:s(function(){return X.NotebookCellKind},"get")}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:s(function(){return X.ExecutionSummary},"get")}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:s(function(){return X.NotebookCell},"get")}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:s(function(){return X.NotebookDocument},"get")}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:s(function(){return X.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:s(function(){return X.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:s(function(){return X.NotebookCellArrayChange},"get")}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:s(function(){return X.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:s(function(){return X.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:s(function(){return X.DidCloseNotebookDocumentNotification},"get")});var ge=hk();Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:s(function(){return ge.InlineCompletionRequest},"get")});var _e;(function(h){function se(ke){const H=ke;return n.string(H)||n.string(H.language)||n.string(H.scheme)||n.string(H.pattern)}s(se,"is"),h.is=se})(_e||(t.TextDocumentFilter=_e={}));var Ie;(function(h){function se(ke){const H=ke;return n.objectLiteral(H)&&(n.string(H.notebookType)||n.string(H.scheme)||n.string(H.pattern))}s(se,"is"),h.is=se})(Ie||(t.NotebookDocumentFilter=Ie={}));var oe;(function(h){function se(ke){const H=ke;return n.objectLiteral(H)&&(n.string(H.notebook)||Ie.is(H.notebook))&&(H.language===void 0||n.string(H.language))}s(se,"is"),h.is=se})(oe||(t.NotebookCellTextDocumentFilter=oe={}));var tt;(function(h){function se(ke){if(!Array.isArray(ke))return!1;for(let H of ke)if(!n.string(H)&&!_e.is(H)&&!oe.is(H))return!1;return!0}s(se,"is"),h.is=se})(tt||(t.DocumentSelector=tt={}));var P;(function(h){h.method="client/registerCapability",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(P||(t.RegistrationRequest=P={}));var S;(function(h){h.method="client/unregisterCapability",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(S||(t.UnregistrationRequest=S={}));var R;(function(h){h.Create="create",h.Rename="rename",h.Delete="delete"})(R||(t.ResourceOperationKind=R={}));var I;(function(h){h.Abort="abort",h.Transactional="transactional",h.TextOnlyTransactional="textOnlyTransactional",h.Undo="undo"})(I||(t.FailureHandlingKind=I={}));var $;(function(h){h.UTF8="utf-8",h.UTF16="utf-16",h.UTF32="utf-32"})($||(t.PositionEncodingKind=$={}));var A;(function(h){function se(ke){const H=ke;return H&&n.string(H.id)&&H.id.length>0}s(se,"hasId"),h.hasId=se})(A||(t.StaticRegistrationOptions=A={}));var b;(function(h){function se(ke){const H=ke;return H&&(H.documentSelector===null||tt.is(H.documentSelector))}s(se,"is"),h.is=se})(b||(t.TextDocumentRegistrationOptions=b={}));var O;(function(h){function se(H){const Oe=H;return n.objectLiteral(Oe)&&(Oe.workDoneProgress===void 0||n.boolean(Oe.workDoneProgress))}s(se,"is"),h.is=se;function ke(H){const Oe=H;return Oe&&n.boolean(Oe.workDoneProgress)}s(ke,"hasWorkDoneProgress"),h.hasWorkDoneProgress=ke})(O||(t.WorkDoneProgressOptions=O={}));var M;(function(h){h.method="initialize",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(M||(t.InitializeRequest=M={}));var L;(function(h){h.unknownProtocolVersion=1})(L||(t.InitializeErrorCodes=L={}));var j;(function(h){h.method="initialized",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(j||(t.InitializedNotification=j={}));var F;(function(h){h.method="shutdown",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType0(h.method)})(F||(t.ShutdownRequest=F={}));var te;(function(h){h.method="exit",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType0(h.method)})(te||(t.ExitNotification=te={}));var U;(function(h){h.method="workspace/didChangeConfiguration",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(U||(t.DidChangeConfigurationNotification=U={}));var Q;(function(h){h.Error=1,h.Warning=2,h.Info=3,h.Log=4,h.Debug=5})(Q||(t.MessageType=Q={}));var fe;(function(h){h.method="window/showMessage",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(fe||(t.ShowMessageNotification=fe={}));var de;(function(h){h.method="window/showMessageRequest",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(de||(t.ShowMessageRequest=de={}));var pe;(function(h){h.method="window/logMessage",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(pe||(t.LogMessageNotification=pe={}));var ye;(function(h){h.method="telemetry/event",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(ye||(t.TelemetryEventNotification=ye={}));var Ne;(function(h){h.None=0,h.Full=1,h.Incremental=2})(Ne||(t.TextDocumentSyncKind=Ne={}));var he;(function(h){h.method="textDocument/didOpen",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(he||(t.DidOpenTextDocumentNotification=he={}));var J;(function(h){function se(H){let Oe=H;return Oe!=null&&typeof Oe.text=="string"&&Oe.range!==void 0&&(Oe.rangeLength===void 0||typeof Oe.rangeLength=="number")}s(se,"isIncremental"),h.isIncremental=se;function ke(H){let Oe=H;return Oe!=null&&typeof Oe.text=="string"&&Oe.range===void 0&&Oe.rangeLength===void 0}s(ke,"isFull"),h.isFull=ke})(J||(t.TextDocumentContentChangeEvent=J={}));var Ue;(function(h){h.method="textDocument/didChange",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Ue||(t.DidChangeTextDocumentNotification=Ue={}));var le;(function(h){h.method="textDocument/didClose",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(le||(t.DidCloseTextDocumentNotification=le={}));var He;(function(h){h.method="textDocument/didSave",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(He||(t.DidSaveTextDocumentNotification=He={}));var ve;(function(h){h.Manual=1,h.AfterDelay=2,h.FocusOut=3})(ve||(t.TextDocumentSaveReason=ve={}));var x;(function(h){h.method="textDocument/willSave",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(x||(t.WillSaveTextDocumentNotification=x={}));var ze;(function(h){h.method="textDocument/willSaveWaitUntil",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ze||(t.WillSaveTextDocumentWaitUntilRequest=ze={}));var Xt;(function(h){h.method="workspace/didChangeWatchedFiles",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Xt||(t.DidChangeWatchedFilesNotification=Xt={}));var Nt;(function(h){h.Created=1,h.Changed=2,h.Deleted=3})(Nt||(t.FileChangeType=Nt={}));var Te;(function(h){function se(ke){const H=ke;return n.objectLiteral(H)&&(r.URI.is(H.baseUri)||r.WorkspaceFolder.is(H.baseUri))&&n.string(H.pattern)}s(se,"is"),h.is=se})(Te||(t.RelativePattern=Te={}));var la;(function(h){h.Create=1,h.Change=2,h.Delete=4})(la||(t.WatchKind=la={}));var Xo;(function(h){h.method="textDocument/publishDiagnostics",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(Xo||(t.PublishDiagnosticsNotification=Xo={}));var Jo;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.TriggerForIncompleteCompletions=3})(Jo||(t.CompletionTriggerKind=Jo={}));var Zo;(function(h){h.method="textDocument/completion",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Zo||(t.CompletionRequest=Zo={}));var Qo;(function(h){h.method="completionItem/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Qo||(t.CompletionResolveRequest=Qo={}));var ca;(function(h){h.method="textDocument/hover",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ca||(t.HoverRequest=ca={}));var ua;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.ContentChange=3})(ua||(t.SignatureHelpTriggerKind=ua={}));var Jt;(function(h){h.method="textDocument/signatureHelp",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Jt||(t.SignatureHelpRequest=Jt={}));var fa;(function(h){h.method="textDocument/definition",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(fa||(t.DefinitionRequest=fa={}));var el;(function(h){h.method="textDocument/references",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(el||(t.ReferencesRequest=el={}));var tl;(function(h){h.method="textDocument/documentHighlight",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(tl||(t.DocumentHighlightRequest=tl={}));var da;(function(h){h.method="textDocument/documentSymbol",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(da||(t.DocumentSymbolRequest=da={}));var pa;(function(h){h.method="textDocument/codeAction",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(pa||(t.CodeActionRequest=pa={}));var rl;(function(h){h.method="codeAction/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(rl||(t.CodeActionResolveRequest=rl={}));var Dc;(function(h){h.method="workspace/symbol",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Dc||(t.WorkspaceSymbolRequest=Dc={}));var nl;(function(h){h.method="workspaceSymbol/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(nl||(t.WorkspaceSymbolResolveRequest=nl={}));var al;(function(h){h.method="textDocument/codeLens",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(al||(t.CodeLensRequest=al={}));var il;(function(h){h.method="codeLens/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(il||(t.CodeLensResolveRequest=il={}));var sl;(function(h){h.method="workspace/codeLens/refresh",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType0(h.method)})(sl||(t.CodeLensRefreshRequest=sl={}));var kt;(function(h){h.method="textDocument/documentLink",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(kt||(t.DocumentLinkRequest=kt={}));var ol;(function(h){h.method="documentLink/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ol||(t.DocumentLinkResolveRequest=ol={}));var ll;(function(h){h.method="textDocument/formatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ll||(t.DocumentFormattingRequest=ll={}));var Fr;(function(h){h.method="textDocument/rangeFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Fr||(t.DocumentRangeFormattingRequest=Fr={}));var cl;(function(h){h.method="textDocument/rangesFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(cl||(t.DocumentRangesFormattingRequest=cl={}));var nn;(function(h){h.method="textDocument/onTypeFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(nn||(t.DocumentOnTypeFormattingRequest=nn={}));var ul;(function(h){h.Identifier=1})(ul||(t.PrepareSupportDefaultBehavior=ul={}));var Zt;(function(h){h.method="textDocument/rename",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Zt||(t.RenameRequest=Zt={}));var gr;(function(h){h.method="textDocument/prepareRename",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(gr||(t.PrepareRenameRequest=gr={}));var fl;(function(h){h.method="workspace/executeCommand",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(fl||(t.ExecuteCommandRequest=fl={}));var dl;(function(h){h.method="workspace/applyEdit",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType("workspace/applyEdit")})(dl||(t.ApplyWorkspaceEditRequest=dl={}))}}),gk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;var e=jo();function r(n,a,i,o){return e.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,e.createMessageConnection)(n,a,i,o)}s(r,"createProtocolConnection"),t.createProtocolConnection=r}}),yk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(t){var e=t&&t.__createBinding||(Object.create?function(i,o,c,l){l===void 0&&(l=c);var u=Object.getOwnPropertyDescriptor(o,c);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:s(function(){return o[c]},"get")}),Object.defineProperty(i,l,u)}:function(i,o,c,l){l===void 0&&(l=c),i[l]=o[c]}),r=t&&t.__exportStar||function(i,o){for(var c in i)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&e(o,i,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(jo(),t),r((hc(),Gh(uf)),t),r(Me(),t),r(mk(),t);var n=gk();Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:s(function(){return n.createProtocolConnection},"get")});var a;(function(i){i.lspReservedErrorRangeStart=-32899,i.RequestFailed=-32803,i.ServerCancelled=-32802,i.ContentModified=-32801,i.RequestCancelled=-32800,i.lspReservedErrorRangeEnd=-32800})(a||(t.LSPErrorCodes=a={}))}}),vk=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(t){var e=t&&t.__createBinding||(Object.create?function(i,o,c,l){l===void 0&&(l=c);var u=Object.getOwnPropertyDescriptor(o,c);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:s(function(){return o[c]},"get")}),Object.defineProperty(i,l,u)}:function(i,o,c,l){l===void 0&&(l=c),i[l]=o[c]}),r=t&&t.__exportStar||function(i,o){for(var c in i)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&e(o,i,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;var n=Ay();r(Ay(),t),r(yk(),t);function a(i,o,c,l){return(0,n.createMessageConnection)(i,o,c,l)}s(a,"createProtocolConnection"),t.createProtocolConnection=a}}),gT={};Zr(gT,{AbstractAstReflection:()=>Bh,AbstractCstNode:()=>Kg,AbstractLangiumParser:()=>Wg,AbstractParserErrorMessageProvider:()=>aI,AbstractThreadedAsyncParser:()=>Kj,AstUtils:()=>Kh,BiMap:()=>af,Cancellation:()=>Ae,CompositeCstNodeImpl:()=>od,ContextCache:()=>hd,CstNodeBuilder:()=>tI,CstUtils:()=>Uh,DEFAULT_TOKENIZE_OPTIONS:()=>uy,DONE_RESULT:()=>nt,DatatypeSymbol:()=>ef,DefaultAstNodeDescriptionProvider:()=>LI,DefaultAstNodeLocator:()=>MI,DefaultAsyncParser:()=>eN,DefaultCommentProvider:()=>QI,DefaultConfigurationProvider:()=>xI,DefaultDocumentBuilder:()=>FI,DefaultDocumentValidator:()=>OI,DefaultHydrator:()=>rN,DefaultIndexManager:()=>GI,DefaultJsonSerializer:()=>II,DefaultLangiumDocumentFactory:()=>RI,DefaultLangiumDocuments:()=>$I,DefaultLangiumProfiler:()=>Yj,DefaultLexer:()=>fy,DefaultLexerErrorMessageProvider:()=>UI,DefaultLinker:()=>AI,DefaultNameProvider:()=>EI,DefaultReferenceDescriptionProvider:()=>DI,DefaultReferences:()=>_I,DefaultScopeComputation:()=>CI,DefaultScopeProvider:()=>wI,DefaultServiceRegistry:()=>NI,DefaultTokenBuilder:()=>ud,DefaultValueConverter:()=>Qg,DefaultWorkspaceLock:()=>tN,DefaultWorkspaceManager:()=>jI,Deferred:()=>Pr,Disposable:()=>Ln,DisposableCache:()=>pd,DocumentCache:()=>bI,DocumentState:()=>Z,DocumentValidator:()=>Ot,EMPTY_SCOPE:()=>jj,EMPTY_STREAM:()=>bo,EmptyFileSystem:()=>Gt,EmptyFileSystemProvider:()=>iN,ErrorWithLocation:()=>Rf,GrammarAST:()=>TT,GrammarUtils:()=>Rm,IndentationAwareLexer:()=>Wj,IndentationAwareTokenBuilder:()=>aN,JSDocDocumentationProvider:()=>ZI,LangiumCompletionParser:()=>iI,LangiumParser:()=>nI,LangiumParserErrorMessageProvider:()=>Vg,LeafCstNodeImpl:()=>Qu,LexingMode:()=>Pn,MapScope:()=>Gj,Module:()=>Eh,MultiMap:()=>Or,MultiMapScope:()=>SI,OperationCancelled:()=>sr,ParserWorker:()=>qj,ProfilingTask:()=>oN,Reduction:()=>Jl,RefResolving:()=>hn,RegExpUtils:()=>Am,RootCstNodeImpl:()=>qg,SimpleCache:()=>iy,StreamImpl:()=>ir,StreamScope:()=>Th,TextDocument:()=>rf,TreeStreamImpl:()=>wo,URI:()=>Rt,UriTrie:()=>ny,UriUtils:()=>it,VALIDATE_EACH_NODE:()=>PI,ValidationCategory:()=>sf,ValidationRegistry:()=>kI,ValueConverter:()=>nr,WorkspaceCache:()=>sy,assertCondition:()=>$m,assertUnreachable:()=>Qr,createCompletionParser:()=>Xg,createDefaultCoreModule:()=>St,createDefaultSharedCoreModule:()=>bt,createGrammarConfig:()=>jm,createLangiumParser:()=>Jg,createParser:()=>ld,delayNextTick:()=>fd,diagnosticData:()=>kn,eagerLoad:()=>vy,getDiagnosticRange:()=>ly,indentationBuilderDefaultOptions:()=>Ch,inject:()=>Pe,interruptAndCheck:()=>Ye,isAstNode:()=>Be,isAstNodeDescription:()=>zh,isAstNodeWithComment:()=>oy,isCompositeCstNode:()=>_r,isIMultiModeLexerDefinition:()=>yd,isJSDoc:()=>py,isLeafCstNode:()=>zn,isLinkingError:()=>yn,isMultiReference:()=>or,isNamed:()=>ay,isOperationCancelled:()=>oa,isReference:()=>at,isRootCstNode:()=>df,isTokenTypeArray:()=>gd,isTokenTypeDictionary:()=>of,loadGrammarFromJson:()=>wt,parseJSDoc:()=>dy,prepareLangiumParser:()=>Zg,setInterruptionPeriod:()=>ey,startCancelableOperation:()=>dd,stream:()=>ue,toDiagnosticData:()=>cy,toDiagnosticSeverity:()=>Yl});var Uh={};Zr(Uh,{DefaultNameRegexp:()=>mm,RangeComparison:()=>ar,compareRange:()=>pm,findCommentNode:()=>gm,findDeclarationNodeAtOffset:()=>FT,findLeafNodeAtOffset:()=>Tf,findLeafNodeBeforeOffset:()=>ym,flattenCst:()=>xT,getDatatypeNode:()=>MT,getInteriorNodes:()=>UT,getNextNode:()=>GT,getPreviousNode:()=>Tm,getStartlineNode:()=>jT,inRange:()=>hm,isChildNode:()=>dm,isCommentNode:()=>Fu,streamCst:()=>Po,toDocumentSegment:()=>Oo,tokenToRange:()=>Zl});function Be(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}s(Be,"isAstNode");function at(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}s(at,"isReference");function or(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}s(or,"isMultiReference");function zh(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}s(zh,"isAstNodeDescription");function yn(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}s(yn,"isLinkingError");var za,Bh=(za=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var a;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=(a=r.properties[e.property])==null?void 0:a.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const r=this.types[e];return r||{name:e,properties:{},superTypes:[]}}isInstance(e,r){return Be(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const a=n[r];if(a!==void 0)return a;{const i=this.types[e],o=i?i.superTypes.some(c=>this.isSubtype(c,r)):!1;return n[r]=o,o}}getAllSubTypes(e){const r=this.allSubtypes[e];if(r)return r;{const n=this.getAllTypes(),a=[];for(const i of n)this.isSubtype(i,e)&&a.push(i);return this.allSubtypes[e]=a,a}}},s(za,"AbstractAstReflection"),za);function _r(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}s(_r,"isCompositeCstNode");function zn(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}s(zn,"isLeafCstNode");function df(t){return _r(t)&&typeof t.fullText=="string"}s(df,"isRootCstNode");var ht,ir=(ht=class{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){const e={state:this.startFn(),next:s(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){const e=[],r=this.iterator();let n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){const n=this.map(a=>[e?e(a):a,r?r(a):a]);return new Map(n)}toString(){return this.join()}concat(e){return new ht(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return nt})}join(e=","){const r=this.iterator();let n="",a,i=!1;do a=r.next(),a.done||(i&&(n+=e),n+=yT(a.value)),i=!0;while(!a.done);return n}indexOf(e,r=0){const n=this.iterator();let a=0,i=n.next();for(;!i.done;){if(a>=r&&i.value===e)return a;i=n.next(),a++}return-1}every(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){const r=this.iterator();let n=0,a=r.next();for(;!a.done;)e(a.value,n),a=r.next(),n++}map(e){return new ht(this.startFn,r=>{const{done:n,value:a}=this.nextFn(r);return n?nt:{done:!1,value:e(a)}})}filter(e){return new ht(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return nt})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){const n=this.iterator();let a=r,i=n.next();for(;!i.done;)a===void 0?a=i.value:a=e(a,i.value),i=n.next();return a}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){const a=e.next();if(a.done)return n;const i=this.recursiveReduce(e,r,n);return i===void 0?a.value:r(i,a.value)}find(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){const r=this.iterator();let n=0,a=r.next();for(;!a.done;){if(e(a.value))return n;a=r.next(),n++}return-1}includes(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new ht(()=>({this:this.startFn()}),r=>{do{if(r.iterator){const i=r.iterator.next();if(i.done)r.iterator=void 0;else return i}const{done:n,value:a}=this.nextFn(r.this);if(!n){const i=e(a);if(Xl(i))r.iterator=i[Symbol.iterator]();else return{done:!1,value:i}}}while(r.iterator);return nt})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new ht(()=>({this:r.startFn()}),n=>{do{if(n.iterator){const o=n.iterator.next();if(o.done)n.iterator=void 0;else return o}const{done:a,value:i}=r.nextFn(n.this);if(!a)if(Xl(i))n.iterator=i[Symbol.iterator]();else return{done:!1,value:i}}while(n.iterator);return nt})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new ht(()=>{const r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new ht(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?nt:this.nextFn(r.state)))}distinct(e){return new ht(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){const a=e?e(n.value):n.value;if(!r.set.has(a))return r.set.add(a),n}while(!n.done);return nt})}exclude(e,r){const n=new Set;for(const a of e){const i=r?r(a):a;n.add(i)}return this.filter(a=>{const i=r?r(a):a;return!n.has(i)})}},s(ht,"StreamImpl"),ht);function yT(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}s(yT,"toString");function Xl(t){return!!t&&typeof t[Symbol.iterator]=="function"}s(Xl,"isIterable");var bo=new ir(()=>{},()=>nt),nt=Object.freeze({done:!0,value:void 0});function ue(...t){if(t.length===1){const e=t[0];if(e instanceof ir)return e;if(Xl(e))return new ir(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new ir(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:nt)}return t.length>1?new ir(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const r=t[e.collIndex++];Xl(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return nt}):bo}s(ue,"stream");var Ba,wo=(Ba=class extends ir{constructor(e,r,n){super(()=>({iterators:n!=null&&n.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),a=>{for(a.pruned&&(a.iterators.pop(),a.pruned=!1);a.iterators.length>0;){const o=a.iterators[a.iterators.length-1].next();if(o.done)a.iterators.pop();else return a.iterators.push(r(o.value)[Symbol.iterator]()),o}return nt})}iterator(){const e={state:this.startFn(),next:s(()=>this.nextFn(e.state),"next"),prune:s(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},s(Ba,"TreeStreamImpl"),Ba),Jl;(function(t){function e(i){return i.reduce((o,c)=>o+c,0)}s(e,"sum"),t.sum=e;function r(i){return i.reduce((o,c)=>o*c,0)}s(r,"product"),t.product=r;function n(i){return i.reduce((o,c)=>Math.min(o,c))}s(n,"min"),t.min=n;function a(i){return i.reduce((o,c)=>Math.max(o,c))}s(a,"max"),t.max=a})(Jl||(Jl={}));var Kh={};Zr(Kh,{assignMandatoryProperties:()=>qh,copyAstNode:()=>_u,findRootNode:()=>Fa,getContainerOfType:()=>Bn,getDocument:()=>Bt,getReferenceNodes:()=>Au,hasContainerOfType:()=>vT,linkContentToContainer:()=>Io,streamAllContents:()=>Lr,streamAst:()=>Kt,streamContents:()=>gc,streamReferences:()=>No});function Io(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((a,i)=>{Be(a)&&(a.$container=t,a.$containerProperty=r,a.$containerIndex=i,e.deep&&Io(a,e))}):Be(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&Io(n,e)))}s(Io,"linkContentToContainer");function Bn(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}s(Bn,"getContainerOfType");function vT(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}s(vT,"hasContainerOfType");function Bt(t){const r=Fa(t).$document;if(!r)throw new Error("AST node has no document.");return r}s(Bt,"getDocument");function Fa(t){for(;t.$container;)t=t.$container;return t}s(Fa,"findRootNode");function Au(t){return at(t)?t.ref?[t.ref]:[]:or(t)?t.items.map(e=>e.ref):[]}s(Au,"getReferenceNodes");function gc(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e==null?void 0:e.range;return new ir(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){const a=n.keys[n.keyIndex];if(!a.startsWith("$")){const i=t[a];if(Be(i)){if(n.keyIndex++,Eu(i,r))return{done:!1,value:i}}else if(Array.isArray(i)){for(;n.arrayIndex<i.length;){const o=n.arrayIndex++,c=i[o];if(Be(c)&&Eu(c,r))return{done:!1,value:c}}n.arrayIndex=0}}n.keyIndex++}return nt})}s(gc,"streamContents");function Lr(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new wo(t,r=>gc(r,e))}s(Lr,"streamAllContents");function Kt(t,e){if(t){if(e!=null&&e.range&&!Eu(t,e.range))return new wo(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new wo(t,r=>gc(r,e),{includeRoot:!0})}s(Kt,"streamAst");function Eu(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)==null?void 0:n.range;return r?hm(r,e):!1}s(Eu,"isAstNodeInRange");function No(t){return new ir(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const r=e.keys[e.keyIndex];if(!r.startsWith("$")){const n=t[r];if(at(n)||or(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){const a=e.arrayIndex++,i=n[a];if(at(i)||or(n))return{done:!1,value:{reference:i,container:t,property:r,index:a}}}e.arrayIndex=0}}e.keyIndex++}return nt})}s(No,"streamReferences");function qh(t,e){const r=t.getTypeMetaData(e.$type),n=e;for(const a of Object.values(r.properties))a.defaultValue!==void 0&&n[a.name]===void 0&&(n[a.name]=Wh(a.defaultValue))}s(qh,"assignMandatoryProperties");function Wh(t){return Array.isArray(t)?[...t.map(Wh)]:t}s(Wh,"copyDefaultValue");function _u(t,e,r){const n={$type:t.$type};r&&(r.set(t,n),r.set(n,t));for(const[a,i]of Object.entries(t))if(!a.startsWith("$"))if(Be(i))n[a]=_u(i,e,r);else if(at(i))n[a]=e(n,a,i.$refNode,i.$refText,i);else if(Array.isArray(i)){const o=[];for(const c of i)Be(c)?o.push(_u(c,e,r)):at(c)?o.push(e(n,a,c.$refNode,c.$refText,c)):o.push(c);n[a]=o}else n[a]=i;return Io(n,{deep:!0}),n}s(_u,"copyAstNode");var TT={};Zr(TT,{AbstractElement:()=>dt,AbstractParserRule:()=>Dl,AbstractRule:()=>Na,AbstractType:()=>Tt,Action:()=>Ur,Alternatives:()=>Ml,ArrayLiteral:()=>Cu,ArrayType:()=>Su,Assignment:()=>zr,BooleanLiteral:()=>bu,CharacterRange:()=>Br,Condition:()=>Kr,Conjunction:()=>xl,CrossReference:()=>qr,Disjunction:()=>Fl,EndOfFile:()=>wu,Grammar:()=>$r,GrammarImport:()=>Iu,Group:()=>vn,InferredType:()=>Nu,InfixRule:()=>rr,InfixRuleOperatorList:()=>Gl,InfixRuleOperators:()=>ku,Interface:()=>ka,Keyword:()=>Pa,LangiumGrammarAstReflection:()=>fm,LangiumGrammarTerminals:()=>Tk,NamedArgument:()=>Oa,NegatedToken:()=>Tn,Negation:()=>Pu,NumberLiteral:()=>Ou,Parameter:()=>La,ParameterReference:()=>Lu,ParserRule:()=>jt,ReferenceType:()=>jl,RegexToken:()=>Rn,ReturnType:()=>Du,RuleCall:()=>$n,SimpleType:()=>Da,StringLiteral:()=>Mu,TerminalAlternatives:()=>An,TerminalElement:()=>pt,TerminalGroup:()=>En,TerminalRule:()=>Ar,TerminalRuleCall:()=>_n,Type:()=>Ul,TypeAttribute:()=>Cn,TypeDefinition:()=>Sn,UnionType:()=>xu,UnorderedGroup:()=>zl,UntilToken:()=>bn,ValueLiteral:()=>wn,Wildcard:()=>Ma,isAbstractElement:()=>pf,isAbstractParserRule:()=>Kn,isAbstractRule:()=>RT,isAbstractType:()=>$T,isAction:()=>Vr,isAlternatives:()=>hf,isArrayLiteral:()=>AT,isArrayType:()=>Vh,isAssignment:()=>Cr,isBooleanLiteral:()=>Hh,isCharacterRange:()=>Yh,isCondition:()=>ET,isConjunction:()=>Xh,isCrossReference:()=>qn,isDisjunction:()=>Jh,isEndOfFile:()=>Zh,isGrammar:()=>_T,isGrammarImport:()=>CT,isGroup:()=>Wn,isInferredType:()=>yc,isInfixRule:()=>ko,isInfixRuleOperatorList:()=>ST,isInfixRuleOperators:()=>bT,isInterface:()=>Qh,isKeyword:()=>Sr,isNamedArgument:()=>wT,isNegatedToken:()=>em,isNegation:()=>tm,isNumberLiteral:()=>IT,isParameter:()=>NT,isParameterReference:()=>rm,isParserRule:()=>ot,isReferenceType:()=>nm,isRegexToken:()=>am,isReturnType:()=>im,isRuleCall:()=>br,isSimpleType:()=>mf,isStringLiteral:()=>kT,isTerminalAlternatives:()=>sm,isTerminalElement:()=>PT,isTerminalGroup:()=>om,isTerminalRule:()=>xt,isTerminalRuleCall:()=>gf,isType:()=>yf,isTypeAttribute:()=>OT,isTypeDefinition:()=>LT,isUnionType:()=>lm,isUnorderedGroup:()=>vf,isUntilToken:()=>cm,isValueLiteral:()=>DT,isWildcard:()=>um,reflection:()=>K});var Tk={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]*/},dt={$type:"AbstractElement",cardinality:"cardinality"};function pf(t){return K.isInstance(t,dt.$type)}s(pf,"isAbstractElement");var Dl={$type:"AbstractParserRule"};function Kn(t){return K.isInstance(t,Dl.$type)}s(Kn,"isAbstractParserRule");var Na={$type:"AbstractRule"};function RT(t){return K.isInstance(t,Na.$type)}s(RT,"isAbstractRule");var Tt={$type:"AbstractType"};function $T(t){return K.isInstance(t,Tt.$type)}s($T,"isAbstractType");var Ur={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Vr(t){return K.isInstance(t,Ur.$type)}s(Vr,"isAction");var Ml={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function hf(t){return K.isInstance(t,Ml.$type)}s(hf,"isAlternatives");var Cu={$type:"ArrayLiteral",elements:"elements"};function AT(t){return K.isInstance(t,Cu.$type)}s(AT,"isArrayLiteral");var Su={$type:"ArrayType",elementType:"elementType"};function Vh(t){return K.isInstance(t,Su.$type)}s(Vh,"isArrayType");var zr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Cr(t){return K.isInstance(t,zr.$type)}s(Cr,"isAssignment");var bu={$type:"BooleanLiteral",true:"true"};function Hh(t){return K.isInstance(t,bu.$type)}s(Hh,"isBooleanLiteral");var Br={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Yh(t){return K.isInstance(t,Br.$type)}s(Yh,"isCharacterRange");var Kr={$type:"Condition"};function ET(t){return K.isInstance(t,Kr.$type)}s(ET,"isCondition");var xl={$type:"Conjunction",left:"left",right:"right"};function Xh(t){return K.isInstance(t,xl.$type)}s(Xh,"isConjunction");var qr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function qn(t){return K.isInstance(t,qr.$type)}s(qn,"isCrossReference");var Fl={$type:"Disjunction",left:"left",right:"right"};function Jh(t){return K.isInstance(t,Fl.$type)}s(Jh,"isDisjunction");var wu={$type:"EndOfFile",cardinality:"cardinality"};function Zh(t){return K.isInstance(t,wu.$type)}s(Zh,"isEndOfFile");var $r={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function _T(t){return K.isInstance(t,$r.$type)}s(_T,"isGrammar");var Iu={$type:"GrammarImport",path:"path"};function CT(t){return K.isInstance(t,Iu.$type)}s(CT,"isGrammarImport");var vn={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Wn(t){return K.isInstance(t,vn.$type)}s(Wn,"isGroup");var Nu={$type:"InferredType",name:"name"};function yc(t){return K.isInstance(t,Nu.$type)}s(yc,"isInferredType");var rr={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function ko(t){return K.isInstance(t,rr.$type)}s(ko,"isInfixRule");var Gl={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function ST(t){return K.isInstance(t,Gl.$type)}s(ST,"isInfixRuleOperatorList");var ku={$type:"InfixRuleOperators",precedences:"precedences"};function bT(t){return K.isInstance(t,ku.$type)}s(bT,"isInfixRuleOperators");var ka={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function Qh(t){return K.isInstance(t,ka.$type)}s(Qh,"isInterface");var Pa={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Sr(t){return K.isInstance(t,Pa.$type)}s(Sr,"isKeyword");var Oa={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function wT(t){return K.isInstance(t,Oa.$type)}s(wT,"isNamedArgument");var Tn={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function em(t){return K.isInstance(t,Tn.$type)}s(em,"isNegatedToken");var Pu={$type:"Negation",value:"value"};function tm(t){return K.isInstance(t,Pu.$type)}s(tm,"isNegation");var Ou={$type:"NumberLiteral",value:"value"};function IT(t){return K.isInstance(t,Ou.$type)}s(IT,"isNumberLiteral");var La={$type:"Parameter",name:"name"};function NT(t){return K.isInstance(t,La.$type)}s(NT,"isParameter");var Lu={$type:"ParameterReference",parameter:"parameter"};function rm(t){return K.isInstance(t,Lu.$type)}s(rm,"isParameterReference");var jt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function ot(t){return K.isInstance(t,jt.$type)}s(ot,"isParserRule");var jl={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function nm(t){return K.isInstance(t,jl.$type)}s(nm,"isReferenceType");var Rn={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function am(t){return K.isInstance(t,Rn.$type)}s(am,"isRegexToken");var Du={$type:"ReturnType",name:"name"};function im(t){return K.isInstance(t,Du.$type)}s(im,"isReturnType");var $n={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function br(t){return K.isInstance(t,$n.$type)}s(br,"isRuleCall");var Da={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function mf(t){return K.isInstance(t,Da.$type)}s(mf,"isSimpleType");var Mu={$type:"StringLiteral",value:"value"};function kT(t){return K.isInstance(t,Mu.$type)}s(kT,"isStringLiteral");var An={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function sm(t){return K.isInstance(t,An.$type)}s(sm,"isTerminalAlternatives");var pt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function PT(t){return K.isInstance(t,pt.$type)}s(PT,"isTerminalElement");var En={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function om(t){return K.isInstance(t,En.$type)}s(om,"isTerminalGroup");var Ar={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function xt(t){return K.isInstance(t,Ar.$type)}s(xt,"isTerminalRule");var _n={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function gf(t){return K.isInstance(t,_n.$type)}s(gf,"isTerminalRuleCall");var Ul={$type:"Type",name:"name",type:"type"};function yf(t){return K.isInstance(t,Ul.$type)}s(yf,"isType");var Cn={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function OT(t){return K.isInstance(t,Cn.$type)}s(OT,"isTypeAttribute");var Sn={$type:"TypeDefinition"};function LT(t){return K.isInstance(t,Sn.$type)}s(LT,"isTypeDefinition");var xu={$type:"UnionType",types:"types"};function lm(t){return K.isInstance(t,xu.$type)}s(lm,"isUnionType");var zl={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function vf(t){return K.isInstance(t,zl.$type)}s(vf,"isUnorderedGroup");var bn={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function cm(t){return K.isInstance(t,bn.$type)}s(cm,"isUntilToken");var wn={$type:"ValueLiteral"};function DT(t){return K.isInstance(t,wn.$type)}s(DT,"isValueLiteral");var Ma={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function um(t){return K.isInstance(t,Ma.$type)}s(um,"isWildcard");var Ka,fm=(Ka=class extends Bh{constructor(){super(...arguments),this.types={AbstractElement:{name:dt.$type,properties:{cardinality:{name:dt.cardinality}},superTypes:[]},AbstractParserRule:{name:Dl.$type,properties:{},superTypes:[Na.$type,Tt.$type]},AbstractRule:{name:Na.$type,properties:{},superTypes:[]},AbstractType:{name:Tt.$type,properties:{},superTypes:[]},Action:{name:Ur.$type,properties:{cardinality:{name:Ur.cardinality},feature:{name:Ur.feature},inferredType:{name:Ur.inferredType},operator:{name:Ur.operator},type:{name:Ur.type,referenceType:Tt.$type}},superTypes:[dt.$type]},Alternatives:{name:Ml.$type,properties:{cardinality:{name:Ml.cardinality},elements:{name:Ml.elements,defaultValue:[]}},superTypes:[dt.$type]},ArrayLiteral:{name:Cu.$type,properties:{elements:{name:Cu.elements,defaultValue:[]}},superTypes:[wn.$type]},ArrayType:{name:Su.$type,properties:{elementType:{name:Su.elementType}},superTypes:[Sn.$type]},Assignment:{name:zr.$type,properties:{cardinality:{name:zr.cardinality},feature:{name:zr.feature},operator:{name:zr.operator},predicate:{name:zr.predicate},terminal:{name:zr.terminal}},superTypes:[dt.$type]},BooleanLiteral:{name:bu.$type,properties:{true:{name:bu.true,defaultValue:!1}},superTypes:[Kr.$type,wn.$type]},CharacterRange:{name:Br.$type,properties:{cardinality:{name:Br.cardinality},left:{name:Br.left},lookahead:{name:Br.lookahead},parenthesized:{name:Br.parenthesized,defaultValue:!1},right:{name:Br.right}},superTypes:[pt.$type]},Condition:{name:Kr.$type,properties:{},superTypes:[]},Conjunction:{name:xl.$type,properties:{left:{name:xl.left},right:{name:xl.right}},superTypes:[Kr.$type]},CrossReference:{name:qr.$type,properties:{cardinality:{name:qr.cardinality},deprecatedSyntax:{name:qr.deprecatedSyntax,defaultValue:!1},isMulti:{name:qr.isMulti,defaultValue:!1},terminal:{name:qr.terminal},type:{name:qr.type,referenceType:Tt.$type}},superTypes:[dt.$type]},Disjunction:{name:Fl.$type,properties:{left:{name:Fl.left},right:{name:Fl.right}},superTypes:[Kr.$type]},EndOfFile:{name:wu.$type,properties:{cardinality:{name:wu.cardinality}},superTypes:[dt.$type]},Grammar:{name:$r.$type,properties:{imports:{name:$r.imports,defaultValue:[]},interfaces:{name:$r.interfaces,defaultValue:[]},isDeclared:{name:$r.isDeclared,defaultValue:!1},name:{name:$r.name},rules:{name:$r.rules,defaultValue:[]},types:{name:$r.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Iu.$type,properties:{path:{name:Iu.path}},superTypes:[]},Group:{name:vn.$type,properties:{cardinality:{name:vn.cardinality},elements:{name:vn.elements,defaultValue:[]},guardCondition:{name:vn.guardCondition},predicate:{name:vn.predicate}},superTypes:[dt.$type]},InferredType:{name:Nu.$type,properties:{name:{name:Nu.name}},superTypes:[Tt.$type]},InfixRule:{name:rr.$type,properties:{call:{name:rr.call},dataType:{name:rr.dataType},inferredType:{name:rr.inferredType},name:{name:rr.name},operators:{name:rr.operators},parameters:{name:rr.parameters,defaultValue:[]},returnType:{name:rr.returnType,referenceType:Tt.$type}},superTypes:[Dl.$type]},InfixRuleOperatorList:{name:Gl.$type,properties:{associativity:{name:Gl.associativity},operators:{name:Gl.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:ku.$type,properties:{precedences:{name:ku.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:ka.$type,properties:{attributes:{name:ka.attributes,defaultValue:[]},name:{name:ka.name},superTypes:{name:ka.superTypes,defaultValue:[],referenceType:Tt.$type}},superTypes:[Tt.$type]},Keyword:{name:Pa.$type,properties:{cardinality:{name:Pa.cardinality},predicate:{name:Pa.predicate},value:{name:Pa.value}},superTypes:[dt.$type]},NamedArgument:{name:Oa.$type,properties:{calledByName:{name:Oa.calledByName,defaultValue:!1},parameter:{name:Oa.parameter,referenceType:La.$type},value:{name:Oa.value}},superTypes:[]},NegatedToken:{name:Tn.$type,properties:{cardinality:{name:Tn.cardinality},lookahead:{name:Tn.lookahead},parenthesized:{name:Tn.parenthesized,defaultValue:!1},terminal:{name:Tn.terminal}},superTypes:[pt.$type]},Negation:{name:Pu.$type,properties:{value:{name:Pu.value}},superTypes:[Kr.$type]},NumberLiteral:{name:Ou.$type,properties:{value:{name:Ou.value}},superTypes:[wn.$type]},Parameter:{name:La.$type,properties:{name:{name:La.name}},superTypes:[]},ParameterReference:{name:Lu.$type,properties:{parameter:{name:Lu.parameter,referenceType:La.$type}},superTypes:[Kr.$type]},ParserRule:{name:jt.$type,properties:{dataType:{name:jt.dataType},definition:{name:jt.definition},entry:{name:jt.entry,defaultValue:!1},fragment:{name:jt.fragment,defaultValue:!1},inferredType:{name:jt.inferredType},name:{name:jt.name},parameters:{name:jt.parameters,defaultValue:[]},returnType:{name:jt.returnType,referenceType:Tt.$type}},superTypes:[Dl.$type]},ReferenceType:{name:jl.$type,properties:{isMulti:{name:jl.isMulti,defaultValue:!1},referenceType:{name:jl.referenceType}},superTypes:[Sn.$type]},RegexToken:{name:Rn.$type,properties:{cardinality:{name:Rn.cardinality},lookahead:{name:Rn.lookahead},parenthesized:{name:Rn.parenthesized,defaultValue:!1},regex:{name:Rn.regex}},superTypes:[pt.$type]},ReturnType:{name:Du.$type,properties:{name:{name:Du.name}},superTypes:[]},RuleCall:{name:$n.$type,properties:{arguments:{name:$n.arguments,defaultValue:[]},cardinality:{name:$n.cardinality},predicate:{name:$n.predicate},rule:{name:$n.rule,referenceType:Na.$type}},superTypes:[dt.$type]},SimpleType:{name:Da.$type,properties:{primitiveType:{name:Da.primitiveType},stringType:{name:Da.stringType},typeRef:{name:Da.typeRef,referenceType:Tt.$type}},superTypes:[Sn.$type]},StringLiteral:{name:Mu.$type,properties:{value:{name:Mu.value}},superTypes:[wn.$type]},TerminalAlternatives:{name:An.$type,properties:{cardinality:{name:An.cardinality},elements:{name:An.elements,defaultValue:[]},lookahead:{name:An.lookahead},parenthesized:{name:An.parenthesized,defaultValue:!1}},superTypes:[pt.$type]},TerminalElement:{name:pt.$type,properties:{cardinality:{name:pt.cardinality},lookahead:{name:pt.lookahead},parenthesized:{name:pt.parenthesized,defaultValue:!1}},superTypes:[dt.$type]},TerminalGroup:{name:En.$type,properties:{cardinality:{name:En.cardinality},elements:{name:En.elements,defaultValue:[]},lookahead:{name:En.lookahead},parenthesized:{name:En.parenthesized,defaultValue:!1}},superTypes:[pt.$type]},TerminalRule:{name:Ar.$type,properties:{definition:{name:Ar.definition},fragment:{name:Ar.fragment,defaultValue:!1},hidden:{name:Ar.hidden,defaultValue:!1},name:{name:Ar.name},type:{name:Ar.type}},superTypes:[Na.$type]},TerminalRuleCall:{name:_n.$type,properties:{cardinality:{name:_n.cardinality},lookahead:{name:_n.lookahead},parenthesized:{name:_n.parenthesized,defaultValue:!1},rule:{name:_n.rule,referenceType:Ar.$type}},superTypes:[pt.$type]},Type:{name:Ul.$type,properties:{name:{name:Ul.name},type:{name:Ul.type}},superTypes:[Tt.$type]},TypeAttribute:{name:Cn.$type,properties:{defaultValue:{name:Cn.defaultValue},isOptional:{name:Cn.isOptional,defaultValue:!1},name:{name:Cn.name},type:{name:Cn.type}},superTypes:[]},TypeDefinition:{name:Sn.$type,properties:{},superTypes:[]},UnionType:{name:xu.$type,properties:{types:{name:xu.types,defaultValue:[]}},superTypes:[Sn.$type]},UnorderedGroup:{name:zl.$type,properties:{cardinality:{name:zl.cardinality},elements:{name:zl.elements,defaultValue:[]}},superTypes:[dt.$type]},UntilToken:{name:bn.$type,properties:{cardinality:{name:bn.cardinality},lookahead:{name:bn.lookahead},parenthesized:{name:bn.parenthesized,defaultValue:!1},terminal:{name:bn.terminal}},superTypes:[pt.$type]},ValueLiteral:{name:wn.$type,properties:{},superTypes:[]},Wildcard:{name:Ma.$type,properties:{cardinality:{name:Ma.cardinality},lookahead:{name:Ma.lookahead},parenthesized:{name:Ma.parenthesized,defaultValue:!1}},superTypes:[pt.$type]}}}},s(Ka,"LangiumGrammarAstReflection"),Ka),K=new fm;function MT(t){let e=t,r=!1;for(;e;){const n=Bn(e.grammarSource,ot);if(n&&n.dataType)e=e.container,r=!0;else return r?e:void 0}}s(MT,"getDatatypeNode");function Po(t){return new wo(t,e=>_r(e)?e.content:[],{includeRoot:!0})}s(Po,"streamCst");function xT(t){return Po(t).filter(zn)}s(xT,"flattenCst");function dm(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}s(dm,"isChildNode");function Zl(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}s(Zl,"tokenToRange");function Oo(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}s(Oo,"toDocumentSegment");var ar;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(ar||(ar={}));function pm(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return ar.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return ar.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?ar.Inside:r?ar.OverlapBack:n?ar.OverlapFront:ar.Outside}s(pm,"compareRange");function hm(t,e){return pm(t,e)>ar.After}s(hm,"inRange");var mm=/^[\w\p{L}]$/u;function FT(t,e,r=mm){if(t){if(e>0){const n=e-t.offset,a=t.text.charAt(n);r.test(a)||e--}return Tf(t,e)}}s(FT,"findDeclarationNodeAtOffset");function gm(t,e){if(t){const r=Tm(t,!0);if(r&&Fu(r,e))return r;if(df(t)){const n=t.content.findIndex(a=>!a.hidden);for(let a=n-1;a>=0;a--){const i=t.content[a];if(Fu(i,e))return i}}}}s(gm,"findCommentNode");function Fu(t,e){return zn(t)&&e.includes(t.tokenType.name)}s(Fu,"isCommentNode");function Tf(t,e){if(zn(t))return t;if(_r(t)){const r=vm(t,e,!1);if(r)return Tf(r,e)}}s(Tf,"findLeafNodeAtOffset");function ym(t,e){if(zn(t))return t;if(_r(t)){const r=vm(t,e,!0);if(r)return ym(r,e)}}s(ym,"findLeafNodeBeforeOffset");function vm(t,e,r){let n=0,a=t.content.length-1,i;for(;n<=a;){const o=Math.floor((n+a)/2),c=t.content[o];if(c.offset<=e&&c.end>e)return c;c.end<=e?(i=r?c:void 0,n=o+1):a=o-1}return i}s(vm,"binarySearch");function Tm(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const a=r.content[n];if(e||!a.hidden)return a}t=r}}s(Tm,"getPreviousNode");function GT(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);const a=r.content.length-1;for(;n<a;){n++;const i=r.content[n];if(e||!i.hidden)return i}t=r}}s(GT,"getNextNode");function jT(t){if(t.range.start.character===0)return t;const e=t.range.start.line;let r=t,n;for(;t.container;){const a=t.container,i=n??a.content.indexOf(t);if(i===0?(t=a,n=void 0):(n=i-1,t=a.content[n]),t.range.start.line!==e)break;r=t}return r}s(jT,"getStartlineNode");function UT(t,e){const r=zT(t,e);return r?r.parent.content.slice(r.a+1,r.b):[]}s(UT,"getInteriorNodes");function zT(t,e){const r=Bp(t),n=Bp(e);let a;for(let i=0;i<r.length&&i<n.length;i++){const o=r[i],c=n[i];if(o.parent===c.parent)a={parent:o.parent,a:o.index,b:c.index};else break}return a}s(zT,"getCommonParent");function Bp(t){const e=[];for(;t.container;){const r=t.container,n=r.content.indexOf(t);e.push({parent:r,index:n}),t=r}return e.reverse()}s(Bp,"getParentChain");var Rm={};Zr(Rm,{findAssignment:()=>Om,findNameAssignment:()=>bf,findNodeForKeyword:()=>Pm,findNodeForProperty:()=>_f,findNodesForKeyword:()=>XT,findNodesForKeywordInternal:()=>Sf,findNodesForProperty:()=>km,getActionAtElement:()=>Dm,getActionType:()=>xm,getAllReachableRules:()=>Ef,getAllRulesUsedForCrossReferences:()=>YT,getCrossReferenceTerminal:()=>Im,getEntryRule:()=>Sm,getExplicitRuleType:()=>Tc,getHiddenRules:()=>bm,getRuleType:()=>Fm,getRuleTypeName:()=>tR,getTypeName:()=>xn,isArrayCardinality:()=>ZT,isArrayOperator:()=>QT,isCommentTerminal:()=>Nm,isDataType:()=>eR,isDataTypeRule:()=>vc,isOptionalCardinality:()=>JT,terminalRegex:()=>Rc});var qa,Rf=(qa=class extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}},s(qa,"ErrorWithLocation"),qa);function Qr(t,e="Error: Got unexpected value."){throw new Error(e)}s(Qr,"assertUnreachable");function $m(t,e="Error: Condition is violated."){if(!t)throw new Error(e)}s($m,"assertCondition");var Am={};Zr(Am,{NEWLINE_REGEXP:()=>qT,escapeRegExp:()=>Uo,getTerminalParts:()=>VT,isMultilineComment:()=>Em,isWhitespace:()=>Af,partialMatches:()=>_m,partialRegExp:()=>Cm,whitespaceCharacters:()=>HT});function W(t){return t.charCodeAt(0)}s(W,"cc");function ou(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}s(ou,"insertToSet");function Ea(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}s(Ea,"addFlag");function fn(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}s(fn,"ASSERT_EXISTS");function BT(){throw Error("Internal Error - Should never get here!")}s(BT,"ASSERT_NEVER_REACH_HERE");function Kp(t){return t.type==="Character"}s(Kp,"isCharacter");var Gu=[];for(let t=W("0");t<=W("9");t++)Gu.push(t);var ju=[W("_")].concat(Gu);for(let t=W("a");t<=W("z");t++)ju.push(t);for(let t=W("A");t<=W("Z");t++)ju.push(t);var Ey=[W(" "),W("\f"),W(`
36
+ `),W("\r"),W(" "),W("\v"),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W("\u2028"),W("\u2029"),W(" "),W(" "),W(" "),W("\uFEFF")],Rk=/[0-9a-fA-F]/,Mc=/[0-9]/,$k=/[1-9]/,Wa,KT=(Wa=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 r=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Ea(n,"global");break;case"i":Ea(n,"ignoreCase");break;case"m":Ea(n,"multiLine");break;case"u":Ea(n,"unicode");break;case"y":Ea(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){const e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){const e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":r="Lookbehind";break;case"!":r="NegativeLookbehind"}break}}fn(r);const n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return BT()}quantifier(e=!1){let r;const n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":const a=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:a,atMost:a};break;case",":let i;this.isDigit()?(i=this.integerIncludingZero(),r={atLeast:a,atMost:i}):r={atLeast:a,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;fn(r);break}if(!(e===!0&&r===void 0)&&fn(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e;const r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),fn(e))return e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[W(`
37
+ `),W("\r"),W("\u2028"),W("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=Gu;break;case"D":e=Gu,r=!0;break;case"s":e=Ey;break;case"S":e=Ey,r=!0;break;case"w":e=ju;break;case"W":e=ju,r=!0;break}if(fn(e))return{type:"Set",value:e,complement:r}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=W("\f");break;case"n":e=W(`
38
+ `);break;case"r":e=W("\r");break;case"t":e=W(" ");break;case"v":e=W("\v");break}if(fn(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:W("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:W(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
39
+ `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:const e=this.popChar();return{type:"Character",value:W(e)}}}characterClass(){const e=[];let r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){const n=this.classAtom();if(n.type,Kp(n)&&this.isRangeDash()){this.consumeChar("-");const a=this.classAtom();if(a.type,Kp(a)){if(a.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:a.value})}else ou(n.value,e),e.push(W("-")),ou(a.value,e)}else ou(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:r,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
40
+ `:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:W("\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;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}const r=this.disjunction();this.consumeChar(")");const n={type:"Group",capturing:e,value:r};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if($k.test(e)===!1)throw Error("Expecting a positive integer");for(;Mc.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(Mc.test(e)===!1)throw Error("Expecting an integer");for(;Mc.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case`
41
+ `:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:W(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 Mc.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
42
+ `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!"||this.peekChar(2)==="<"&&(this.peekChar(3)==="="||this.peekChar(3)==="!"));default:return!1}}isQuantifier(){const e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
43
+ `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let a=0;a<e;a++){const i=this.popChar();if(Rk.test(i)===!1)throw Error("Expecting a HexDecimal digits");r+=i}return{type:"Character",value:parseInt(r,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(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},s(Wa,"RegExpParser"),Wa),Va,$f=(Va=class{visitChildren(e){for(const r in e){const n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(a=>{this.visit(a)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},s(Va,"BaseRegExpVisitor"),Va),qT=/\r?\n/gm,WT=new KT,Ha,Ak=(Ha=class extends $f{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 r=String.fromCharCode(e.value);if(!this.multiline&&r===`
44
+ `&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const n=Uo(r);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitSet(e){if(!this.multiline){const r=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(r);this.multiline=!!`
45
+ `.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},s(Ha,"TerminalRegExpVisitor"),Ha),In=new Ak;function VT(t){try{typeof t!="string"&&(t=t.source),t=`/${t}/`;const e=WT.pattern(t),r=[];for(const n of e.value.value)In.reset(t),In.visit(n),r.push({start:In.startRegexp,end:In.endRegex});return r}catch{return[]}}s(VT,"getTerminalParts");function Em(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),In.reset(t),In.visit(WT.pattern(t)),In.multiline}catch{return!1}}s(Em,"isMultilineComment");var HT=`\f
46
+ \r \v              \u2028\u2029   \uFEFF`.split("");function Af(t){const e=typeof t=="string"?new RegExp(t):t;return HT.some(r=>e.test(r))}s(Af,"isWhitespace");function Uo(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(Uo,"escapeRegExp");function _m(t,e){const r=Cm(t),n=e.match(r);return!!n&&n[0].length>0}s(_m,"partialMatches");function Cm(t){typeof t=="string"&&(t=new RegExp(t));const e=t,r=t.source;let n=0;function a(){let i="",o;function c(u){i+=r.substr(n,u),n+=u}s(c,"appendRaw");function l(u){i+="(?:"+r.substr(n,u)+"|$)",n+=u}for(s(l,"appendOptional");n<r.length;)switch(r[n]){case"\\":switch(r[n+1]){case"c":l(3);break;case"x":l(4);break;case"u":e.unicode?r[n+2]==="{"?l(r.indexOf("}",n)-n+1):l(6):l(2);break;case"p":case"P":e.unicode?l(r.indexOf("}",n)-n+1):l(2);break;case"k":l(r.indexOf(">",n)-n+1);break;default:l(2);break}break;case"[":o=/\[(?:\\.|.)*?\]/g,o.lastIndex=n,o=o.exec(r)||[],l(o[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":c(1);break;case"{":o=/\{\d+,?\d*\}/g,o.lastIndex=n,o=o.exec(r),o?c(o[0].length):l(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"!":o=n,n+=3,a(),i+=r.substr(o,n-o);break;case"<":switch(r[n+3]){case"=":case"!":o=n,n+=4,a(),i+=r.substr(o,n-o);break;default:c(r.indexOf(">",n)-n+1),i+=a()+"|$)";break}break}else c(1),i+=a()+"|$)";break;case")":return++n,i;default:l(1);break}return i}return s(a,"process"),new RegExp(a(),t.flags)}s(Cm,"partialRegExp");function Sm(t){return t.rules.find(e=>ot(e)&&e.entry)}s(Sm,"getEntryRule");function bm(t){return t.rules.filter(e=>xt(e)&&e.hidden)}s(bm,"getHiddenRules");function Ef(t,e){const r=new Set,n=Sm(t);if(!n)return new Set(t.rules);const a=[n].concat(bm(t));for(const o of a)wm(o,r,e);const i=new Set;for(const o of t.rules)(r.has(o.name)||xt(o)&&o.hidden)&&i.add(o);return i}s(Ef,"getAllReachableRules");function wm(t,e,r){e.add(t.name),Lr(t).forEach(n=>{if(br(n)||r&&gf(n)){const a=n.rule.ref;a&&!e.has(a.name)&&wm(a,e,r)}})}s(wm,"ruleDfs");function YT(t){const e=new Set;return Lr(t).forEach(r=>{qn(r)&&(ot(r.type.ref)&&e.add(r.type.ref),yc(r.type.ref)&&ot(r.type.ref.$container)&&e.add(r.type.ref.$container))}),e}s(YT,"getAllRulesUsedForCrossReferences");function Im(t){if(t.terminal)return t.terminal;if(t.type.ref){const e=bf(t.type.ref);return e==null?void 0:e.terminal}}s(Im,"getCrossReferenceTerminal");function Nm(t){return t.hidden&&!Af(Rc(t))}s(Nm,"isCommentTerminal");function km(t,e){return!t||!e?[]:Cf(t,e,t.astNode,!0)}s(km,"findNodesForProperty");function _f(t,e,r){if(!t||!e)return;const n=Cf(t,e,t.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}s(_f,"findNodeForProperty");function Cf(t,e,r,n){if(!n){const a=Bn(t.grammarSource,Cr);if(a&&a.feature===e)return[t]}return _r(t)&&t.astNode===r?t.content.flatMap(a=>Cf(a,e,r,!1)):[]}s(Cf,"findNodesForPropertyInternal");function XT(t,e){return t?Sf(t,e,t==null?void 0:t.astNode):[]}s(XT,"findNodesForKeyword");function Pm(t,e,r){if(!t)return;const n=Sf(t,e,t==null?void 0:t.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}s(Pm,"findNodeForKeyword");function Sf(t,e,r){if(t.astNode!==r)return[];if(Sr(t.grammarSource)&&t.grammarSource.value===e)return[t];const n=Po(t).iterator();let a;const i=[];do if(a=n.next(),!a.done){const o=a.value;o.astNode===r?Sr(o.grammarSource)&&o.grammarSource.value===e&&i.push(o):n.prune()}while(!a.done);return i}s(Sf,"findNodesForKeywordInternal");function Om(t){var r;const e=t.astNode;for(;e===((r=t.container)==null?void 0:r.astNode);){const n=Bn(t.grammarSource,Cr);if(n)return n;t=t.container}}s(Om,"findAssignment");function bf(t){let e=t;return yc(e)&&(Vr(e.$container)?e=e.$container.$container:Kn(e.$container)?e=e.$container:Qr(e.$container)),Lm(t,e,new Map)}s(bf,"findNameAssignment");function Lm(t,e,r){var a;function n(i,o){let c;return Bn(i,Cr)||(c=Lm(o,o,r)),r.set(t,c),c}if(s(n,"go"),r.has(t))return r.get(t);r.set(t,void 0);for(const i of Lr(e)){if(Cr(i)&&i.feature.toLowerCase()==="name")return r.set(t,i),i;if(br(i)&&ot(i.rule.ref))return n(i,i.rule.ref);if(mf(i)&&((a=i.typeRef)!=null&&a.ref))return n(i,i.typeRef.ref)}}s(Lm,"findNameAssignmentInternal");function Dm(t){const e=t.$container;if(Wn(e)){const r=e.elements,n=r.indexOf(t);for(let a=n-1;a>=0;a--){const i=r[a];if(Vr(i))return i;{const o=Lr(r[a]).find(Vr);if(o)return o}}}if(pf(e))return Dm(e)}s(Dm,"getActionAtElement");function JT(t,e){return t==="?"||t==="*"||Wn(e)&&!!e.guardCondition}s(JT,"isOptionalCardinality");function ZT(t){return t==="*"||t==="+"}s(ZT,"isArrayCardinality");function QT(t){return t==="+="}s(QT,"isArrayOperator");function vc(t){return Mm(t,new Set)}s(vc,"isDataTypeRule");function Mm(t,e){if(e.has(t))return!0;e.add(t);for(const r of Lr(t))if(br(r)){if(!r.rule.ref||ot(r.rule.ref)&&!Mm(r.rule.ref,e)||ko(r.rule.ref))return!1}else{if(Cr(r))return!1;if(Vr(r))return!1}return!!t.definition}s(Mm,"isDataTypeRuleInternal");function eR(t){return Uu(t.type,new Set)}s(eR,"isDataType");function Uu(t,e){if(e.has(t))return!0;if(e.add(t),Vh(t))return!1;if(nm(t))return!1;if(lm(t))return t.types.every(r=>Uu(r,e));if(mf(t)){if(t.primitiveType!==void 0)return!0;if(t.stringType!==void 0)return!0;if(t.typeRef!==void 0){const r=t.typeRef.ref;return yf(r)?Uu(r.type,e):!1}else return!1}else return!1}s(Uu,"isDataTypeInternal");function Tc(t){if(!xt(t)){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){const e=t.returnType.ref;if(e)return e.name}}}s(Tc,"getExplicitRuleType");function xn(t){if(Kn(t))return ot(t)&&vc(t)?t.name:Tc(t)??t.name;if(Qh(t)||yf(t)||im(t))return t.name;if(Vr(t)){const e=xm(t);if(e)return e}else if(yc(t))return t.name;throw new Error("Cannot get name of Unknown Type")}s(xn,"getTypeName");function xm(t){var e;if(t.inferredType)return t.inferredType.name;if((e=t.type)!=null&&e.ref)return xn(t.type.ref)}s(xm,"getActionType");function tR(t){var e;return xt(t)?((e=t.type)==null?void 0:e.name)??"string":ot(t)&&vc(t)?t.name:Tc(t)??t.name}s(tR,"getRuleTypeName");function Fm(t){var e;return xt(t)?((e=t.type)==null?void 0:e.name)??"string":Tc(t)??t.name}s(Fm,"getRuleType");function Rc(t){const e={s:!1,i:!1,u:!1},r=Vn(t.definition,e),n=Object.entries(e).filter(([,a])=>a).map(([a])=>a).join("");return new RegExp(r,n)}s(Rc,"terminalRegex");var Gm=/[\s\S]/.source;function Vn(t,e){var r;if(sm(t))return rR(t);if(om(t))return nR(t);if(Yh(t))return sR(t);if(gf(t)){const n=t.rule.ref;if(!n)throw new Error("Missing rule reference.");return lr(Vn(n.definition),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}else{if(em(t))return iR(t);if(cm(t))return aR(t);if(am(t)){const n=t.regex.lastIndexOf("/"),a=t.regex.substring(1,n),i=t.regex.substring(n+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),lr(a,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}else{if(um(t))return lr(Gm,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized});throw new Error(`Invalid terminal element: ${t==null?void 0:t.$type}, ${(r=t==null?void 0:t.$cstNode)==null?void 0:r.text}`)}}}s(Vn,"abstractElementToRegex");function rR(t){return lr(t.elements.map(e=>Vn(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}s(rR,"terminalAlternativesToRegex");function nR(t){return lr(t.elements.map(e=>Vn(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}s(nR,"terminalGroupToRegex");function aR(t){return lr(`${Gm}*?${Vn(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}s(aR,"untilTokenToRegex");function iR(t){return lr(`(?!${Vn(t.terminal)})${Gm}*?`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}s(iR,"negateTokenToRegex");function sR(t){return t.right?lr(`[${lu(t.left)}-${lu(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1}):lr(lu(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}s(sR,"characterRangeToRegex");function lu(t){return Uo(t.value)}s(lu,"keywordToRegex");function lr(t,e){return(e.parenthesized||e.lookahead||e.wrap!==!1)&&(t=`(${e.lookahead??(e.parenthesized?"":"?:")}${t})`),e.cardinality?`${t}${e.cardinality}`:t}s(lr,"withCardinality");function jm(t){const e=[],r=t.Grammar;for(const n of r.rules)xt(n)&&Nm(n)&&Em(Rc(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:mm}}s(jm,"createGrammarConfig");var Ek=typeof global=="object"&&global&&global.Object===Object&&global,oR=Ek,_k=typeof self=="object"&&self&&self.Object===Object&&self,Ck=oR||_k||Function("return this")(),ur=Ck,Sk=ur.Symbol,Dt=Sk,lR=Object.prototype,bk=lR.hasOwnProperty,wk=lR.toString,hl=Dt?Dt.toStringTag:void 0;function cR(t){var e=bk.call(t,hl),r=t[hl];try{t[hl]=void 0;var n=!0}catch{}var a=wk.call(t);return n&&(e?t[hl]=r:delete t[hl]),a}s(cR,"getRawTag");var Ik=cR,Nk=Object.prototype,kk=Nk.toString;function uR(t){return kk.call(t)}s(uR,"objectToString");var Pk=uR,Ok="[object Null]",Lk="[object Undefined]",_y=Dt?Dt.toStringTag:void 0;function fR(t){return t==null?t===void 0?Lk:Ok:_y&&_y in Object(t)?Ik(t):Pk(t)}s(fR,"baseGetTag");var en=fR;function dR(t){return t!=null&&typeof t=="object"}s(dR,"isObjectLike");var Vt=dR,Dk="[object Symbol]";function pR(t){return typeof t=="symbol"||Vt(t)&&en(t)==Dk}s(pR,"isSymbol");var wf=pR;function hR(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}s(hR,"arrayMap");var $c=hR,Mk=Array.isArray,ae=Mk,Cy=Dt?Dt.prototype:void 0,Sy=Cy?Cy.toString:void 0;function Um(t){if(typeof t=="string")return t;if(ae(t))return $c(t,Um)+"";if(wf(t))return Sy?Sy.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}s(Um,"baseToString");var xk=Um,Fk=/\s/;function mR(t){for(var e=t.length;e--&&Fk.test(t.charAt(e)););return e}s(mR,"trimmedEndIndex");var Gk=mR,jk=/^\s+/;function gR(t){return t&&t.slice(0,Gk(t)+1).replace(jk,"")}s(gR,"baseTrim");var Uk=gR;function yR(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}s(yR,"isObject");var Mt=yR,by=NaN,zk=/^[-+]0x[0-9a-f]+$/i,Bk=/^0b[01]+$/i,Kk=/^0o[0-7]+$/i,qk=parseInt;function vR(t){if(typeof t=="number")return t;if(wf(t))return by;if(Mt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Mt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Uk(t);var r=Bk.test(t);return r||Kk.test(t)?qk(t.slice(2),r?2:8):zk.test(t)?by:+t}s(vR,"toNumber");var Wk=vR,wy=1/0,Vk=17976931348623157e292;function TR(t){if(!t)return t===0?t:0;if(t=Wk(t),t===wy||t===-wy){var e=t<0?-1:1;return e*Vk}return t===t?t:0}s(TR,"toFinite");var Hk=TR;function RR(t){var e=Hk(t),r=e%1;return e===e?r?e-r:e:0}s(RR,"toInteger");var Ac=RR;function $R(t){return t}s($R,"identity");var Lo=$R,Yk="[object AsyncFunction]",Xk="[object Function]",Jk="[object GeneratorFunction]",Zk="[object Proxy]";function AR(t){if(!Mt(t))return!1;var e=en(t);return e==Xk||e==Jk||e==Yk||e==Zk}s(AR,"isFunction");var Dr=AR,Qk=ur["__core-js_shared__"],Rd=Qk,Iy=function(){var t=/[^.]+$/.exec(Rd&&Rd.keys&&Rd.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ER(t){return!!Iy&&Iy in t}s(ER,"isMasked");var eP=ER,tP=Function.prototype,rP=tP.toString;function _R(t){if(t!=null){try{return rP.call(t)}catch{}try{return t+""}catch{}}return""}s(_R,"toSource");var Hn=_R,nP=/[\\^$.*+?()[\]{}|]/g,aP=/^\[object .+?Constructor\]$/,iP=Function.prototype,sP=Object.prototype,oP=iP.toString,lP=sP.hasOwnProperty,cP=RegExp("^"+oP.call(lP).replace(nP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function CR(t){if(!Mt(t)||eP(t))return!1;var e=Dr(t)?cP:aP;return e.test(Hn(t))}s(CR,"baseIsNative");var uP=CR;function SR(t,e){return t==null?void 0:t[e]}s(SR,"getValue");var fP=SR;function bR(t,e){var r=fP(t,e);return uP(r)?r:void 0}s(bR,"getNative");var Yn=bR,dP=Yn(ur,"WeakMap"),qp=dP,Ny=Object.create,pP=function(){function t(){}return s(t,"object"),function(e){if(!Mt(e))return{};if(Ny)return Ny(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),hP=pP;function wR(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}s(wR,"apply");var mP=wR;function IR(){}s(IR,"noop");var qe=IR;function NR(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}s(NR,"copyArray");var gP=NR,yP=800,vP=16,TP=Date.now;function kR(t){var e=0,r=0;return function(){var n=TP(),a=vP-(n-r);if(r=n,a>0){if(++e>=yP)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}s(kR,"shortOut");var RP=kR;function PR(t){return function(){return t}}s(PR,"constant");var $P=PR,AP=function(){try{var t=Yn(Object,"defineProperty");return t({},"",{}),t}catch{}}(),zu=AP,EP=zu?function(t,e){return zu(t,"toString",{configurable:!0,enumerable:!1,value:$P(e),writable:!0})}:Lo,_P=EP,CP=RP(_P),SP=CP;function OR(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}s(OR,"arrayEach");var LR=OR;function DR(t,e,r,n){for(var a=t.length,i=r+(n?1:-1);n?i--:++i<a;)if(e(t[i],i,t))return i;return-1}s(DR,"baseFindIndex");var MR=DR;function xR(t){return t!==t}s(xR,"baseIsNaN");var bP=xR;function FR(t,e,r){for(var n=r-1,a=t.length;++n<a;)if(t[n]===e)return n;return-1}s(FR,"strictIndexOf");var wP=FR;function GR(t,e,r){return e===e?wP(t,e,r):MR(t,bP,r)}s(GR,"baseIndexOf");var zm=GR;function jR(t,e){var r=t==null?0:t.length;return!!r&&zm(t,e,0)>-1}s(jR,"arrayIncludes");var UR=jR,IP=9007199254740991,NP=/^(?:0|[1-9]\d*)$/;function zR(t,e){var r=typeof t;return e=e??IP,!!e&&(r=="number"||r!="symbol"&&NP.test(t))&&t>-1&&t%1==0&&t<e}s(zR,"isIndex");var If=zR;function BR(t,e,r){e=="__proto__"&&zu?zu(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}s(BR,"baseAssignValue");var Bm=BR;function KR(t,e){return t===e||t!==t&&e!==e}s(KR,"eq");var Ec=KR,kP=Object.prototype,PP=kP.hasOwnProperty;function qR(t,e,r){var n=t[e];(!(PP.call(t,e)&&Ec(n,r))||r===void 0&&!(e in t))&&Bm(t,e,r)}s(qR,"assignValue");var Nf=qR;function WR(t,e,r,n){var a=!r;r||(r={});for(var i=-1,o=e.length;++i<o;){var c=e[i],l=n?n(r[c],t[c],c,r,t):void 0;l===void 0&&(l=t[c]),a?Bm(r,c,l):Nf(r,c,l)}return r}s(WR,"copyObject");var _c=WR,ky=Math.max;function VR(t,e,r){return e=ky(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,i=ky(n.length-e,0),o=Array(i);++a<i;)o[a]=n[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=n[a];return c[e]=r(o),mP(t,this,c)}}s(VR,"overRest");var OP=VR;function HR(t,e){return SP(OP(t,e,Lo),t+"")}s(HR,"baseRest");var Km=HR,LP=9007199254740991;function YR(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=LP}s(YR,"isLength");var qm=YR;function XR(t){return t!=null&&qm(t.length)&&!Dr(t)}s(XR,"isArrayLike");var fr=XR;function JR(t,e,r){if(!Mt(r))return!1;var n=typeof e;return(n=="number"?fr(r)&&If(e,r.length):n=="string"&&e in r)?Ec(r[e],t):!1}s(JR,"isIterateeCall");var kf=JR;function ZR(t){return Km(function(e,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(i=t.length>3&&typeof i=="function"?(a--,i):void 0,o&&kf(r[0],r[1],o)&&(i=a<3?void 0:i,a=1),e=Object(e);++n<a;){var c=r[n];c&&t(e,c,n,i)}return e})}s(ZR,"createAssigner");var DP=ZR,MP=Object.prototype;function QR(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||MP;return t===r}s(QR,"isPrototype");var Cc=QR;function e$(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}s(e$,"baseTimes");var xP=e$,FP="[object Arguments]";function t$(t){return Vt(t)&&en(t)==FP}s(t$,"baseIsArguments");var Py=t$,r$=Object.prototype,GP=r$.hasOwnProperty,jP=r$.propertyIsEnumerable,UP=Py(function(){return arguments}())?Py:function(t){return Vt(t)&&GP.call(t,"callee")&&!jP.call(t,"callee")},Pf=UP;function n$(){return!1}s(n$,"stubFalse");var zP=n$,a$=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Oy=a$&&typeof module=="object"&&module&&!module.nodeType&&module,BP=Oy&&Oy.exports===a$,Ly=BP?ur.Buffer:void 0,KP=Ly?Ly.isBuffer:void 0,qP=KP||zP,Ql=qP,WP="[object Arguments]",VP="[object Array]",HP="[object Boolean]",YP="[object Date]",XP="[object Error]",JP="[object Function]",ZP="[object Map]",QP="[object Number]",e0="[object Object]",t0="[object RegExp]",r0="[object Set]",n0="[object String]",a0="[object WeakMap]",i0="[object ArrayBuffer]",s0="[object DataView]",o0="[object Float32Array]",l0="[object Float64Array]",c0="[object Int8Array]",u0="[object Int16Array]",f0="[object Int32Array]",d0="[object Uint8Array]",p0="[object Uint8ClampedArray]",h0="[object Uint16Array]",m0="[object Uint32Array]",Se={};Se[o0]=Se[l0]=Se[c0]=Se[u0]=Se[f0]=Se[d0]=Se[p0]=Se[h0]=Se[m0]=!0;Se[WP]=Se[VP]=Se[i0]=Se[HP]=Se[s0]=Se[YP]=Se[XP]=Se[JP]=Se[ZP]=Se[QP]=Se[e0]=Se[t0]=Se[r0]=Se[n0]=Se[a0]=!1;function i$(t){return Vt(t)&&qm(t.length)&&!!Se[en(t)]}s(i$,"baseIsTypedArray");var g0=i$;function s$(t){return function(e){return t(e)}}s(s$,"baseUnary");var Sc=s$,o$=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Bl=o$&&typeof module=="object"&&module&&!module.nodeType&&module,y0=Bl&&Bl.exports===o$,$d=y0&&oR.process,v0=function(){try{var t=Bl&&Bl.require&&Bl.require("util").types;return t||$d&&$d.binding&&$d.binding("util")}catch{}}(),Hr=v0,Dy=Hr&&Hr.isTypedArray,T0=Dy?Sc(Dy):g0,Wm=T0,R0=Object.prototype,$0=R0.hasOwnProperty;function l$(t,e){var r=ae(t),n=!r&&Pf(t),a=!r&&!n&&Ql(t),i=!r&&!n&&!a&&Wm(t),o=r||n||a||i,c=o?xP(t.length,String):[],l=c.length;for(var u in t)(e||$0.call(t,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||If(u,l)))&&c.push(u);return c}s(l$,"arrayLikeKeys");var c$=l$;function u$(t,e){return function(r){return t(e(r))}}s(u$,"overArg");var f$=u$,A0=f$(Object.keys,Object),E0=A0,_0=Object.prototype,C0=_0.hasOwnProperty;function d$(t){if(!Cc(t))return E0(t);var e=[];for(var r in Object(t))C0.call(t,r)&&r!="constructor"&&e.push(r);return e}s(d$,"baseKeys");var p$=d$;function h$(t){return fr(t)?c$(t):p$(t)}s(h$,"keys");var $t=h$,S0=Object.prototype,b0=S0.hasOwnProperty,w0=DP(function(t,e){if(Cc(e)||fr(e)){_c(e,$t(e),t);return}for(var r in e)b0.call(e,r)&&Nf(t,r,e[r])}),At=w0;function m$(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}s(m$,"nativeKeysIn");var I0=m$,N0=Object.prototype,k0=N0.hasOwnProperty;function g$(t){if(!Mt(t))return I0(t);var e=Cc(t),r=[];for(var n in t)n=="constructor"&&(e||!k0.call(t,n))||r.push(n);return r}s(g$,"baseKeysIn");var P0=g$;function y$(t){return fr(t)?c$(t,!0):P0(t)}s(y$,"keysIn");var Of=y$,O0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L0=/^\w*$/;function v$(t,e){if(ae(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||wf(t)?!0:L0.test(t)||!O0.test(t)||e!=null&&t in Object(e)}s(v$,"isKey");var Vm=v$,D0=Yn(Object,"create"),ec=D0;function T$(){this.__data__=ec?ec(null):{},this.size=0}s(T$,"hashClear");var M0=T$;function R$(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}s(R$,"hashDelete");var x0=R$,F0="__lodash_hash_undefined__",G0=Object.prototype,j0=G0.hasOwnProperty;function $$(t){var e=this.__data__;if(ec){var r=e[t];return r===F0?void 0:r}return j0.call(e,t)?e[t]:void 0}s($$,"hashGet");var U0=$$,z0=Object.prototype,B0=z0.hasOwnProperty;function A$(t){var e=this.__data__;return ec?e[t]!==void 0:B0.call(e,t)}s(A$,"hashHas");var K0=A$,q0="__lodash_hash_undefined__";function E$(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ec&&e===void 0?q0:e,this}s(E$,"hashSet");var W0=E$;function Xn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(Xn,"Hash");Xn.prototype.clear=M0;Xn.prototype.delete=x0;Xn.prototype.get=U0;Xn.prototype.has=K0;Xn.prototype.set=W0;var My=Xn;function _$(){this.__data__=[],this.size=0}s(_$,"listCacheClear");var V0=_$;function C$(t,e){for(var r=t.length;r--;)if(Ec(t[r][0],e))return r;return-1}s(C$,"assocIndexOf");var Lf=C$,H0=Array.prototype,Y0=H0.splice;function S$(t){var e=this.__data__,r=Lf(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Y0.call(e,r,1),--this.size,!0}s(S$,"listCacheDelete");var X0=S$;function b$(t){var e=this.__data__,r=Lf(e,t);return r<0?void 0:e[r][1]}s(b$,"listCacheGet");var J0=b$;function w$(t){return Lf(this.__data__,t)>-1}s(w$,"listCacheHas");var Z0=w$;function I$(t,e){var r=this.__data__,n=Lf(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}s(I$,"listCacheSet");var Q0=I$;function Jn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(Jn,"ListCache");Jn.prototype.clear=V0;Jn.prototype.delete=X0;Jn.prototype.get=J0;Jn.prototype.has=Z0;Jn.prototype.set=Q0;var Df=Jn,eO=Yn(ur,"Map"),tc=eO;function N$(){this.size=0,this.__data__={hash:new My,map:new(tc||Df),string:new My}}s(N$,"mapCacheClear");var tO=N$;function k$(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}s(k$,"isKeyable");var rO=k$;function P$(t,e){var r=t.__data__;return rO(e)?r[typeof e=="string"?"string":"hash"]:r.map}s(P$,"getMapData");var Mf=P$;function O$(t){var e=Mf(this,t).delete(t);return this.size-=e?1:0,e}s(O$,"mapCacheDelete");var nO=O$;function L$(t){return Mf(this,t).get(t)}s(L$,"mapCacheGet");var aO=L$;function D$(t){return Mf(this,t).has(t)}s(D$,"mapCacheHas");var iO=D$;function M$(t,e){var r=Mf(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}s(M$,"mapCacheSet");var sO=M$;function Zn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(Zn,"MapCache");Zn.prototype.clear=tO;Zn.prototype.delete=nO;Zn.prototype.get=aO;Zn.prototype.has=iO;Zn.prototype.set=sO;var xf=Zn,oO="Expected a function";function Ff(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(oO);var r=s(function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o},"memoized");return r.cache=new(Ff.Cache||xf),r}s(Ff,"memoize");Ff.Cache=xf;var lO=Ff,cO=500;function x$(t){var e=lO(t,function(n){return r.size===cO&&r.clear(),n}),r=e.cache;return e}s(x$,"memoizeCapped");var uO=x$,fO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dO=/\\(\\)?/g,pO=uO(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(fO,function(r,n,a,i){e.push(a?i.replace(dO,"$1"):n||r)}),e}),hO=pO;function F$(t){return t==null?"":xk(t)}s(F$,"toString");var mO=F$;function G$(t,e){return ae(t)?t:Vm(t,e)?[t]:hO(mO(t))}s(G$,"castPath");var Gf=G$;function j$(t){if(typeof t=="string"||wf(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}s(j$,"toKey");var bc=j$;function U$(t,e){e=Gf(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[bc(e[r++])];return r&&r==n?t:void 0}s(U$,"baseGet");var Hm=U$;function z$(t,e,r){var n=t==null?void 0:Hm(t,e);return n===void 0?r:n}s(z$,"get");var gO=z$;function B$(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}s(B$,"arrayPush");var Ym=B$,xy=Dt?Dt.isConcatSpreadable:void 0;function K$(t){return ae(t)||Pf(t)||!!(xy&&t&&t[xy])}s(K$,"isFlattenable");var yO=K$;function Xm(t,e,r,n,a){var i=-1,o=t.length;for(r||(r=yO),a||(a=[]);++i<o;){var c=t[i];e>0&&r(c)?e>1?Xm(c,e-1,r,n,a):Ym(a,c):n||(a[a.length]=c)}return a}s(Xm,"baseFlatten");var Jm=Xm;function q$(t){var e=t==null?0:t.length;return e?Jm(t,1):[]}s(q$,"flatten");var qt=q$,vO=f$(Object.getPrototypeOf,Object),W$=vO;function V$(t,e,r){var n=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(a);++n<a;)i[n]=t[n+e];return i}s(V$,"baseSlice");var H$=V$;function Y$(t,e,r,n){var a=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++a]);++a<i;)r=e(r,t[a],a,t);return r}s(Y$,"arrayReduce");var TO=Y$;function X$(){this.__data__=new Df,this.size=0}s(X$,"stackClear");var RO=X$;function J$(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}s(J$,"stackDelete");var $O=J$;function Z$(t){return this.__data__.get(t)}s(Z$,"stackGet");var AO=Z$;function Q$(t){return this.__data__.has(t)}s(Q$,"stackHas");var EO=Q$,_O=200;function eA(t,e){var r=this.__data__;if(r instanceof Df){var n=r.__data__;if(!tc||n.length<_O-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new xf(n)}return r.set(t,e),this.size=r.size,this}s(eA,"stackSet");var CO=eA;function Qn(t){var e=this.__data__=new Df(t);this.size=e.size}s(Qn,"Stack");Qn.prototype.clear=RO;Qn.prototype.delete=$O;Qn.prototype.get=AO;Qn.prototype.has=EO;Qn.prototype.set=CO;var Kl=Qn;function tA(t,e){return t&&_c(e,$t(e),t)}s(tA,"baseAssign");var SO=tA;function rA(t,e){return t&&_c(e,Of(e),t)}s(rA,"baseAssignIn");var bO=rA,nA=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fy=nA&&typeof module=="object"&&module&&!module.nodeType&&module,wO=Fy&&Fy.exports===nA,Gy=wO?ur.Buffer:void 0,jy=Gy?Gy.allocUnsafe:void 0;function aA(t,e){if(e)return t.slice();var r=t.length,n=jy?jy(r):new t.constructor(r);return t.copy(n),n}s(aA,"cloneBuffer");var IO=aA;function iA(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r<n;){var o=t[r];e(o,r,t)&&(i[a++]=o)}return i}s(iA,"arrayFilter");var Zm=iA;function sA(){return[]}s(sA,"stubArray");var oA=sA,NO=Object.prototype,kO=NO.propertyIsEnumerable,Uy=Object.getOwnPropertySymbols,PO=Uy?function(t){return t==null?[]:(t=Object(t),Zm(Uy(t),function(e){return kO.call(t,e)}))}:oA,Qm=PO;function lA(t,e){return _c(t,Qm(t),e)}s(lA,"copySymbols");var OO=lA,LO=Object.getOwnPropertySymbols,DO=LO?function(t){for(var e=[];t;)Ym(e,Qm(t)),t=W$(t);return e}:oA,cA=DO;function uA(t,e){return _c(t,cA(t),e)}s(uA,"copySymbolsIn");var MO=uA;function fA(t,e,r){var n=e(t);return ae(t)?n:Ym(n,r(t))}s(fA,"baseGetAllKeys");var dA=fA;function pA(t){return dA(t,$t,Qm)}s(pA,"getAllKeys");var Wp=pA;function hA(t){return dA(t,Of,cA)}s(hA,"getAllKeysIn");var mA=hA,xO=Yn(ur,"DataView"),Vp=xO,FO=Yn(ur,"Promise"),Hp=FO,GO=Yn(ur,"Set"),Ga=GO,zy="[object Map]",jO="[object Object]",By="[object Promise]",Ky="[object Set]",qy="[object WeakMap]",Wy="[object DataView]",UO=Hn(Vp),zO=Hn(tc),BO=Hn(Hp),KO=Hn(Ga),qO=Hn(qp),dn=en;(Vp&&dn(new Vp(new ArrayBuffer(1)))!=Wy||tc&&dn(new tc)!=zy||Hp&&dn(Hp.resolve())!=By||Ga&&dn(new Ga)!=Ky||qp&&dn(new qp)!=qy)&&(dn=s(function(t){var e=en(t),r=e==jO?t.constructor:void 0,n=r?Hn(r):"";if(n)switch(n){case UO:return Wy;case zO:return zy;case BO:return By;case KO:return Ky;case qO:return qy}return e},"getTag"));var Do=dn,WO=Object.prototype,VO=WO.hasOwnProperty;function gA(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&VO.call(t,"index")&&(r.index=t.index,r.input=t.input),r}s(gA,"initCloneArray");var HO=gA,YO=ur.Uint8Array,Bu=YO;function yA(t){var e=new t.constructor(t.byteLength);return new Bu(e).set(new Bu(t)),e}s(yA,"cloneArrayBuffer");var eg=yA;function vA(t,e){var r=e?eg(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}s(vA,"cloneDataView");var XO=vA,JO=/\w*$/;function TA(t){var e=new t.constructor(t.source,JO.exec(t));return e.lastIndex=t.lastIndex,e}s(TA,"cloneRegExp");var ZO=TA,Vy=Dt?Dt.prototype:void 0,Hy=Vy?Vy.valueOf:void 0;function RA(t){return Hy?Object(Hy.call(t)):{}}s(RA,"cloneSymbol");var QO=RA;function $A(t,e){var r=e?eg(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}s($A,"cloneTypedArray");var eL=$A,tL="[object Boolean]",rL="[object Date]",nL="[object Map]",aL="[object Number]",iL="[object RegExp]",sL="[object Set]",oL="[object String]",lL="[object Symbol]",cL="[object ArrayBuffer]",uL="[object DataView]",fL="[object Float32Array]",dL="[object Float64Array]",pL="[object Int8Array]",hL="[object Int16Array]",mL="[object Int32Array]",gL="[object Uint8Array]",yL="[object Uint8ClampedArray]",vL="[object Uint16Array]",TL="[object Uint32Array]";function AA(t,e,r){var n=t.constructor;switch(e){case cL:return eg(t);case tL:case rL:return new n(+t);case uL:return XO(t,r);case fL:case dL:case pL:case hL:case mL:case gL:case yL:case vL:case TL:return eL(t,r);case nL:return new n;case aL:case oL:return new n(t);case iL:return ZO(t);case sL:return new n;case lL:return QO(t)}}s(AA,"initCloneByTag");var RL=AA;function EA(t){return typeof t.constructor=="function"&&!Cc(t)?hP(W$(t)):{}}s(EA,"initCloneObject");var $L=EA,AL="[object Map]";function _A(t){return Vt(t)&&Do(t)==AL}s(_A,"baseIsMap");var EL=_A,Yy=Hr&&Hr.isMap,_L=Yy?Sc(Yy):EL,CL=_L,SL="[object Set]";function CA(t){return Vt(t)&&Do(t)==SL}s(CA,"baseIsSet");var bL=CA,Xy=Hr&&Hr.isSet,wL=Xy?Sc(Xy):bL,IL=wL,NL=1,kL=2,PL=4,SA="[object Arguments]",OL="[object Array]",LL="[object Boolean]",DL="[object Date]",ML="[object Error]",bA="[object Function]",xL="[object GeneratorFunction]",FL="[object Map]",GL="[object Number]",wA="[object Object]",jL="[object RegExp]",UL="[object Set]",zL="[object String]",BL="[object Symbol]",KL="[object WeakMap]",qL="[object ArrayBuffer]",WL="[object DataView]",VL="[object Float32Array]",HL="[object Float64Array]",YL="[object Int8Array]",XL="[object Int16Array]",JL="[object Int32Array]",ZL="[object Uint8Array]",QL="[object Uint8ClampedArray]",eD="[object Uint16Array]",tD="[object Uint32Array]",$e={};$e[SA]=$e[OL]=$e[qL]=$e[WL]=$e[LL]=$e[DL]=$e[VL]=$e[HL]=$e[YL]=$e[XL]=$e[JL]=$e[FL]=$e[GL]=$e[wA]=$e[jL]=$e[UL]=$e[zL]=$e[BL]=$e[ZL]=$e[QL]=$e[eD]=$e[tD]=!0;$e[ML]=$e[bA]=$e[KL]=!1;function ql(t,e,r,n,a,i){var o,c=e&NL,l=e&kL,u=e&PL;if(r&&(o=a?r(t,n,a,i):r(t)),o!==void 0)return o;if(!Mt(t))return t;var f=ae(t);if(f){if(o=HO(t),!c)return gP(t,o)}else{var d=Do(t),p=d==bA||d==xL;if(Ql(t))return IO(t,c);if(d==wA||d==SA||p&&!a){if(o=l||p?{}:$L(t),!c)return l?MO(t,bO(o,t)):OO(t,SO(o,t))}else{if(!$e[d])return a?t:{};o=RL(t,d,c)}}i||(i=new Kl);var m=i.get(t);if(m)return m;i.set(t,o),IL(t)?t.forEach(function(E){o.add(ql(E,e,r,E,t,i))}):CL(t)&&t.forEach(function(E,T){o.set(T,ql(E,e,r,T,t,i))});var g=u?l?mA:Wp:l?Of:$t,v=f?void 0:g(t);return LR(v||t,function(E,T){v&&(T=E,E=t[T]),Nf(o,T,ql(E,e,r,T,t,i))}),o}s(ql,"baseClone");var rD=ql,nD=4;function IA(t){return rD(t,nD)}s(IA,"clone");var et=IA;function NA(t){for(var e=-1,r=t==null?0:t.length,n=0,a=[];++e<r;){var i=t[e];i&&(a[n++]=i)}return a}s(NA,"compact");var wc=NA,aD="__lodash_hash_undefined__";function kA(t){return this.__data__.set(t,aD),this}s(kA,"setCacheAdd");var iD=kA;function PA(t){return this.__data__.has(t)}s(PA,"setCacheHas");var sD=PA;function rc(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new xf;++e<r;)this.add(t[e])}s(rc,"SetCache");rc.prototype.add=rc.prototype.push=iD;rc.prototype.has=sD;var tg=rc;function OA(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}s(OA,"arraySome");var LA=OA;function DA(t,e){return t.has(e)}s(DA,"cacheHas");var rg=DA,oD=1,lD=2;function MA(t,e,r,n,a,i){var o=r&oD,c=t.length,l=e.length;if(c!=l&&!(o&&l>c))return!1;var u=i.get(t),f=i.get(e);if(u&&f)return u==e&&f==t;var d=-1,p=!0,m=r&lD?new tg:void 0;for(i.set(t,e),i.set(e,t);++d<c;){var g=t[d],v=e[d];if(n)var E=o?n(v,g,d,e,t,i):n(g,v,d,t,e,i);if(E!==void 0){if(E)continue;p=!1;break}if(m){if(!LA(e,function(T,w){if(!rg(m,w)&&(g===T||a(g,T,r,n,i)))return m.push(w)})){p=!1;break}}else if(!(g===v||a(g,v,r,n,i))){p=!1;break}}return i.delete(t),i.delete(e),p}s(MA,"equalArrays");var xA=MA;function FA(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}s(FA,"mapToArray");var cD=FA;function GA(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}s(GA,"setToArray");var ng=GA,uD=1,fD=2,dD="[object Boolean]",pD="[object Date]",hD="[object Error]",mD="[object Map]",gD="[object Number]",yD="[object RegExp]",vD="[object Set]",TD="[object String]",RD="[object Symbol]",$D="[object ArrayBuffer]",AD="[object DataView]",Jy=Dt?Dt.prototype:void 0,Ad=Jy?Jy.valueOf:void 0;function jA(t,e,r,n,a,i,o){switch(r){case AD:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case $D:return!(t.byteLength!=e.byteLength||!i(new Bu(t),new Bu(e)));case dD:case pD:case gD:return Ec(+t,+e);case hD:return t.name==e.name&&t.message==e.message;case yD:case TD:return t==e+"";case mD:var c=cD;case vD:var l=n&uD;if(c||(c=ng),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;n|=fD,o.set(t,e);var f=xA(c(t),c(e),n,a,i,o);return o.delete(t),f;case RD:if(Ad)return Ad.call(t)==Ad.call(e)}return!1}s(jA,"equalByTag");var ED=jA,_D=1,CD=Object.prototype,SD=CD.hasOwnProperty;function UA(t,e,r,n,a,i){var o=r&_D,c=Wp(t),l=c.length,u=Wp(e),f=u.length;if(l!=f&&!o)return!1;for(var d=l;d--;){var p=c[d];if(!(o?p in e:SD.call(e,p)))return!1}var m=i.get(t),g=i.get(e);if(m&&g)return m==e&&g==t;var v=!0;i.set(t,e),i.set(e,t);for(var E=o;++d<l;){p=c[d];var T=t[p],w=e[p];if(n)var C=o?n(w,T,p,e,t,i):n(T,w,p,t,e,i);if(!(C===void 0?T===w||a(T,w,r,n,i):C)){v=!1;break}E||(E=p=="constructor")}if(v&&!E){var k=t.constructor,B=e.constructor;k!=B&&"constructor"in t&&"constructor"in e&&!(typeof k=="function"&&k instanceof k&&typeof B=="function"&&B instanceof B)&&(v=!1)}return i.delete(t),i.delete(e),v}s(UA,"equalObjects");var bD=UA,wD=1,Zy="[object Arguments]",Qy="[object Array]",xc="[object Object]",ID=Object.prototype,ev=ID.hasOwnProperty;function zA(t,e,r,n,a,i){var o=ae(t),c=ae(e),l=o?Qy:Do(t),u=c?Qy:Do(e);l=l==Zy?xc:l,u=u==Zy?xc:u;var f=l==xc,d=u==xc,p=l==u;if(p&&Ql(t)){if(!Ql(e))return!1;o=!0,f=!1}if(p&&!f)return i||(i=new Kl),o||Wm(t)?xA(t,e,r,n,a,i):ED(t,e,l,r,n,a,i);if(!(r&wD)){var m=f&&ev.call(t,"__wrapped__"),g=d&&ev.call(e,"__wrapped__");if(m||g){var v=m?t.value():t,E=g?e.value():e;return i||(i=new Kl),a(v,E,r,n,i)}}return p?(i||(i=new Kl),bD(t,e,r,n,a,i)):!1}s(zA,"baseIsEqualDeep");var ND=zA;function ag(t,e,r,n,a){return t===e?!0:t==null||e==null||!Vt(t)&&!Vt(e)?t!==t&&e!==e:ND(t,e,r,n,ag,a)}s(ag,"baseIsEqual");var BA=ag,kD=1,PD=2;function KA(t,e,r,n){var a=r.length,i=a,o=!n;if(t==null)return!i;for(t=Object(t);a--;){var c=r[a];if(o&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<i;){c=r[a];var l=c[0],u=t[l],f=c[1];if(o&&c[2]){if(u===void 0&&!(l in t))return!1}else{var d=new Kl;if(n)var p=n(u,f,l,t,e,d);if(!(p===void 0?BA(f,u,kD|PD,n,d):p))return!1}}return!0}s(KA,"baseIsMatch");var OD=KA;function qA(t){return t===t&&!Mt(t)}s(qA,"isStrictComparable");var WA=qA;function VA(t){for(var e=$t(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,WA(a)]}return e}s(VA,"getMatchData");var LD=VA;function HA(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}s(HA,"matchesStrictComparable");var YA=HA;function XA(t){var e=LD(t);return e.length==1&&e[0][2]?YA(e[0][0],e[0][1]):function(r){return r===t||OD(r,t,e)}}s(XA,"baseMatches");var DD=XA;function JA(t,e){return t!=null&&e in Object(t)}s(JA,"baseHasIn");var MD=JA;function ZA(t,e,r){e=Gf(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var o=bc(e[n]);if(!(i=t!=null&&r(t,o)))break;t=t[o]}return i||++n!=a?i:(a=t==null?0:t.length,!!a&&qm(a)&&If(o,a)&&(ae(t)||Pf(t)))}s(ZA,"hasPath");var QA=ZA;function eE(t,e){return t!=null&&QA(t,e,MD)}s(eE,"hasIn");var xD=eE,FD=1,GD=2;function tE(t,e){return Vm(t)&&WA(e)?YA(bc(t),e):function(r){var n=gO(r,t);return n===void 0&&n===e?xD(r,t):BA(e,n,FD|GD)}}s(tE,"baseMatchesProperty");var jD=tE;function rE(t){return function(e){return e==null?void 0:e[t]}}s(rE,"baseProperty");var UD=rE;function nE(t){return function(e){return Hm(e,t)}}s(nE,"basePropertyDeep");var zD=nE;function aE(t){return Vm(t)?UD(bc(t)):zD(t)}s(aE,"property");var BD=aE;function iE(t){return typeof t=="function"?t:t==null?Lo:typeof t=="object"?ae(t)?jD(t[0],t[1]):DD(t):BD(t)}s(iE,"baseIteratee");var dr=iE;function sE(t,e,r,n){for(var a=-1,i=t==null?0:t.length;++a<i;){var o=t[a];e(n,o,r(o),t)}return n}s(sE,"arrayAggregator");var KD=sE;function oE(t){return function(e,r,n){for(var a=-1,i=Object(e),o=n(e),c=o.length;c--;){var l=o[t?c:++a];if(r(i[l],l,i)===!1)break}return e}}s(oE,"createBaseFor");var qD=oE,WD=qD(),VD=WD;function lE(t,e){return t&&VD(t,e,$t)}s(lE,"baseForOwn");var HD=lE;function cE(t,e){return function(r,n){if(r==null)return r;if(!fr(r))return t(r,n);for(var a=r.length,i=e?a:-1,o=Object(r);(e?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}s(cE,"createBaseEach");var YD=cE,XD=YD(HD),ea=XD;function uE(t,e,r,n){return ea(t,function(a,i,o){e(n,a,r(a),o)}),n}s(uE,"baseAggregator");var JD=uE;function fE(t,e){return function(r,n){var a=ae(r)?KD:JD,i=e?e():{};return a(r,t,dr(n),i)}}s(fE,"createAggregator");var ZD=fE,dE=Object.prototype,QD=dE.hasOwnProperty,eM=Km(function(t,e){t=Object(t);var r=-1,n=e.length,a=n>2?e[2]:void 0;for(a&&kf(e[0],e[1],a)&&(n=1);++r<n;)for(var i=e[r],o=Of(i),c=-1,l=o.length;++c<l;){var u=o[c],f=t[u];(f===void 0||Ec(f,dE[u])&&!QD.call(t,u))&&(t[u]=i[u])}return t}),ig=eM;function pE(t){return Vt(t)&&fr(t)}s(pE,"isArrayLikeObject");var tv=pE;function hE(t,e,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(e,t[n]))return!0;return!1}s(hE,"arrayIncludesWith");var mE=hE,tM=200;function gE(t,e,r,n){var a=-1,i=UR,o=!0,c=t.length,l=[],u=e.length;if(!c)return l;r&&(e=$c(e,Sc(r))),n?(i=mE,o=!1):e.length>=tM&&(i=rg,o=!1,e=new tg(e));e:for(;++a<c;){var f=t[a],d=r==null?f:r(f);if(f=n||f!==0?f:0,o&&d===d){for(var p=u;p--;)if(e[p]===d)continue e;l.push(f)}else i(e,d,n)||l.push(f)}return l}s(gE,"baseDifference");var rM=gE,nM=Km(function(t,e){return tv(t)?rM(t,Jm(e,1,tv,!0)):[]}),jf=nM;function yE(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}s(yE,"last");var Fn=yE;function vE(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Ac(e),H$(t,e<0?0:e,n)):[]}s(vE,"drop");var Ze=vE;function TE(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Ac(e),e=n-e,H$(t,0,e<0?0:e)):[]}s(TE,"dropRight");var nc=TE;function RE(t){return typeof t=="function"?t:Lo}s(RE,"castFunction");var aM=RE;function $E(t,e){var r=ae(t)?LR:ea;return r(t,aM(e))}s($E,"forEach");var V=$E;function AE(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}s(AE,"arrayEvery");var iM=AE;function EE(t,e){var r=!0;return ea(t,function(n,a,i){return r=!!e(n,a,i),r}),r}s(EE,"baseEvery");var sM=EE;function _E(t,e,r){var n=ae(t)?iM:sM;return r&&kf(t,e,r)&&(e=void 0),n(t,dr(e))}s(_E,"every");var Wt=_E;function CE(t,e){var r=[];return ea(t,function(n,a,i){e(n,a,i)&&r.push(n)}),r}s(CE,"baseFilter");var SE=CE;function bE(t,e){var r=ae(t)?Zm:SE;return r(t,dr(e))}s(bE,"filter");var Ft=bE;function wE(t){return function(e,r,n){var a=Object(e);if(!fr(e)){var i=dr(r);e=$t(e),r=s(function(c){return i(a[c],c,a)},"predicate")}var o=t(e,r,n);return o>-1?a[i?e[o]:o]:void 0}}s(wE,"createFind");var oM=wE,lM=Math.max;function IE(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:Ac(r);return a<0&&(a=lM(n+a,0)),MR(t,dr(e),a)}s(IE,"findIndex");var cM=IE,uM=oM(cM),Mo=uM;function NE(t){return t&&t.length?t[0]:void 0}s(NE,"head");var Ht=NE;function kE(t,e){var r=-1,n=fr(t)?Array(t.length):[];return ea(t,function(a,i,o){n[++r]=e(a,i,o)}),n}s(kE,"baseMap");var fM=kE;function PE(t,e){var r=ae(t)?$c:fM;return r(t,dr(e))}s(PE,"map");var z=PE;function OE(t,e){return Jm(z(t,e),1)}s(OE,"flatMap");var Lt=OE,dM=Object.prototype,pM=dM.hasOwnProperty,hM=ZD(function(t,e,r){pM.call(t,r)?t[r].push(e):Bm(t,r,[e])}),mM=hM,gM=Object.prototype,yM=gM.hasOwnProperty;function LE(t,e){return t!=null&&yM.call(t,e)}s(LE,"baseHas");var vM=LE;function DE(t,e){return t!=null&&QA(t,e,vM)}s(DE,"has");var q=DE,TM="[object String]";function ME(t){return typeof t=="string"||!ae(t)&&Vt(t)&&en(t)==TM}s(ME,"isString");var mt=ME;function xE(t,e){return $c(e,function(r){return t[r]})}s(xE,"baseValues");var RM=xE;function FE(t){return t==null?[]:RM(t,$t(t))}s(FE,"values");var We=FE,$M=Math.max;function GE(t,e,r,n){t=fr(t)?t:We(t),r=r&&!n?Ac(r):0;var a=t.length;return r<0&&(r=$M(a+r,0)),mt(t)?r<=a&&t.indexOf(e,r)>-1:!!a&&zm(t,e,r)>-1}s(GE,"includes");var ft=GE,AM=Math.max;function jE(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:Ac(r);return a<0&&(a=AM(n+a,0)),zm(t,e,a)}s(jE,"indexOf");var rv=jE,EM="[object Map]",_M="[object Set]",CM=Object.prototype,SM=CM.hasOwnProperty;function UE(t){if(t==null)return!0;if(fr(t)&&(ae(t)||typeof t=="string"||typeof t.splice=="function"||Ql(t)||Wm(t)||Pf(t)))return!t.length;var e=Do(t);if(e==EM||e==_M)return!t.size;if(Cc(t))return!p$(t).length;for(var r in t)if(SM.call(t,r))return!1;return!0}s(UE,"isEmpty");var Ee=UE,bM="[object RegExp]";function zE(t){return Vt(t)&&en(t)==bM}s(zE,"baseIsRegExp");var wM=zE,nv=Hr&&Hr.isRegExp,IM=nv?Sc(nv):wM,wr=IM;function BE(t){return t===void 0}s(BE,"isUndefined");var Ir=BE,NM="Expected a function";function KE(t){if(typeof t!="function")throw new TypeError(NM);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}s(KE,"negate");var kM=KE;function qE(t,e,r,n){if(!Mt(t))return t;e=Gf(e,t);for(var a=-1,i=e.length,o=i-1,c=t;c!=null&&++a<i;){var l=bc(e[a]),u=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(a!=o){var f=c[l];u=n?n(f,l,c):void 0,u===void 0&&(u=Mt(f)?f:If(e[a+1])?[]:{})}Nf(c,l,u),c=c[l]}return t}s(qE,"baseSet");var PM=qE;function WE(t,e,r){for(var n=-1,a=e.length,i={};++n<a;){var o=e[n],c=Hm(t,o);r(c,o)&&PM(i,Gf(o,t),c)}return i}s(WE,"basePickBy");var OM=WE;function VE(t,e){if(t==null)return{};var r=$c(mA(t),function(n){return[n]});return e=dr(e),OM(t,r,function(n,a){return e(n,a[0])})}s(VE,"pickBy");var Yt=VE;function HE(t,e,r,n,a){return a(t,function(i,o,c){r=n?(n=!1,i):e(r,i,o,c)}),r}s(HE,"baseReduce");var LM=HE;function YE(t,e,r){var n=ae(t)?TO:LM,a=arguments.length<3;return n(t,dr(e),r,a,ea)}s(YE,"reduce");var Et=YE;function XE(t,e){var r=ae(t)?Zm:SE;return r(t,kM(dr(e)))}s(XE,"reject");var Uf=XE;function JE(t,e){var r;return ea(t,function(n,a,i){return r=e(n,a,i),!r}),!!r}s(JE,"baseSome");var DM=JE;function ZE(t,e,r){var n=ae(t)?LA:DM;return r&&kf(t,e,r)&&(e=void 0),n(t,dr(e))}s(ZE,"some");var QE=ZE,MM=1/0,xM=Ga&&1/ng(new Ga([,-0]))[1]==MM?function(t){return new Ga(t)}:qe,FM=xM,GM=200;function e_(t,e,r){var n=-1,a=UR,i=t.length,o=!0,c=[],l=c;if(r)o=!1,a=mE;else if(i>=GM){var u=e?null:FM(t);if(u)return ng(u);o=!1,a=rg,l=new tg}else l=e?[]:c;e:for(;++n<i;){var f=t[n],d=e?e(f):f;if(f=r||f!==0?f:0,o&&d===d){for(var p=l.length;p--;)if(l[p]===d)continue e;e&&l.push(d),c.push(f)}else a(l,d,r)||(l!==c&&l.push(d),c.push(f))}return c}s(e_,"baseUniq");var jM=e_;function t_(t){return t&&t.length?jM(t):[]}s(t_,"uniq");var sg=t_;function UM(t){}s(UM,"PRINT_ERROR");function zM(t){}s(zM,"PRINT_WARNING");function og(t){const e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}s(og,"timer");function lg(t){function e(){}s(e,"FakeConstructor"),e.prototype=t;const r=new e;function n(){return typeof r.bar}return s(n,"fakeAccess"),n(),n(),t}s(lg,"toFastProperties");function r_(t){return n_(t)?t.LABEL:t.name}s(r_,"tokenLabel");function n_(t){return mt(t.LABEL)&&t.LABEL!==""}s(n_,"hasTokenLabel");var Ya,pr=(Ya=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),V(this.definition,r=>{r.accept(e)})}},s(Ya,"AbstractProduction"),Ya),Xa,lt=(Xa=class extends pr{constructor(e){super([]),this.idx=1,At(this,Yt(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},s(Xa,"NonTerminal"),Xa),Ja,zo=(Ja=class extends pr{constructor(e){super(e.definition),this.orgText="",At(this,Yt(e,r=>r!==void 0))}},s(Ja,"Rule"),Ja),Za,gt=(Za=class extends pr{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,At(this,Yt(e,r=>r!==void 0))}},s(Za,"Alternative"),Za),Qa,Qe=(Qa=class extends pr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(Qa,"Option"),Qa),ei,_t=(ei=class extends pr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ei,"RepetitionMandatory"),ei),ti,Ct=(ti=class extends pr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ti,"RepetitionMandatoryWithSeparator"),ti),ri,xe=(ri=class extends pr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ri,"Repetition"),ri),ni,yt=(ni=class extends pr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ni,"RepetitionWithSeparator"),ni),ai,vt=(ai=class extends pr{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,At(this,Yt(e,r=>r!==void 0))}},s(ai,"Alternation"),ai),ii,we=(ii=class{constructor(e){this.idx=1,At(this,Yt(e,r=>r!==void 0))}accept(e){e.visit(this)}},s(ii,"Terminal"),ii);function a_(t){return z(t,Wl)}s(a_,"serializeGrammar");function Wl(t){function e(r){return z(r,Wl)}if(s(e,"convertDefinition"),t instanceof lt){const r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return mt(t.label)&&(r.label=t.label),r}else{if(t instanceof gt)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Qe)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof _t)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Ct)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Wl(new we({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof yt)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Wl(new we({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof xe)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof vt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof we){const r={type:"Terminal",name:t.terminalType.name,label:r_(t.terminalType),idx:t.idx};mt(t.label)&&(r.terminalLabel=t.label);const n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=wr(n)?n.source:n),r}else{if(t instanceof zo)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}s(Wl,"serializeProduction");var si,Bo=(si=class{visit(e){const r=e;switch(r.constructor){case lt:return this.visitNonTerminal(r);case gt:return this.visitAlternative(r);case Qe:return this.visitOption(r);case _t:return this.visitRepetitionMandatory(r);case Ct:return this.visitRepetitionMandatoryWithSeparator(r);case yt:return this.visitRepetitionWithSeparator(r);case xe:return this.visitRepetition(r);case vt:return this.visitAlternation(r);case we:return this.visitTerminal(r);case zo:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}},s(si,"GAstVisitor"),si);function i_(t){return t instanceof gt||t instanceof Qe||t instanceof xe||t instanceof _t||t instanceof Ct||t instanceof yt||t instanceof we||t instanceof zo}s(i_,"isSequenceProd");function ac(t,e=[]){return t instanceof Qe||t instanceof xe||t instanceof yt?!0:t instanceof vt?QE(t.definition,n=>ac(n,e)):t instanceof lt&&ft(e,t)?!1:t instanceof pr?(t instanceof lt&&e.push(t),Wt(t.definition,n=>ac(n,e))):!1}s(ac,"isOptionalProd");function s_(t){return t instanceof vt}s(s_,"isBranchingProd");function Ut(t){if(t instanceof lt)return"SUBRULE";if(t instanceof Qe)return"OPTION";if(t instanceof vt)return"OR";if(t instanceof _t)return"AT_LEAST_ONE";if(t instanceof Ct)return"AT_LEAST_ONE_SEP";if(t instanceof yt)return"MANY_SEP";if(t instanceof xe)return"MANY";if(t instanceof we)return"CONSUME";throw Error("non exhaustive match")}s(Ut,"getProductionDslName");var oi,zf=(oi=class{walk(e,r=[]){V(e.definition,(n,a)=>{const i=Ze(e.definition,a+1);if(n instanceof lt)this.walkProdRef(n,i,r);else if(n instanceof we)this.walkTerminal(n,i,r);else if(n instanceof gt)this.walkFlat(n,i,r);else if(n instanceof Qe)this.walkOption(n,i,r);else if(n instanceof _t)this.walkAtLeastOne(n,i,r);else if(n instanceof Ct)this.walkAtLeastOneSep(n,i,r);else if(n instanceof yt)this.walkManySep(n,i,r);else if(n instanceof xe)this.walkMany(n,i,r);else if(n instanceof vt)this.walkOr(n,i,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){const a=r.concat(n);this.walk(e,a)}walkOption(e,r,n){const a=r.concat(n);this.walk(e,a)}walkAtLeastOne(e,r,n){const a=[new Qe({definition:e.definition})].concat(r,n);this.walk(e,a)}walkAtLeastOneSep(e,r,n){const a=Yp(e,r,n);this.walk(e,a)}walkMany(e,r,n){const a=[new Qe({definition:e.definition})].concat(r,n);this.walk(e,a)}walkManySep(e,r,n){const a=Yp(e,r,n);this.walk(e,a)}walkOr(e,r,n){const a=r.concat(n);V(e.definition,i=>{const o=new gt({definition:[i]});this.walk(o,a)})}},s(oi,"RestWalker"),oi);function Yp(t,e,r){return[new Qe({definition:[new we({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}s(Yp,"restForRepetitionWithSeparator");function Ko(t){if(t instanceof lt)return Ko(t.referencedRule);if(t instanceof we)return c_(t);if(i_(t))return o_(t);if(s_(t))return l_(t);throw Error("non exhaustive match")}s(Ko,"first");function o_(t){let e=[];const r=t.definition;let n=0,a=r.length>n,i,o=!0;for(;a&&o;)i=r[n],o=ac(i),e=e.concat(Ko(i)),n=n+1,a=r.length>n;return sg(e)}s(o_,"firstForSequence");function l_(t){const e=z(t.definition,r=>Ko(r));return sg(qt(e))}s(l_,"firstForBranching");function c_(t){return[t.terminalType]}s(c_,"firstForTerminal");var u_="_~IN~_",li,BM=(li=class extends zf{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){const a=d_(e.referencedRule,e.idx)+this.topProd.name,i=r.concat(n),o=new gt({definition:i}),c=Ko(o);this.follows[a]=c}},s(li,"ResyncFollowsWalker"),li);function f_(t){const e={};return V(t,r=>{const n=new BM(r).startWalking();At(e,n)}),e}s(f_,"computeAllProdsFollows");function d_(t,e){return t.name+e+u_}s(d_,"buildBetweenProdsFollowPrefix");var cu={},KM=new KT;function Ic(t){const e=t.toString();if(cu.hasOwnProperty(e))return cu[e];{const r=KM.pattern(e);return cu[e]=r,r}}s(Ic,"getRegExpAst");function p_(){cu={}}s(p_,"clearRegExpParserCache");var h_="Complement Sets are not supported for first char optimization",Ku=`Unable to use "first char" lexer optimizations:
47
+ `;function m_(t,e=!1){try{const r=Ic(t);return qu(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===h_)e&&(`${Ku}${t.toString()}`,void 0);else{let n="";e&&(n=`
48
+ This will disable the lexer's first char optimizations.
49
+ See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),`${Ku}
50
+ Failed parsing: < ${t.toString()} >
51
+ Using the @chevrotain/regexp-to-ast library
52
+ Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n}}return[]}s(m_,"getOptimizedStartCodesIndices");function qu(t,e,r){switch(t.type){case"Disjunction":for(let a=0;a<t.value.length;a++)qu(t.value[a],e,r);break;case"Alternative":const n=t.value;for(let a=0;a<n.length;a++){const i=n[a];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const o=i;switch(o.type){case"Character":Nl(o.value,e,r);break;case"Set":if(o.complement===!0)throw Error(h_);V(o.value,l=>{if(typeof l=="number")Nl(l,e,r);else{const u=l;if(r===!0)for(let f=u.from;f<=u.to;f++)Nl(f,e,r);else{for(let f=u.from;f<=u.to&&f<Pl;f++)Nl(f,e,r);if(u.to>=Pl){const f=u.from>=Pl?u.from:Pl,d=u.to,p=Nr(f),m=Nr(d);for(let g=p;g<=m;g++)e[g]=g}}}});break;case"Group":qu(o.value,e,r);break;default:throw Error("Non Exhaustive Match")}const c=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&Wu(o)===!1||o.type!=="Group"&&c===!1)break}break;default:throw Error("non exhaustive match!")}return We(e)}s(qu,"firstCharOptimizedIndices");function Nl(t,e,r){const n=Nr(t);e[n]=n,r===!0&&g_(t,e)}s(Nl,"addOptimizedIdxToResult");function g_(t,e){const r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){const a=Nr(n.charCodeAt(0));e[a]=a}else{const a=r.toLowerCase();if(a!==r){const i=Nr(a.charCodeAt(0));e[i]=i}}}s(g_,"handleIgnoreCase");function Xp(t,e){return Mo(t.value,r=>{if(typeof r=="number")return ft(e,r);{const n=r;return Mo(e,a=>n.from<=a&&a<=n.to)!==void 0}})}s(Xp,"findCode");function Wu(t){const e=t.quantifier;return e&&e.atLeast===0?!0:t.value?ae(t.value)?Wt(t.value,Wu):Wu(t.value):!1}s(Wu,"isWholeOptional");var ci,qM=(ci=class extends $f{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return;case"Lookbehind":this.visitLookbehind(e);return;case"NegativeLookbehind":this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){ft(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?Xp(e,this.targetCharCodes)===void 0&&(this.found=!0):Xp(e,this.targetCharCodes)!==void 0&&(this.found=!0)}},s(ci,"CharCodeFinder"),ci);function Bf(t,e){if(e instanceof RegExp){const r=Ic(e),n=new qM(t);return n.visit(r),n.found}else return Mo(e,r=>ft(t,r.charCodeAt(0)))!==void 0}s(Bf,"canMatchCharCode");var Gn="PATTERN",kl="defaultMode",Fc="modes",y_=typeof new RegExp("(?:)").sticky=="boolean";function v_(t,e){e=ig(e,{useSticky:y_,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
53
+ `],tracer:s((w,C)=>C(),"tracer")});const r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{G_()});let n;r("Reject Lexer.NA",()=>{n=Uf(t,w=>w[Gn]===st.NA)});let a=!1,i;r("Transform Patterns",()=>{a=!1,i=z(n,w=>{const C=w[Gn];if(wr(C)){const k=C.source;return k.length===1&&k!=="^"&&k!=="$"&&k!=="."&&!C.ignoreCase?k:k.length===2&&k[0]==="\\"&&!ft(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],k[1])?k[1]:e.useSticky?Zp(C):Jp(C)}else{if(Dr(C))return a=!0,{exec:C};if(typeof C=="object")return a=!0,C;if(typeof C=="string"){if(C.length===1)return C;{const k=C.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),B=new RegExp(k);return e.useSticky?Zp(B):Jp(B)}}else throw Error("non exhaustive match")}})});let o,c,l,u,f;r("misc mapping",()=>{o=z(n,w=>w.tokenTypeIdx),c=z(n,w=>{const C=w.GROUP;if(C!==st.SKIPPED){if(mt(C))return C;if(Ir(C))return!1;throw Error("non exhaustive match")}}),l=z(n,w=>{const C=w.LONGER_ALT;if(C)return ae(C)?z(C,B=>rv(n,B)):[rv(n,C)]}),u=z(n,w=>w.PUSH_MODE),f=z(n,w=>q(w,"POP_MODE"))});let d;r("Line Terminator Handling",()=>{const w=fg(e.lineTerminatorCharacters);d=z(n,C=>!1),e.positionTracking!=="onlyOffset"&&(d=z(n,C=>q(C,"LINE_BREAKS")?!!C.LINE_BREAKS:ug(C,w)===!1&&Bf(w,C.PATTERN)))});let p,m,g,v;r("Misc Mapping #2",()=>{p=z(n,cg),m=z(i,x_),g=Et(n,(w,C)=>{const k=C.GROUP;return mt(k)&&k!==st.SKIPPED&&(w[k]=[]),w},{}),v=z(i,(w,C)=>({pattern:i[C],longerAlt:l[C],canLineTerminator:d[C],isCustom:p[C],short:m[C],group:c[C],push:u[C],pop:f[C],tokenTypeIdx:o[C],tokenType:n[C]}))});let E=!0,T=[];return e.safeMode||r("First Char Optimization",()=>{T=Et(n,(w,C,k)=>{if(typeof C.PATTERN=="string"){const B=C.PATTERN.charCodeAt(0),re=Nr(B);uu(w,re,v[k])}else if(ae(C.START_CHARS_HINT)){let B;V(C.START_CHARS_HINT,re=>{const X=typeof re=="string"?re.charCodeAt(0):re,ge=Nr(X);B!==ge&&(B=ge,uu(w,ge,v[k]))})}else if(wr(C.PATTERN))if(C.PATTERN.unicode)E=!1,e.ensureOptimizations&&(`${Ku}${C.PATTERN.toString()}`,void 0);else{const B=m_(C.PATTERN,e.ensureOptimizations);Ee(B)&&(E=!1),V(B,re=>{uu(w,re,v[k])})}else e.ensureOptimizations&&(`${Ku}${C.name}`,void 0),E=!1;return w},[])}),{emptyGroups:g,patternIdxToConfig:v,charCodeToPatternIdxToConfig:T,hasCustom:a,canBeOptimized:E}}s(v_,"analyzeTokenTypes");function T_(t,e){let r=[];const n=$_(t);r=r.concat(n.errors);const a=A_(n.valid),i=a.valid;return r=r.concat(a.errors),r=r.concat(R_(i)),r=r.concat(w_(i)),r=r.concat(I_(i,e)),r=r.concat(N_(i)),r}s(T_,"validatePatterns");function R_(t){let e=[];const r=Ft(t,n=>wr(n[Gn]));return e=e.concat(E_(r)),e=e.concat(C_(r)),e=e.concat(S_(r)),e=e.concat(b_(r)),e=e.concat(__(r)),e}s(R_,"validateRegExpPattern");function $_(t){const e=Ft(t,a=>!q(a,Gn)),r=z(e,a=>({message:"Token Type: ->"+a.name+"<- missing static 'PATTERN' property",type:Fe.MISSING_PATTERN,tokenTypes:[a]})),n=jf(t,e);return{errors:r,valid:n}}s($_,"findMissingPatterns");function A_(t){const e=Ft(t,a=>{const i=a[Gn];return!wr(i)&&!Dr(i)&&!q(i,"exec")&&!mt(i)}),r=z(e,a=>({message:"Token Type: ->"+a.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Fe.INVALID_PATTERN,tokenTypes:[a]})),n=jf(t,e);return{errors:r,valid:n}}s(A_,"findInvalidPatterns");var WM=/[^\\][$]/;function E_(t){const a=class a extends $f{constructor(){super(...arguments),this.found=!1}visitEndAnchor(o){this.found=!0}};s(a,"EndAnchorFinder");let e=a;const r=Ft(t,i=>{const o=i.PATTERN;try{const c=Ic(o),l=new e;return l.visit(c),l.found}catch{return WM.test(o.source)}});return z(r,i=>({message:`Unexpected RegExp Anchor Error:
54
+ Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
55
+ See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Fe.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}s(E_,"findEndOfInputAnchor");function __(t){const e=Ft(t,n=>n.PATTERN.test(""));return z(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Fe.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}s(__,"findEmptyMatchRegExps");var VM=/[^\\[][\^]|^\^/;function C_(t){const a=class a extends $f{constructor(){super(...arguments),this.found=!1}visitStartAnchor(o){this.found=!0}};s(a,"StartAnchorFinder");let e=a;const r=Ft(t,i=>{const o=i.PATTERN;try{const c=Ic(o),l=new e;return l.visit(c),l.found}catch{return VM.test(o.source)}});return z(r,i=>({message:`Unexpected RegExp Anchor Error:
56
+ Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
57
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Fe.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}s(C_,"findStartOfInputAnchor");function S_(t){const e=Ft(t,n=>{const a=n[Gn];return a instanceof RegExp&&(a.multiline||a.global)});return z(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Fe.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}s(S_,"findUnsupportedFlags");function b_(t){const e=[];let r=z(t,i=>Et(t,(o,c)=>(i.PATTERN.source===c.PATTERN.source&&!ft(e,c)&&c.PATTERN!==st.NA&&(e.push(c),o.push(c)),o),[]));r=wc(r);const n=Ft(r,i=>i.length>1);return z(n,i=>{const o=z(i,l=>l.name);return{message:`The same RegExp pattern ->${Ht(i).PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:Fe.DUPLICATE_PATTERNS_FOUND,tokenTypes:i}})}s(b_,"findDuplicatePatterns");function w_(t){const e=Ft(t,n=>{if(!q(n,"GROUP"))return!1;const a=n.GROUP;return a!==st.SKIPPED&&a!==st.NA&&!mt(a)});return z(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Fe.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}s(w_,"findInvalidGroupType");function I_(t,e){const r=Ft(t,a=>a.PUSH_MODE!==void 0&&!ft(e,a.PUSH_MODE));return z(r,a=>({message:`Token Type: ->${a.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${a.PUSH_MODE}<-which does not exist`,type:Fe.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[a]}))}s(I_,"findModesThatDoNotExist");function N_(t){const e=[],r=Et(t,(n,a,i)=>{const o=a.PATTERN;return o===st.NA||(mt(o)?n.push({str:o,idx:i,tokenType:a}):wr(o)&&P_(o)&&n.push({str:o.source,idx:i,tokenType:a})),n},[]);return V(t,(n,a)=>{V(r,({str:i,idx:o,tokenType:c})=>{if(a<o&&k_(i,n.PATTERN)){const l=`Token: ->${c.name}<- can never be matched.
58
+ Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
59
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:l,type:Fe.UNREACHABLE_PATTERN,tokenTypes:[n,c]})}})}),e}s(N_,"findUnreachablePatterns");function k_(t,e){if(wr(e)){if(O_(e))return!1;const r=e.exec(t);return r!==null&&r.index===0}else{if(Dr(e))return e(t,0,[],{});if(q(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}s(k_,"tryToMatchStrToPattern");function P_(t){return Mo([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}s(P_,"noMetaChar");function O_(t){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(t.source)}s(O_,"usesLookAheadOrBehind");function Jp(t){const e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}s(Jp,"addStartOfInput");function Zp(t){const e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}s(Zp,"addStickyFlag");function L_(t,e,r){const n=[];return q(t,kl)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+kl+`> property in its definition
60
+ `,type:Fe.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),q(t,Fc)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Fc+`> property in its definition
61
+ `,type:Fe.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),q(t,Fc)&&q(t,kl)&&!q(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${kl}: <${t.defaultMode}>which does not exist
62
+ `,type:Fe.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),q(t,Fc)&&V(t.modes,(a,i)=>{V(a,(o,c)=>{if(Ir(o))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${c}>
63
+ `,type:Fe.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(q(o,"LONGER_ALT")){const l=ae(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT];V(l,u=>{!Ir(u)&&!ft(a,u)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${o.name}> outside of mode <${i}>
64
+ `,type:Fe.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}s(L_,"performRuntimeChecks");function D_(t,e,r){const n=[];let a=!1;const i=wc(qt(We(t.modes))),o=Uf(i,l=>l[Gn]===st.NA),c=fg(r);return e&&V(o,l=>{const u=ug(l,c);if(u!==!1){const d={message:F_(l,u),type:u.issue,tokenType:l};n.push(d)}else q(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(a=!0):Bf(c,l.PATTERN)&&(a=!0)}),e&&!a&&n.push({message:`Warning: No LINE_BREAKS Found.
65
+ This Lexer has been defined to track line and column information,
66
+ But none of the Token Types can be identified as matching a line terminator.
67
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
68
+ for details.`,type:Fe.NO_LINE_BREAKS_FLAGS}),n}s(D_,"performWarningRuntimeChecks");function M_(t){const e={},r=$t(t);return V(r,n=>{const a=t[n];if(ae(a))e[n]=[];else throw Error("non exhaustive match")}),e}s(M_,"cloneEmptyGroups");function cg(t){const e=t.PATTERN;if(wr(e))return!1;if(Dr(e))return!0;if(q(e,"exec"))return!0;if(mt(e))return!1;throw Error("non exhaustive match")}s(cg,"isCustomPattern");function x_(t){return mt(t)&&t.length===1?t.charCodeAt(0):!1}s(x_,"isShortPattern");var HM={test:s(function(t){const e=t.length;for(let r=this.lastIndex;r<e;r++){const n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};function ug(t,e){if(q(t,"LINE_BREAKS"))return!1;if(wr(t.PATTERN)){try{Bf(e,t.PATTERN)}catch(r){return{issue:Fe.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(mt(t.PATTERN))return!1;if(cg(t))return{issue:Fe.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}s(ug,"checkLineBreaksIssues");function F_(t,e){if(e.issue===Fe.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
69
+ The problem is in the <${t.name}> Token Type
70
+ Root cause: ${e.errMsg}.
71
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Fe.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
72
+ The problem is in the <${t.name}> Token Type
73
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}s(F_,"buildLineBreakIssueMessage");function fg(t){return z(t,r=>mt(r)?r.charCodeAt(0):r)}s(fg,"getCharCodes");function uu(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}s(uu,"addToMapOfArrays");var Pl=256,fu=[];function Nr(t){return t<Pl?t:fu[t]}s(Nr,"charCodeToOptimizedIndex");function G_(){if(Ee(fu)){fu=new Array(65536);for(let t=0;t<65536;t++)fu[t]=t>255?255+~~(t/255):t}}s(G_,"initCharCodeToOptimizedIndexMap");function qo(t,e){const r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0}s(qo,"tokenStructuredMatcher");function ic(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}s(ic,"tokenStructuredMatcherNoCategories");var av=1,j_={};function Wo(t){const e=U_(t);z_(e),K_(e),B_(e),V(e,r=>{r.isParent=r.categoryMatches.length>0})}s(Wo,"augmentTokenTypes");function U_(t){let e=et(t),r=t,n=!0;for(;n;){r=wc(qt(z(r,i=>i.CATEGORIES)));const a=jf(r,e);e=e.concat(a),Ee(a)?n=!1:r=a}return e}s(U_,"expandCategories");function z_(t){V(t,e=>{pg(e)||(j_[av]=e,e.tokenTypeIdx=av++),Qp(e)&&!ae(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Qp(e)||(e.CATEGORIES=[]),q_(e)||(e.categoryMatches=[]),W_(e)||(e.categoryMatchesMap={})})}s(z_,"assignTokenDefaultProps");function B_(t){V(t,e=>{e.categoryMatches=[],V(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(j_[n].tokenTypeIdx)})})}s(B_,"assignCategoriesTokensProp");function K_(t){V(t,e=>{dg([],e)})}s(K_,"assignCategoriesMapProp");function dg(t,e){V(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),V(e.CATEGORIES,r=>{const n=t.concat(e);ft(n,r)||dg(n,r)})}s(dg,"singleAssignCategoriesToksMap");function pg(t){return q(t,"tokenTypeIdx")}s(pg,"hasShortKeyProperty");function Qp(t){return q(t,"CATEGORIES")}s(Qp,"hasCategoriesProperty");function q_(t){return q(t,"categoryMatches")}s(q_,"hasExtendingTokensTypesProperty");function W_(t){return q(t,"categoryMatchesMap")}s(W_,"hasExtendingTokensTypesMapProperty");function V_(t){return q(t,"tokenTypeIdx")}s(V_,"isTokenType");var eh={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,a,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}},Fe;(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Fe||(Fe={}));var Ol={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
74
+ `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:eh,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Ol);var ui,st=(ui=class{constructor(e,r=Ol){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=(a,i)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;const o=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent;const{time:c,value:l}=og(i),u=c>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&u(`${o}<-- <${a}> time: ${c}ms`),this.traceInitIndent--,l}else return i()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
75
+ a boolean 2nd argument is no longer supported`);this.config=At({},Ol,r);const n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let a,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Ol.lineTerminatorsPattern)this.config.lineTerminatorsPattern=HM;else if(this.config.lineTerminatorCharacters===Ol.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
76
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),ae(e)?a={modes:{defaultMode:et(e)},defaultMode:kl}:(i=!1,a=et(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(L_(a,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(D_(a,this.trackStartLines,this.config.lineTerminatorCharacters))})),a.modes=a.modes?a.modes:{},V(a.modes,(c,l)=>{a.modes[l]=Uf(c,u=>Ir(u))});const o=$t(a.modes);if(V(a.modes,(c,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(T_(c,o))}),Ee(this.lexerDefinitionErrors)){Wo(c);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=v_(c,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=u.charCodeToPatternIdxToConfig,this.emptyGroups=At({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=u.canBeOptimized}})}),this.defaultMode=a.defaultMode,!Ee(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const l=z(this.lexerDefinitionErrors,u=>u.message).join(`-----------------------
77
+ `);throw new Error(`Errors detected in definition of Lexer:
78
+ `+l)}V(this.lexerDefinitionWarning,c=>{c.message}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(y_?(this.chopInput=Lo,this.match=this.matchWithTest):(this.updateLastIndex=qe,this.match=this.matchWithExec),i&&(this.handleModes=qe),this.trackStartLines===!1&&(this.computeNewColumn=Lo),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=qe),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const c=Et(this.canModeBeOptimized,(l,u,f)=>(u===!1&&l.push(f),l),[]);if(r.ensureOptimizations&&!Ee(c))throw Error(`Lexer Modes: < ${c.join(", ")} > cannot be optimized.
79
+ Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
80
+ Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{p_()}),this.TRACE_INIT("toFastProperties",()=>{lg(this)})})}tokenize(e,r=this.defaultMode){if(!Ee(this.lexerDefinitionErrors)){const a=z(this.lexerDefinitionErrors,i=>i.message).join(`-----------------------
81
+ `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
82
+ `+a)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,a,i,o,c,l,u,f,d,p,m,g,v,E,T;const w=e,C=w.length;let k=0,B=0;const re=this.hasCustom?0:Math.floor(e.length/10),X=new Array(re),ge=[];let _e=this.trackStartLines?1:void 0,Ie=this.trackStartLines?1:void 0;const oe=M_(this.emptyGroups),tt=this.trackStartLines,P=this.config.lineTerminatorsPattern;let S=0,R=[],I=[];const $=[],A=[];Object.freeze(A);let b;function O(){return R}s(O,"getPossiblePatternsSlow");function M(U){const Q=Nr(U),fe=I[Q];return fe===void 0?A:fe}s(M,"getPossiblePatternsOptimized");const L=s(U=>{if($.length===1&&U.tokenType.PUSH_MODE===void 0){const Q=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(U);ge.push({offset:U.startOffset,line:U.startLine,column:U.startColumn,length:U.image.length,message:Q})}else{$.pop();const Q=Fn($);R=this.patternIdxToConfig[Q],I=this.charCodeToPatternIdxToConfig[Q],S=R.length;const fe=this.canModeBeOptimized[Q]&&this.config.safeMode===!1;I&&fe?b=M:b=O}},"pop_mode");function j(U){$.push(U),I=this.charCodeToPatternIdxToConfig[U],R=this.patternIdxToConfig[U],S=R.length,S=R.length;const Q=this.canModeBeOptimized[U]&&this.config.safeMode===!1;I&&Q?b=M:b=O}s(j,"push_mode"),j.call(this,r);let F;const te=this.config.recoveryEnabled;for(;k<C;){l=null;const U=w.charCodeAt(k),Q=b(U),fe=Q.length;for(n=0;n<fe;n++){F=Q[n];const de=F.pattern;u=null;const pe=F.short;if(pe!==!1?U===pe&&(l=de):F.isCustom===!0?(T=de.exec(w,k,X,oe),T!==null?(l=T[0],T.payload!==void 0&&(u=T.payload)):l=null):(this.updateLastIndex(de,k),l=this.match(de,e,k)),l!==null){if(c=F.longerAlt,c!==void 0){const ye=c.length;for(i=0;i<ye;i++){const Ne=R[c[i]],he=Ne.pattern;if(f=null,Ne.isCustom===!0?(T=he.exec(w,k,X,oe),T!==null?(o=T[0],T.payload!==void 0&&(f=T.payload)):o=null):(this.updateLastIndex(he,k),o=this.match(he,e,k)),o&&o.length>l.length){l=o,u=f,F=Ne;break}}}break}}if(l!==null){if(d=l.length,p=F.group,p!==void 0&&(m=F.tokenTypeIdx,g=this.createTokenInstance(l,k,m,F.tokenType,_e,Ie,d),this.handlePayload(g,u),p===!1?B=this.addToken(X,B,g):oe[p].push(g)),e=this.chopInput(e,d),k=k+d,Ie=this.computeNewColumn(Ie,d),tt===!0&&F.canLineTerminator===!0){let de=0,pe,ye;P.lastIndex=0;do pe=P.test(l),pe===!0&&(ye=P.lastIndex-1,de++);while(pe===!0);de!==0&&(_e=_e+de,Ie=d-ye,this.updateTokenEndLineColumnLocation(g,p,ye,de,_e,Ie,d))}this.handleModes(F,L,j,g)}else{const de=k,pe=_e,ye=Ie;let Ne=te===!1;for(;Ne===!1&&k<C;)for(e=this.chopInput(e,1),k++,a=0;a<S;a++){const he=R[a],J=he.pattern,Ue=he.short;if(Ue!==!1?w.charCodeAt(k)===Ue&&(Ne=!0):he.isCustom===!0?Ne=J.exec(w,k,X,oe)!==null:(this.updateLastIndex(J,k),Ne=J.exec(e)!==null),Ne===!0)break}if(v=k-de,Ie=this.computeNewColumn(Ie,v),E=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(w,de,v,pe,ye,Fn($)),ge.push({offset:de,line:pe,column:ye,length:v,message:E}),te===!1)break}}return this.hasCustom||(X.length=B),{tokens:X,groups:oe,errors:ge}}handleModes(e,r,n,a){if(e.pop===!0){const i=e.push;r(a),i!==void 0&&n.call(this,i)}else e.push!==void 0&&n.call(this,e.push)}chopInput(e,r){return e.substring(r)}updateLastIndex(e,r){e.lastIndex=r}updateTokenEndLineColumnLocation(e,r,n,a,i,o,c){let l,u;r!==void 0&&(l=n===c-1,u=l?-1:0,a===1&&l===!0||(e.endLine=i+u,e.endColumn=o-1+-u))}computeNewColumn(e,r){return e+r}createOffsetOnlyToken(e,r,n,a){return{image:e,startOffset:r,tokenTypeIdx:n,tokenType:a}}createStartOnlyToken(e,r,n,a,i,o){return{image:e,startOffset:r,startLine:i,startColumn:o,tokenTypeIdx:n,tokenType:a}}createFullToken(e,r,n,a,i,o,c){return{image:e,startOffset:r,endOffset:r+c-1,startLine:i,endLine:i,startColumn:o,endColumn:o+c-1,tokenTypeIdx:n,tokenType:a}}addTokenUsingPush(e,r,n){return e.push(n),r}addTokenUsingMemberAccess(e,r,n){return e[r]=n,r++,r}handlePayloadNoCustom(e,r){}handlePayloadWithCustom(e,r){r!==null&&(e.payload=r)}matchWithTest(e,r,n){return e.test(r)===!0?r.substring(n,e.lastIndex):null}matchWithExec(e,r){const n=e.exec(r);return n!==null?n[0]:null}},s(ui,"Lexer"),ui);st.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";st.NA=/NOT_APPLICABLE/;function On(t){return hg(t)?t.LABEL:t.name}s(On,"tokenLabel");function hg(t){return mt(t.LABEL)&&t.LABEL!==""}s(hg,"hasTokenLabel");var YM="parent",iv="categories",sv="label",ov="group",lv="push_mode",cv="pop_mode",uv="longer_alt",fv="line_breaks",dv="start_chars_hint";function ja(t){return H_(t)}s(ja,"createToken");function H_(t){const e=t.pattern,r={};if(r.name=t.name,Ir(e)||(r.PATTERN=e),q(t,YM))throw`The parent property is no longer supported.
83
+ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return q(t,iv)&&(r.CATEGORIES=t[iv]),Wo([r]),q(t,sv)&&(r.LABEL=t[sv]),q(t,ov)&&(r.GROUP=t[ov]),q(t,cv)&&(r.POP_MODE=t[cv]),q(t,lv)&&(r.PUSH_MODE=t[lv]),q(t,uv)&&(r.LONGER_ALT=t[uv]),q(t,fv)&&(r.LINE_BREAKS=t[fv]),q(t,dv)&&(r.START_CHARS_HINT=t[dv]),r}s(H_,"createTokenInternal");var Yr=ja({name:"EOF",pattern:st.NA});Wo([Yr]);function Nc(t,e,r,n,a,i,o,c){return{image:e,startOffset:r,endOffset:n,startLine:a,endLine:i,startColumn:o,endColumn:c,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}s(Nc,"createTokenInstance");function mg(t,e){return qo(t,e)}s(mg,"tokenMatcher");var xa={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${hg(t)?`--> ${On(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:a}){const i="Expecting: ",c=`
84
+ but found: '`+Ht(e).image+"'";if(n)return i+n+c;{const l=Et(t,(p,m)=>p.concat(m),[]),u=z(l,p=>`[${z(p,m=>On(m)).join(", ")}]`),d=`one of these possible Token sequences:
85
+ ${z(u,(p,m)=>` ${m+1}. ${p}`).join(`
86
+ `)}`;return i+d+c}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){const a="Expecting: ",o=`
87
+ but found: '`+Ht(e).image+"'";if(r)return a+r+o;{const l=`expecting at least one iteration which starts with one of these possible Token sequences::
88
+ <${z(t,u=>`[${z(u,f=>On(f)).join(",")}]`).join(" ,")}>`;return a+l+o}}};Object.freeze(xa);var XM={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
89
+ inside top level rule: ->`+t.name+"<-"}},Nn={buildDuplicateFoundError(t,e){function r(f){return f instanceof we?f.terminalType.name:f instanceof lt?f.nonTerminalName:""}s(r,"getExtraProductionArgument");const n=t.name,a=Ht(e),i=a.idx,o=Ut(a),c=r(a),l=i>0;let u=`->${o}${l?i:""}<- ${c?`with argument: ->${c}<-`:""}
90
+ appears more than once (${e.length} times) in the top level rule: ->${n}<-.
91
+ For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
92
+ `;return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,`
93
+ `),u},buildNamespaceConflictError(t){return`Namespace conflict found in grammar.
94
+ The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.
95
+ To resolve this make sure each Terminal and Non-Terminal names are unique
96
+ This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
97
+ and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){const e=z(t.prefixPath,a=>On(a)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix
98
+ in <OR${r}> inside <${t.topLevelRule.name}> Rule,
99
+ <${e}> may appears as a prefix path in all these alternatives.
100
+ See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
101
+ For Further details.`},buildAlternationAmbiguityError(t){const e=z(t.prefixPath,a=>On(a)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;let n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${t.topLevelRule.name}> Rule,
102
+ <${e}> may appears as a prefix path in all these alternatives.
103
+ `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
104
+ For Further details.`,n},buildEmptyRepetitionError(t){let e=Ut(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.
105
+ This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
106
+ Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives:
107
+ <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
108
+ has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){const e=t.topLevelRule.name,r=z(t.leftRecursionPath,i=>i.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar.
109
+ rule: <${e}> can be invoked from itself (directly or indirectly)
110
+ without consuming any Tokens. The grammar path that causes this is:
111
+ ${n}
112
+ To fix this refactor your grammar to remove the left recursion.
113
+ see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof zo?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function Y_(t,e){const r=new JM(t,e);return r.resolveRefs(),r.errors}s(Y_,"resolveGrammar");var fi,JM=(fi=class extends Bo{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){V(We(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{const n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:ct.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},s(fi,"GastRefResolverVisitor"),fi),di,ZM=(di=class extends zf{constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=et(this.path.ruleStack).reverse(),this.occurrenceStack=et(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const a=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,a)}}updateExpectedNext(){Ee(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},s(di,"AbstractNextPossibleTokensWalker"),di),pi,QM=(pi=class extends ZM{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const a=r.concat(n),i=new gt({definition:a});this.possibleTokTypes=Ko(i),this.found=!0}}},s(pi,"NextAfterTokenWalker"),pi),hi,Kf=(hi=class extends zf{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},s(hi,"AbstractNextTerminalAfterProductionWalker"),hi),mi,ex=(mi=class extends Kf{walkMany(e,r,n){if(e.idx===this.occurrence){const a=Ht(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof we&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkMany(e,r,n)}},s(mi,"NextTerminalAfterManyWalker"),mi),gi,pv=(gi=class extends Kf{walkManySep(e,r,n){if(e.idx===this.occurrence){const a=Ht(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof we&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkManySep(e,r,n)}},s(gi,"NextTerminalAfterManySepWalker"),gi),yi,tx=(yi=class extends Kf{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){const a=Ht(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof we&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkAtLeastOne(e,r,n)}},s(yi,"NextTerminalAfterAtLeastOneWalker"),yi),vi,hv=(vi=class extends Kf{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){const a=Ht(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof we&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkAtLeastOneSep(e,r,n)}},s(vi,"NextTerminalAfterAtLeastOneSepWalker"),vi);function Vu(t,e,r=[]){r=et(r);let n=[],a=0;function i(c){return c.concat(Ze(t,a+1))}s(i,"remainingPathWith");function o(c){const l=Vu(i(c),e,r);return n.concat(l)}for(s(o,"getAlternativesForProd");r.length<e&&a<t.length;){const c=t[a];if(c instanceof gt)return o(c.definition);if(c instanceof lt)return o(c.definition);if(c instanceof Qe)n=o(c.definition);else if(c instanceof _t){const l=c.definition.concat([new xe({definition:c.definition})]);return o(l)}else if(c instanceof Ct){const l=[new gt({definition:c.definition}),new xe({definition:[new we({terminalType:c.separator})].concat(c.definition)})];return o(l)}else if(c instanceof yt){const l=c.definition.concat([new xe({definition:[new we({terminalType:c.separator})].concat(c.definition)})]);n=o(l)}else if(c instanceof xe){const l=c.definition.concat([new xe({definition:c.definition})]);n=o(l)}else{if(c instanceof vt)return V(c.definition,l=>{Ee(l.definition)===!1&&(n=o(l.definition))}),n;if(c instanceof we)r.push(c.terminalType);else throw Error("non exhaustive match")}a++}return n.push({partialPath:r,suffixDef:Ze(t,a)}),n}s(Vu,"possiblePathsFrom");function gg(t,e,r,n){const a="EXIT_NONE_TERMINAL",i=[a],o="EXIT_ALTERNATIVE";let c=!1;const l=e.length,u=l-n-1,f=[],d=[];for(d.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!Ee(d);){const p=d.pop();if(p===o){c&&Fn(d).idx<=u&&d.pop();continue}const m=p.def,g=p.idx,v=p.ruleStack,E=p.occurrenceStack;if(Ee(m))continue;const T=m[0];if(T===a){const w={idx:g,def:Ze(m),ruleStack:nc(v),occurrenceStack:nc(E)};d.push(w)}else if(T instanceof we)if(g<l-1){const w=g+1,C=e[w];if(r(C,T.terminalType)){const k={idx:w,def:Ze(m),ruleStack:v,occurrenceStack:E};d.push(k)}}else if(g===l-1)f.push({nextTokenType:T.terminalType,nextTokenOccurrence:T.idx,ruleStack:v,occurrenceStack:E}),c=!0;else throw Error("non exhaustive match");else if(T instanceof lt){const w=et(v);w.push(T.nonTerminalName);const C=et(E);C.push(T.idx);const k={idx:g,def:T.definition.concat(i,Ze(m)),ruleStack:w,occurrenceStack:C};d.push(k)}else if(T instanceof Qe){const w={idx:g,def:Ze(m),ruleStack:v,occurrenceStack:E};d.push(w),d.push(o);const C={idx:g,def:T.definition.concat(Ze(m)),ruleStack:v,occurrenceStack:E};d.push(C)}else if(T instanceof _t){const w=new xe({definition:T.definition,idx:T.idx}),C=T.definition.concat([w],Ze(m)),k={idx:g,def:C,ruleStack:v,occurrenceStack:E};d.push(k)}else if(T instanceof Ct){const w=new we({terminalType:T.separator}),C=new xe({definition:[w].concat(T.definition),idx:T.idx}),k=T.definition.concat([C],Ze(m)),B={idx:g,def:k,ruleStack:v,occurrenceStack:E};d.push(B)}else if(T instanceof yt){const w={idx:g,def:Ze(m),ruleStack:v,occurrenceStack:E};d.push(w),d.push(o);const C=new we({terminalType:T.separator}),k=new xe({definition:[C].concat(T.definition),idx:T.idx}),B=T.definition.concat([k],Ze(m)),re={idx:g,def:B,ruleStack:v,occurrenceStack:E};d.push(re)}else if(T instanceof xe){const w={idx:g,def:Ze(m),ruleStack:v,occurrenceStack:E};d.push(w),d.push(o);const C=new xe({definition:T.definition,idx:T.idx}),k=T.definition.concat([C],Ze(m)),B={idx:g,def:k,ruleStack:v,occurrenceStack:E};d.push(B)}else if(T instanceof vt)for(let w=T.definition.length-1;w>=0;w--){const C=T.definition[w],k={idx:g,def:C.definition.concat(Ze(m)),ruleStack:v,occurrenceStack:E};d.push(k),d.push(o)}else if(T instanceof gt)d.push({idx:g,def:T.definition.concat(Ze(m)),ruleStack:v,occurrenceStack:E});else if(T instanceof zo)d.push(X_(T,g,v,E));else throw Error("non exhaustive match")}return f}s(gg,"nextPossibleTokensAfter");function X_(t,e,r,n){const a=et(r);a.push(t.name);const i=et(n);return i.push(1),{idx:e,def:t.definition,ruleStack:a,occurrenceStack:i}}s(X_,"expandTopLevelRule");var De;(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(De||(De={}));function qf(t){if(t instanceof Qe||t==="Option")return De.OPTION;if(t instanceof xe||t==="Repetition")return De.REPETITION;if(t instanceof _t||t==="RepetitionMandatory")return De.REPETITION_MANDATORY;if(t instanceof Ct||t==="RepetitionMandatoryWithSeparator")return De.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof yt||t==="RepetitionWithSeparator")return De.REPETITION_WITH_SEPARATOR;if(t instanceof vt||t==="Alternation")return De.ALTERNATION;throw Error("non exhaustive match")}s(qf,"getProdType");function th(t){const{occurrence:e,rule:r,prodType:n,maxLookahead:a}=t,i=qf(n);return i===De.ALTERNATION?kc(e,r,a):Pc(e,r,i,a)}s(th,"getLookaheadPaths");function J_(t,e,r,n,a,i){const o=kc(t,e,r),c=vg(o)?ic:qo;return i(o,n,c,a)}s(J_,"buildLookaheadFuncForOr");function Z_(t,e,r,n,a,i){const o=Pc(t,e,a,r),c=vg(o)?ic:qo;return i(o[0],c,n)}s(Z_,"buildLookaheadFuncForOptionalProd");function Q_(t,e,r,n){const a=t.length,i=Wt(t,o=>Wt(o,c=>c.length===1));if(e)return function(o){const c=z(o,l=>l.GATE);for(let l=0;l<a;l++){const u=t[l],f=u.length,d=c[l];if(!(d!==void 0&&d.call(this)===!1))e:for(let p=0;p<f;p++){const m=u[p],g=m.length;for(let v=0;v<g;v++){const E=this.LA(v+1);if(r(E,m[v])===!1)continue e}return l}}};if(i&&!n){const o=z(t,l=>qt(l)),c=Et(o,(l,u,f)=>(V(u,d=>{q(l,d.tokenTypeIdx)||(l[d.tokenTypeIdx]=f),V(d.categoryMatches,p=>{q(l,p)||(l[p]=f)})}),l),{});return function(){const l=this.LA(1);return c[l.tokenTypeIdx]}}else return function(){for(let o=0;o<a;o++){const c=t[o],l=c.length;e:for(let u=0;u<l;u++){const f=c[u],d=f.length;for(let p=0;p<d;p++){const m=this.LA(p+1);if(r(m,f[p])===!1)continue e}return o}}}}s(Q_,"buildAlternativesLookAheadFunc");function eC(t,e,r){const n=Wt(t,i=>i.length===1),a=t.length;if(n&&!r){const i=qt(t);if(i.length===1&&Ee(i[0].categoryMatches)){const c=i[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===c}}else{const o=Et(i,(c,l,u)=>(c[l.tokenTypeIdx]=!0,V(l.categoryMatches,f=>{c[f]=!0}),c),[]);return function(){const c=this.LA(1);return o[c.tokenTypeIdx]===!0}}}else return function(){e:for(let i=0;i<a;i++){const o=t[i],c=o.length;for(let l=0;l<c;l++){const u=this.LA(l+1);if(e(u,o[l])===!1)continue e}return!0}return!1}}s(eC,"buildSingleAlternativeLookaheadFunction");var Ti,rx=(Ti=class extends zf{constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,a){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(a),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,De.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,De.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,De.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,De.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,De.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},s(Ti,"RestDefinitionFinderWalker"),Ti),Ri,tC=(Ri=class extends Bo{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,De.OPTION)}visitRepetition(e){this.checkIsTarget(e,De.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,De.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,De.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,De.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,De.ALTERNATION)}},s(Ri,"InsideDefinitionFinderVisitor"),Ri);function rh(t){const e=new Array(t);for(let r=0;r<t;r++)e[r]=[];return e}s(rh,"initializeArrayOfArrays");function du(t){let e=[""];for(let r=0;r<t.length;r++){const n=t[r],a=[];for(let i=0;i<e.length;i++){const o=e[i];a.push(o+"_"+n.tokenTypeIdx);for(let c=0;c<n.categoryMatches.length;c++){const l="_"+n.categoryMatches[c];a.push(o+l)}}e=a}return e}s(du,"pathToHashKeys");function rC(t,e,r){for(let n=0;n<t.length;n++){if(n===r)continue;const a=t[n];for(let i=0;i<e.length;i++){const o=e[i];if(a[o]===!0)return!1}}return!0}s(rC,"isUniquePrefixHash");function yg(t,e){const r=z(t,o=>Vu([o],1)),n=rh(r.length),a=z(r,o=>{const c={};return V(o,l=>{const u=du(l.partialPath);V(u,f=>{c[f]=!0})}),c});let i=r;for(let o=1;o<=e;o++){const c=i;i=rh(c.length);for(let l=0;l<c.length;l++){const u=c[l];for(let f=0;f<u.length;f++){const d=u[f].partialPath,p=u[f].suffixDef,m=du(d);if(rC(a,m,l)||Ee(p)||d.length===e){const v=n[l];if(Hu(v,d)===!1){v.push(d);for(let E=0;E<m.length;E++){const T=m[E];a[l][T]=!0}}}else{const v=Vu(p,o+1,d);i[l]=i[l].concat(v),V(v,E=>{const T=du(E.partialPath);V(T,w=>{a[l][w]=!0})})}}}}return n}s(yg,"lookAheadSequenceFromAlternatives");function kc(t,e,r,n){const a=new tC(t,De.ALTERNATION,n);return e.accept(a),yg(a.result,r)}s(kc,"getLookaheadPathsForOr");function Pc(t,e,r,n){const a=new tC(t,r);e.accept(a);const i=a.result,c=new rx(e,t,r).startWalking(),l=new gt({definition:i}),u=new gt({definition:c});return yg([l,u],n)}s(Pc,"getLookaheadPathsForOptionalProd");function Hu(t,e){e:for(let r=0;r<t.length;r++){const n=t[r];if(n.length===e.length){for(let a=0;a<n.length;a++){const i=e[a],o=n[a];if((i===o||o.categoryMatchesMap[i.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}s(Hu,"containsPath");function nC(t,e){return t.length<e.length&&Wt(t,(r,n)=>{const a=e[n];return r===a||a.categoryMatchesMap[r.tokenTypeIdx]})}s(nC,"isStrictPrefixOfPath");function vg(t){return Wt(t,e=>Wt(e,r=>Wt(r,n=>Ee(n.categoryMatches))))}s(vg,"areTokenCategoriesNotUsed");function aC(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return z(e,r=>Object.assign({type:ct.CUSTOM_LOOKAHEAD_VALIDATION},r))}s(aC,"validateLookahead");function iC(t,e,r,n){const a=Lt(t,l=>sC(l,r)),i=gC(t,e,r),o=Lt(t,l=>dC(l,r)),c=Lt(t,l=>lC(l,t,n,r));return a.concat(i,o,c)}s(iC,"validateGrammar");function sC(t,e){const r=new nx;t.accept(r);const n=r.allProductions,a=mM(n,oC),i=Yt(a,c=>c.length>1);return z(We(i),c=>{const l=Ht(c),u=e.buildDuplicateFoundError(t,c),f=Ut(l),d={message:u,type:ct.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:f,occurrence:l.idx},p=Tg(l);return p&&(d.parameter=p),d})}s(sC,"validateDuplicateProductions");function oC(t){return`${Ut(t)}_#_${t.idx}_#_${Tg(t)}`}s(oC,"identifyProductionForDuplicates");function Tg(t){return t instanceof we?t.terminalType.name:t instanceof lt?t.nonTerminalName:""}s(Tg,"getExtraProductionArgument");var $i,nx=($i=class extends Bo{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)}},s($i,"OccurrenceValidationCollector"),$i);function lC(t,e,r,n){const a=[];if(Et(e,(o,c)=>c.name===t.name?o+1:o,0)>1){const o=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});a.push({message:o,type:ct.DUPLICATE_RULE_NAME,ruleName:t.name})}return a}s(lC,"validateRuleDoesNotAlreadyExist");function cC(t,e,r){const n=[];let a;return ft(e,t)||(a=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:a,type:ct.INVALID_RULE_OVERRIDE,ruleName:t})),n}s(cC,"validateRuleIsOverridden");function Rg(t,e,r,n=[]){const a=[],i=Vl(e.definition);if(Ee(i))return[];{const o=t.name;ft(i,t)&&a.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:ct.LEFT_RECURSION,ruleName:o});const l=jf(i,n.concat([t])),u=Lt(l,f=>{const d=et(n);return d.push(f),Rg(t,f,r,d)});return a.concat(u)}}s(Rg,"validateNoLeftRecursion");function Vl(t){let e=[];if(Ee(t))return e;const r=Ht(t);if(r instanceof lt)e.push(r.referencedRule);else if(r instanceof gt||r instanceof Qe||r instanceof _t||r instanceof Ct||r instanceof yt||r instanceof xe)e=e.concat(Vl(r.definition));else if(r instanceof vt)e=qt(z(r.definition,i=>Vl(i.definition)));else if(!(r instanceof we))throw Error("non exhaustive match");const n=ac(r),a=t.length>1;if(n&&a){const i=Ze(t);return e.concat(Vl(i))}else return e}s(Vl,"getFirstNoneTerminal");var Ai,$g=(Ai=class extends Bo{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},s(Ai,"OrCollector"),Ai);function uC(t,e){const r=new $g;t.accept(r);const n=r.alternations;return Lt(n,i=>{const o=nc(i.definition);return Lt(o,(c,l)=>{const u=gg([c],[],qo,1);return Ee(u)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:i,emptyChoiceIdx:l}),type:ct.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:i.idx,alternative:l+1}]:[]})})}s(uC,"validateEmptyOrAlternative");function fC(t,e,r){const n=new $g;t.accept(n);let a=n.alternations;return a=Uf(a,o=>o.ignoreAmbiguities===!0),Lt(a,o=>{const c=o.idx,l=o.maxLookahead||e,u=kc(c,t,l,o),f=hC(u,o,t,r),d=mC(u,o,t,r);return f.concat(d)})}s(fC,"validateAmbiguousAlternationAlternatives");var Ei,ax=(Ei=class extends Bo{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)}},s(Ei,"RepetitionCollector"),Ei);function dC(t,e){const r=new $g;t.accept(r);const n=r.alternations;return Lt(n,i=>i.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:i}),type:ct.TOO_MANY_ALTS,ruleName:t.name,occurrence:i.idx}]:[])}s(dC,"validateTooManyAlts");function pC(t,e,r){const n=[];return V(t,a=>{const i=new ax;a.accept(i);const o=i.allProductions;V(o,c=>{const l=qf(c),u=c.maxLookahead||e,f=c.idx,p=Pc(f,a,l,u)[0];if(Ee(qt(p))){const m=r.buildEmptyRepetitionError({topLevelRule:a,repetition:c});n.push({message:m,type:ct.NO_NON_EMPTY_LOOKAHEAD,ruleName:a.name})}})}),n}s(pC,"validateSomeNonEmptyLookaheadPath");function hC(t,e,r,n){const a=[],i=Et(t,(c,l,u)=>(e.definition[u].ignoreAmbiguities===!0||V(l,f=>{const d=[u];V(t,(p,m)=>{u!==m&&Hu(p,f)&&e.definition[m].ignoreAmbiguities!==!0&&d.push(m)}),d.length>1&&!Hu(a,f)&&(a.push(f),c.push({alts:d,path:f}))}),c),[]);return z(i,c=>{const l=z(c.alts,f=>f+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:l,prefixPath:c.path}),type:ct.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:c.alts}})}s(hC,"checkAlternativesAmbiguities");function mC(t,e,r,n){const a=Et(t,(o,c,l)=>{const u=z(c,f=>({idx:l,path:f}));return o.concat(u)},[]);return wc(Lt(a,o=>{if(e.definition[o.idx].ignoreAmbiguities===!0)return[];const l=o.idx,u=o.path,f=Ft(a,p=>e.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<l&&nC(p.path,u));return z(f,p=>{const m=[p.idx+1,l+1],g=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:m,prefixPath:p.path}),type:ct.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:m}})}))}s(mC,"checkPrefixAlternativesAmbiguities");function gC(t,e,r){const n=[],a=z(e,i=>i.name);return V(t,i=>{const o=i.name;if(ft(a,o)){const c=r.buildNamespaceConflictError(i);n.push({message:c,type:ct.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}s(gC,"checkTerminalAndNoneTerminalsNameSpace");function yC(t){const e=ig(t,{errMsgProvider:XM}),r={};return V(t.rules,n=>{r[n.name]=n}),Y_(r,e.errMsgProvider)}s(yC,"resolveGrammar");function vC(t){return t=ig(t,{errMsgProvider:Nn}),iC(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}s(vC,"validateGrammar");var TC="MismatchedTokenException",RC="NoViableAltException",$C="EarlyExitException",AC="NotAllInputParsedException",EC=[TC,RC,$C,AC];Object.freeze(EC);function sc(t){return ft(EC,t.name)}s(sc,"isRecognitionException");var _i,Wf=(_i=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},s(_i,"RecognitionException"),_i),Ci,_C=(Ci=class extends Wf{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=TC}},s(Ci,"MismatchedTokenException"),Ci),Si,ix=(Si=class extends Wf{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=RC}},s(Si,"NoViableAltException"),Si),bi,sx=(bi=class extends Wf{constructor(e,r){super(e,r),this.name=AC}},s(bi,"NotAllInputParsedException"),bi),wi,ox=(wi=class extends Wf{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=$C}},s(wi,"EarlyExitException"),wi),Ed={},CC="InRuleRecoveryException",Ii,lx=(Ii=class extends Error{constructor(e){super(e),this.name=CC}},s(Ii,"InRuleRecoveryException"),Ii),Ni,cx=(Ni=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=q(e,"recoveryEnabled")?e.recoveryEnabled:kr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=SC)}getTokenToInsert(e){const r=Nc(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,a){const i=this.findReSyncTokenType(),o=this.exportLexerState(),c=[];let l=!1;const u=this.LA(1);let f=this.LA(1);const d=s(()=>{const p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:a,actual:u,previous:p,ruleName:this.getCurrRuleFullName()}),g=new _C(m,u,this.LA(0));g.resyncedTokens=nc(c),this.SAVE_ERROR(g)},"generateErrorMessage");for(;!l;)if(this.tokenMatcher(f,a)){d();return}else if(n.call(this)){d(),e.apply(this,r);return}else this.tokenMatcher(f,i)?l=!0:(f=this.SKIP_TOKEN(),this.addToResyncTokens(f,c));this.importLexerState(o)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){const n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new lx("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||Ee(r))return!1;const n=this.LA(1);return Mo(r,i=>this.tokenMatcher(n,i))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){const r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return ft(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let r=this.LA(1),n=2;for(;;){const a=Mo(e,i=>mg(r,i));if(a!==void 0)return a;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Ed;const e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return z(e,(n,a)=>a===0?Ed:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[a],inRule:this.shortRuleNameToFullName(e[a-1])})}flattenFollowSet(){const e=z(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return qt(e)}getFollowSetFromFollowKey(e){if(e===Ed)return[Yr];const r=e.ruleName+e.idxInCallingRule+u_+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,Yr)||r.push(e),r}reSyncTo(e){const r=[];let n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return nc(r)}attemptInRepetitionRecovery(e,r,n,a,i,o,c){}getCurrentGrammarPath(e,r){const n=this.getHumanReadableRuleStack(),a=et(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:a,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return z(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},s(Ni,"Recoverable"),Ni);function SC(t,e,r,n,a,i,o){const c=this.getKeyForAutomaticLookahead(n,a);let l=this.firstAfterRepMap[c];if(l===void 0){const p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];l=new i(m,a).startWalking(),this.firstAfterRepMap[c]=l}let u=l.token,f=l.occurrence;const d=l.isEndOfRule;this.RULE_STACK.length===1&&d&&u===void 0&&(u=Yr,f=1),!(u===void 0||f===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,f,o)&&this.tryInRepetitionRecovery(t,e,r,u)}s(SC,"attemptInRepetitionRecovery");var ux=4,tn=8,bC=1<<tn,wC=2<<tn,nh=3<<tn,ah=4<<tn,ih=5<<tn,pu=6<<tn;function hu(t,e,r){return r|e|t}s(hu,"getKeyForAutomaticLookahead");var ki,Ag=(ki=class{constructor(e){var r;this.maxLookahead=(r=e==null?void 0:e.maxLookahead)!==null&&r!==void 0?r:kr.maxLookahead}validate(e){const r=this.validateNoLeftRecursion(e.rules);if(Ee(r)){const n=this.validateEmptyOrAlternatives(e.rules),a=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...a,...i]}return r}validateNoLeftRecursion(e){return Lt(e,r=>Rg(r,r,Nn))}validateEmptyOrAlternatives(e){return Lt(e,r=>uC(r,Nn))}validateAmbiguousAlternationAlternatives(e,r){return Lt(e,n=>fC(n,r,Nn))}validateSomeNonEmptyLookaheadPath(e,r){return pC(e,r,Nn)}buildLookaheadForAlternation(e){return J_(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Q_)}buildLookaheadForOptional(e){return Z_(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,qf(e.prodType),eC)}},s(ki,"LLkLookaheadStrategy"),ki),Pi,fx=(Pi=class{initLooksAhead(e){this.dynamicTokensEnabled=q(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:kr.dynamicTokensEnabled,this.maxLookahead=q(e,"maxLookahead")?e.maxLookahead:kr.maxLookahead,this.lookaheadStrategy=q(e,"lookaheadStrategy")?e.lookaheadStrategy:new Ag({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){V(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{const{alternation:n,repetition:a,option:i,repetitionMandatory:o,repetitionMandatoryWithSeparator:c,repetitionWithSeparator:l}=IC(r);V(n,u=>{const f=u.idx===0?"":u.idx;this.TRACE_INIT(`${Ut(u)}${f}`,()=>{const d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:r,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=hu(this.fullRuleNameToShort[r.name],bC,u.idx);this.setLaFuncCache(p,d)})}),V(a,u=>{this.computeLookaheadFunc(r,u.idx,nh,"Repetition",u.maxLookahead,Ut(u))}),V(i,u=>{this.computeLookaheadFunc(r,u.idx,wC,"Option",u.maxLookahead,Ut(u))}),V(o,u=>{this.computeLookaheadFunc(r,u.idx,ah,"RepetitionMandatory",u.maxLookahead,Ut(u))}),V(c,u=>{this.computeLookaheadFunc(r,u.idx,pu,"RepetitionMandatoryWithSeparator",u.maxLookahead,Ut(u))}),V(l,u=>{this.computeLookaheadFunc(r,u.idx,ih,"RepetitionWithSeparator",u.maxLookahead,Ut(u))})})})}computeLookaheadFunc(e,r,n,a,i,o){this.TRACE_INIT(`${o}${r===0?"":r}`,()=>{const c=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),l=hu(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(l,c)})}getKeyForAutomaticLookahead(e,r){const n=this.getLastExplicitRuleShortName();return hu(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},s(Pi,"LooksAhead"),Pi),Oi,dx=(Oi=class extends Bo{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)}},s(Oi,"DslMethodsCollectorVisitor"),Oi),Gc=new dx;function IC(t){Gc.reset(),t.accept(Gc);const e=Gc.dslMethods;return Gc.reset(),e}s(IC,"collectMethods");function sh(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}s(sh,"setNodeLocationOnlyOffset");function oh(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}s(oh,"setNodeLocationFull");function NC(t,e,r){t.children[r]===void 0?t.children[r]=[e]:t.children[r].push(e)}s(NC,"addTerminalToCst");function kC(t,e,r){t.children[e]===void 0?t.children[e]=[r]:t.children[e].push(r)}s(kC,"addNoneTerminalToCst");var px="name";function Eg(t,e){Object.defineProperty(t,px,{enumerable:!1,configurable:!0,writable:!1,value:e})}s(Eg,"defineNameProp");function PC(t,e){const r=$t(t),n=r.length;for(let a=0;a<n;a++){const i=r[a],o=t[i],c=o.length;for(let l=0;l<c;l++){const u=o[l];u.tokenTypeIdx===void 0&&this[u.name](u.children,e)}}}s(PC,"defaultVisit");function OC(t,e){const r=s(function(){},"derivedConstructor");Eg(r,t+"BaseSemantics");const n={visit:s(function(a,i){if(ae(a)&&(a=a[0]),!Ir(a))return this[a.name](a.children,i)},"visit"),validateVisitor:s(function(){const a=DC(this,e);if(!Ee(a)){const i=z(a,o=>o.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
114
+ ${i.join(`
115
+
116
+ `).replace(/\n/g,`
117
+ `)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}s(OC,"createBaseSemanticVisitorConstructor");function LC(t,e,r){const n=s(function(){},"derivedConstructor");Eg(n,t+"BaseSemanticsWithDefaults");const a=Object.create(r.prototype);return V(e,i=>{a[i]=PC}),n.prototype=a,n.prototype.constructor=n,n}s(LC,"createBaseVisitorConstructorWithDefaults");var lh;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(lh||(lh={}));function DC(t,e){return MC(t,e)}s(DC,"validateVisitor");function MC(t,e){const r=Ft(e,a=>Dr(t[a])===!1),n=z(r,a=>({msg:`Missing visitor method: <${a}> on ${t.constructor.name} CST Visitor.`,type:lh.MISSING_METHOD,methodName:a}));return wc(n)}s(MC,"validateMissingCstMethods");var Li,hx=(Li=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=q(e,"nodeLocationTracking")?e.nodeLocationTracking:kr.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=qe,this.cstFinallyStateUpdate=qe,this.cstPostTerminal=qe,this.cstPostNonTerminal=qe,this.cstPostRule=qe;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=oh,this.setNodeLocationFromNode=oh,this.cstPostRule=qe,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=qe,this.setNodeLocationFromNode=qe,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=sh,this.setNodeLocationFromNode=sh,this.cstPostRule=qe,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=qe,this.setNodeLocationFromNode=qe,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=qe,this.setNodeLocationFromNode=qe,this.cstPostRule=qe,this.setInitialNodeLocation=qe;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){const r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){const n=this.CST_STACK[this.CST_STACK.length-1];NC(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){const n=this.CST_STACK[this.CST_STACK.length-1];kC(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(Ir(this.baseCstVisitorConstructor)){const e=OC(this.className,$t(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Ir(this.baseCstVisitorWithDefaultsConstructor)){const e=LC(this.className,$t(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]}},s(Li,"TreeBuilder"),Li),Di,mx=(Di=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Yu}LA(e){const r=this.currIdx+e;return r<0||this.tokVectorLength<=r?Yu:this.tokVector[r]}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()}},s(Di,"LexerAdapter"),Di),Mi,gx=(Mi=class{ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=Xu){if(ft(this.definedRulesNames,e)){const o={message:Nn.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:ct.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(o)}this.definedRulesNames.push(e);const a=this.defineRule(e,r,n);return this[e]=a,a}OVERRIDE_RULE(e,r,n=Xu){const a=cC(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(a);const i=this.defineRule(e,r,n);return this[e]=i,i}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return e.apply(this,r),!0}catch(a){if(sc(a))return!1;throw a}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return a_(We(this.gastProductionsCache))}},s(Mi,"RecognizerApi"),Mi),xi,yx=(xi=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=ic,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},q(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
118
+ See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
119
+ For Further details.`);if(ae(e)){if(Ee(e))throw Error(`A Token Vocabulary cannot be empty.
120
+ Note that the first argument for the parser constructor
121
+ is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
122
+ See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
123
+ For Further details.`)}if(ae(e))this.tokensMap=Et(e,(i,o)=>(i[o.name]=o,i),{});else if(q(e,"modes")&&Wt(qt(We(e.modes)),V_)){const i=qt(We(e.modes)),o=sg(i);this.tokensMap=Et(o,(c,l)=>(c[l.name]=l,c),{})}else if(Mt(e))this.tokensMap=et(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Yr;const n=q(e,"modes")?qt(We(e.modes)):We(e),a=Wt(n,i=>Ee(i.categoryMatches));this.tokenMatcher=a?ic:qo,Wo(We(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
124
+ Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const a=q(n,"resyncEnabled")?n.resyncEnabled:Xu.resyncEnabled,i=q(n,"recoveryValueFunc")?n.recoveryValueFunc:Xu.recoveryValueFunc,o=this.ruleShortNameIdx<<ux+tn;this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=e,this.fullRuleNameToShort[e]=o;let c;return this.outputCst===!0?c=s(function(...f){try{this.ruleInvocationStateUpdate(o,e,this.subruleIdx),r.apply(this,f);const d=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(d),d}catch(d){return this.invokeRuleCatch(d,a,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):c=s(function(...f){try{return this.ruleInvocationStateUpdate(o,e,this.subruleIdx),r.apply(this,f)}catch(d){return this.invokeRuleCatch(d,a,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(c,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){const a=this.RULE_STACK.length===1,i=r&&!this.isBackTracking()&&this.recoveryEnabled;if(sc(e)){const o=e;if(i){const c=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(c))if(o.resyncedTokens=this.reSyncTo(c),this.outputCst){const l=this.CST_STACK[this.CST_STACK.length-1];return l.recoveredNode=!0,l}else return n(e);else{if(this.outputCst){const l=this.CST_STACK[this.CST_STACK.length-1];l.recoveredNode=!0,o.partialCstResult=l}throw o}}else{if(a)return this.moveToTerminatedState(),n(e);throw o}}else throw e}optionInternal(e,r){const n=this.getKeyForAutomaticLookahead(wC,r);return this.optionInternalLogic(e,r,n)}optionInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof e!="function"){i=e.DEF;const o=e.GATE;if(o!==void 0){const c=a;a=s(()=>o.call(this)&&c.call(this),"lookAheadFunc")}}else i=e;if(a.call(this)===!0)return i.call(this)}atLeastOneInternal(e,r){const n=this.getKeyForAutomaticLookahead(ah,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;const o=r.GATE;if(o!==void 0){const c=a;a=s(()=>o.call(this)&&c.call(this),"lookAheadFunc")}}else i=r;if(a.call(this)===!0){let o=this.doSingleRepetition(i);for(;a.call(this)===!0&&o===!0;)o=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,De.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],a,ah,e,tx)}atLeastOneSepFirstInternal(e,r){const n=this.getKeyForAutomaticLookahead(pu,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){const a=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){a.call(this);const c=s(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,c,a,hv],c,pu,e,hv)}else throw this.raiseEarlyExitException(e,De.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){const n=this.getKeyForAutomaticLookahead(nh,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;const c=r.GATE;if(c!==void 0){const l=a;a=s(()=>c.call(this)&&l.call(this),"lookaheadFunction")}}else i=r;let o=!0;for(;a.call(this)===!0&&o===!0;)o=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],a,nh,e,ex,o)}manySepFirstInternal(e,r){const n=this.getKeyForAutomaticLookahead(ih,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){const a=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){a.call(this);const c=s(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,c,a,pv],c,ih,e,pv)}}repetitionSepSecondInternal(e,r,n,a,i){for(;n();)this.CONSUME(r),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,a,i],n,pu,e,i)}doSingleRepetition(e){const r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){const n=this.getKeyForAutomaticLookahead(bC,r),a=ae(e)?e:e.DEF,o=this.getLaFuncFromCache(n).call(this,a);if(o!==void 0)return a[o].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){const e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new sx(r,e))}}subruleInternal(e,r,n){let a;try{const i=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,a=e.apply(this,i),this.cstPostNonTerminal(a,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),a}catch(i){throw this.subruleInternalError(i,n,e.ruleName)}}subruleInternalError(e,r,n){throw sc(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let a;try{const i=this.LA(1);this.tokenMatcher(i,e)===!0?(this.consumeToken(),a=i):this.consumeInternalError(e,i,n)}catch(i){a=this.consumeInternalRecovery(e,r,i)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,a),a}consumeInternalError(e,r,n){let a;const i=this.LA(0);throw n!==void 0&&n.ERR_MSG?a=n.ERR_MSG:a=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new _C(a,r,i))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){const a=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,a)}catch(i){throw i.name===CC?n:i}}else throw n}saveRecogState(){const e=this.errors,r=et(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Yr)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},s(xi,"RecognizerEngine"),xi),Fi,vx=(Fi=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=q(e,"errorMessageProvider")?e.errorMessageProvider:kr.errorMessageProvider}SAVE_ERROR(e){if(sc(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:et(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return et(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){const a=this.getCurrRuleFullName(),i=this.getGAstProductions()[a],c=Pc(e,i,r,this.maxLookahead)[0],l=[];for(let f=1;f<=this.maxLookahead;f++)l.push(this.LA(f));const u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:c,actual:l,previous:this.LA(0),customUserDescription:n,ruleName:a});throw this.SAVE_ERROR(new ox(u,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){const n=this.getCurrRuleFullName(),a=this.getGAstProductions()[n],i=kc(e,a,this.maxLookahead),o=[];for(let u=1;u<=this.maxLookahead;u++)o.push(this.LA(u));const c=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:o,previous:c,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new ix(l,this.LA(1),c))}},s(Fi,"ErrorHandler"),Fi),Gi,Tx=(Gi=class{initContentAssist(){}computeContentAssist(e,r){const n=this.gastProductionsCache[e];if(Ir(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return gg([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const r=Ht(e.ruleStack),a=this.getGAstProductions()[r];return new QM(a,e).startWalking()}},s(Gi,"ContentAssist"),Gi),Vf={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Vf);var mv=!0,gv=Math.pow(2,tn)-1,xC=ja({name:"RECORDING_PHASE_TOKEN",pattern:st.NA});Wo([xC]);var FC=Nc(xC,`This IToken indicates the Parser is in Recording Phase
125
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(FC);var Rx={name:`This CSTNode indicates the Parser is in Recording Phase
126
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},ji,$x=(ji=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 r=e>0?e:"";this[`CONSUME${r}`]=function(n,a){return this.consumeInternalRecord(n,e,a)},this[`SUBRULE${r}`]=function(n,a){return this.subruleInternalRecord(n,e,a)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let r=0;r<10;r++){const n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return Yu}topLevelRuleRecord(e,r){try{const n=new zo({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`
127
+ This error was thrown during the "grammar recording phase" For more info see:
128
+ https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,r){return _a.call(this,Qe,e,r)}atLeastOneInternalRecord(e,r){_a.call(this,_t,r,e)}atLeastOneSepFirstInternalRecord(e,r){_a.call(this,Ct,r,e,mv)}manyInternalRecord(e,r){_a.call(this,xe,r,e)}manySepFirstInternalRecord(e,r){_a.call(this,yt,r,e,mv)}orInternalRecord(e,r){return GC.call(this,e,r)}subruleInternalRecord(e,r,n){if(oc(r),!e||q(e,"ruleName")===!1){const c=new Error(`<SUBRULE${ch(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
129
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw c.KNOWN_RECORDER_ERROR=!0,c}const a=Fn(this.recordingProdStack),i=e.ruleName,o=new lt({idx:r,nonTerminalName:i,label:n==null?void 0:n.LABEL,referencedRule:void 0});return a.definition.push(o),this.outputCst?Rx:Vf}consumeInternalRecord(e,r,n){if(oc(r),!pg(e)){const o=new Error(`<CONSUME${ch(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
130
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const a=Fn(this.recordingProdStack),i=new we({idx:r,terminalType:e,label:n==null?void 0:n.LABEL});return a.definition.push(i),FC}},s(ji,"GastRecorder"),ji);function _a(t,e,r,n=!1){oc(r);const a=Fn(this.recordingProdStack),i=Dr(e)?e:e.DEF,o=new t({definition:[],idx:r});return n&&(o.separator=e.SEP),q(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),i.call(this),a.definition.push(o),this.recordingProdStack.pop(),Vf}s(_a,"recordProd");function GC(t,e){oc(e);const r=Fn(this.recordingProdStack),n=ae(t)===!1,a=n===!1?t:t.DEF,i=new vt({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});q(t,"MAX_LOOKAHEAD")&&(i.maxLookahead=t.MAX_LOOKAHEAD);const o=QE(a,c=>Dr(c.GATE));return i.hasPredicates=o,r.definition.push(i),V(a,c=>{const l=new gt({definition:[]});i.definition.push(l),q(c,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=c.IGNORE_AMBIGUITIES:q(c,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),c.ALT.call(this),this.recordingProdStack.pop()}),Vf}s(GC,"recordOrProd");function ch(t){return t===0?"":`${t}`}s(ch,"getIdxSuffix");function oc(t){if(t<0||t>gv){const e=new Error(`Invalid DSL Method idx value: <${t}>
131
+ Idx value must be a none negative value smaller than ${gv+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}s(oc,"assertMethodIdxIsValid");var Ui,Ax=(Ui=class{initPerformanceTracer(e){if(q(e,"traceInitPerf")){const r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=kr.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent;const{time:a,value:i}=og(r),o=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&o(`${n}<-- <${e}> time: ${a}ms`),this.traceInitIndent--,i}else return r()}},s(Ui,"PerformanceTracer"),Ui);function jC(t,e){e.forEach(r=>{const n=r.prototype;Object.getOwnPropertyNames(n).forEach(a=>{if(a==="constructor")return;const i=Object.getOwnPropertyDescriptor(n,a);i&&(i.get||i.set)?Object.defineProperty(t.prototype,a,i):t.prototype[a]=r.prototype[a]})})}s(jC,"applyMixins");var Yu=Nc(Yr,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Yu);var kr=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:xa,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Xu=Object.freeze({recoveryValueFunc:s(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),ct;(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(ct||(ct={}));function uh(t=void 0){return function(){return t}}s(uh,"EMPTY_ALT");var Dn,_g=(Dn=class{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const r=this.className;this.TRACE_INIT("toFastProps",()=>{lg(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),V(this.definedRulesNames,a=>{const o=this[a].originalGrammarAction;let c;this.TRACE_INIT(`${a} Rule`,()=>{c=this.topLevelRuleRecord(a,o)}),this.gastProductionsCache[a]=c})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=yC({rules:We(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(Ee(n)&&this.skipValidations===!1){const a=vC({rules:We(this.gastProductionsCache),tokenTypes:We(this.tokensMap),errMsgProvider:Nn,grammarName:r}),i=aC({lookaheadStrategy:this.lookaheadStrategy,rules:We(this.gastProductionsCache),tokenTypes:We(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(a,i)}}),Ee(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const a=f_(We(this.gastProductionsCache));this.resyncFollows=a}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var a,i;(i=(a=this.lookaheadStrategy).initialize)===null||i===void 0||i.call(a,{rules:We(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(We(this.gastProductionsCache))})),!Dn.DEFER_DEFINITION_ERRORS_HANDLING&&!Ee(this.definitionErrors))throw e=z(this.definitionErrors,a=>a.message),new Error(`Parser Definition Errors detected:
132
+ ${e.join(`
133
+ -------------------------------
134
+ `)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),q(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
135
+ Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
136
+ See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
137
+ For further details.`);this.skipValidations=q(r,"skipValidations")?r.skipValidations:kr.skipValidations}},s(Dn,"Parser"),Dn);_g.DEFER_DEFINITION_ERRORS_HANDLING=!1;jC(_g,[cx,fx,hx,mx,yx,gx,vx,Tx,$x,Ax]);var zi,Ex=(zi=class extends _g{constructor(e,r=kr){const n=et(r);n.outputCst=!1,super(e,n)}},s(zi,"EmbeddedActionsParser"),zi);function UC(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}s(UC,"arrayMap");var zC=UC;function BC(){this.__data__=[],this.size=0}s(BC,"listCacheClear");var _x=BC;function KC(t,e){return t===e||t!==t&&e!==e}s(KC,"eq");var qC=KC;function WC(t,e){for(var r=t.length;r--;)if(qC(t[r][0],e))return r;return-1}s(WC,"assocIndexOf");var Hf=WC,Cx=Array.prototype,Sx=Cx.splice;function VC(t){var e=this.__data__,r=Hf(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Sx.call(e,r,1),--this.size,!0}s(VC,"listCacheDelete");var bx=VC;function HC(t){var e=this.__data__,r=Hf(e,t);return r<0?void 0:e[r][1]}s(HC,"listCacheGet");var wx=HC;function YC(t){return Hf(this.__data__,t)>-1}s(YC,"listCacheHas");var Ix=YC;function XC(t,e){var r=this.__data__,n=Hf(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}s(XC,"listCacheSet");var Nx=XC;function ta(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(ta,"ListCache");ta.prototype.clear=_x;ta.prototype.delete=bx;ta.prototype.get=wx;ta.prototype.has=Ix;ta.prototype.set=Nx;var Yf=ta;function JC(){this.__data__=new Yf,this.size=0}s(JC,"stackClear");var kx=JC;function ZC(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}s(ZC,"stackDelete");var Px=ZC;function QC(t){return this.__data__.get(t)}s(QC,"stackGet");var Ox=QC;function eS(t){return this.__data__.has(t)}s(eS,"stackHas");var Lx=eS,Dx=typeof global=="object"&&global&&global.Object===Object&&global,tS=Dx,Mx=typeof self=="object"&&self&&self.Object===Object&&self,xx=tS||Mx||Function("return this")(),Mr=xx,Fx=Mr.Symbol,cr=Fx,rS=Object.prototype,Gx=rS.hasOwnProperty,jx=rS.toString,ml=cr?cr.toStringTag:void 0;function nS(t){var e=Gx.call(t,ml),r=t[ml];try{t[ml]=void 0;var n=!0}catch{}var a=jx.call(t);return n&&(e?t[ml]=r:delete t[ml]),a}s(nS,"getRawTag");var Ux=nS,zx=Object.prototype,Bx=zx.toString;function aS(t){return Bx.call(t)}s(aS,"objectToString");var Kx=aS,qx="[object Null]",Wx="[object Undefined]",yv=cr?cr.toStringTag:void 0;function iS(t){return t==null?t===void 0?Wx:qx:yv&&yv in Object(t)?Ux(t):Kx(t)}s(iS,"baseGetTag");var Vo=iS;function sS(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}s(sS,"isObject");var Cg=sS,Vx="[object AsyncFunction]",Hx="[object Function]",Yx="[object GeneratorFunction]",Xx="[object Proxy]";function oS(t){if(!Cg(t))return!1;var e=Vo(t);return e==Hx||e==Yx||e==Vx||e==Xx}s(oS,"isFunction");var lS=oS,Jx=Mr["__core-js_shared__"],_d=Jx,vv=function(){var t=/[^.]+$/.exec(_d&&_d.keys&&_d.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function cS(t){return!!vv&&vv in t}s(cS,"isMasked");var Zx=cS,Qx=Function.prototype,e1=Qx.toString;function uS(t){if(t!=null){try{return e1.call(t)}catch{}try{return t+""}catch{}}return""}s(uS,"toSource");var ra=uS,t1=/[\\^$.*+?()[\]{}|]/g,r1=/^\[object .+?Constructor\]$/,n1=Function.prototype,a1=Object.prototype,i1=n1.toString,s1=a1.hasOwnProperty,o1=RegExp("^"+i1.call(s1).replace(t1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fS(t){if(!Cg(t)||Zx(t))return!1;var e=lS(t)?o1:r1;return e.test(ra(t))}s(fS,"baseIsNative");var l1=fS;function dS(t,e){return t==null?void 0:t[e]}s(dS,"getValue");var c1=dS;function pS(t,e){var r=c1(t,e);return l1(r)?r:void 0}s(pS,"getNative");var Ho=pS,u1=Ho(Mr,"Map"),lc=u1,f1=Ho(Object,"create"),cc=f1;function hS(){this.__data__=cc?cc(null):{},this.size=0}s(hS,"hashClear");var d1=hS;function mS(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}s(mS,"hashDelete");var p1=mS,h1="__lodash_hash_undefined__",m1=Object.prototype,g1=m1.hasOwnProperty;function gS(t){var e=this.__data__;if(cc){var r=e[t];return r===h1?void 0:r}return g1.call(e,t)?e[t]:void 0}s(gS,"hashGet");var y1=gS,v1=Object.prototype,T1=v1.hasOwnProperty;function yS(t){var e=this.__data__;return cc?e[t]!==void 0:T1.call(e,t)}s(yS,"hashHas");var R1=yS,$1="__lodash_hash_undefined__";function vS(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=cc&&e===void 0?$1:e,this}s(vS,"hashSet");var A1=vS;function na(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(na,"Hash");na.prototype.clear=d1;na.prototype.delete=p1;na.prototype.get=y1;na.prototype.has=R1;na.prototype.set=A1;var Tv=na;function TS(){this.size=0,this.__data__={hash:new Tv,map:new(lc||Yf),string:new Tv}}s(TS,"mapCacheClear");var E1=TS;function RS(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}s(RS,"isKeyable");var _1=RS;function $S(t,e){var r=t.__data__;return _1(e)?r[typeof e=="string"?"string":"hash"]:r.map}s($S,"getMapData");var Xf=$S;function AS(t){var e=Xf(this,t).delete(t);return this.size-=e?1:0,e}s(AS,"mapCacheDelete");var C1=AS;function ES(t){return Xf(this,t).get(t)}s(ES,"mapCacheGet");var S1=ES;function _S(t){return Xf(this,t).has(t)}s(_S,"mapCacheHas");var b1=_S;function CS(t,e){var r=Xf(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}s(CS,"mapCacheSet");var w1=CS;function aa(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(aa,"MapCache");aa.prototype.clear=E1;aa.prototype.delete=C1;aa.prototype.get=S1;aa.prototype.has=b1;aa.prototype.set=w1;var Jf=aa,I1=200;function SS(t,e){var r=this.__data__;if(r instanceof Yf){var n=r.__data__;if(!lc||n.length<I1-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Jf(n)}return r.set(t,e),this.size=r.size,this}s(SS,"stackSet");var N1=SS;function ia(t){var e=this.__data__=new Yf(t);this.size=e.size}s(ia,"Stack");ia.prototype.clear=kx;ia.prototype.delete=Px;ia.prototype.get=Ox;ia.prototype.has=Lx;ia.prototype.set=N1;var mu=ia,k1="__lodash_hash_undefined__";function bS(t){return this.__data__.set(t,k1),this}s(bS,"setCacheAdd");var P1=bS;function wS(t){return this.__data__.has(t)}s(wS,"setCacheHas");var O1=wS;function uc(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Jf;++e<r;)this.add(t[e])}s(uc,"SetCache");uc.prototype.add=uc.prototype.push=P1;uc.prototype.has=O1;var IS=uc;function NS(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}s(NS,"arraySome");var L1=NS;function kS(t,e){return t.has(e)}s(kS,"cacheHas");var PS=kS,D1=1,M1=2;function OS(t,e,r,n,a,i){var o=r&D1,c=t.length,l=e.length;if(c!=l&&!(o&&l>c))return!1;var u=i.get(t),f=i.get(e);if(u&&f)return u==e&&f==t;var d=-1,p=!0,m=r&M1?new IS:void 0;for(i.set(t,e),i.set(e,t);++d<c;){var g=t[d],v=e[d];if(n)var E=o?n(v,g,d,e,t,i):n(g,v,d,t,e,i);if(E!==void 0){if(E)continue;p=!1;break}if(m){if(!L1(e,function(T,w){if(!PS(m,w)&&(g===T||a(g,T,r,n,i)))return m.push(w)})){p=!1;break}}else if(!(g===v||a(g,v,r,n,i))){p=!1;break}}return i.delete(t),i.delete(e),p}s(OS,"equalArrays");var LS=OS,x1=Mr.Uint8Array,Rv=x1;function DS(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}s(DS,"mapToArray");var F1=DS;function MS(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}s(MS,"setToArray");var Sg=MS,G1=1,j1=2,U1="[object Boolean]",z1="[object Date]",B1="[object Error]",K1="[object Map]",q1="[object Number]",W1="[object RegExp]",V1="[object Set]",H1="[object String]",Y1="[object Symbol]",X1="[object ArrayBuffer]",J1="[object DataView]",$v=cr?cr.prototype:void 0,Cd=$v?$v.valueOf:void 0;function xS(t,e,r,n,a,i,o){switch(r){case J1:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case X1:return!(t.byteLength!=e.byteLength||!i(new Rv(t),new Rv(e)));case U1:case z1:case q1:return qC(+t,+e);case B1:return t.name==e.name&&t.message==e.message;case W1:case H1:return t==e+"";case K1:var c=F1;case V1:var l=n&G1;if(c||(c=Sg),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;n|=j1,o.set(t,e);var f=LS(c(t),c(e),n,a,i,o);return o.delete(t),f;case Y1:if(Cd)return Cd.call(t)==Cd.call(e)}return!1}s(xS,"equalByTag");var Z1=xS;function FS(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}s(FS,"arrayPush");var GS=FS,Q1=Array.isArray,ut=Q1;function jS(t,e,r){var n=e(t);return ut(t)?n:GS(n,r(t))}s(jS,"baseGetAllKeys");var eF=jS;function US(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r<n;){var o=t[r];e(o,r,t)&&(i[a++]=o)}return i}s(US,"arrayFilter");var zS=US;function BS(){return[]}s(BS,"stubArray");var tF=BS,rF=Object.prototype,nF=rF.propertyIsEnumerable,Av=Object.getOwnPropertySymbols,aF=Av?function(t){return t==null?[]:(t=Object(t),zS(Av(t),function(e){return nF.call(t,e)}))}:tF,iF=aF;function KS(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}s(KS,"baseTimes");var sF=KS;function qS(t){return t!=null&&typeof t=="object"}s(qS,"isObjectLike");var xo=qS,oF="[object Arguments]";function WS(t){return xo(t)&&Vo(t)==oF}s(WS,"baseIsArguments");var Ev=WS,VS=Object.prototype,lF=VS.hasOwnProperty,cF=VS.propertyIsEnumerable,uF=Ev(function(){return arguments}())?Ev:function(t){return xo(t)&&lF.call(t,"callee")&&!cF.call(t,"callee")},Zf=uF;function HS(){return!1}s(HS,"stubFalse");var fF=HS,YS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_v=YS&&typeof module=="object"&&module&&!module.nodeType&&module,dF=_v&&_v.exports===YS,Cv=dF?Mr.Buffer:void 0,pF=Cv?Cv.isBuffer:void 0,hF=pF||fF,Ju=hF,mF=9007199254740991,gF=/^(?:0|[1-9]\d*)$/;function XS(t,e){var r=typeof t;return e=e??mF,!!e&&(r=="number"||r!="symbol"&&gF.test(t))&&t>-1&&t%1==0&&t<e}s(XS,"isIndex");var JS=XS,yF=9007199254740991;function ZS(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=yF}s(ZS,"isLength");var bg=ZS,vF="[object Arguments]",TF="[object Array]",RF="[object Boolean]",$F="[object Date]",AF="[object Error]",EF="[object Function]",_F="[object Map]",CF="[object Number]",SF="[object Object]",bF="[object RegExp]",wF="[object Set]",IF="[object String]",NF="[object WeakMap]",kF="[object ArrayBuffer]",PF="[object DataView]",OF="[object Float32Array]",LF="[object Float64Array]",DF="[object Int8Array]",MF="[object Int16Array]",xF="[object Int32Array]",FF="[object Uint8Array]",GF="[object Uint8ClampedArray]",jF="[object Uint16Array]",UF="[object Uint32Array]",be={};be[OF]=be[LF]=be[DF]=be[MF]=be[xF]=be[FF]=be[GF]=be[jF]=be[UF]=!0;be[vF]=be[TF]=be[kF]=be[RF]=be[PF]=be[$F]=be[AF]=be[EF]=be[_F]=be[CF]=be[SF]=be[bF]=be[wF]=be[IF]=be[NF]=!1;function QS(t){return xo(t)&&bg(t.length)&&!!be[Vo(t)]}s(QS,"baseIsTypedArray");var zF=QS;function eb(t){return function(e){return t(e)}}s(eb,"baseUnary");var BF=eb,tb=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hl=tb&&typeof module=="object"&&module&&!module.nodeType&&module,KF=Hl&&Hl.exports===tb,Sd=KF&&tS.process,qF=function(){try{var t=Hl&&Hl.require&&Hl.require("util").types;return t||Sd&&Sd.binding&&Sd.binding("util")}catch{}}(),Sv=qF,bv=Sv&&Sv.isTypedArray,WF=bv?BF(bv):zF,wg=WF,VF=Object.prototype,HF=VF.hasOwnProperty;function rb(t,e){var r=ut(t),n=!r&&Zf(t),a=!r&&!n&&Ju(t),i=!r&&!n&&!a&&wg(t),o=r||n||a||i,c=o?sF(t.length,String):[],l=c.length;for(var u in t)(e||HF.call(t,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||JS(u,l)))&&c.push(u);return c}s(rb,"arrayLikeKeys");var YF=rb,XF=Object.prototype;function nb(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||XF;return t===r}s(nb,"isPrototype");var ab=nb;function ib(t,e){return function(r){return t(e(r))}}s(ib,"overArg");var JF=ib,ZF=JF(Object.keys,Object),QF=ZF,eG=Object.prototype,tG=eG.hasOwnProperty;function sb(t){if(!ab(t))return QF(t);var e=[];for(var r in Object(t))tG.call(t,r)&&r!="constructor"&&e.push(r);return e}s(sb,"baseKeys");var ob=sb;function lb(t){return t!=null&&bg(t.length)&&!lS(t)}s(lb,"isArrayLike");var Qf=lb;function cb(t){return Qf(t)?YF(t):ob(t)}s(cb,"keys");var Ig=cb;function ub(t){return eF(t,Ig,iF)}s(ub,"getAllKeys");var wv=ub,rG=1,nG=Object.prototype,aG=nG.hasOwnProperty;function fb(t,e,r,n,a,i){var o=r&rG,c=wv(t),l=c.length,u=wv(e),f=u.length;if(l!=f&&!o)return!1;for(var d=l;d--;){var p=c[d];if(!(o?p in e:aG.call(e,p)))return!1}var m=i.get(t),g=i.get(e);if(m&&g)return m==e&&g==t;var v=!0;i.set(t,e),i.set(e,t);for(var E=o;++d<l;){p=c[d];var T=t[p],w=e[p];if(n)var C=o?n(w,T,p,e,t,i):n(T,w,p,t,e,i);if(!(C===void 0?T===w||a(T,w,r,n,i):C)){v=!1;break}E||(E=p=="constructor")}if(v&&!E){var k=t.constructor,B=e.constructor;k!=B&&"constructor"in t&&"constructor"in e&&!(typeof k=="function"&&k instanceof k&&typeof B=="function"&&B instanceof B)&&(v=!1)}return i.delete(t),i.delete(e),v}s(fb,"equalObjects");var iG=fb,sG=Ho(Mr,"DataView"),fh=sG,oG=Ho(Mr,"Promise"),dh=oG,lG=Ho(Mr,"Set"),Ua=lG,cG=Ho(Mr,"WeakMap"),ph=cG,Iv="[object Map]",uG="[object Object]",Nv="[object Promise]",kv="[object Set]",Pv="[object WeakMap]",Ov="[object DataView]",fG=ra(fh),dG=ra(lc),pG=ra(dh),hG=ra(Ua),mG=ra(ph),pn=Vo;(fh&&pn(new fh(new ArrayBuffer(1)))!=Ov||lc&&pn(new lc)!=Iv||dh&&pn(dh.resolve())!=Nv||Ua&&pn(new Ua)!=kv||ph&&pn(new ph)!=Pv)&&(pn=s(function(t){var e=Vo(t),r=e==uG?t.constructor:void 0,n=r?ra(r):"";if(n)switch(n){case fG:return Ov;case dG:return Iv;case pG:return Nv;case hG:return kv;case mG:return Pv}return e},"getTag"));var hh=pn,gG=1,Lv="[object Arguments]",Dv="[object Array]",jc="[object Object]",yG=Object.prototype,Mv=yG.hasOwnProperty;function db(t,e,r,n,a,i){var o=ut(t),c=ut(e),l=o?Dv:hh(t),u=c?Dv:hh(e);l=l==Lv?jc:l,u=u==Lv?jc:u;var f=l==jc,d=u==jc,p=l==u;if(p&&Ju(t)){if(!Ju(e))return!1;o=!0,f=!1}if(p&&!f)return i||(i=new mu),o||wg(t)?LS(t,e,r,n,a,i):Z1(t,e,l,r,n,a,i);if(!(r&gG)){var m=f&&Mv.call(t,"__wrapped__"),g=d&&Mv.call(e,"__wrapped__");if(m||g){var v=m?t.value():t,E=g?e.value():e;return i||(i=new mu),a(v,E,r,n,i)}}return p?(i||(i=new mu),iG(t,e,r,n,a,i)):!1}s(db,"baseIsEqualDeep");var vG=db;function Ng(t,e,r,n,a){return t===e?!0:t==null||e==null||!xo(t)&&!xo(e)?t!==t&&e!==e:vG(t,e,r,n,Ng,a)}s(Ng,"baseIsEqual");var pb=Ng,TG=1,RG=2;function hb(t,e,r,n){var a=r.length,i=a,o=!n;if(t==null)return!i;for(t=Object(t);a--;){var c=r[a];if(o&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<i;){c=r[a];var l=c[0],u=t[l],f=c[1];if(o&&c[2]){if(u===void 0&&!(l in t))return!1}else{var d=new mu;if(n)var p=n(u,f,l,t,e,d);if(!(p===void 0?pb(f,u,TG|RG,n,d):p))return!1}}return!0}s(hb,"baseIsMatch");var $G=hb;function mb(t){return t===t&&!Cg(t)}s(mb,"isStrictComparable");var gb=mb;function yb(t){for(var e=Ig(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,gb(a)]}return e}s(yb,"getMatchData");var AG=yb;function vb(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}s(vb,"matchesStrictComparable");var Tb=vb;function Rb(t){var e=AG(t);return e.length==1&&e[0][2]?Tb(e[0][0],e[0][1]):function(r){return r===t||$G(r,t,e)}}s(Rb,"baseMatches");var EG=Rb,_G="[object Symbol]";function $b(t){return typeof t=="symbol"||xo(t)&&Vo(t)==_G}s($b,"isSymbol");var ed=$b,CG=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,SG=/^\w*$/;function Ab(t,e){if(ut(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||ed(t)?!0:SG.test(t)||!CG.test(t)||e!=null&&t in Object(e)}s(Ab,"isKey");var kg=Ab,bG="Expected a function";function td(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(bG);var r=s(function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o},"memoized");return r.cache=new(td.Cache||Jf),r}s(td,"memoize");td.Cache=Jf;var wG=td,IG=500;function Eb(t){var e=wG(t,function(n){return r.size===IG&&r.clear(),n}),r=e.cache;return e}s(Eb,"memoizeCapped");var NG=Eb,kG=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PG=/\\(\\)?/g,OG=NG(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(kG,function(r,n,a,i){e.push(a?i.replace(PG,"$1"):n||r)}),e}),LG=OG,xv=cr?cr.prototype:void 0,Fv=xv?xv.toString:void 0;function Pg(t){if(typeof t=="string")return t;if(ut(t))return zC(t,Pg)+"";if(ed(t))return Fv?Fv.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}s(Pg,"baseToString");var DG=Pg;function _b(t){return t==null?"":DG(t)}s(_b,"toString");var MG=_b;function Cb(t,e){return ut(t)?t:kg(t,e)?[t]:LG(MG(t))}s(Cb,"castPath");var Sb=Cb;function bb(t){if(typeof t=="string"||ed(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}s(bb,"toKey");var rd=bb;function wb(t,e){e=Sb(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[rd(e[r++])];return r&&r==n?t:void 0}s(wb,"baseGet");var Ib=wb;function Nb(t,e,r){var n=t==null?void 0:Ib(t,e);return n===void 0?r:n}s(Nb,"get");var xG=Nb;function kb(t,e){return t!=null&&e in Object(t)}s(kb,"baseHasIn");var FG=kb;function Pb(t,e,r){e=Sb(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var o=rd(e[n]);if(!(i=t!=null&&r(t,o)))break;t=t[o]}return i||++n!=a?i:(a=t==null?0:t.length,!!a&&bg(a)&&JS(o,a)&&(ut(t)||Zf(t)))}s(Pb,"hasPath");var GG=Pb;function Ob(t,e){return t!=null&&GG(t,e,FG)}s(Ob,"hasIn");var jG=Ob,UG=1,zG=2;function Lb(t,e){return kg(t)&&gb(e)?Tb(rd(t),e):function(r){var n=xG(r,t);return n===void 0&&n===e?jG(r,t):pb(e,n,UG|zG)}}s(Lb,"baseMatchesProperty");var BG=Lb;function Db(t){return t}s(Db,"identity");var Og=Db;function Mb(t){return function(e){return e==null?void 0:e[t]}}s(Mb,"baseProperty");var KG=Mb;function xb(t){return function(e){return Ib(e,t)}}s(xb,"basePropertyDeep");var qG=xb;function Fb(t){return kg(t)?KG(rd(t)):qG(t)}s(Fb,"property");var WG=Fb;function Gb(t){return typeof t=="function"?t:t==null?Og:typeof t=="object"?ut(t)?BG(t[0],t[1]):EG(t):WG(t)}s(Gb,"baseIteratee");var nd=Gb;function jb(t){return function(e,r,n){for(var a=-1,i=Object(e),o=n(e),c=o.length;c--;){var l=o[t?c:++a];if(r(i[l],l,i)===!1)break}return e}}s(jb,"createBaseFor");var VG=jb,HG=VG(),YG=HG;function Ub(t,e){return t&&YG(t,e,Ig)}s(Ub,"baseForOwn");var XG=Ub;function zb(t,e){return function(r,n){if(r==null)return r;if(!Qf(r))return t(r,n);for(var a=r.length,i=e?a:-1,o=Object(r);(e?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}s(zb,"createBaseEach");var JG=zb,ZG=JG(XG),ad=ZG;function Bb(t,e){var r=-1,n=Qf(t)?Array(t.length):[];return ad(t,function(a,i,o){n[++r]=e(a,i,o)}),n}s(Bb,"baseMap");var QG=Bb;function Kb(t,e){var r=ut(t)?zC:QG;return r(t,nd(e))}s(Kb,"map");var Er=Kb;function qb(t,e){var r=[];return ad(t,function(n,a,i){e(n,a,i)&&r.push(n)}),r}s(qb,"baseFilter");var ej=qb;function Wb(t,e){var r=ut(t)?zS:ej;return r(t,nd(e))}s(Wb,"filter");var tj=Wb;function jn(t,e,r){return`${t.name}_${e}_${r}`}s(jn,"buildATNKey");var Xr=1,rj=2,Vb=4,Hb=5,Oc=7,nj=8,aj=9,ij=10,sj=11,Yb=12,Bi,Lg=(Bi=class{constructor(e){this.target=e}isEpsilon(){return!1}},s(Bi,"AbstractTransition"),Bi),Ki,Dg=(Ki=class extends Lg{constructor(e,r){super(e),this.tokenType=r}},s(Ki,"AtomTransition"),Ki),qi,Xb=(qi=class extends Lg{constructor(e){super(e)}isEpsilon(){return!0}},s(qi,"EpsilonTransition"),qi),Wi,Mg=(Wi=class extends Lg{constructor(e,r,n){super(e),this.rule=r,this.followState=n}isEpsilon(){return!0}},s(Wi,"RuleTransition"),Wi);function Jb(t){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};Zb(e,t);const r=t.length;for(let n=0;n<r;n++){const a=t[n],i=rn(e,a,a);i!==void 0&&cw(e,a,i)}return e}s(Jb,"createATN");function Zb(t,e){const r=e.length;for(let n=0;n<r;n++){const a=e[n],i=Ve(t,a,void 0,{type:rj}),o=Ve(t,a,void 0,{type:Oc});i.stop=o,t.ruleToStartState.set(a,i),t.ruleToStopState.set(a,o)}}s(Zb,"createRuleStartAndStopATNStates");function xg(t,e,r){return r instanceof we?id(t,e,r.terminalType,r):r instanceof lt?lw(t,e,r):r instanceof vt?nw(t,e,r):r instanceof Qe?aw(t,e,r):r instanceof xe?Qb(t,e,r):r instanceof yt?ew(t,e,r):r instanceof _t?tw(t,e,r):r instanceof Ct?rw(t,e,r):rn(t,e,r)}s(xg,"atom");function Qb(t,e,r){const n=Ve(t,e,r,{type:Hb});xr(t,n);const a=sa(t,e,n,r,rn(t,e,r));return Gg(t,e,r,a)}s(Qb,"repetition");function ew(t,e,r){const n=Ve(t,e,r,{type:Hb});xr(t,n);const a=sa(t,e,n,r,rn(t,e,r)),i=id(t,e,r.separator,r);return Gg(t,e,r,a,i)}s(ew,"repetitionSep");function tw(t,e,r){const n=Ve(t,e,r,{type:Vb});xr(t,n);const a=sa(t,e,n,r,rn(t,e,r));return Fg(t,e,r,a)}s(tw,"repetitionMandatory");function rw(t,e,r){const n=Ve(t,e,r,{type:Vb});xr(t,n);const a=sa(t,e,n,r,rn(t,e,r)),i=id(t,e,r.separator,r);return Fg(t,e,r,a,i)}s(rw,"repetitionMandatorySep");function nw(t,e,r){const n=Ve(t,e,r,{type:Xr});xr(t,n);const a=Er(r.definition,o=>xg(t,e,o));return sa(t,e,n,r,...a)}s(nw,"alternation");function aw(t,e,r){const n=Ve(t,e,r,{type:Xr});xr(t,n);const a=sa(t,e,n,r,rn(t,e,r));return iw(t,e,r,a)}s(aw,"option");function rn(t,e,r){const n=tj(Er(r.definition,a=>xg(t,e,a)),a=>a!==void 0);return n.length===1?n[0]:n.length===0?void 0:ow(t,n)}s(rn,"block");function Fg(t,e,r,n,a){const i=n.left,o=n.right,c=Ve(t,e,r,{type:sj});xr(t,c);const l=Ve(t,e,r,{type:Yb});return i.loopback=c,l.loopback=c,t.decisionMap[jn(e,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=c,je(o,c),a===void 0?(je(c,i),je(c,l)):(je(c,l),je(c,a.left),je(a.right,i)),{left:i,right:l}}s(Fg,"plus");function Gg(t,e,r,n,a){const i=n.left,o=n.right,c=Ve(t,e,r,{type:ij});xr(t,c);const l=Ve(t,e,r,{type:Yb}),u=Ve(t,e,r,{type:aj});return c.loopback=u,l.loopback=u,je(c,i),je(c,l),je(o,u),a!==void 0?(je(u,l),je(u,a.left),je(a.right,i)):je(u,c),t.decisionMap[jn(e,a?"RepetitionWithSeparator":"Repetition",r.idx)]=c,{left:c,right:l}}s(Gg,"star");function iw(t,e,r,n){const a=n.left,i=n.right;return je(a,i),t.decisionMap[jn(e,"Option",r.idx)]=a,n}s(iw,"optional");function xr(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}s(xr,"defineDecisionState");function sa(t,e,r,n,...a){const i=Ve(t,e,n,{type:nj,start:r});r.end=i;for(const c of a)c!==void 0?(je(r,c.left),je(c.right,i)):je(r,i);const o={left:r,right:i};return t.decisionMap[jn(e,sw(n),n.idx)]=r,o}s(sa,"makeAlts");function sw(t){if(t instanceof vt)return"Alternation";if(t instanceof Qe)return"Option";if(t instanceof xe)return"Repetition";if(t instanceof yt)return"RepetitionWithSeparator";if(t instanceof _t)return"RepetitionMandatory";if(t instanceof Ct)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}s(sw,"getProdType");function ow(t,e){const r=e.length;for(let i=0;i<r-1;i++){const o=e[i];let c;o.left.transitions.length===1&&(c=o.left.transitions[0]);const l=c instanceof Mg,u=c,f=e[i+1].left;o.left.type===Xr&&o.right.type===Xr&&c!==void 0&&(l&&u.followState===o.right||c.target===o.right)?(l?u.followState=f:c.target=f,uw(t,o.right)):je(o.right,f)}const n=e[0],a=e[r-1];return{left:n.left,right:a.right}}s(ow,"makeBlock");function id(t,e,r,n){const a=Ve(t,e,n,{type:Xr}),i=Ve(t,e,n,{type:Xr});return sd(a,new Dg(i,r)),{left:a,right:i}}s(id,"tokenRef");function lw(t,e,r){const n=r.referencedRule,a=t.ruleToStartState.get(n),i=Ve(t,e,r,{type:Xr}),o=Ve(t,e,r,{type:Xr}),c=new Mg(a,n,o);return sd(i,c),{left:i,right:o}}s(lw,"ruleRef");function cw(t,e,r){const n=t.ruleToStartState.get(e);je(n,r.left);const a=t.ruleToStopState.get(e);return je(r.right,a),{left:n,right:a}}s(cw,"buildRuleHandle");function je(t,e){const r=new Xb(e);sd(t,r)}s(je,"epsilon");function Ve(t,e,r,n){const a=Object.assign({atn:t,production:r,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},n);return t.states.push(a),a}s(Ve,"newState");function sd(t,e){t.transitions.length===0&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}s(sd,"addTransition");function uw(t,e){t.states.splice(t.states.indexOf(e),1)}s(uw,"removeState");var Zu={},Vi,mh=(Vi=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const r=jg(e);r in this.map||(this.map[r]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return Er(this.configs,e=>e.alt)}get key(){let e="";for(const r in this.map)e+=r+":";return e}},s(Vi,"ATNConfigSet"),Vi);function jg(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(r=>r.stateNumber.toString()).join("_")}`}s(jg,"getATNConfigKey");function fw(t,e,r){for(var n=-1,a=t.length;++n<a;){var i=t[n],o=e(i);if(o!=null&&(c===void 0?o===o&&!ed(o):r(o,c)))var c=o,l=i}return l}s(fw,"baseExtremum");var oj=fw;function dw(t,e){return t<e}s(dw,"baseLt");var lj=dw;function pw(t){return t&&t.length?oj(t,Og,lj):void 0}s(pw,"min");var cj=pw,Gv=cr?cr.isConcatSpreadable:void 0;function hw(t){return ut(t)||Zf(t)||!!(Gv&&t&&t[Gv])}s(hw,"isFlattenable");var uj=hw;function Ug(t,e,r,n,a){var i=-1,o=t.length;for(r||(r=uj),a||(a=[]);++i<o;){var c=t[i];e>0&&r(c)?e>1?Ug(c,e-1,r,n,a):GS(a,c):n||(a[a.length]=c)}return a}s(Ug,"baseFlatten");var mw=Ug;function gw(t,e){return mw(Er(t,e),1)}s(gw,"flatMap");var fj=gw;function yw(t,e,r,n){for(var a=t.length,i=r+(n?1:-1);n?i--:++i<a;)if(e(t[i],i,t))return i;return-1}s(yw,"baseFindIndex");var dj=yw;function vw(t){return t!==t}s(vw,"baseIsNaN");var pj=vw;function Tw(t,e,r){for(var n=r-1,a=t.length;++n<a;)if(t[n]===e)return n;return-1}s(Tw,"strictIndexOf");var hj=Tw;function Rw(t,e,r){return e===e?hj(t,e,r):dj(t,pj,r)}s(Rw,"baseIndexOf");var mj=Rw;function $w(t,e){var r=t==null?0:t.length;return!!r&&mj(t,e,0)>-1}s($w,"arrayIncludes");var gj=$w;function Aw(t,e,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(e,t[n]))return!0;return!1}s(Aw,"arrayIncludesWith");var yj=Aw;function Ew(){}s(Ew,"noop");var vj=Ew,Tj=1/0,Rj=Ua&&1/Sg(new Ua([,-0]))[1]==Tj?function(t){return new Ua(t)}:vj,$j=Rj,Aj=200;function _w(t,e,r){var n=-1,a=gj,i=t.length,o=!0,c=[],l=c;if(r)o=!1,a=yj;else if(i>=Aj){var u=e?null:$j(t);if(u)return Sg(u);o=!1,a=PS,l=new IS}else l=e?[]:c;e:for(;++n<i;){var f=t[n],d=e?e(f):f;if(f=r||f!==0?f:0,o&&d===d){for(var p=l.length;p--;)if(l[p]===d)continue e;e&&l.push(d),c.push(f)}else a(l,d,r)||(l!==c&&l.push(d),c.push(f))}return c}s(_w,"baseUniq");var Ej=_w;function Cw(t,e){return t&&t.length?Ej(t,nd(e)):[]}s(Cw,"uniqBy");var _j=Cw;function Sw(t){var e=t==null?0:t.length;return e?mw(t,1):[]}s(Sw,"flatten");var Cj=Sw;function bw(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}s(bw,"arrayEach");var Sj=bw;function ww(t){return typeof t=="function"?t:Og}s(ww,"castFunction");var bj=ww;function Iw(t,e){var r=ut(t)?Sj:ad;return r(t,bj(e))}s(Iw,"forEach");var bd=Iw,wj="[object Map]",Ij="[object Set]",Nj=Object.prototype,kj=Nj.hasOwnProperty;function Nw(t){if(t==null)return!0;if(Qf(t)&&(ut(t)||typeof t=="string"||typeof t.splice=="function"||Ju(t)||wg(t)||Zf(t)))return!t.length;var e=hh(t);if(e==wj||e==Ij)return!t.size;if(ab(t))return!ob(t).length;for(var r in t)if(kj.call(t,r))return!1;return!0}s(Nw,"isEmpty");var Pj=Nw;function kw(t,e,r,n){var a=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++a]);++a<i;)r=e(r,t[a],a,t);return r}s(kw,"arrayReduce");var Oj=kw;function Pw(t,e,r,n,a){return a(t,function(i,o,c){r=n?(n=!1,i):e(r,i,o,c)}),r}s(Pw,"baseReduce");var Lj=Pw;function Ow(t,e,r){var n=ut(t)?Oj:Lj,a=arguments.length<3;return n(t,nd(e),r,a,ad)}s(Ow,"reduce");var jv=Ow;function Lw(t,e){const r={};return n=>{const a=n.toString();let i=r[a];return i!==void 0||(i={atnStartState:t,decision:e,states:{}},r[a]=i),i}}s(Lw,"createDFACache");var Hi,Dw=(Hi=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,r){this.predicates[e]=r}toString(){let e="";const r=this.predicates.length;for(let n=0;n<r;n++)e+=this.predicates[n]===!0?"1":"0";return e}},s(Hi,"PredicateSet"),Hi),Uv=new Dw,Yi,Dj=(Yi=class extends Ag{constructor(e){var r;super(),this.logging=(r=e==null?void 0:e.logging)!==null&&r!==void 0?r:n=>{}}initialize(e){this.atn=Jb(e.rules),this.dfas=Mw(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:r,rule:n,hasPredicates:a,dynamicTokensEnabled:i}=e,o=this.dfas,c=this.logging,l=jn(n,"Alternation",r),f=this.atn.decisionMap[l].decision,d=Er(th({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),p=>Er(p,m=>m[0]));if(gh(d,!1)&&!i){const p=jv(d,(m,g,v)=>(bd(g,E=>{E&&(m[E.tokenTypeIdx]=v,bd(E.categoryMatches,T=>{m[T]=v}))}),m),{});return a?function(m){var g;const v=this.LA(1),E=p[v.tokenTypeIdx];if(m!==void 0&&E!==void 0){const T=(g=m[E])===null||g===void 0?void 0:g.GATE;if(T!==void 0&&T.call(this)===!1)return}return E}:function(){const m=this.LA(1);return p[m.tokenTypeIdx]}}else return a?function(p){const m=new Dw,g=p===void 0?0:p.length;for(let E=0;E<g;E++){const T=p==null?void 0:p[E].GATE;m.set(E,T===void 0||T.call(this))}const v=gu.call(this,o,f,m,c);return typeof v=="number"?v:void 0}:function(){const p=gu.call(this,o,f,Uv,c);return typeof p=="number"?p:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:r,rule:n,prodType:a,dynamicTokensEnabled:i}=e,o=this.dfas,c=this.logging,l=jn(n,a,r),f=this.atn.decisionMap[l].decision,d=Er(th({maxLookahead:1,occurrence:r,prodType:a,rule:n}),p=>Er(p,m=>m[0]));if(gh(d)&&d[0][0]&&!i){const p=d[0],m=Cj(p);if(m.length===1&&Pj(m[0].categoryMatches)){const v=m[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===v}}else{const g=jv(m,(v,E)=>(E!==void 0&&(v[E.tokenTypeIdx]=!0,bd(E.categoryMatches,T=>{v[T]=!0})),v),{});return function(){const v=this.LA(1);return g[v.tokenTypeIdx]===!0}}}return function(){const p=gu.call(this,o,f,Uv,c);return typeof p=="object"?!1:p===0}}},s(Yi,"LLStarLookaheadStrategy"),Yi);function gh(t,e=!0){const r=new Set;for(const n of t){const a=new Set;for(const i of n){if(i===void 0){if(e)break;return!1}const o=[i.tokenTypeIdx].concat(i.categoryMatches);for(const c of o)if(r.has(c)){if(!a.has(c))return!1}else r.add(c),a.add(c)}}return!0}s(gh,"isLL1Sequence");function Mw(t){const e=t.decisionStates.length,r=Array(e);for(let n=0;n<e;n++)r[n]=Lw(t.decisionStates[n],n);return r}s(Mw,"initATNSimulator");function gu(t,e,r,n){const a=t[e](r);let i=a.start;if(i===void 0){const c=Vw(a.atnStartState);i=Bg(a,zg(c)),a.start=i}return xw.apply(this,[a,i,r,n])}s(gu,"adaptivePredict");function xw(t,e,r,n){let a=e,i=1;const o=[];let c=this.LA(i++);for(;;){let l=Bw(a,c);if(l===void 0&&(l=Fw.apply(this,[t,a,c,i,r,n])),l===Zu)return zw(o,a,c);if(l.isAcceptState===!0)return l.prediction;a=l,o.push(c),c=this.LA(i++)}}s(xw,"performLookahead");function Fw(t,e,r,n,a,i){const o=Kw(e.configs,r,a);if(o.size===0)return yh(t,e,r,Zu),Zu;let c=zg(o);const l=Ww(o,a);if(l!==void 0)c.isAcceptState=!0,c.prediction=l,c.configs.uniqueAlt=l;else if(Jw(o)){const u=cj(o.alts);c.isAcceptState=!0,c.prediction=u,c.configs.uniqueAlt=u,Gw.apply(this,[t,n,o.alts,i])}return c=yh(t,e,r,c),c}s(Fw,"computeLookaheadTarget");function Gw(t,e,r,n){const a=[];for(let u=1;u<=e;u++)a.push(this.LA(u).tokenType);const i=t.atnStartState,o=i.rule,c=i.production,l=jw({topLevelRule:o,ambiguityIndices:r,production:c,prefixPath:a});n(l)}s(Gw,"reportLookaheadAmbiguity");function jw(t){const e=Er(t.prefixPath,a=>On(a)).join(", "),r=t.production.idx===0?"":t.production.idx;let n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${Uw(t.production)}${r}> inside <${t.topLevelRule.name}> Rule,
138
+ <${e}> may appears as a prefix path in all these alternatives.
139
+ `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
140
+ For Further details.`,n}s(jw,"buildAmbiguityError");function Uw(t){if(t instanceof lt)return"SUBRULE";if(t instanceof Qe)return"OPTION";if(t instanceof vt)return"OR";if(t instanceof _t)return"AT_LEAST_ONE";if(t instanceof Ct)return"AT_LEAST_ONE_SEP";if(t instanceof yt)return"MANY_SEP";if(t instanceof xe)return"MANY";if(t instanceof we)return"CONSUME";throw Error("non exhaustive match")}s(Uw,"getProductionDslName");function zw(t,e,r){const n=fj(e.configs.elements,i=>i.state.transitions),a=_j(n.filter(i=>i instanceof Dg).map(i=>i.tokenType),i=>i.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:a,tokenPath:t}}s(zw,"buildAdaptivePredictError");function Bw(t,e){return t.edges[e.tokenTypeIdx]}s(Bw,"getExistingTargetState");function Kw(t,e,r){const n=new mh,a=[];for(const o of t.elements){if(r.is(o.alt)===!1)continue;if(o.state.type===Oc){a.push(o);continue}const c=o.state.transitions.length;for(let l=0;l<c;l++){const u=o.state.transitions[l],f=qw(u,e);f!==void 0&&n.add({state:f,alt:o.alt,stack:o.stack})}}let i;if(a.length===0&&n.size===1&&(i=n),i===void 0){i=new mh;for(const o of n.elements)fc(o,i)}if(a.length>0&&!Yw(i))for(const o of a)i.add(o);return i}s(Kw,"computeReachSet");function qw(t,e){if(t instanceof Dg&&mg(e,t.tokenType))return t.target}s(qw,"getReachableTarget");function Ww(t,e){let r;for(const n of t.elements)if(e.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}s(Ww,"getUniqueAlt");function zg(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}s(zg,"newDFAState");function yh(t,e,r,n){return n=Bg(t,n),e.edges[r.tokenTypeIdx]=n,n}s(yh,"addDFAEdge");function Bg(t,e){if(e===Zu)return e;const r=e.configs.key,n=t.states[r];return n!==void 0?n:(e.configs.finalize(),t.states[r]=e,e)}s(Bg,"addDFAState");function Vw(t){const e=new mh,r=t.transitions.length;for(let n=0;n<r;n++){const i={state:t.transitions[n].target,alt:n,stack:[]};fc(i,e)}return e}s(Vw,"computeStartState");function fc(t,e){const r=t.state;if(r.type===Oc){if(t.stack.length>0){const a=[...t.stack],o={state:a.pop(),alt:t.alt,stack:a};fc(o,e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);const n=r.transitions.length;for(let a=0;a<n;a++){const i=r.transitions[a],o=Hw(t,i);o!==void 0&&fc(o,e)}}s(fc,"closure");function Hw(t,e){if(e instanceof Xb)return{state:e.target,alt:t.alt,stack:t.stack};if(e instanceof Mg){const r=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:r}}}s(Hw,"getEpsilonTarget");function Yw(t){for(const e of t.elements)if(e.state.type===Oc)return!0;return!1}s(Yw,"hasConfigInRuleStopState");function Xw(t){for(const e of t.elements)if(e.state.type!==Oc)return!1;return!0}s(Xw,"allConfigsInRuleStopStates");function Jw(t){if(Xw(t))return!0;const e=Zw(t.elements);return Qw(e)&&!eI(e)}s(Jw,"hasConflictTerminatingPrediction");function Zw(t){const e=new Map;for(const r of t){const n=jg(r,!1);let a=e.get(n);a===void 0&&(a={},e.set(n,a)),a[r.alt]=!0}return e}s(Zw,"getConflictingAltSets");function Qw(t){for(const e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}s(Qw,"hasConflictingAltSet");function eI(t){for(const e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}s(eI,"hasStateAssociatedWithOneAlt");hc();var Xi,tI=(Xi=class{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new qg(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const r=new od;return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(e,r){const n=new Qu(e.startOffset,e.image.length,Zl(e),e.tokenType,!r);return n.grammarSource=r,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){const r=e.container;if(r){const n=r.content.indexOf(e);n>=0&&r.content.splice(n,1)}}addHiddenNodes(e){const r=[];for(const i of e){const o=new Qu(i.startOffset,i.image.length,Zl(i),i.tokenType,!0);o.root=this.rootNode,r.push(o)}let n=this.current,a=!1;if(n.content.length>0){n.content.push(...r);return}for(;n.container;){const i=n.container.content.indexOf(n);if(i>0){n.container.content.splice(i,0,...r),a=!0;break}n=n.container}a||this.rootNode.content.unshift(...r)}construct(e){const r=this.current;typeof e.$type=="string"&&!e.$infix&&(this.current.astNode=e),e.$cstNode=r;const n=this.nodeStack.pop();(n==null?void 0:n.content.length)===0&&this.removeNode(n)}},s(Xi,"CstNodeBuilder"),Xi),Ji,Kg=(Ji=class{get hidden(){return!1}get astNode(){var r,n;const e=typeof((r=this._astNode)==null?void 0:r.$type)=="string"?this._astNode:(n=this.container)==null?void 0:n.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},s(Ji,"AbstractCstNode"),Ji),Zi,Qu=(Zi=class extends Kg{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,r,n,a,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=a,this._length=r,this._range=n}},s(Zi,"LeafCstNodeImpl"),Zi),Qi,od=(Qi=class extends Kg{constructor(){super(...arguments),this.content=new Mj(this)}get offset(){var e;return((e=this.firstNonHiddenNode)==null?void 0:e.offset)??0}get length(){return this.end-this.offset}get end(){var e;return((e=this.lastNonHiddenNode)==null?void 0:e.end)??0}get range(){const e=this.firstNonHiddenNode,r=this.lastNonHiddenNode;if(e&&r){if(this._rangeCache===void 0){const{range:n}=e,{range:a}=r;this._rangeCache={start:n.start,end:a.end.line<n.start.line?n.start:a.end}}return this._rangeCache}else return{start:ie.create(0,0),end:ie.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 r=this.content[e];if(!r.hidden)return r}return this.content[this.content.length-1]}},s(Qi,"CompositeCstNodeImpl"),Qi),Mn,Mj=(Mn=class extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,Mn.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,r,...n){return this.addParents(n),super.splice(e,r,...n)}addParents(e){for(const r of e)r.container=this.parent}},s(Mn,"CstNodeContainer"),Mn),es,qg=(es=class extends od{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}},s(es,"RootCstNodeImpl"),es),ef=Symbol("Datatype");function yu(t){return t.$type===ef}s(yu,"isDataTypeNode");var zv="​",rI=s(t=>t.endsWith(zv)?t:t+zv,"withRuleSuffix"),ts,Wg=(ts=class{constructor(e){var a;this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const r=this.lexer.definition,n=e.LanguageMetaData.mode==="production";(a=e.shared.profilers.LangiumProfiler)!=null&&a.isActive("parsing")?this.wrapper=new Fj(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new sI(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,r){this.wrapper.wrapOr(e,r)}optional(e,r){this.wrapper.wrapOption(e,r)}many(e,r){this.wrapper.wrapMany(e,r)}atLeastOne(e,r){this.wrapper.wrapAtLeastOne(e,r)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},s(ts,"AbstractLangiumParser"),ts),rs,nI=(rs=class extends Wg{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new tI,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,r){const n=this.computeRuleType(e);let a;ko(e)&&(a=e.name,this.registerPrecedenceMap(e));const i=this.wrapper.DEFINE_RULE(rI(e.name),this.startImplementation(n,a,r).bind(this));return this.allRules.set(e.name,i),ot(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){const r=e.name,n=new Map;for(let a=0;a<e.operators.precedences.length;a++){const i=e.operators.precedences[a];for(const o of i.operators)n.set(o.value,{precedence:a,rightAssoc:i.associativity==="right"})}this.operatorPrecedence.set(r,n)}computeRuleType(e){return ko(e)?xn(e):e.fragment?void 0:vc(e)?ef:xn(e)}parse(e,r={}){this.nodeBuilder.buildRootNode(e);const n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;const a=r.rule?this.allRules.get(r.rule):this.mainRule;if(!a)throw new Error(r.rule?`No rule found with name '${r.rule}'`:"No main rule available.");const i=this.doParse(a);return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,Io(i,{deep:!0}),{value:i,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}doParse(e){let r=this.wrapper.rule(e);if(this.stack.length>0&&(r=this.construct()),r===void 0)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return r}startImplementation(e,r,n){return a=>{const i=!this.isRecording()&&e!==void 0;if(i){const o={$type:e};this.stack.push(o),e===ef?o.value="":r!==void 0&&(o.$infixName=r)}return n(a),i?this.construct():void 0}}extractHiddenTokens(e){const r=this.lexerResult.hidden;if(!r.length)return[];const n=e.startOffset;for(let a=0;a<r.length;a++)if(r[a].startOffset>n)return r.splice(0,a);return r.splice(0,r.length)}consume(e,r,n){const a=this.wrapper.wrapConsume(e,r);if(!this.isRecording()&&this.isValidToken(a)){const i=this.extractHiddenTokens(a);this.nodeBuilder.addHiddenNodes(i);const o=this.nodeBuilder.buildLeafNode(a,n),{assignment:c,crossRef:l}=this.getAssignment(n),u=this.current;if(c){const f=Sr(n)?a.image:this.converter.convert(a.image,o);this.assign(c.operator,c.feature,f,o,l)}else if(yu(u)){let f=a.image;Sr(n)||(f=this.converter.convert(f,o).toString()),u.value+=f}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,r,n,a,i){let o;!this.isRecording()&&!n&&(o=this.nodeBuilder.buildCompositeNode(a));let c;try{c=this.wrapper.wrapSubrule(e,r,i)}finally{this.isRecording()||(c===void 0&&!n&&(c=this.construct()),c!==void 0&&o&&o.length>0&&this.performSubruleAssignment(c,a,o))}}performSubruleAssignment(e,r,n){const{assignment:a,crossRef:i}=this.getAssignment(r);if(a)this.assign(a.operator,a.feature,e,n,i);else if(!a){const o=this.current;if(yu(o))o.value+=e.toString();else if(typeof e=="object"&&e){const l=this.assignWithoutOverride(e,o);this.stack.pop(),this.stack.push(l)}}}action(e,r){if(!this.isRecording()){let n=this.current;if(r.feature&&r.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(n.$cstNode);const i={$type:e};this.stack.push(i),this.assign(r.operator,r.feature,n,n.$cstNode)}else n.$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)):yu(e)?this.converter.convert(e.value,e.$cstNode):(qh(this.astReflection,e),e)}constructInfix(e,r){const n=e.parts;if(!Array.isArray(n)||n.length===0)return;const a=e.operators;if(!Array.isArray(a)||n.length<2)return n[0];let i=0,o=-1;for(let v=0;v<a.length;v++){const E=a[v],T=r.get(E)??{precedence:1/0,rightAssoc:!1};T.precedence>o?(o=T.precedence,i=v):T.precedence===o&&(T.rightAssoc||(i=v))}const c=a.slice(0,i),l=a.slice(i+1),u=n.slice(0,i+1),f=n.slice(i+1),d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:c},p={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:f,operators:l},m=this.constructInfix(d,r),g=this.constructInfix(p,r);return{$type:e.$type,$cstNode:e.$cstNode,left:m,operator:a[i],right:g}}getAssignment(e){if(!this.assignmentMap.has(e)){const r=Bn(e,Cr);this.assignmentMap.set(e,{assignment:r,crossRef:r&&qn(r.terminal)?r.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,r,n,a,i){const o=this.current;let c;switch(i==="single"&&typeof n=="string"?c=this.linker.buildReference(o,r,a,n):i==="multi"&&typeof n=="string"?c=this.linker.buildMultiReference(o,r,a,n):c=n,e){case"=":{o[r]=c;break}case"?=":{o[r]=!0;break}case"+=":Array.isArray(o[r])||(o[r]=[]),o[r].push(c)}}assignWithoutOverride(e,r){for(const[a,i]of Object.entries(r)){const o=e[a];o===void 0?e[a]=i:Array.isArray(o)&&Array.isArray(i)&&(i.push(...o),e[a]=i)}const n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},s(rs,"LangiumParser"),rs),ns,aI=(ns=class{buildMismatchTokenMessage(e){return xa.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return xa.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return xa.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return xa.buildEarlyExitMessage(e)}},s(ns,"AbstractParserErrorMessageProvider"),ns),as,Vg=(as=class extends aI{buildMismatchTokenMessage({expected:e,actual:r}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${r.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},s(as,"LangiumParserErrorMessageProvider"),as),is,iI=(is=class extends Wg{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const r=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=r.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,r){const n=this.wrapper.DEFINE_RULE(rI(e.name),this.startImplementation(r).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return r=>{const n=this.keepStackSize();try{e(r)}finally{this.resetStackSize(n)}}}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,r,n){this.wrapper.wrapConsume(e,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,r,n,a,i){this.before(a),this.wrapper.wrapSubrule(e,r,i),this.after(a)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const r=this.elementStack.lastIndexOf(e);r>=0&&this.elementStack.splice(r)}}get currIdx(){return this.wrapper.currIdx}},s(is,"LangiumCompletionParser"),is),xj={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Vg},ss,sI=(ss=class extends Ex{constructor(e,r){const n=r&&"maxLookahead"in r;super(e,{...xj,lookaheadStrategy:n?new Ag({maxLookahead:r.maxLookahead}):new Dj({logging:r.skipValidations?()=>{}:void 0}),...r})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,r,n){return this.RULE(e,r,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,r){return this.consume(e,r,void 0)}wrapSubrule(e,r,n){return this.subrule(e,r,{ARGS:[n]})}wrapOr(e,r){this.or(e,r)}wrapOption(e,r){this.option(e,r)}wrapMany(e,r){this.many(e,r)}wrapAtLeastOne(e,r){this.atLeastOne(e,r)}rule(e){return e.call(this,{})}},s(ss,"ChevrotainWrapper"),ss),os,Fj=(os=class extends sI{constructor(e,r,n){super(e,r),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,r,n){this.task.startSubTask(this.ruleName(r));try{return super.subrule(e,r,n)}finally{this.task.stopSubTask(this.ruleName(r))}}},s(os,"ProfilerWrapper"),os);function ld(t,e,r){return oI({parser:e,tokens:r,ruleNames:new Map},t),e}s(ld,"createParser");function oI(t,e){const r=Ef(e,!1),n=ue(e.rules).filter(ot).filter(i=>r.has(i));for(const i of n){const o={...t,consume:1,optional:1,subrule:1,many:1,or:1};t.parser.rule(i,Jr(o,i.definition))}const a=ue(e.rules).filter(ko).filter(i=>r.has(i));for(const i of a)t.parser.rule(i,lI(t,i))}s(oI,"buildRules");function lI(t,e){const r=e.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+e.call.rule.$refText);if(xt(r))throw new Error("Cannot use terminal rule in infix expression");const n=e.operators.precedences.flatMap(m=>m.operators),a={$type:"Group",elements:[]},i={$container:a,$type:"Assignment",feature:"parts",operator:"+=",terminal:e.call},o={$container:a,$type:"Group",elements:[],cardinality:"*"};a.elements.push(i,o);const l={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},u={...i,$container:o};o.elements.push(l,u);const d=n.map(m=>t.tokens[m.value]).map((m,g)=>({ALT:s(()=>t.parser.consume(g,m,l),"ALT")}));let p;return m=>{p??(p=cd(t,r)),t.parser.subrule(0,p,!1,i,m),t.parser.many(0,{DEF:s(()=>{t.parser.alternatives(0,d),t.parser.subrule(1,p,!1,u,m)},"DEF")})}}s(lI,"buildInfixRule");function Jr(t,e,r=!1){let n;if(Sr(e))n=mI(t,e);else if(Vr(e))n=cI(t,e);else if(Cr(e))n=Jr(t,e.terminal);else if(qn(e))n=Hg(t,e);else if(br(e))n=uI(t,e);else if(hf(e))n=dI(t,e);else if(vf(e))n=pI(t,e);else if(Wn(e))n=hI(t,e);else if(Zh(e)){const a=t.consume++;n=s(()=>t.parser.consume(a,Yr,e),"method")}else throw new Rf(e.$cstNode,`Unexpected element type: ${e.$type}`);return Yg(t,r?void 0:dc(e),n,e.cardinality)}s(Jr,"buildElement");function cI(t,e){const r=xn(e);return()=>t.parser.action(r,e)}s(cI,"buildAction");function uI(t,e){const r=e.rule.ref;if(Kn(r)){const n=t.subrule++,a=ot(r)&&r.fragment,i=e.arguments.length>0?fI(r,e.arguments):()=>({});let o;return c=>{o??(o=cd(t,r)),t.parser.subrule(n,o,a,e,i(c))}}else if(xt(r)){const n=t.consume++,a=tf(t,r.name);return()=>t.parser.consume(n,a,e)}else if(r)Qr();else throw new Rf(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}s(uI,"buildRuleCall");function fI(t,e){if(e.some(n=>n.calledByName)){const n=e.map(a=>{var i,o;return{parameterName:(o=(i=a.parameter)==null?void 0:i.ref)==null?void 0:o.name,predicate:zt(a.value)}});return a=>{const i={};for(const{parameterName:o,predicate:c}of n)o&&(i[o]=c(a));return i}}else{const n=e.map(a=>zt(a.value));return a=>{const i={};for(let o=0;o<n.length;o++)if(o<t.parameters.length){const c=t.parameters[o].name,l=n[o];i[c]=l(a)}return i}}}s(fI,"buildRuleCallPredicate");function zt(t){if(Jh(t)){const e=zt(t.left),r=zt(t.right);return n=>e(n)||r(n)}else if(Xh(t)){const e=zt(t.left),r=zt(t.right);return n=>e(n)&&r(n)}else if(tm(t)){const e=zt(t.value);return r=>!e(r)}else if(rm(t)){const e=t.parameter.ref.name;return r=>r!==void 0&&r[e]===!0}else if(Hh(t)){const e=!!t.true;return()=>e}Qr()}s(zt,"buildPredicate");function dI(t,e){if(e.elements.length===1)return Jr(t,e.elements[0]);{const r=[];for(const a of e.elements){const i={ALT:Jr(t,a,!0)},o=dc(a);o&&(i.GATE=zt(o)),r.push(i)}const n=t.or++;return a=>t.parser.alternatives(n,r.map(i=>{const o={ALT:s(()=>i.ALT(a),"ALT")},c=i.GATE;return c&&(o.GATE=()=>c(a)),o}))}}s(dI,"buildAlternatives");function pI(t,e){if(e.elements.length===1)return Jr(t,e.elements[0]);const r=[];for(const c of e.elements){const l={ALT:Jr(t,c,!0)},u=dc(c);u&&(l.GATE=zt(u)),r.push(l)}const n=t.or++,a=s((c,l)=>{const u=l.getRuleStack().join("-");return`uGroup_${c}_${u}`},"idFunc"),i=s(c=>t.parser.alternatives(n,r.map((l,u)=>{const f={ALT:s(()=>!0,"ALT")},d=t.parser;f.ALT=()=>{if(l.ALT(c),!d.isRecording()){const m=a(n,d);d.unorderedGroups.get(m)||d.unorderedGroups.set(m,[]);const g=d.unorderedGroups.get(m);typeof(g==null?void 0:g[u])>"u"&&(g[u]=!0)}};const p=l.GATE;return p?f.GATE=()=>p(c):f.GATE=()=>{const m=d.unorderedGroups.get(a(n,d));return!(m!=null&&m[u])},f})),"alternatives"),o=Yg(t,dc(e),i,"*");return c=>{o(c),t.parser.isRecording()||t.parser.unorderedGroups.delete(a(n,t.parser))}}s(pI,"buildUnorderedGroup");function hI(t,e){const r=e.elements.map(n=>Jr(t,n));return n=>r.forEach(a=>a(n))}s(hI,"buildGroup");function dc(t){if(Wn(t))return t.guardCondition}s(dc,"getGuardCondition");function Hg(t,e,r=e.terminal){if(r)if(br(r)&&ot(r.rule.ref)){const n=r.rule.ref,a=t.subrule++;let i;return o=>{i??(i=cd(t,n)),t.parser.subrule(a,i,!1,e,o)}}else if(br(r)&&xt(r.rule.ref)){const n=t.consume++,a=tf(t,r.rule.ref.name);return()=>t.parser.consume(n,a,e)}else if(Sr(r)){const n=t.consume++,a=tf(t,r.value);return()=>t.parser.consume(n,a,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const n=bf(e.type.ref),a=n==null?void 0:n.terminal;if(!a)throw new Error("Could not find name assignment for type: "+xn(e.type.ref));return Hg(t,e,a)}}s(Hg,"buildCrossReference");function mI(t,e){const r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e)}s(mI,"buildKeyword");function Yg(t,e,r,n){const a=e&&zt(e);if(!n)if(a){const i=t.or++;return o=>t.parser.alternatives(i,[{ALT:s(()=>r(o),"ALT"),GATE:s(()=>a(o),"GATE")},{ALT:uh(),GATE:s(()=>!a(o),"GATE")}])}else return r;if(n==="*"){const i=t.many++;return o=>t.parser.many(i,{DEF:s(()=>r(o),"DEF"),GATE:a?()=>a(o):void 0})}else if(n==="+"){const i=t.many++;if(a){const o=t.or++;return c=>t.parser.alternatives(o,[{ALT:s(()=>t.parser.atLeastOne(i,{DEF:s(()=>r(c),"DEF")}),"ALT"),GATE:s(()=>a(c),"GATE")},{ALT:uh(),GATE:s(()=>!a(c),"GATE")}])}else return o=>t.parser.atLeastOne(i,{DEF:s(()=>r(o),"DEF")})}else if(n==="?"){const i=t.optional++;return o=>t.parser.optional(i,{DEF:s(()=>r(o),"DEF"),GATE:a?()=>a(o):void 0})}else Qr()}s(Yg,"wrap");function cd(t,e){const r=gI(t,e),n=t.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}s(cd,"getRule");function gI(t,e){if(Kn(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,a=e.$type;for(;!ot(n);)(Wn(n)||hf(n)||vf(n))&&(a=n.elements.indexOf(r).toString()+":"+a),r=n,n=n.$container;return a=n.name+":"+a,t.ruleNames.set(e,a),a}}s(gI,"getRuleName");function tf(t,e){const r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}s(tf,"getToken");function Xg(t){const e=t.Grammar,r=t.parser.Lexer,n=new iI(t);return ld(e,n,r.definition),n.finalize(),n}s(Xg,"createCompletionParser");function Jg(t){const e=Zg(t);return e.finalize(),e}s(Jg,"createLangiumParser");function Zg(t){const e=t.Grammar,r=t.parser.Lexer,n=new nI(t);return ld(e,n,r.definition)}s(Zg,"prepareLangiumParser");var ls,ud=(ls=class{constructor(){this.diagnostics=[]}buildTokens(e,r){const n=ue(Ef(e,!1)),a=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,a,r);return i.push(...a),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(xt).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(e){const r=Rc(e),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,a={name:e.name,PATTERN:n};return typeof n=="function"&&(a.LINE_BREAKS=!0),e.hidden&&(a.GROUP=Af(r)?st.SKIPPED:"hidden"),a}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s"))}regexPatternFunction(e){const r=new RegExp(e,e.flags+"y");return(n,a)=>(r.lastIndex=a,r.exec(n))}buildKeywordTokens(e,r,n){return e.filter(Kn).flatMap(a=>Lr(a).filter(Sr)).distinct(a=>a.value).toArray().sort((a,i)=>i.value.length-a.value.length).map(a=>this.buildKeywordToken(a,r,!!(n!=null&&n.caseInsensitive)))}buildKeywordToken(e,r,n){const a=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:a,LONGER_ALT:this.findLongerAlt(e,r)};return typeof a=="function"&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,r){return r?new RegExp(Uo(e.value),"i"):e.value}findLongerAlt(e,r){return r.reduce((n,a)=>{const i=a==null?void 0:a.PATTERN;return i!=null&&i.source&&_m("^"+i.source+"$",e.value)&&n.push(a),n},[])}},s(ls,"DefaultTokenBuilder"),ls),cs,Qg=(cs=class{convert(e,r){let n=r.grammarSource;if(qn(n)&&(n=Im(n)),br(n)){const a=n.rule.ref;if(!a)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(a,e,r)}return e}runConverter(e,r,n){var a;switch(e.name.toUpperCase()){case"INT":return nr.convertInt(r);case"STRING":return nr.convertString(r);case"ID":return nr.convertID(r)}switch((a=Fm(e))==null?void 0:a.toLowerCase()){case"number":return nr.convertNumber(r);case"boolean":return nr.convertBoolean(r);case"bigint":return nr.convertBigint(r);case"date":return nr.convertDate(r);default:return r}}},s(cs,"DefaultValueConverter"),cs),nr;(function(t){function e(u){let f="";for(let d=1;d<u.length-1;d++){const p=u.charAt(d);if(p==="\\"){const m=u.charAt(++d);f+=r(m)}else f+=p}return f}s(e,"convertString"),t.convertString=e;function r(u){switch(u){case"b":return"\b";case"f":return"\f";case"n":return`
141
+ `;case"r":return"\r";case"t":return" ";case"v":return"\v";case"0":return"\0";default:return u}}s(r,"convertEscapeCharacter");function n(u){return u.charAt(0)==="^"?u.substring(1):u}s(n,"convertID"),t.convertID=n;function a(u){return parseInt(u)}s(a,"convertInt"),t.convertInt=a;function i(u){return BigInt(u)}s(i,"convertBigint"),t.convertBigint=i;function o(u){return new Date(u)}s(o,"convertDate"),t.convertDate=o;function c(u){return Number(u)}s(c,"convertNumber"),t.convertNumber=c;function l(u){return u.toLowerCase()==="true"}s(l,"convertBoolean"),t.convertBoolean=l})(nr||(nr={}));var Ae={};cf(Ae,Fh(ff()));function fd(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}s(fd,"delayNextTick");var vu=0,yI=10;function dd(){return vu=performance.now(),new Ae.CancellationTokenSource}s(dd,"startCancelableOperation");function ey(t){yI=t}s(ey,"setInterruptionPeriod");var sr=Symbol("OperationCancelled");function oa(t){return t===sr}s(oa,"isOperationCancelled");async function Ye(t){if(t===Ae.CancellationToken.None)return;const e=performance.now();if(e-vu>=yI&&(vu=e,await fd(),vu=performance.now()),t.isCancellationRequested)throw sr}s(Ye,"interruptAndCheck");var us,Pr=(us=class{constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this)})}},s(us,"Deferred"),us),Wr,Bv=(Wr=class{constructor(e,r,n,a){this._uri=e,this._languageId=r,this._version=n,this._content=a,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(const n of e)if(Wr.isIncremental(n)){const a=ry(n.range),i=this.offsetAt(a.start),o=this.offsetAt(a.end);this._content=this._content.substring(0,i)+n.text+this._content.substring(o,this._content.length);const c=Math.max(a.start.line,0),l=Math.max(a.end.line,0);let u=this._lineOffsets;const f=vh(n.text,!1,i);if(l-c===f.length)for(let p=0,m=f.length;p<m;p++)u[p+c+1]=f[p];else f.length<1e4?u.splice(c+1,l-c,...f):this._lineOffsets=u=u.slice(0,c+1).concat(f,u.slice(l+1));const d=n.text.length-(o-i);if(d!==0)for(let p=c+1+f.length,m=u.length;p<m;p++)u[p]=u[p]+d}else if(Wr.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=vh(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const r=this.getLineOffsets();let n=0,a=r.length;if(a===0)return{line:0,character:e};for(;n<a;){const o=Math.floor((n+a)/2);r[o]>e?a=o:n=o+1}const i=n-1;return e=this.ensureBeforeEOL(e,r[i]),{line:i,character:e-r[i]}}offsetAt(e){const r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;const n=r[e.line];if(e.character<=0)return n;const a=e.line+1<r.length?r[e.line+1]:this._content.length,i=Math.min(n+e.character,a);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,r){for(;e>r&&ty(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){const r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}},s(Wr,"FullTextDocument"),Wr),rf;(function(t){function e(a,i,o,c){return new Bv(a,i,o,c)}s(e,"create"),t.create=e;function r(a,i,o){if(a instanceof Bv)return a.update(i,o),a;throw new Error("TextDocument.update: document must be created by TextDocument.create")}s(r,"update"),t.update=r;function n(a,i){const o=a.getText(),c=nf(i.map(vI),(f,d)=>{const p=f.range.start.line-d.range.start.line;return p===0?f.range.start.character-d.range.start.character:p});let l=0;const u=[];for(const f of c){const d=a.offsetAt(f.range.start);if(d<l)throw new Error("Overlapping edit");d>l&&u.push(o.substring(l,d)),f.newText.length&&u.push(f.newText),l=a.offsetAt(f.range.end)}return u.push(o.substr(l)),u.join("")}s(n,"applyEdits"),t.applyEdits=n})(rf||(rf={}));function nf(t,e){if(t.length<=1)return t;const r=t.length/2|0,n=t.slice(0,r),a=t.slice(r);nf(n,e),nf(a,e);let i=0,o=0,c=0;for(;i<n.length&&o<a.length;)e(n[i],a[o])<=0?t[c++]=n[i++]:t[c++]=a[o++];for(;i<n.length;)t[c++]=n[i++];for(;o<a.length;)t[c++]=a[o++];return t}s(nf,"mergeSort");function vh(t,e,r=0){const n=e?[r]:[];for(let a=0;a<t.length;a++){const i=t.charCodeAt(a);ty(i)&&(i===13&&a+1<t.length&&t.charCodeAt(a+1)===10&&a++,n.push(r+a+1))}return n}s(vh,"computeLineOffsets");function ty(t){return t===13||t===10}s(ty,"isEOL");function ry(t){const e=t.start,r=t.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}s(ry,"getWellformedRange");function vI(t){const e=ry(t.range);return e!==t.range?{newText:t.newText,range:e}:t}s(vI,"getWellformedEdit");var TI;(()=>{var t={975:P=>{function S($){if(typeof $!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify($))}s(S,"e");function R($,A){for(var b,O="",M=0,L=-1,j=0,F=0;F<=$.length;++F){if(F<$.length)b=$.charCodeAt(F);else{if(b===47)break;b=47}if(b===47){if(!(L===F-1||j===1))if(L!==F-1&&j===2){if(O.length<2||M!==2||O.charCodeAt(O.length-1)!==46||O.charCodeAt(O.length-2)!==46){if(O.length>2){var te=O.lastIndexOf("/");if(te!==O.length-1){te===-1?(O="",M=0):M=(O=O.slice(0,te)).length-1-O.lastIndexOf("/"),L=F,j=0;continue}}else if(O.length===2||O.length===1){O="",M=0,L=F,j=0;continue}}A&&(O.length>0?O+="/..":O="..",M=2)}else O.length>0?O+="/"+$.slice(L+1,F):O=$.slice(L+1,F),M=F-L-1;L=F,j=0}else b===46&&j!==-1?++j:j=-1}return O}s(R,"r");var I={resolve:s(function(){for(var $,A="",b=!1,O=arguments.length-1;O>=-1&&!b;O--){var M;O>=0?M=arguments[O]:($===void 0&&($=process.cwd()),M=$),S(M),M.length!==0&&(A=M+"/"+A,b=M.charCodeAt(0)===47)}return A=R(A,!b),b?A.length>0?"/"+A:"/":A.length>0?A:"."},"resolve"),normalize:s(function($){if(S($),$.length===0)return".";var A=$.charCodeAt(0)===47,b=$.charCodeAt($.length-1)===47;return($=R($,!A)).length!==0||A||($="."),$.length>0&&b&&($+="/"),A?"/"+$:$},"normalize"),isAbsolute:s(function($){return S($),$.length>0&&$.charCodeAt(0)===47},"isAbsolute"),join:s(function(){if(arguments.length===0)return".";for(var $,A=0;A<arguments.length;++A){var b=arguments[A];S(b),b.length>0&&($===void 0?$=b:$+="/"+b)}return $===void 0?".":I.normalize($)},"join"),relative:s(function($,A){if(S($),S(A),$===A||($=I.resolve($))===(A=I.resolve(A)))return"";for(var b=1;b<$.length&&$.charCodeAt(b)===47;++b);for(var O=$.length,M=O-b,L=1;L<A.length&&A.charCodeAt(L)===47;++L);for(var j=A.length-L,F=M<j?M:j,te=-1,U=0;U<=F;++U){if(U===F){if(j>F){if(A.charCodeAt(L+U)===47)return A.slice(L+U+1);if(U===0)return A.slice(L+U)}else M>F&&($.charCodeAt(b+U)===47?te=U:U===0&&(te=0));break}var Q=$.charCodeAt(b+U);if(Q!==A.charCodeAt(L+U))break;Q===47&&(te=U)}var fe="";for(U=b+te+1;U<=O;++U)U!==O&&$.charCodeAt(U)!==47||(fe.length===0?fe+="..":fe+="/..");return fe.length>0?fe+A.slice(L+te):(L+=te,A.charCodeAt(L)===47&&++L,A.slice(L))},"relative"),_makeLong:s(function($){return $},"_makeLong"),dirname:s(function($){if(S($),$.length===0)return".";for(var A=$.charCodeAt(0),b=A===47,O=-1,M=!0,L=$.length-1;L>=1;--L)if((A=$.charCodeAt(L))===47){if(!M){O=L;break}}else M=!1;return O===-1?b?"/":".":b&&O===1?"//":$.slice(0,O)},"dirname"),basename:s(function($,A){if(A!==void 0&&typeof A!="string")throw new TypeError('"ext" argument must be a string');S($);var b,O=0,M=-1,L=!0;if(A!==void 0&&A.length>0&&A.length<=$.length){if(A.length===$.length&&A===$)return"";var j=A.length-1,F=-1;for(b=$.length-1;b>=0;--b){var te=$.charCodeAt(b);if(te===47){if(!L){O=b+1;break}}else F===-1&&(L=!1,F=b+1),j>=0&&(te===A.charCodeAt(j)?--j==-1&&(M=b):(j=-1,M=F))}return O===M?M=F:M===-1&&(M=$.length),$.slice(O,M)}for(b=$.length-1;b>=0;--b)if($.charCodeAt(b)===47){if(!L){O=b+1;break}}else M===-1&&(L=!1,M=b+1);return M===-1?"":$.slice(O,M)},"basename"),extname:s(function($){S($);for(var A=-1,b=0,O=-1,M=!0,L=0,j=$.length-1;j>=0;--j){var F=$.charCodeAt(j);if(F!==47)O===-1&&(M=!1,O=j+1),F===46?A===-1?A=j:L!==1&&(L=1):A!==-1&&(L=-1);else if(!M){b=j+1;break}}return A===-1||O===-1||L===0||L===1&&A===O-1&&A===b+1?"":$.slice(A,O)},"extname"),format:s(function($){if($===null||typeof $!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof $);return function(A,b){var O=b.dir||b.root,M=b.base||(b.name||"")+(b.ext||"");return O?O===b.root?O+M:O+"/"+M:M}(0,$)},"format"),parse:s(function($){S($);var A={root:"",dir:"",base:"",ext:"",name:""};if($.length===0)return A;var b,O=$.charCodeAt(0),M=O===47;M?(A.root="/",b=1):b=0;for(var L=-1,j=0,F=-1,te=!0,U=$.length-1,Q=0;U>=b;--U)if((O=$.charCodeAt(U))!==47)F===-1&&(te=!1,F=U+1),O===46?L===-1?L=U:Q!==1&&(Q=1):L!==-1&&(Q=-1);else if(!te){j=U+1;break}return L===-1||F===-1||Q===0||Q===1&&L===F-1&&L===j+1?F!==-1&&(A.base=A.name=j===0&&M?$.slice(1,F):$.slice(j,F)):(j===0&&M?(A.name=$.slice(1,L),A.base=$.slice(1,F)):(A.name=$.slice(j,L),A.base=$.slice(j,F)),A.ext=$.slice(L,F)),j>0?A.dir=$.slice(0,j-1):M&&(A.dir="/"),A},"parse"),sep:"/",delimiter:":",win32:null,posix:null};I.posix=I,P.exports=I}},e={};function r(P){var S=e[P];if(S!==void 0)return S.exports;var R=e[P]={exports:{}};return t[P](R,R.exports,r),R.exports}s(r,"r"),r.d=(P,S)=>{for(var R in S)r.o(S,R)&&!r.o(P,R)&&Object.defineProperty(P,R,{enumerable:!0,get:S[R]})},r.o=(P,S)=>Object.prototype.hasOwnProperty.call(P,S),r.r=P=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})};var n={};let a;r.r(n),r.d(n,{URI:s(()=>p,"URI"),Utils:s(()=>Ie,"Utils")}),typeof process=="object"?a=process.platform==="win32":typeof navigator=="object"&&(a=navigator.userAgent.indexOf("Windows")>=0);const i=/^\w[\w\d+.-]*$/,o=/^\//,c=/^\/\//;function l(P,S){if(!P.scheme&&S)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${P.authority}", path: "${P.path}", query: "${P.query}", fragment: "${P.fragment}"}`);if(P.scheme&&!i.test(P.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(P.path){if(P.authority){if(!o.test(P.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(c.test(P.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}s(l,"a");const u="",f="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,oe=class oe{constructor(S,R,I,$,A,b=!1){Gr(this,"scheme");Gr(this,"authority");Gr(this,"path");Gr(this,"query");Gr(this,"fragment");typeof S=="object"?(this.scheme=S.scheme||u,this.authority=S.authority||u,this.path=S.path||u,this.query=S.query||u,this.fragment=S.fragment||u):(this.scheme=function(O,M){return O||M?O:"file"}(S,b),this.authority=R||u,this.path=function(O,M){switch(O){case"https":case"http":case"file":M?M[0]!==f&&(M=f+M):M=f}return M}(this.scheme,I||u),this.query=$||u,this.fragment=A||u,l(this,b))}static isUri(S){return S instanceof oe||!!S&&typeof S.authority=="string"&&typeof S.fragment=="string"&&typeof S.path=="string"&&typeof S.query=="string"&&typeof S.scheme=="string"&&typeof S.fsPath=="string"&&typeof S.with=="function"&&typeof S.toString=="function"}get fsPath(){return w(this,!1)}with(S){if(!S)return this;let{scheme:R,authority:I,path:$,query:A,fragment:b}=S;return R===void 0?R=this.scheme:R===null&&(R=u),I===void 0?I=this.authority:I===null&&(I=u),$===void 0?$=this.path:$===null&&($=u),A===void 0?A=this.query:A===null&&(A=u),b===void 0?b=this.fragment:b===null&&(b=u),R===this.scheme&&I===this.authority&&$===this.path&&A===this.query&&b===this.fragment?this:new g(R,I,$,A,b)}static parse(S,R=!1){const I=d.exec(S);return I?new g(I[2]||u,re(I[4]||u),re(I[5]||u),re(I[7]||u),re(I[9]||u),R):new g(u,u,u,u,u)}static file(S){let R=u;if(a&&(S=S.replace(/\\/g,f)),S[0]===f&&S[1]===f){const I=S.indexOf(f,2);I===-1?(R=S.substring(2),S=f):(R=S.substring(2,I),S=S.substring(I)||f)}return new g("file",R,S,u,u)}static from(S){const R=new g(S.scheme,S.authority,S.path,S.query,S.fragment);return l(R,!0),R}toString(S=!1){return C(this,S)}toJSON(){return this}static revive(S){if(S){if(S instanceof oe)return S;{const R=new g(S);return R._formatted=S.external,R._fsPath=S._sep===m?S.fsPath:null,R}}return S}};s(oe,"l");let p=oe;const m=a?1:void 0,tt=class tt extends p{constructor(){super(...arguments);Gr(this,"_formatted",null);Gr(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath}toString(R=!1){return R?C(this,!0):(this._formatted||(this._formatted=C(this,!1)),this._formatted)}toJSON(){const R={$mid:1};return this._fsPath&&(R.fsPath=this._fsPath,R._sep=m),this._formatted&&(R.external=this._formatted),this.path&&(R.path=this.path),this.scheme&&(R.scheme=this.scheme),this.authority&&(R.authority=this.authority),this.query&&(R.query=this.query),this.fragment&&(R.fragment=this.fragment),R}};s(tt,"d");let g=tt;const v={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 E(P,S,R){let I,$=-1;for(let A=0;A<P.length;A++){const b=P.charCodeAt(A);if(b>=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45||b===46||b===95||b===126||S&&b===47||R&&b===91||R&&b===93||R&&b===58)$!==-1&&(I+=encodeURIComponent(P.substring($,A)),$=-1),I!==void 0&&(I+=P.charAt(A));else{I===void 0&&(I=P.substr(0,A));const O=v[b];O!==void 0?($!==-1&&(I+=encodeURIComponent(P.substring($,A)),$=-1),I+=O):$===-1&&($=A)}}return $!==-1&&(I+=encodeURIComponent(P.substring($))),I!==void 0?I:P}s(E,"m");function T(P){let S;for(let R=0;R<P.length;R++){const I=P.charCodeAt(R);I===35||I===63?(S===void 0&&(S=P.substr(0,R)),S+=v[I]):S!==void 0&&(S+=P[R])}return S!==void 0?S:P}s(T,"y");function w(P,S){let R;return R=P.authority&&P.path.length>1&&P.scheme==="file"?`//${P.authority}${P.path}`:P.path.charCodeAt(0)===47&&(P.path.charCodeAt(1)>=65&&P.path.charCodeAt(1)<=90||P.path.charCodeAt(1)>=97&&P.path.charCodeAt(1)<=122)&&P.path.charCodeAt(2)===58?S?P.path.substr(1):P.path[1].toLowerCase()+P.path.substr(2):P.path,a&&(R=R.replace(/\//g,"\\")),R}s(w,"v");function C(P,S){const R=S?T:E;let I="",{scheme:$,authority:A,path:b,query:O,fragment:M}=P;if($&&(I+=$,I+=":"),(A||$==="file")&&(I+=f,I+=f),A){let L=A.indexOf("@");if(L!==-1){const j=A.substr(0,L);A=A.substr(L+1),L=j.lastIndexOf(":"),L===-1?I+=R(j,!1,!1):(I+=R(j.substr(0,L),!1,!1),I+=":",I+=R(j.substr(L+1),!1,!0)),I+="@"}A=A.toLowerCase(),L=A.lastIndexOf(":"),L===-1?I+=R(A,!1,!0):(I+=R(A.substr(0,L),!1,!0),I+=A.substr(L))}if(b){if(b.length>=3&&b.charCodeAt(0)===47&&b.charCodeAt(2)===58){const L=b.charCodeAt(1);L>=65&&L<=90&&(b=`/${String.fromCharCode(L+32)}:${b.substr(3)}`)}else if(b.length>=2&&b.charCodeAt(1)===58){const L=b.charCodeAt(0);L>=65&&L<=90&&(b=`${String.fromCharCode(L+32)}:${b.substr(2)}`)}I+=R(b,!0,!1)}return O&&(I+="?",I+=R(O,!1,!1)),M&&(I+="#",I+=S?M:E(M,!1,!1)),I}s(C,"b");function k(P){try{return decodeURIComponent(P)}catch{return P.length>3?P.substr(0,3)+k(P.substr(3)):P}}s(k,"C");const B=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function re(P){return P.match(B)?P.replace(B,S=>k(S)):P}s(re,"w");var X=r(975);const ge=X.posix||X,_e="/";var Ie;(function(P){P.joinPath=function(S,...R){return S.with({path:ge.join(S.path,...R)})},P.resolvePath=function(S,...R){let I=S.path,$=!1;I[0]!==_e&&(I=_e+I,$=!0);let A=ge.resolve(I,...R);return $&&A[0]===_e&&!S.authority&&(A=A.substring(1)),S.with({path:A})},P.dirname=function(S){if(S.path.length===0||S.path===_e)return S;let R=ge.dirname(S.path);return R.length===1&&R.charCodeAt(0)===46&&(R=""),S.with({path:R})},P.basename=function(S){return ge.basename(S.path)},P.extname=function(S){return ge.extname(S.path)}})(Ie||(Ie={})),TI=n})();var{URI:Rt,Utils:gl}=TI,it;(function(t){t.basename=gl.basename,t.dirname=gl.dirname,t.extname=gl.extname,t.joinPath=gl.joinPath,t.resolvePath=gl.resolvePath;const e=typeof process=="object"&&(process==null?void 0:process.platform)==="win32";function r(o,c){return(o==null?void 0:o.toString())===(c==null?void 0:c.toString())}s(r,"equals"),t.equals=r;function n(o,c){const l=typeof o=="string"?Rt.parse(o).path:o.path,u=typeof c=="string"?Rt.parse(c).path:c.path,f=l.split("/").filter(v=>v.length>0),d=u.split("/").filter(v=>v.length>0);if(e){const v=/^[A-Z]:$/;if(f[0]&&v.test(f[0])&&(f[0]=f[0].toLowerCase()),d[0]&&v.test(d[0])&&(d[0]=d[0].toLowerCase()),f[0]!==d[0])return u.substring(1)}let p=0;for(;p<f.length&&f[p]===d[p];p++);const m="../".repeat(f.length-p),g=d.slice(p).join("/");return m+g}s(n,"relative"),t.relative=n;function a(o){return Rt.parse(o.toString()).toString()}s(a,"normalize"),t.normalize=a;function i(o,c){let l=typeof o=="string"?o:o.path,u=typeof c=="string"?c:c.path;return u.charAt(u.length-1)==="/"&&(u=u.slice(0,-1)),l.charAt(l.length-1)==="/"&&(l=l.slice(0,-1)),u===l?!0:u.length<l.length||u.charAt(l.length)!=="/"?!1:u.startsWith(l)}s(i,"contains"),t.contains=i})(it||(it={}));var fs,ny=(fs=class{constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return it.normalize(e)}clear(){this.root.children.clear()}insert(e,r){const n=this.getNode(this.normalizeUri(e),!0);n.element=r}delete(e){const r=this.getNode(this.normalizeUri(e),!1);r!=null&&r.parent&&r.parent.children.delete(r.name)}has(e){var r;return((r=this.getNode(this.normalizeUri(e),!1))==null?void 0:r.element)!==void 0}hasNode(e){return this.getNode(this.normalizeUri(e),!1)!==void 0}find(e){var r;return(r=this.getNode(this.normalizeUri(e),!1))==null?void 0:r.element}findNode(e){const r=this.normalizeUri(e),n=this.getNode(r,!1);if(n)return{name:n.name,uri:it.joinPath(Rt.parse(r),n.name).toString(),element:n.element}}findChildren(e){const r=this.normalizeUri(e),n=this.getNode(r,!1);return n?Array.from(n.children.values()).map(a=>({name:a.name,uri:it.joinPath(Rt.parse(r),a.name).toString(),element:a.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const r=this.getNode(it.normalize(e),!1);return r?this.collectValues(r):[]}getNode(e,r){const n=e.split("/");e.charAt(e.length-1)==="/"&&n.pop();let a=this.root;for(const i of n){let o=a.children.get(i);if(!o)if(r)o={name:i,children:new Map,parent:a},a.children.set(i,o);else return;a=o}return a}collectValues(e){const r=[];e.element&&r.push(e.element);for(const n of e.children.values())r.push(...this.collectValues(n));return r}},s(fs,"UriTrie"),fs),Z;(function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"})(Z||(Z={}));var ds,RI=(ds=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,r=Ae.CancellationToken.None){const n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,r)}fromTextDocument(e,r,n){return r=r??Rt.parse(e.uri),Ae.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromString(e,r,n){return Ae.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromModel(e,r){return this.create(r,{$model:e})}create(e,r,n){if(typeof r=="string"){const a=this.parse(e,r,n);return this.createLangiumDocument(a,e,void 0,r)}else if("$model"in r){const a={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(a,e)}else{const a=this.parse(e,r.getText(),n);return this.createLangiumDocument(a,e,r)}}async createAsync(e,r,n){if(typeof r=="string"){const a=await this.parseAsync(e,r,n);return this.createLangiumDocument(a,e,void 0,r)}else{const a=await this.parseAsync(e,r.getText(),n);return this.createLangiumDocument(a,e,r)}}createLangiumDocument(e,r,n,a){let i;if(n)i={parseResult:e,uri:r,state:Z.Parsed,references:[],textDocument:n};else{const o=this.createTextDocumentGetter(r,a);i={parseResult:e,uri:r,state:Z.Parsed,references:[],get textDocument(){return o()}}}return e.value.$document=i,i}async update(e,r){var o,c;const n=(o=e.parseResult.value.$cstNode)==null?void 0:o.root.fullText,a=(c=this.textDocuments)==null?void 0:c.get(e.uri.toString()),i=a?a.getText():await this.fileSystemProvider.readFile(e.uri);if(a)Object.defineProperty(e,"textDocument",{value:a});else{const l=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:l})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,r),e.parseResult.value.$document=e),e.state=Z.Parsed,e}parse(e,r,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(r,n)}parseAsync(e,r,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(r,n)}createTextDocumentGetter(e,r){const n=this.serviceRegistry;let a;return()=>a??(a=rf.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r??""))}},s(ds,"DefaultLangiumDocumentFactory"),ds),ps,$I=(ps=class{constructor(e){this.documentTrie=new ny,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return ue(this.documentTrie.all())}addDocument(e){const r=e.uri.toString();if(this.documentTrie.has(r))throw new Error(`A document with the URI '${r}' is already present.`);this.documentTrie.insert(r,e)}getDocument(e){const r=e.toString();return this.documentTrie.find(r)}getDocuments(e){const r=e.toString();return this.documentTrie.findAll(r)}async getOrCreateDocument(e,r){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,r),this.addDocument(n),n)}createDocument(e,r,n){if(n)return this.langiumDocumentFactory.fromString(r,e,n).then(a=>(this.addDocument(a),a));{const a=this.langiumDocumentFactory.fromString(r,e);return this.addDocument(a),a}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const r=e.toString(),n=this.documentTrie.find(r);return n&&this.documentBuilder().resetToState(n,Z.Changed),n}deleteDocument(e){const r=e.toString(),n=this.documentTrie.find(r);return n&&(n.state=Z.Changed,this.documentTrie.delete(r)),n}deleteDocuments(e){const r=e.toString(),n=this.documentTrie.findAll(r);for(const a of n)a.state=Z.Changed;return this.documentTrie.delete(r),n}},s(ps,"DefaultLangiumDocuments"),ps),hn=Symbol("RefResolving"),hs,AI=(hs=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,r=Ae.CancellationToken.None){var n;if((n=this.profiler)!=null&&n.isActive("linking")){const a=this.profiler.createTask("linking",this.languageId);a.start();try{for(const i of Kt(e.parseResult.value))await Ye(r),No(i).forEach(o=>{const c=`${i.$type}:${o.property}`;a.startSubTask(c);try{this.doLink(o,e)}finally{a.stopSubTask(c)}})}finally{a.stop()}}else for(const a of Kt(e.parseResult.value))await Ye(r),No(a).forEach(i=>this.doLink(i,e))}doLink(e,r){const n=e.reference;if("_ref"in n&&n._ref===void 0){n._ref=hn;try{const a=this.getCandidate(e);if(yn(a))n._ref=a;else{n._nodeDescription=a;const i=this.loadAstNode(a);n._ref=i??this.createLinkingError(e,a)}}catch(a){const i=a.message??String(a);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${i}`}}r.references.push(n)}else if("_items"in n&&n._items===void 0){n._items=hn;try{const a=this.getCandidates(e),i=[];if(yn(a))n._linkingError=a;else for(const o of a){const c=this.loadAstNode(o);c&&i.push({ref:c,$nodeDescription:o})}n._items=i}catch(a){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${a}`},n._items=[]}r.references.push(n)}}unlink(e){for(const r of e.references)"_ref"in r?(r._ref=void 0,delete r._nodeDescription):"_items"in r&&(r._items=void 0,delete r._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){const n=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(a=>`${a.documentUri}#${a.path}`).toArray();return n.length>0?n:this.createLinkingError(e)}buildReference(e,r,n,a){const i=this,o={$refNode:n,$refText:a,_ref:void 0,get ref(){if(Be(this._ref))return this._ref;if(zh(this._nodeDescription)){const c=i.loadAstNode(this._nodeDescription);this._ref=c??i.createLinkingError({reference:o,container:e,property:r},this._nodeDescription)}else if(this._ref===void 0){this._ref=hn;const c=Fa(e).$document,l=i.getLinkedNode({reference:o,container:e,property:r});if(l.error&&c&&c.state<Z.ComputedScopes)return this._ref=void 0;this._ref=l.node??l.error,this._nodeDescription=l.descr,c==null||c.references.push(this)}else this._ref===hn&&i.throwCyclicReferenceError(e,r,a);return Be(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return yn(this._ref)?this._ref:void 0}};return o}buildMultiReference(e,r,n,a){const i=this,o={$refNode:n,$refText:a,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(this._items===void 0){this._items=hn;const c=Fa(e).$document,l=i.getCandidates({reference:o,container:e,property:r}),u=[];if(yn(l))this._linkingError=l;else for(const f of l){const d=i.loadAstNode(f);d&&u.push({ref:d,$nodeDescription:f})}this._items=u,c==null||c.references.push(this)}else this._items===hn&&i.throwCyclicReferenceError(e,r,a);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;if(!(this.items.length>0))return this._linkingError=i.createLinkingError({reference:o,container:e,property:r})}};return o}throwCyclicReferenceError(e,r,n){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${r} (symbol '${n}')`)}getLinkedNode(e){try{const r=this.getCandidate(e);if(yn(r))return{error:r};const n=this.loadAstNode(r);return n?{node:n,descr:r}:{descr:r,error:this.createLinkingError(e,r)}}catch(r){const n=r.message??String(r);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;const r=this.langiumDocuments().getDocument(e.documentUri);if(r)return this.astNodeLocator.getAstNode(r.parseResult.value,e.path)}createLinkingError(e,r){const n=Fa(e.container).$document;n&&n.state<Z.ComputedScopes;const a=this.reflection.getReferenceType(e);return{info:e,message:`Could not resolve reference to ${a} named '${e.reference.$refText}'.`,targetDescription:r}}},s(hs,"DefaultLinker"),hs);function ay(t){return typeof t.name=="string"}s(ay,"isNamed");var ms,EI=(ms=class{getName(e){if(ay(e))return e.name}getNameNode(e){return _f(e.$cstNode,"name")}},s(ms,"DefaultNameProvider"),ms),gs,_I=(gs=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=Kt(e.Grammar).some(r=>qn(r)&&r.isMulti)}findDeclarations(e){if(e){const r=Om(e),n=e.astNode;if(r&&n){const a=n[r.feature];if(at(a)||or(a))return Au(a);if(Array.isArray(a)){for(const i of a)if((at(i)||or(i))&&i.$refNode&&i.$refNode.offset<=e.offset&&i.$refNode.end>=e.end)return Au(i)}}if(n){const a=this.nameProvider.getNameNode(n);if(a&&(a===e||dm(e,a)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(r.head());if(n){for(const a of No(n))if(or(a.reference)&&a.reference.items.some(i=>i.ref===e))return a.reference.items.map(i=>i.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;const r=this.documents.getDocument(e.sourceUri);if(r)return this.nodeLocator.getAstNode(r.parseResult.value,e.sourcePath)}findDeclarationNodes(e){const r=this.findDeclarations(e),n=[];for(const a of r){const i=this.nameProvider.getNameNode(a)??a.$cstNode;i&&n.push(i)}return n}findReferences(e,r){const n=[];r.includeDeclaration&&n.push(...this.getSelfReferences(e));let a=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return r.documentUri&&(a=a.filter(i=>it.equals(i.sourceUri,r.documentUri))),n.push(...a),ue(n)}getSelfReferences(e){const r=this.getSelfNodes(e),n=[];for(const a of r){const i=this.nameProvider.getNameNode(a);if(i){const o=Bt(a),c=this.nodeLocator.getAstNodePath(a);n.push({sourceUri:o.uri,sourcePath:c,targetUri:o.uri,targetPath:c,segment:Oo(i),local:!0})}}return n}},s(gs,"DefaultReferences"),gs),ys,Or=(ys=class{constructor(e){if(this.map=new Map,e)for(const[r,n]of e)this.add(r,n)}get size(){return Jl.sum(ue(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,r){if(r===void 0)return this.map.delete(e);{const n=this.map.get(e);if(n){const a=n.indexOf(r);if(a>=0)return n.length===1?this.map.delete(e):n.splice(a,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){const r=this.map.get(e);return r?ue(r):bo}has(e,r){if(r===void 0)return this.map.has(e);{const n=this.map.get(e);return n?n.indexOf(r)>=0:!1}}add(e,r){return this.map.has(e)?this.map.get(e).push(r):this.map.set(e,[r]),this}addAll(e,r){return this.map.has(e)?this.map.get(e).push(...r):this.map.set(e,Array.from(r)),this}forEach(e){this.map.forEach((r,n)=>r.forEach(a=>e(a,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return ue(this.map.entries()).flatMap(([e,r])=>r.map(n=>[e,n]))}keys(){return ue(this.map.keys())}values(){return ue(this.map.values()).flat()}entriesGroupedByKey(){return ue(this.map.entries())}},s(ys,"MultiMap"),ys),vs,af=(vs=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[r,n]of e)this.set(r,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,r){return this.map.set(e,r),this.inverse.set(r,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const r=this.map.get(e);return r!==void 0?(this.map.delete(e),this.inverse.delete(r),!0):!1}},s(vs,"BiMap"),vs),Ts,CI=(Ts=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,r=Ae.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,r)}async collectExportedSymbolsForNode(e,r,n=gc,a=Ae.CancellationToken.None){const i=[];this.addExportedSymbol(e,i,r);for(const o of n(e))await Ye(a),this.addExportedSymbol(o,i,r);return i}addExportedSymbol(e,r,n){const a=this.nameProvider.getName(e);a&&r.push(this.descriptions.createDescription(e,a,n))}async collectLocalSymbols(e,r=Ae.CancellationToken.None){const n=e.parseResult.value,a=new Or;for(const i of Lr(n))await Ye(r),this.addLocalSymbol(i,e,a);return a}addLocalSymbol(e,r,n){const a=e.$container;if(a){const i=this.nameProvider.getName(e);i&&n.add(a,this.descriptions.createDescription(e,i,r))}}},s(Ts,"DefaultScopeComputation"),Ts),Rs,Th=(Rs=class{constructor(e,r,n){this.elements=e,this.outerScope=r,this.caseInsensitive=(n==null?void 0:n.caseInsensitive)??!1,this.concatOuterScope=(n==null?void 0:n.concatOuterScope)??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(a=>a.name.toLowerCase()===r):this.elements.find(a=>a.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(a=>a.name.toLowerCase()===r):this.elements.filter(a=>a.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}},s(Rs,"StreamScope"),Rs),$s,Gj=($s=class{constructor(e,r,n){this.elements=new Map,this.caseInsensitive=(n==null?void 0:n.caseInsensitive)??!1,this.concatOuterScope=(n==null?void 0:n.concatOuterScope)??!0;for(const a of e){const i=this.caseInsensitive?a.name.toLowerCase():a.name;this.elements.set(i,a)}this.outerScope=r}getElement(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r),a=n?[n]:[];return(this.concatOuterScope||a.length>0)&&this.outerScope?ue(a).concat(this.outerScope.getElements(e)):ue(a)}getAllElements(){let e=ue(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},s($s,"MapScope"),$s),As,SI=(As=class{constructor(e,r,n){this.elements=new Or,this.caseInsensitive=(n==null?void 0:n.caseInsensitive)??!1,this.concatOuterScope=(n==null?void 0:n.concatOuterScope)??!0;for(const a of e){const i=this.caseInsensitive?a.name.toLowerCase():a.name;this.elements.add(i,a)}this.outerScope=r}getElement(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r)[0];if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);return(this.concatOuterScope||n.length===0)&&this.outerScope?ue(n).concat(this.outerScope.getElements(e)):ue(n)}getAllElements(){let e=ue(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},s(As,"MultiMapScope"),As),jj={getElement(){},getElements(){return bo},getAllElements(){return bo}},Es,pd=(Es=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")}},s(Es,"DisposableCache"),Es),_s,iy=(_s=class extends pd{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,r){this.throwIfDisposed(),this.cache.set(e,r)}get(e,r){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(r){const n=r();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},s(_s,"SimpleCache"),_s),Cs,hd=(Cs=class extends pd{constructor(e){super(),this.cache=new Map,this.converter=e??(r=>r)}has(e,r){return this.throwIfDisposed(),this.cacheForContext(e).has(r)}set(e,r,n){this.throwIfDisposed(),this.cacheForContext(e).set(r,n)}get(e,r,n){this.throwIfDisposed();const a=this.cacheForContext(e);if(a.has(r))return a.get(r);if(n){const i=n();return a.set(r,i),i}else return}delete(e,r){return this.throwIfDisposed(),this.cacheForContext(e).delete(r)}clear(e){if(this.throwIfDisposed(),e){const r=this.converter(e);this.cache.delete(r)}else this.cache.clear()}cacheForContext(e){const r=this.converter(e);let n=this.cache.get(r);return n||(n=new Map,this.cache.set(r,n)),n}},s(Cs,"ContextCache"),Cs),Ss,bI=(Ss=class extends hd{constructor(e,r){super(n=>n.toString()),r?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(r,n=>{this.clear(n.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{for(const i of a)this.clear(i)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{const i=n.concat(a);for(const o of i)this.clear(o)}))}},s(Ss,"DocumentCache"),Ss),bs,sy=(bs=class extends iy{constructor(e,r){super(),r?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(r,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{a.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},s(bs,"WorkspaceCache"),bs),ws,wI=(ws=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 sy(e.shared)}getScope(e){const r=[],n=this.reflection.getReferenceType(e),a=Bt(e.container).localSymbols;if(a){let o=e.container;do a.has(o)&&r.push(a.getStream(o).filter(c=>this.reflection.isSubtype(c.type,n))),o=o.$container;while(o)}let i=this.getGlobalScope(n,e);for(let o=r.length-1;o>=0;o--)i=this.createScope(r[o],i);return i}createScope(e,r,n){return new Th(ue(e),r,n)}createScopeForNodes(e,r,n){const a=ue(e).map(i=>{const o=this.nameProvider.getName(i);if(o)return this.descriptions.createDescription(i,o)}).nonNullable();return new Th(a,r,n)}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new SI(this.indexManager.allElements(e)))}},s(ws,"DefaultScopeProvider"),ws);function oy(t){return typeof t.$comment=="string"}s(oy,"isAstNodeWithComment");function Rh(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}s(Rh,"isIntermediateReference");var Is,II=(Is=class{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,r){const n=r??{},a=r==null?void 0:r.replacer,i=s((c,l)=>this.replacer(c,l,n),"defaultReplacer"),o=a?(c,l)=>a(c,l,i):i;try{return this.currentDocument=Bt(e),JSON.stringify(e,o,r==null?void 0:r.space)}finally{this.currentDocument=void 0}}deserialize(e,r){const n=r??{},a=JSON.parse(e);return this.linkNode(a,a,n),a}replacer(e,r,{refText:n,sourceText:a,textRegions:i,comments:o,uriConverter:c}){var l,u,f;if(!this.ignoreProperties.has(e))if(at(r)){const d=r.ref,p=n?r.$refText:void 0;if(d){const m=Bt(d);let g="";this.currentDocument&&this.currentDocument!==m&&(c?g=c(m.uri,d):g=m.uri.toString());const v=this.astNodeLocator.getAstNodePath(d);return{$ref:`${g}#${v}`,$refText:p}}else return{$error:((l=r.error)==null?void 0:l.message)??"Could not resolve reference",$refText:p}}else if(or(r)){const d=n?r.$refText:void 0,p=[];for(const m of r.items){const g=m.ref,v=Bt(m.ref);let E="";this.currentDocument&&this.currentDocument!==v&&(c?E=c(v.uri,g):E=v.uri.toString());const T=this.astNodeLocator.getAstNodePath(g);p.push(`${E}#${T}`)}return{$refs:p,$refText:d}}else if(Be(r)){let d;if(i&&(d=this.addAstNodeRegionWithAssignmentsTo({...r}),(!e||r.$document)&&(d!=null&&d.$textRegion)&&(d.$textRegion.documentURI=(u=this.currentDocument)==null?void 0:u.uri.toString())),a&&!e&&(d??(d={...r}),d.$sourceText=(f=r.$cstNode)==null?void 0:f.text),o){d??(d={...r});const p=this.commentProvider.getComment(r);p&&(d.$comment=p.replace(/\r/g,""))}return d??r}else return r}addAstNodeRegionWithAssignmentsTo(e){const r=s(n=>({offset:n.offset,end:n.end,length:n.length,range:n.range}),"createDocumentSegment");if(e.$cstNode){const n=e.$textRegion=r(e.$cstNode),a=n.assignments={};return Object.keys(e).filter(i=>!i.startsWith("$")).forEach(i=>{const o=km(e.$cstNode,i).map(r);o.length!==0&&(a[i]=o)}),e}}linkNode(e,r,n,a,i,o){for(const[l,u]of Object.entries(e))if(Array.isArray(u))for(let f=0;f<u.length;f++){const d=u[f];Rh(d)?u[f]=this.reviveReference(e,l,r,d,n):Be(d)&&this.linkNode(d,r,n,e,l,f)}else Rh(u)?e[l]=this.reviveReference(e,l,r,u,n):Be(u)&&this.linkNode(u,r,n,e,l);const c=e;c.$container=a,c.$containerProperty=i,c.$containerIndex=o}reviveReference(e,r,n,a,i){let o=a.$refText,c=a.$error,l;if(a.$ref){const u=this.getRefNode(n,a.$ref,i.uriConverter);if(Be(u))return o||(o=this.nameProvider.getName(u)),{$refText:o??"",ref:u};c=u}else if(a.$refs){const u=[];for(const f of a.$refs){const d=this.getRefNode(n,f,i.uriConverter);Be(d)&&u.push({ref:d})}if(u.length===0)l={$refText:o??"",items:u},c??(c="Could not resolve multi-reference");else return{$refText:o??"",items:u}}if(c)return l??(l={$refText:o??"",ref:void 0}),l.error={info:{container:e,property:r,reference:l},message:c},l}getRefNode(e,r,n){try{const a=r.indexOf("#");if(a===0){const l=this.astNodeLocator.getAstNode(e,r.substring(1));return l||"Could not resolve path: "+r}if(a<0){const l=n?n(r):Rt.parse(r),u=this.langiumDocuments.getDocument(l);return u?u.parseResult.value:"Could not find document for URI: "+r}const i=n?n(r.substring(0,a)):Rt.parse(r.substring(0,a)),o=this.langiumDocuments.getDocument(i);if(!o)return"Could not find document for URI: "+r;if(a===r.length-1)return o.parseResult.value;const c=this.astNodeLocator.getAstNode(o.parseResult.value,r.substring(a+1));return c||"Could not resolve URI: "+r}catch(a){return String(a)}}},s(Is,"DefaultJsonSerializer"),Is),Ns,NI=(Ns=class{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e==null?void 0:e.workspace.TextDocuments}register(e){const r=e.LanguageMetaData;for(const n of r.fileExtensions)this.fileExtensionMap.has(n),this.fileExtensionMap.set(n,e);if(r.fileNames)for(const n of r.fileNames)this.fileNameMap.has(n),this.fileNameMap.set(n,e);this.languageIdMap.set(r.languageId,e)}getServices(e){var o,c;if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const r=(c=(o=this.textDocuments)==null?void 0:o.get(e))==null?void 0:c.languageId;if(r!==void 0){const l=this.languageIdMap.get(r);if(l)return l}const n=it.extname(e),a=it.basename(e),i=this.fileNameMap.get(a)??this.fileExtensionMap.get(n);if(!i)throw r?new Error(`The service registry contains no services for the extension '${n}' for language '${r}'.`):new Error(`The service registry contains no services for the extension '${n}'.`);return i}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}},s(Ns,"DefaultServiceRegistry"),Ns);function kn(t){return{code:t}}s(kn,"diagnosticData");var sf;(function(t){t.defaults=["fast","slow","built-in"],t.all=t.defaults})(sf||(sf={}));var ks,kI=(ks=class{constructor(e){this.entries=new Or,this.knownCategories=new Set(sf.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,r=this,n="fast"){if(n==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(n);for(const[a,i]of Object.entries(e)){const o=i;if(Array.isArray(o))for(const c of o){const l={check:this.wrapValidationException(c,r),category:n};this.addEntry(a,l)}else if(typeof o=="function"){const c={check:this.wrapValidationException(o,r),category:n};this.addEntry(a,c)}else Qr()}}wrapValidationException(e,r){return async(n,a,i)=>{await this.handleException(()=>e.call(r,n,a,i),"An error occurred during validation",a,n)}}async handleException(e,r,n,a){try{await e()}catch(i){if(oa(i))throw i;i instanceof Error&&i.stack;const o=i instanceof Error?i.message:String(i);n("error",`${r}: ${o}`,{node:a})}}addEntry(e,r){if(e==="AstNode"){this.entries.add("AstNode",r);return}for(const n of this.reflection.getAllSubTypes(e))this.entries.add(n,r)}getChecks(e,r){let n=ue(this.entries.get(e)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(a=>r.includes(a.category))),n.map(a=>a.check)}registerBeforeDocument(e,r=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",r))}registerAfterDocument(e,r=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",r))}wrapPreparationException(e,r,n){return async(a,i,o,c)=>{await this.handleException(()=>e.call(n,a,i,o,c),r,i,a)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},s(ks,"ValidationRegistry"),ks),PI=Object.freeze({validateNode:!0,validateChildren:!0}),Ps,OI=(Ps=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,r={},n=Ae.CancellationToken.None){const a=e.parseResult,i=[];if(await Ye(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(a,i,r),r.stopAfterLexingErrors&&i.some(o=>{var c;return((c=o.data)==null?void 0:c.code)===Ot.LexingError})||(this.processParsingErrors(a,i,r),r.stopAfterParsingErrors&&i.some(o=>{var c;return((c=o.data)==null?void 0:c.code)===Ot.ParsingError}))||(this.processLinkingErrors(e,i,r),r.stopAfterLinkingErrors&&i.some(o=>{var c;return((c=o.data)==null?void 0:c.code)===Ot.LinkingError}))))return i;try{i.push(...await this.validateAst(a.value,r,n))}catch(o){if(oa(o))throw o}return await Ye(n),i}processLexingErrors(e,r,n){var i;const a=[...e.lexerErrors,...((i=e.lexerReport)==null?void 0:i.diagnostics)??[]];for(const o of a){const c=o.severity??"error",l={severity:Yl(c),range:{start:{line:o.line-1,character:o.column-1},end:{line:o.line-1,character:o.column+o.length-1}},message:o.message,data:cy(c),source:this.getSource()};r.push(l)}}processParsingErrors(e,r,n){for(const a of e.parserErrors){let i;if(isNaN(a.token.startOffset)){if("previousToken"in a){const o=a.previousToken;if(isNaN(o.startOffset)){const c={line:0,character:0};i={start:c,end:c}}else{const c={line:o.endLine-1,character:o.endColumn};i={start:c,end:c}}}}else i=Zl(a.token);if(i){const o={severity:Yl("error"),range:i,message:a.message,data:kn(Ot.ParsingError),source:this.getSource()};r.push(o)}}}processLinkingErrors(e,r,n){var a;for(const i of e.references){const o=i.error;if(o){const c={node:o.info.container,range:(a=i.$refNode)==null?void 0:a.range,property:o.info.property,index:o.info.index,data:{code:Ot.LinkingError,containerType:o.info.container.$type,property:o.info.property,refText:o.info.reference.$refText}};r.push(this.toDiagnostic("error",o.message,c))}}}async validateAst(e,r,n=Ae.CancellationToken.None){const a=[],i=s((o,c,l)=>{a.push(this.toDiagnostic(o,c,l))},"acceptor");return await this.validateAstBefore(e,r,i,n),await this.validateAstNodes(e,r,i,n),await this.validateAstAfter(e,r,i,n),a}async validateAstBefore(e,r,n,a=Ae.CancellationToken.None){const i=this.validationRegistry.checksBefore;for(const o of i)await Ye(a),await o(e,n,r.categories??[],a)}async validateAstNodes(e,r,n,a=Ae.CancellationToken.None){var i;if((i=this.profiler)!=null&&i.isActive("validating")){const o=this.profiler.createTask("validating",this.languageId);o.start();try{const c=Kt(e).iterator();for(const l of c){o.startSubTask(l.$type);const u=this.validateSingleNodeOptions(l,r);if(u.validateNode)try{const f=this.validationRegistry.getChecks(l.$type,r.categories);for(const d of f)await d(l,n,a)}finally{o.stopSubTask(l.$type)}u.validateChildren||c.prune()}}finally{o.stop()}}else{const o=Kt(e).iterator();for(const c of o){await Ye(a);const l=this.validateSingleNodeOptions(c,r);if(l.validateNode){const u=this.validationRegistry.getChecks(c.$type,r.categories);for(const f of u)await f(c,n,a)}l.validateChildren||o.prune()}}}validateSingleNodeOptions(e,r){return PI}async validateAstAfter(e,r,n,a=Ae.CancellationToken.None){const i=this.validationRegistry.checksAfter;for(const o of i)await Ye(a),await o(e,n,r.categories??[],a)}toDiagnostic(e,r,n){return{message:r,range:ly(n),severity:Yl(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},s(Ps,"DefaultDocumentValidator"),Ps);function ly(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=_f(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=Pm(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}s(ly,"getDiagnosticRange");function Yl(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}s(Yl,"toDiagnosticSeverity");function cy(t){switch(t){case"error":return kn(Ot.LexingError);case"warning":return kn(Ot.LexingWarning);case"info":return kn(Ot.LexingInfo);case"hint":return kn(Ot.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}s(cy,"toDiagnosticData");var Ot;(function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(Ot||(Ot={}));var Os,LI=(Os=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,r,n){const a=n??Bt(e);r??(r=this.nameProvider.getName(e));const i=this.astNodeLocator.getAstNodePath(e);if(!r)throw new Error(`Node at path ${i} has no name.`);let o;const c=s(()=>o??(o=Oo(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:r,get nameSegment(){return c()},selectionSegment:Oo(e.$cstNode),type:e.$type,documentUri:a.uri,path:i}}},s(Os,"DefaultAstNodeDescriptionProvider"),Os),Ls,DI=(Ls=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,r=Ae.CancellationToken.None){const n=[],a=e.parseResult.value;for(const i of Kt(a))await Ye(r),No(i).forEach(o=>{o.reference.error||n.push(...this.createInfoDescriptions(o))});return n}createInfoDescriptions(e){const r=e.reference;if(r.error||!r.$refNode)return[];let n=[];at(r)&&r.$nodeDescription?n=[r.$nodeDescription]:or(r)&&(n=r.items.map(l=>l.$nodeDescription).filter(l=>l!==void 0));const a=Bt(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),o=[],c=Oo(r.$refNode);for(const l of n)o.push({sourceUri:a,sourcePath:i,targetUri:l.documentUri,targetPath:l.path,segment:c,local:it.equals(l.documentUri,a)});return o}},s(Ls,"DefaultReferenceDescriptionProvider"),Ls),Ds,MI=(Ds=class{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const r=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return r+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:r}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return r!==void 0?e+this.indexSeparator+r:e}getAstNode(e,r){return r.split(this.segmentSeparator).reduce((a,i)=>{if(!a||i.length===0)return a;const o=i.indexOf(this.indexSeparator);if(o>0){const c=i.substring(0,o),l=parseInt(i.substring(o+1)),u=a[c];return u==null?void 0:u[l]}return a[i]},e)}},s(Ds,"DefaultAstNodeLocator"),Ds),md={};cf(md,Fh(Go()));var Ms,xI=(Ms=class{constructor(e){this._ready=new Pr,this.onConfigurationSectionUpdateEmitter=new md.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var r;this.workspaceConfig=((r=e.capabilities.workspace)==null?void 0:r.configuration)??!1}async initialized(e){if(this.workspaceConfig){if(e.register){const r=this.serviceRegistry.all;e.register({section:r.map(n=>this.toSectionName(n.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const r=this.serviceRegistry.all.map(a=>({section:this.toSectionName(a.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(r);r.forEach((a,i)=>{this.updateSectionConfiguration(a.section,n[i])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!="object"||e.settings===null||Object.entries(e.settings).forEach(([r,n])=>{this.updateSectionConfiguration(r,n),this.onConfigurationSectionUpdateEmitter.fire({section:r,configuration:n})})}updateSectionConfiguration(e,r){this.settings[e]=r}async getConfiguration(e,r){await this.ready;const n=this.toSectionName(e);if(this.settings[n])return this.settings[n][r]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},s(Ms,"DefaultConfigurationProvider"),Ms),Uc=Fh(vk()),Ln;(function(t){function e(r){return{dispose:s(async()=>await r(),"dispose")}}s(e,"create"),t.create=e})(Ln||(Ln={}));var xs,FI=(xs=class{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Or,this.documentPhaseListeners=new Or,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Z.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},n=Ae.CancellationToken.None){var a;for(const i of e){const o=i.uri.toString();if(i.state===Z.Validated){if(typeof r.validation=="boolean"&&r.validation)this.resetToState(i,Z.IndexedReferences);else if(typeof r.validation=="object"){const c=this.findMissingValidationCategories(i,r);c.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:{categories:c}},result:(a=this.buildState.get(o))==null?void 0:a.result}),i.state=Z.IndexedReferences)}}else this.buildState.delete(o)}this.currentState=Z.Changed,await this.emitUpdate(e.map(i=>i.uri),[]),await this.buildDocuments(e,r,n)}async update(e,r,n=Ae.CancellationToken.None){this.currentState=Z.Changed;const a=[];for(const l of r){const u=this.langiumDocuments.deleteDocuments(l);for(const f of u)a.push(f.uri),this.cleanUpDeleted(f)}const i=(await Promise.all(e.map(l=>this.findChangedUris(l)))).flat();for(const l of i){let u=this.langiumDocuments.getDocument(l);u===void 0&&(u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},l),u.state=Z.Changed,this.langiumDocuments.addDocument(u)),this.resetToState(u,Z.Changed)}const o=ue(i).concat(a).map(l=>l.toString()).toSet();this.langiumDocuments.all.filter(l=>!o.has(l.uri.toString())&&this.shouldRelink(l,o)).forEach(l=>this.resetToState(l,Z.ComputedScopes)),await this.emitUpdate(i,a),await Ye(n);const c=this.sortDocuments(this.langiumDocuments.all.filter(l=>{var u;return l.state<Z.Validated||!((u=this.buildState.get(l.uri.toString()))!=null&&u.completed)||this.resultsAreIncomplete(l,this.updateBuildOptions)}).toArray());await this.buildDocuments(c,this.updateBuildOptions,n)}resultsAreIncomplete(e,r){return this.findMissingValidationCategories(e,r).length>=1}findMissingValidationCategories(e,r){var c,l;const n=this.buildState.get(e.uri.toString()),a=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=(c=n==null?void 0:n.result)!=null&&c.validationChecks?new Set((l=n==null?void 0:n.result)==null?void 0:l.validationChecks):n!=null&&n.completed?a:new Set,o=r===void 0||r.validation===!0?a:typeof r.validation=="object"?r.validation.categories??a:[];return ue(o).filter(u=>!i.has(u)).toArray()}async findChangedUris(e){var n;if(this.langiumDocuments.getDocument(e)??((n=this.textDocuments)==null?void 0:n.get(e)))return[e];try{const a=await this.fileSystemProvider.stat(e);if(a.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(a))return[e]}catch{}return[]}async emitUpdate(e,r){await Promise.all(this.updateListeners.map(n=>n(e,r)))}sortDocuments(e){let r=0,n=e.length-1;for(;r<n;){for(;r<e.length&&this.hasTextDocument(e[r]);)r++;for(;n>=0&&!this.hasTextDocument(e[n]);)n--;r<n&&([e[r],e[n]]=[e[n],e[r]])}return e}hasTextDocument(e){var r;return!!((r=this.textDocuments)!=null&&r.get(e.uri))}shouldRelink(e,r){return e.references.some(n=>n.error!==void 0)?!0:this.indexManager.isAffected(e,r)}onUpdate(e){return this.updateListeners.push(e),Ln.create(()=>{const r=this.updateListeners.indexOf(e);r>=0&&this.updateListeners.splice(r,1)})}resetToState(e,r){switch(r){case Z.Changed:case Z.Parsed:this.indexManager.removeContent(e.uri);case Z.IndexedContent:e.localSymbols=void 0;case Z.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Z.Linked:this.indexManager.removeReferences(e.uri);case Z.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Z.Validated:}e.state>r&&(e.state=r)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Z.Changed}async buildDocuments(e,r,n){this.prepareBuild(e,r),await this.runCancelable(e,Z.Parsed,n,o=>this.langiumDocumentFactory.update(o,n)),await this.runCancelable(e,Z.IndexedContent,n,o=>this.indexManager.updateContent(o,n)),await this.runCancelable(e,Z.ComputedScopes,n,async o=>{const c=this.serviceRegistry.getServices(o.uri).references.ScopeComputation;o.localSymbols=await c.collectLocalSymbols(o,n)});const a=e.filter(o=>this.shouldLink(o));await this.runCancelable(a,Z.Linked,n,o=>this.serviceRegistry.getServices(o.uri).references.Linker.link(o,n)),await this.runCancelable(a,Z.IndexedReferences,n,o=>this.indexManager.updateReferences(o,n));const i=e.filter(o=>this.shouldValidate(o)?!0:(this.markAsCompleted(o),!1));await this.runCancelable(i,Z.Validated,n,async o=>{await this.validate(o,n),this.markAsCompleted(o)})}markAsCompleted(e){const r=this.buildState.get(e.uri.toString());r&&(r.completed=!0)}prepareBuild(e,r){for(const n of e){const a=n.uri.toString(),i=this.buildState.get(a);(!i||i.completed)&&this.buildState.set(a,{completed:!1,options:r,result:i==null?void 0:i.result})}}async runCancelable(e,r,n,a){for(const o of e)o.state<r&&(await Ye(n),await a(o),o.state=r,await this.notifyDocumentPhase(o,r,n));const i=e.filter(o=>o.state===r);await this.notifyBuildPhase(i,r,n),this.currentState=r}onBuildPhase(e,r){return this.buildPhaseListeners.add(e,r),Ln.create(()=>{this.buildPhaseListeners.delete(e,r)})}onDocumentPhase(e,r){return this.documentPhaseListeners.add(e,r),Ln.create(()=>{this.documentPhaseListeners.delete(e,r)})}waitUntil(e,r,n){let a;return r&&"path"in r?a=r:n=r,n??(n=Ae.CancellationToken.None),a?this.awaitDocumentState(e,a,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,r,n){const a=this.langiumDocuments.getDocument(r);if(a){if(a.state>=e)return Promise.resolve(r);if(n.isCancellationRequested)return Promise.reject(sr);if(this.currentState>=e&&e>a.state)return Promise.reject(new Uc.ResponseError(Uc.LSPErrorCodes.RequestFailed,`Document state of ${r.toString()} is ${Z[a.state]}, requiring ${Z[e]}, but workspace state is already ${Z[this.currentState]}. Returning undefined.`))}else return Promise.reject(new Uc.ResponseError(Uc.LSPErrorCodes.ServerCancelled,`No document found for URI: ${r.toString()}`));return new Promise((i,o)=>{const c=this.onDocumentPhase(e,u=>{it.equals(u.uri,r)&&(c.dispose(),l.dispose(),i(u.uri))}),l=n.onCancellationRequested(()=>{c.dispose(),l.dispose(),o(sr)})})}awaitBuilderState(e,r){return this.currentState>=e?Promise.resolve():r.isCancellationRequested?Promise.reject(sr):new Promise((n,a)=>{const i=this.onBuildPhase(e,()=>{i.dispose(),o.dispose(),n()}),o=r.onCancellationRequested(()=>{i.dispose(),o.dispose(),a(sr)})})}async notifyDocumentPhase(e,r,n){const i=this.documentPhaseListeners.get(r).slice();for(const o of i)try{await Ye(n),await o(e,n)}catch(c){if(!oa(c))throw c}}async notifyBuildPhase(e,r,n){if(e.length===0)return;const i=this.buildPhaseListeners.get(r).slice();for(const o of i)await Ye(n),await o(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,r){const n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,a=this.getBuildOptions(e),i=typeof a.validation=="object"?{...a.validation}:{};i.categories=this.findMissingValidationCategories(e,a);const o=await n.validateDocument(e,i,r);e.diagnostics?e.diagnostics.push(...o):e.diagnostics=o;const c=this.buildState.get(e.uri.toString());c&&(c.result??(c.result={}),c.result.validationChecks?c.result.validationChecks=ue(c.result.validationChecks).concat(i.categories).distinct().toArray():c.result.validationChecks=[...i.categories])}getBuildOptions(e){var r;return((r=this.buildState.get(e.uri.toString()))==null?void 0:r.options)??{}}},s(xs,"DefaultDocumentBuilder"),xs),Fs,GI=(Fs=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new hd,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,r){const n=Bt(e).uri,a=[];return this.referenceIndex.forEach(i=>{i.forEach(o=>{it.equals(o.targetUri,n)&&o.targetPath===r&&a.push(o)})}),ue(a)}allElements(e,r){let n=ue(this.symbolIndex.keys());return r&&(n=n.filter(a=>!r||r.has(a))),n.map(a=>this.getFileDescriptions(a,e)).flat()}getFileDescriptions(e,r){return r?this.symbolByTypeIndex.get(e,r,()=>(this.symbolIndex.get(e)??[]).filter(i=>this.astReflection.isSubtype(i.type,r))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const r=e.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r)}removeReferences(e){const r=e.toString();this.referenceIndex.delete(r)}async updateContent(e,r=Ae.CancellationToken.None){const a=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,r),i=e.uri.toString();this.symbolIndex.set(i,a),this.symbolByTypeIndex.clear(i)}async updateReferences(e,r=Ae.CancellationToken.None){const a=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,r);this.referenceIndex.set(e.uri.toString(),a)}isAffected(e,r){const n=this.referenceIndex.get(e.uri.toString());return n?n.some(a=>!a.local&&r.has(a.targetUri.toString())):!1}},s(Fs,"DefaultIndexManager"),Fs),Gs,jI=(Gs=class{constructor(e){this.initialBuildOptions={},this._ready=new Pr,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(r=>this.initializeWorkspace(this.folders??[],r))}async initializeWorkspace(e,r=Ae.CancellationToken.None){const n=await this.performStartup(e);await Ye(r),await this.documentBuilder.build(n,this.initialBuildOptions,r)}async performStartup(e){const r=[],n=s(o=>{r.push(o),this.langiumDocuments.hasDocument(o.uri)||this.langiumDocuments.addDocument(o)},"collector");await this.loadAdditionalDocuments(e,n);const a=[];await Promise.all(e.map(o=>this.getRootFolder(o)).map(async o=>this.traverseFolder(o,a)));const i=ue(a).distinct(o=>o.toString()).filter(o=>!this.langiumDocuments.hasDocument(o));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),r}async loadWorkspaceDocuments(e,r){await Promise.all(e.map(async n=>{const a=await this.langiumDocuments.getOrCreateDocument(n);r(a)}))}loadAdditionalDocuments(e,r){return Promise.resolve()}getRootFolder(e){return Rt.parse(e.uri)}async traverseFolder(e,r){try{const n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async a=>{this.shouldIncludeEntry(a)&&(a.isDirectory?await this.traverseFolder(a.uri,r):a.isFile&&r.push(a.uri))}))}catch{}}async searchFolder(e){const r=[];return await this.traverseFolder(e,r),r}shouldIncludeEntry(e){const r=it.basename(e.uri);return r.startsWith(".")?!1:e.isDirectory?r!=="node_modules"&&r!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},s(Gs,"DefaultWorkspaceManager"),Gs),js,UI=(js=class{buildUnexpectedCharactersMessage(e,r,n,a,i){return eh.buildUnexpectedCharactersMessage(e,r,n,a,i)}buildUnableToPopLexerModeMessage(e){return eh.buildUnableToPopLexerModeMessage(e)}},s(js,"DefaultLexerErrorMessageProvider"),js),uy={mode:"full"},Us,fy=(Us=class{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const r=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);const n=of(r)?Object.values(r):r,a=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new st(n,{positionTracking:"full",skipValidations:a,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,r=uy){var a,i;const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:(i=(a=this.tokenBuilder).flushLexingReport)==null?void 0:i.call(a,e)}}toTokenTypeDictionary(e){if(of(e))return e;const r=yd(e)?Object.values(e.modes).flat():e,n={};return r.forEach(a=>n[a.name]=a),n}},s(Us,"DefaultLexer"),Us);function gd(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}s(gd,"isTokenTypeArray");function yd(t){return t&&"modes"in t&&"defaultMode"in t}s(yd,"isIMultiModeLexerDefinition");function of(t){return!gd(t)&&!yd(t)}s(of,"isTokenTypeDictionary");hc();function dy(t,e,r){let n,a;typeof t=="string"?(a=e,n=r):(a=t.range.start,n=e),a||(a=ie.create(0,0));const i=hy(t),o=vd(n),c=zI({lines:i,position:a,options:o});return qI({index:0,tokens:c,position:a})}s(dy,"parseJSDoc");function py(t,e){const r=vd(e),n=hy(t);if(n.length===0)return!1;const a=n[0],i=n[n.length-1],o=r.start,c=r.end;return!!(o!=null&&o.exec(a))&&!!(c!=null&&c.exec(i))}s(py,"isJSDoc");function hy(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(qT)}s(hy,"getLines");var Kv=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Uj=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function zI(t){var a,i,o;const e=[];let r=t.position.line,n=t.position.character;for(let c=0;c<t.lines.length;c++){const l=c===0,u=c===t.lines.length-1;let f=t.lines[c],d=0;if(l&&t.options.start){const m=(a=t.options.start)==null?void 0:a.exec(f);m&&(d=m.index+m[0].length)}else{const m=(i=t.options.line)==null?void 0:i.exec(f);m&&(d=m.index+m[0].length)}if(u){const m=(o=t.options.end)==null?void 0:o.exec(f);m&&(f=f.substring(0,m.index))}if(f=f.substring(0,KI(f)),lf(f,d)>=f.length){if(e.length>0){const m=ie.create(r,n);e.push({type:"break",content:"",range:ee.create(m,m)})}}else{Kv.lastIndex=d;const m=Kv.exec(f);if(m){const g=m[0],v=m[1],E=ie.create(r,n+d),T=ie.create(r,n+d+g.length);e.push({type:"tag",content:v,range:ee.create(E,T)}),d+=g.length,d=lf(f,d)}if(d<f.length){const g=f.substring(d),v=Array.from(g.matchAll(Uj));e.push(...BI(v,g,r,n+d))}}r++,n=0}return e.length>0&&e[e.length-1].type==="break"?e.slice(0,-1):e}s(zI,"tokenize");function BI(t,e,r,n){const a=[];if(t.length===0){const i=ie.create(r,n),o=ie.create(r,n+e.length);a.push({type:"text",content:e,range:ee.create(i,o)})}else{let i=0;for(const c of t){const l=c.index,u=e.substring(i,l);u.length>0&&a.push({type:"text",content:e.substring(i,l),range:ee.create(ie.create(r,i+n),ie.create(r,l+n))});let f=u.length+1;const d=c[1];if(a.push({type:"inline-tag",content:d,range:ee.create(ie.create(r,i+f+n),ie.create(r,i+f+d.length+n))}),f+=d.length,c.length===4){f+=c[2].length;const p=c[3];a.push({type:"text",content:p,range:ee.create(ie.create(r,i+f+n),ie.create(r,i+f+p.length+n))})}else a.push({type:"text",content:"",range:ee.create(ie.create(r,i+f+n),ie.create(r,i+f+n))});i=l+c[0].length}const o=e.substring(i);o.length>0&&a.push({type:"text",content:o,range:ee.create(ie.create(r,i+n),ie.create(r,i+n+o.length))})}return a}s(BI,"buildInlineTokens");var zj=/\S/,Bj=/\s*$/;function lf(t,e){const r=t.substring(e).match(zj);return r?e+r.index:t.length}s(lf,"skipWhitespace");function KI(t){const e=t.match(Bj);if(e&&typeof e.index=="number")return e.index}s(KI,"lastCharacter");function qI(t){var i,o;const e=ie.create(t.position.line,t.position.character);if(t.tokens.length===0)return new qv([],ee.create(e,e));const r=[];for(;t.index<t.tokens.length;){const c=WI(t,r[r.length-1]);c&&r.push(c)}const n=((i=r[0])==null?void 0:i.range.start)??e,a=((o=r[r.length-1])==null?void 0:o.range.end)??e;return new qv(r,ee.create(n,a))}s(qI,"parseJSDocComment");function WI(t,e){const r=t.tokens[t.index];if(r.type==="tag")return gy(t,!1);if(r.type==="text"||r.type==="inline-tag")return my(t);VI(r,e),t.index++}s(WI,"parseJSDocElement");function VI(t,e){if(e){const r=new JI("",t.range);"inlines"in e?e.inlines.push(r):e.content.inlines.push(r)}}s(VI,"appendEmptyLine");function my(t){let e=t.tokens[t.index];const r=e;let n=e;const a=[];for(;e&&e.type!=="break"&&e.type!=="tag";)a.push(HI(t)),n=e,e=t.tokens[t.index];return new $h(a,ee.create(r.range.start,n.range.end))}s(my,"parseJSDocText");function HI(t){return t.tokens[t.index].type==="inline-tag"?gy(t,!0):yy(t)}s(HI,"parseJSDocInline");function gy(t,e){const r=t.tokens[t.index++],n=r.content.substring(1),a=t.tokens[t.index];if((a==null?void 0:a.type)==="text")if(e){const i=yy(t);return new wd(n,new $h([i],i.range),e,ee.create(r.range.start,i.range.end))}else{const i=my(t);return new wd(n,i,e,ee.create(r.range.start,i.range.end))}else{const i=r.range;return new wd(n,new $h([],i),e,i)}}s(gy,"parseJSDocTag");function yy(t){const e=t.tokens[t.index++];return new JI(e.content,e.range)}s(yy,"parseJSDocLine");function vd(t){if(!t)return vd({start:"/**",end:"*/",line:"*"});const{start:e,end:r,line:n}=t;return{start:Tu(e,!0),end:Tu(r,!1),line:Tu(n,!0)}}s(vd,"normalizeOptions");function Tu(t,e){if(typeof t=="string"||typeof t=="object"){const r=typeof t=="string"?Uo(t):t.source;return e?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`)}else return t}s(Tu,"normalizeOption");var zs,qv=(zs=class{constructor(e,r){this.elements=e,this.range=r}getTag(e){return this.getAllTags().find(r=>r.name===e)}getTags(e){return this.getAllTags().filter(r=>r.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const r of this.elements)if(e.length===0)e=r.toString();else{const n=r.toString();e+=Ah(e)+n}return e.trim()}toMarkdown(e){let r="";for(const n of this.elements)if(r.length===0)r=n.toMarkdown(e);else{const a=n.toMarkdown(e);r+=Ah(r)+a}return r.trim()}},s(zs,"JSDocCommentImpl"),zs),Bs,wd=(Bs=class{constructor(e,r,n,a){this.name=e,this.content=r,this.inline=n,this.range=a}toString(){let e=`@${this.name}`;const r=this.content.toString();return this.content.inlines.length===1?e=`${e} ${r}`:this.content.inlines.length>1&&(e=`${e}
142
+ ${r}`),this.inline?`{${e}}`:e}toMarkdown(e){var r;return((r=e==null?void 0:e.renderTag)==null?void 0:r.call(e,this))??this.toMarkdownDefault(e)}toMarkdownDefault(e){const r=this.content.toMarkdown(e);if(this.inline){const i=YI(this.name,r,e??{});if(typeof i=="string")return i}let n="";(e==null?void 0:e.tag)==="italic"||(e==null?void 0:e.tag)===void 0?n="*":(e==null?void 0:e.tag)==="bold"?n="**":(e==null?void 0:e.tag)==="bold-italic"&&(n="***");let a=`${n}@${this.name}${n}`;return this.content.inlines.length===1?a=`${a} — ${r}`:this.content.inlines.length>1&&(a=`${a}
143
+ ${r}`),this.inline?`{${a}}`:a}},s(Bs,"JSDocTagImpl"),Bs);function YI(t,e,r){var n;if(t==="linkplain"||t==="linkcode"||t==="link"){const a=e.indexOf(" ");let i=e;if(a>0){const c=lf(e,a);i=e.substring(c),e=e.substring(0,a)}return(t==="linkcode"||t==="link"&&r.link==="code")&&(i=`\`${i}\``),((n=r.renderLink)==null?void 0:n.call(r,e,i))??XI(e,i)}}s(YI,"renderInlineTag");function XI(t,e){try{return Rt.parse(t,!0),`[${e}](${t})`}catch{return t}}s(XI,"renderLinkDefault");var Ks,$h=(Ks=class{constructor(e,r){this.inlines=e,this.range=r}toString(){let e="";for(let r=0;r<this.inlines.length;r++){const n=this.inlines[r],a=this.inlines[r+1];e+=n.toString(),a&&a.range.start.line>n.range.start.line&&(e+=`
144
+ `)}return e}toMarkdown(e){let r="";for(let n=0;n<this.inlines.length;n++){const a=this.inlines[n],i=this.inlines[n+1];r+=a.toMarkdown(e),i&&i.range.start.line>a.range.start.line&&(r+=`
145
+ `)}return r}},s(Ks,"JSDocTextImpl"),Ks),qs,JI=(qs=class{constructor(e,r){this.text=e,this.range=r}toString(){return this.text}toMarkdown(){return this.text}},s(qs,"JSDocLineImpl"),qs);function Ah(t){return t.endsWith(`
146
+ `)?`
147
+ `:`
148
+
149
+ `}s(Ah,"fillNewlines");var Ws,ZI=(Ws=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const r=this.commentProvider.getComment(e);if(r&&py(r))return dy(r).toMarkdown({renderLink:s((a,i)=>this.documentationLinkRenderer(e,a,i),"renderLink"),renderTag:s(a=>this.documentationTagRenderer(e,a),"renderTag")})}documentationLinkRenderer(e,r,n){const a=this.findNameInLocalSymbols(e,r)??this.findNameInGlobalScope(e,r);if(a&&a.nameSegment){const i=a.nameSegment.range.start.line+1,o=a.nameSegment.range.start.character+1,c=a.documentUri.with({fragment:`L${i},${o}`});return`[${n}](${c.toString()})`}else return}documentationTagRenderer(e,r){}findNameInLocalSymbols(e,r){const a=Bt(e).localSymbols;if(!a)return;let i=e;do{const c=a.getStream(i).find(l=>l.name===r);if(c)return c;i=i.$container}while(i)}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(a=>a.name===r)}},s(Ws,"JSDocDocumentationProvider"),Ws),Vs,QI=(Vs=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var r;return oy(e)?e.$comment:(r=gm(e.$cstNode,this.grammarConfig().multilineCommentRules))==null?void 0:r.text}},s(Vs,"DefaultCommentProvider"),Vs),Hs,eN=(Hs=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,r){return Promise.resolve(this.syncParser.parse(e))}},s(Hs,"DefaultAsyncParser"),Hs),Ys,Kj=(Ys=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 r=this.queue.shift();r&&(e.lock(),r.resolve(e))}}),this.workerPool.push(e)}}async parse(e,r){const n=await this.acquireParserWorker(r),a=new Pr;let i;const o=r.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(c=>{const l=this.hydrator.hydrate(c);a.resolve(l)}).catch(c=>{a.reject(c)}).finally(()=>{o.dispose(),clearTimeout(i)}),a.promise}terminateWorker(e){e.terminate();const r=this.workerPool.indexOf(e);r>=0&&this.workerPool.splice(r,1)}async acquireParserWorker(e){this.initializeWorkers();for(const n of this.workerPool)if(n.ready)return n.lock(),n;const r=new Pr;return e.onCancellationRequested(()=>{const n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject(sr)}),this.queue.push(r),r.promise}},s(Ys,"AbstractThreadedAsyncParser"),Ys),Xs,qj=(Xs=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,r,n,a){this.onReadyEmitter=new md.Emitter,this.deferred=new Pr,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=a,r(i=>{const o=i;this.deferred.resolve(o),this.unlock()}),n(i=>{this.deferred.reject(i),this.unlock()})}terminate(){this.deferred.reject(sr),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 Pr,this.sendMessage(e),this.deferred.promise}},s(Xs,"ParserWorker"),Xs),Js,tN=(Js=class{constructor(){this.previousTokenSource=new Ae.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const r=dd();return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,r,n=Ae.CancellationToken.None){const a=new Pr,i={action:r,deferred:a,cancellationToken:n};return e.push(i),this.performNextOperation(),a.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)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:r,deferred:n,cancellationToken:a})=>{try{const i=await Promise.resolve().then(()=>r(a));n.resolve(i)}catch(i){oa(i)?n.resolve(void 0):n.reject(i)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},s(Js,"DefaultWorkspaceLock"),Js),Zs,rN=(Zs=class{constructor(e){this.grammarElementIdMap=new af,this.tokenTypeIdMap=new af,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(r=>({...r,message:r.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const r=new Map,n=new Map;for(const a of Kt(e))r.set(a,{});if(e.$cstNode)for(const a of Po(e.$cstNode))n.set(a,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,r){const n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,r));for(const[a,i]of Object.entries(e))if(!a.startsWith("$"))if(Array.isArray(i)){const o=[];n[a]=o;for(const c of i)Be(c)?o.push(this.dehydrateAstNode(c,r)):at(c)?o.push(this.dehydrateReference(c,r)):o.push(c)}else Be(i)?n[a]=this.dehydrateAstNode(i,r):at(i)?n[a]=this.dehydrateReference(i,r):i!==void 0&&(n[a]=i);return n}dehydrateReference(e,r){const n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=r.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,r){const n=r.cstNodes.get(e);return df(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=r.astNodes.get(e.astNode),_r(e)?n.content=e.content.map(a=>this.dehydrateCstNode(a,r)):zn(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){const r=e.value,n=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(r,n)}}createHydrationContext(e){const r=new Map,n=new Map;for(const i of Kt(e))r.set(i,{});let a;if(e.$cstNode)for(const i of Po(e.$cstNode)){let o;"fullText"in i?(o=new qg(i.fullText),a=o):"content"in i?o=new od:"tokenType"in i&&(o=this.hydrateCstLeafNode(i)),o&&(n.set(i,o),o.root=a)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,r){const n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=r.cstNodes.get(e.$cstNode));for(const[a,i]of Object.entries(e))if(!a.startsWith("$"))if(Array.isArray(i)){const o=[];n[a]=o;for(const c of i)Be(c)?o.push(this.setParent(this.hydrateAstNode(c,r),n)):at(c)?o.push(this.hydrateReference(c,n,a,r)):o.push(c)}else Be(i)?n[a]=this.setParent(this.hydrateAstNode(i,r),n):at(i)?n[a]=this.hydrateReference(i,n,a,r):i!==void 0&&(n[a]=i);return n}setParent(e,r){return e.$container=r,e}hydrateReference(e,r,n,a){return this.linker.buildReference(r,n,a.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,r,n=0){const a=r.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(a.grammarSource=this.getGrammarElement(e.grammarSource)),a.astNode=r.astNodes.get(e.astNode),_r(a))for(const i of e.content){const o=this.hydrateCstNode(i,r,n++);a.content.push(o)}return a}hydrateCstLeafNode(e){const r=this.getTokenType(e.tokenType),n=e.offset,a=e.length,i=e.startLine,o=e.startColumn,c=e.endLine,l=e.endColumn,u=e.hidden;return new Qu(n,a,{start:{line:i,character:o},end:{line:c,character:l}},r,u)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const r of Kt(this.grammar))pf(r)&&this.grammarElementIdMap.set(r,e++)}},s(Zs,"DefaultHydrator"),Zs);function St(t){return{documentation:{CommentProvider:s(e=>new QI(e),"CommentProvider"),DocumentationProvider:s(e=>new ZI(e),"DocumentationProvider")},parser:{AsyncParser:s(e=>new eN(e),"AsyncParser"),GrammarConfig:s(e=>jm(e),"GrammarConfig"),LangiumParser:s(e=>Jg(e),"LangiumParser"),CompletionParser:s(e=>Xg(e),"CompletionParser"),ValueConverter:s(()=>new Qg,"ValueConverter"),TokenBuilder:s(()=>new ud,"TokenBuilder"),Lexer:s(e=>new fy(e),"Lexer"),ParserErrorMessageProvider:s(()=>new Vg,"ParserErrorMessageProvider"),LexerErrorMessageProvider:s(()=>new UI,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:s(()=>new MI,"AstNodeLocator"),AstNodeDescriptionProvider:s(e=>new LI(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:s(e=>new DI(e),"ReferenceDescriptionProvider")},references:{Linker:s(e=>new AI(e),"Linker"),NameProvider:s(()=>new EI,"NameProvider"),ScopeProvider:s(e=>new wI(e),"ScopeProvider"),ScopeComputation:s(e=>new CI(e),"ScopeComputation"),References:s(e=>new _I(e),"References")},serializer:{Hydrator:s(e=>new rN(e),"Hydrator"),JsonSerializer:s(e=>new II(e),"JsonSerializer")},validation:{DocumentValidator:s(e=>new OI(e),"DocumentValidator"),ValidationRegistry:s(e=>new kI(e),"ValidationRegistry")},shared:s(()=>t.shared,"shared")}}s(St,"createDefaultCoreModule");function bt(t){return{ServiceRegistry:s(e=>new NI(e),"ServiceRegistry"),workspace:{LangiumDocuments:s(e=>new $I(e),"LangiumDocuments"),LangiumDocumentFactory:s(e=>new RI(e),"LangiumDocumentFactory"),DocumentBuilder:s(e=>new FI(e),"DocumentBuilder"),IndexManager:s(e=>new GI(e),"IndexManager"),WorkspaceManager:s(e=>new jI(e),"WorkspaceManager"),FileSystemProvider:s(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:s(()=>new tN,"WorkspaceLock"),ConfigurationProvider:s(e=>new xI(e),"ConfigurationProvider")},profilers:{}}}s(bt,"createDefaultSharedCoreModule");var Eh;(function(t){t.merge=(e,r)=>Fo(Fo({},e),r)})(Eh||(Eh={}));function Pe(t,e,r,n,a,i,o,c,l){const u=[t,e,r,n,a,i,o,c,l].reduce(Fo,{});return Ty(u)}s(Pe,"inject");var nN=Symbol("isProxy");function vy(t){if(t&&t[nN])for(const e of Object.values(t))vy(e);return t}s(vy,"eagerLoad");function Ty(t,e){const r=new Proxy({},{deleteProperty:s(()=>!1,"deleteProperty"),set:s(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:s((n,a)=>a===nN?!0:_h(n,a,t,e||r),"get"),getOwnPropertyDescriptor:s((n,a)=>(_h(n,a,t,e||r),Object.getOwnPropertyDescriptor(n,a)),"getOwnPropertyDescriptor"),has:s((n,a)=>a in t,"has"),ownKeys:s(()=>[...Object.getOwnPropertyNames(t)],"ownKeys")});return r}s(Ty,"_inject");var Wv=Symbol();function _h(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+t[e]);if(t[e]===Wv)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in r){const a=r[e];t[e]=Wv;try{t[e]=typeof a=="function"?a(n):Ty(a,n)}catch(i){throw t[e]=i instanceof Error?i:void 0,i}return t[e]}else return}s(_h,"_resolve");function Fo(t,e){if(e){for(const[r,n]of Object.entries(e))if(n!=null)if(typeof n=="object"){const a=t[r];typeof a=="object"&&a!==null?t[r]=Fo(a,n):t[r]=Fo({},n)}else t[r]=n}return t}s(Fo,"_merge");var Ch={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},Pn;(function(t){t.REGULAR="indentation-sensitive",t.IGNORE_INDENTATION="ignore-indentation"})(Pn||(Pn={}));var Qs,aN=(Qs=class extends ud{constructor(e=Ch){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...Ch,...e},this.indentTokenType=ja({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=ja({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,r){const n=super.buildTokens(e,r);if(!gd(n))throw new Error("Invalid tokens built by default builder");const{indentTokenName:a,dedentTokenName:i,whitespaceTokenName:o,ignoreIndentationDelimiters:c}=this.options;let l,u,f;const d=[];for(const p of n){for(const[m,g]of c)p.name===m?p.PUSH_MODE=Pn.IGNORE_INDENTATION:p.name===g&&(p.POP_MODE=!0);p.name===i?l=p:p.name===a?u=p:p.name===o?f=p:d.push(p)}if(!l||!u||!f)throw new Error("Some indentation/whitespace tokens not found!");return c.length>0?{modes:{[Pn.REGULAR]:[l,u,...d,f],[Pn.IGNORE_INDENTATION]:[...d,f]},defaultMode:Pn.REGULAR}:[l,u,f,...d]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,r){return r===0||`\r
150
+ `.includes(e[r-1])}matchWhitespace(e,r,n,a){this.whitespaceRegExp.lastIndex=r;const i=this.whitespaceRegExp.exec(e);return{currIndentLevel:(i==null?void 0:i[0].length)??0,prevIndentLevel:this.indentationStack.at(-1),match:i}}createIndentationTokenInstance(e,r,n,a){const i=this.getLineNumber(r,a);return Nc(e,n,a,a+n.length,i,i,1,n.length)}getLineNumber(e,r){return e.substring(0,r).split(/\r\n|\r|\n/).length}indentMatcher(e,r,n,a){if(!this.isStartOfLine(e,r))return null;const{currIndentLevel:i,prevIndentLevel:o,match:c}=this.matchWhitespace(e,r,n,a);return i<=o?null:(this.indentationStack.push(i),c)}dedentMatcher(e,r,n,a){var d,p;if(!this.isStartOfLine(e,r))return null;const{currIndentLevel:i,prevIndentLevel:o,match:c}=this.matchWhitespace(e,r,n,a);if(i>=o)return null;const l=this.indentationStack.lastIndexOf(i);if(l===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${i} at offset: ${r}. Current indentation stack: ${this.indentationStack}`,offset:r,length:((d=c==null?void 0:c[0])==null?void 0:d.length)??0,line:this.getLineNumber(e,r),column:1}),null;const u=this.indentationStack.length-l-1,f=((p=e.substring(0,r).match(/[\r\n]+$/))==null?void 0:p[0].length)??1;for(let m=0;m<u;m++){const g=this.createIndentationTokenInstance(this.dedentTokenType,e,"",r-(f-1));n.push(g),this.indentationStack.pop()}return null}buildTerminalToken(e){const r=super.buildTerminalToken(e),{indentTokenName:n,dedentTokenName:a,whitespaceTokenName:i}=this.options;return r.name===n?this.indentTokenType:r.name===a?this.dedentTokenType:r.name===i?ja({name:i,pattern:this.whitespaceRegExp,group:st.SKIPPED}):r}flushRemainingDedents(e){const r=[];for(;this.indentationStack.length>1;)r.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],r}},s(Qs,"IndentationAwareTokenBuilder"),Qs),eo,Wj=(eo=class extends fy{constructor(e){if(super(e),e.parser.TokenBuilder instanceof aN)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,r=uy){const n=super.tokenize(e),a=n.report;(r==null?void 0:r.mode)==="full"&&n.tokens.push(...a.remainingDedents),a.remainingDedents=[];const{indentTokenType:i,dedentTokenType:o}=this.indentationTokenBuilder,c=i.tokenTypeIdx,l=o.tokenTypeIdx,u=[],f=n.tokens.length-1;for(let d=0;d<f;d++){const p=n.tokens[d],m=n.tokens[d+1];if(p.tokenTypeIdx===c&&m.tokenTypeIdx===l){d++;continue}u.push(p)}return f>=0&&u.push(n.tokens[f]),n.tokens=u,n}},s(eo,"IndentationAwareLexer"),eo),Ry={};Zr(Ry,{AstUtils:()=>Kh,BiMap:()=>af,Cancellation:()=>Ae,ContextCache:()=>hd,CstUtils:()=>Uh,DONE_RESULT:()=>nt,Deferred:()=>Pr,Disposable:()=>Ln,DisposableCache:()=>pd,DocumentCache:()=>bI,EMPTY_STREAM:()=>bo,ErrorWithLocation:()=>Rf,GrammarUtils:()=>Rm,MultiMap:()=>Or,OperationCancelled:()=>sr,Reduction:()=>Jl,RegExpUtils:()=>Am,SimpleCache:()=>iy,StreamImpl:()=>ir,TreeStreamImpl:()=>wo,URI:()=>Rt,UriTrie:()=>ny,UriUtils:()=>it,WorkspaceCache:()=>sy,assertCondition:()=>$m,assertUnreachable:()=>Qr,delayNextTick:()=>fd,interruptAndCheck:()=>Ye,isOperationCancelled:()=>oa,loadGrammarFromJson:()=>wt,setInterruptionPeriod:()=>ey,startCancelableOperation:()=>dd,stream:()=>ue});cf(Ry,md);var to,iN=(to=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[]}},s(to,"EmptyFileSystemProvider"),to),Gt={fileSystemProvider:s(()=>new iN,"fileSystemProvider")},Vj={Grammar:s(()=>{},"Grammar"),LanguageMetaData:s(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},Hj={AstReflection:s(()=>new fm,"AstReflection")};function sN(){const t=Pe(bt(Gt),Hj),e=Pe(St({shared:t}),Vj);return t.ServiceRegistry.register(e),e}s(sN,"createMinimalGrammarServices");function wt(t){const e=sN(),r=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(r,Rt.parse(`memory:/${r.name??"grammar"}.langium`)),r}s(wt,"loadGrammarFromJson");cf(gT,Ry);var ro,Yj=(ro=class{constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new Or}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(r=>this.activeCategories.add(r)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(r=>this.activeCategories.delete(r)):this.activeCategories.clear()}createTask(e,r){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return new oN(n=>this.records.add(e,this.dumpRecord(e,n)),r)}dumpRecord(e,r){const n=[];for(const o of r.entries.keys()){const c=r.entries.get(o),l=c.reduce((u,f)=>u+f);n.push({name:`${r.identifier}.${o}`,count:c.length,duration:l})}const a=r.duration-n.map(o=>o.duration).reduce((o,c)=>o+c,0);n.push({name:r.identifier,count:1,duration:a}),n.sort((o,c)=>c.duration-o.duration);function i(o){return Math.round(100*o)/100}return s(i,"Round"),r}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(r=>e.some(n=>n===r[0])).flatMap(r=>r[1])}},s(ro,"DefaultLangiumProfiler"),ro),no,oN=(no=class{constructor(e,r){this.stack=[],this.entries=new Or,this.addRecord=e,this.identifier=r}start(){if(this.startTime!==void 0)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw new Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(r=>r.id).join(", ")}.`);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 r=this.stack.pop();if(!r)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(r.id!==e)throw new Error(`Sub-Task "${r.id}" is not already stopped.`);const n=performance.now()-r.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=n);const a=n-r.content;this.entries.add(e,a)}},s(no,"ProfilingTask"),no),Sh;(t=>{t.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 ]+)\]/}})(Sh||(Sh={}));var bh;(t=>{t.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]*/}})(bh||(bh={}));var wh;(t=>{t.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])?/}})(wh||(wh={}));var Ih;(t=>{t.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]*/}})(Ih||(Ih={}));var Nh;(t=>{t.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]*/}})(Nh||(Nh={}));var kh;(t=>{t.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]*/}})(kh||(kh={}));var Ph;(t=>{t.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]*/}})(Ph||(Ph={}));var Oh;(t=>{t.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:/"[^"]*"|'[^']*'/}})(Oh||(Oh={}));var Lh;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/}})(Lh||(Lh={}));var Dh;(t=>{t.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]*/}})(Dh||(Dh={}));({...Sh.Terminals,...bh.Terminals,...wh.Terminals,...Ih.Terminals,...Nh.Terminals,...kh.Terminals,...Ph.Terminals,...Lh.Terminals,...Oh.Terminals,...Dh.Terminals});var zc={$type:"Accelerator",name:"name",x:"x",y:"y"},Bc={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},yl={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},Id={$type:"Annotations",x:"x",y:"y"},Tr={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function Xj(t){return It.isInstance(t,Tr.$type)}s(Xj,"isArchitecture");var Kc={$type:"Axis",label:"label",name:"name"},Ru={$type:"Branch",name:"name",order:"order"};function Jj(t){return It.isInstance(t,Ru.$type)}s(Jj,"isBranch");var Vv={$type:"Checkout",branch:"branch"},qc={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},Nd={$type:"ClassDefStatement",className:"className",styleText:"styleText"},Ca={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function Zj(t){return It.isInstance(t,Ca.$type)}s(Zj,"isCommit");var Wc={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},an={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},Vc={$type:"Curve",entries:"entries",label:"label",name:"name"},Hc={$type:"Deaccelerator",name:"name",x:"x",y:"y"},Hv={$type:"Decorator",strategy:"strategy"},ma={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},er={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},ga={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},sn={$type:"EmFrame"},vl={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},Yv={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},kd={$type:"EmModelEntity",name:"name"};function Qj(t){return t==="rmo"||t==="readmodel"||t==="ui"||t==="cmd"||t==="command"||t==="evt"||t==="event"||t==="pcr"||t==="processor"}s(Qj,"isEmModelEntityType");var Yc={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},Rr={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};function lN(t){return It.isInstance(t,Rr.$type)}s(lN,"isEmResetFrame");var jr={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},Pd={$type:"Entry",axis:"axis",value:"value"},yr={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},Xv={$type:"Evolution",stages:"stages"},Xc={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},Od={$type:"Evolve",component:"component",target:"target"},mn={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function eU(t){return It.isInstance(t,mn.$type)}s(eU,"isGitGraph");var Tl={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},Ll={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function tU(t){return It.isInstance(t,Ll.$type)}s(tU,"isInfo");var Rl={$type:"Item",classSelector:"classSelector",name:"name"},Ld={$type:"Junction",id:"id",in:"in"},$l={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},Jc={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},on={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},Sa={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function rU(t){return It.isInstance(t,Sa.$type)}s(rU,"isMerge");var Zc={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},Dd={$type:"Option",name:"name",value:"value"},ba={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function nU(t){return It.isInstance(t,ba.$type)}s(nU,"isPacket");var wa={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function aU(t){return It.isInstance(t,wa.$type)}s(aU,"isPacketBlock");var gn={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function iU(t){return It.isInstance(t,gn.$type)}s(iU,"isPie");var $u={$type:"PieSection",label:"label",value:"value"};function sU(t){return It.isInstance(t,$u.$type)}s(sU,"isPieSection");var Md={$type:"Pipeline",components:"components",parent:"parent"},Qc={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},ln={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},xd={$type:"Section",classSelector:"classSelector",name:"name"},ya={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},Fd={$type:"Size",height:"height",width:"width"},va={$type:"Statement"},Ia={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function oU(t){return It.isInstance(t,Ia.$type)}s(oU,"isTreemap");var Gd={$type:"TreemapRow",indent:"indent",item:"item"},jd={$type:"TreeNode",indent:"indent",name:"name"},Al={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},Je={$type:"Wardley",accDescr:"accDescr",accelerators:"accelerators",accTitle:"accTitle",anchors:"anchors",annotation:"annotation",annotations:"annotations",components:"components",deaccelerators:"deaccelerators",evolution:"evolution",evolves:"evolves",links:"links",notes:"notes",pipelines:"pipelines",size:"size",title:"title"};function lU(t){return It.isInstance(t,Je.$type)}s(lU,"isWardley");var ao,cN=(ao=class extends Bh{constructor(){super(...arguments),this.types={Accelerator:{name:zc.$type,properties:{name:{name:zc.name},x:{name:zc.x},y:{name:zc.y}},superTypes:[]},Anchor:{name:Bc.$type,properties:{evolution:{name:Bc.evolution},name:{name:Bc.name},visibility:{name:Bc.visibility}},superTypes:[]},Annotation:{name:yl.$type,properties:{number:{name:yl.number},text:{name:yl.text},x:{name:yl.x},y:{name:yl.y}},superTypes:[]},Annotations:{name:Id.$type,properties:{x:{name:Id.x},y:{name:Id.y}},superTypes:[]},Architecture:{name:Tr.$type,properties:{accDescr:{name:Tr.accDescr},accTitle:{name:Tr.accTitle},edges:{name:Tr.edges,defaultValue:[]},groups:{name:Tr.groups,defaultValue:[]},junctions:{name:Tr.junctions,defaultValue:[]},services:{name:Tr.services,defaultValue:[]},title:{name:Tr.title}},superTypes:[]},Axis:{name:Kc.$type,properties:{label:{name:Kc.label},name:{name:Kc.name}},superTypes:[]},Branch:{name:Ru.$type,properties:{name:{name:Ru.name},order:{name:Ru.order}},superTypes:[va.$type]},Checkout:{name:Vv.$type,properties:{branch:{name:Vv.branch}},superTypes:[va.$type]},CherryPicking:{name:qc.$type,properties:{id:{name:qc.id},parent:{name:qc.parent},tags:{name:qc.tags,defaultValue:[]}},superTypes:[va.$type]},ClassDefStatement:{name:Nd.$type,properties:{className:{name:Nd.className},styleText:{name:Nd.styleText}},superTypes:[]},Commit:{name:Ca.$type,properties:{id:{name:Ca.id},message:{name:Ca.message},tags:{name:Ca.tags,defaultValue:[]},type:{name:Ca.type}},superTypes:[va.$type]},Common:{name:Wc.$type,properties:{accDescr:{name:Wc.accDescr},accTitle:{name:Wc.accTitle},title:{name:Wc.title}},superTypes:[]},Component:{name:an.$type,properties:{decorator:{name:an.decorator},evolution:{name:an.evolution},inertia:{name:an.inertia,defaultValue:!1},label:{name:an.label},name:{name:an.name},visibility:{name:an.visibility}},superTypes:[]},Curve:{name:Vc.$type,properties:{entries:{name:Vc.entries,defaultValue:[]},label:{name:Vc.label},name:{name:Vc.name}},superTypes:[]},Deaccelerator:{name:Hc.$type,properties:{name:{name:Hc.name},x:{name:Hc.x},y:{name:Hc.y}},superTypes:[]},Decorator:{name:Hv.$type,properties:{strategy:{name:Hv.strategy}},superTypes:[]},Direction:{name:ma.$type,properties:{accDescr:{name:ma.accDescr},accTitle:{name:ma.accTitle},dir:{name:ma.dir},statements:{name:ma.statements,defaultValue:[]},title:{name:ma.title}},superTypes:[mn.$type]},Edge:{name:er.$type,properties:{lhsDir:{name:er.lhsDir},lhsGroup:{name:er.lhsGroup,defaultValue:!1},lhsId:{name:er.lhsId},lhsInto:{name:er.lhsInto,defaultValue:!1},rhsDir:{name:er.rhsDir},rhsGroup:{name:er.rhsGroup,defaultValue:!1},rhsId:{name:er.rhsId},rhsInto:{name:er.rhsInto,defaultValue:!1},title:{name:er.title}},superTypes:[]},EmDataEntity:{name:ga.$type,properties:{dataBlockValue:{name:ga.dataBlockValue},dataType:{name:ga.dataType},name:{name:ga.name}},superTypes:[]},EmFrame:{name:sn.$type,properties:{},superTypes:[]},EmGwt:{name:vl.$type,properties:{givenStatements:{name:vl.givenStatements,defaultValue:[]},sourceFrame:{name:vl.sourceFrame,referenceType:sn.$type},thenStatements:{name:vl.thenStatements,defaultValue:[]},whenStatements:{name:vl.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:Yv.$type,properties:{entityIdentifier:{name:Yv.entityIdentifier,referenceType:kd.$type}},superTypes:[]},EmModelEntity:{name:kd.$type,properties:{name:{name:kd.name}},superTypes:[]},EmNoteEntity:{name:Yc.$type,properties:{dataBlockValue:{name:Yc.dataBlockValue},dataType:{name:Yc.dataType},sourceFrame:{name:Yc.sourceFrame,referenceType:sn.$type}},superTypes:[]},EmResetFrame:{name:Rr.$type,properties:{dataInlineValue:{name:Rr.dataInlineValue},dataReference:{name:Rr.dataReference,referenceType:ga.$type},dataType:{name:Rr.dataType},entityIdentifier:{name:Rr.entityIdentifier},modelEntityType:{name:Rr.modelEntityType},name:{name:Rr.name},sourceFrames:{name:Rr.sourceFrames,defaultValue:[],referenceType:sn.$type}},superTypes:[sn.$type]},EmTimeFrame:{name:jr.$type,properties:{dataInlineValue:{name:jr.dataInlineValue},dataReference:{name:jr.dataReference,referenceType:ga.$type},dataType:{name:jr.dataType},entityIdentifier:{name:jr.entityIdentifier},modelEntityType:{name:jr.modelEntityType},name:{name:jr.name},sourceFrames:{name:jr.sourceFrames,defaultValue:[],referenceType:sn.$type}},superTypes:[sn.$type]},Entry:{name:Pd.$type,properties:{axis:{name:Pd.axis,referenceType:Kc.$type},value:{name:Pd.value}},superTypes:[]},EventModel:{name:yr.$type,properties:{accDescr:{name:yr.accDescr},accTitle:{name:yr.accTitle},dataEntities:{name:yr.dataEntities,defaultValue:[]},frames:{name:yr.frames,defaultValue:[]},gwtEntities:{name:yr.gwtEntities,defaultValue:[]},modelEntities:{name:yr.modelEntities,defaultValue:[]},noteEntities:{name:yr.noteEntities,defaultValue:[]},title:{name:yr.title}},superTypes:[]},Evolution:{name:Xv.$type,properties:{stages:{name:Xv.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:Xc.$type,properties:{boundary:{name:Xc.boundary},name:{name:Xc.name},secondName:{name:Xc.secondName}},superTypes:[]},Evolve:{name:Od.$type,properties:{component:{name:Od.component},target:{name:Od.target}},superTypes:[]},GitGraph:{name:mn.$type,properties:{accDescr:{name:mn.accDescr},accTitle:{name:mn.accTitle},statements:{name:mn.statements,defaultValue:[]},title:{name:mn.title}},superTypes:[]},Group:{name:Tl.$type,properties:{icon:{name:Tl.icon},id:{name:Tl.id},in:{name:Tl.in},title:{name:Tl.title}},superTypes:[]},Info:{name:Ll.$type,properties:{accDescr:{name:Ll.accDescr},accTitle:{name:Ll.accTitle},title:{name:Ll.title}},superTypes:[]},Item:{name:Rl.$type,properties:{classSelector:{name:Rl.classSelector},name:{name:Rl.name}},superTypes:[]},Junction:{name:Ld.$type,properties:{id:{name:Ld.id},in:{name:Ld.in}},superTypes:[]},Label:{name:$l.$type,properties:{negX:{name:$l.negX,defaultValue:!1},negY:{name:$l.negY,defaultValue:!1},offsetX:{name:$l.offsetX},offsetY:{name:$l.offsetY}},superTypes:[]},Leaf:{name:Jc.$type,properties:{classSelector:{name:Jc.classSelector},name:{name:Jc.name},value:{name:Jc.value}},superTypes:[Rl.$type]},Link:{name:on.$type,properties:{arrow:{name:on.arrow},from:{name:on.from},fromPort:{name:on.fromPort},linkLabel:{name:on.linkLabel},to:{name:on.to},toPort:{name:on.toPort}},superTypes:[]},Merge:{name:Sa.$type,properties:{branch:{name:Sa.branch},id:{name:Sa.id},tags:{name:Sa.tags,defaultValue:[]},type:{name:Sa.type}},superTypes:[va.$type]},Note:{name:Zc.$type,properties:{evolution:{name:Zc.evolution},text:{name:Zc.text},visibility:{name:Zc.visibility}},superTypes:[]},Option:{name:Dd.$type,properties:{name:{name:Dd.name},value:{name:Dd.value,defaultValue:!1}},superTypes:[]},Packet:{name:ba.$type,properties:{accDescr:{name:ba.accDescr},accTitle:{name:ba.accTitle},blocks:{name:ba.blocks,defaultValue:[]},title:{name:ba.title}},superTypes:[]},PacketBlock:{name:wa.$type,properties:{bits:{name:wa.bits},end:{name:wa.end},label:{name:wa.label},start:{name:wa.start}},superTypes:[]},Pie:{name:gn.$type,properties:{accDescr:{name:gn.accDescr},accTitle:{name:gn.accTitle},sections:{name:gn.sections,defaultValue:[]},showData:{name:gn.showData,defaultValue:!1},title:{name:gn.title}},superTypes:[]},PieSection:{name:$u.$type,properties:{label:{name:$u.label},value:{name:$u.value}},superTypes:[]},Pipeline:{name:Md.$type,properties:{components:{name:Md.components,defaultValue:[]},parent:{name:Md.parent}},superTypes:[]},PipelineComponent:{name:Qc.$type,properties:{evolution:{name:Qc.evolution},label:{name:Qc.label},name:{name:Qc.name}},superTypes:[]},Radar:{name:ln.$type,properties:{accDescr:{name:ln.accDescr},accTitle:{name:ln.accTitle},axes:{name:ln.axes,defaultValue:[]},curves:{name:ln.curves,defaultValue:[]},options:{name:ln.options,defaultValue:[]},title:{name:ln.title}},superTypes:[]},Section:{name:xd.$type,properties:{classSelector:{name:xd.classSelector},name:{name:xd.name}},superTypes:[Rl.$type]},Service:{name:ya.$type,properties:{icon:{name:ya.icon},iconText:{name:ya.iconText},id:{name:ya.id},in:{name:ya.in},title:{name:ya.title}},superTypes:[]},Size:{name:Fd.$type,properties:{height:{name:Fd.height},width:{name:Fd.width}},superTypes:[]},Statement:{name:va.$type,properties:{},superTypes:[]},TreeNode:{name:jd.$type,properties:{indent:{name:jd.indent},name:{name:jd.name}},superTypes:[]},TreeView:{name:Al.$type,properties:{accDescr:{name:Al.accDescr},accTitle:{name:Al.accTitle},nodes:{name:Al.nodes,defaultValue:[]},title:{name:Al.title}},superTypes:[]},Treemap:{name:Ia.$type,properties:{accDescr:{name:Ia.accDescr},accTitle:{name:Ia.accTitle},title:{name:Ia.title},TreemapRows:{name:Ia.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Gd.$type,properties:{indent:{name:Gd.indent},item:{name:Gd.item}},superTypes:[]},Wardley:{name:Je.$type,properties:{accDescr:{name:Je.accDescr},accelerators:{name:Je.accelerators,defaultValue:[]},accTitle:{name:Je.accTitle},anchors:{name:Je.anchors,defaultValue:[]},annotation:{name:Je.annotation,defaultValue:[]},annotations:{name:Je.annotations,defaultValue:[]},components:{name:Je.components,defaultValue:[]},deaccelerators:{name:Je.deaccelerators,defaultValue:[]},evolution:{name:Je.evolution},evolves:{name:Je.evolves,defaultValue:[]},links:{name:Je.links,defaultValue:[]},notes:{name:Je.notes,defaultValue:[]},pipelines:{name:Je.pipelines,defaultValue:[]},size:{name:Je.size},title:{name:Je.title}},superTypes:[]}}}},s(ao,"MermaidAstReflection"),ao),It=new cN,Jv,cU=s(()=>Jv??(Jv=wt(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"ArchitectureGrammarGrammar"),Zv,uU=s(()=>Zv??(Zv=wt('{"$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"),Qv,fU=s(()=>Qv??(Qv=wt(`{"$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"),eT,dU=s(()=>eT??(eT=wt(`{"$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"),tT,pU=s(()=>tT??(tT=wt(`{"$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"),rT,hU=s(()=>rT??(rT=wt(`{"$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"),nT,mU=s(()=>nT??(nT=wt(`{"$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"),aT,gU=s(()=>aT??(aT=wt(`{"$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"),iT,yU=s(()=>iT??(iT=wt(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n * Converted from treemap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`)),"TreeViewGrammarGrammar"),sT,vU=s(()=>sT??(sT=wt(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'</","parenthesized":false}],"parenthesized":false},{"$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"),TU={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},RU={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},$U={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},AU={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},EU={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},_U={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},CU={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},SU={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},bU={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},wU={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},hr={AstReflection:s(()=>new cN,"AstReflection")},IU={Grammar:s(()=>cU(),"Grammar"),LanguageMetaData:s(()=>TU,"LanguageMetaData"),parser:{}},NU={Grammar:s(()=>uU(),"Grammar"),LanguageMetaData:s(()=>RU,"LanguageMetaData"),parser:{}},kU={Grammar:s(()=>fU(),"Grammar"),LanguageMetaData:s(()=>$U,"LanguageMetaData"),parser:{}},PU={Grammar:s(()=>dU(),"Grammar"),LanguageMetaData:s(()=>AU,"LanguageMetaData"),parser:{}},OU={Grammar:s(()=>pU(),"Grammar"),LanguageMetaData:s(()=>EU,"LanguageMetaData"),parser:{}},LU={Grammar:s(()=>hU(),"Grammar"),LanguageMetaData:s(()=>_U,"LanguageMetaData"),parser:{}},DU={Grammar:s(()=>mU(),"Grammar"),LanguageMetaData:s(()=>CU,"LanguageMetaData"),parser:{}},MU={Grammar:s(()=>gU(),"Grammar"),LanguageMetaData:s(()=>SU,"LanguageMetaData"),parser:{}},xU={Grammar:s(()=>yU(),"Grammar"),LanguageMetaData:s(()=>bU,"LanguageMetaData"),parser:{}},FU={Grammar:s(()=>vU(),"Grammar"),LanguageMetaData:s(()=>wU,"LanguageMetaData"),parser:{}},GU=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,jU=/accTitle[\t ]*:([^\n\r]*)/,UU=/title([\t ][^\n\r]*|)/,zU={ACC_DESCR:GU,ACC_TITLE:jU,TITLE:UU},io,Yo=(io=class extends Qg{runConverter(e,r,n){let a=this.runCommonConverter(e,r,n);return a===void 0&&(a=this.runCustomConverter(e,r,n)),a===void 0?super.runConverter(e,r,n):a}runCommonConverter(e,r,n){const a=zU[e.name];if(a===void 0)return;const i=a.exec(r);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,`
151
+ `)}}},s(io,"AbstractMermaidValueConverter"),io),so,Lc=(so=class extends Yo{runCustomConverter(e,r,n){}},s(so,"CommonValueConverter"),so),oo,mr=(oo=class extends ud{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,r,n){const a=super.buildKeywordTokens(e,r,n);return a.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),a}},s(oo,"AbstractMermaidTokenBuilder"),oo),lo;lo=class extends mr{},s(lo,"CommonTokenBuilder");/*! Bundled license information:
152
+
153
+ lodash-es/lodash.js:
154
+ (**
155
+ * @license
156
+ * Lodash (Custom Build) <https://lodash.com/>
157
+ * Build: `lodash modularize exports="es" -o ./`
158
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
159
+ * Released under MIT license <https://lodash.com/license>
160
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
161
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
162
+ *)
163
+ */var co,BU=(co=class extends mr{constructor(){super(["radar-beta"])}},s(co,"RadarTokenBuilder"),co),uN={parser:{TokenBuilder:s(()=>new BU,"TokenBuilder"),ValueConverter:s(()=>new Lc,"ValueConverter")}};function fN(t=Gt){const e=Pe(bt(t),hr),r=Pe(St({shared:e}),DU,uN);return e.ServiceRegistry.register(r),{shared:e,Radar:r}}s(fN,"createRadarServices");var uo,KU=(uo=class extends mr{constructor(){super(["treemap"])}},s(uo,"TreemapTokenBuilder"),uo),qU=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,fo,WU=(fo=class extends Yo{runCustomConverter(e,r,n){if(e.name==="NUMBER2")return parseFloat(r.replace(/,/g,""));if(e.name==="SEPARATOR")return r.substring(1,r.length-1);if(e.name==="STRING2")return r.substring(1,r.length-1);if(e.name==="INDENTATION")return r.length;if(e.name==="ClassDef"){if(typeof r!="string")return r;const a=qU.exec(r);if(a)return{$type:"ClassDefStatement",className:a[1],styleText:a[2]||void 0}}}},s(fo,"TreemapValueConverter"),fo);function dN(t){const e=t.validation.TreemapValidator,r=t.validation.ValidationRegistry;if(r){const n={Treemap:e.checkSingleRoot.bind(e)};r.register(n,e)}}s(dN,"registerValidationChecks");var po,VU=(po=class{checkSingleRoot(e,r){let n;for(const a of e.TreemapRows)a.item&&(n===void 0&&a.indent===void 0?n=0:a.indent===void 0?r("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}):n!==void 0&&n>=parseInt(a.indent,10)&&r("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}))}},s(po,"TreemapValidator"),po),pN={parser:{TokenBuilder:s(()=>new KU,"TokenBuilder"),ValueConverter:s(()=>new WU,"ValueConverter")},validation:{TreemapValidator:s(()=>new VU,"TreemapValidator")}};function hN(t=Gt){const e=Pe(bt(t),hr),r=Pe(St({shared:e}),MU,pN);return e.ServiceRegistry.register(r),dN(r),{shared:e,Treemap:r}}s(hN,"createTreemapServices");var ho,HU=(ho=class extends Yo{runCustomConverter(e,r,n){switch(e.name.toUpperCase()){case"LINK_LABEL":return r.substring(1).trim();default:return}}},s(ho,"WardleyValueConverter"),ho),mN={parser:{ValueConverter:s(()=>new HU,"ValueConverter")}};function gN(t=Gt){const e=Pe(bt(t),hr),r=Pe(St({shared:e}),FU,mN);return e.ServiceRegistry.register(r),{shared:e,Wardley:r}}s(gN,"createWardleyServices");var mo,YU=(mo=class extends mr{constructor(){super(["gitGraph"])}},s(mo,"GitGraphTokenBuilder"),mo),yN={parser:{TokenBuilder:s(()=>new YU,"TokenBuilder"),ValueConverter:s(()=>new Lc,"ValueConverter")}};function vN(t=Gt){const e=Pe(bt(t),hr),r=Pe(St({shared:e}),kU,yN);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}s(vN,"createGitGraphServices");var go,XU=(go=class extends mr{constructor(){super(["info","showInfo"])}},s(go,"InfoTokenBuilder"),go),TN={parser:{TokenBuilder:s(()=>new XU,"TokenBuilder"),ValueConverter:s(()=>new Lc,"ValueConverter")}};function RN(t=Gt){const e=Pe(bt(t),hr),r=Pe(St({shared:e}),PU,TN);return e.ServiceRegistry.register(r),{shared:e,Info:r}}s(RN,"createInfoServices");var yo,JU=(yo=class extends mr{constructor(){super(["packet"])}},s(yo,"PacketTokenBuilder"),yo),$N={parser:{TokenBuilder:s(()=>new JU,"TokenBuilder"),ValueConverter:s(()=>new Lc,"ValueConverter")}};function AN(t=Gt){const e=Pe(bt(t),hr),r=Pe(St({shared:e}),OU,$N);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}s(AN,"createPacketServices");var vo,ZU=(vo=class extends mr{constructor(){super(["pie","showData"])}},s(vo,"PieTokenBuilder"),vo),To,QU=(To=class extends Yo{runCustomConverter(e,r,n){if(e.name==="PIE_SECTION_LABEL")return r.replace(/"/g,"").trim()}},s(To,"PieValueConverter"),To),EN={parser:{TokenBuilder:s(()=>new ZU,"TokenBuilder"),ValueConverter:s(()=>new QU,"ValueConverter")}};function _N(t=Gt){const e=Pe(bt(t),hr),r=Pe(St({shared:e}),LU,EN);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}s(_N,"createPieServices");var Ro,ez=(Ro=class extends Yo{runCustomConverter(e,r,n){if(e.name==="INDENTATION")return(r==null?void 0:r.length)||0;if(e.name==="STRING2")return r.substring(1,r.length-1)}},s(Ro,"TreeViewValueConverter"),Ro),$o,tz=($o=class extends mr{constructor(){super(["treeView-beta"])}},s($o,"TreeViewTokenBuilder"),$o),CN={parser:{TokenBuilder:s(()=>new tz,"TokenBuilder"),ValueConverter:s(()=>new ez,"ValueConverter")}};function SN(t=Gt){const e=Pe(bt(t),hr),r=Pe(St({shared:e}),xU,CN);return e.ServiceRegistry.register(r),{shared:e,TreeView:r}}s(SN,"createTreeViewServices");var Ao,rz=(Ao=class extends mr{constructor(){super(["architecture"])}},s(Ao,"ArchitectureTokenBuilder"),Ao),Eo,nz=(Eo=class extends Yo{runCustomConverter(e,r,n){if(e.name==="ARCH_ICON")return r.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return r.replace(/["()]/g,"");if(e.name==="ARCH_TITLE"){let a=r.replace(/^\[|]$/g,"").trim();return(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))&&(a=a.slice(1,-1),a=a.replace(/\\"/g,'"').replace(/\\'/g,"'")),a.trim()}}},s(Eo,"ArchitectureValueConverter"),Eo),bN={parser:{TokenBuilder:s(()=>new rz,"TokenBuilder"),ValueConverter:s(()=>new nz,"ValueConverter")}};function wN(t=Gt){const e=Pe(bt(t),hr),r=Pe(St({shared:e}),IU,bN);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}s(wN,"createArchitectureServices");var _o,az=(_o=class extends mr{constructor(){super(["eventmodeling"])}},s(_o,"EventModelingTokenBuilder"),_o),oT=new Set(["cmd","command"]),lT=new Set(["evt","event"]),Ud=new Set(["rmo","readmodel"]),cT=new Set(["pcr","processor"]),uT=new Set(["ui"]);function IN(t){const e=t.validation.EventModelingValidator,r=t.validation.ValidationRegistry;if(r){const n={EmTimeFrame:e.checkSourceFrameTypes.bind(e),EmResetFrame:e.checkSourceFrameTypes.bind(e)};r.register(n,e)}}s(IN,"registerValidationChecks");var Co,iz=(Co=class{checkSourceFrameTypes(e,r){e.sourceFrames.length!==0&&(oT.has(e.modelEntityType)?this.validateSources(e,new Set([...uT,...cT]),"command","ui or processor",r):lT.has(e.modelEntityType)?this.validateSources(e,oT,"event","command",r):Ud.has(e.modelEntityType)?this.validateSources(e,lT,"read model","event",r):cT.has(e.modelEntityType)?this.validateSources(e,Ud,"processor","read model",r):uT.has(e.modelEntityType)&&this.validateSources(e,Ud,"ui","read model",r))}validateSources(e,r,n,a,i){for(const o of e.sourceFrames){const c=o.ref;c!==void 0&&!r.has(c.modelEntityType)&&i("error",`A ${n} can only receive input from a ${a}, not from '${c.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},s(Co,"EventModelingValidator"),Co),NN={parser:{TokenBuilder:s(()=>new az,"TokenBuilder"),ValueConverter:s(()=>new Lc,"ValueConverter")},validation:{EventModelingValidator:s(()=>new iz,"EventModelingValidator")}};function kN(t=Gt){const e=Pe(bt(t),hr),r=Pe(St({shared:e}),NU,NN);return e.ServiceRegistry.register(r),IN(r),{shared:e,EventModel:r}}s(kN,"createEventModelingServices");var Pt={},sz={info:s(async()=>{const{createInfoServices:t}=await Promise.resolve().then(()=>lz),e=t().Info.parser.LangiumParser;Pt.info=e},"info"),packet:s(async()=>{const{createPacketServices:t}=await Promise.resolve().then(()=>cz),e=t().Packet.parser.LangiumParser;Pt.packet=e},"packet"),pie:s(async()=>{const{createPieServices:t}=await Promise.resolve().then(()=>uz),e=t().Pie.parser.LangiumParser;Pt.pie=e},"pie"),treeView:s(async()=>{const{createTreeViewServices:t}=await Promise.resolve().then(()=>fz),e=t().TreeView.parser.LangiumParser;Pt.treeView=e},"treeView"),architecture:s(async()=>{const{createArchitectureServices:t}=await Promise.resolve().then(()=>dz),e=t().Architecture.parser.LangiumParser;Pt.architecture=e},"architecture"),gitGraph:s(async()=>{const{createGitGraphServices:t}=await Promise.resolve().then(()=>pz),e=t().GitGraph.parser.LangiumParser;Pt.gitGraph=e},"gitGraph"),eventmodeling:s(async()=>{const{createEventModelingServices:t}=await Promise.resolve().then(()=>hz),e=t().EventModel.parser.LangiumParser;Pt.eventmodeling=e},"eventmodeling"),radar:s(async()=>{const{createRadarServices:t}=await Promise.resolve().then(()=>mz),e=t().Radar.parser.LangiumParser;Pt.radar=e},"radar"),treemap:s(async()=>{const{createTreemapServices:t}=await Promise.resolve().then(()=>gz),e=t().Treemap.parser.LangiumParser;Pt.treemap=e},"treemap"),wardley:s(async()=>{const{createWardleyServices:t}=await Promise.resolve().then(()=>yz),e=t().Wardley.parser.LangiumParser;Pt.wardley=e},"wardley")};async function PN(t,e){const r=sz[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);Pt[t]||await r();const a=Pt[t].parse(e);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new oz(a);return a.value}s(PN,"parse");var So,oz=(So=class extends Error{constructor(e){const r=e.lexerErrors.map(a=>{const i=a.line!==void 0&&!isNaN(a.line)?a.line:"?",o=a.column!==void 0&&!isNaN(a.column)?a.column:"?";return`Lexer error on line ${i}, column ${o}: ${a.message}`}).join(`
164
+ `),n=e.parserErrors.map(a=>{const i=a.token.startLine!==void 0&&!isNaN(a.token.startLine)?a.token.startLine:"?",o=a.token.startColumn!==void 0&&!isNaN(a.token.startColumn)?a.token.startColumn:"?";return`Parse error on line ${i}, column ${o}: ${a.message}`}).join(`
165
+ `);super(`Parsing failed: ${r} ${n}`),this.result=e}},s(So,"MermaidParseError"),So);const lz=Object.freeze(Object.defineProperty({__proto__:null,InfoModule:TN,createInfoServices:RN},Symbol.toStringTag,{value:"Module"})),cz=Object.freeze(Object.defineProperty({__proto__:null,PacketModule:$N,createPacketServices:AN},Symbol.toStringTag,{value:"Module"})),uz=Object.freeze(Object.defineProperty({__proto__:null,PieModule:EN,createPieServices:_N},Symbol.toStringTag,{value:"Module"})),fz=Object.freeze(Object.defineProperty({__proto__:null,TreeViewModule:CN,createTreeViewServices:SN},Symbol.toStringTag,{value:"Module"})),dz=Object.freeze(Object.defineProperty({__proto__:null,ArchitectureModule:bN,createArchitectureServices:wN},Symbol.toStringTag,{value:"Module"})),pz=Object.freeze(Object.defineProperty({__proto__:null,GitGraphModule:yN,createGitGraphServices:vN},Symbol.toStringTag,{value:"Module"})),hz=Object.freeze(Object.defineProperty({__proto__:null,EventModelingModule:NN,createEventModelingServices:kN},Symbol.toStringTag,{value:"Module"})),mz=Object.freeze(Object.defineProperty({__proto__:null,RadarModule:uN,createRadarServices:fN},Symbol.toStringTag,{value:"Module"})),gz=Object.freeze(Object.defineProperty({__proto__:null,TreemapModule:pN,createTreemapServices:hN},Symbol.toStringTag,{value:"Module"})),yz=Object.freeze(Object.defineProperty({__proto__:null,WardleyModule:mN,createWardleyServices:gN},Symbol.toStringTag,{value:"Module"}));exports.isEmResetFrame=lN;exports.parse=PN;