difit 5.0.2 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/dist/client/assets/{arc-6rfKPaO5.js → arc-DSPPgdBg.js} +1 -1
- package/dist/client/assets/architecture-7EHR7CIX-CohItdie.js +1 -0
- package/dist/client/assets/architectureDiagram-3BPJPVTR-Bq6cwL9u.js +36 -0
- package/dist/client/assets/{blockDiagram-GPEHLZMM-CDPNTGF3.js → blockDiagram-GPEHLZMM-BuBQMzpe.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-CQ1lD37n.js → c4Diagram-AAUBKEIU-CR7tSmVT.js} +1 -1
- package/dist/client/assets/channel-S6jUjnHB.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-wS77xj1o.js → chunk-2J33WTMH-rvTjhvz0.js} +1 -1
- package/dist/client/assets/{chunk-3OPIFGDE-DC3iOSQY.js → chunk-3OPIFGDE-Fyd9M094.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-C_jnlJZs.js → chunk-4BX2VUAB-C6UmcHjV.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-BJ8kKTix.js → chunk-55IACEB6-BzNsvVPM.js} +1 -1
- package/dist/client/assets/{chunk-5ZQYHXKU-Bh6BPUBA.js → chunk-5ZQYHXKU-DCLHN3qI.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-BKLMyeWY.js → chunk-727SXJPM-BBgEpx90.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-Df_usvOe.js → chunk-AQP2D5EJ-CpMFBP18.js} +1 -1
- package/dist/client/assets/{chunk-BSJP7CBP-DE9tFfBp.js → chunk-BSJP7CBP-CGmSteGe.js} +1 -1
- package/dist/client/assets/{chunk-CSCIHK7Q-4xM5RfGk.js → chunk-CSCIHK7Q-B9WhXXuO.js} +2 -2
- package/dist/client/assets/{chunk-FMBD7UC4-Cv9IlI4O.js → chunk-FMBD7UC4-BM93N9qt.js} +1 -1
- package/dist/client/assets/{chunk-KSCS5N6A-DWLHH_AM.js → chunk-KSCS5N6A-DnTVjmfY.js} +1 -1
- package/dist/client/assets/{chunk-L5ZTLDWV-DOT8BvSV.js → chunk-L5ZTLDWV-CMVsdqtG.js} +1 -1
- package/dist/client/assets/{chunk-LZXEDZCA-D6qoNMjr.js → chunk-LZXEDZCA-CfREH43V.js} +2 -2
- package/dist/client/assets/{chunk-ND2GUHAM-CL1pz8JY.js → chunk-ND2GUHAM-DgyJl634.js} +1 -1
- package/dist/client/assets/{chunk-NNHCCRGN-CyaCWJWT.js → chunk-NNHCCRGN-DlpIbxXb.js} +6 -6
- package/dist/client/assets/{chunk-NZK2D7GU-C5yW1m8s.js → chunk-NZK2D7GU-DQfO31_r.js} +1 -1
- package/dist/client/assets/{chunk-O5CBEL6O-DxoQOZDE.js → chunk-O5CBEL6O-CkQDQiYn.js} +1 -1
- package/dist/client/assets/chunk-QZHKN3VN-BrbogxAf.js +1 -0
- package/dist/client/assets/chunk-WU5MYG2G-5F98cRPW.js +1 -0
- package/dist/client/assets/{chunk-XPW4576I-CaGs7AFA.js → chunk-XPW4576I-CX_SeogB.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-CdJFCTas.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CdJFCTas.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-0teiw0GI.js → cose-bilkent-S5V4N54A-CP0dE-X-.js} +1 -1
- package/dist/client/assets/{cytoscape.esm-CJYKJE1R.js → cytoscape.esm-FqbQrHcz.js} +2 -2
- package/dist/client/assets/{dagre-BM42HDAG-D_-3GRUj.js → dagre-BM42HDAG-CuBKMSTQ.js} +1 -1
- package/dist/client/assets/{dagre-BLlLfumR.js → dagre-Bx709z4p.js} +1 -1
- package/dist/client/assets/diagram-2AECGRRQ-CmKeiAve.js +43 -0
- package/dist/client/assets/diagram-5GNKFQAL-Bij2Vn_4.js +10 -0
- package/dist/client/assets/diagram-KO2AKTUF-Bu--NIxX.js +3 -0
- package/dist/client/assets/{diagram-LMA3HP47-BuYAHh0a.js → diagram-LMA3HP47-5drEbyFD.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-C2f4LrLS.js → diagram-OG6HWLK6-BgZyN9xV.js} +2 -2
- package/dist/client/assets/{dist-DpSceyb-.js → dist-JwGJWCFJ.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-BDcc9ZeJ.js → erDiagram-TEJ5UH35-CSRZYzlA.js} +1 -1
- package/dist/client/assets/eventmodeling-FCH6USID-DzaLbwoj.js +1 -0
- package/dist/client/assets/{flowDiagram-I6XJVG4X-C46q_MLU.js → flowDiagram-I6XJVG4X-OAYh5vob.js} +2 -2
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-DgM194yE.js → ganttDiagram-6RSMTGT7-SaHuo6Gy.js} +1 -1
- package/dist/client/assets/gitGraph-WXDBUCRP-BIdG3klz.js +1 -0
- package/dist/client/assets/gitGraphDiagram-PVQCEYII-D5zGrbfK.js +106 -0
- package/dist/client/assets/{index-abQ5IgAS.js → index-BaIKvjMm.js} +35 -35
- package/dist/client/assets/info-J43DQDTF-CoJAa1jy.js +1 -0
- package/dist/client/assets/infoDiagram-5YYISTIA-C-hEPtQy.js +2 -0
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-B9iBTUWg.js → ishikawaDiagram-YF4QCWOH-1M5bvMog.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-BjR1KB-M.js → journeyDiagram-JHISSGLW-Catw0gPE.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-C-omJVr_.js → kanban-definition-UN3LZRKU-CIHvQYl_.js} +1 -1
- package/dist/client/assets/{line-BrFp4RcF.js → line-BMAeT22x.js} +1 -1
- package/dist/client/assets/{linear-Ce90hYCv.js → linear-BkbmzJl4.js} +1 -1
- package/dist/client/assets/mermaid-parser.core-BtPHI9Oa.js +4 -0
- package/dist/client/assets/{mermaid.core-dZvhJRm4.js → mermaid.core-CfQ4y0Uc.js} +3 -3
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-B1-aSgk-.js → mindmap-definition-RKZ34NQL-BFXcdwqw.js} +1 -1
- package/dist/client/assets/{ordinal-7rXhq2H9.js → ordinal-hYBb2elL.js} +1 -1
- package/dist/client/assets/packet-YPE3B663-AT2Ro2Lv.js +1 -0
- package/dist/client/assets/pie-LRSECV5Y-C4JYyVfQ.js +1 -0
- package/dist/client/assets/pieDiagram-4H26LBE5-BndANyK1.js +30 -0
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-Cown2EYl.js → quadrantDiagram-W4KKPZXB-DjDMNr_i.js} +1 -1
- package/dist/client/assets/radar-GUYGQ44K-BPZXw--L.js +1 -0
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-IHqUu4n-.js → requirementDiagram-4Y6WPE33-C9oF_r7D.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-BvIfULX_.js → sankeyDiagram-5OEKKPKP-D1rmj0Jl.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-DNZh6NI8.js → sequenceDiagram-3UESZ5HK-XMFSj8zw.js} +2 -2
- package/dist/client/assets/{src-iMPju4xR.js → src-CwU5tlkF.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-CGHI9QKF.js → stateDiagram-AJRCARHV-DzAlMn7H.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-DNlQJFr6.js +1 -0
- package/dist/client/assets/{timeline-definition-PNZ67QCA-C3MNpio4.js → timeline-definition-PNZ67QCA-C9q0FD1l.js} +1 -1
- package/dist/client/assets/treeView-BLDUP644-Br7Pr3D7.js +1 -0
- package/dist/client/assets/treemap-LRROVOQU-Bd1N12gv.js +1 -0
- package/dist/client/assets/{vennDiagram-CIIHVFJN-2XAu0kKE.js → vennDiagram-CIIHVFJN-BEmN2q_-.js} +2 -2
- package/dist/client/assets/wardley-L42UT6IY-a0fnEiPp.js +1 -0
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-e5Pq-VXT.js → wardleyDiagram-YWT4CUSO-Cv-CnELr.js} +3 -3
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-DlYK0YFq.js → xychartDiagram-2RQKCTM6-CSofdDLp.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +7 -5
- package/dist/client/assets/architecture-7EHR7CIX-BVjNdUJk.js +0 -1
- package/dist/client/assets/architectureDiagram-3BPJPVTR-DAPpx935.js +0 -36
- package/dist/client/assets/channel-CI_kbhRo.js +0 -1
- package/dist/client/assets/chunk-4EGX6M5U-B5J4lyUG.js +0 -1
- package/dist/client/assets/chunk-5DO6E6H7-UL04E-Sm.js +0 -1
- package/dist/client/assets/chunk-BR22UD5L-iAygIt6T.js +0 -1
- package/dist/client/assets/chunk-FHYWG6QK-BgSLVmZJ.js +0 -1
- package/dist/client/assets/chunk-MPE355IW-cyI0EFc3.js +0 -1
- package/dist/client/assets/chunk-MZUSXYTE-5xqZ7HV0.js +0 -1
- package/dist/client/assets/chunk-N66VUXT2-CoBMKqlP.js +0 -1
- package/dist/client/assets/chunk-PUPMXCY4-DkoNKY6Q.js +0 -1
- package/dist/client/assets/chunk-QZHKN3VN-Bo6EoZG3.js +0 -1
- package/dist/client/assets/chunk-UIBZB4QT-3h9dqf89.js +0 -1
- package/dist/client/assets/chunk-WCWK7LTN-CoJXc1FG.js +0 -1
- package/dist/client/assets/chunk-WU5MYG2G-wj9gaxvS.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK--B_Qh3IG.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-ChlqxE3w.js +0 -1
- package/dist/client/assets/diagram-2AECGRRQ-_W3aY5Zc.js +0 -43
- package/dist/client/assets/diagram-5GNKFQAL-CMT8oSlm.js +0 -10
- package/dist/client/assets/diagram-KO2AKTUF-B9w0z9LU.js +0 -3
- package/dist/client/assets/eventmodeling-FCH6USID-BMkJE7Xb.js +0 -1
- package/dist/client/assets/gitGraph-WXDBUCRP-hUiiT7ot.js +0 -1
- package/dist/client/assets/gitGraphDiagram-PVQCEYII-CpIhNWuv.js +0 -106
- package/dist/client/assets/info-J43DQDTF-Dn8zxm9V.js +0 -1
- package/dist/client/assets/infoDiagram-5YYISTIA-ZvGYZ-kQ.js +0 -2
- package/dist/client/assets/mermaid-parser.core-DyzS6net.js +0 -4
- package/dist/client/assets/packet-YPE3B663-D4pLqEWp.js +0 -1
- package/dist/client/assets/pie-LRSECV5Y-Cl1Syrbg.js +0 -1
- package/dist/client/assets/pieDiagram-4H26LBE5-Dsq8XbGX.js +0 -30
- package/dist/client/assets/radar-GUYGQ44K-DJuoaUBO.js +0 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-Cags9ZgQ.js +0 -1
- package/dist/client/assets/treeView-BLDUP644-DsanmcrA.js +0 -1
- package/dist/client/assets/treemap-LRROVOQU-CCkKzd8F.js +0 -1
- package/dist/client/assets/wardley-L42UT6IY-BuMHDenj.js +0 -1
- package/dist/client/site-data/blobs/080c0e6/cHVibGljL3NpdGUtZGF0YS9vZy1pbWFnZS5wbmc.png +0 -0
- package/dist/client/site-data/blobs/55f23a1/bGFuZGluZy9wdWJsaWMvZGlmaXQvbG9nby5wbmc.png +0 -0
- package/dist/client/site-data/blobs/66ff7c6/cHVibGljL2xvZ28ucG5n.png +0 -0
- package/dist/client/site-data/blobs/e6977fe/cHVibGljL2xvZ28ucG5n.png +0 -0
- package/dist/client/site-data/manifest.json +0 -1
- package/dist/client/site-data/og-image.png +0 -0
- package/dist/client/site-data/snapshots/55f23a1...080c0e6.json +0 -1
- package/dist/client/site-data/snapshots/66ff7c6...e6977fe.json +0 -1
- package/dist/client/site-data/snapshots/7d40fd4...a72112f-comments.json +0 -1
- package/dist/client/site-data/snapshots/7d40fd4...a72112f.json +0 -1
- /package/dist/client/assets/{array-yLZkcI6Y.js → array-BifhSqXX.js} +0 -0
- /package/dist/client/assets/{defaultLocale-Bld4b7vH.js → defaultLocale-C8Fc0cco.js} +0 -0
- /package/dist/client/assets/{graphlib-DkOQ9ah2.js → graphlib-B8gBHxth.js} +0 -0
- /package/dist/client/assets/{init-rddNFwID.js → init-D6jRqBbL.js} +0 -0
- /package/dist/client/assets/{katex-Du_qQZ_j.js → katex-Vhh-h91d.js} +0 -0
- /package/dist/client/assets/{path-BJQEcSo7.js → path-BWPyau1x.js} +0 -0
- /package/dist/client/assets/{prism-bash-ElxVK2UI.js → prism-bash-D6zCJ74D.js} +0 -0
- /package/dist/client/assets/{prism-clojure-Coed_dlT.js → prism-clojure-_z-zoNcE.js} +0 -0
- /package/dist/client/assets/{prism-csharp-BvoTEt-U.js → prism-csharp-XPn2bw0d.js} +0 -0
- /package/dist/client/assets/{prism-dart-59mV4Nzl.js → prism-dart-CDv16Fbu.js} +0 -0
- /package/dist/client/assets/{prism-elixir-VMbXB0ch.js → prism-elixir-DhHhV5Rj.js} +0 -0
- /package/dist/client/assets/{prism-haskell-DbMQ4t9D.js → prism-haskell-5hq1Nh9c.js} +0 -0
- /package/dist/client/assets/{prism-hcl-DaTFd4M9.js → prism-hcl-B6Z0Ouoo.js} +0 -0
- /package/dist/client/assets/{prism-java-Bvhe07ID.js → prism-java-6wtusvIl.js} +0 -0
- /package/dist/client/assets/{prism-markup-templating-DOf10VS2.js → prism-markup-templating-KkSMBj6Y.js} +0 -0
- /package/dist/client/assets/{prism-nix-CNZSWapd.js → prism-nix-C88dTX93.js} +0 -0
- /package/dist/client/assets/{prism-perl-ZBgEPf6s.js → prism-perl-Lsbi34sH.js} +0 -0
- /package/dist/client/assets/{prism-php-CBX1LG5n.js → prism-php-Co4fM40K.js} +0 -0
- /package/dist/client/assets/{prism-protobuf-KYCaTc8s.js → prism-protobuf-yzSHlhwy.js} +0 -0
- /package/dist/client/assets/{prism-ruby-Dtn_AROP.js → prism-ruby-DFCASkuD.js} +0 -0
- /package/dist/client/assets/{prism-scala-B4gvAG5X.js → prism-scala-VkM3wCOL.js} +0 -0
- /package/dist/client/assets/{prism-solidity-BS9JVLL6.js → prism-solidity-DTom4k5p.js} +0 -0
- /package/dist/client/assets/{prism-sql-DL_NEVBy.js → prism-sql-CYhVDMEE.js} +0 -0
- /package/dist/client/assets/{prism-vim-DqdsfG3_.js → prism-vim-BgpkjCK5.js} +0 -0
- /package/dist/client/assets/{rough.esm-KjoEK0it.js → rough.esm-CSKSodPl.js} +0 -0
|
@@ -2,11 +2,11 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
|
2
2
|
`,`\r
|
|
3
3
|
`,`\r`],(function(e){function t(e,t,n,r){return new ht(e,t,n,r)}o(t,`create`),e.create=t;function n(e){let t=e;return!!(k.defined(t)&&k.string(t.uri)&&(k.undefined(t.languageId)||k.string(t.languageId))&&k.uinteger(t.lineCount)&&k.func(t.getText)&&k.func(t.positionAt)&&k.func(t.offsetAt))}o(n,`is`),e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}o(r,`applyEdits`),e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,c=0;for(;o<r.length&&s<a.length;)t(r[o],a[s])<=0?e[c++]=r[o++]:e[c++]=a[s++];for(;o<r.length;)e[c++]=r[o++];for(;s<a.length;)e[c++]=a[s++];return e}o(i,`mergeSort`)})(mt||={}),ht=class{static{o(this,`FullTextDocument`)}constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&=(e.push(r),!1);let i=t.charAt(r);n=i===`\r`||i===`
|
|
4
4
|
`,i===`\r`&&r+1<t.length&&t.charAt(r+1)===`
|
|
5
|
-
`&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return y.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return y.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}},(function(e){let t=Object.prototype.toString;function n(e){return e!==void 0}o(n,`defined`),e.defined=n;function r(e){return e===void 0}o(r,`undefined`),e.undefined=r;function i(e){return e===!0||e===!1}o(i,`boolean`),e.boolean=i;function a(e){return t.call(e)===`[object String]`}o(a,`string`),e.string=a;function s(e){return t.call(e)===`[object Number]`}o(s,`number`),e.number=s;function c(e,n,r){return t.call(e)===`[object Number]`&&n<=e&&e<=r}o(c,`numberRange`),e.numberRange=c;function l(e){return t.call(e)===`[object Number]`&&-2147483648<=e&&e<=2147483647}o(l,`integer`),e.integer=l;function u(e){return t.call(e)===`[object Number]`&&0<=e&&e<=2147483647}o(u,`uinteger`),e.uinteger=u;function d(e){return t.call(e)===`[object Function]`}o(d,`func`),e.func=d;function f(e){return typeof e==`object`&&!!e}o(f,`objectLiteral`),e.objectLiteral=f;function p(e,t){return Array.isArray(e)&&e.every(t)}o(p,`typedArray`),e.typedArray=p})(k||={})}}),_t=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){Object.defineProperty(e,`__esModule`,{value:!0});var t;function n(){if(t===void 0)throw Error(`No runtime abstraction layer installed`);return t}o(n,`RAL`),(function(e){function n(e){if(e===void 0)throw Error(`No runtime abstraction layer provided`);t=e}o(n,`install`),e.install=n})(n||={}),e.default=n}}),vt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}o(t,`boolean`),e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}o(n,`string`),e.string=n;function r(e){return typeof e==`number`||e instanceof Number}o(r,`number`),e.number=r;function i(e){return e instanceof Error}o(i,`error`),e.error=i;function a(e){return typeof e==`function`}o(a,`func`),e.func=a;function s(e){return Array.isArray(e)}o(s,`array`),e.array=s;function c(e){return s(e)&&e.every(e=>n(e))}o(c,`stringArray`),e.stringArray=c}}),yt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.Emitter=e.Event=void 0;var t=_t(),n;(function(e){let t={dispose(){}};e.None=function(){return t}})(n||(e.Event=n={}));var r=class{static{o(this,`CallbackList`)}add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:o(()=>this.remove(e,t),`dispose`)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===e)if(this._contexts[r]===t){this._callbacks.splice(r,1),this._contexts.splice(r,1);return}else n=!0;if(n)throw Error(`When adding a listener with a context, you should remove it with the same context`)}invoke(...e){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let a=0,o=r.length;a<o;a++)try{n.push(r[a].apply(i[a],e))}catch(e){(0,t.default)().console.error(e)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},i=class e{static{o(this,`Emitter`)}constructor(e){this._options=e}get event(){return this._event||=(t,n,i)=>{this._callbacks||=new r,this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let a={dispose:o(()=>{this._callbacks&&(this._callbacks.remove(t,n),a.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},`dispose`)};return Array.isArray(i)&&i.push(a),a},this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&=(this._callbacks.dispose(),void 0)}};e.Emitter=i,i._noop=function(){}}}),bt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t=_t(),n=vt(),r=yt(),i;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r.Event.None});function t(t){let r=t;return r&&(r===e.None||r===e.Cancelled||n.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}o(t,`is`),e.is=t})(i||(e.CancellationToken=i={}));var a=Object.freeze(function(e,n){let r=(0,t.default)().timer.setTimeout(e.bind(n),0);return{dispose(){r.dispose()}}}),s=class{static{o(this,`MutableToken`)}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||=new r.Emitter,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),void 0)}};e.CancellationTokenSource=class{static{o(this,`CancellationTokenSource`)}get token(){return this._token||=new s,this._token}cancel(){this._token?this._token.cancel():this._token=i.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=i.None}}}}),xt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var t=vt(),n;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(n||(e.ErrorCodes=n={})),e.ResponseError=class e extends Error{static{o(this,`ResponseError`)}constructor(r,i,a){super(i),this.code=t.number(r)?r:n.UnknownErrorCode,this.data=a,Object.setPrototypeOf(this,e.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};var r=class e{static{o(this,`ParameterStructures`)}constructor(e){this.kind=e}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};e.ParameterStructures=r,r.auto=new r(`auto`),r.byPosition=new r(`byPosition`),r.byName=new r(`byName`);var i=class{static{o(this,`AbstractMessageSignature`)}constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return r.auto}};e.AbstractMessageSignature=i,e.RequestType0=class extends i{static{o(this,`RequestType0`)}constructor(e){super(e,0)}},e.RequestType=class extends i{static{o(this,`RequestType`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType1=class extends i{static{o(this,`RequestType1`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType2=class extends i{static{o(this,`RequestType2`)}constructor(e){super(e,2)}},e.RequestType3=class extends i{static{o(this,`RequestType3`)}constructor(e){super(e,3)}},e.RequestType4=class extends i{static{o(this,`RequestType4`)}constructor(e){super(e,4)}},e.RequestType5=class extends i{static{o(this,`RequestType5`)}constructor(e){super(e,5)}},e.RequestType6=class extends i{static{o(this,`RequestType6`)}constructor(e){super(e,6)}},e.RequestType7=class extends i{static{o(this,`RequestType7`)}constructor(e){super(e,7)}},e.RequestType8=class extends i{static{o(this,`RequestType8`)}constructor(e){super(e,8)}},e.RequestType9=class extends i{static{o(this,`RequestType9`)}constructor(e){super(e,9)}},e.NotificationType=class extends i{static{o(this,`NotificationType`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType0=class extends i{static{o(this,`NotificationType0`)}constructor(e){super(e,0)}},e.NotificationType1=class extends i{static{o(this,`NotificationType1`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType2=class extends i{static{o(this,`NotificationType2`)}constructor(e){super(e,2)}},e.NotificationType3=class extends i{static{o(this,`NotificationType3`)}constructor(e){super(e,3)}},e.NotificationType4=class extends i{static{o(this,`NotificationType4`)}constructor(e){super(e,4)}},e.NotificationType5=class extends i{static{o(this,`NotificationType5`)}constructor(e){super(e,5)}},e.NotificationType6=class extends i{static{o(this,`NotificationType6`)}constructor(e){super(e,6)}},e.NotificationType7=class extends i{static{o(this,`NotificationType7`)}constructor(e){super(e,7)}},e.NotificationType8=class extends i{static{o(this,`NotificationType8`)}constructor(e){super(e,8)}},e.NotificationType9=class extends i{static{o(this,`NotificationType9`)}constructor(e){super(e,9)}};var a;(function(e){function n(e){let n=e;return n&&t.string(n.method)&&(t.string(n.id)||t.number(n.id))}o(n,`isRequest`),e.isRequest=n;function r(e){let n=e;return n&&t.string(n.method)&&e.id===void 0}o(r,`isNotification`),e.isNotification=r;function i(e){let n=e;return n&&(n.result!==void 0||!!n.error)&&(t.string(n.id)||t.number(n.id)||n.id===null)}o(i,`isResponse`),e.isResponse=i})(a||(e.Message=a={}))}}),St=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){var t;Object.defineProperty(e,`__esModule`,{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var n;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(n||(e.Touch=n={}));var r=class{static{o(this,`LinkedMap`)}constructor(){this[t]=`LinkedMap`,this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=n.None){let r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;case n.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error(`Invalid list`);let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw Error(`LinkedMap got modified during iteration.`);r=r.next}}keys(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:o(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.key,done:!1};return t=t.next,e}else return{value:void 0,done:!0}},`next`)};return n}values(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:o(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.value,done:!1};return t=t.next,e}else return{value:void 0,done:!0}},`next`)};return n}entries(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:o(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:[t.key,t.value],done:!1};return t=t.next,e}else return{value:void 0,done:!0}},`next`)};return n}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw Error(`Invalid list`);this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw Error(`Invalid list`);this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw Error(`Invalid list`);e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error(`Invalid list`);e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw Error(`Invalid list`);t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw Error(`Invalid list`);if(!(t!==n.First&&t!==n.Last)){if(t===n.First){if(e===this._head)return;let t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;let t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}};e.LinkedMap=r,e.LRUCache=class extends r{static{o(this,`LRUCache`)}constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}}}),Ct=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.Disposable=void 0;var t;(function(e){function t(e){return{dispose:e}}o(t,`create`),e.create=t})(t||(e.Disposable=t={}))}}),wt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=bt(),n;(function(e){e.Continue=0,e.Cancelled=1})(n||={}),e.SharedArraySenderStrategy=class{static{o(this,`SharedArraySenderStrategy`)}constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=n.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,n.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};var r=class{static{o(this,`SharedArrayBufferCancellationToken`)}constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===n.Cancelled}get onCancellationRequested(){throw Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`)}},i=class{static{o(this,`SharedArrayBufferCancellationTokenSource`)}constructor(e){this.token=new r(e)}cancel(){}dispose(){}};e.SharedArrayReceiverStrategy=class{static{o(this,`SharedArrayReceiverStrategy`)}constructor(){this.kind=`request`}createCancellationTokenSource(e){let n=e.$cancellationData;return n===void 0?new t.CancellationTokenSource:new i(n)}}}}),Tt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.Semaphore=void 0;var t=_t();e.Semaphore=class{static{o(this,`Semaphore`)}constructor(e=1){if(e<=0)throw Error(`Capacity must be greater than 0`);this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error(`To many thunks active`);try{let t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}}}),Et=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var t=_t(),n=vt(),r=yt(),i=Tt(),a;(function(e){function t(e){let t=e;return t&&n.func(t.listen)&&n.func(t.dispose)&&n.func(t.onError)&&n.func(t.onClose)&&n.func(t.onPartialMessage)}o(t,`is`),e.is=t})(a||(e.MessageReader=a={}));var s=class{static{o(this,`AbstractMessageReader`)}constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:Error(`Reader received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageReader=s;var c;(function(e){function n(e){let n,r,i=new Map,a,o=new Map;if(e===void 0||typeof e==`string`)n=e??`utf-8`;else{if(n=e.charset??`utf-8`,e.contentDecoder!==void 0&&(r=e.contentDecoder,i.set(r.name,r)),e.contentDecoders!==void 0)for(let t of e.contentDecoders)i.set(t.name,t);if(e.contentTypeDecoder!==void 0&&(a=e.contentTypeDecoder,o.set(a.name,a)),e.contentTypeDecoders!==void 0)for(let t of e.contentTypeDecoders)o.set(t.name,t)}return a===void 0&&(a=(0,t.default)().applicationJson.decoder,o.set(a.name,a)),{charset:n,contentDecoder:r,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:o}}o(n,`fromOptions`),e.fromOptions=n})(c||={}),e.ReadableStreamMessageReader=class extends s{static{o(this,`ReadableStreamMessageReader`)}constructor(e,n){super(),this.readable=e,this.options=c.fromOptions(n),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let e=this.buffer.tryReadHeaders(!0);if(!e)return;let t=e.get(`content-length`);if(!t){this.fireError(Error(`Header must provide a Content-Length property.
|
|
6
|
-
${JSON.stringify(Object.fromEntries(e))}`));return}let n=parseInt(t);if(isNaN(n)){this.fireError(Error(`Content-Length value must be a number. Got ${t}`));return}this.nextMessageLength=n}let e=this.buffer.tryReadBody(this.nextMessageLength);if(e===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let t=this.options.contentDecoder===void 0?e:await this.options.contentDecoder.decode(e),n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&=(this.partialMessageTimer.dispose(),void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}}}),Dt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){Object.defineProperty(e
|
|
7
|
-
`,c;(function(e){function t(e){let t=e;return t&&n.func(t.dispose)&&n.func(t.onClose)&&n.func(t.onError)&&n.func(t.write)}o(t,`is`),e.is=t})(c||(e.MessageWriter=c={}));var l=class{static{o(this,`AbstractMessageWriter`)}constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:Error(`Writer received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageWriter=l;var u;(function(e){function n(e){return e===void 0||typeof e==`string`?{charset:e??`utf-8`,contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:e.charset??`utf-8`,contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}o(n,`fromOptions`),e.fromOptions=n})(u||={}),e.WriteableStreamMessageWriter=class extends l{static{o(this,`WriteableStreamMessageWriter`)}constructor(e,t){super(),this.writable=e,this.options=u.fromOptions(t),this.errorCount=0,this.writeSemaphore=new r.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>this.options.contentEncoder===void 0?e:this.options.contentEncoder.encode(e)).then(t=>{let n=[];return n.push(a,t.byteLength.toString(),s),n.push(s),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(``),`ascii`),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}}}),Ot=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){Object.defineProperty(e
|
|
5
|
+
`&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return y.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return y.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}},(function(e){let t=Object.prototype.toString;function n(e){return e!==void 0}o(n,`defined`),e.defined=n;function r(e){return e===void 0}o(r,`undefined`),e.undefined=r;function i(e){return e===!0||e===!1}o(i,`boolean`),e.boolean=i;function a(e){return t.call(e)===`[object String]`}o(a,`string`),e.string=a;function s(e){return t.call(e)===`[object Number]`}o(s,`number`),e.number=s;function c(e,n,r){return t.call(e)===`[object Number]`&&n<=e&&e<=r}o(c,`numberRange`),e.numberRange=c;function l(e){return t.call(e)===`[object Number]`&&-2147483648<=e&&e<=2147483647}o(l,`integer`),e.integer=l;function u(e){return t.call(e)===`[object Number]`&&0<=e&&e<=2147483647}o(u,`uinteger`),e.uinteger=u;function d(e){return t.call(e)===`[object Function]`}o(d,`func`),e.func=d;function f(e){return typeof e==`object`&&!!e}o(f,`objectLiteral`),e.objectLiteral=f;function p(e,t){return Array.isArray(e)&&e.every(t)}o(p,`typedArray`),e.typedArray=p})(k||={})}}),_t=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t;function n(){if(t===void 0)throw Error(`No runtime abstraction layer installed`);return t}o(n,`RAL`),(function(e){function n(e){if(e===void 0)throw Error(`No runtime abstraction layer provided`);t=e}o(n,`install`),e.install=n})(n||={}),e.default=n}}),vt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}o(t,`boolean`),e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}o(n,`string`),e.string=n;function r(e){return typeof e==`number`||e instanceof Number}o(r,`number`),e.number=r;function i(e){return e instanceof Error}o(i,`error`),e.error=i;function a(e){return typeof e==`function`}o(a,`func`),e.func=a;function s(e){return Array.isArray(e)}o(s,`array`),e.array=s;function c(e){return s(e)&&e.every(e=>n(e))}o(c,`stringArray`),e.stringArray=c}}),yt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var t=_t(),n;(function(e){let t={dispose(){}};e.None=function(){return t}})(n||(e.Event=n={}));var r=class{static{o(this,`CallbackList`)}add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:o(()=>this.remove(e,t),`dispose`)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===e)if(this._contexts[r]===t){this._callbacks.splice(r,1),this._contexts.splice(r,1);return}else n=!0;if(n)throw Error(`When adding a listener with a context, you should remove it with the same context`)}invoke(...e){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let a=0,o=r.length;a<o;a++)try{n.push(r[a].apply(i[a],e))}catch(e){(0,t.default)().console.error(e)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},i=class e{static{o(this,`Emitter`)}constructor(e){this._options=e}get event(){return this._event||=(t,n,i)=>{this._callbacks||=new r,this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let a={dispose:o(()=>{this._callbacks&&(this._callbacks.remove(t,n),a.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},`dispose`)};return Array.isArray(i)&&i.push(a),a},this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&=(this._callbacks.dispose(),void 0)}};e.Emitter=i,i._noop=function(){}}}),bt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t=_t(),n=vt(),r=yt(),i;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r.Event.None});function t(t){let r=t;return r&&(r===e.None||r===e.Cancelled||n.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}o(t,`is`),e.is=t})(i||(e.CancellationToken=i={}));var a=Object.freeze(function(e,n){let r=(0,t.default)().timer.setTimeout(e.bind(n),0);return{dispose(){r.dispose()}}}),s=class{static{o(this,`MutableToken`)}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||=new r.Emitter,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),void 0)}};e.CancellationTokenSource=class{static{o(this,`CancellationTokenSource`)}get token(){return this._token||=new s,this._token}cancel(){this._token?this._token.cancel():this._token=i.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=i.None}}}}),xt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var t=vt(),n;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(n||(e.ErrorCodes=n={})),e.ResponseError=class e extends Error{static{o(this,`ResponseError`)}constructor(r,i,a){super(i),this.code=t.number(r)?r:n.UnknownErrorCode,this.data=a,Object.setPrototypeOf(this,e.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};var r=class e{static{o(this,`ParameterStructures`)}constructor(e){this.kind=e}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};e.ParameterStructures=r,r.auto=new r(`auto`),r.byPosition=new r(`byPosition`),r.byName=new r(`byName`);var i=class{static{o(this,`AbstractMessageSignature`)}constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return r.auto}};e.AbstractMessageSignature=i,e.RequestType0=class extends i{static{o(this,`RequestType0`)}constructor(e){super(e,0)}},e.RequestType=class extends i{static{o(this,`RequestType`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType1=class extends i{static{o(this,`RequestType1`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType2=class extends i{static{o(this,`RequestType2`)}constructor(e){super(e,2)}},e.RequestType3=class extends i{static{o(this,`RequestType3`)}constructor(e){super(e,3)}},e.RequestType4=class extends i{static{o(this,`RequestType4`)}constructor(e){super(e,4)}},e.RequestType5=class extends i{static{o(this,`RequestType5`)}constructor(e){super(e,5)}},e.RequestType6=class extends i{static{o(this,`RequestType6`)}constructor(e){super(e,6)}},e.RequestType7=class extends i{static{o(this,`RequestType7`)}constructor(e){super(e,7)}},e.RequestType8=class extends i{static{o(this,`RequestType8`)}constructor(e){super(e,8)}},e.RequestType9=class extends i{static{o(this,`RequestType9`)}constructor(e){super(e,9)}},e.NotificationType=class extends i{static{o(this,`NotificationType`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType0=class extends i{static{o(this,`NotificationType0`)}constructor(e){super(e,0)}},e.NotificationType1=class extends i{static{o(this,`NotificationType1`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType2=class extends i{static{o(this,`NotificationType2`)}constructor(e){super(e,2)}},e.NotificationType3=class extends i{static{o(this,`NotificationType3`)}constructor(e){super(e,3)}},e.NotificationType4=class extends i{static{o(this,`NotificationType4`)}constructor(e){super(e,4)}},e.NotificationType5=class extends i{static{o(this,`NotificationType5`)}constructor(e){super(e,5)}},e.NotificationType6=class extends i{static{o(this,`NotificationType6`)}constructor(e){super(e,6)}},e.NotificationType7=class extends i{static{o(this,`NotificationType7`)}constructor(e){super(e,7)}},e.NotificationType8=class extends i{static{o(this,`NotificationType8`)}constructor(e){super(e,8)}},e.NotificationType9=class extends i{static{o(this,`NotificationType9`)}constructor(e){super(e,9)}};var a;(function(e){function n(e){let n=e;return n&&t.string(n.method)&&(t.string(n.id)||t.number(n.id))}o(n,`isRequest`),e.isRequest=n;function r(e){let n=e;return n&&t.string(n.method)&&e.id===void 0}o(r,`isNotification`),e.isNotification=r;function i(e){let n=e;return n&&(n.result!==void 0||!!n.error)&&(t.string(n.id)||t.number(n.id)||n.id===null)}o(i,`isResponse`),e.isResponse=i})(a||(e.Message=a={}))}}),St=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var n;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(n||(e.Touch=n={}));var r=class{static{o(this,`LinkedMap`)}constructor(){this[t]=`LinkedMap`,this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=n.None){let r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;case n.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error(`Invalid list`);let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw Error(`LinkedMap got modified during iteration.`);r=r.next}}keys(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:o(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.key,done:!1};return t=t.next,e}else return{value:void 0,done:!0}},`next`)};return n}values(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:o(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.value,done:!1};return t=t.next,e}else return{value:void 0,done:!0}},`next`)};return n}entries(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:o(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:[t.key,t.value],done:!1};return t=t.next,e}else return{value:void 0,done:!0}},`next`)};return n}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw Error(`Invalid list`);this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw Error(`Invalid list`);this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw Error(`Invalid list`);e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error(`Invalid list`);e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw Error(`Invalid list`);t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw Error(`Invalid list`);if(!(t!==n.First&&t!==n.Last)){if(t===n.First){if(e===this._head)return;let t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;let t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}};e.LinkedMap=r,e.LRUCache=class extends r{static{o(this,`LRUCache`)}constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}}}),Ct=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(e){function t(e){return{dispose:e}}o(t,`create`),e.create=t})(t||(e.Disposable=t={}))}}),wt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=bt(),n;(function(e){e.Continue=0,e.Cancelled=1})(n||={}),e.SharedArraySenderStrategy=class{static{o(this,`SharedArraySenderStrategy`)}constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=n.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,n.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};var r=class{static{o(this,`SharedArrayBufferCancellationToken`)}constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===n.Cancelled}get onCancellationRequested(){throw Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`)}},i=class{static{o(this,`SharedArrayBufferCancellationTokenSource`)}constructor(e){this.token=new r(e)}cancel(){}dispose(){}};e.SharedArrayReceiverStrategy=class{static{o(this,`SharedArrayReceiverStrategy`)}constructor(){this.kind=`request`}createCancellationTokenSource(e){let n=e.$cancellationData;return n===void 0?new t.CancellationTokenSource:new i(n)}}}}),Tt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=_t();e.Semaphore=class{static{o(this,`Semaphore`)}constructor(e=1){if(e<=0)throw Error(`Capacity must be greater than 0`);this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error(`To many thunks active`);try{let t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}}}),Et=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var t=_t(),n=vt(),r=yt(),i=Tt(),a;(function(e){function t(e){let t=e;return t&&n.func(t.listen)&&n.func(t.dispose)&&n.func(t.onError)&&n.func(t.onClose)&&n.func(t.onPartialMessage)}o(t,`is`),e.is=t})(a||(e.MessageReader=a={}));var s=class{static{o(this,`AbstractMessageReader`)}constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:Error(`Reader received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageReader=s;var c;(function(e){function n(e){let n,r,i=new Map,a,o=new Map;if(e===void 0||typeof e==`string`)n=e??`utf-8`;else{if(n=e.charset??`utf-8`,e.contentDecoder!==void 0&&(r=e.contentDecoder,i.set(r.name,r)),e.contentDecoders!==void 0)for(let t of e.contentDecoders)i.set(t.name,t);if(e.contentTypeDecoder!==void 0&&(a=e.contentTypeDecoder,o.set(a.name,a)),e.contentTypeDecoders!==void 0)for(let t of e.contentTypeDecoders)o.set(t.name,t)}return a===void 0&&(a=(0,t.default)().applicationJson.decoder,o.set(a.name,a)),{charset:n,contentDecoder:r,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:o}}o(n,`fromOptions`),e.fromOptions=n})(c||={}),e.ReadableStreamMessageReader=class extends s{static{o(this,`ReadableStreamMessageReader`)}constructor(e,n){super(),this.readable=e,this.options=c.fromOptions(n),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let e=this.buffer.tryReadHeaders(!0);if(!e)return;let t=e.get(`content-length`);if(!t){this.fireError(Error(`Header must provide a Content-Length property.
|
|
6
|
+
${JSON.stringify(Object.fromEntries(e))}`));return}let n=parseInt(t);if(isNaN(n)){this.fireError(Error(`Content-Length value must be a number. Got ${t}`));return}this.nextMessageLength=n}let e=this.buffer.tryReadBody(this.nextMessageLength);if(e===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let t=this.options.contentDecoder===void 0?e:await this.options.contentDecoder.decode(e),n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&=(this.partialMessageTimer.dispose(),void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}}}),Dt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=_t(),n=vt(),r=Tt(),i=yt(),a=`Content-Length: `,s=`\r
|
|
7
|
+
`,c;(function(e){function t(e){let t=e;return t&&n.func(t.dispose)&&n.func(t.onClose)&&n.func(t.onError)&&n.func(t.write)}o(t,`is`),e.is=t})(c||(e.MessageWriter=c={}));var l=class{static{o(this,`AbstractMessageWriter`)}constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:Error(`Writer received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageWriter=l;var u;(function(e){function n(e){return e===void 0||typeof e==`string`?{charset:e??`utf-8`,contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:e.charset??`utf-8`,contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}o(n,`fromOptions`),e.fromOptions=n})(u||={}),e.WriteableStreamMessageWriter=class extends l{static{o(this,`WriteableStreamMessageWriter`)}constructor(e,t){super(),this.writable=e,this.options=u.fromOptions(t),this.errorCount=0,this.writeSemaphore=new r.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>this.options.contentEncoder===void 0?e:this.options.contentEncoder.encode(e)).then(t=>{let n=[];return n.push(a,t.byteLength.toString(),s),n.push(s),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(``),`ascii`),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}}}),Ot=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=13,n=10,r=`\r
|
|
8
8
|
`;e.AbstractMessageBuffer=class{static{o(this,`AbstractMessageBuffer`)}constructor(e=`utf-8`){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e==`string`?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let i=0,a=0,o=0,s=0;row:for(;a<this._chunks.length;){let e=this._chunks[a];o=0;column:for(;o<e.length;){switch(e[o]){case t:switch(i){case 0:i=1;break;case 2:i=3;break;default:i=0}break;case n:switch(i){case 1:i=2;break;case 3:i=4,o++;break row;default:i=0}break;default:i=0}o++}s+=e.byteLength,a++}if(i!==4)return;let c=this._read(s+o),l=new Map,u=this.toString(c,`ascii`).split(r);if(u.length<2)return l;for(let t=0;t<u.length-2;t++){let n=u[t],r=n.indexOf(`:`);if(r===-1)throw Error(`Message header must separate key and value using ':'
|
|
9
|
-
${n}`);let i=n.substr(0,r),a=n.substr(r+1).trim();l.set(e?i.toLowerCase():i,a)}return l}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw Error(`Cannot read so many bytes!`);if(this._chunks[0].byteLength===e){let t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){let t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}let t=this.allocNative(e),n=0;for(;e>0;){let r=this._chunks[0];if(r.byteLength>e){let i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}}}),kt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var t=_t(),n=vt(),r=xt(),i=St(),a=yt(),s=bt(),c;(function(e){e.type=new r.NotificationType(`$/cancelRequest`)})(c||={});var l;(function(e){function t(e){return typeof e==`string`||typeof e==`number`}o(t,`is`),e.is=t})(l||(e.ProgressToken=l={}));var u;(function(e){e.type=new r.NotificationType(`$/progress`)})(u||={}),e.ProgressType=class{static{o(this,`ProgressType`)}constructor(){}};var d;(function(e){function t(e){return n.func(e)}o(t,`is`),e.is=t})(d||={}),e.NullLogger=Object.freeze({error:o(()=>{},`error`),warn:o(()=>{},`warn`),info:o(()=>{},`info`),log:o(()=>{},`log`)});var f;(function(e){e[e.Off=0]=`Off`,e[e.Messages=1]=`Messages`,e[e.Compact=2]=`Compact`,e[e.Verbose=3]=`Verbose`})(f||(e.Trace=f={}));var p;(function(e){e.Off=`off`,e.Messages=`messages`,e.Compact=`compact`,e.Verbose=`verbose`})(p||(e.TraceValues=p={})),(function(e){function t(t){if(!n.string(t))return e.Off;switch(t=t.toLowerCase(),t){case`off`:return e.Off;case`messages`:return e.Messages;case`compact`:return e.Compact;case`verbose`:return e.Verbose;default:return e.Off}}o(t,`fromString`),e.fromString=t;function r(t){switch(t){case e.Off:return`off`;case e.Messages:return`messages`;case e.Compact:return`compact`;case e.Verbose:return`verbose`;default:return`off`}}o(r,`toString`),e.toString=r})(f||(e.Trace=f={}));var m;(function(e){e.Text=`text`,e.JSON=`json`})(m||(e.TraceFormat=m={})),(function(e){function t(t){return n.string(t)?(t=t.toLowerCase(),t===`json`?e.JSON:e.Text):e.Text}o(t,`fromString`),e.fromString=t})(m||(e.TraceFormat=m={}));var h;(function(e){e.type=new r.NotificationType(`$/setTrace`)})(h||(e.SetTraceNotification=h={}));var g;(function(e){e.type=new r.NotificationType(`$/logTrace`)})(g||(e.LogTraceNotification=g={}));var _;(function(e){e[e.Closed=1]=`Closed`,e[e.Disposed=2]=`Disposed`,e[e.AlreadyListening=3]=`AlreadyListening`})(_||(e.ConnectionErrors=_={}));var v=class e extends Error{static{o(this,`ConnectionError`)}constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};e.ConnectionError=v;var y;(function(e){function t(e){let t=e;return t&&n.func(t.cancelUndispatched)}o(t,`is`),e.is=t})(y||(e.ConnectionStrategy=y={}));var b;(function(e){function t(e){let t=e;return t&&(t.kind===void 0||t.kind===`id`)&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}o(t,`is`),e.is=t})(b||(e.IdCancellationReceiverStrategy=b={}));var x;(function(e){function t(e){let t=e;return t&&t.kind===`request`&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}o(t,`is`),e.is=t})(x||(e.RequestCancellationReceiverStrategy=x={}));var ee;(function(e){e.Message=Object.freeze({createCancellationTokenSource(e){return new s.CancellationTokenSource}});function t(e){return b.is(e)||x.is(e)}o(t,`is`),e.is=t})(ee||(e.CancellationReceiverStrategy=ee={}));var S;(function(e){e.Message=Object.freeze({sendCancellation(e,t){return e.sendNotification(c.type,{id:t})},cleanup(e){}});function t(e){let t=e;return t&&n.func(t.sendCancellation)&&n.func(t.cleanup)}o(t,`is`),e.is=t})(S||(e.CancellationSenderStrategy=S={}));var te;(function(e){e.Message=Object.freeze({receiver:ee.Message,sender:S.Message});function t(e){let t=e;return t&&ee.is(t.receiver)&&S.is(t.sender)}o(t,`is`),e.is=t})(te||(e.CancellationStrategy=te={}));var ne;(function(e){function t(e){let t=e;return t&&n.func(t.handleMessage)}o(t,`is`),e.is=t})(ne||(e.MessageStrategy=ne={}));var C;(function(e){function t(e){let t=e;return t&&(te.is(t.cancellationStrategy)||y.is(t.connectionStrategy)||ne.is(t.messageStrategy))}o(t,`is`),e.is=t})(C||(e.ConnectionOptions=C={}));var re;(function(e){e[e.New=1]=`New`,e[e.Listening=2]=`Listening`,e[e.Closed=3]=`Closed`,e[e.Disposed=4]=`Disposed`})(re||={});function ie(p,y,x,ee){let S=x===void 0?e.NullLogger:x,C=0,ie=0,ae=0,oe,se=new Map,ce,le=new Map,ue=new Map,de,w=new i.LinkedMap,T=new Map,fe=new Set,E=new Map,D=f.Off,pe=m.Text,O,me=re.New,he=new a.Emitter,ge=new a.Emitter,_e=new a.Emitter,ve=new a.Emitter,ye=new a.Emitter,be=ee&&ee.cancellationStrategy?ee.cancellationStrategy:te.Message;function xe(e){if(e===null)throw Error(`Can't send requests with id null since the response can't be correlated.`);return`req-`+e.toString()}o(xe,`createRequestQueueKey`);function Se(e){return e===null?`res-unknown-`+(++ae).toString():`res-`+e.toString()}o(Se,`createResponseQueueKey`);function Ce(){return`not-`+(++ie).toString()}o(Ce,`createNotificationQueueKey`);function we(e,t){r.Message.isRequest(t)?e.set(xe(t.id),t):r.Message.isResponse(t)?e.set(Se(t.id),t):e.set(Ce(),t)}o(we,`addMessageToQueue`);function Te(e){}o(Te,`cancelUndispatched`);function Ee(){return me===re.Listening}o(Ee,`isListening`);function De(){return me===re.Closed}o(De,`isClosed`);function Oe(){return me===re.Disposed}o(Oe,`isDisposed`);function ke(){(me===re.New||me===re.Listening)&&(me=re.Closed,ge.fire(void 0))}o(ke,`closeHandler`);function Ae(e){he.fire([e,void 0,void 0])}o(Ae,`readErrorHandler`);function je(e){he.fire(e)}o(je,`writeErrorHandler`),p.onClose(ke),p.onError(Ae),y.onClose(ke),y.onError(je);function Me(){de||w.size===0||(de=(0,t.default)().timer.setImmediate(()=>{de=void 0,Pe()}))}o(Me,`triggerMessageQueue`);function Ne(e){r.Message.isRequest(e)?Ie(e):r.Message.isNotification(e)?Re(e):r.Message.isResponse(e)?Le(e):ze(e)}o(Ne,`handleMessage`);function Pe(){if(w.size===0)return;let e=w.shift();try{let t=ee?.messageStrategy;ne.is(t)?t.handleMessage(e,Ne):Ne(e)}finally{Me()}}o(Pe,`processMessageQueue`);let Fe=o(e=>{try{if(r.Message.isNotification(e)&&e.method===c.type.method){let t=e.params.id,n=xe(t),i=w.get(n);if(r.Message.isRequest(i)){let r=ee?.connectionStrategy,a=r&&r.cancelUndispatched?r.cancelUndispatched(i,Te):void 0;if(a&&(a.error!==void 0||a.result!==void 0)){w.delete(n),E.delete(t),a.id=i.id,Ue(a,e.method,Date.now()),y.write(a).catch(()=>S.error(`Sending response for canceled message failed.`));return}}let a=E.get(t);if(a!==void 0){a.cancel(),Ge(e);return}else fe.add(t)}we(w,e)}finally{Me()}},`callback`);function Ie(e){if(Oe())return;function t(t,n,i){let a={jsonrpc:`2.0`,id:e.id};t instanceof r.ResponseError?a.error=t.toJson():a.result=t===void 0?null:t,Ue(a,n,i),y.write(a).catch(()=>S.error(`Sending response failed.`))}o(t,`reply`);function i(t,n,r){let i={jsonrpc:`2.0`,id:e.id,error:t.toJson()};Ue(i,n,r),y.write(i).catch(()=>S.error(`Sending response failed.`))}o(i,`replyError`);function a(t,n,r){t===void 0&&(t=null);let i={jsonrpc:`2.0`,id:e.id,result:t};Ue(i,n,r),y.write(i).catch(()=>S.error(`Sending response failed.`))}o(a,`replySuccess`),We(e);let s=se.get(e.method),c,l;s&&(c=s.type,l=s.handler);let u=Date.now();if(l||oe){let o=e.id??String(Date.now()),s=b.is(be.receiver)?be.receiver.createCancellationTokenSource(o):be.receiver.createCancellationTokenSource(e);e.id!==null&&fe.has(e.id)&&s.cancel(),e.id!==null&&E.set(o,s);try{let d;if(l)if(e.params===void 0){if(c!==void 0&&c.numberOfParams!==0){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines ${c.numberOfParams} params but received none.`),e.method,u);return}d=l(s.token)}else if(Array.isArray(e.params)){if(c!==void 0&&c.parameterStructures===r.ParameterStructures.byName){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);return}d=l(...e.params,s.token)}else{if(c!==void 0&&c.parameterStructures===r.ParameterStructures.byPosition){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);return}d=l(e.params,s.token)}else oe&&(d=oe(e.method,e.params,s.token));let f=d;d?f.then?f.then(n=>{E.delete(o),t(n,e.method,u)},t=>{E.delete(o),t instanceof r.ResponseError?i(t,e.method,u):t&&n.string(t.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}):(E.delete(o),t(d,e.method,u)):(E.delete(o),a(d,e.method,u))}catch(a){E.delete(o),a instanceof r.ResponseError?t(a,e.method,u):a&&n.string(a.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${a.message}`),e.method,u):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else i(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}o(Ie,`handleRequest`);function Le(e){if(!Oe())if(e.id===null)e.error?S.error(`Received response message without id: Error is:
|
|
9
|
+
${n}`);let i=n.substr(0,r),a=n.substr(r+1).trim();l.set(e?i.toLowerCase():i,a)}return l}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw Error(`Cannot read so many bytes!`);if(this._chunks[0].byteLength===e){let t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){let t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}let t=this.allocNative(e),n=0;for(;e>0;){let r=this._chunks[0];if(r.byteLength>e){let i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}}}),kt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var t=_t(),n=vt(),r=xt(),i=St(),a=yt(),s=bt(),c;(function(e){e.type=new r.NotificationType(`$/cancelRequest`)})(c||={});var l;(function(e){function t(e){return typeof e==`string`||typeof e==`number`}o(t,`is`),e.is=t})(l||(e.ProgressToken=l={}));var u;(function(e){e.type=new r.NotificationType(`$/progress`)})(u||={}),e.ProgressType=class{static{o(this,`ProgressType`)}constructor(){}};var d;(function(e){function t(e){return n.func(e)}o(t,`is`),e.is=t})(d||={}),e.NullLogger=Object.freeze({error:o(()=>{},`error`),warn:o(()=>{},`warn`),info:o(()=>{},`info`),log:o(()=>{},`log`)});var f;(function(e){e[e.Off=0]=`Off`,e[e.Messages=1]=`Messages`,e[e.Compact=2]=`Compact`,e[e.Verbose=3]=`Verbose`})(f||(e.Trace=f={}));var p;(function(e){e.Off=`off`,e.Messages=`messages`,e.Compact=`compact`,e.Verbose=`verbose`})(p||(e.TraceValues=p={})),(function(e){function t(t){if(!n.string(t))return e.Off;switch(t=t.toLowerCase(),t){case`off`:return e.Off;case`messages`:return e.Messages;case`compact`:return e.Compact;case`verbose`:return e.Verbose;default:return e.Off}}o(t,`fromString`),e.fromString=t;function r(t){switch(t){case e.Off:return`off`;case e.Messages:return`messages`;case e.Compact:return`compact`;case e.Verbose:return`verbose`;default:return`off`}}o(r,`toString`),e.toString=r})(f||(e.Trace=f={}));var m;(function(e){e.Text=`text`,e.JSON=`json`})(m||(e.TraceFormat=m={})),(function(e){function t(t){return n.string(t)?(t=t.toLowerCase(),t===`json`?e.JSON:e.Text):e.Text}o(t,`fromString`),e.fromString=t})(m||(e.TraceFormat=m={}));var h;(function(e){e.type=new r.NotificationType(`$/setTrace`)})(h||(e.SetTraceNotification=h={}));var g;(function(e){e.type=new r.NotificationType(`$/logTrace`)})(g||(e.LogTraceNotification=g={}));var _;(function(e){e[e.Closed=1]=`Closed`,e[e.Disposed=2]=`Disposed`,e[e.AlreadyListening=3]=`AlreadyListening`})(_||(e.ConnectionErrors=_={}));var v=class e extends Error{static{o(this,`ConnectionError`)}constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};e.ConnectionError=v;var y;(function(e){function t(e){let t=e;return t&&n.func(t.cancelUndispatched)}o(t,`is`),e.is=t})(y||(e.ConnectionStrategy=y={}));var b;(function(e){function t(e){let t=e;return t&&(t.kind===void 0||t.kind===`id`)&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}o(t,`is`),e.is=t})(b||(e.IdCancellationReceiverStrategy=b={}));var x;(function(e){function t(e){let t=e;return t&&t.kind===`request`&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}o(t,`is`),e.is=t})(x||(e.RequestCancellationReceiverStrategy=x={}));var ee;(function(e){e.Message=Object.freeze({createCancellationTokenSource(e){return new s.CancellationTokenSource}});function t(e){return b.is(e)||x.is(e)}o(t,`is`),e.is=t})(ee||(e.CancellationReceiverStrategy=ee={}));var S;(function(e){e.Message=Object.freeze({sendCancellation(e,t){return e.sendNotification(c.type,{id:t})},cleanup(e){}});function t(e){let t=e;return t&&n.func(t.sendCancellation)&&n.func(t.cleanup)}o(t,`is`),e.is=t})(S||(e.CancellationSenderStrategy=S={}));var te;(function(e){e.Message=Object.freeze({receiver:ee.Message,sender:S.Message});function t(e){let t=e;return t&&ee.is(t.receiver)&&S.is(t.sender)}o(t,`is`),e.is=t})(te||(e.CancellationStrategy=te={}));var ne;(function(e){function t(e){let t=e;return t&&n.func(t.handleMessage)}o(t,`is`),e.is=t})(ne||(e.MessageStrategy=ne={}));var C;(function(e){function t(e){let t=e;return t&&(te.is(t.cancellationStrategy)||y.is(t.connectionStrategy)||ne.is(t.messageStrategy))}o(t,`is`),e.is=t})(C||(e.ConnectionOptions=C={}));var re;(function(e){e[e.New=1]=`New`,e[e.Listening=2]=`Listening`,e[e.Closed=3]=`Closed`,e[e.Disposed=4]=`Disposed`})(re||={});function ie(p,y,x,ee){let S=x===void 0?e.NullLogger:x,C=0,ie=0,ae=0,oe,se=new Map,ce,le=new Map,ue=new Map,de,w=new i.LinkedMap,T=new Map,fe=new Set,E=new Map,D=f.Off,pe=m.Text,O,me=re.New,he=new a.Emitter,ge=new a.Emitter,_e=new a.Emitter,ve=new a.Emitter,ye=new a.Emitter,be=ee&&ee.cancellationStrategy?ee.cancellationStrategy:te.Message;function xe(e){if(e===null)throw Error(`Can't send requests with id null since the response can't be correlated.`);return`req-`+e.toString()}o(xe,`createRequestQueueKey`);function Se(e){return e===null?`res-unknown-`+(++ae).toString():`res-`+e.toString()}o(Se,`createResponseQueueKey`);function Ce(){return`not-`+(++ie).toString()}o(Ce,`createNotificationQueueKey`);function we(e,t){r.Message.isRequest(t)?e.set(xe(t.id),t):r.Message.isResponse(t)?e.set(Se(t.id),t):e.set(Ce(),t)}o(we,`addMessageToQueue`);function Te(e){}o(Te,`cancelUndispatched`);function Ee(){return me===re.Listening}o(Ee,`isListening`);function De(){return me===re.Closed}o(De,`isClosed`);function Oe(){return me===re.Disposed}o(Oe,`isDisposed`);function ke(){(me===re.New||me===re.Listening)&&(me=re.Closed,ge.fire(void 0))}o(ke,`closeHandler`);function Ae(e){he.fire([e,void 0,void 0])}o(Ae,`readErrorHandler`);function je(e){he.fire(e)}o(je,`writeErrorHandler`),p.onClose(ke),p.onError(Ae),y.onClose(ke),y.onError(je);function Me(){de||w.size===0||(de=(0,t.default)().timer.setImmediate(()=>{de=void 0,Pe()}))}o(Me,`triggerMessageQueue`);function Ne(e){r.Message.isRequest(e)?Ie(e):r.Message.isNotification(e)?Re(e):r.Message.isResponse(e)?Le(e):ze(e)}o(Ne,`handleMessage`);function Pe(){if(w.size===0)return;let e=w.shift();try{let t=ee?.messageStrategy;ne.is(t)?t.handleMessage(e,Ne):Ne(e)}finally{Me()}}o(Pe,`processMessageQueue`);let Fe=o(e=>{try{if(r.Message.isNotification(e)&&e.method===c.type.method){let t=e.params.id,n=xe(t),i=w.get(n);if(r.Message.isRequest(i)){let r=ee?.connectionStrategy,a=r&&r.cancelUndispatched?r.cancelUndispatched(i,Te):void 0;if(a&&(a.error!==void 0||a.result!==void 0)){w.delete(n),E.delete(t),a.id=i.id,Ue(a,e.method,Date.now()),y.write(a).catch(()=>S.error(`Sending response for canceled message failed.`));return}}let a=E.get(t);if(a!==void 0){a.cancel(),Ge(e);return}else fe.add(t)}we(w,e)}finally{Me()}},`callback`);function Ie(e){if(Oe())return;function t(t,n,i){let a={jsonrpc:`2.0`,id:e.id};t instanceof r.ResponseError?a.error=t.toJson():a.result=t===void 0?null:t,Ue(a,n,i),y.write(a).catch(()=>S.error(`Sending response failed.`))}o(t,`reply`);function i(t,n,r){let i={jsonrpc:`2.0`,id:e.id,error:t.toJson()};Ue(i,n,r),y.write(i).catch(()=>S.error(`Sending response failed.`))}o(i,`replyError`);function a(t,n,r){t===void 0&&(t=null);let i={jsonrpc:`2.0`,id:e.id,result:t};Ue(i,n,r),y.write(i).catch(()=>S.error(`Sending response failed.`))}o(a,`replySuccess`),We(e);let s=se.get(e.method),c,l;s&&(c=s.type,l=s.handler);let u=Date.now();if(l||oe){let o=e.id??String(Date.now()),s=b.is(be.receiver)?be.receiver.createCancellationTokenSource(o):be.receiver.createCancellationTokenSource(e);e.id!==null&&fe.has(e.id)&&s.cancel(),e.id!==null&&E.set(o,s);try{let d;if(l)if(e.params===void 0){if(c!==void 0&&c.numberOfParams!==0){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines ${c.numberOfParams} params but received none.`),e.method,u);return}d=l(s.token)}else if(Array.isArray(e.params)){if(c!==void 0&&c.parameterStructures===r.ParameterStructures.byName){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);return}d=l(...e.params,s.token)}else{if(c!==void 0&&c.parameterStructures===r.ParameterStructures.byPosition){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);return}d=l(e.params,s.token)}else oe&&(d=oe(e.method,e.params,s.token));let f=d;d?f.then?f.then(n=>{E.delete(o),t(n,e.method,u)},t=>{E.delete(o),t instanceof r.ResponseError?i(t,e.method,u):t&&n.string(t.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}):(E.delete(o),t(d,e.method,u)):(E.delete(o),a(d,e.method,u))}catch(a){E.delete(o),a instanceof r.ResponseError?t(a,e.method,u):a&&n.string(a.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${a.message}`),e.method,u):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else i(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}o(Ie,`handleRequest`);function Le(e){if(!Oe())if(e.id===null)e.error?S.error(`Received response message without id: Error is:
|
|
10
10
|
${JSON.stringify(e.error,void 0,4)}`):S.error(`Received response message without id. No further error information provided.`);else{let t=e.id,n=T.get(t);if(Ke(e,n),n!==void 0){T.delete(t);try{if(e.error){let t=e.error;n.reject(new r.ResponseError(t.code,t.message,t.data))}else if(e.result!==void 0)n.resolve(e.result);else throw Error(`Should never happen.`)}catch(e){e.message?S.error(`Response handler '${n.method}' failed with message: ${e.message}`):S.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}o(Le,`handleResponse`);function Re(e){if(Oe())return;let t,n;if(e.method===c.type.method){let t=e.params.id;fe.delete(t),Ge(e);return}else{let r=le.get(e.method);r&&(n=r.handler,t=r.type)}if(n||ce)try{if(Ge(e),n)if(e.params===void 0)t!==void 0&&t.numberOfParams!==0&&t.parameterStructures!==r.ParameterStructures.byName&&S.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){let i=e.params;e.method===u.type.method&&i.length===2&&l.is(i[0])?n({token:i[0],value:i[1]}):(t!==void 0&&(t.parameterStructures===r.ParameterStructures.byName&&S.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&S.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${i.length} arguments`)),n(...i))}else t!==void 0&&t.parameterStructures===r.ParameterStructures.byPosition&&S.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else ce&&ce(e.method,e.params)}catch(t){t.message?S.error(`Notification handler '${e.method}' failed with message: ${t.message}`):S.error(`Notification handler '${e.method}' failed unexpectedly.`)}else _e.fire(e)}o(Re,`handleNotification`);function ze(e){if(!e){S.error(`Received empty message.`);return}S.error(`Received message which is neither a response nor a notification message:
|
|
11
11
|
${JSON.stringify(e,null,4)}`);let t=e;if(n.string(t.id)||n.number(t.id)){let e=t.id,n=T.get(e);n&&n.reject(Error(`The received response has neither a result nor an error property.`))}}o(ze,`handleInvalidMessage`);function Be(e){if(e!=null)switch(D){case f.Verbose:return JSON.stringify(e,null,4);case f.Compact:return JSON.stringify(e);default:return}}o(Be,`stringifyTrace`);function Ve(e){if(!(D===f.Off||!O))if(pe===m.Text){let t;(D===f.Verbose||D===f.Compact)&&e.params&&(t=`Params: ${Be(e.params)}
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ ${JSON.stringify(e,null,4)}`);let t=e;if(n.string(t.id)||n.number(t.id)){let e=t
|
|
|
32
32
|
|
|
33
33
|
`:e.error===void 0&&(n=`No result returned.
|
|
34
34
|
|
|
35
|
-
`)),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;O.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else O.log(`Received response ${e.id} without active response promise.`,n)}else qe(`receive-response`,e)}o(Ke,`traceReceivedResponse`);function qe(e,t){if(!O||D===f.Off)return;let n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};O.log(n)}o(qe,`logLSPMessage`);function Je(){if(De())throw new v(_.Closed,`Connection is closed.`);if(Oe())throw new v(_.Disposed,`Connection is disposed.`)}o(Je,`throwIfClosedOrDisposed`);function Ye(){if(Ee())throw new v(_.AlreadyListening,`Connection is already listening`)}o(Ye,`throwIfListening`);function Xe(){if(!Ee())throw Error(`Call listen() first.`)}o(Xe,`throwIfNotListening`);function Ze(e){return e===void 0?null:e}o(Ze,`undefinedToNull`);function Qe(e){if(e!==null)return e}o(Qe,`nullToUndefined`);function $e(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}o($e,`isNamedParam`);function et(e,t){switch(e){case r.ParameterStructures.auto:return $e(t)?Qe(t):[Ze(t)];case r.ParameterStructures.byName:if(!$e(t))throw Error(`Received parameters by name but param is not an object literal.`);return Qe(t);case r.ParameterStructures.byPosition:return[Ze(t)];default:throw Error(`Unknown parameter structure ${e.toString()}`)}}o(et,`computeSingleParam`);function tt(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=et(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(Ze(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null);break}return n}o(tt,`computeMessageParams`);let nt={sendNotification:o((e,...t)=>{Je();let i,a;if(n.string(e)){i=e;let n=t[0],o=0,s=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(o=1,s=n);let c=t.length,l=c-o;switch(l){case 0:a=void 0;break;case 1:a=et(s,t[o]);break;default:if(s===r.ParameterStructures.byName)throw Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);a=t.slice(o,c).map(e=>Ze(e));break}}else{let n=t;i=e.method,a=tt(e,n)}let o={jsonrpc:`2.0`,method:i,params:a};return He(o),y.write(o).catch(e=>{throw S.error(`Sending notification failed.`),e})},`sendNotification`),onNotification:o((e,t)=>{Je();let r;return n.func(e)?ce=e:t&&(n.string(e)?(r=e,le.set(e,{type:void 0,handler:t})):(r=e.method,le.set(e.method,{type:e,handler:t}))),{dispose:o(()=>{r===void 0?ce=void 0:le.delete(r)},`dispose`)}},`onNotification`),onProgress:o((e,t,n)=>{if(ue.has(t))throw Error(`Progress handler for token ${t} already registered`);return ue.set(t,n),{dispose:o(()=>{ue.delete(t)},`dispose`)}},`onProgress`),sendProgress:o((e,t,n)=>nt.sendNotification(u.type,{token:t,value:n}),`sendProgress`),onUnhandledProgress:ve.event,sendRequest:o((e,...t)=>{Je(),Xe();let i,a,c;if(n.string(e)){i=e;let n=t[0],o=t[t.length-1],l=0,u=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(l=1,u=n);let d=t.length;s.CancellationToken.is(o)&&(--d,c=o);let f=d-l;switch(f){case 0:a=void 0;break;case 1:a=et(u,t[l]);break;default:if(u===r.ParameterStructures.byName)throw Error(`Received ${f} parameters for 'by Name' request parameter structure.`);a=t.slice(l,d).map(e=>Ze(e));break}}else{let n=t;i=e.method,a=tt(e,n);let r=e.numberOfParams;c=s.CancellationToken.is(n[r])?n[r]:void 0}let l=C++,u;c&&(u=c.onCancellationRequested(()=>{let e=be.sender.sendCancellation(nt,l);return e===void 0?(S.log(`Received no promise from cancellation strategy when cancelling id ${l}`),Promise.resolve()):e.catch(()=>{S.log(`Sending cancellation messages for id ${l} failed`)})}));let d={jsonrpc:`2.0`,id:l,method:i,params:a};return Ve(d),typeof be.sender.enableCancellation==`function`&&be.sender.enableCancellation(d),new Promise(async(e,t)=>{let n=o(t=>{e(t),be.sender.cleanup(l),u?.dispose()},`resolveWithCleanup`),a=o(e=>{t(e),be.sender.cleanup(l),u?.dispose()},`rejectWithCleanup`),s={method:i,timerStart:Date.now(),resolve:n,reject:a};try{await y.write(d),T.set(l,s)}catch(e){throw S.error(`Sending request failed.`),s.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,e.message?e.message:`Unknown reason`)),e}})},`sendRequest`),onRequest:o((e,t)=>{Je();let r=null;return d.is(e)?(r=void 0,oe=e):n.string(e)?(r=null,t!==void 0&&(r=e,se.set(e,{handler:t,type:void 0}))):t!==void 0&&(r=e.method,se.set(e.method,{type:e,handler:t})),{dispose:o(()=>{r!==null&&(r===void 0?oe=void 0:se.delete(r))},`dispose`)}},`onRequest`),hasPendingResponse:o(()=>T.size>0,`hasPendingResponse`),trace:o(async(e,t,r)=>{let i=!1,a=m.Text;r!==void 0&&(n.boolean(r)?i=r:(i=r.sendNotification||!1,a=r.traceFormat||m.Text)),D=e,pe=a,O=D===f.Off?void 0:t,i&&!De()&&!Oe()&&await nt.sendNotification(h.type,{value:f.toString(e)})},`trace`),onError:he.event,onClose:ge.event,onUnhandledNotification:_e.event,onDispose:ye.event,end:o(()=>{y.end()},`end`),dispose:o(()=>{if(Oe())return;me=re.Disposed,ye.fire(void 0);let e=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let t of T.values())t.reject(e);T=new Map,E=new Map,fe=new Set,w=new i.LinkedMap,n.func(y.dispose)&&y.dispose(),n.func(p.dispose)&&p.dispose()},`dispose`),listen:o(()=>{Je(),Ye(),me=re.Listening,p.listen(Fe)},`listen`),inspect:o(()=>{(0,t.default)().console.log(`inspect`)},`inspect`)};return nt.onNotification(g.type,e=>{if(D===f.Off||!O)return;let t=D===f.Verbose||D===f.Compact;O.log(e.message,t?e.verbose:void 0)}),nt.onNotification(u.type,e=>{let t=ue.get(e.token);t?t(e.value):ve.fire(e)}),nt}o(ie,`createMessageConnection`),e.createMessageConnection=ie}}),At=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=xt();Object.defineProperty(e,`Message`,{enumerable:!0,get:o(function(){return t.Message},`get`)}),Object.defineProperty(e,`RequestType`,{enumerable:!0,get:o(function(){return t.RequestType},`get`)}),Object.defineProperty(e,`RequestType0`,{enumerable:!0,get:o(function(){return t.RequestType0},`get`)}),Object.defineProperty(e,`RequestType1`,{enumerable:!0,get:o(function(){return t.RequestType1},`get`)}),Object.defineProperty(e,`RequestType2`,{enumerable:!0,get:o(function(){return t.RequestType2},`get`)}),Object.defineProperty(e,`RequestType3`,{enumerable:!0,get:o(function(){return t.RequestType3},`get`)}),Object.defineProperty(e,`RequestType4`,{enumerable:!0,get:o(function(){return t.RequestType4},`get`)}),Object.defineProperty(e,`RequestType5`,{enumerable:!0,get:o(function(){return t.RequestType5},`get`)}),Object.defineProperty(e,`RequestType6`,{enumerable:!0,get:o(function(){return t.RequestType6},`get`)}),Object.defineProperty(e,`RequestType7`,{enumerable:!0,get:o(function(){return t.RequestType7},`get`)}),Object.defineProperty(e,`RequestType8`,{enumerable:!0,get:o(function(){return t.RequestType8},`get`)}),Object.defineProperty(e,`RequestType9`,{enumerable:!0,get:o(function(){return t.RequestType9},`get`)}),Object.defineProperty(e,`ResponseError`,{enumerable:!0,get:o(function(){return t.ResponseError},`get`)}),Object.defineProperty(e,`ErrorCodes`,{enumerable:!0,get:o(function(){return t.ErrorCodes},`get`)}),Object.defineProperty(e,`NotificationType`,{enumerable:!0,get:o(function(){return t.NotificationType},`get`)}),Object.defineProperty(e,`NotificationType0`,{enumerable:!0,get:o(function(){return t.NotificationType0},`get`)}),Object.defineProperty(e,`NotificationType1`,{enumerable:!0,get:o(function(){return t.NotificationType1},`get`)}),Object.defineProperty(e,`NotificationType2`,{enumerable:!0,get:o(function(){return t.NotificationType2},`get`)}),Object.defineProperty(e,`NotificationType3`,{enumerable:!0,get:o(function(){return t.NotificationType3},`get`)}),Object.defineProperty(e,`NotificationType4`,{enumerable:!0,get:o(function(){return t.NotificationType4},`get`)}),Object.defineProperty(e,`NotificationType5`,{enumerable:!0,get:o(function(){return t.NotificationType5},`get`)}),Object.defineProperty(e,`NotificationType6`,{enumerable:!0,get:o(function(){return t.NotificationType6},`get`)}),Object.defineProperty(e,`NotificationType7`,{enumerable:!0,get:o(function(){return t.NotificationType7},`get`)}),Object.defineProperty(e,`NotificationType8`,{enumerable:!0,get:o(function(){return t.NotificationType8},`get`)}),Object.defineProperty(e,`NotificationType9`,{enumerable:!0,get:o(function(){return t.NotificationType9},`get`)}),Object.defineProperty(e,`ParameterStructures`,{enumerable:!0,get:o(function(){return t.ParameterStructures},`get`)});var n=St();Object.defineProperty(e,`LinkedMap`,{enumerable:!0,get:o(function(){return n.LinkedMap},`get`)}),Object.defineProperty(e,`LRUCache`,{enumerable:!0,get:o(function(){return n.LRUCache},`get`)}),Object.defineProperty(e,`Touch`,{enumerable:!0,get:o(function(){return n.Touch},`get`)});var r=Ct();Object.defineProperty(e,`Disposable`,{enumerable:!0,get:o(function(){return r.Disposable},`get`)});var i=yt();Object.defineProperty(e,`Event`,{enumerable:!0,get:o(function(){return i.Event},`get`)}),Object.defineProperty(e,`Emitter`,{enumerable:!0,get:o(function(){return i.Emitter},`get`)});var a=bt();Object.defineProperty(e,`CancellationTokenSource`,{enumerable:!0,get:o(function(){return a.CancellationTokenSource},`get`)}),Object.defineProperty(e,`CancellationToken`,{enumerable:!0,get:o(function(){return a.CancellationToken},`get`)});var s=wt();Object.defineProperty(e,`SharedArraySenderStrategy`,{enumerable:!0,get:o(function(){return s.SharedArraySenderStrategy},`get`)}),Object.defineProperty(e,`SharedArrayReceiverStrategy`,{enumerable:!0,get:o(function(){return s.SharedArrayReceiverStrategy},`get`)});var c=Et();Object.defineProperty(e,`MessageReader`,{enumerable:!0,get:o(function(){return c.MessageReader},`get`)}),Object.defineProperty(e,`AbstractMessageReader`,{enumerable:!0,get:o(function(){return c.AbstractMessageReader},`get`)}),Object.defineProperty(e,`ReadableStreamMessageReader`,{enumerable:!0,get:o(function(){return c.ReadableStreamMessageReader},`get`)});var l=Dt();Object.defineProperty(e,`MessageWriter`,{enumerable:!0,get:o(function(){return l.MessageWriter},`get`)}),Object.defineProperty(e,`AbstractMessageWriter`,{enumerable:!0,get:o(function(){return l.AbstractMessageWriter},`get`)}),Object.defineProperty(e,`WriteableStreamMessageWriter`,{enumerable:!0,get:o(function(){return l.WriteableStreamMessageWriter},`get`)});var u=Ot();Object.defineProperty(e,`AbstractMessageBuffer`,{enumerable:!0,get:o(function(){return u.AbstractMessageBuffer},`get`)});var d=kt();Object.defineProperty(e,`ConnectionStrategy`,{enumerable:!0,get:o(function(){return d.ConnectionStrategy},`get`)}),Object.defineProperty(e,`ConnectionOptions`,{enumerable:!0,get:o(function(){return d.ConnectionOptions},`get`)}),Object.defineProperty(e,`NullLogger`,{enumerable:!0,get:o(function(){return d.NullLogger},`get`)}),Object.defineProperty(e,`createMessageConnection`,{enumerable:!0,get:o(function(){return d.createMessageConnection},`get`)}),Object.defineProperty(e,`ProgressToken`,{enumerable:!0,get:o(function(){return d.ProgressToken},`get`)}),Object.defineProperty(e,`ProgressType`,{enumerable:!0,get:o(function(){return d.ProgressType},`get`)}),Object.defineProperty(e,`Trace`,{enumerable:!0,get:o(function(){return d.Trace},`get`)}),Object.defineProperty(e,`TraceValues`,{enumerable:!0,get:o(function(){return d.TraceValues},`get`)}),Object.defineProperty(e,`TraceFormat`,{enumerable:!0,get:o(function(){return d.TraceFormat},`get`)}),Object.defineProperty(e,`SetTraceNotification`,{enumerable:!0,get:o(function(){return d.SetTraceNotification},`get`)}),Object.defineProperty(e,`LogTraceNotification`,{enumerable:!0,get:o(function(){return d.LogTraceNotification},`get`)}),Object.defineProperty(e,`ConnectionErrors`,{enumerable:!0,get:o(function(){return d.ConnectionErrors},`get`)}),Object.defineProperty(e,`ConnectionError`,{enumerable:!0,get:o(function(){return d.ConnectionError},`get`)}),Object.defineProperty(e,`CancellationReceiverStrategy`,{enumerable:!0,get:o(function(){return d.CancellationReceiverStrategy},`get`)}),Object.defineProperty(e,`CancellationSenderStrategy`,{enumerable:!0,get:o(function(){return d.CancellationSenderStrategy},`get`)}),Object.defineProperty(e,`CancellationStrategy`,{enumerable:!0,get:o(function(){return d.CancellationStrategy},`get`)}),Object.defineProperty(e,`MessageStrategy`,{enumerable:!0,get:o(function(){return d.MessageStrategy},`get`)}),e.RAL=_t().default}}),jt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){Object.defineProperty(e,`__esModule`,{value:!0});var t=At(),n=class e extends t.AbstractMessageBuffer{static{o(this,`MessageBuffer`)}constructor(e=`utf-8`){super(e),this.asciiDecoder=new TextDecoder(`ascii`)}emptyBuffer(){return e.emptyBuffer}fromString(e,t){return new TextEncoder().encode(e)}toString(e,t){return t===`ascii`?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}};n.emptyBuffer=new Uint8Array;var r=class{static{o(this,`ReadableStreamWrapper`)}constructor(e){this.socket=e,this._onData=new t.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,t.RAL)().console.error(`Converting blob to array buffer failed.`)})},this.socket.addEventListener(`message`,this._messageListener)}onClose(e){return this.socket.addEventListener(`close`,e),t.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),t.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),t.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}onData(e){return this._onData.event(e)}},i=class{static{o(this,`WritableStreamWrapper`)}constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener(`close`,e),t.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),t.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),t.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}write(e,t){if(typeof e==`string`){if(t!==void 0&&t!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},a=new TextEncoder,s=Object.freeze({messageBuffer:Object.freeze({create:o(e=>new n(e),`create`)}),applicationJson:Object.freeze({encoder:Object.freeze({name:`application/json`,encode:o((e,t)=>{if(t.charset!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))},`encode`)}),decoder:Object.freeze({name:`application/json`,decode:o((e,t)=>{if(!(e instanceof Uint8Array))throw Error(`In a Browser environments only Uint8Arrays are supported.`);return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))},`decode`)})}),stream:Object.freeze({asReadableStream:o(e=>new r(e),`asReadableStream`),asWritableStream:o(e=>new i(e),`asWritableStream`)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:o(()=>clearTimeout(r),`dispose`)}},setImmediate(e,...t){let n=setTimeout(e,0,...t);return{dispose:o(()=>clearTimeout(n),`dispose`)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:o(()=>clearInterval(r),`dispose`)}}})});function c(){return s}o(c,`RIL`),(function(e){function n(){t.RAL.install(s)}o(n,`install`),e.install=n})(c||={}),e.default=c}}),Mt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,jt().default.install();var r=At();n(At(),e),e.BrowserMessageReader=class extends r.AbstractMessageReader{static{o(this,`BrowserMessageReader`)}constructor(e){super(),this._onData=new r.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener(`error`,e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}},e.BrowserMessageWriter=class extends r.AbstractMessageWriter{static{o(this,`BrowserMessageWriter`)}constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener(`error`,e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};function i(e,t,n,i){return n===void 0&&(n=r.NullLogger),r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}o(i,`createMessageConnection`),e.createMessageConnection=i}}),Nt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=Mt()}}),A=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=Mt(),n;(function(e){e.clientToServer=`clientToServer`,e.serverToClient=`serverToClient`,e.both=`both`})(n||(e.MessageDirection=n={})),e.RegistrationType=class{static{o(this,`RegistrationType`)}constructor(e){this.method=e}},e.ProtocolRequestType0=class extends t.RequestType0{static{o(this,`ProtocolRequestType0`)}constructor(e){super(e)}},e.ProtocolRequestType=class extends t.RequestType{static{o(this,`ProtocolRequestType`)}constructor(e){super(e,t.ParameterStructures.byName)}},e.ProtocolNotificationType0=class extends t.NotificationType0{static{o(this,`ProtocolNotificationType0`)}constructor(e){super(e)}},e.ProtocolNotificationType=class extends t.NotificationType{static{o(this,`ProtocolNotificationType`)}constructor(e){super(e,t.ParameterStructures.byName)}}}}),Pt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}o(t,`boolean`),e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}o(n,`string`),e.string=n;function r(e){return typeof e==`number`||e instanceof Number}o(r,`number`),e.number=r;function i(e){return e instanceof Error}o(i,`error`),e.error=i;function a(e){return typeof e==`function`}o(a,`func`),e.func=a;function s(e){return Array.isArray(e)}o(s,`array`),e.array=s;function c(e){return s(e)&&e.every(e=>n(e))}o(c,`stringArray`),e.stringArray=c;function l(e,t){return Array.isArray(e)&&e.every(t)}o(l,`typedArray`),e.typedArray=l;function u(e){return typeof e==`object`&&!!e}o(u,`objectLiteral`),e.objectLiteral=u}}),Ft=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.ImplementationRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/implementation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ImplementationRequest=n={}))}}),It=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.TypeDefinitionRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/typeDefinition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeDefinitionRequest=n={}))}}),Lt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t=A(),n;(function(e){e.method=`workspace/workspaceFolders`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(n||(e.WorkspaceFoldersRequest=n={}));var r;(function(e){e.method=`workspace/didChangeWorkspaceFolders`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(r||(e.DidChangeWorkspaceFoldersNotification=r={}))}}),Rt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.ConfigurationRequest=void 0;var t=A(),n;(function(e){e.method=`workspace/configuration`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ConfigurationRequest=n={}))}}),zt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/documentColor`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DocumentColorRequest=n={}));var r;(function(e){e.method=`textDocument/colorPresentation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.ColorPresentationRequest=r={}))}}),Bt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/foldingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.FoldingRangeRequest=n={}));var r;(function(e){e.method=`workspace/foldingRange/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.FoldingRangeRefreshRequest=r={}))}}),Vt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.DeclarationRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/declaration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DeclarationRequest=n={}))}}),Ht=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.SelectionRangeRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/selectionRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.SelectionRangeRequest=n={}))}}),Ut=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t=Mt(),n=A(),r;(function(e){e.type=new t.ProgressType;function n(t){return t===e.type}o(n,`is`),e.is=n})(r||(e.WorkDoneProgress=r={}));var i;(function(e){e.method=`window/workDoneProgress/create`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)})(i||(e.WorkDoneProgressCreateRequest=i={}));var a;(function(e){e.method=`window/workDoneProgress/cancel`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(a||(e.WorkDoneProgressCancelNotification=a={}))}}),Wt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/prepareCallHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.CallHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`callHierarchy/incomingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.CallHierarchyIncomingCallsRequest=r={}));var i;(function(e){e.method=`callHierarchy/outgoingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.CallHierarchyOutgoingCallsRequest=i={}))}}),Gt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t=A(),n;(function(e){e.Relative=`relative`})(n||(e.TokenFormat=n={}));var r;(function(e){e.method=`textDocument/semanticTokens`,e.type=new t.RegistrationType(e.method)})(r||(e.SemanticTokensRegistrationType=r={}));var i;(function(e){e.method=`textDocument/semanticTokens/full`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(i||(e.SemanticTokensRequest=i={}));var a;(function(e){e.method=`textDocument/semanticTokens/full/delta`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(a||(e.SemanticTokensDeltaRequest=a={}));var o;(function(e){e.method=`textDocument/semanticTokens/range`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(o||(e.SemanticTokensRangeRequest=o={}));var s;(function(e){e.method=`workspace/semanticTokens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(s||(e.SemanticTokensRefreshRequest=s={}))}}),Kt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.ShowDocumentRequest=void 0;var t=A(),n;(function(e){e.method=`window/showDocument`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ShowDocumentRequest=n={}))}}),qt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/linkedEditingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.LinkedEditingRangeRequest=n={}))}}),Jt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t=A(),n;(function(e){e.file=`file`,e.folder=`folder`})(n||(e.FileOperationPatternKind=n={}));var r;(function(e){e.method=`workspace/willCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.WillCreateFilesRequest=r={}));var i;(function(e){e.method=`workspace/didCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(i||(e.DidCreateFilesNotification=i={}));var a;(function(e){e.method=`workspace/willRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(a||(e.WillRenameFilesRequest=a={}));var o;(function(e){e.method=`workspace/didRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(o||(e.DidRenameFilesNotification=o={}));var s;(function(e){e.method=`workspace/didDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(s||(e.DidDeleteFilesNotification=s={}));var c;(function(e){e.method=`workspace/willDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(c||(e.WillDeleteFilesRequest=c={}))}}),Yt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=A(),n;(function(e){e.document=`document`,e.project=`project`,e.group=`group`,e.scheme=`scheme`,e.global=`global`})(n||(e.UniquenessLevel=n={}));var r;(function(e){e.$import=`import`,e.$export=`export`,e.local=`local`})(r||(e.MonikerKind=r={}));var i;(function(e){e.method=`textDocument/moniker`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.MonikerRequest=i={}))}}),Xt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/prepareTypeHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`typeHierarchy/supertypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.TypeHierarchySupertypesRequest=r={}));var i;(function(e){e.method=`typeHierarchy/subtypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.TypeHierarchySubtypesRequest=i={}))}}),Zt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/inlineValue`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineValueRequest=n={}));var r;(function(e){e.method=`workspace/inlineValue/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.InlineValueRefreshRequest=r={}))}}),Qt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/inlayHint`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlayHintRequest=n={}));var r;(function(e){e.method=`inlayHint/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.InlayHintResolveRequest=r={}));var i;(function(e){e.method=`workspace/inlayHint/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(i||(e.InlayHintRefreshRequest=i={}))}}),$t=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t=Mt(),n=Pt(),r=A(),i;(function(e){function t(e){let t=e;return t&&n.boolean(t.retriggerRequest)}o(t,`is`),e.is=t})(i||(e.DiagnosticServerCancellationData=i={}));var a;(function(e){e.Full=`full`,e.Unchanged=`unchanged`})(a||(e.DocumentDiagnosticReportKind=a={}));var s;(function(e){e.method=`textDocument/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(s||(e.DocumentDiagnosticRequest=s={}));var c;(function(e){e.method=`workspace/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(c||(e.WorkspaceDiagnosticRequest=c={}));var l;(function(e){e.method=`workspace/diagnostic/refresh`,e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)})(l||(e.DiagnosticRefreshRequest=l={}))}}),en=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var t=(gt(),p(m)),n=Pt(),r=A(),i;(function(e){e.Markup=1,e.Code=2;function t(e){return e===1||e===2}o(t,`is`),e.is=t})(i||(e.NotebookCellKind=i={}));var a;(function(e){function r(e,t){let n={executionOrder:e};return(t===!0||t===!1)&&(n.success=t),n}o(r,`create`),e.create=r;function i(e){let r=e;return n.objectLiteral(r)&&t.uinteger.is(r.executionOrder)&&(r.success===void 0||n.boolean(r.success))}o(i,`is`),e.is=i;function a(e,t){return e===t?!0:e==null||t==null?!1:e.executionOrder===t.executionOrder&&e.success===t.success}o(a,`equals`),e.equals=a})(a||(e.ExecutionSummary=a={}));var s;(function(e){function r(e,t){return{kind:e,document:t}}o(r,`create`),e.create=r;function s(e){let r=e;return n.objectLiteral(r)&&i.is(r.kind)&&t.DocumentUri.is(r.document)&&(r.metadata===void 0||n.objectLiteral(r.metadata))}o(s,`is`),e.is=s;function c(e,t){let n=new Set;return e.document!==t.document&&n.add(`document`),e.kind!==t.kind&&n.add(`kind`),e.executionSummary!==t.executionSummary&&n.add(`executionSummary`),(e.metadata!==void 0||t.metadata!==void 0)&&!l(e.metadata,t.metadata)&&n.add(`metadata`),(e.executionSummary!==void 0||t.executionSummary!==void 0)&&!a.equals(e.executionSummary,t.executionSummary)&&n.add(`executionSummary`),n}o(c,`diff`),e.diff=c;function l(e,t){if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!=`object`)return!1;let r=Array.isArray(e),i=Array.isArray(t);if(r!==i)return!1;if(r&&i){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!l(e[n],t[n]))return!1}if(n.objectLiteral(e)&&n.objectLiteral(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||(n.sort(),r.sort(),!l(n,r)))return!1;for(let r=0;r<n.length;r++){let i=n[r];if(!l(e[i],t[i]))return!1}}return!0}o(l,`equalsMetadata`)})(s||(e.NotebookCell=s={}));var c;(function(e){function r(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}}o(r,`create`),e.create=r;function i(e){let r=e;return n.objectLiteral(r)&&n.string(r.uri)&&t.integer.is(r.version)&&n.typedArray(r.cells,s.is)}o(i,`is`),e.is=i})(c||(e.NotebookDocument=c={}));var l;(function(e){e.method=`notebookDocument/sync`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.RegistrationType(e.method)})(l||(e.NotebookDocumentSyncRegistrationType=l={}));var u;(function(e){e.method=`notebookDocument/didOpen`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(u||(e.DidOpenNotebookDocumentNotification=u={}));var d;(function(e){function r(e){let r=e;return n.objectLiteral(r)&&t.uinteger.is(r.start)&&t.uinteger.is(r.deleteCount)&&(r.cells===void 0||n.typedArray(r.cells,s.is))}o(r,`is`),e.is=r;function i(e,t,n){let r={start:e,deleteCount:t};return n!==void 0&&(r.cells=n),r}o(i,`create`),e.create=i})(d||(e.NotebookCellArrayChange=d={}));var f;(function(e){e.method=`notebookDocument/didChange`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(f||(e.DidChangeNotebookDocumentNotification=f={}));var h;(function(e){e.method=`notebookDocument/didSave`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(h||(e.DidSaveNotebookDocumentNotification=h={}));var g;(function(e){e.method=`notebookDocument/didClose`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(g||(e.DidCloseNotebookDocumentNotification=g={}))}}),tn=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.InlineCompletionRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/inlineCompletion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineCompletionRequest=n={}))}}),nn=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=A(),n=(gt(),p(m)),r=Pt(),i=Ft();Object.defineProperty(e,`ImplementationRequest`,{enumerable:!0,get:o(function(){return i.ImplementationRequest},`get`)});var a=It();Object.defineProperty(e,`TypeDefinitionRequest`,{enumerable:!0,get:o(function(){return a.TypeDefinitionRequest},`get`)});var s=Lt();Object.defineProperty(e,`WorkspaceFoldersRequest`,{enumerable:!0,get:o(function(){return s.WorkspaceFoldersRequest},`get`)}),Object.defineProperty(e,`DidChangeWorkspaceFoldersNotification`,{enumerable:!0,get:o(function(){return s.DidChangeWorkspaceFoldersNotification},`get`)});var c=Rt();Object.defineProperty(e,`ConfigurationRequest`,{enumerable:!0,get:o(function(){return c.ConfigurationRequest},`get`)});var l=zt();Object.defineProperty(e,`DocumentColorRequest`,{enumerable:!0,get:o(function(){return l.DocumentColorRequest},`get`)}),Object.defineProperty(e,`ColorPresentationRequest`,{enumerable:!0,get:o(function(){return l.ColorPresentationRequest},`get`)});var u=Bt();Object.defineProperty(e,`FoldingRangeRequest`,{enumerable:!0,get:o(function(){return u.FoldingRangeRequest},`get`)}),Object.defineProperty(e,`FoldingRangeRefreshRequest`,{enumerable:!0,get:o(function(){return u.FoldingRangeRefreshRequest},`get`)});var d=Vt();Object.defineProperty(e,`DeclarationRequest`,{enumerable:!0,get:o(function(){return d.DeclarationRequest},`get`)});var f=Ht();Object.defineProperty(e,`SelectionRangeRequest`,{enumerable:!0,get:o(function(){return f.SelectionRangeRequest},`get`)});var h=Ut();Object.defineProperty(e,`WorkDoneProgress`,{enumerable:!0,get:o(function(){return h.WorkDoneProgress},`get`)}),Object.defineProperty(e,`WorkDoneProgressCreateRequest`,{enumerable:!0,get:o(function(){return h.WorkDoneProgressCreateRequest},`get`)}),Object.defineProperty(e,`WorkDoneProgressCancelNotification`,{enumerable:!0,get:o(function(){return h.WorkDoneProgressCancelNotification},`get`)});var g=Wt();Object.defineProperty(e,`CallHierarchyIncomingCallsRequest`,{enumerable:!0,get:o(function(){return g.CallHierarchyIncomingCallsRequest},`get`)}),Object.defineProperty(e,`CallHierarchyOutgoingCallsRequest`,{enumerable:!0,get:o(function(){return g.CallHierarchyOutgoingCallsRequest},`get`)}),Object.defineProperty(e,`CallHierarchyPrepareRequest`,{enumerable:!0,get:o(function(){return g.CallHierarchyPrepareRequest},`get`)});var _=Gt();Object.defineProperty(e,`TokenFormat`,{enumerable:!0,get:o(function(){return _.TokenFormat},`get`)}),Object.defineProperty(e,`SemanticTokensRequest`,{enumerable:!0,get:o(function(){return _.SemanticTokensRequest},`get`)}),Object.defineProperty(e,`SemanticTokensDeltaRequest`,{enumerable:!0,get:o(function(){return _.SemanticTokensDeltaRequest},`get`)}),Object.defineProperty(e,`SemanticTokensRangeRequest`,{enumerable:!0,get:o(function(){return _.SemanticTokensRangeRequest},`get`)}),Object.defineProperty(e,`SemanticTokensRefreshRequest`,{enumerable:!0,get:o(function(){return _.SemanticTokensRefreshRequest},`get`)}),Object.defineProperty(e,`SemanticTokensRegistrationType`,{enumerable:!0,get:o(function(){return _.SemanticTokensRegistrationType},`get`)});var v=Kt();Object.defineProperty(e,`ShowDocumentRequest`,{enumerable:!0,get:o(function(){return v.ShowDocumentRequest},`get`)});var y=qt();Object.defineProperty(e,`LinkedEditingRangeRequest`,{enumerable:!0,get:o(function(){return y.LinkedEditingRangeRequest},`get`)});var b=Jt();Object.defineProperty(e,`FileOperationPatternKind`,{enumerable:!0,get:o(function(){return b.FileOperationPatternKind},`get`)}),Object.defineProperty(e,`DidCreateFilesNotification`,{enumerable:!0,get:o(function(){return b.DidCreateFilesNotification},`get`)}),Object.defineProperty(e,`WillCreateFilesRequest`,{enumerable:!0,get:o(function(){return b.WillCreateFilesRequest},`get`)}),Object.defineProperty(e,`DidRenameFilesNotification`,{enumerable:!0,get:o(function(){return b.DidRenameFilesNotification},`get`)}),Object.defineProperty(e,`WillRenameFilesRequest`,{enumerable:!0,get:o(function(){return b.WillRenameFilesRequest},`get`)}),Object.defineProperty(e,`DidDeleteFilesNotification`,{enumerable:!0,get:o(function(){return b.DidDeleteFilesNotification},`get`)}),Object.defineProperty(e,`WillDeleteFilesRequest`,{enumerable:!0,get:o(function(){return b.WillDeleteFilesRequest},`get`)});var x=Yt();Object.defineProperty(e,`UniquenessLevel`,{enumerable:!0,get:o(function(){return x.UniquenessLevel},`get`)}),Object.defineProperty(e,`MonikerKind`,{enumerable:!0,get:o(function(){return x.MonikerKind},`get`)}),Object.defineProperty(e,`MonikerRequest`,{enumerable:!0,get:o(function(){return x.MonikerRequest},`get`)});var ee=Xt();Object.defineProperty(e,`TypeHierarchyPrepareRequest`,{enumerable:!0,get:o(function(){return ee.TypeHierarchyPrepareRequest},`get`)}),Object.defineProperty(e,`TypeHierarchySubtypesRequest`,{enumerable:!0,get:o(function(){return ee.TypeHierarchySubtypesRequest},`get`)}),Object.defineProperty(e,`TypeHierarchySupertypesRequest`,{enumerable:!0,get:o(function(){return ee.TypeHierarchySupertypesRequest},`get`)});var S=Zt();Object.defineProperty(e,`InlineValueRequest`,{enumerable:!0,get:o(function(){return S.InlineValueRequest},`get`)}),Object.defineProperty(e,`InlineValueRefreshRequest`,{enumerable:!0,get:o(function(){return S.InlineValueRefreshRequest},`get`)});var te=Qt();Object.defineProperty(e,`InlayHintRequest`,{enumerable:!0,get:o(function(){return te.InlayHintRequest},`get`)}),Object.defineProperty(e,`InlayHintResolveRequest`,{enumerable:!0,get:o(function(){return te.InlayHintResolveRequest},`get`)}),Object.defineProperty(e,`InlayHintRefreshRequest`,{enumerable:!0,get:o(function(){return te.InlayHintRefreshRequest},`get`)});var ne=$t();Object.defineProperty(e,`DiagnosticServerCancellationData`,{enumerable:!0,get:o(function(){return ne.DiagnosticServerCancellationData},`get`)}),Object.defineProperty(e,`DocumentDiagnosticReportKind`,{enumerable:!0,get:o(function(){return ne.DocumentDiagnosticReportKind},`get`)}),Object.defineProperty(e,`DocumentDiagnosticRequest`,{enumerable:!0,get:o(function(){return ne.DocumentDiagnosticRequest},`get`)}),Object.defineProperty(e,`WorkspaceDiagnosticRequest`,{enumerable:!0,get:o(function(){return ne.WorkspaceDiagnosticRequest},`get`)}),Object.defineProperty(e,`DiagnosticRefreshRequest`,{enumerable:!0,get:o(function(){return ne.DiagnosticRefreshRequest},`get`)});var C=en();Object.defineProperty(e,`NotebookCellKind`,{enumerable:!0,get:o(function(){return C.NotebookCellKind},`get`)}),Object.defineProperty(e,`ExecutionSummary`,{enumerable:!0,get:o(function(){return C.ExecutionSummary},`get`)}),Object.defineProperty(e,`NotebookCell`,{enumerable:!0,get:o(function(){return C.NotebookCell},`get`)}),Object.defineProperty(e,`NotebookDocument`,{enumerable:!0,get:o(function(){return C.NotebookDocument},`get`)}),Object.defineProperty(e,`NotebookDocumentSyncRegistrationType`,{enumerable:!0,get:o(function(){return C.NotebookDocumentSyncRegistrationType},`get`)}),Object.defineProperty(e,`DidOpenNotebookDocumentNotification`,{enumerable:!0,get:o(function(){return C.DidOpenNotebookDocumentNotification},`get`)}),Object.defineProperty(e,`NotebookCellArrayChange`,{enumerable:!0,get:o(function(){return C.NotebookCellArrayChange},`get`)}),Object.defineProperty(e,`DidChangeNotebookDocumentNotification`,{enumerable:!0,get:o(function(){return C.DidChangeNotebookDocumentNotification},`get`)}),Object.defineProperty(e,`DidSaveNotebookDocumentNotification`,{enumerable:!0,get:o(function(){return C.DidSaveNotebookDocumentNotification},`get`)}),Object.defineProperty(e,`DidCloseNotebookDocumentNotification`,{enumerable:!0,get:o(function(){return C.DidCloseNotebookDocumentNotification},`get`)});var re=tn();Object.defineProperty(e,`InlineCompletionRequest`,{enumerable:!0,get:o(function(){return re.InlineCompletionRequest},`get`)});var ie;(function(e){function t(e){let t=e;return r.string(t)||r.string(t.language)||r.string(t.scheme)||r.string(t.pattern)}o(t,`is`),e.is=t})(ie||(e.TextDocumentFilter=ie={}));var ae;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(r.string(t.notebookType)||r.string(t.scheme)||r.string(t.pattern))}o(t,`is`),e.is=t})(ae||(e.NotebookDocumentFilter=ae={}));var oe;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(r.string(t.notebook)||ae.is(t.notebook))&&(t.language===void 0||r.string(t.language))}o(t,`is`),e.is=t})(oe||(e.NotebookCellTextDocumentFilter=oe={}));var se;(function(e){function t(e){if(!Array.isArray(e))return!1;for(let t of e)if(!r.string(t)&&!ie.is(t)&&!oe.is(t))return!1;return!0}o(t,`is`),e.is=t})(se||(e.DocumentSelector=se={}));var ce;(function(e){e.method=`client/registerCapability`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(ce||(e.RegistrationRequest=ce={}));var le;(function(e){e.method=`client/unregisterCapability`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(le||(e.UnregistrationRequest=le={}));var ue;(function(e){e.Create=`create`,e.Rename=`rename`,e.Delete=`delete`})(ue||(e.ResourceOperationKind=ue={}));var de;(function(e){e.Abort=`abort`,e.Transactional=`transactional`,e.TextOnlyTransactional=`textOnlyTransactional`,e.Undo=`undo`})(de||(e.FailureHandlingKind=de={}));var w;(function(e){e.UTF8=`utf-8`,e.UTF16=`utf-16`,e.UTF32=`utf-32`})(w||(e.PositionEncodingKind=w={}));var T;(function(e){function t(e){let t=e;return t&&r.string(t.id)&&t.id.length>0}o(t,`hasId`),e.hasId=t})(T||(e.StaticRegistrationOptions=T={}));var fe;(function(e){function t(e){let t=e;return t&&(t.documentSelector===null||se.is(t.documentSelector))}o(t,`is`),e.is=t})(fe||(e.TextDocumentRegistrationOptions=fe={}));var E;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(t.workDoneProgress===void 0||r.boolean(t.workDoneProgress))}o(t,`is`),e.is=t;function n(e){let t=e;return t&&r.boolean(t.workDoneProgress)}o(n,`hasWorkDoneProgress`),e.hasWorkDoneProgress=n})(E||(e.WorkDoneProgressOptions=E={}));var D;(function(e){e.method=`initialize`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(D||(e.InitializeRequest=D={}));var pe;(function(e){e.unknownProtocolVersion=1})(pe||(e.InitializeErrorCodes=pe={}));var O;(function(e){e.method=`initialized`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(O||(e.InitializedNotification=O={}));var me;(function(e){e.method=`shutdown`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType0(e.method)})(me||(e.ShutdownRequest=me={}));var he;(function(e){e.method=`exit`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType0(e.method)})(he||(e.ExitNotification=he={}));var ge;(function(e){e.method=`workspace/didChangeConfiguration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ge||(e.DidChangeConfigurationNotification=ge={}));var _e;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(_e||(e.MessageType=_e={}));var ve;(function(e){e.method=`window/showMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(ve||(e.ShowMessageNotification=ve={}));var ye;(function(e){e.method=`window/showMessageRequest`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(ye||(e.ShowMessageRequest=ye={}));var be;(function(e){e.method=`window/logMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(be||(e.LogMessageNotification=be={}));var xe;(function(e){e.method=`telemetry/event`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(xe||(e.TelemetryEventNotification=xe={}));var Se;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Se||(e.TextDocumentSyncKind=Se={}));var Ce;(function(e){e.method=`textDocument/didOpen`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(Ce||(e.DidOpenTextDocumentNotification=Ce={}));var we;(function(e){function t(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}o(t,`isIncremental`),e.isIncremental=t;function n(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}o(n,`isFull`),e.isFull=n})(we||(e.TextDocumentContentChangeEvent=we={}));var Te;(function(e){e.method=`textDocument/didChange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(Te||(e.DidChangeTextDocumentNotification=Te={}));var Ee;(function(e){e.method=`textDocument/didClose`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(Ee||(e.DidCloseTextDocumentNotification=Ee={}));var De;(function(e){e.method=`textDocument/didSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(De||(e.DidSaveTextDocumentNotification=De={}));var Oe;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Oe||(e.TextDocumentSaveReason=Oe={}));var ke;(function(e){e.method=`textDocument/willSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ke||(e.WillSaveTextDocumentNotification=ke={}));var Ae;(function(e){e.method=`textDocument/willSaveWaitUntil`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ae||(e.WillSaveTextDocumentWaitUntilRequest=Ae={}));var je;(function(e){e.method=`workspace/didChangeWatchedFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(je||(e.DidChangeWatchedFilesNotification=je={}));var Me;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Me||(e.FileChangeType=Me={}));var Ne;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(n.URI.is(t.baseUri)||n.WorkspaceFolder.is(t.baseUri))&&r.string(t.pattern)}o(t,`is`),e.is=t})(Ne||(e.RelativePattern=Ne={}));var Pe;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Pe||(e.WatchKind=Pe={}));var Fe;(function(e){e.method=`textDocument/publishDiagnostics`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(Fe||(e.PublishDiagnosticsNotification=Fe={}));var Ie;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Ie||(e.CompletionTriggerKind=Ie={}));var Le;(function(e){e.method=`textDocument/completion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Le||(e.CompletionRequest=Le={}));var Re;(function(e){e.method=`completionItem/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Re||(e.CompletionResolveRequest=Re={}));var ze;(function(e){e.method=`textDocument/hover`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ze||(e.HoverRequest=ze={}));var Be;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(Be||(e.SignatureHelpTriggerKind=Be={}));var Ve;(function(e){e.method=`textDocument/signatureHelp`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ve||(e.SignatureHelpRequest=Ve={}));var He;(function(e){e.method=`textDocument/definition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(He||(e.DefinitionRequest=He={}));var Ue;(function(e){e.method=`textDocument/references`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ue||(e.ReferencesRequest=Ue={}));var We;(function(e){e.method=`textDocument/documentHighlight`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(We||(e.DocumentHighlightRequest=We={}));var Ge;(function(e){e.method=`textDocument/documentSymbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ge||(e.DocumentSymbolRequest=Ge={}));var Ke;(function(e){e.method=`textDocument/codeAction`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ke||(e.CodeActionRequest=Ke={}));var qe;(function(e){e.method=`codeAction/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(qe||(e.CodeActionResolveRequest=qe={}));var Je;(function(e){e.method=`workspace/symbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Je||(e.WorkspaceSymbolRequest=Je={}));var Ye;(function(e){e.method=`workspaceSymbol/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ye||(e.WorkspaceSymbolResolveRequest=Ye={}));var Xe;(function(e){e.method=`textDocument/codeLens`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Xe||(e.CodeLensRequest=Xe={}));var Ze;(function(e){e.method=`codeLens/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ze||(e.CodeLensResolveRequest=Ze={}));var Qe;(function(e){e.method=`workspace/codeLens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(Qe||(e.CodeLensRefreshRequest=Qe={}));var $e;(function(e){e.method=`textDocument/documentLink`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})($e||(e.DocumentLinkRequest=$e={}));var et;(function(e){e.method=`documentLink/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(et||(e.DocumentLinkResolveRequest=et={}));var tt;(function(e){e.method=`textDocument/formatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(tt||(e.DocumentFormattingRequest=tt={}));var nt;(function(e){e.method=`textDocument/rangeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(nt||(e.DocumentRangeFormattingRequest=nt={}));var rt;(function(e){e.method=`textDocument/rangesFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(rt||(e.DocumentRangesFormattingRequest=rt={}));var it;(function(e){e.method=`textDocument/onTypeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(it||(e.DocumentOnTypeFormattingRequest=it={}));var at;(function(e){e.Identifier=1})(at||(e.PrepareSupportDefaultBehavior=at={}));var ot;(function(e){e.method=`textDocument/rename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ot||(e.RenameRequest=ot={}));var st;(function(e){e.method=`textDocument/prepareRename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(st||(e.PrepareRenameRequest=st={}));var ct;(function(e){e.method=`workspace/executeCommand`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ct||(e.ExecuteCommandRequest=ct={}));var lt;(function(e){e.method=`workspace/applyEdit`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(`workspace/applyEdit`)})(lt||(e.ApplyWorkspaceEditRequest=lt={}))}}),rn=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.createProtocolConnection=void 0;var t=Mt();function n(e,n,r,i){return t.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,t.createMessageConnection)(e,n,r,i)}o(n,`createProtocolConnection`),e.createProtocolConnection=n}}),an=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,n(Mt(),e),n((gt(),p(m)),e),n(A(),e),n(nn(),e);var r=rn();Object.defineProperty(e,`createProtocolConnection`,{enumerable:!0,get:o(function(){return r.createProtocolConnection},`get`)});var i;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(i||(e.LSPErrorCodes=i={}))}}),on=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.createProtocolConnection=void 0;var r=Nt();n(Nt(),e),n(an(),e);function i(e,t,n,i){return(0,r.createMessageConnection)(e,t,n,i)}o(i,`createProtocolConnection`),e.createProtocolConnection=i}}),sn={};l(sn,{AbstractAstReflection:()=>pn,AbstractCstNode:()=>$A,AbstractLangiumParser:()=>cj,AbstractParserErrorMessageProvider:()=>uj,AbstractThreadedAsyncParser:()=>jN,AstUtils:()=>wn,BiMap:()=>mM,Cancellation:()=>Z,CompositeCstNodeImpl:()=>tj,ContextCache:()=>SM,CstNodeBuilder:()=>QA,CstUtils:()=>cn,DEFAULT_TOKENIZE_OPTIONS:()=>XM,DONE_RESULT:()=>xn,DatatypeSymbol:()=>ij,DefaultAstNodeDescriptionProvider:()=>zM,DefaultAstNodeLocator:()=>VM,DefaultAsyncParser:()=>AN,DefaultCommentProvider:()=>kN,DefaultConfigurationProvider:()=>UM,DefaultDocumentBuilder:()=>KM,DefaultDocumentValidator:()=>PM,DefaultHydrator:()=>PN,DefaultIndexManager:()=>qM,DefaultJsonSerializer:()=>OM,DefaultLangiumDocumentFactory:()=>oM,DefaultLangiumDocuments:()=>sM,DefaultLangiumProfiler:()=>nP,DefaultLexer:()=>ZM,DefaultLexerErrorMessageProvider:()=>YM,DefaultLinker:()=>lM,DefaultNameProvider:()=>dM,DefaultReferenceDescriptionProvider:()=>BM,DefaultReferences:()=>fM,DefaultScopeComputation:()=>hM,DefaultScopeProvider:()=>TM,DefaultServiceRegistry:()=>kM,DefaultTokenBuilder:()=>Lj,DefaultValueConverter:()=>Rj,DefaultWorkspaceLock:()=>NN,DefaultWorkspaceManager:()=>JM,Deferred:()=>qj,Disposable:()=>GM,DisposableCache:()=>bM,DocumentCache:()=>CM,DocumentState:()=>$,DocumentValidator:()=>RM,EMPTY_SCOPE:()=>yM,EMPTY_STREAM:()=>bn,EmptyFileSystem:()=>ZN,EmptyFileSystemProvider:()=>XN,ErrorWithLocation:()=>aa,GrammarAST:()=>zn,GrammarUtils:()=>ia,IndentationAwareLexer:()=>JN,IndentationAwareTokenBuilder:()=>qN,JSDocDocumentationProvider:()=>ON,LangiumCompletionParser:()=>fj,LangiumParser:()=>lj,LangiumParserErrorMessageProvider:()=>dj,LeafCstNodeImpl:()=>ej,LexingMode:()=>KN,MapScope:()=>_M,Module:()=>LN,MultiMap:()=>pM,MultiMapScope:()=>vM,OperationCancelled:()=>Gj,ParserWorker:()=>MN,ProfilingTask:()=>rP,Reduction:()=>Cn,RefResolving:()=>cM,RegExpUtils:()=>ca,RootCstNodeImpl:()=>rj,SimpleCache:()=>xM,StreamImpl:()=>_n,StreamScope:()=>gM,TextDocument:()=>Yj,TreeStreamImpl:()=>Sn,URI:()=>nM,UriTrie:()=>aM,UriUtils:()=>iM,VALIDATE_EACH_NODE:()=>NM,ValidationCategory:()=>jM,ValidationRegistry:()=>MM,ValueConverter:()=>zj,WorkspaceCache:()=>wM,assertCondition:()=>sa,assertUnreachable:()=>oa,createCompletionParser:()=>Pj,createDefaultCoreModule:()=>FN,createDefaultSharedCoreModule:()=>IN,createGrammarConfig:()=>vo,createLangiumParser:()=>Fj,createParser:()=>gj,delayNextTick:()=>Bj,diagnosticData:()=>AM,eagerLoad:()=>BN,getDiagnosticRange:()=>FM,indentationBuilderDefaultOptions:()=>GN,inject:()=>RN,interruptAndCheck:()=>Q,isAstNode:()=>j,isAstNodeDescription:()=>dn,isAstNodeWithComment:()=>EM,isCompositeCstNode:()=>mn,isIMultiModeLexerDefinition:()=>$M,isJSDoc:()=>nN,isLeafCstNode:()=>hn,isLinkingError:()=>fn,isMultiReference:()=>un,isNamed:()=>uM,isOperationCancelled:()=>Kj,isReference:()=>ln,isRootCstNode:()=>gn,isTokenTypeArray:()=>QM,isTokenTypeDictionary:()=>eN,loadGrammarFromJson:()=>tP,parseJSDoc:()=>tN,prepareLangiumParser:()=>Ij,setInterruptionPeriod:()=>Wj,startCancelableOperation:()=>Uj,stream:()=>M,toDiagnosticData:()=>LM,toDiagnosticSeverity:()=>IM});var cn={};l(cn,{DefaultNameRegexp:()=>Gi,RangeComparison:()=>Hi,compareRange:()=>Ui,findCommentNode:()=>qi,findDeclarationNodeAtOffset:()=>Ki,findLeafNodeAtOffset:()=>Yi,findLeafNodeBeforeOffset:()=>Xi,flattenCst:()=>Ri,getDatatypeNode:()=>Ii,getInteriorNodes:()=>ta,getNextNode:()=>$i,getPreviousNode:()=>Qi,getStartlineNode:()=>ea,inRange:()=>Wi,isChildNode:()=>zi,isCommentNode:()=>Ji,streamCst:()=>Li,toDocumentSegment:()=>Vi,tokenToRange:()=>Bi});function j(e){return typeof e==`object`&&!!e&&typeof e.$type==`string`}o(j,`isAstNode`);function ln(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`ref`in e}o(ln,`isReference`);function un(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`items`in e}o(un,`isMultiReference`);function dn(e){return typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.path==`string`}o(dn,`isAstNodeDescription`);function fn(e){return typeof e==`object`&&!!e&&typeof e.info==`object`&&typeof e.message==`string`}o(fn,`isLinkingError`);var pn=class{static{o(this,`AbstractAstReflection`)}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw Error(`Type ${e.container.$type||`undefined`} not found.`);let n=t.properties[e.property]?.referenceType;if(!n)throw Error(`Property ${e.property||`undefined`} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return j(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||=this.subtypes[e]={};let r=n[t];if(r!==void 0)return r;{let r=this.types[e],i=r?r.superTypes.some(e=>this.isSubtype(e,t)):!1;return n[t]=i,i}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let t=this.getAllTypes(),n=[];for(let r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}};function mn(e){return typeof e==`object`&&!!e&&Array.isArray(e.content)}o(mn,`isCompositeCstNode`);function hn(e){return typeof e==`object`&&!!e&&typeof e.tokenType==`object`}o(hn,`isLeafCstNode`);function gn(e){return mn(e)&&typeof e.fullText==`string`}o(gn,`isRootCstNode`);var _n=class e{static{o(this,`StreamImpl`)}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:o(()=>this.nextFn(e.state),`next`),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){let e=[],t=this.iterator(),n;do n=t.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){let n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do if(t=this.nextFn(e.first),!t.done)return t;while(!t.done);e.firstDone=!0}do if(t=e.iterator.next(),!t.done)return t;while(!t.done);return xn})}join(e=`,`){let t=this.iterator(),n=``,r,i=!1;do r=t.next(),r.done||(i&&(n+=e),n+=vn(r.value)),i=!0;while(!r.done);return n}indexOf(e,t=0){let n=this.iterator(),r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(t){return new e(this.startFn,e=>{let{done:n,value:r}=this.nextFn(e);return n?xn:{done:!1,value:t(r)}})}filter(t){return new e(this.startFn,e=>{let n;do if(n=this.nextFn(e),!n.done&&t(n.value))return n;while(!n.done);return xn})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){let n=this.iterator(),r=t,i=n.next();for(;!i.done;)r=r===void 0?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){let r=e.next();if(r.done)return n;let i=this.recursiveReduce(e,t,n);return i===void 0?r.value:t(i,r.value)}find(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:n,value:r}=this.nextFn(e.this);if(!n){let n=t(r);if(yn(n))e.iterator=n[Symbol.iterator]();else return{done:!1,value:n}}}while(e.iterator);return xn})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let n=t>1?this.flat(t-1):this;return new e(()=>({this:n.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:t,value:r}=n.nextFn(e.this);if(!t)if(yn(r))e.iterator=r[Symbol.iterator]();else return{done:!1,value:r}}while(e.iterator);return xn})}head(){let e=this.iterator().next();if(!e.done)return e.value}tail(t=1){return new e(()=>{let e=this.startFn();for(let n=0;n<t;n++)if(this.nextFn(e).done)return e;return e},this.nextFn)}limit(t){return new e(()=>({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?xn:this.nextFn(e.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),e=>{let n;do if(n=this.nextFn(e.internalState),!n.done){let r=t?t(n.value):n.value;if(!e.set.has(r))return e.set.add(r),n}while(!n.done);return xn})}exclude(e,t){let n=new Set;for(let r of e){let e=t?t(r):r;n.add(e)}return this.filter(e=>{let r=t?t(e):e;return!n.has(r)})}};function vn(e){return typeof e==`string`?e:e===void 0?`undefined`:typeof e.toString==`function`?e.toString():Object.prototype.toString.call(e)}o(vn,`toString`);function yn(e){return!!e&&typeof e[Symbol.iterator]==`function`}o(yn,`isIterable`);var bn=new _n(()=>void 0,()=>xn),xn=Object.freeze({done:!0,value:void 0});function M(...e){if(e.length===1){let t=e[0];if(t instanceof _n)return t;if(yn(t))return new _n(()=>t[Symbol.iterator](),e=>e.next());if(typeof t.length==`number`)return new _n(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:xn)}return e.length>1?new _n(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){let n=e[t.collIndex++];yn(n)?t.iterator=n[Symbol.iterator]():n&&typeof n.length==`number`&&(t.array=n)}}while(t.iterator||t.array||t.collIndex<e.length);return xn}):bn}o(M,`stream`);var Sn=class extends _n{static{o(this,`TreeStreamImpl`)}constructor(e,t,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&=(e.iterators.pop(),!1);e.iterators.length>0;){let n=e.iterators[e.iterators.length-1].next();if(n.done)e.iterators.pop();else return e.iterators.push(t(n.value)[Symbol.iterator]()),n}return xn})}iterator(){let e={state:this.startFn(),next:o(()=>this.nextFn(e.state),`next`),prune:o(()=>{e.state.pruned=!0},`prune`),[Symbol.iterator]:()=>e};return e}},Cn;(function(e){function t(e){return e.reduce((e,t)=>e+t,0)}o(t,`sum`),e.sum=t;function n(e){return e.reduce((e,t)=>e*t,0)}o(n,`product`),e.product=n;function r(e){return e.reduce((e,t)=>Math.min(e,t))}o(r,`min`),e.min=r;function i(e){return e.reduce((e,t)=>Math.max(e,t))}o(i,`max`),e.max=i})(Cn||={});var wn={};l(wn,{assignMandatoryProperties:()=>In,copyAstNode:()=>Rn,findRootNode:()=>kn,getContainerOfType:()=>En,getDocument:()=>On,getReferenceNodes:()=>An,hasContainerOfType:()=>Dn,linkContentToContainer:()=>Tn,streamAllContents:()=>Mn,streamAst:()=>Nn,streamContents:()=>jn,streamReferences:()=>Fn});function Tn(e,t={}){for(let[n,r]of Object.entries(e))n.startsWith(`$`)||(Array.isArray(r)?r.forEach((r,i)=>{j(r)&&(r.$container=e,r.$containerProperty=n,r.$containerIndex=i,t.deep&&Tn(r,t))}):j(r)&&(r.$container=e,r.$containerProperty=n,t.deep&&Tn(r,t)))}o(Tn,`linkContentToContainer`);function En(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}o(En,`getContainerOfType`);function Dn(e,t){let n=e;for(;n;){if(t(n))return!0;n=n.$container}return!1}o(Dn,`hasContainerOfType`);function On(e){let t=kn(e).$document;if(!t)throw Error(`AST node has no document.`);return t}o(On,`getDocument`);function kn(e){for(;e.$container;)e=e.$container;return e}o(kn,`findRootNode`);function An(e){return ln(e)?e.ref?[e.ref]:[]:un(e)?e.items.map(e=>e.ref):[]}o(An,`getReferenceNodes`);function jn(e,t){if(!e)throw Error(`Node must be an AstNode.`);let n=t?.range;return new _n(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let r=t.keys[t.keyIndex];if(!r.startsWith(`$`)){let i=e[r];if(j(i)){if(t.keyIndex++,Pn(i,n))return{done:!1,value:i}}else if(Array.isArray(i)){for(;t.arrayIndex<i.length;){let e=i[t.arrayIndex++];if(j(e)&&Pn(e,n))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return xn})}o(jn,`streamContents`);function Mn(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return new Sn(e,e=>jn(e,t))}o(Mn,`streamAllContents`);function Nn(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return t?.range&&!Pn(e,t.range)?new Sn(e,()=>[]):new Sn(e,e=>jn(e,t),{includeRoot:!0})}o(Nn,`streamAst`);function Pn(e,t){if(!t)return!0;let n=e.$cstNode?.range;return n?Wi(n,t):!1}o(Pn,`isAstNodeInRange`);function Fn(e){return new _n(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let n=t.keys[t.keyIndex];if(!n.startsWith(`$`)){let r=e[n];if(ln(r)||un(r))return t.keyIndex++,{done:!1,value:{reference:r,container:e,property:n}};if(Array.isArray(r)){for(;t.arrayIndex<r.length;){let i=t.arrayIndex++,a=r[i];if(ln(a)||un(r))return{done:!1,value:{reference:a,container:e,property:n,index:i}}}t.arrayIndex=0}}t.keyIndex++}return xn})}o(Fn,`streamReferences`);function In(e,t){let n=e.getTypeMetaData(t.$type),r=t;for(let e of Object.values(n.properties))e.defaultValue!==void 0&&r[e.name]===void 0&&(r[e.name]=Ln(e.defaultValue))}o(In,`assignMandatoryProperties`);function Ln(e){return Array.isArray(e)?[...e.map(Ln)]:e}o(Ln,`copyDefaultValue`);function Rn(e,t,n){let r={$type:e.$type};n&&(n.set(e,r),n.set(r,e));for(let[i,a]of Object.entries(e))if(!i.startsWith(`$`))if(j(a))r[i]=Rn(a,t,n);else if(ln(a))r[i]=t(r,i,a.$refNode,a.$refText,a);else if(Array.isArray(a)){let e=[];for(let o of a)j(o)?e.push(Rn(o,t,n)):ln(o)?e.push(t(r,i,o.$refNode,o.$refText,o)):e.push(o);r[i]=e}else r[i]=a;return Tn(r,{deep:!0}),r}o(Rn,`copyAstNode`);var zn={};l(zn,{AbstractElement:()=>Vn,AbstractParserRule:()=>Un,AbstractRule:()=>Gn,AbstractType:()=>qn,Action:()=>Yn,Alternatives:()=>Zn,ArrayLiteral:()=>$n,ArrayType:()=>tr,Assignment:()=>rr,BooleanLiteral:()=>ar,CharacterRange:()=>sr,Condition:()=>lr,Conjunction:()=>dr,CrossReference:()=>pr,Disjunction:()=>hr,EndOfFile:()=>_r,Grammar:()=>yr,GrammarImport:()=>xr,Group:()=>Cr,InferredType:()=>Tr,InfixRule:()=>Dr,InfixRuleOperatorList:()=>kr,InfixRuleOperators:()=>jr,Interface:()=>Nr,Keyword:()=>Fr,LangiumGrammarAstReflection:()=>Fi,LangiumGrammarTerminals:()=>Bn,NamedArgument:()=>Lr,NegatedToken:()=>zr,Negation:()=>Vr,NumberLiteral:()=>Ur,Parameter:()=>Gr,ParameterReference:()=>qr,ParserRule:()=>Yr,ReferenceType:()=>Zr,RegexToken:()=>$r,ReturnType:()=>ti,RuleCall:()=>ri,SimpleType:()=>ai,StringLiteral:()=>si,TerminalAlternatives:()=>li,TerminalElement:()=>di,TerminalGroup:()=>pi,TerminalRule:()=>hi,TerminalRuleCall:()=>_i,Type:()=>yi,TypeAttribute:()=>xi,TypeDefinition:()=>Ci,UnionType:()=>Ti,UnorderedGroup:()=>Di,UntilToken:()=>ki,ValueLiteral:()=>ji,Wildcard:()=>Ni,isAbstractElement:()=>Hn,isAbstractParserRule:()=>Wn,isAbstractRule:()=>Kn,isAbstractType:()=>Jn,isAction:()=>Xn,isAlternatives:()=>Qn,isArrayLiteral:()=>er,isArrayType:()=>nr,isAssignment:()=>ir,isBooleanLiteral:()=>or,isCharacterRange:()=>cr,isCondition:()=>ur,isConjunction:()=>fr,isCrossReference:()=>mr,isDisjunction:()=>gr,isEndOfFile:()=>vr,isGrammar:()=>br,isGrammarImport:()=>Sr,isGroup:()=>wr,isInferredType:()=>Er,isInfixRule:()=>Or,isInfixRuleOperatorList:()=>Ar,isInfixRuleOperators:()=>Mr,isInterface:()=>Pr,isKeyword:()=>Ir,isNamedArgument:()=>Rr,isNegatedToken:()=>Br,isNegation:()=>Hr,isNumberLiteral:()=>Wr,isParameter:()=>Kr,isParameterReference:()=>Jr,isParserRule:()=>Xr,isReferenceType:()=>Qr,isRegexToken:()=>ei,isReturnType:()=>ni,isRuleCall:()=>ii,isSimpleType:()=>oi,isStringLiteral:()=>ci,isTerminalAlternatives:()=>ui,isTerminalElement:()=>fi,isTerminalGroup:()=>mi,isTerminalRule:()=>gi,isTerminalRuleCall:()=>vi,isType:()=>bi,isTypeAttribute:()=>Si,isTypeDefinition:()=>wi,isUnionType:()=>Ei,isUnorderedGroup:()=>Oi,isUntilToken:()=>Ai,isValueLiteral:()=>Mi,isWildcard:()=>Pi,reflection:()=>N});var Bn={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]*/},Vn={$type:`AbstractElement`,cardinality:`cardinality`};function Hn(e){return N.isInstance(e,Vn.$type)}o(Hn,`isAbstractElement`);var Un={$type:`AbstractParserRule`};function Wn(e){return N.isInstance(e,Un.$type)}o(Wn,`isAbstractParserRule`);var Gn={$type:`AbstractRule`};function Kn(e){return N.isInstance(e,Gn.$type)}o(Kn,`isAbstractRule`);var qn={$type:`AbstractType`};function Jn(e){return N.isInstance(e,qn.$type)}o(Jn,`isAbstractType`);var Yn={$type:`Action`,cardinality:`cardinality`,feature:`feature`,inferredType:`inferredType`,operator:`operator`,type:`type`};function Xn(e){return N.isInstance(e,Yn.$type)}o(Xn,`isAction`);var Zn={$type:`Alternatives`,cardinality:`cardinality`,elements:`elements`};function Qn(e){return N.isInstance(e,Zn.$type)}o(Qn,`isAlternatives`);var $n={$type:`ArrayLiteral`,elements:`elements`};function er(e){return N.isInstance(e,$n.$type)}o(er,`isArrayLiteral`);var tr={$type:`ArrayType`,elementType:`elementType`};function nr(e){return N.isInstance(e,tr.$type)}o(nr,`isArrayType`);var rr={$type:`Assignment`,cardinality:`cardinality`,feature:`feature`,operator:`operator`,predicate:`predicate`,terminal:`terminal`};function ir(e){return N.isInstance(e,rr.$type)}o(ir,`isAssignment`);var ar={$type:`BooleanLiteral`,true:`true`};function or(e){return N.isInstance(e,ar.$type)}o(or,`isBooleanLiteral`);var sr={$type:`CharacterRange`,cardinality:`cardinality`,left:`left`,lookahead:`lookahead`,parenthesized:`parenthesized`,right:`right`};function cr(e){return N.isInstance(e,sr.$type)}o(cr,`isCharacterRange`);var lr={$type:`Condition`};function ur(e){return N.isInstance(e,lr.$type)}o(ur,`isCondition`);var dr={$type:`Conjunction`,left:`left`,right:`right`};function fr(e){return N.isInstance(e,dr.$type)}o(fr,`isConjunction`);var pr={$type:`CrossReference`,cardinality:`cardinality`,deprecatedSyntax:`deprecatedSyntax`,isMulti:`isMulti`,terminal:`terminal`,type:`type`};function mr(e){return N.isInstance(e,pr.$type)}o(mr,`isCrossReference`);var hr={$type:`Disjunction`,left:`left`,right:`right`};function gr(e){return N.isInstance(e,hr.$type)}o(gr,`isDisjunction`);var _r={$type:`EndOfFile`,cardinality:`cardinality`};function vr(e){return N.isInstance(e,_r.$type)}o(vr,`isEndOfFile`);var yr={$type:`Grammar`,imports:`imports`,interfaces:`interfaces`,isDeclared:`isDeclared`,name:`name`,rules:`rules`,types:`types`};function br(e){return N.isInstance(e,yr.$type)}o(br,`isGrammar`);var xr={$type:`GrammarImport`,path:`path`};function Sr(e){return N.isInstance(e,xr.$type)}o(Sr,`isGrammarImport`);var Cr={$type:`Group`,cardinality:`cardinality`,elements:`elements`,guardCondition:`guardCondition`,predicate:`predicate`};function wr(e){return N.isInstance(e,Cr.$type)}o(wr,`isGroup`);var Tr={$type:`InferredType`,name:`name`};function Er(e){return N.isInstance(e,Tr.$type)}o(Er,`isInferredType`);var Dr={$type:`InfixRule`,call:`call`,dataType:`dataType`,inferredType:`inferredType`,name:`name`,operators:`operators`,parameters:`parameters`,returnType:`returnType`};function Or(e){return N.isInstance(e,Dr.$type)}o(Or,`isInfixRule`);var kr={$type:`InfixRuleOperatorList`,associativity:`associativity`,operators:`operators`};function Ar(e){return N.isInstance(e,kr.$type)}o(Ar,`isInfixRuleOperatorList`);var jr={$type:`InfixRuleOperators`,precedences:`precedences`};function Mr(e){return N.isInstance(e,jr.$type)}o(Mr,`isInfixRuleOperators`);var Nr={$type:`Interface`,attributes:`attributes`,name:`name`,superTypes:`superTypes`};function Pr(e){return N.isInstance(e,Nr.$type)}o(Pr,`isInterface`);var Fr={$type:`Keyword`,cardinality:`cardinality`,predicate:`predicate`,value:`value`};function Ir(e){return N.isInstance(e,Fr.$type)}o(Ir,`isKeyword`);var Lr={$type:`NamedArgument`,calledByName:`calledByName`,parameter:`parameter`,value:`value`};function Rr(e){return N.isInstance(e,Lr.$type)}o(Rr,`isNamedArgument`);var zr={$type:`NegatedToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Br(e){return N.isInstance(e,zr.$type)}o(Br,`isNegatedToken`);var Vr={$type:`Negation`,value:`value`};function Hr(e){return N.isInstance(e,Vr.$type)}o(Hr,`isNegation`);var Ur={$type:`NumberLiteral`,value:`value`};function Wr(e){return N.isInstance(e,Ur.$type)}o(Wr,`isNumberLiteral`);var Gr={$type:`Parameter`,name:`name`};function Kr(e){return N.isInstance(e,Gr.$type)}o(Kr,`isParameter`);var qr={$type:`ParameterReference`,parameter:`parameter`};function Jr(e){return N.isInstance(e,qr.$type)}o(Jr,`isParameterReference`);var Yr={$type:`ParserRule`,dataType:`dataType`,definition:`definition`,entry:`entry`,fragment:`fragment`,inferredType:`inferredType`,name:`name`,parameters:`parameters`,returnType:`returnType`};function Xr(e){return N.isInstance(e,Yr.$type)}o(Xr,`isParserRule`);var Zr={$type:`ReferenceType`,isMulti:`isMulti`,referenceType:`referenceType`};function Qr(e){return N.isInstance(e,Zr.$type)}o(Qr,`isReferenceType`);var $r={$type:`RegexToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,regex:`regex`};function ei(e){return N.isInstance(e,$r.$type)}o(ei,`isRegexToken`);var ti={$type:`ReturnType`,name:`name`};function ni(e){return N.isInstance(e,ti.$type)}o(ni,`isReturnType`);var ri={$type:`RuleCall`,arguments:`arguments`,cardinality:`cardinality`,predicate:`predicate`,rule:`rule`};function ii(e){return N.isInstance(e,ri.$type)}o(ii,`isRuleCall`);var ai={$type:`SimpleType`,primitiveType:`primitiveType`,stringType:`stringType`,typeRef:`typeRef`};function oi(e){return N.isInstance(e,ai.$type)}o(oi,`isSimpleType`);var si={$type:`StringLiteral`,value:`value`};function ci(e){return N.isInstance(e,si.$type)}o(ci,`isStringLiteral`);var li={$type:`TerminalAlternatives`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function ui(e){return N.isInstance(e,li.$type)}o(ui,`isTerminalAlternatives`);var di={$type:`TerminalElement`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function fi(e){return N.isInstance(e,di.$type)}o(fi,`isTerminalElement`);var pi={$type:`TerminalGroup`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function mi(e){return N.isInstance(e,pi.$type)}o(mi,`isTerminalGroup`);var hi={$type:`TerminalRule`,definition:`definition`,fragment:`fragment`,hidden:`hidden`,name:`name`,type:`type`};function gi(e){return N.isInstance(e,hi.$type)}o(gi,`isTerminalRule`);var _i={$type:`TerminalRuleCall`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,rule:`rule`};function vi(e){return N.isInstance(e,_i.$type)}o(vi,`isTerminalRuleCall`);var yi={$type:`Type`,name:`name`,type:`type`};function bi(e){return N.isInstance(e,yi.$type)}o(bi,`isType`);var xi={$type:`TypeAttribute`,defaultValue:`defaultValue`,isOptional:`isOptional`,name:`name`,type:`type`};function Si(e){return N.isInstance(e,xi.$type)}o(Si,`isTypeAttribute`);var Ci={$type:`TypeDefinition`};function wi(e){return N.isInstance(e,Ci.$type)}o(wi,`isTypeDefinition`);var Ti={$type:`UnionType`,types:`types`};function Ei(e){return N.isInstance(e,Ti.$type)}o(Ei,`isUnionType`);var Di={$type:`UnorderedGroup`,cardinality:`cardinality`,elements:`elements`};function Oi(e){return N.isInstance(e,Di.$type)}o(Oi,`isUnorderedGroup`);var ki={$type:`UntilToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Ai(e){return N.isInstance(e,ki.$type)}o(Ai,`isUntilToken`);var ji={$type:`ValueLiteral`};function Mi(e){return N.isInstance(e,ji.$type)}o(Mi,`isValueLiteral`);var Ni={$type:`Wildcard`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function Pi(e){return N.isInstance(e,Ni.$type)}o(Pi,`isWildcard`);var Fi=class extends pn{static{o(this,`LangiumGrammarAstReflection`)}constructor(){super(...arguments),this.types={AbstractElement:{name:Vn.$type,properties:{cardinality:{name:Vn.cardinality}},superTypes:[]},AbstractParserRule:{name:Un.$type,properties:{},superTypes:[Gn.$type,qn.$type]},AbstractRule:{name:Gn.$type,properties:{},superTypes:[]},AbstractType:{name:qn.$type,properties:{},superTypes:[]},Action:{name:Yn.$type,properties:{cardinality:{name:Yn.cardinality},feature:{name:Yn.feature},inferredType:{name:Yn.inferredType},operator:{name:Yn.operator},type:{name:Yn.type,referenceType:qn.$type}},superTypes:[Vn.$type]},Alternatives:{name:Zn.$type,properties:{cardinality:{name:Zn.cardinality},elements:{name:Zn.elements,defaultValue:[]}},superTypes:[Vn.$type]},ArrayLiteral:{name:$n.$type,properties:{elements:{name:$n.elements,defaultValue:[]}},superTypes:[ji.$type]},ArrayType:{name:tr.$type,properties:{elementType:{name:tr.elementType}},superTypes:[Ci.$type]},Assignment:{name:rr.$type,properties:{cardinality:{name:rr.cardinality},feature:{name:rr.feature},operator:{name:rr.operator},predicate:{name:rr.predicate},terminal:{name:rr.terminal}},superTypes:[Vn.$type]},BooleanLiteral:{name:ar.$type,properties:{true:{name:ar.true,defaultValue:!1}},superTypes:[lr.$type,ji.$type]},CharacterRange:{name:sr.$type,properties:{cardinality:{name:sr.cardinality},left:{name:sr.left},lookahead:{name:sr.lookahead},parenthesized:{name:sr.parenthesized,defaultValue:!1},right:{name:sr.right}},superTypes:[di.$type]},Condition:{name:lr.$type,properties:{},superTypes:[]},Conjunction:{name:dr.$type,properties:{left:{name:dr.left},right:{name:dr.right}},superTypes:[lr.$type]},CrossReference:{name:pr.$type,properties:{cardinality:{name:pr.cardinality},deprecatedSyntax:{name:pr.deprecatedSyntax,defaultValue:!1},isMulti:{name:pr.isMulti,defaultValue:!1},terminal:{name:pr.terminal},type:{name:pr.type,referenceType:qn.$type}},superTypes:[Vn.$type]},Disjunction:{name:hr.$type,properties:{left:{name:hr.left},right:{name:hr.right}},superTypes:[lr.$type]},EndOfFile:{name:_r.$type,properties:{cardinality:{name:_r.cardinality}},superTypes:[Vn.$type]},Grammar:{name:yr.$type,properties:{imports:{name:yr.imports,defaultValue:[]},interfaces:{name:yr.interfaces,defaultValue:[]},isDeclared:{name:yr.isDeclared,defaultValue:!1},name:{name:yr.name},rules:{name:yr.rules,defaultValue:[]},types:{name:yr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:xr.$type,properties:{path:{name:xr.path}},superTypes:[]},Group:{name:Cr.$type,properties:{cardinality:{name:Cr.cardinality},elements:{name:Cr.elements,defaultValue:[]},guardCondition:{name:Cr.guardCondition},predicate:{name:Cr.predicate}},superTypes:[Vn.$type]},InferredType:{name:Tr.$type,properties:{name:{name:Tr.name}},superTypes:[qn.$type]},InfixRule:{name:Dr.$type,properties:{call:{name:Dr.call},dataType:{name:Dr.dataType},inferredType:{name:Dr.inferredType},name:{name:Dr.name},operators:{name:Dr.operators},parameters:{name:Dr.parameters,defaultValue:[]},returnType:{name:Dr.returnType,referenceType:qn.$type}},superTypes:[Un.$type]},InfixRuleOperatorList:{name:kr.$type,properties:{associativity:{name:kr.associativity},operators:{name:kr.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:jr.$type,properties:{precedences:{name:jr.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Nr.$type,properties:{attributes:{name:Nr.attributes,defaultValue:[]},name:{name:Nr.name},superTypes:{name:Nr.superTypes,defaultValue:[],referenceType:qn.$type}},superTypes:[qn.$type]},Keyword:{name:Fr.$type,properties:{cardinality:{name:Fr.cardinality},predicate:{name:Fr.predicate},value:{name:Fr.value}},superTypes:[Vn.$type]},NamedArgument:{name:Lr.$type,properties:{calledByName:{name:Lr.calledByName,defaultValue:!1},parameter:{name:Lr.parameter,referenceType:Gr.$type},value:{name:Lr.value}},superTypes:[]},NegatedToken:{name:zr.$type,properties:{cardinality:{name:zr.cardinality},lookahead:{name:zr.lookahead},parenthesized:{name:zr.parenthesized,defaultValue:!1},terminal:{name:zr.terminal}},superTypes:[di.$type]},Negation:{name:Vr.$type,properties:{value:{name:Vr.value}},superTypes:[lr.$type]},NumberLiteral:{name:Ur.$type,properties:{value:{name:Ur.value}},superTypes:[ji.$type]},Parameter:{name:Gr.$type,properties:{name:{name:Gr.name}},superTypes:[]},ParameterReference:{name:qr.$type,properties:{parameter:{name:qr.parameter,referenceType:Gr.$type}},superTypes:[lr.$type]},ParserRule:{name:Yr.$type,properties:{dataType:{name:Yr.dataType},definition:{name:Yr.definition},entry:{name:Yr.entry,defaultValue:!1},fragment:{name:Yr.fragment,defaultValue:!1},inferredType:{name:Yr.inferredType},name:{name:Yr.name},parameters:{name:Yr.parameters,defaultValue:[]},returnType:{name:Yr.returnType,referenceType:qn.$type}},superTypes:[Un.$type]},ReferenceType:{name:Zr.$type,properties:{isMulti:{name:Zr.isMulti,defaultValue:!1},referenceType:{name:Zr.referenceType}},superTypes:[Ci.$type]},RegexToken:{name:$r.$type,properties:{cardinality:{name:$r.cardinality},lookahead:{name:$r.lookahead},parenthesized:{name:$r.parenthesized,defaultValue:!1},regex:{name:$r.regex}},superTypes:[di.$type]},ReturnType:{name:ti.$type,properties:{name:{name:ti.name}},superTypes:[]},RuleCall:{name:ri.$type,properties:{arguments:{name:ri.arguments,defaultValue:[]},cardinality:{name:ri.cardinality},predicate:{name:ri.predicate},rule:{name:ri.rule,referenceType:Gn.$type}},superTypes:[Vn.$type]},SimpleType:{name:ai.$type,properties:{primitiveType:{name:ai.primitiveType},stringType:{name:ai.stringType},typeRef:{name:ai.typeRef,referenceType:qn.$type}},superTypes:[Ci.$type]},StringLiteral:{name:si.$type,properties:{value:{name:si.value}},superTypes:[ji.$type]},TerminalAlternatives:{name:li.$type,properties:{cardinality:{name:li.cardinality},elements:{name:li.elements,defaultValue:[]},lookahead:{name:li.lookahead},parenthesized:{name:li.parenthesized,defaultValue:!1}},superTypes:[di.$type]},TerminalElement:{name:di.$type,properties:{cardinality:{name:di.cardinality},lookahead:{name:di.lookahead},parenthesized:{name:di.parenthesized,defaultValue:!1}},superTypes:[Vn.$type]},TerminalGroup:{name:pi.$type,properties:{cardinality:{name:pi.cardinality},elements:{name:pi.elements,defaultValue:[]},lookahead:{name:pi.lookahead},parenthesized:{name:pi.parenthesized,defaultValue:!1}},superTypes:[di.$type]},TerminalRule:{name:hi.$type,properties:{definition:{name:hi.definition},fragment:{name:hi.fragment,defaultValue:!1},hidden:{name:hi.hidden,defaultValue:!1},name:{name:hi.name},type:{name:hi.type}},superTypes:[Gn.$type]},TerminalRuleCall:{name:_i.$type,properties:{cardinality:{name:_i.cardinality},lookahead:{name:_i.lookahead},parenthesized:{name:_i.parenthesized,defaultValue:!1},rule:{name:_i.rule,referenceType:hi.$type}},superTypes:[di.$type]},Type:{name:yi.$type,properties:{name:{name:yi.name},type:{name:yi.type}},superTypes:[qn.$type]},TypeAttribute:{name:xi.$type,properties:{defaultValue:{name:xi.defaultValue},isOptional:{name:xi.isOptional,defaultValue:!1},name:{name:xi.name},type:{name:xi.type}},superTypes:[]},TypeDefinition:{name:Ci.$type,properties:{},superTypes:[]},UnionType:{name:Ti.$type,properties:{types:{name:Ti.types,defaultValue:[]}},superTypes:[Ci.$type]},UnorderedGroup:{name:Di.$type,properties:{cardinality:{name:Di.cardinality},elements:{name:Di.elements,defaultValue:[]}},superTypes:[Vn.$type]},UntilToken:{name:ki.$type,properties:{cardinality:{name:ki.cardinality},lookahead:{name:ki.lookahead},parenthesized:{name:ki.parenthesized,defaultValue:!1},terminal:{name:ki.terminal}},superTypes:[di.$type]},ValueLiteral:{name:ji.$type,properties:{},superTypes:[]},Wildcard:{name:Ni.$type,properties:{cardinality:{name:Ni.cardinality},lookahead:{name:Ni.lookahead},parenthesized:{name:Ni.parenthesized,defaultValue:!1}},superTypes:[di.$type]}}}},N=new Fi;function Ii(e){let t=e,n=!1;for(;t;){let e=En(t.grammarSource,Xr);if(e&&e.dataType)t=t.container,n=!0;else if(n)return t;else return}}o(Ii,`getDatatypeNode`);function Li(e){return new Sn(e,e=>mn(e)?e.content:[],{includeRoot:!0})}o(Li,`streamCst`);function Ri(e){return Li(e).filter(hn)}o(Ri,`flattenCst`);function zi(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}o(zi,`isChildNode`);function Bi(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}o(Bi,`tokenToRange`);function Vi(e){if(!e)return;let{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}o(Vi,`toDocumentSegment`);var Hi;(function(e){e[e.Before=0]=`Before`,e[e.After=1]=`After`,e[e.OverlapFront=2]=`OverlapFront`,e[e.OverlapBack=3]=`OverlapBack`,e[e.Inside=4]=`Inside`,e[e.Outside=5]=`Outside`})(Hi||={});function Ui(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return Hi.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Hi.After;let n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return n&&r?Hi.Inside:n?Hi.OverlapBack:r?Hi.OverlapFront:Hi.Outside}o(Ui,`compareRange`);function Wi(e,t){return Ui(e,t)>Hi.After}o(Wi,`inRange`);var Gi=/^[\w\p{L}]$/u;function Ki(e,t,n=Gi){if(e){if(t>0){let r=t-e.offset,i=e.text.charAt(r);n.test(i)||t--}return Yi(e,t)}}o(Ki,`findDeclarationNodeAtOffset`);function qi(e,t){if(e){let n=Qi(e,!0);if(n&&Ji(n,t))return n;if(gn(e)){let n=e.content.findIndex(e=>!e.hidden);for(let r=n-1;r>=0;r--){let n=e.content[r];if(Ji(n,t))return n}}}}o(qi,`findCommentNode`);function Ji(e,t){return hn(e)&&t.includes(e.tokenType.name)}o(Ji,`isCommentNode`);function Yi(e,t){if(hn(e))return e;if(mn(e)){let n=Zi(e,t,!1);if(n)return Yi(n,t)}}o(Yi,`findLeafNodeAtOffset`);function Xi(e,t){if(hn(e))return e;if(mn(e)){let n=Zi(e,t,!0);if(n)return Xi(n,t)}}o(Xi,`findLeafNodeBeforeOffset`);function Zi(e,t,n){let r=0,i=e.content.length-1,a;for(;r<=i;){let o=Math.floor((r+i)/2),s=e.content[o];if(s.offset<=t&&s.end>t)return s;s.end<=t?(a=n?s:void 0,r=o+1):i=o-1}return a}o(Zi,`binarySearch`);function Qi(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e);for(;r>0;){r--;let e=n.content[r];if(t||!e.hidden)return e}e=n}}o(Qi,`getPreviousNode`);function $i(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e),i=n.content.length-1;for(;r<i;){r++;let e=n.content[r];if(t||!e.hidden)return e}e=n}}o($i,`getNextNode`);function ea(e){if(e.range.start.character===0)return e;let t=e.range.start.line,n=e,r;for(;e.container;){let i=e.container,a=r??i.content.indexOf(e);if(a===0?(e=i,r=void 0):(r=a-1,e=i.content[r]),e.range.start.line!==t)break;n=e}return n}o(ea,`getStartlineNode`);function ta(e,t){let n=na(e,t);return n?n.parent.content.slice(n.a+1,n.b):[]}o(ta,`getInteriorNodes`);function na(e,t){let n=ra(e),r=ra(t),i;for(let e=0;e<n.length&&e<r.length;e++){let t=n[e],a=r[e];if(t.parent===a.parent)i={parent:t.parent,a:t.index,b:a.index};else break}return i}o(na,`getCommonParent`);function ra(e){let t=[];for(;e.container;){let n=e.container,r=n.content.indexOf(e);t.push({parent:n,index:r}),e=n}return t.reverse()}o(ra,`getParentChain`);var ia={};l(ia,{findAssignment:()=>Ga,findNameAssignment:()=>Ka,findNodeForKeyword:()=>Ua,findNodeForProperty:()=>Ba,findNodesForKeyword:()=>Ha,findNodesForKeywordInternal:()=>Wa,findNodesForProperty:()=>za,getActionAtElement:()=>Ja,getActionType:()=>io,getAllReachableRules:()=>Pa,getAllRulesUsedForCrossReferences:()=>Ia,getCrossReferenceTerminal:()=>La,getEntryRule:()=>Ma,getExplicitRuleType:()=>no,getHiddenRules:()=>Na,getRuleType:()=>oo,getRuleTypeName:()=>ao,getTypeName:()=>ro,isArrayCardinality:()=>Xa,isArrayOperator:()=>Za,isCommentTerminal:()=>Ra,isDataType:()=>eo,isDataTypeRule:()=>Qa,isOptionalCardinality:()=>Ya,terminalRegex:()=>so});var aa=class extends Error{static{o(this,`ErrorWithLocation`)}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function oa(e,t=`Error: Got unexpected value.`){throw Error(t)}o(oa,`assertUnreachable`);function sa(e,t=`Error: Condition is violated.`){if(!e)throw Error(t)}o(sa,`assertCondition`);var ca={};l(ca,{NEWLINE_REGEXP:()=>Sa,escapeRegExp:()=>ka,getTerminalParts:()=>Ta,isMultilineComment:()=>Ea,isWhitespace:()=>Oa,partialMatches:()=>Aa,partialRegExp:()=>ja,whitespaceCharacters:()=>Da});function P(e){return e.charCodeAt(0)}o(P,`cc`);function la(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}o(la,`insertToSet`);function ua(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}o(ua,`addFlag`);function da(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}o(da,`ASSERT_EXISTS`);function fa(){throw Error(`Internal Error - Should never get here!`)}o(fa,`ASSERT_NEVER_REACH_HERE`);function pa(e){return e.type===`Character`}o(pa,`isCharacter`);var ma=[];for(let e=P(`0`);e<=P(`9`);e++)ma.push(e);var ha=[P(`_`)].concat(ma);for(let e=P(`a`);e<=P(`z`);e++)ha.push(e);for(let e=P(`A`);e<=P(`Z`);e++)ha.push(e);var ga=[P(` `),P(`\f`),P(`
|
|
35
|
+
`)),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;O.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else O.log(`Received response ${e.id} without active response promise.`,n)}else qe(`receive-response`,e)}o(Ke,`traceReceivedResponse`);function qe(e,t){if(!O||D===f.Off)return;let n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};O.log(n)}o(qe,`logLSPMessage`);function Je(){if(De())throw new v(_.Closed,`Connection is closed.`);if(Oe())throw new v(_.Disposed,`Connection is disposed.`)}o(Je,`throwIfClosedOrDisposed`);function Ye(){if(Ee())throw new v(_.AlreadyListening,`Connection is already listening`)}o(Ye,`throwIfListening`);function Xe(){if(!Ee())throw Error(`Call listen() first.`)}o(Xe,`throwIfNotListening`);function Ze(e){return e===void 0?null:e}o(Ze,`undefinedToNull`);function Qe(e){if(e!==null)return e}o(Qe,`nullToUndefined`);function $e(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}o($e,`isNamedParam`);function et(e,t){switch(e){case r.ParameterStructures.auto:return $e(t)?Qe(t):[Ze(t)];case r.ParameterStructures.byName:if(!$e(t))throw Error(`Received parameters by name but param is not an object literal.`);return Qe(t);case r.ParameterStructures.byPosition:return[Ze(t)];default:throw Error(`Unknown parameter structure ${e.toString()}`)}}o(et,`computeSingleParam`);function tt(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=et(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(Ze(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null);break}return n}o(tt,`computeMessageParams`);let nt={sendNotification:o((e,...t)=>{Je();let i,a;if(n.string(e)){i=e;let n=t[0],o=0,s=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(o=1,s=n);let c=t.length,l=c-o;switch(l){case 0:a=void 0;break;case 1:a=et(s,t[o]);break;default:if(s===r.ParameterStructures.byName)throw Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);a=t.slice(o,c).map(e=>Ze(e));break}}else{let n=t;i=e.method,a=tt(e,n)}let o={jsonrpc:`2.0`,method:i,params:a};return He(o),y.write(o).catch(e=>{throw S.error(`Sending notification failed.`),e})},`sendNotification`),onNotification:o((e,t)=>{Je();let r;return n.func(e)?ce=e:t&&(n.string(e)?(r=e,le.set(e,{type:void 0,handler:t})):(r=e.method,le.set(e.method,{type:e,handler:t}))),{dispose:o(()=>{r===void 0?ce=void 0:le.delete(r)},`dispose`)}},`onNotification`),onProgress:o((e,t,n)=>{if(ue.has(t))throw Error(`Progress handler for token ${t} already registered`);return ue.set(t,n),{dispose:o(()=>{ue.delete(t)},`dispose`)}},`onProgress`),sendProgress:o((e,t,n)=>nt.sendNotification(u.type,{token:t,value:n}),`sendProgress`),onUnhandledProgress:ve.event,sendRequest:o((e,...t)=>{Je(),Xe();let i,a,c;if(n.string(e)){i=e;let n=t[0],o=t[t.length-1],l=0,u=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(l=1,u=n);let d=t.length;s.CancellationToken.is(o)&&(--d,c=o);let f=d-l;switch(f){case 0:a=void 0;break;case 1:a=et(u,t[l]);break;default:if(u===r.ParameterStructures.byName)throw Error(`Received ${f} parameters for 'by Name' request parameter structure.`);a=t.slice(l,d).map(e=>Ze(e));break}}else{let n=t;i=e.method,a=tt(e,n);let r=e.numberOfParams;c=s.CancellationToken.is(n[r])?n[r]:void 0}let l=C++,u;c&&(u=c.onCancellationRequested(()=>{let e=be.sender.sendCancellation(nt,l);return e===void 0?(S.log(`Received no promise from cancellation strategy when cancelling id ${l}`),Promise.resolve()):e.catch(()=>{S.log(`Sending cancellation messages for id ${l} failed`)})}));let d={jsonrpc:`2.0`,id:l,method:i,params:a};return Ve(d),typeof be.sender.enableCancellation==`function`&&be.sender.enableCancellation(d),new Promise(async(e,t)=>{let n=o(t=>{e(t),be.sender.cleanup(l),u?.dispose()},`resolveWithCleanup`),a=o(e=>{t(e),be.sender.cleanup(l),u?.dispose()},`rejectWithCleanup`),s={method:i,timerStart:Date.now(),resolve:n,reject:a};try{await y.write(d),T.set(l,s)}catch(e){throw S.error(`Sending request failed.`),s.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,e.message?e.message:`Unknown reason`)),e}})},`sendRequest`),onRequest:o((e,t)=>{Je();let r=null;return d.is(e)?(r=void 0,oe=e):n.string(e)?(r=null,t!==void 0&&(r=e,se.set(e,{handler:t,type:void 0}))):t!==void 0&&(r=e.method,se.set(e.method,{type:e,handler:t})),{dispose:o(()=>{r!==null&&(r===void 0?oe=void 0:se.delete(r))},`dispose`)}},`onRequest`),hasPendingResponse:o(()=>T.size>0,`hasPendingResponse`),trace:o(async(e,t,r)=>{let i=!1,a=m.Text;r!==void 0&&(n.boolean(r)?i=r:(i=r.sendNotification||!1,a=r.traceFormat||m.Text)),D=e,pe=a,O=D===f.Off?void 0:t,i&&!De()&&!Oe()&&await nt.sendNotification(h.type,{value:f.toString(e)})},`trace`),onError:he.event,onClose:ge.event,onUnhandledNotification:_e.event,onDispose:ye.event,end:o(()=>{y.end()},`end`),dispose:o(()=>{if(Oe())return;me=re.Disposed,ye.fire(void 0);let e=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let t of T.values())t.reject(e);T=new Map,E=new Map,fe=new Set,w=new i.LinkedMap,n.func(y.dispose)&&y.dispose(),n.func(p.dispose)&&p.dispose()},`dispose`),listen:o(()=>{Je(),Ye(),me=re.Listening,p.listen(Fe)},`listen`),inspect:o(()=>{(0,t.default)().console.log(`inspect`)},`inspect`)};return nt.onNotification(g.type,e=>{if(D===f.Off||!O)return;let t=D===f.Verbose||D===f.Compact;O.log(e.message,t?e.verbose:void 0)}),nt.onNotification(u.type,e=>{let t=ue.get(e.token);t?t(e.value):ve.fire(e)}),nt}o(ie,`createMessageConnection`),e.createMessageConnection=ie}}),At=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=xt();Object.defineProperty(e,"Message",{enumerable:!0,get:o(function(){return t.Message},`get`)}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:o(function(){return t.RequestType},`get`)}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:o(function(){return t.RequestType0},`get`)}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:o(function(){return t.RequestType1},`get`)}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:o(function(){return t.RequestType2},`get`)}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:o(function(){return t.RequestType3},`get`)}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:o(function(){return t.RequestType4},`get`)}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:o(function(){return t.RequestType5},`get`)}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:o(function(){return t.RequestType6},`get`)}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:o(function(){return t.RequestType7},`get`)}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:o(function(){return t.RequestType8},`get`)}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:o(function(){return t.RequestType9},`get`)}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:o(function(){return t.ResponseError},`get`)}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:o(function(){return t.ErrorCodes},`get`)}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:o(function(){return t.NotificationType},`get`)}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:o(function(){return t.NotificationType0},`get`)}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:o(function(){return t.NotificationType1},`get`)}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:o(function(){return t.NotificationType2},`get`)}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:o(function(){return t.NotificationType3},`get`)}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:o(function(){return t.NotificationType4},`get`)}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:o(function(){return t.NotificationType5},`get`)}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:o(function(){return t.NotificationType6},`get`)}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:o(function(){return t.NotificationType7},`get`)}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:o(function(){return t.NotificationType8},`get`)}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:o(function(){return t.NotificationType9},`get`)}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:o(function(){return t.ParameterStructures},`get`)});var n=St();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:o(function(){return n.LinkedMap},`get`)}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:o(function(){return n.LRUCache},`get`)}),Object.defineProperty(e,"Touch",{enumerable:!0,get:o(function(){return n.Touch},`get`)});var r=Ct();Object.defineProperty(e,"Disposable",{enumerable:!0,get:o(function(){return r.Disposable},`get`)});var i=yt();Object.defineProperty(e,"Event",{enumerable:!0,get:o(function(){return i.Event},`get`)}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:o(function(){return i.Emitter},`get`)});var a=bt();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:o(function(){return a.CancellationTokenSource},`get`)}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:o(function(){return a.CancellationToken},`get`)});var s=wt();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:o(function(){return s.SharedArraySenderStrategy},`get`)}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:o(function(){return s.SharedArrayReceiverStrategy},`get`)});var c=Et();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:o(function(){return c.MessageReader},`get`)}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:o(function(){return c.AbstractMessageReader},`get`)}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:o(function(){return c.ReadableStreamMessageReader},`get`)});var l=Dt();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:o(function(){return l.MessageWriter},`get`)}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:o(function(){return l.AbstractMessageWriter},`get`)}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:o(function(){return l.WriteableStreamMessageWriter},`get`)});var u=Ot();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:o(function(){return u.AbstractMessageBuffer},`get`)});var d=kt();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:o(function(){return d.ConnectionStrategy},`get`)}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:o(function(){return d.ConnectionOptions},`get`)}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:o(function(){return d.NullLogger},`get`)}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:o(function(){return d.createMessageConnection},`get`)}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:o(function(){return d.ProgressToken},`get`)}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:o(function(){return d.ProgressType},`get`)}),Object.defineProperty(e,"Trace",{enumerable:!0,get:o(function(){return d.Trace},`get`)}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:o(function(){return d.TraceValues},`get`)}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:o(function(){return d.TraceFormat},`get`)}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:o(function(){return d.SetTraceNotification},`get`)}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:o(function(){return d.LogTraceNotification},`get`)}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:o(function(){return d.ConnectionErrors},`get`)}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:o(function(){return d.ConnectionError},`get`)}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:o(function(){return d.CancellationReceiverStrategy},`get`)}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:o(function(){return d.CancellationSenderStrategy},`get`)}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:o(function(){return d.CancellationStrategy},`get`)}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:o(function(){return d.MessageStrategy},`get`)}),e.RAL=_t().default}}),jt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=At(),n=class e extends t.AbstractMessageBuffer{static{o(this,`MessageBuffer`)}constructor(e=`utf-8`){super(e),this.asciiDecoder=new TextDecoder(`ascii`)}emptyBuffer(){return e.emptyBuffer}fromString(e,t){return new TextEncoder().encode(e)}toString(e,t){return t===`ascii`?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}};n.emptyBuffer=new Uint8Array;var r=class{static{o(this,`ReadableStreamWrapper`)}constructor(e){this.socket=e,this._onData=new t.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,t.RAL)().console.error(`Converting blob to array buffer failed.`)})},this.socket.addEventListener(`message`,this._messageListener)}onClose(e){return this.socket.addEventListener(`close`,e),t.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),t.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),t.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}onData(e){return this._onData.event(e)}},i=class{static{o(this,`WritableStreamWrapper`)}constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener(`close`,e),t.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),t.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),t.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}write(e,t){if(typeof e==`string`){if(t!==void 0&&t!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},a=new TextEncoder,s=Object.freeze({messageBuffer:Object.freeze({create:o(e=>new n(e),`create`)}),applicationJson:Object.freeze({encoder:Object.freeze({name:`application/json`,encode:o((e,t)=>{if(t.charset!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))},`encode`)}),decoder:Object.freeze({name:`application/json`,decode:o((e,t)=>{if(!(e instanceof Uint8Array))throw Error(`In a Browser environments only Uint8Arrays are supported.`);return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))},`decode`)})}),stream:Object.freeze({asReadableStream:o(e=>new r(e),`asReadableStream`),asWritableStream:o(e=>new i(e),`asWritableStream`)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:o(()=>clearTimeout(r),`dispose`)}},setImmediate(e,...t){let n=setTimeout(e,0,...t);return{dispose:o(()=>clearTimeout(n),`dispose`)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:o(()=>clearInterval(r),`dispose`)}}})});function c(){return s}o(c,`RIL`),(function(e){function n(){t.RAL.install(s)}o(n,`install`),e.install=n})(c||={}),e.default=c}}),Mt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,jt().default.install();var r=At();n(At(),e),e.BrowserMessageReader=class extends r.AbstractMessageReader{static{o(this,`BrowserMessageReader`)}constructor(e){super(),this._onData=new r.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener(`error`,e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}},e.BrowserMessageWriter=class extends r.AbstractMessageWriter{static{o(this,`BrowserMessageWriter`)}constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener(`error`,e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};function i(e,t,n,i){return n===void 0&&(n=r.NullLogger),r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}o(i,`createMessageConnection`),e.createMessageConnection=i}}),Nt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=Mt()}}),A=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=Mt(),n;(function(e){e.clientToServer=`clientToServer`,e.serverToClient=`serverToClient`,e.both=`both`})(n||(e.MessageDirection=n={})),e.RegistrationType=class{static{o(this,`RegistrationType`)}constructor(e){this.method=e}},e.ProtocolRequestType0=class extends t.RequestType0{static{o(this,`ProtocolRequestType0`)}constructor(e){super(e)}},e.ProtocolRequestType=class extends t.RequestType{static{o(this,`ProtocolRequestType`)}constructor(e){super(e,t.ParameterStructures.byName)}},e.ProtocolNotificationType0=class extends t.NotificationType0{static{o(this,`ProtocolNotificationType0`)}constructor(e){super(e)}},e.ProtocolNotificationType=class extends t.NotificationType{static{o(this,`ProtocolNotificationType`)}constructor(e){super(e,t.ParameterStructures.byName)}}}}),Pt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}o(t,`boolean`),e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}o(n,`string`),e.string=n;function r(e){return typeof e==`number`||e instanceof Number}o(r,`number`),e.number=r;function i(e){return e instanceof Error}o(i,`error`),e.error=i;function a(e){return typeof e==`function`}o(a,`func`),e.func=a;function s(e){return Array.isArray(e)}o(s,`array`),e.array=s;function c(e){return s(e)&&e.every(e=>n(e))}o(c,`stringArray`),e.stringArray=c;function l(e,t){return Array.isArray(e)&&e.every(t)}o(l,`typedArray`),e.typedArray=l;function u(e){return typeof e==`object`&&!!e}o(u,`objectLiteral`),e.objectLiteral=u}}),Ft=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/implementation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ImplementationRequest=n={}))}}),It=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/typeDefinition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeDefinitionRequest=n={}))}}),Lt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t=A(),n;(function(e){e.method=`workspace/workspaceFolders`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(n||(e.WorkspaceFoldersRequest=n={}));var r;(function(e){e.method=`workspace/didChangeWorkspaceFolders`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(r||(e.DidChangeWorkspaceFoldersNotification=r={}))}}),Rt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=A(),n;(function(e){e.method=`workspace/configuration`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ConfigurationRequest=n={}))}}),zt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/documentColor`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DocumentColorRequest=n={}));var r;(function(e){e.method=`textDocument/colorPresentation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.ColorPresentationRequest=r={}))}}),Bt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/foldingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.FoldingRangeRequest=n={}));var r;(function(e){e.method=`workspace/foldingRange/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.FoldingRangeRefreshRequest=r={}))}}),Vt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/declaration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DeclarationRequest=n={}))}}),Ht=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/selectionRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.SelectionRangeRequest=n={}))}}),Ut=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t=Mt(),n=A(),r;(function(e){e.type=new t.ProgressType;function n(t){return t===e.type}o(n,`is`),e.is=n})(r||(e.WorkDoneProgress=r={}));var i;(function(e){e.method=`window/workDoneProgress/create`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)})(i||(e.WorkDoneProgressCreateRequest=i={}));var a;(function(e){e.method=`window/workDoneProgress/cancel`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(a||(e.WorkDoneProgressCancelNotification=a={}))}}),Wt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/prepareCallHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.CallHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`callHierarchy/incomingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.CallHierarchyIncomingCallsRequest=r={}));var i;(function(e){e.method=`callHierarchy/outgoingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.CallHierarchyOutgoingCallsRequest=i={}))}}),Gt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t=A(),n;(function(e){e.Relative=`relative`})(n||(e.TokenFormat=n={}));var r;(function(e){e.method=`textDocument/semanticTokens`,e.type=new t.RegistrationType(e.method)})(r||(e.SemanticTokensRegistrationType=r={}));var i;(function(e){e.method=`textDocument/semanticTokens/full`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(i||(e.SemanticTokensRequest=i={}));var a;(function(e){e.method=`textDocument/semanticTokens/full/delta`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(a||(e.SemanticTokensDeltaRequest=a={}));var o;(function(e){e.method=`textDocument/semanticTokens/range`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(o||(e.SemanticTokensRangeRequest=o={}));var s;(function(e){e.method=`workspace/semanticTokens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(s||(e.SemanticTokensRefreshRequest=s={}))}}),Kt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=A(),n;(function(e){e.method=`window/showDocument`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ShowDocumentRequest=n={}))}}),qt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/linkedEditingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.LinkedEditingRangeRequest=n={}))}}),Jt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t=A(),n;(function(e){e.file=`file`,e.folder=`folder`})(n||(e.FileOperationPatternKind=n={}));var r;(function(e){e.method=`workspace/willCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.WillCreateFilesRequest=r={}));var i;(function(e){e.method=`workspace/didCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(i||(e.DidCreateFilesNotification=i={}));var a;(function(e){e.method=`workspace/willRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(a||(e.WillRenameFilesRequest=a={}));var o;(function(e){e.method=`workspace/didRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(o||(e.DidRenameFilesNotification=o={}));var s;(function(e){e.method=`workspace/didDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(s||(e.DidDeleteFilesNotification=s={}));var c;(function(e){e.method=`workspace/willDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(c||(e.WillDeleteFilesRequest=c={}))}}),Yt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=A(),n;(function(e){e.document=`document`,e.project=`project`,e.group=`group`,e.scheme=`scheme`,e.global=`global`})(n||(e.UniquenessLevel=n={}));var r;(function(e){e.$import=`import`,e.$export=`export`,e.local=`local`})(r||(e.MonikerKind=r={}));var i;(function(e){e.method=`textDocument/moniker`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.MonikerRequest=i={}))}}),Xt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/prepareTypeHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`typeHierarchy/supertypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.TypeHierarchySupertypesRequest=r={}));var i;(function(e){e.method=`typeHierarchy/subtypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.TypeHierarchySubtypesRequest=i={}))}}),Zt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/inlineValue`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineValueRequest=n={}));var r;(function(e){e.method=`workspace/inlineValue/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.InlineValueRefreshRequest=r={}))}}),Qt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/inlayHint`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlayHintRequest=n={}));var r;(function(e){e.method=`inlayHint/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.InlayHintResolveRequest=r={}));var i;(function(e){e.method=`workspace/inlayHint/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(i||(e.InlayHintRefreshRequest=i={}))}}),$t=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t=Mt(),n=Pt(),r=A(),i;(function(e){function t(e){let t=e;return t&&n.boolean(t.retriggerRequest)}o(t,`is`),e.is=t})(i||(e.DiagnosticServerCancellationData=i={}));var a;(function(e){e.Full=`full`,e.Unchanged=`unchanged`})(a||(e.DocumentDiagnosticReportKind=a={}));var s;(function(e){e.method=`textDocument/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(s||(e.DocumentDiagnosticRequest=s={}));var c;(function(e){e.method=`workspace/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(c||(e.WorkspaceDiagnosticRequest=c={}));var l;(function(e){e.method=`workspace/diagnostic/refresh`,e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)})(l||(e.DiagnosticRefreshRequest=l={}))}}),en=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var t=(gt(),p(m)),n=Pt(),r=A(),i;(function(e){e.Markup=1,e.Code=2;function t(e){return e===1||e===2}o(t,`is`),e.is=t})(i||(e.NotebookCellKind=i={}));var a;(function(e){function r(e,t){let n={executionOrder:e};return(t===!0||t===!1)&&(n.success=t),n}o(r,`create`),e.create=r;function i(e){let r=e;return n.objectLiteral(r)&&t.uinteger.is(r.executionOrder)&&(r.success===void 0||n.boolean(r.success))}o(i,`is`),e.is=i;function a(e,t){return e===t?!0:e==null||t==null?!1:e.executionOrder===t.executionOrder&&e.success===t.success}o(a,`equals`),e.equals=a})(a||(e.ExecutionSummary=a={}));var s;(function(e){function r(e,t){return{kind:e,document:t}}o(r,`create`),e.create=r;function s(e){let r=e;return n.objectLiteral(r)&&i.is(r.kind)&&t.DocumentUri.is(r.document)&&(r.metadata===void 0||n.objectLiteral(r.metadata))}o(s,`is`),e.is=s;function c(e,t){let n=new Set;return e.document!==t.document&&n.add(`document`),e.kind!==t.kind&&n.add(`kind`),e.executionSummary!==t.executionSummary&&n.add(`executionSummary`),(e.metadata!==void 0||t.metadata!==void 0)&&!l(e.metadata,t.metadata)&&n.add(`metadata`),(e.executionSummary!==void 0||t.executionSummary!==void 0)&&!a.equals(e.executionSummary,t.executionSummary)&&n.add(`executionSummary`),n}o(c,`diff`),e.diff=c;function l(e,t){if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!=`object`)return!1;let r=Array.isArray(e),i=Array.isArray(t);if(r!==i)return!1;if(r&&i){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!l(e[n],t[n]))return!1}if(n.objectLiteral(e)&&n.objectLiteral(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||(n.sort(),r.sort(),!l(n,r)))return!1;for(let r=0;r<n.length;r++){let i=n[r];if(!l(e[i],t[i]))return!1}}return!0}o(l,`equalsMetadata`)})(s||(e.NotebookCell=s={}));var c;(function(e){function r(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}}o(r,`create`),e.create=r;function i(e){let r=e;return n.objectLiteral(r)&&n.string(r.uri)&&t.integer.is(r.version)&&n.typedArray(r.cells,s.is)}o(i,`is`),e.is=i})(c||(e.NotebookDocument=c={}));var l;(function(e){e.method=`notebookDocument/sync`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.RegistrationType(e.method)})(l||(e.NotebookDocumentSyncRegistrationType=l={}));var u;(function(e){e.method=`notebookDocument/didOpen`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(u||(e.DidOpenNotebookDocumentNotification=u={}));var d;(function(e){function r(e){let r=e;return n.objectLiteral(r)&&t.uinteger.is(r.start)&&t.uinteger.is(r.deleteCount)&&(r.cells===void 0||n.typedArray(r.cells,s.is))}o(r,`is`),e.is=r;function i(e,t,n){let r={start:e,deleteCount:t};return n!==void 0&&(r.cells=n),r}o(i,`create`),e.create=i})(d||(e.NotebookCellArrayChange=d={}));var f;(function(e){e.method=`notebookDocument/didChange`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(f||(e.DidChangeNotebookDocumentNotification=f={}));var h;(function(e){e.method=`notebookDocument/didSave`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(h||(e.DidSaveNotebookDocumentNotification=h={}));var g;(function(e){e.method=`notebookDocument/didClose`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(g||(e.DidCloseNotebookDocumentNotification=g={}))}}),tn=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;var t=A(),n;(function(e){e.method=`textDocument/inlineCompletion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineCompletionRequest=n={}))}}),nn=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=A(),n=(gt(),p(m)),r=Pt(),i=Ft();Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:o(function(){return i.ImplementationRequest},`get`)});var a=It();Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:o(function(){return a.TypeDefinitionRequest},`get`)});var s=Lt();Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:o(function(){return s.WorkspaceFoldersRequest},`get`)}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:o(function(){return s.DidChangeWorkspaceFoldersNotification},`get`)});var c=Rt();Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:o(function(){return c.ConfigurationRequest},`get`)});var l=zt();Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:o(function(){return l.DocumentColorRequest},`get`)}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:o(function(){return l.ColorPresentationRequest},`get`)});var u=Bt();Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:o(function(){return u.FoldingRangeRequest},`get`)}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:o(function(){return u.FoldingRangeRefreshRequest},`get`)});var d=Vt();Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:o(function(){return d.DeclarationRequest},`get`)});var f=Ht();Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:o(function(){return f.SelectionRangeRequest},`get`)});var h=Ut();Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:o(function(){return h.WorkDoneProgress},`get`)}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:o(function(){return h.WorkDoneProgressCreateRequest},`get`)}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:o(function(){return h.WorkDoneProgressCancelNotification},`get`)});var g=Wt();Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:o(function(){return g.CallHierarchyIncomingCallsRequest},`get`)}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:o(function(){return g.CallHierarchyOutgoingCallsRequest},`get`)}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:o(function(){return g.CallHierarchyPrepareRequest},`get`)});var _=Gt();Object.defineProperty(e,"TokenFormat",{enumerable:!0,get:o(function(){return _.TokenFormat},`get`)}),Object.defineProperty(e,"SemanticTokensRequest",{enumerable:!0,get:o(function(){return _.SemanticTokensRequest},`get`)}),Object.defineProperty(e,"SemanticTokensDeltaRequest",{enumerable:!0,get:o(function(){return _.SemanticTokensDeltaRequest},`get`)}),Object.defineProperty(e,"SemanticTokensRangeRequest",{enumerable:!0,get:o(function(){return _.SemanticTokensRangeRequest},`get`)}),Object.defineProperty(e,"SemanticTokensRefreshRequest",{enumerable:!0,get:o(function(){return _.SemanticTokensRefreshRequest},`get`)}),Object.defineProperty(e,"SemanticTokensRegistrationType",{enumerable:!0,get:o(function(){return _.SemanticTokensRegistrationType},`get`)});var v=Kt();Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:o(function(){return v.ShowDocumentRequest},`get`)});var y=qt();Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:o(function(){return y.LinkedEditingRangeRequest},`get`)});var b=Jt();Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:o(function(){return b.FileOperationPatternKind},`get`)}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:o(function(){return b.DidCreateFilesNotification},`get`)}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:o(function(){return b.WillCreateFilesRequest},`get`)}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:o(function(){return b.DidRenameFilesNotification},`get`)}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:o(function(){return b.WillRenameFilesRequest},`get`)}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:o(function(){return b.DidDeleteFilesNotification},`get`)}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:o(function(){return b.WillDeleteFilesRequest},`get`)});var x=Yt();Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:o(function(){return x.UniquenessLevel},`get`)}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:o(function(){return x.MonikerKind},`get`)}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:o(function(){return x.MonikerRequest},`get`)});var ee=Xt();Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:o(function(){return ee.TypeHierarchyPrepareRequest},`get`)}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:o(function(){return ee.TypeHierarchySubtypesRequest},`get`)}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:o(function(){return ee.TypeHierarchySupertypesRequest},`get`)});var S=Zt();Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:o(function(){return S.InlineValueRequest},`get`)}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:o(function(){return S.InlineValueRefreshRequest},`get`)});var te=Qt();Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:o(function(){return te.InlayHintRequest},`get`)}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:o(function(){return te.InlayHintResolveRequest},`get`)}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:o(function(){return te.InlayHintRefreshRequest},`get`)});var ne=$t();Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:o(function(){return ne.DiagnosticServerCancellationData},`get`)}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:o(function(){return ne.DocumentDiagnosticReportKind},`get`)}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:o(function(){return ne.DocumentDiagnosticRequest},`get`)}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:o(function(){return ne.WorkspaceDiagnosticRequest},`get`)}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:o(function(){return ne.DiagnosticRefreshRequest},`get`)});var C=en();Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:o(function(){return C.NotebookCellKind},`get`)}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:o(function(){return C.ExecutionSummary},`get`)}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:o(function(){return C.NotebookCell},`get`)}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:o(function(){return C.NotebookDocument},`get`)}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:o(function(){return C.NotebookDocumentSyncRegistrationType},`get`)}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:o(function(){return C.DidOpenNotebookDocumentNotification},`get`)}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:o(function(){return C.NotebookCellArrayChange},`get`)}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:o(function(){return C.DidChangeNotebookDocumentNotification},`get`)}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:o(function(){return C.DidSaveNotebookDocumentNotification},`get`)}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:o(function(){return C.DidCloseNotebookDocumentNotification},`get`)});var re=tn();Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:o(function(){return re.InlineCompletionRequest},`get`)});var ie;(function(e){function t(e){let t=e;return r.string(t)||r.string(t.language)||r.string(t.scheme)||r.string(t.pattern)}o(t,`is`),e.is=t})(ie||(e.TextDocumentFilter=ie={}));var ae;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(r.string(t.notebookType)||r.string(t.scheme)||r.string(t.pattern))}o(t,`is`),e.is=t})(ae||(e.NotebookDocumentFilter=ae={}));var oe;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(r.string(t.notebook)||ae.is(t.notebook))&&(t.language===void 0||r.string(t.language))}o(t,`is`),e.is=t})(oe||(e.NotebookCellTextDocumentFilter=oe={}));var se;(function(e){function t(e){if(!Array.isArray(e))return!1;for(let t of e)if(!r.string(t)&&!ie.is(t)&&!oe.is(t))return!1;return!0}o(t,`is`),e.is=t})(se||(e.DocumentSelector=se={}));var ce;(function(e){e.method=`client/registerCapability`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(ce||(e.RegistrationRequest=ce={}));var le;(function(e){e.method=`client/unregisterCapability`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(le||(e.UnregistrationRequest=le={}));var ue;(function(e){e.Create=`create`,e.Rename=`rename`,e.Delete=`delete`})(ue||(e.ResourceOperationKind=ue={}));var de;(function(e){e.Abort=`abort`,e.Transactional=`transactional`,e.TextOnlyTransactional=`textOnlyTransactional`,e.Undo=`undo`})(de||(e.FailureHandlingKind=de={}));var w;(function(e){e.UTF8=`utf-8`,e.UTF16=`utf-16`,e.UTF32=`utf-32`})(w||(e.PositionEncodingKind=w={}));var T;(function(e){function t(e){let t=e;return t&&r.string(t.id)&&t.id.length>0}o(t,`hasId`),e.hasId=t})(T||(e.StaticRegistrationOptions=T={}));var fe;(function(e){function t(e){let t=e;return t&&(t.documentSelector===null||se.is(t.documentSelector))}o(t,`is`),e.is=t})(fe||(e.TextDocumentRegistrationOptions=fe={}));var E;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(t.workDoneProgress===void 0||r.boolean(t.workDoneProgress))}o(t,`is`),e.is=t;function n(e){let t=e;return t&&r.boolean(t.workDoneProgress)}o(n,`hasWorkDoneProgress`),e.hasWorkDoneProgress=n})(E||(e.WorkDoneProgressOptions=E={}));var D;(function(e){e.method=`initialize`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(D||(e.InitializeRequest=D={}));var pe;(function(e){e.unknownProtocolVersion=1})(pe||(e.InitializeErrorCodes=pe={}));var O;(function(e){e.method=`initialized`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(O||(e.InitializedNotification=O={}));var me;(function(e){e.method=`shutdown`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType0(e.method)})(me||(e.ShutdownRequest=me={}));var he;(function(e){e.method=`exit`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType0(e.method)})(he||(e.ExitNotification=he={}));var ge;(function(e){e.method=`workspace/didChangeConfiguration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ge||(e.DidChangeConfigurationNotification=ge={}));var _e;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(_e||(e.MessageType=_e={}));var ve;(function(e){e.method=`window/showMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(ve||(e.ShowMessageNotification=ve={}));var ye;(function(e){e.method=`window/showMessageRequest`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(ye||(e.ShowMessageRequest=ye={}));var be;(function(e){e.method=`window/logMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(be||(e.LogMessageNotification=be={}));var xe;(function(e){e.method=`telemetry/event`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(xe||(e.TelemetryEventNotification=xe={}));var Se;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Se||(e.TextDocumentSyncKind=Se={}));var Ce;(function(e){e.method=`textDocument/didOpen`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(Ce||(e.DidOpenTextDocumentNotification=Ce={}));var we;(function(e){function t(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}o(t,`isIncremental`),e.isIncremental=t;function n(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}o(n,`isFull`),e.isFull=n})(we||(e.TextDocumentContentChangeEvent=we={}));var Te;(function(e){e.method=`textDocument/didChange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(Te||(e.DidChangeTextDocumentNotification=Te={}));var Ee;(function(e){e.method=`textDocument/didClose`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(Ee||(e.DidCloseTextDocumentNotification=Ee={}));var De;(function(e){e.method=`textDocument/didSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(De||(e.DidSaveTextDocumentNotification=De={}));var Oe;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Oe||(e.TextDocumentSaveReason=Oe={}));var ke;(function(e){e.method=`textDocument/willSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ke||(e.WillSaveTextDocumentNotification=ke={}));var Ae;(function(e){e.method=`textDocument/willSaveWaitUntil`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ae||(e.WillSaveTextDocumentWaitUntilRequest=Ae={}));var je;(function(e){e.method=`workspace/didChangeWatchedFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(je||(e.DidChangeWatchedFilesNotification=je={}));var Me;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Me||(e.FileChangeType=Me={}));var Ne;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(n.URI.is(t.baseUri)||n.WorkspaceFolder.is(t.baseUri))&&r.string(t.pattern)}o(t,`is`),e.is=t})(Ne||(e.RelativePattern=Ne={}));var Pe;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Pe||(e.WatchKind=Pe={}));var Fe;(function(e){e.method=`textDocument/publishDiagnostics`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(Fe||(e.PublishDiagnosticsNotification=Fe={}));var Ie;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Ie||(e.CompletionTriggerKind=Ie={}));var Le;(function(e){e.method=`textDocument/completion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Le||(e.CompletionRequest=Le={}));var Re;(function(e){e.method=`completionItem/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Re||(e.CompletionResolveRequest=Re={}));var ze;(function(e){e.method=`textDocument/hover`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ze||(e.HoverRequest=ze={}));var Be;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(Be||(e.SignatureHelpTriggerKind=Be={}));var Ve;(function(e){e.method=`textDocument/signatureHelp`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ve||(e.SignatureHelpRequest=Ve={}));var He;(function(e){e.method=`textDocument/definition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(He||(e.DefinitionRequest=He={}));var Ue;(function(e){e.method=`textDocument/references`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ue||(e.ReferencesRequest=Ue={}));var We;(function(e){e.method=`textDocument/documentHighlight`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(We||(e.DocumentHighlightRequest=We={}));var Ge;(function(e){e.method=`textDocument/documentSymbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ge||(e.DocumentSymbolRequest=Ge={}));var Ke;(function(e){e.method=`textDocument/codeAction`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ke||(e.CodeActionRequest=Ke={}));var qe;(function(e){e.method=`codeAction/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(qe||(e.CodeActionResolveRequest=qe={}));var Je;(function(e){e.method=`workspace/symbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Je||(e.WorkspaceSymbolRequest=Je={}));var Ye;(function(e){e.method=`workspaceSymbol/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ye||(e.WorkspaceSymbolResolveRequest=Ye={}));var Xe;(function(e){e.method=`textDocument/codeLens`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Xe||(e.CodeLensRequest=Xe={}));var Ze;(function(e){e.method=`codeLens/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ze||(e.CodeLensResolveRequest=Ze={}));var Qe;(function(e){e.method=`workspace/codeLens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(Qe||(e.CodeLensRefreshRequest=Qe={}));var $e;(function(e){e.method=`textDocument/documentLink`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})($e||(e.DocumentLinkRequest=$e={}));var et;(function(e){e.method=`documentLink/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(et||(e.DocumentLinkResolveRequest=et={}));var tt;(function(e){e.method=`textDocument/formatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(tt||(e.DocumentFormattingRequest=tt={}));var nt;(function(e){e.method=`textDocument/rangeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(nt||(e.DocumentRangeFormattingRequest=nt={}));var rt;(function(e){e.method=`textDocument/rangesFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(rt||(e.DocumentRangesFormattingRequest=rt={}));var it;(function(e){e.method=`textDocument/onTypeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(it||(e.DocumentOnTypeFormattingRequest=it={}));var at;(function(e){e.Identifier=1})(at||(e.PrepareSupportDefaultBehavior=at={}));var ot;(function(e){e.method=`textDocument/rename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ot||(e.RenameRequest=ot={}));var st;(function(e){e.method=`textDocument/prepareRename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(st||(e.PrepareRenameRequest=st={}));var ct;(function(e){e.method=`workspace/executeCommand`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ct||(e.ExecuteCommandRequest=ct={}));var lt;(function(e){e.method=`workspace/applyEdit`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(`workspace/applyEdit`)})(lt||(e.ApplyWorkspaceEditRequest=lt={}))}}),rn=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=Mt();function n(e,n,r,i){return t.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,t.createMessageConnection)(e,n,r,i)}o(n,`createProtocolConnection`),e.createProtocolConnection=n}}),an=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,n(Mt(),e),n((gt(),p(m)),e),n(A(),e),n(nn(),e);var r=rn();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:o(function(){return r.createProtocolConnection},`get`)});var i;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(i||(e.LSPErrorCodes=i={}))}}),on=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var r=Nt();n(Nt(),e),n(an(),e);function i(e,t,n,i){return(0,r.createMessageConnection)(e,t,n,i)}o(i,`createProtocolConnection`),e.createProtocolConnection=i}}),sn={};l(sn,{AbstractAstReflection:()=>pn,AbstractCstNode:()=>$A,AbstractLangiumParser:()=>cj,AbstractParserErrorMessageProvider:()=>uj,AbstractThreadedAsyncParser:()=>jN,AstUtils:()=>wn,BiMap:()=>mM,Cancellation:()=>Z,CompositeCstNodeImpl:()=>tj,ContextCache:()=>SM,CstNodeBuilder:()=>QA,CstUtils:()=>cn,DEFAULT_TOKENIZE_OPTIONS:()=>XM,DONE_RESULT:()=>xn,DatatypeSymbol:()=>ij,DefaultAstNodeDescriptionProvider:()=>zM,DefaultAstNodeLocator:()=>VM,DefaultAsyncParser:()=>AN,DefaultCommentProvider:()=>kN,DefaultConfigurationProvider:()=>UM,DefaultDocumentBuilder:()=>KM,DefaultDocumentValidator:()=>PM,DefaultHydrator:()=>PN,DefaultIndexManager:()=>qM,DefaultJsonSerializer:()=>OM,DefaultLangiumDocumentFactory:()=>oM,DefaultLangiumDocuments:()=>sM,DefaultLangiumProfiler:()=>nP,DefaultLexer:()=>ZM,DefaultLexerErrorMessageProvider:()=>YM,DefaultLinker:()=>lM,DefaultNameProvider:()=>dM,DefaultReferenceDescriptionProvider:()=>BM,DefaultReferences:()=>fM,DefaultScopeComputation:()=>hM,DefaultScopeProvider:()=>TM,DefaultServiceRegistry:()=>kM,DefaultTokenBuilder:()=>Lj,DefaultValueConverter:()=>Rj,DefaultWorkspaceLock:()=>NN,DefaultWorkspaceManager:()=>JM,Deferred:()=>qj,Disposable:()=>GM,DisposableCache:()=>bM,DocumentCache:()=>CM,DocumentState:()=>$,DocumentValidator:()=>RM,EMPTY_SCOPE:()=>yM,EMPTY_STREAM:()=>bn,EmptyFileSystem:()=>ZN,EmptyFileSystemProvider:()=>XN,ErrorWithLocation:()=>aa,GrammarAST:()=>zn,GrammarUtils:()=>ia,IndentationAwareLexer:()=>JN,IndentationAwareTokenBuilder:()=>qN,JSDocDocumentationProvider:()=>ON,LangiumCompletionParser:()=>fj,LangiumParser:()=>lj,LangiumParserErrorMessageProvider:()=>dj,LeafCstNodeImpl:()=>ej,LexingMode:()=>KN,MapScope:()=>_M,Module:()=>LN,MultiMap:()=>pM,MultiMapScope:()=>vM,OperationCancelled:()=>Gj,ParserWorker:()=>MN,ProfilingTask:()=>rP,Reduction:()=>Cn,RefResolving:()=>cM,RegExpUtils:()=>ca,RootCstNodeImpl:()=>rj,SimpleCache:()=>xM,StreamImpl:()=>_n,StreamScope:()=>gM,TextDocument:()=>Yj,TreeStreamImpl:()=>Sn,URI:()=>nM,UriTrie:()=>aM,UriUtils:()=>iM,VALIDATE_EACH_NODE:()=>NM,ValidationCategory:()=>jM,ValidationRegistry:()=>MM,ValueConverter:()=>zj,WorkspaceCache:()=>wM,assertCondition:()=>sa,assertUnreachable:()=>oa,createCompletionParser:()=>Pj,createDefaultCoreModule:()=>FN,createDefaultSharedCoreModule:()=>IN,createGrammarConfig:()=>vo,createLangiumParser:()=>Fj,createParser:()=>gj,delayNextTick:()=>Bj,diagnosticData:()=>AM,eagerLoad:()=>BN,getDiagnosticRange:()=>FM,indentationBuilderDefaultOptions:()=>GN,inject:()=>RN,interruptAndCheck:()=>Q,isAstNode:()=>j,isAstNodeDescription:()=>dn,isAstNodeWithComment:()=>EM,isCompositeCstNode:()=>mn,isIMultiModeLexerDefinition:()=>$M,isJSDoc:()=>nN,isLeafCstNode:()=>hn,isLinkingError:()=>fn,isMultiReference:()=>un,isNamed:()=>uM,isOperationCancelled:()=>Kj,isReference:()=>ln,isRootCstNode:()=>gn,isTokenTypeArray:()=>QM,isTokenTypeDictionary:()=>eN,loadGrammarFromJson:()=>tP,parseJSDoc:()=>tN,prepareLangiumParser:()=>Ij,setInterruptionPeriod:()=>Wj,startCancelableOperation:()=>Uj,stream:()=>M,toDiagnosticData:()=>LM,toDiagnosticSeverity:()=>IM});var cn={};l(cn,{DefaultNameRegexp:()=>Gi,RangeComparison:()=>Hi,compareRange:()=>Ui,findCommentNode:()=>qi,findDeclarationNodeAtOffset:()=>Ki,findLeafNodeAtOffset:()=>Yi,findLeafNodeBeforeOffset:()=>Xi,flattenCst:()=>Ri,getDatatypeNode:()=>Ii,getInteriorNodes:()=>ta,getNextNode:()=>$i,getPreviousNode:()=>Qi,getStartlineNode:()=>ea,inRange:()=>Wi,isChildNode:()=>zi,isCommentNode:()=>Ji,streamCst:()=>Li,toDocumentSegment:()=>Vi,tokenToRange:()=>Bi});function j(e){return typeof e==`object`&&!!e&&typeof e.$type==`string`}o(j,`isAstNode`);function ln(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`ref`in e}o(ln,`isReference`);function un(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`items`in e}o(un,`isMultiReference`);function dn(e){return typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.path==`string`}o(dn,`isAstNodeDescription`);function fn(e){return typeof e==`object`&&!!e&&typeof e.info==`object`&&typeof e.message==`string`}o(fn,`isLinkingError`);var pn=class{static{o(this,`AbstractAstReflection`)}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw Error(`Type ${e.container.$type||`undefined`} not found.`);let n=t.properties[e.property]?.referenceType;if(!n)throw Error(`Property ${e.property||`undefined`} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return j(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||=this.subtypes[e]={};let r=n[t];if(r!==void 0)return r;{let r=this.types[e],i=r?r.superTypes.some(e=>this.isSubtype(e,t)):!1;return n[t]=i,i}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let t=this.getAllTypes(),n=[];for(let r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}};function mn(e){return typeof e==`object`&&!!e&&Array.isArray(e.content)}o(mn,`isCompositeCstNode`);function hn(e){return typeof e==`object`&&!!e&&typeof e.tokenType==`object`}o(hn,`isLeafCstNode`);function gn(e){return mn(e)&&typeof e.fullText==`string`}o(gn,`isRootCstNode`);var _n=class e{static{o(this,`StreamImpl`)}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:o(()=>this.nextFn(e.state),`next`),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){let e=[],t=this.iterator(),n;do n=t.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){let n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do if(t=this.nextFn(e.first),!t.done)return t;while(!t.done);e.firstDone=!0}do if(t=e.iterator.next(),!t.done)return t;while(!t.done);return xn})}join(e=`,`){let t=this.iterator(),n=``,r,i=!1;do r=t.next(),r.done||(i&&(n+=e),n+=vn(r.value)),i=!0;while(!r.done);return n}indexOf(e,t=0){let n=this.iterator(),r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(t){return new e(this.startFn,e=>{let{done:n,value:r}=this.nextFn(e);return n?xn:{done:!1,value:t(r)}})}filter(t){return new e(this.startFn,e=>{let n;do if(n=this.nextFn(e),!n.done&&t(n.value))return n;while(!n.done);return xn})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){let n=this.iterator(),r=t,i=n.next();for(;!i.done;)r=r===void 0?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){let r=e.next();if(r.done)return n;let i=this.recursiveReduce(e,t,n);return i===void 0?r.value:t(i,r.value)}find(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:n,value:r}=this.nextFn(e.this);if(!n){let n=t(r);if(yn(n))e.iterator=n[Symbol.iterator]();else return{done:!1,value:n}}}while(e.iterator);return xn})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let n=t>1?this.flat(t-1):this;return new e(()=>({this:n.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:t,value:r}=n.nextFn(e.this);if(!t)if(yn(r))e.iterator=r[Symbol.iterator]();else return{done:!1,value:r}}while(e.iterator);return xn})}head(){let e=this.iterator().next();if(!e.done)return e.value}tail(t=1){return new e(()=>{let e=this.startFn();for(let n=0;n<t;n++)if(this.nextFn(e).done)return e;return e},this.nextFn)}limit(t){return new e(()=>({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?xn:this.nextFn(e.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),e=>{let n;do if(n=this.nextFn(e.internalState),!n.done){let r=t?t(n.value):n.value;if(!e.set.has(r))return e.set.add(r),n}while(!n.done);return xn})}exclude(e,t){let n=new Set;for(let r of e){let e=t?t(r):r;n.add(e)}return this.filter(e=>{let r=t?t(e):e;return!n.has(r)})}};function vn(e){return typeof e==`string`?e:e===void 0?`undefined`:typeof e.toString==`function`?e.toString():Object.prototype.toString.call(e)}o(vn,`toString`);function yn(e){return!!e&&typeof e[Symbol.iterator]==`function`}o(yn,`isIterable`);var bn=new _n(()=>void 0,()=>xn),xn=Object.freeze({done:!0,value:void 0});function M(...e){if(e.length===1){let t=e[0];if(t instanceof _n)return t;if(yn(t))return new _n(()=>t[Symbol.iterator](),e=>e.next());if(typeof t.length==`number`)return new _n(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:xn)}return e.length>1?new _n(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){let n=e[t.collIndex++];yn(n)?t.iterator=n[Symbol.iterator]():n&&typeof n.length==`number`&&(t.array=n)}}while(t.iterator||t.array||t.collIndex<e.length);return xn}):bn}o(M,`stream`);var Sn=class extends _n{static{o(this,`TreeStreamImpl`)}constructor(e,t,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&=(e.iterators.pop(),!1);e.iterators.length>0;){let n=e.iterators[e.iterators.length-1].next();if(n.done)e.iterators.pop();else return e.iterators.push(t(n.value)[Symbol.iterator]()),n}return xn})}iterator(){let e={state:this.startFn(),next:o(()=>this.nextFn(e.state),`next`),prune:o(()=>{e.state.pruned=!0},`prune`),[Symbol.iterator]:()=>e};return e}},Cn;(function(e){function t(e){return e.reduce((e,t)=>e+t,0)}o(t,`sum`),e.sum=t;function n(e){return e.reduce((e,t)=>e*t,0)}o(n,`product`),e.product=n;function r(e){return e.reduce((e,t)=>Math.min(e,t))}o(r,`min`),e.min=r;function i(e){return e.reduce((e,t)=>Math.max(e,t))}o(i,`max`),e.max=i})(Cn||={});var wn={};l(wn,{assignMandatoryProperties:()=>In,copyAstNode:()=>Rn,findRootNode:()=>kn,getContainerOfType:()=>En,getDocument:()=>On,getReferenceNodes:()=>An,hasContainerOfType:()=>Dn,linkContentToContainer:()=>Tn,streamAllContents:()=>Mn,streamAst:()=>Nn,streamContents:()=>jn,streamReferences:()=>Fn});function Tn(e,t={}){for(let[n,r]of Object.entries(e))n.startsWith(`$`)||(Array.isArray(r)?r.forEach((r,i)=>{j(r)&&(r.$container=e,r.$containerProperty=n,r.$containerIndex=i,t.deep&&Tn(r,t))}):j(r)&&(r.$container=e,r.$containerProperty=n,t.deep&&Tn(r,t)))}o(Tn,`linkContentToContainer`);function En(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}o(En,`getContainerOfType`);function Dn(e,t){let n=e;for(;n;){if(t(n))return!0;n=n.$container}return!1}o(Dn,`hasContainerOfType`);function On(e){let t=kn(e).$document;if(!t)throw Error(`AST node has no document.`);return t}o(On,`getDocument`);function kn(e){for(;e.$container;)e=e.$container;return e}o(kn,`findRootNode`);function An(e){return ln(e)?e.ref?[e.ref]:[]:un(e)?e.items.map(e=>e.ref):[]}o(An,`getReferenceNodes`);function jn(e,t){if(!e)throw Error(`Node must be an AstNode.`);let n=t?.range;return new _n(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let r=t.keys[t.keyIndex];if(!r.startsWith(`$`)){let i=e[r];if(j(i)){if(t.keyIndex++,Pn(i,n))return{done:!1,value:i}}else if(Array.isArray(i)){for(;t.arrayIndex<i.length;){let e=i[t.arrayIndex++];if(j(e)&&Pn(e,n))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return xn})}o(jn,`streamContents`);function Mn(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return new Sn(e,e=>jn(e,t))}o(Mn,`streamAllContents`);function Nn(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return t?.range&&!Pn(e,t.range)?new Sn(e,()=>[]):new Sn(e,e=>jn(e,t),{includeRoot:!0})}o(Nn,`streamAst`);function Pn(e,t){if(!t)return!0;let n=e.$cstNode?.range;return n?Wi(n,t):!1}o(Pn,`isAstNodeInRange`);function Fn(e){return new _n(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let n=t.keys[t.keyIndex];if(!n.startsWith(`$`)){let r=e[n];if(ln(r)||un(r))return t.keyIndex++,{done:!1,value:{reference:r,container:e,property:n}};if(Array.isArray(r)){for(;t.arrayIndex<r.length;){let i=t.arrayIndex++,a=r[i];if(ln(a)||un(r))return{done:!1,value:{reference:a,container:e,property:n,index:i}}}t.arrayIndex=0}}t.keyIndex++}return xn})}o(Fn,`streamReferences`);function In(e,t){let n=e.getTypeMetaData(t.$type),r=t;for(let e of Object.values(n.properties))e.defaultValue!==void 0&&r[e.name]===void 0&&(r[e.name]=Ln(e.defaultValue))}o(In,`assignMandatoryProperties`);function Ln(e){return Array.isArray(e)?[...e.map(Ln)]:e}o(Ln,`copyDefaultValue`);function Rn(e,t,n){let r={$type:e.$type};n&&(n.set(e,r),n.set(r,e));for(let[i,a]of Object.entries(e))if(!i.startsWith(`$`))if(j(a))r[i]=Rn(a,t,n);else if(ln(a))r[i]=t(r,i,a.$refNode,a.$refText,a);else if(Array.isArray(a)){let e=[];for(let o of a)j(o)?e.push(Rn(o,t,n)):ln(o)?e.push(t(r,i,o.$refNode,o.$refText,o)):e.push(o);r[i]=e}else r[i]=a;return Tn(r,{deep:!0}),r}o(Rn,`copyAstNode`);var zn={};l(zn,{AbstractElement:()=>Vn,AbstractParserRule:()=>Un,AbstractRule:()=>Gn,AbstractType:()=>qn,Action:()=>Yn,Alternatives:()=>Zn,ArrayLiteral:()=>$n,ArrayType:()=>tr,Assignment:()=>rr,BooleanLiteral:()=>ar,CharacterRange:()=>sr,Condition:()=>lr,Conjunction:()=>dr,CrossReference:()=>pr,Disjunction:()=>hr,EndOfFile:()=>_r,Grammar:()=>yr,GrammarImport:()=>xr,Group:()=>Cr,InferredType:()=>Tr,InfixRule:()=>Dr,InfixRuleOperatorList:()=>kr,InfixRuleOperators:()=>jr,Interface:()=>Nr,Keyword:()=>Fr,LangiumGrammarAstReflection:()=>Fi,LangiumGrammarTerminals:()=>Bn,NamedArgument:()=>Lr,NegatedToken:()=>zr,Negation:()=>Vr,NumberLiteral:()=>Ur,Parameter:()=>Gr,ParameterReference:()=>qr,ParserRule:()=>Yr,ReferenceType:()=>Zr,RegexToken:()=>$r,ReturnType:()=>ti,RuleCall:()=>ri,SimpleType:()=>ai,StringLiteral:()=>si,TerminalAlternatives:()=>li,TerminalElement:()=>di,TerminalGroup:()=>pi,TerminalRule:()=>hi,TerminalRuleCall:()=>_i,Type:()=>yi,TypeAttribute:()=>xi,TypeDefinition:()=>Ci,UnionType:()=>Ti,UnorderedGroup:()=>Di,UntilToken:()=>ki,ValueLiteral:()=>ji,Wildcard:()=>Ni,isAbstractElement:()=>Hn,isAbstractParserRule:()=>Wn,isAbstractRule:()=>Kn,isAbstractType:()=>Jn,isAction:()=>Xn,isAlternatives:()=>Qn,isArrayLiteral:()=>er,isArrayType:()=>nr,isAssignment:()=>ir,isBooleanLiteral:()=>or,isCharacterRange:()=>cr,isCondition:()=>ur,isConjunction:()=>fr,isCrossReference:()=>mr,isDisjunction:()=>gr,isEndOfFile:()=>vr,isGrammar:()=>br,isGrammarImport:()=>Sr,isGroup:()=>wr,isInferredType:()=>Er,isInfixRule:()=>Or,isInfixRuleOperatorList:()=>Ar,isInfixRuleOperators:()=>Mr,isInterface:()=>Pr,isKeyword:()=>Ir,isNamedArgument:()=>Rr,isNegatedToken:()=>Br,isNegation:()=>Hr,isNumberLiteral:()=>Wr,isParameter:()=>Kr,isParameterReference:()=>Jr,isParserRule:()=>Xr,isReferenceType:()=>Qr,isRegexToken:()=>ei,isReturnType:()=>ni,isRuleCall:()=>ii,isSimpleType:()=>oi,isStringLiteral:()=>ci,isTerminalAlternatives:()=>ui,isTerminalElement:()=>fi,isTerminalGroup:()=>mi,isTerminalRule:()=>gi,isTerminalRuleCall:()=>vi,isType:()=>bi,isTypeAttribute:()=>Si,isTypeDefinition:()=>wi,isUnionType:()=>Ei,isUnorderedGroup:()=>Oi,isUntilToken:()=>Ai,isValueLiteral:()=>Mi,isWildcard:()=>Pi,reflection:()=>N});var Bn={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]*/},Vn={$type:`AbstractElement`,cardinality:`cardinality`};function Hn(e){return N.isInstance(e,Vn.$type)}o(Hn,`isAbstractElement`);var Un={$type:`AbstractParserRule`};function Wn(e){return N.isInstance(e,Un.$type)}o(Wn,`isAbstractParserRule`);var Gn={$type:`AbstractRule`};function Kn(e){return N.isInstance(e,Gn.$type)}o(Kn,`isAbstractRule`);var qn={$type:`AbstractType`};function Jn(e){return N.isInstance(e,qn.$type)}o(Jn,`isAbstractType`);var Yn={$type:`Action`,cardinality:`cardinality`,feature:`feature`,inferredType:`inferredType`,operator:`operator`,type:`type`};function Xn(e){return N.isInstance(e,Yn.$type)}o(Xn,`isAction`);var Zn={$type:`Alternatives`,cardinality:`cardinality`,elements:`elements`};function Qn(e){return N.isInstance(e,Zn.$type)}o(Qn,`isAlternatives`);var $n={$type:`ArrayLiteral`,elements:`elements`};function er(e){return N.isInstance(e,$n.$type)}o(er,`isArrayLiteral`);var tr={$type:`ArrayType`,elementType:`elementType`};function nr(e){return N.isInstance(e,tr.$type)}o(nr,`isArrayType`);var rr={$type:`Assignment`,cardinality:`cardinality`,feature:`feature`,operator:`operator`,predicate:`predicate`,terminal:`terminal`};function ir(e){return N.isInstance(e,rr.$type)}o(ir,`isAssignment`);var ar={$type:`BooleanLiteral`,true:`true`};function or(e){return N.isInstance(e,ar.$type)}o(or,`isBooleanLiteral`);var sr={$type:`CharacterRange`,cardinality:`cardinality`,left:`left`,lookahead:`lookahead`,parenthesized:`parenthesized`,right:`right`};function cr(e){return N.isInstance(e,sr.$type)}o(cr,`isCharacterRange`);var lr={$type:`Condition`};function ur(e){return N.isInstance(e,lr.$type)}o(ur,`isCondition`);var dr={$type:`Conjunction`,left:`left`,right:`right`};function fr(e){return N.isInstance(e,dr.$type)}o(fr,`isConjunction`);var pr={$type:`CrossReference`,cardinality:`cardinality`,deprecatedSyntax:`deprecatedSyntax`,isMulti:`isMulti`,terminal:`terminal`,type:`type`};function mr(e){return N.isInstance(e,pr.$type)}o(mr,`isCrossReference`);var hr={$type:`Disjunction`,left:`left`,right:`right`};function gr(e){return N.isInstance(e,hr.$type)}o(gr,`isDisjunction`);var _r={$type:`EndOfFile`,cardinality:`cardinality`};function vr(e){return N.isInstance(e,_r.$type)}o(vr,`isEndOfFile`);var yr={$type:`Grammar`,imports:`imports`,interfaces:`interfaces`,isDeclared:`isDeclared`,name:`name`,rules:`rules`,types:`types`};function br(e){return N.isInstance(e,yr.$type)}o(br,`isGrammar`);var xr={$type:`GrammarImport`,path:`path`};function Sr(e){return N.isInstance(e,xr.$type)}o(Sr,`isGrammarImport`);var Cr={$type:`Group`,cardinality:`cardinality`,elements:`elements`,guardCondition:`guardCondition`,predicate:`predicate`};function wr(e){return N.isInstance(e,Cr.$type)}o(wr,`isGroup`);var Tr={$type:`InferredType`,name:`name`};function Er(e){return N.isInstance(e,Tr.$type)}o(Er,`isInferredType`);var Dr={$type:`InfixRule`,call:`call`,dataType:`dataType`,inferredType:`inferredType`,name:`name`,operators:`operators`,parameters:`parameters`,returnType:`returnType`};function Or(e){return N.isInstance(e,Dr.$type)}o(Or,`isInfixRule`);var kr={$type:`InfixRuleOperatorList`,associativity:`associativity`,operators:`operators`};function Ar(e){return N.isInstance(e,kr.$type)}o(Ar,`isInfixRuleOperatorList`);var jr={$type:`InfixRuleOperators`,precedences:`precedences`};function Mr(e){return N.isInstance(e,jr.$type)}o(Mr,`isInfixRuleOperators`);var Nr={$type:`Interface`,attributes:`attributes`,name:`name`,superTypes:`superTypes`};function Pr(e){return N.isInstance(e,Nr.$type)}o(Pr,`isInterface`);var Fr={$type:`Keyword`,cardinality:`cardinality`,predicate:`predicate`,value:`value`};function Ir(e){return N.isInstance(e,Fr.$type)}o(Ir,`isKeyword`);var Lr={$type:`NamedArgument`,calledByName:`calledByName`,parameter:`parameter`,value:`value`};function Rr(e){return N.isInstance(e,Lr.$type)}o(Rr,`isNamedArgument`);var zr={$type:`NegatedToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Br(e){return N.isInstance(e,zr.$type)}o(Br,`isNegatedToken`);var Vr={$type:`Negation`,value:`value`};function Hr(e){return N.isInstance(e,Vr.$type)}o(Hr,`isNegation`);var Ur={$type:`NumberLiteral`,value:`value`};function Wr(e){return N.isInstance(e,Ur.$type)}o(Wr,`isNumberLiteral`);var Gr={$type:`Parameter`,name:`name`};function Kr(e){return N.isInstance(e,Gr.$type)}o(Kr,`isParameter`);var qr={$type:`ParameterReference`,parameter:`parameter`};function Jr(e){return N.isInstance(e,qr.$type)}o(Jr,`isParameterReference`);var Yr={$type:`ParserRule`,dataType:`dataType`,definition:`definition`,entry:`entry`,fragment:`fragment`,inferredType:`inferredType`,name:`name`,parameters:`parameters`,returnType:`returnType`};function Xr(e){return N.isInstance(e,Yr.$type)}o(Xr,`isParserRule`);var Zr={$type:`ReferenceType`,isMulti:`isMulti`,referenceType:`referenceType`};function Qr(e){return N.isInstance(e,Zr.$type)}o(Qr,`isReferenceType`);var $r={$type:`RegexToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,regex:`regex`};function ei(e){return N.isInstance(e,$r.$type)}o(ei,`isRegexToken`);var ti={$type:`ReturnType`,name:`name`};function ni(e){return N.isInstance(e,ti.$type)}o(ni,`isReturnType`);var ri={$type:`RuleCall`,arguments:`arguments`,cardinality:`cardinality`,predicate:`predicate`,rule:`rule`};function ii(e){return N.isInstance(e,ri.$type)}o(ii,`isRuleCall`);var ai={$type:`SimpleType`,primitiveType:`primitiveType`,stringType:`stringType`,typeRef:`typeRef`};function oi(e){return N.isInstance(e,ai.$type)}o(oi,`isSimpleType`);var si={$type:`StringLiteral`,value:`value`};function ci(e){return N.isInstance(e,si.$type)}o(ci,`isStringLiteral`);var li={$type:`TerminalAlternatives`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function ui(e){return N.isInstance(e,li.$type)}o(ui,`isTerminalAlternatives`);var di={$type:`TerminalElement`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function fi(e){return N.isInstance(e,di.$type)}o(fi,`isTerminalElement`);var pi={$type:`TerminalGroup`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function mi(e){return N.isInstance(e,pi.$type)}o(mi,`isTerminalGroup`);var hi={$type:`TerminalRule`,definition:`definition`,fragment:`fragment`,hidden:`hidden`,name:`name`,type:`type`};function gi(e){return N.isInstance(e,hi.$type)}o(gi,`isTerminalRule`);var _i={$type:`TerminalRuleCall`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,rule:`rule`};function vi(e){return N.isInstance(e,_i.$type)}o(vi,`isTerminalRuleCall`);var yi={$type:`Type`,name:`name`,type:`type`};function bi(e){return N.isInstance(e,yi.$type)}o(bi,`isType`);var xi={$type:`TypeAttribute`,defaultValue:`defaultValue`,isOptional:`isOptional`,name:`name`,type:`type`};function Si(e){return N.isInstance(e,xi.$type)}o(Si,`isTypeAttribute`);var Ci={$type:`TypeDefinition`};function wi(e){return N.isInstance(e,Ci.$type)}o(wi,`isTypeDefinition`);var Ti={$type:`UnionType`,types:`types`};function Ei(e){return N.isInstance(e,Ti.$type)}o(Ei,`isUnionType`);var Di={$type:`UnorderedGroup`,cardinality:`cardinality`,elements:`elements`};function Oi(e){return N.isInstance(e,Di.$type)}o(Oi,`isUnorderedGroup`);var ki={$type:`UntilToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Ai(e){return N.isInstance(e,ki.$type)}o(Ai,`isUntilToken`);var ji={$type:`ValueLiteral`};function Mi(e){return N.isInstance(e,ji.$type)}o(Mi,`isValueLiteral`);var Ni={$type:`Wildcard`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function Pi(e){return N.isInstance(e,Ni.$type)}o(Pi,`isWildcard`);var Fi=class extends pn{static{o(this,`LangiumGrammarAstReflection`)}constructor(){super(...arguments),this.types={AbstractElement:{name:Vn.$type,properties:{cardinality:{name:Vn.cardinality}},superTypes:[]},AbstractParserRule:{name:Un.$type,properties:{},superTypes:[Gn.$type,qn.$type]},AbstractRule:{name:Gn.$type,properties:{},superTypes:[]},AbstractType:{name:qn.$type,properties:{},superTypes:[]},Action:{name:Yn.$type,properties:{cardinality:{name:Yn.cardinality},feature:{name:Yn.feature},inferredType:{name:Yn.inferredType},operator:{name:Yn.operator},type:{name:Yn.type,referenceType:qn.$type}},superTypes:[Vn.$type]},Alternatives:{name:Zn.$type,properties:{cardinality:{name:Zn.cardinality},elements:{name:Zn.elements,defaultValue:[]}},superTypes:[Vn.$type]},ArrayLiteral:{name:$n.$type,properties:{elements:{name:$n.elements,defaultValue:[]}},superTypes:[ji.$type]},ArrayType:{name:tr.$type,properties:{elementType:{name:tr.elementType}},superTypes:[Ci.$type]},Assignment:{name:rr.$type,properties:{cardinality:{name:rr.cardinality},feature:{name:rr.feature},operator:{name:rr.operator},predicate:{name:rr.predicate},terminal:{name:rr.terminal}},superTypes:[Vn.$type]},BooleanLiteral:{name:ar.$type,properties:{true:{name:ar.true,defaultValue:!1}},superTypes:[lr.$type,ji.$type]},CharacterRange:{name:sr.$type,properties:{cardinality:{name:sr.cardinality},left:{name:sr.left},lookahead:{name:sr.lookahead},parenthesized:{name:sr.parenthesized,defaultValue:!1},right:{name:sr.right}},superTypes:[di.$type]},Condition:{name:lr.$type,properties:{},superTypes:[]},Conjunction:{name:dr.$type,properties:{left:{name:dr.left},right:{name:dr.right}},superTypes:[lr.$type]},CrossReference:{name:pr.$type,properties:{cardinality:{name:pr.cardinality},deprecatedSyntax:{name:pr.deprecatedSyntax,defaultValue:!1},isMulti:{name:pr.isMulti,defaultValue:!1},terminal:{name:pr.terminal},type:{name:pr.type,referenceType:qn.$type}},superTypes:[Vn.$type]},Disjunction:{name:hr.$type,properties:{left:{name:hr.left},right:{name:hr.right}},superTypes:[lr.$type]},EndOfFile:{name:_r.$type,properties:{cardinality:{name:_r.cardinality}},superTypes:[Vn.$type]},Grammar:{name:yr.$type,properties:{imports:{name:yr.imports,defaultValue:[]},interfaces:{name:yr.interfaces,defaultValue:[]},isDeclared:{name:yr.isDeclared,defaultValue:!1},name:{name:yr.name},rules:{name:yr.rules,defaultValue:[]},types:{name:yr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:xr.$type,properties:{path:{name:xr.path}},superTypes:[]},Group:{name:Cr.$type,properties:{cardinality:{name:Cr.cardinality},elements:{name:Cr.elements,defaultValue:[]},guardCondition:{name:Cr.guardCondition},predicate:{name:Cr.predicate}},superTypes:[Vn.$type]},InferredType:{name:Tr.$type,properties:{name:{name:Tr.name}},superTypes:[qn.$type]},InfixRule:{name:Dr.$type,properties:{call:{name:Dr.call},dataType:{name:Dr.dataType},inferredType:{name:Dr.inferredType},name:{name:Dr.name},operators:{name:Dr.operators},parameters:{name:Dr.parameters,defaultValue:[]},returnType:{name:Dr.returnType,referenceType:qn.$type}},superTypes:[Un.$type]},InfixRuleOperatorList:{name:kr.$type,properties:{associativity:{name:kr.associativity},operators:{name:kr.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:jr.$type,properties:{precedences:{name:jr.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Nr.$type,properties:{attributes:{name:Nr.attributes,defaultValue:[]},name:{name:Nr.name},superTypes:{name:Nr.superTypes,defaultValue:[],referenceType:qn.$type}},superTypes:[qn.$type]},Keyword:{name:Fr.$type,properties:{cardinality:{name:Fr.cardinality},predicate:{name:Fr.predicate},value:{name:Fr.value}},superTypes:[Vn.$type]},NamedArgument:{name:Lr.$type,properties:{calledByName:{name:Lr.calledByName,defaultValue:!1},parameter:{name:Lr.parameter,referenceType:Gr.$type},value:{name:Lr.value}},superTypes:[]},NegatedToken:{name:zr.$type,properties:{cardinality:{name:zr.cardinality},lookahead:{name:zr.lookahead},parenthesized:{name:zr.parenthesized,defaultValue:!1},terminal:{name:zr.terminal}},superTypes:[di.$type]},Negation:{name:Vr.$type,properties:{value:{name:Vr.value}},superTypes:[lr.$type]},NumberLiteral:{name:Ur.$type,properties:{value:{name:Ur.value}},superTypes:[ji.$type]},Parameter:{name:Gr.$type,properties:{name:{name:Gr.name}},superTypes:[]},ParameterReference:{name:qr.$type,properties:{parameter:{name:qr.parameter,referenceType:Gr.$type}},superTypes:[lr.$type]},ParserRule:{name:Yr.$type,properties:{dataType:{name:Yr.dataType},definition:{name:Yr.definition},entry:{name:Yr.entry,defaultValue:!1},fragment:{name:Yr.fragment,defaultValue:!1},inferredType:{name:Yr.inferredType},name:{name:Yr.name},parameters:{name:Yr.parameters,defaultValue:[]},returnType:{name:Yr.returnType,referenceType:qn.$type}},superTypes:[Un.$type]},ReferenceType:{name:Zr.$type,properties:{isMulti:{name:Zr.isMulti,defaultValue:!1},referenceType:{name:Zr.referenceType}},superTypes:[Ci.$type]},RegexToken:{name:$r.$type,properties:{cardinality:{name:$r.cardinality},lookahead:{name:$r.lookahead},parenthesized:{name:$r.parenthesized,defaultValue:!1},regex:{name:$r.regex}},superTypes:[di.$type]},ReturnType:{name:ti.$type,properties:{name:{name:ti.name}},superTypes:[]},RuleCall:{name:ri.$type,properties:{arguments:{name:ri.arguments,defaultValue:[]},cardinality:{name:ri.cardinality},predicate:{name:ri.predicate},rule:{name:ri.rule,referenceType:Gn.$type}},superTypes:[Vn.$type]},SimpleType:{name:ai.$type,properties:{primitiveType:{name:ai.primitiveType},stringType:{name:ai.stringType},typeRef:{name:ai.typeRef,referenceType:qn.$type}},superTypes:[Ci.$type]},StringLiteral:{name:si.$type,properties:{value:{name:si.value}},superTypes:[ji.$type]},TerminalAlternatives:{name:li.$type,properties:{cardinality:{name:li.cardinality},elements:{name:li.elements,defaultValue:[]},lookahead:{name:li.lookahead},parenthesized:{name:li.parenthesized,defaultValue:!1}},superTypes:[di.$type]},TerminalElement:{name:di.$type,properties:{cardinality:{name:di.cardinality},lookahead:{name:di.lookahead},parenthesized:{name:di.parenthesized,defaultValue:!1}},superTypes:[Vn.$type]},TerminalGroup:{name:pi.$type,properties:{cardinality:{name:pi.cardinality},elements:{name:pi.elements,defaultValue:[]},lookahead:{name:pi.lookahead},parenthesized:{name:pi.parenthesized,defaultValue:!1}},superTypes:[di.$type]},TerminalRule:{name:hi.$type,properties:{definition:{name:hi.definition},fragment:{name:hi.fragment,defaultValue:!1},hidden:{name:hi.hidden,defaultValue:!1},name:{name:hi.name},type:{name:hi.type}},superTypes:[Gn.$type]},TerminalRuleCall:{name:_i.$type,properties:{cardinality:{name:_i.cardinality},lookahead:{name:_i.lookahead},parenthesized:{name:_i.parenthesized,defaultValue:!1},rule:{name:_i.rule,referenceType:hi.$type}},superTypes:[di.$type]},Type:{name:yi.$type,properties:{name:{name:yi.name},type:{name:yi.type}},superTypes:[qn.$type]},TypeAttribute:{name:xi.$type,properties:{defaultValue:{name:xi.defaultValue},isOptional:{name:xi.isOptional,defaultValue:!1},name:{name:xi.name},type:{name:xi.type}},superTypes:[]},TypeDefinition:{name:Ci.$type,properties:{},superTypes:[]},UnionType:{name:Ti.$type,properties:{types:{name:Ti.types,defaultValue:[]}},superTypes:[Ci.$type]},UnorderedGroup:{name:Di.$type,properties:{cardinality:{name:Di.cardinality},elements:{name:Di.elements,defaultValue:[]}},superTypes:[Vn.$type]},UntilToken:{name:ki.$type,properties:{cardinality:{name:ki.cardinality},lookahead:{name:ki.lookahead},parenthesized:{name:ki.parenthesized,defaultValue:!1},terminal:{name:ki.terminal}},superTypes:[di.$type]},ValueLiteral:{name:ji.$type,properties:{},superTypes:[]},Wildcard:{name:Ni.$type,properties:{cardinality:{name:Ni.cardinality},lookahead:{name:Ni.lookahead},parenthesized:{name:Ni.parenthesized,defaultValue:!1}},superTypes:[di.$type]}}}},N=new Fi;function Ii(e){let t=e,n=!1;for(;t;){let e=En(t.grammarSource,Xr);if(e&&e.dataType)t=t.container,n=!0;else if(n)return t;else return}}o(Ii,`getDatatypeNode`);function Li(e){return new Sn(e,e=>mn(e)?e.content:[],{includeRoot:!0})}o(Li,`streamCst`);function Ri(e){return Li(e).filter(hn)}o(Ri,`flattenCst`);function zi(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}o(zi,`isChildNode`);function Bi(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}o(Bi,`tokenToRange`);function Vi(e){if(!e)return;let{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}o(Vi,`toDocumentSegment`);var Hi;(function(e){e[e.Before=0]=`Before`,e[e.After=1]=`After`,e[e.OverlapFront=2]=`OverlapFront`,e[e.OverlapBack=3]=`OverlapBack`,e[e.Inside=4]=`Inside`,e[e.Outside=5]=`Outside`})(Hi||={});function Ui(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return Hi.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Hi.After;let n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return n&&r?Hi.Inside:n?Hi.OverlapBack:r?Hi.OverlapFront:Hi.Outside}o(Ui,`compareRange`);function Wi(e,t){return Ui(e,t)>Hi.After}o(Wi,`inRange`);var Gi=/^[\w\p{L}]$/u;function Ki(e,t,n=Gi){if(e){if(t>0){let r=t-e.offset,i=e.text.charAt(r);n.test(i)||t--}return Yi(e,t)}}o(Ki,`findDeclarationNodeAtOffset`);function qi(e,t){if(e){let n=Qi(e,!0);if(n&&Ji(n,t))return n;if(gn(e)){let n=e.content.findIndex(e=>!e.hidden);for(let r=n-1;r>=0;r--){let n=e.content[r];if(Ji(n,t))return n}}}}o(qi,`findCommentNode`);function Ji(e,t){return hn(e)&&t.includes(e.tokenType.name)}o(Ji,`isCommentNode`);function Yi(e,t){if(hn(e))return e;if(mn(e)){let n=Zi(e,t,!1);if(n)return Yi(n,t)}}o(Yi,`findLeafNodeAtOffset`);function Xi(e,t){if(hn(e))return e;if(mn(e)){let n=Zi(e,t,!0);if(n)return Xi(n,t)}}o(Xi,`findLeafNodeBeforeOffset`);function Zi(e,t,n){let r=0,i=e.content.length-1,a;for(;r<=i;){let o=Math.floor((r+i)/2),s=e.content[o];if(s.offset<=t&&s.end>t)return s;s.end<=t?(a=n?s:void 0,r=o+1):i=o-1}return a}o(Zi,`binarySearch`);function Qi(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e);for(;r>0;){r--;let e=n.content[r];if(t||!e.hidden)return e}e=n}}o(Qi,`getPreviousNode`);function $i(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e),i=n.content.length-1;for(;r<i;){r++;let e=n.content[r];if(t||!e.hidden)return e}e=n}}o($i,`getNextNode`);function ea(e){if(e.range.start.character===0)return e;let t=e.range.start.line,n=e,r;for(;e.container;){let i=e.container,a=r??i.content.indexOf(e);if(a===0?(e=i,r=void 0):(r=a-1,e=i.content[r]),e.range.start.line!==t)break;n=e}return n}o(ea,`getStartlineNode`);function ta(e,t){let n=na(e,t);return n?n.parent.content.slice(n.a+1,n.b):[]}o(ta,`getInteriorNodes`);function na(e,t){let n=ra(e),r=ra(t),i;for(let e=0;e<n.length&&e<r.length;e++){let t=n[e],a=r[e];if(t.parent===a.parent)i={parent:t.parent,a:t.index,b:a.index};else break}return i}o(na,`getCommonParent`);function ra(e){let t=[];for(;e.container;){let n=e.container,r=n.content.indexOf(e);t.push({parent:n,index:r}),e=n}return t.reverse()}o(ra,`getParentChain`);var ia={};l(ia,{findAssignment:()=>Ga,findNameAssignment:()=>Ka,findNodeForKeyword:()=>Ua,findNodeForProperty:()=>Ba,findNodesForKeyword:()=>Ha,findNodesForKeywordInternal:()=>Wa,findNodesForProperty:()=>za,getActionAtElement:()=>Ja,getActionType:()=>io,getAllReachableRules:()=>Pa,getAllRulesUsedForCrossReferences:()=>Ia,getCrossReferenceTerminal:()=>La,getEntryRule:()=>Ma,getExplicitRuleType:()=>no,getHiddenRules:()=>Na,getRuleType:()=>oo,getRuleTypeName:()=>ao,getTypeName:()=>ro,isArrayCardinality:()=>Xa,isArrayOperator:()=>Za,isCommentTerminal:()=>Ra,isDataType:()=>eo,isDataTypeRule:()=>Qa,isOptionalCardinality:()=>Ya,terminalRegex:()=>so});var aa=class extends Error{static{o(this,`ErrorWithLocation`)}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function oa(e,t=`Error: Got unexpected value.`){throw Error(t)}o(oa,`assertUnreachable`);function sa(e,t=`Error: Condition is violated.`){if(!e)throw Error(t)}o(sa,`assertCondition`);var ca={};l(ca,{NEWLINE_REGEXP:()=>Sa,escapeRegExp:()=>ka,getTerminalParts:()=>Ta,isMultilineComment:()=>Ea,isWhitespace:()=>Oa,partialMatches:()=>Aa,partialRegExp:()=>ja,whitespaceCharacters:()=>Da});function P(e){return e.charCodeAt(0)}o(P,`cc`);function la(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}o(la,`insertToSet`);function ua(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}o(ua,`addFlag`);function da(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}o(da,`ASSERT_EXISTS`);function fa(){throw Error(`Internal Error - Should never get here!`)}o(fa,`ASSERT_NEVER_REACH_HERE`);function pa(e){return e.type===`Character`}o(pa,`isCharacter`);var ma=[];for(let e=P(`0`);e<=P(`9`);e++)ma.push(e);var ha=[P(`_`)].concat(ma);for(let e=P(`a`);e<=P(`z`);e++)ha.push(e);for(let e=P(`A`);e<=P(`Z`);e++)ha.push(e);var ga=[P(` `),P(`\f`),P(`
|
|
36
36
|
`),P(`\r`),P(` `),P(`\v`),P(` `),P(`\xA0`),P(` `),P(` `),P(` `),P(` `),P(` `),P(` `),P(` `),P(` `),P(` `),P(` `),P(` `),P(` `),P(`\u2028`),P(`\u2029`),P(` `),P(` `),P(` `),P(``)],_a=/[0-9a-fA-F]/,va=/[0-9]/,ya=/[1-9]/,ba=class{static{o(this,`RegExpParser`)}constructor(){this.idx=0,this.input=``,this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);let t=this.disjunction();this.consumeChar(`/`);let 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`:ua(n,`global`);break;case`i`:ua(n,`ignoreCase`);break;case`m`:ua(n,`multiLine`);break;case`u`:ua(n,`unicode`);break;case`y`:ua(n,`sticky`);break}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:n,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case`^`:return{type:`StartAnchor`,loc:this.loc(e)};case`$`:return{type:`EndAnchor`,loc:this.loc(e)};case`\\`:switch(this.popChar()){case`b`:return{type:`WordBoundary`,loc:this.loc(e)};case`B`:return{type:`NonWordBoundary`,loc:this.loc(e)}}throw Error(`Invalid Assertion Escape`);case`(`:this.consumeChar(`?`);let t;switch(this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break;case`<`:switch(this.popChar()){case`=`:t=`Lookbehind`;break;case`!`:t=`NegativeLookbehind`}break}da(t);let n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}return fa()}quantifier(e=!1){let t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:let n=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:n,atMost:n};break;case`,`:let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar(`}`);break}if(e===!0&&t===void 0)return;da(t);break}if(!(e===!0&&t===void 0)&&da(t))return this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t}atom(){let e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),da(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):fa()}dotAll(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[P(`
|
|
37
37
|
`),P(`\r`),P(`\u2028`),P(`\u2029`)]}}atomEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:return this.decimalEscapeAtom();case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:`GroupBackReference`,value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case`d`:e=ma;break;case`D`:e=ma,t=!0;break;case`s`:e=ga;break;case`S`:e=ga,t=!0;break;case`w`:e=ha;break;case`W`:e=ha,t=!0;break}return da(e)?{type:`Set`,value:e,complement:t}:fa()}controlEscapeAtom(){let e;switch(this.popChar()){case`f`:e=P(`\f`);break;case`n`:e=P(`
|
|
38
38
|
`);break;case`r`:e=P(`\r`);break;case`t`:e=P(` `);break;case`v`:e=P(`\v`);break}return da(e)?{type:`Character`,value:e}:fa()}controlLetterEscapeAtom(){this.consumeChar(`c`);let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error(`Invalid `);return{type:`Character`,value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar(`0`),{type:`Character`,value:P(`\0`)}}hexEscapeSequenceAtom(){return this.consumeChar(`x`),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar(`u`),this.parseHexDigits(4)}identityEscapeAtom(){return{type:`Character`,value:P(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
@@ -146,7 +146,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
146
146
|
<${t}> may appears as a prefix path in all these alternatives.
|
|
147
147
|
`;return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
148
148
|
For Further details.`,r}o(NA,`buildAmbiguityError`);function PA(e){if(e instanceof rv)return`SUBRULE`;if(e instanceof ov)return`OPTION`;if(e instanceof uv)return`OR`;if(e instanceof sv)return`AT_LEAST_ONE`;if(e instanceof cv)return`AT_LEAST_ONE_SEP`;if(e instanceof lv)return`MANY_SEP`;if(e instanceof W)return`MANY`;if(e instanceof G)return`CONSUME`;throw Error(`non exhaustive match`)}o(PA,`getProductionDslName`);function FA(e,t,n){return{actualToken:n,possibleTokenTypes:rA(Lk(t.configs.elements,e=>e.state.transitions).filter(e=>e instanceof ZO).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}o(FA,`buildAdaptivePredictError`);function IA(e,t){return e.edges[t.tokenTypeIdx]}o(IA,`getExistingTargetState`);function LA(e,t,n){let r=new Ck,i=[];for(let a of e.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===WO){i.push(a);continue}let e=a.state.transitions.length;for(let n=0;n<e;n++){let e=a.state.transitions[n],i=RA(e,t);i!==void 0&&r.add({state:i,alt:a.alt,stack:a.stack})}}let a;if(i.length===0&&r.size===1&&(a=r),a===void 0){a=new Ck;for(let e of r.elements)WA(e,a)}if(i.length>0&&!KA(a))for(let e of i)a.add(e);return a}o(LA,`computeReachSet`);function RA(e,t){if(e instanceof ZO&&ab(t,e.tokenType))return e.target}o(RA,`getReachableTarget`);function zA(e,t){let n;for(let r of e.elements)if(t.is(r.alt)===!0){if(n===void 0)n=r.alt;else if(n!==r.alt)return}return n}o(zA,`getUniqueAlt`);function BA(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}o(BA,`newDFAState`);function VA(e,t,n,r){return r=HA(e,r),t.edges[n.tokenTypeIdx]=r,r}o(VA,`addDFAEdge`);function HA(e,t){if(t===Sk)return t;let n=t.configs.key,r=e.states[n];return r===void 0?(t.configs.finalize(),e.states[n]=t,t):r}o(HA,`addDFAState`);function UA(e){let t=new Ck,n=e.transitions.length;for(let r=0;r<n;r++)WA({state:e.transitions[r].target,alt:r,stack:[]},t);return t}o(UA,`computeStartState`);function WA(e,t){let n=e.state;if(n.type===WO){if(e.stack.length>0){let n=[...e.stack];WA({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);let r=n.transitions.length;for(let i=0;i<r;i++){let r=n.transitions[i],a=GA(e,r);a!==void 0&&WA(a,t)}}o(WA,`closure`);function GA(e,t){if(t instanceof QO)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof $O){let n=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:n}}}o(GA,`getEpsilonTarget`);function KA(e){for(let t of e.elements)if(t.state.type===WO)return!0;return!1}o(KA,`hasConfigInRuleStopState`);function qA(e){for(let t of e.elements)if(t.state.type!==WO)return!1;return!0}o(qA,`allConfigsInRuleStopStates`);function JA(e){if(qA(e))return!0;let t=YA(e.elements);return XA(t)&&!ZA(t)}o(JA,`hasConflictTerminatingPrediction`);function YA(e){let t=new Map;for(let n of e){let e=wk(n,!1),r=t.get(e);r===void 0&&(r={},t.set(e,r)),r[n.alt]=!0}return t}o(YA,`getConflictingAltSets`);function XA(e){for(let t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}o(XA,`hasConflictingAltSet`);function ZA(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}o(ZA,`hasStateAssociatedWithOneAlt`),gt();var QA=class{static{o(this,`CstNodeBuilder`)}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new rj(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new tj;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let n=new ej(e.startOffset,e.image.length,Bi(e),e.tokenType,!t);return n.grammarSource=t,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let t=e.container;if(t){let n=t.content.indexOf(e);n>=0&&t.content.splice(n,1)}}addHiddenNodes(e){let t=[];for(let n of e){let e=new ej(n.startOffset,n.image.length,Bi(n),n.tokenType,!0);e.root=this.rootNode,t.push(e)}let n=this.current,r=!1;if(n.content.length>0){n.content.push(...t);return}for(;n.container;){let e=n.container.content.indexOf(n);if(e>0){n.container.content.splice(e,0,...t),r=!0;break}n=n.container}r||this.rootNode.content.unshift(...t)}construct(e){let t=this.current;typeof e.$type==`string`&&!e.$infix&&(this.current.astNode=e),e.$cstNode=t;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}},$A=class{static{o(this,`AbstractCstNode`)}get hidden(){return!1}get astNode(){let e=typeof this._astNode?.$type==`string`?this._astNode:this.container?.astNode;if(!e)throw 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)}},ej=class extends $A{static{o(this,`LeafCstNodeImpl`)}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=r,this._length=t,this._range=n}},tj=class extends $A{static{o(this,`CompositeCstNodeImpl`)}constructor(){super(...arguments),this.content=new nj(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){let{range:n}=e,{range:r}=t;this._rangeCache={start:n.start,end:r.end.line<n.start.line?n.start:r.end}}return this._rangeCache}else return{start:y.create(0,0),end:y.create(0,0)}}get firstNonHiddenNode(){for(let e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},nj=class e extends Array{static{o(this,`CstNodeContainer`)}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,e.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(let t of e)t.container=this.parent}},rj=class extends tj{static{o(this,`RootCstNodeImpl`)}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text=``,this._text=e??``}},ij=Symbol(`Datatype`);function aj(e){return e.$type===ij}o(aj,`isDataTypeNode`);var oj=``,sj=o(e=>e.endsWith(oj)?e:e+oj,`withRuleSuffix`),cj=class{static{o(this,`AbstractLangiumParser`)}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let t=this.lexer.definition,n=e.LanguageMetaData.mode===`production`;e.shared.profilers.LangiumProfiler?.isActive(`parsing`)?this.wrapper=new hj(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask(`parsing`,e.LanguageMetaData.languageId)):this.wrapper=new mj(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},lj=class extends cj{static{o(this,`LangiumParser`)}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new QA,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let n=this.computeRuleType(e),r;Or(e)&&(r=e.name,this.registerPrecedenceMap(e));let i=this.wrapper.DEFINE_RULE(sj(e.name),this.startImplementation(n,r,t).bind(this));return this.allRules.set(e.name,i),Xr(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){let t=e.name,n=new Map;for(let t=0;t<e.operators.precedences.length;t++){let r=e.operators.precedences[t];for(let e of r.operators)n.set(e.value,{precedence:t,rightAssoc:r.associativity===`right`})}this.operatorPrecedence.set(t,n)}computeRuleType(e){return Or(e)?ro(e):e.fragment?void 0:Qa(e)?ij:ro(e)}parse(e,t={}){this.nodeBuilder.buildRootNode(e);let n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;let r=t.rule?this.allRules.get(t.rule):this.mainRule;if(!r)throw Error(t.rule?`No rule found with name '${t.rule}'`:`No main rule available.`);let i=this.doParse(r);return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,Tn(i,{deep:!0}),{value:i,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}doParse(e){let t=this.wrapper.rule(e);if(this.stack.length>0&&(t=this.construct()),t===void 0)throw Error(`No result from parser`);if(this.stack.length>0)throw Error(`Parser stack is not empty after parsing`);return t}startImplementation(e,t,n){return r=>{let i=!this.isRecording()&&e!==void 0;if(i){let n={$type:e};this.stack.push(n),e===ij?n.value=``:t!==void 0&&(n.$infixName=t)}return n(r),i?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let n=e.startOffset;for(let e=0;e<t.length;e++)if(t[e].startOffset>n)return t.splice(0,e);return t.splice(0,t.length)}consume(e,t,n){let r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){let e=this.extractHiddenTokens(r);this.nodeBuilder.addHiddenNodes(e);let t=this.nodeBuilder.buildLeafNode(r,n),{assignment:i,crossRef:a}=this.getAssignment(n),o=this.current;if(i){let e=Ir(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,a)}else if(aj(o)){let e=r.image;Ir(n)||(e=this.converter.convert(e,t).toString()),o.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset==`number`&&!isNaN(e.endOffset)}subrule(e,t,n,r,i){let a;!this.isRecording()&&!n&&(a=this.nodeBuilder.buildCompositeNode(r));let o;try{o=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(o===void 0&&!n&&(o=this.construct()),o!==void 0&&a&&a.length>0&&this.performSubruleAssignment(o,r,a))}}performSubruleAssignment(e,t,n){let{assignment:r,crossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){let t=this.current;if(aj(t))t.value+=e.toString();else if(typeof e==`object`&&e){let n=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(n)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(t.feature&&t.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(n.$cstNode);let r={$type:e};this.stack.push(r),this.assign(t.operator,t.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;let e=this.stack.pop();return this.nodeBuilder.construct(e),`$infixName`in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):aj(e)?this.converter.convert(e.value,e.$cstNode):(In(this.astReflection,e),e)}constructInfix(e,t){let n=e.parts;if(!Array.isArray(n)||n.length===0)return;let r=e.operators;if(!Array.isArray(r)||n.length<2)return n[0];let i=0,a=-1;for(let e=0;e<r.length;e++){let n=r[e],o=t.get(n)??{precedence:1/0,rightAssoc:!1};o.precedence>a?(a=o.precedence,i=e):o.precedence===a&&(o.rightAssoc||(i=e))}let o=r.slice(0,i),s=r.slice(i+1),c=n.slice(0,i+1),l=n.slice(i+1),u={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:s},f=this.constructInfix(u,t),p=this.constructInfix(d,t);return{$type:e.$type,$cstNode:e.$cstNode,left:f,operator:r[i],right:p}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=En(e,ir);this.assignmentMap.set(e,{assignment:t,crossRef:t&&mr(t.terminal)?t.terminal.isMulti?`multi`:`single`:void 0})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){let a=this.current,o;switch(o=i===`single`&&typeof n==`string`?this.linker.buildReference(a,t,r,n):i===`multi`&&typeof n==`string`?this.linker.buildMultiReference(a,t,r,n):n,e){case`=`:a[t]=o;break;case`?=`:a[t]=!0;break;case`+=`:Array.isArray(a[t])||(a[t]=[]),a[t].push(o)}}assignWithoutOverride(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];t===void 0?e[n]=r:Array.isArray(t)&&Array.isArray(r)&&(r.push(...t),e[n]=r)}let n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},uj=class{static{o(this,`AbstractParserErrorMessageProvider`)}buildMismatchTokenMessage(e){return ob.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return ob.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return ob.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return ob.buildEarlyExitMessage(e)}},dj=class extends uj{static{o(this,`LangiumParserErrorMessageProvider`)}buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(`:KW`)?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},fj=class extends cj{static{o(this,`LangiumCompletionParser`)}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let t=this.lexer.tokenize(e,{mode:`partial`});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){let n=this.wrapper.DEFINE_RULE(sj(e.name),this.startImplementation(t).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 t=>{let n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},pj={recoveryEnabled:!0,nodeLocationTracking:`full`,skipValidations:!0,errorMessageProvider:new dj},mj=class extends vS{static{o(this,`ChevrotainWrapper`)}constructor(e,t){let n=t&&`maxLookahead`in t;super(e,{...pj,lookaheadStrategy:n?new jx({maxLookahead:t.maxLookahead}):new EA({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,n){return this.RULE(e,t,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},hj=class extends mj{static{o(this,`ProfilerWrapper`)}constructor(e,t,n){super(e,t),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,t,n){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,n)}finally{this.task.stopSubTask(this.ruleName(t))}}};function gj(e,t,n){return _j({parser:t,tokens:n,ruleNames:new Map},e),t}o(gj,`createParser`);function _j(e,t){let n=Pa(t,!1),r=M(t.rules).filter(Xr).filter(e=>n.has(e));for(let t of r){let n={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(t,yj(n,t.definition))}let i=M(t.rules).filter(Or).filter(e=>n.has(e));for(let t of i)e.parser.rule(t,vj(e,t))}o(_j,`buildRules`);function vj(e,t){let n=t.call.rule.ref;if(!n)throw Error(`Could not resolve reference to infix operator rule: `+t.call.rule.$refText);if(gi(n))throw Error(`Cannot use terminal rule in infix expression`);let r=t.operators.precedences.flatMap(e=>e.operators),i={$type:`Group`,elements:[]},a={$container:i,$type:`Assignment`,feature:`parts`,operator:`+=`,terminal:t.call},s={$container:i,$type:`Group`,elements:[],cardinality:`*`};i.elements.push(a,s);let c={$container:s,$type:`Assignment`,feature:`operators`,operator:`+=`,terminal:{$type:`Alternatives`,elements:r}},l={...a,$container:s};s.elements.push(c,l);let u=r.map(t=>e.tokens[t.value]).map((t,n)=>({ALT:o(()=>e.parser.consume(n,t,c),`ALT`)})),d;return t=>{d??=jj(e,n),e.parser.subrule(0,d,!1,a,t),e.parser.many(0,{DEF:o(()=>{e.parser.alternatives(0,u),e.parser.subrule(1,d,!1,l,t)},`DEF`)})}}o(vj,`buildInfixRule`);function yj(e,t,n=!1){let r;if(Ir(t))r=kj(e,t);else if(Xn(t))r=bj(e,t);else if(ir(t))r=yj(e,t.terminal);else if(mr(t))r=Oj(e,t);else if(ii(t))r=xj(e,t);else if(Qn(t))r=wj(e,t);else if(Oi(t))r=Tj(e,t);else if(wr(t))r=Ej(e,t);else if(vr(t)){let n=e.consume++;r=o(()=>e.parser.consume(n,rb,t),`method`)}else throw new aa(t.$cstNode,`Unexpected element type: ${t.$type}`);return Aj(e,n?void 0:Dj(t),r,t.cardinality)}o(yj,`buildElement`);function bj(e,t){let n=ro(t);return()=>e.parser.action(n,t)}o(bj,`buildAction`);function xj(e,t){let n=t.rule.ref;if(Wn(n)){let r=e.subrule++,i=Xr(n)&&n.fragment,a=t.arguments.length>0?Sj(n,t.arguments):()=>({}),o;return s=>{o??=jj(e,n),e.parser.subrule(r,o,i,t,a(s))}}else if(gi(n)){let r=e.consume++,i=Nj(e,n.name);return()=>e.parser.consume(r,i,t)}else if(n)oa(n);else throw new aa(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}o(xj,`buildRuleCall`);function Sj(e,t){if(t.some(e=>e.calledByName)){let e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:Cj(e.value)}));return t=>{let n={};for(let{parameterName:r,predicate:i}of e)r&&(n[r]=i(t));return n}}else{let n=t.map(e=>Cj(e.value));return t=>{let r={};for(let i=0;i<n.length;i++)if(i<e.parameters.length){let a=e.parameters[i].name,o=n[i];r[a]=o(t)}return r}}}o(Sj,`buildRuleCallPredicate`);function Cj(e){if(gr(e)){let t=Cj(e.left),n=Cj(e.right);return e=>t(e)||n(e)}else if(fr(e)){let t=Cj(e.left),n=Cj(e.right);return e=>t(e)&&n(e)}else if(Hr(e)){let t=Cj(e.value);return e=>!t(e)}else if(Jr(e)){let t=e.parameter.ref.name;return e=>e!==void 0&&e[t]===!0}else if(or(e)){let t=!!e.true;return()=>t}oa(e)}o(Cj,`buildPredicate`);function wj(e,t){if(t.elements.length===1)return yj(e,t.elements[0]);{let n=[];for(let r of t.elements){let t={ALT:yj(e,r,!0)},i=Dj(r);i&&(t.GATE=Cj(i)),n.push(t)}let r=e.or++;return t=>e.parser.alternatives(r,n.map(e=>{let n={ALT:o(()=>e.ALT(t),`ALT`)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n}))}}o(wj,`buildAlternatives`);function Tj(e,t){if(t.elements.length===1)return yj(e,t.elements[0]);let n=[];for(let r of t.elements){let t={ALT:yj(e,r,!0)},i=Dj(r);i&&(t.GATE=Cj(i)),n.push(t)}let r=e.or++,i=o((e,t)=>`uGroup_${e}_${t.getRuleStack().join(`-`)}`,`idFunc`),a=o(t=>e.parser.alternatives(r,n.map((n,a)=>{let s={ALT:o(()=>!0,`ALT`)},c=e.parser;s.ALT=()=>{if(n.ALT(t),!c.isRecording()){let e=i(r,c);c.unorderedGroups.get(e)||c.unorderedGroups.set(e,[]);let t=c.unorderedGroups.get(e);t?.[a]===void 0&&(t[a]=!0)}};let l=n.GATE;return l?s.GATE=()=>l(t):s.GATE=()=>!c.unorderedGroups.get(i(r,c))?.[a],s})),`alternatives`),s=Aj(e,Dj(t),a,`*`);return t=>{s(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}o(Tj,`buildUnorderedGroup`);function Ej(e,t){let n=t.elements.map(t=>yj(e,t));return e=>n.forEach(t=>t(e))}o(Ej,`buildGroup`);function Dj(e){if(wr(e))return e.guardCondition}o(Dj,`getGuardCondition`);function Oj(e,t,n=t.terminal){if(!n){if(!t.type.ref)throw Error(`Could not resolve reference to type: `+t.type.$refText);let n=Ka(t.type.ref)?.terminal;if(!n)throw Error(`Could not find name assignment for type: `+ro(t.type.ref));return Oj(e,t,n)}else if(ii(n)&&Xr(n.rule.ref)){let r=n.rule.ref,i=e.subrule++,a;return n=>{a??=jj(e,r),e.parser.subrule(i,a,!1,t,n)}}else if(ii(n)&&gi(n.rule.ref)){let r=e.consume++,i=Nj(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}else if(Ir(n)){let r=e.consume++,i=Nj(e,n.value);return()=>e.parser.consume(r,i,t)}else throw Error(`Could not build cross reference parser`)}o(Oj,`buildCrossReference`);function kj(e,t){let n=e.consume++,r=e.tokens[t.value];if(!r)throw Error(`Could not find token for keyword: `+t.value);return()=>e.parser.consume(n,r,t)}o(kj,`buildKeyword`);function Aj(e,t,n,r){let i=t&&Cj(t);if(!r)if(i){let t=e.or++;return r=>e.parser.alternatives(t,[{ALT:o(()=>n(r),`ALT`),GATE:o(()=>i(r),`GATE`)},{ALT:gS(),GATE:o(()=>!i(r),`GATE`)}])}else return n;if(r===`*`){let t=e.many++;return r=>e.parser.many(t,{DEF:o(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}else if(r===`+`){let t=e.many++;if(i){let r=e.or++;return a=>e.parser.alternatives(r,[{ALT:o(()=>e.parser.atLeastOne(t,{DEF:o(()=>n(a),`DEF`)}),`ALT`),GATE:o(()=>i(a),`GATE`)},{ALT:gS(),GATE:o(()=>!i(a),`GATE`)}])}else return r=>e.parser.atLeastOne(t,{DEF:o(()=>n(r),`DEF`)})}else if(r===`?`){let t=e.optional++;return r=>e.parser.optional(t,{DEF:o(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}else oa(r)}o(Aj,`wrap`);function jj(e,t){let n=Mj(e,t),r=e.parser.getRule(n);if(!r)throw Error(`Rule "${n}" not found."`);return r}o(jj,`getRule`);function Mj(e,t){if(Wn(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!Xr(r);)(wr(r)||Qn(r)||Oi(r))&&(i=r.elements.indexOf(n).toString()+`:`+i),n=r,r=r.$container;return i=r.name+`:`+i,e.ruleNames.set(t,i),i}}o(Mj,`getRuleName`);function Nj(e,t){let n=e.tokens[t];if(!n)throw Error(`Token "${t}" not found."`);return n}o(Nj,`getToken`);function Pj(e){let t=e.Grammar,n=e.parser.Lexer,r=new fj(e);return gj(t,r,n.definition),r.finalize(),r}o(Pj,`createCompletionParser`);function Fj(e){let t=Ij(e);return t.finalize(),t}o(Fj,`createLangiumParser`);function Ij(e){let t=e.Grammar,n=e.parser.Lexer;return gj(t,new lj(e),n.definition)}o(Ij,`prepareLangiumParser`);var Lj=class{static{o(this,`DefaultTokenBuilder`)}constructor(){this.diagnostics=[]}buildTokens(e,t){let n=M(Pa(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return i.push(...r),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(gi).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){let t=so(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,r={name:e.name,PATTERN:n};return typeof n==`function`&&(r.LINE_BREAKS=!0),e.hidden&&(r.GROUP=Oa(t)?Uy.SKIPPED:`hidden`),r}requiresCustomPattern(e){return!!(e.flags.includes(`u`)||e.flags.includes(`s`))}regexPatternFunction(e){let t=new RegExp(e,e.flags+`y`);return(e,n)=>(t.lastIndex=n,t.exec(e))}buildKeywordTokens(e,t,n){return e.filter(Wn).flatMap(e=>Mn(e).filter(Ir)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,!!n?.caseInsensitive))}buildKeywordToken(e,t,n){let r=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)};return typeof r==`function`&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp(ka(e.value),`i`):e.value}findLongerAlt(e,t){return t.reduce((t,n)=>{let r=n?.PATTERN;return r?.source&&Aa(`^`+r.source+`$`,e.value)&&t.push(n),t},[])}},Rj=class{static{o(this,`DefaultValueConverter`)}convert(e,t){let n=t.grammarSource;if(mr(n)&&(n=La(n)),ii(n)){let r=n.rule.ref;if(!r)throw Error(`This cst node was not parsed by a rule.`);return this.runConverter(r,e,t)}return e}runConverter(e,t,n){switch(e.name.toUpperCase()){case`INT`:return zj.convertInt(t);case`STRING`:return zj.convertString(t);case`ID`:return zj.convertID(t)}switch(oo(e)?.toLowerCase()){case`number`:return zj.convertNumber(t);case`boolean`:return zj.convertBoolean(t);case`bigint`:return zj.convertBigint(t);case`date`:return zj.convertDate(t);default:return t}}},zj;(function(e){function t(e){let t=``;for(let r=1;r<e.length-1;r++){let i=e.charAt(r);if(i===`\\`){let i=e.charAt(++r);t+=n(i)}else t+=i}return t}o(t,`convertString`),e.convertString=t;function n(e){switch(e){case`b`:return`\b`;case`f`:return`\f`;case`n`:return`
|
|
149
|
-
`;case`r`:return`\r`;case`t`:return` `;case`v`:return`\v`;case`0`:return`\0`;default:return e}}o(n,`convertEscapeCharacter`);function r(e){return e.charAt(0)===`^`?e.substring(1):e}o(r,`convertID`),e.convertID=r;function i(e){return parseInt(e)}o(i,`convertInt`),e.convertInt=i;function a(e){return BigInt(e)}o(a,`convertBigint`),e.convertBigint=a;function s(e){return new Date(e)}o(s,`convertDate`),e.convertDate=s;function c(e){return Number(e)}o(c,`convertNumber`),e.convertNumber=c;function l(e){return e.toLowerCase()===`true`}o(l,`convertBoolean`),e.convertBoolean=l})(zj||={});var Z={};d(Z,f(bt(),1));function Bj(){return new Promise(e=>{typeof setImmediate>`u`?setTimeout(e,0):setImmediate(e)})}o(Bj,`delayNextTick`);var Vj=0,Hj=10;function Uj(){return Vj=performance.now(),new Z.CancellationTokenSource}o(Uj,`startCancelableOperation`);function Wj(e){Hj=e}o(Wj,`setInterruptionPeriod`);var Gj=Symbol(`OperationCancelled`);function Kj(e){return e===Gj}o(Kj,`isOperationCancelled`);async function Q(e){if(e===Z.CancellationToken.None)return;let t=performance.now();if(t-Vj>=Hj&&(Vj=t,await Bj(),Vj=performance.now()),e.isCancellationRequested)throw Gj}o(Q,`interruptAndCheck`);var qj=class{static{o(this,`Deferred`)}constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},Jj=class e{static{o(this,`FullTextDocument`)}constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(t,n){for(let n of t)if(e.isIncremental(n)){let e=$j(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);let i=Math.max(e.start.line,0),a=Math.max(e.end.line,0),o=this._lineOffsets,s=Zj(n.text,!1,t);if(a-i===s.length)for(let e=0,t=s.length;e<t;e++)o[e+i+1]=s[e];else s.length<1e4?o.splice(i+1,a-i,...s):this._lineOffsets=o=o.slice(0,i+1).concat(s,o.slice(a+1));let c=n.text.length-(r-t);if(c!==0)for(let e=i+1+s.length,t=o.length;e<t;e++)o[e]=o[e]+c}else if(e.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw Error(`Unknown change event received`);this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Zj(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return{line:0,character:e};for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return e=this.ensureBeforeEOL(e,t[i]),{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line];if(e.character<=0)return n;let r=e.line+1<t.length?t[e.line+1]:this._content.length,i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,t){for(;e>t&&Qj(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}static isFull(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}},Yj;(function(e){function t(e,t,n,r){return new Jj(e,t,n,r)}o(t,`create`),e.create=t;function n(e,t,n){if(e instanceof Jj)return e.update(t,n),e;throw Error(`TextDocument.update: document must be created by TextDocument.create`)}o(n,`update`),e.update=n;function r(e,t){let n=e.getText(),r=Xj(t.map(eM),(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),i=0,a=[];for(let t of r){let r=e.offsetAt(t.range.start);if(r<i)throw Error(`Overlapping edit`);r>i&&a.push(n.substring(i,r)),t.newText.length&&a.push(t.newText),i=e.offsetAt(t.range.end)}return a.push(n.substr(i)),a.join(``)}o(r,`applyEdits`),e.applyEdits=r})(Yj||={});function Xj(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Xj(r,t),Xj(i,t);let a=0,o=0,s=0;for(;a<r.length&&o<i.length;)t(r[a],i[o])<=0?e[s++]=r[a++]:e[s++]=i[o++];for(;a<r.length;)e[s++]=r[a++];for(;o<i.length;)e[s++]=i[o++];return e}o(Xj,`mergeSort`);function Zj(e,t,n=0){let r=t?[n]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);Qj(i)&&(i===13&&t+1<e.length&&e.charCodeAt(t+1)===10&&t++,r.push(n+t+1))}return r}o(Zj,`computeLineOffsets`);function Qj(e){return e===13||e===10}o(Qj,`isEOL`);function $j(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}o($j,`getWellformedRange`);function eM(e){let t=$j(e.range);return t===e.range?e:{newText:e.newText,range:t}}o(eM,`getWellformedEdit`);var tM;(()=>{var e={975:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}o(t,`e`);function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}o(n,`r`);var r={resolve:o(function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},`resolve`),normalize:o(function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},`normalize`),isAbsolute:o(function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},`isAbsolute`),join:o(function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},`join`),relative:o(function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},`relative`),_makeLong:o(function(e){return e},`_makeLong`),dirname:o(function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},`dirname`),basename:o(function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},`basename`),extname:o(function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},`extname`),format:o(function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return(function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r})(0,e)},`format`),parse:o(function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},`parse`),sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}o(n,`r`),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:o(()=>d,`URI`),Utils:o(()=>te,`Utils`)}),typeof process==`object`?i=process.platform===`win32`:typeof navigator==`object`&&(i=navigator.userAgent.indexOf(`Windows`)>=0);let a=/^\w[\w\d+.-]*$/,s=/^\//,c=/^\/\//;function l(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!a.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!s.test(e.path))throw 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(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}o(l,`a`);let u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static{o(this,`l`)}static isUri(e){return e instanceof d||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=(function(e,t){return e||t?e:`file`})(e,a),this.authority=t||``,this.path=(function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t})(this.scheme,n||``),this.query=r||``,this.fragment=i||``,l(this,a))}get fsPath(){return _(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new p(t,n,r,i,a)}static parse(e,t=!1){let n=u.exec(e);return n?new p(n[2]||``,x(n[4]||``),x(n[5]||``),x(n[7]||``),x(n[9]||``),t):new p(``,``,``,``,``)}static file(e){let t=``;if(i&&(e=e.replace(/\\/g,`/`)),e[0]===`/`&&e[1]===`/`){let n=e.indexOf(`/`,2);n===-1?(t=e.substring(2),e=`/`):(t=e.substring(2,n),e=e.substring(n)||`/`)}return new p(`file`,t,e,``,``)}static from(e){let t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{let t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}let f=i?1:void 0;class p extends d{static{o(this,`d`)}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=_(this,!1),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||=v(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let m={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 h(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=m[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}o(h,`m`);function g(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=m[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}o(g,`y`);function _(e,t){let n;return n=e.authority&&e.path.length>1&&e.scheme===`file`?`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(n=n.replace(/\//g,`\\`)),n}o(_,`v`);function v(e,t){let n=t?g:h,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:h(c,!1,!1)),r}o(v,`b`);function y(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}o(y,`C`);let b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(e){return e.match(b)?e.replace(b,(e=>y(e))):e}o(x,`w`);var ee=n(975);let S=ee.posix||ee;var te;(function(e){e.joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=S.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=S.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return S.basename(e.path)},e.extname=function(e){return S.extname(e.path)}})(te||={}),tM=r})();var{URI:nM,Utils:rM}=tM,iM;(function(e){e.basename=rM.basename,e.dirname=rM.dirname,e.extname=rM.extname,e.joinPath=rM.joinPath,e.resolvePath=rM.resolvePath;let t=typeof process==`object`&&process?.platform===`win32`;function n(e,t){return e?.toString()===t?.toString()}o(n,`equals`),e.equals=n;function r(e,n){let r=typeof e==`string`?nM.parse(e).path:e.path,i=typeof n==`string`?nM.parse(n).path:n.path,a=r.split(`/`).filter(e=>e.length>0),o=i.split(`/`).filter(e=>e.length>0);if(t){let e=/^[A-Z]:$/;if(a[0]&&e.test(a[0])&&(a[0]=a[0].toLowerCase()),o[0]&&e.test(o[0])&&(o[0]=o[0].toLowerCase()),a[0]!==o[0])return i.substring(1)}let s=0;for(;s<a.length&&a[s]===o[s];s++);return`../`.repeat(a.length-s)+o.slice(s).join(`/`)}o(r,`relative`),e.relative=r;function i(e){return nM.parse(e.toString()).toString()}o(i,`normalize`),e.normalize=i;function a(e,t){let n=typeof e==`string`?e:e.path,r=typeof t==`string`?t:t.path;return r.charAt(r.length-1)===`/`&&(r=r.slice(0,-1)),n.charAt(n.length-1)===`/`&&(n=n.slice(0,-1)),r===n?!0:r.length<n.length||r.charAt(n.length)!==`/`?!1:r.startsWith(n)}o(a,`contains`),e.contains=a})(iM||={});var aM=class{static{o(this,`UriTrie`)}constructor(){this.root={name:``,children:new Map}}normalizeUri(e){return iM.normalize(e)}clear(){this.root.children.clear()}insert(e,t){let n=this.getNode(this.normalizeUri(e),!0);n.element=t}delete(e){let t=this.getNode(this.normalizeUri(e),!1);t?.parent&&t.parent.children.delete(t.name)}has(e){return this.getNode(this.normalizeUri(e),!1)?.element!==void 0}hasNode(e){return this.getNode(this.normalizeUri(e),!1)!==void 0}find(e){return this.getNode(this.normalizeUri(e),!1)?.element}findNode(e){let t=this.normalizeUri(e),n=this.getNode(t,!1);if(n)return{name:n.name,uri:iM.joinPath(nM.parse(t),n.name).toString(),element:n.element}}findChildren(e){let t=this.normalizeUri(e),n=this.getNode(t,!1);return n?Array.from(n.children.values()).map(e=>({name:e.name,uri:iM.joinPath(nM.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(iM.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let n=e.split(`/`);e.charAt(e.length-1)===`/`&&n.pop();let r=this.root;for(let e of n){let n=r.children.get(e);if(!n)if(t)n={name:e,children:new Map,parent:r},r.children.set(e,n);else return;r=n}return r}collectValues(e){let t=[];e.element&&t.push(e.element);for(let n of e.children.values())t.push(...this.collectValues(n));return t}},$;(function(e){e[e.Changed=0]=`Changed`,e[e.Parsed=1]=`Parsed`,e[e.IndexedContent=2]=`IndexedContent`,e[e.ComputedScopes=3]=`ComputedScopes`,e[e.Linked=4]=`Linked`,e[e.IndexedReferences=5]=`IndexedReferences`,e[e.Validated=6]=`Validated`})($||={});var oM=class{static{o(this,`DefaultLangiumDocumentFactory`)}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Z.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){return t??=nM.parse(e.uri),Z.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return Z.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,n){if(typeof t==`string`){let r=this.parse(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}else if(`$model`in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let r=this.parse(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}async createAsync(e,t,n){if(typeof t==`string`){let r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}else{let r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n)i={parseResult:e,uri:t,state:$.Parsed,references:[],textDocument:n};else{let n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:$.Parsed,references:[],get textDocument(){return n()}}}return e.value.$document=i,i}async update(e,t){let n=e.parseResult.value.$cstNode?.root.fullText,r=this.textDocuments?.get(e.uri.toString()),i=r?r.getText():await this.fileSystemProvider.readFile(e.uri);if(r)Object.defineProperty(e,`textDocument`,{value:r});else{let t=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,`textDocument`,{get:t})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=$.Parsed,e}parse(e,t,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,n)}parseAsync(e,t,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){let n=this.serviceRegistry,r;return()=>r??=Yj.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??``)}},sM=class{static{o(this,`DefaultLangiumDocuments`)}constructor(e){this.documentTrie=new aM,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return M(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then(e=>(this.addDocument(e),e));{let n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&this.documentBuilder().resetToState(n,$.Changed),n}deleteDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=$.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){let t=e.toString(),n=this.documentTrie.findAll(t);for(let e of n)e.state=$.Changed;return this.documentTrie.delete(t),n}},cM=Symbol(`RefResolving`),lM=class{static{o(this,`DefaultLinker`)}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=Z.CancellationToken.None){if(this.profiler?.isActive(`linking`)){let n=this.profiler.createTask(`linking`,this.languageId);n.start();try{for(let r of Nn(e.parseResult.value))await Q(t),Fn(r).forEach(t=>{let i=`${r.$type}:${t.property}`;n.startSubTask(i);try{this.doLink(t,e)}finally{n.stopSubTask(i)}})}finally{n.stop()}}else for(let n of Nn(e.parseResult.value))await Q(t),Fn(n).forEach(t=>this.doLink(t,e))}doLink(e,t){let n=e.reference;if(`_ref`in n&&n._ref===void 0){n._ref=cM;try{let t=this.getCandidate(e);fn(t)?n._ref=t:(n._nodeDescription=t,n._ref=this.loadAstNode(t)??this.createLinkingError(e,t))}catch(t){console.error(`An error occurred while resolving reference to '${n.$refText}':`,t);let r=t.message??String(t);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`}}t.references.push(n)}else if(`_items`in n&&n._items===void 0){n._items=cM;try{let t=this.getCandidates(e),r=[];if(fn(t))n._linkingError=t;else for(let e of t){let t=this.loadAstNode(e);t&&r.push({ref:t,$nodeDescription:e})}n._items=r}catch(t){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${t}`},n._items=[]}t.references.push(n)}}unlink(e){for(let t of e.references)`_ref`in t?(t._ref=void 0,delete t._nodeDescription):`_items`in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,n,r){let i=this,a={$refNode:n,$refText:r,_ref:void 0,get ref(){if(j(this._ref))return this._ref;if(dn(this._nodeDescription)){let n=i.loadAstNode(this._nodeDescription);this._ref=n??i.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){this._ref=cM;let n=kn(e).$document,r=i.getLinkedNode({reference:a,container:e,property:t});if(r.error&&n&&n.state<$.ComputedScopes){this._ref=void 0;return}this._ref=r.node??r.error,this._nodeDescription=r.descr,n?.references.push(this)}else this._ref===cM&&i.throwCyclicReferenceError(e,t,r);return j(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return fn(this._ref)?this._ref:void 0}};return a}buildMultiReference(e,t,n,r){let i=this,a={$refNode:n,$refText:r,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(this._items===void 0){this._items=cM;let n=kn(e).$document,r=i.getCandidates({reference:a,container:e,property:t}),o=[];if(fn(r))this._linkingError=r;else for(let e of r){let t=i.loadAstNode(e);t&&o.push({ref:t,$nodeDescription:e})}this._items=o,n?.references.push(this)}else this._items===cM&&i.throwCyclicReferenceError(e,t,r);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:a,container:e,property:t})}};return a}throwCyclicReferenceError(e,t,n){throw Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${n}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(fn(t))return{error:t};let n=this.loadAstNode(t);return n?{node:n,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let n=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let n=kn(e.container).$document;return n&&n.state<$.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`),{info:e,message:`Could not resolve reference to ${this.reflection.getReferenceType(e)} named '${e.reference.$refText}'.`,targetDescription:t}}};function uM(e){return typeof e.name==`string`}o(uM,`isNamed`);var dM=class{static{o(this,`DefaultNameProvider`)}getName(e){if(uM(e))return e.name}getNameNode(e){return Ba(e.$cstNode,`name`)}},fM=class{static{o(this,`DefaultReferences`)}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=Nn(e.Grammar).some(e=>mr(e)&&e.isMulti)}findDeclarations(e){if(e){let t=Ga(e),n=e.astNode;if(t&&n){let r=n[t.feature];if(ln(r)||un(r))return An(r);if(Array.isArray(r)){for(let t of r)if((ln(t)||un(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return An(t)}}if(n){let t=this.nameProvider.getNameNode(n);if(t&&(t===e||zi(e,t)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(t.head());if(n){for(let t of Fn(n))if(un(t.reference)&&t.reference.items.some(t=>t.ref===e))return t.reference.items.map(e=>e.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let t=this.findDeclarations(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e)??e.$cstNode;t&&n.push(t)}return n}findReferences(e,t){let n=[];t.includeDeclaration&&n.push(...this.getSelfReferences(e));let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter(e=>iM.equals(e.sourceUri,t.documentUri))),n.push(...r),M(n)}getSelfReferences(e){let t=this.getSelfNodes(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e);if(t){let r=On(e),i=this.nodeLocator.getAstNodePath(e);n.push({sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:Vi(t),local:!0})}}return n}},pM=class{static{o(this,`MultiMap`)}constructor(e){if(this.map=new Map,e)for(let[t,n]of e)this.add(t,n)}get size(){return Cn.sum(M(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let r=n.indexOf(t);if(r>=0)return n.length===1?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?M(t):bn}has(e,t){if(t===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,n)=>t.forEach(t=>e(t,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return M(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return M(this.map.keys())}values(){return M(this.map.values()).flat()}entriesGroupedByKey(){return M(this.map.entries())}},mM=class{static{o(this,`BiMap`)}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);return t===void 0?!1:(this.map.delete(e),this.inverse.delete(t),!0)}},hM=class{static{o(this,`DefaultScopeComputation`)}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=Z.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=jn,r=Z.CancellationToken.None){let i=[];this.addExportedSymbol(e,i,t);for(let a of n(e))await Q(r),this.addExportedSymbol(a,i,t);return i}addExportedSymbol(e,t,n){let r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async collectLocalSymbols(e,t=Z.CancellationToken.None){let n=e.parseResult.value,r=new pM;for(let i of Mn(n))await Q(t),this.addLocalSymbol(i,e,r);return r}addLocalSymbol(e,t,n){let r=e.$container;if(r){let i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}},gM=class{static{o(this,`StreamScope`)}constructor(e,t,n){this.elements=e,this.outerScope=t,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}},_M=class{static{o(this,`MapScope`)}constructor(e,t,n){this.elements=new Map,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.set(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t),r=n?[n]:[];return(this.concatOuterScope||r.length>0)&&this.outerScope?M(r).concat(this.outerScope.getElements(e)):M(r)}getAllElements(){let e=M(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},vM=class{static{o(this,`MultiMapScope`)}constructor(e,t,n){this.elements=new pM,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.add(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t)[0];if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);return(this.concatOuterScope||n.length===0)&&this.outerScope?M(n).concat(this.outerScope.getElements(e)):M(n)}getAllElements(){let e=M(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},yM={getElement(){},getElements(){return bn},getAllElements(){return bn}},bM=class{static{o(this,`DisposableCache`)}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw Error(`This cache has already been disposed`)}},xM=class extends bM{static{o(this,`SimpleCache`)}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){let n=t();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},SM=class extends bM{static{o(this,`ContextCache`)}constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();let r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){let e=n();return r.set(t,e),e}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}},CM=class extends SM{static{o(this,`DocumentCache`)}constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(let e of t)this.clear(e)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{let n=e.concat(t);for(let e of n)this.clear(e)}))}},wM=class extends xM{static{o(this,`WorkspaceCache`)}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},TM=class{static{o(this,`DefaultScopeProvider`)}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new wM(e.shared)}getScope(e){let t=[],n=this.reflection.getReferenceType(e),r=On(e.container).localSymbols;if(r){let i=e.container;do r.has(i)&&t.push(r.getStream(i).filter(e=>this.reflection.isSubtype(e.type,n))),i=i.$container;while(i)}let i=this.getGlobalScope(n,e);for(let e=t.length-1;e>=0;e--)i=this.createScope(t[e],i);return i}createScope(e,t,n){return new gM(M(e),t,n)}createScopeForNodes(e,t,n){return new gM(M(e).map(e=>{let t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new vM(this.indexManager.allElements(e)))}};function EM(e){return typeof e.$comment==`string`}o(EM,`isAstNodeWithComment`);function DM(e){return typeof e==`object`&&!!e&&(`$ref`in e||`$error`in e)}o(DM,`isIntermediateReference`);var OM=class{static{o(this,`DefaultJsonSerializer`)}constructor(e){this.ignoreProperties=new Set([`$container`,`$containerProperty`,`$containerIndex`,`$document`,`$cstNode`]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let n=t??{},r=t?.replacer,i=o((e,t)=>this.replacer(e,t,n),`defaultReplacer`),a=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=On(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let n=t??{},r=JSON.parse(e);return this.linkNode(r,r,n),r}replacer(e,t,{refText:n,sourceText:r,textRegions:i,comments:a,uriConverter:o}){if(!this.ignoreProperties.has(e))if(ln(t)){let e=t.ref,r=n?t.$refText:void 0;if(e){let t=On(e),n=``;this.currentDocument&&this.currentDocument!==t&&(n=o?o(t.uri,e):t.uri.toString());let i=this.astNodeLocator.getAstNodePath(e);return{$ref:`${n}#${i}`,$refText:r}}else return{$error:t.error?.message??`Could not resolve reference`,$refText:r}}else if(un(t)){let e=n?t.$refText:void 0,r=[];for(let e of t.items){let t=e.ref,n=On(e.ref),i=``;this.currentDocument&&this.currentDocument!==n&&(i=o?o(n.uri,t):n.uri.toString());let a=this.astNodeLocator.getAstNodePath(t);r.push(`${i}#${a}`)}return{$refs:r,$refText:e}}else if(j(t)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&n?.$textRegion&&(n.$textRegion.documentURI=this.currentDocument?.uri.toString())),r&&!e&&(n??={...t},n.$sourceText=t.$cstNode?.text),a){n??={...t};let e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,``))}return n??t}else return t}addAstNodeRegionWithAssignmentsTo(e){let t=o(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),`createDocumentSegment`);if(e.$cstNode){let n=e.$textRegion=t(e.$cstNode),r=n.assignments={};return Object.keys(e).filter(e=>!e.startsWith(`$`)).forEach(n=>{let i=za(e.$cstNode,n).map(t);i.length!==0&&(r[n]=i)}),e}}linkNode(e,t,n,r,i,a){for(let[r,i]of Object.entries(e))if(Array.isArray(i))for(let a=0;a<i.length;a++){let o=i[a];DM(o)?i[a]=this.reviveReference(e,r,t,o,n):j(o)&&this.linkNode(o,t,n,e,r,a)}else DM(i)?e[r]=this.reviveReference(e,r,t,i,n):j(i)&&this.linkNode(i,t,n,e,r);let o=e;o.$container=r,o.$containerProperty=i,o.$containerIndex=a}reviveReference(e,t,n,r,i){let a=r.$refText,o=r.$error,s;if(r.$ref){let e=this.getRefNode(n,r.$ref,i.uriConverter);if(j(e))return a||=this.nameProvider.getName(e),{$refText:a??``,ref:e};o=e}else if(r.$refs){let e=[];for(let t of r.$refs){let r=this.getRefNode(n,t,i.uriConverter);j(r)&&e.push({ref:r})}if(e.length===0)s={$refText:a??``,items:e},o??=`Could not resolve multi-reference`;else return{$refText:a??``,items:e}}if(o)return s??={$refText:a??``,ref:void 0},s.error={info:{container:e,property:t,reference:s},message:o},s}getRefNode(e,t,n){try{let r=t.indexOf(`#`);if(r===0)return this.astNodeLocator.getAstNode(e,t.substring(1))||`Could not resolve path: `+t;if(r<0){let e=n?n(t):nM.parse(t),r=this.langiumDocuments.getDocument(e);return r?r.parseResult.value:`Could not find document for URI: `+t}let i=n?n(t.substring(0,r)):nM.parse(t.substring(0,r)),a=this.langiumDocuments.getDocument(i);return a?r===t.length-1?a.parseResult.value:this.astNodeLocator.getAstNode(a.parseResult.value,t.substring(r+1))||`Could not resolve URI: `+t:`Could not find document for URI: `+t}catch(e){return String(e)}}},kM=class{static{o(this,`DefaultServiceRegistry`)}get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){let t=e.LanguageMetaData;for(let n of t.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileExtensionMap.set(n,e);if(t.fileNames)for(let n of t.fileNames)this.fileNameMap.has(n)&&console.warn(`The file name ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileNameMap.set(n,e);this.languageIdMap.set(t.languageId,e)}getServices(e){if(this.languageIdMap.size===0)throw Error("The service registry is empty. Use `register` to register the services of a language.");let t=this.textDocuments?.get(e)?.languageId;if(t!==void 0){let e=this.languageIdMap.get(t);if(e)return e}let n=iM.extname(e),r=iM.basename(e),i=this.fileNameMap.get(r)??this.fileExtensionMap.get(n);if(!i)throw Error(t?`The service registry contains no services for the extension '${n}' for language '${t}'.`:`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())}};function AM(e){return{code:e}}o(AM,`diagnosticData`);var jM;(function(e){e.defaults=[`fast`,`slow`,`built-in`],e.all=e.defaults})(jM||={});var MM=class{static{o(this,`ValidationRegistry`)}constructor(e){this.entries=new pM,this.knownCategories=new Set(jM.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,n=`fast`){if(n===`built-in`)throw Error(`The 'built-in' category is reserved for lexer, parser, and linker errors.`);this.knownCategories.add(n);for(let[r,i]of Object.entries(e)){let e=i;if(Array.isArray(e))for(let i of e){let e={check:this.wrapValidationException(i,t),category:n};this.addEntry(r,e)}else if(typeof e==`function`){let i={check:this.wrapValidationException(e,t),category:n};this.addEntry(r,i)}else oa(e)}}wrapValidationException(e,t){return async(n,r,i)=>{await this.handleException(()=>e.call(t,n,r,i),`An error occurred during validation`,r,n)}}async handleException(e,t,n,r){try{await e()}catch(e){if(Kj(e))throw e;console.error(`${t}:`,e),e instanceof Error&&e.stack&&console.error(e.stack),n(`error`,`${t}: ${e instanceof Error?e.message:String(e)}`,{node:r})}}addEntry(e,t){if(e===`AstNode`){this.entries.add(`AstNode`,t);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,t)}getChecks(e,t){let n=M(this.entries.get(e)).concat(this.entries.get(`AstNode`));return t&&(n=n.filter(e=>t.includes(e.category))),n.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,`An error occurred during set-up of the validation`,t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,`An error occurred during tear-down of the validation`,t))}wrapPreparationException(e,t,n){return async(r,i,a,o)=>{await this.handleException(()=>e.call(n,r,i,a,o),t,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},NM=Object.freeze({validateNode:!0,validateChildren:!0}),PM=class{static{o(this,`DefaultDocumentValidator`)}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},n=Z.CancellationToken.None){let r=e.parseResult,i=[];if(await Q(n),(!t.categories||t.categories.includes(`built-in`))&&(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===RM.LexingError)||(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===RM.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===RM.LinkingError))))return i;try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(Kj(e))throw e;console.error(`An error occurred during validation:`,e)}return await Q(n),i}processLexingErrors(e,t,n){let r=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let e of r){let n=e.severity??`error`,r={severity:IM(n),range:{start:{line:e.line-1,character:e.column-1},end:{line:e.line-1,character:e.column+e.length-1}},message:e.message,data:LM(n),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,n){for(let n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if(`previousToken`in n){let t=n.previousToken;if(isNaN(t.startOffset)){let t={line:0,character:0};e={start:t,end:t}}else{let n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=Bi(n.token);if(e){let r={severity:IM(`error`),range:e,message:n.message,data:AM(RM.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,n){for(let n of e.references){let e=n.error;if(e){let r={node:e.info.container,range:n.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:RM.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic(`error`,e.message,r))}}}async validateAst(e,t,n=Z.CancellationToken.None){let r=[],i=o((e,t,n)=>{r.push(this.toDiagnostic(e,t,n))},`acceptor`);return await this.validateAstBefore(e,t,i,n),await this.validateAstNodes(e,t,i,n),await this.validateAstAfter(e,t,i,n),r}async validateAstBefore(e,t,n,r=Z.CancellationToken.None){let i=this.validationRegistry.checksBefore;for(let a of i)await Q(r),await a(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=Z.CancellationToken.None){if(this.profiler?.isActive(`validating`)){let i=this.profiler.createTask(`validating`,this.languageId);i.start();try{let a=Nn(e).iterator();for(let e of a){i.startSubTask(e.$type);let o=this.validateSingleNodeOptions(e,t);if(o.validateNode)try{let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}finally{i.stopSubTask(e.$type)}o.validateChildren||a.prune()}}finally{i.stop()}}else{let i=Nn(e).iterator();for(let e of i){await Q(r);let a=this.validateSingleNodeOptions(e,t);if(a.validateNode){let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}a.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return NM}async validateAstAfter(e,t,n,r=Z.CancellationToken.None){let i=this.validationRegistry.checksAfter;for(let a of i)await Q(r),await a(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:FM(n),severity:IM(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function FM(e){if(e.range)return e.range;let t;return typeof e.property==`string`?t=Ba(e.node.$cstNode,e.property,e.index):typeof e.keyword==`string`&&(t=Ua(e.node.$cstNode,e.keyword,e.index)),t??=e.node.$cstNode,t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}o(FM,`getDiagnosticRange`);function IM(e){switch(e){case`error`:return 1;case`warning`:return 2;case`info`:return 3;case`hint`:return 4;default:throw Error(`Invalid diagnostic severity: `+e)}}o(IM,`toDiagnosticSeverity`);function LM(e){switch(e){case`error`:return AM(RM.LexingError);case`warning`:return AM(RM.LexingWarning);case`info`:return AM(RM.LexingInfo);case`hint`:return AM(RM.LexingHint);default:throw Error(`Invalid diagnostic severity: `+e)}}o(LM,`toDiagnosticData`);var RM;(function(e){e.LexingError=`lexing-error`,e.LexingWarning=`lexing-warning`,e.LexingInfo=`lexing-info`,e.LexingHint=`lexing-hint`,e.ParsingError=`parsing-error`,e.LinkingError=`linking-error`})(RM||={});var zM=class{static{o(this,`DefaultAstNodeDescriptionProvider`)}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){let r=n??On(e);t??=this.nameProvider.getName(e);let i=this.astNodeLocator.getAstNodePath(e);if(!t)throw Error(`Node at path ${i} has no name.`);let a,s=o(()=>a??=Vi(this.nameProvider.getNameNode(e)??e.$cstNode),`nameSegmentGetter`);return{node:e,name:t,get nameSegment(){return s()},selectionSegment:Vi(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},BM=class{static{o(this,`DefaultReferenceDescriptionProvider`)}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Z.CancellationToken.None){let n=[],r=e.parseResult.value;for(let e of Nn(r))await Q(t),Fn(e).forEach(e=>{e.reference.error||n.push(...this.createInfoDescriptions(e))});return n}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let n=[];ln(t)&&t.$nodeDescription?n=[t.$nodeDescription]:un(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>e!==void 0));let r=On(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),a=[],o=Vi(t.$refNode);for(let e of n)a.push({sourceUri:r,sourcePath:i,targetUri:e.documentUri,targetPath:e.path,segment:o,local:iM.equals(e.documentUri,r)});return a}},VM=class{static{o(this,`DefaultAstNodeLocator`)}constructor(){this.segmentSeparator=`/`,this.indexSeparator=`@`}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return``}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw Error(`Missing '$containerProperty' in AST node.`);return t===void 0?e:e+this.indexSeparator+t}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||t.length===0)return e;let n=t.indexOf(this.indexSeparator);if(n>0){let r=t.substring(0,n),i=parseInt(t.substring(n+1));return e[r]?.[i]}return e[t]},e)}},HM={};d(HM,f(yt(),1));var UM=class{static{o(this,`DefaultConfigurationProvider`)}constructor(e){this._ready=new qj,this.onConfigurationSectionUpdateEmitter=new HM.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,n[t])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!=`object`||e.settings===null||Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},WM=f(on(),1),GM;(function(e){function t(e){return{dispose:o(async()=>await e(),`dispose`)}}o(t,`create`),e.create=t})(GM||={});var KM=class{static{o(this,`DefaultDocumentBuilder`)}constructor(e){this.updateBuildOptions={validation:{categories:[`built-in`,`fast`]}},this.updateListeners=[],this.buildPhaseListeners=new pM,this.documentPhaseListeners=new pM,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=$.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=Z.CancellationToken.None){for(let n of e){let e=n.uri.toString();if(n.state===$.Validated){if(typeof t.validation==`boolean`&&t.validation)this.resetToState(n,$.IndexedReferences);else if(typeof t.validation==`object`){let r=this.findMissingValidationCategories(n,t);r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:r}},result:this.buildState.get(e)?.result}),n.state=$.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=$.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=Z.CancellationToken.None){this.currentState=$.Changed;let r=[];for(let e of t){let t=this.langiumDocuments.deleteDocuments(e);for(let e of t)r.push(e.uri),this.cleanUpDeleted(e)}let i=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(let e of i){let t=this.langiumDocuments.getDocument(e);t===void 0&&(t=this.langiumDocumentFactory.fromModel({$type:`INVALID`},e),t.state=$.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,$.Changed)}let a=M(i).concat(r).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!a.has(e.uri.toString())&&this.shouldRelink(e,a)).forEach(e=>this.resetToState(e,$.ComputedScopes)),await this.emitUpdate(i,r),await Q(n);let o=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<$.Validated||!this.buildState.get(e.uri.toString())?.completed||this.resultsAreIncomplete(e,this.updateBuildOptions)).toArray());await this.buildDocuments(o,this.updateBuildOptions,n)}resultsAreIncomplete(e,t){return this.findMissingValidationCategories(e,t).length>=1}findMissingValidationCategories(e,t){let n=this.buildState.get(e.uri.toString()),r=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?r:new Set;return M(t===void 0||t.validation===!0?r:typeof t.validation==`object`?t.validation.categories??r:[]).filter(e=>!i.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let t=await this.fileSystemProvider.stat(e);if(t.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(n=>n(e,t)))}sortDocuments(e){let t=0,n=e.length-1;for(;t<n;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;n>=0&&!this.hasTextDocument(e[n]);)n--;t<n&&([e[t],e[n]]=[e[n],e[t]])}return e}hasTextDocument(e){return!!this.textDocuments?.get(e.uri)}shouldRelink(e,t){return e.references.some(e=>e.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),GM.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case $.Changed:case $.Parsed:this.indexManager.removeContent(e.uri);case $.IndexedContent:e.localSymbols=void 0;case $.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case $.Linked:this.indexManager.removeReferences(e.uri);case $.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case $.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=$.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,$.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,$.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,$.ComputedScopes,n,async e=>{e.localSymbols=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectLocalSymbols(e,n)});let r=e.filter(e=>this.shouldLink(e));await this.runCancelable(r,$.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,$.IndexedReferences,n,e=>this.indexManager.updateReferences(e,n));let i=e.filter(e=>this.shouldValidate(e)?!0:(this.markAsCompleted(e),!1));await this.runCancelable(i,$.Validated,n,async e=>{await this.validate(e,n),this.markAsCompleted(e)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(let n of e){let e=n.uri.toString(),r=this.buildState.get(e);(!r||r.completed)&&this.buildState.set(e,{completed:!1,options:t,result:r?.result})}}async runCancelable(e,t,n,r){for(let i of e)i.state<t&&(await Q(n),await r(i),i.state=t,await this.notifyDocumentPhase(i,t,n));let i=e.filter(e=>e.state===t);await this.notifyBuildPhase(i,t,n),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),GM.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),GM.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&`path`in t?r=t:n=t,n??=Z.CancellationToken.None,r?this.awaitDocumentState(e,r,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,t,n){let r=this.langiumDocuments.getDocument(t);return r?r.state>=e?Promise.resolve(t):n.isCancellationRequested?Promise.reject(Gj):this.currentState>=e&&e>r.state?Promise.reject(new WM.ResponseError(WM.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${$[r.state]}, requiring ${$[e]}, but workspace state is already ${$[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{let a=this.onDocumentPhase(e,e=>{iM.equals(e.uri,t)&&(a.dispose(),o.dispose(),r(e.uri))}),o=n.onCancellationRequested(()=>{a.dispose(),o.dispose(),i(Gj)})}):Promise.reject(new WM.ResponseError(WM.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Gj):new Promise((n,r)=>{let i=this.onBuildPhase(e,()=>{i.dispose(),a.dispose(),n()}),a=t.onCancellationRequested(()=>{i.dispose(),a.dispose(),r(Gj)})})}async notifyDocumentPhase(e,t,n){let r=this.documentPhaseListeners.get(t).slice();for(let t of r)try{await Q(n),await t(e,n)}catch(e){if(!Kj(e))throw e}}async notifyBuildPhase(e,t,n){if(e.length===0)return;let r=this.buildPhaseListeners.get(t).slice();for(let t of r)await Q(n),await t(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){let n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,r=this.getBuildOptions(e),i=typeof r.validation==`object`?{...r.validation}:{};i.categories=this.findMissingValidationCategories(e,r);let a=await n.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;let o=this.buildState.get(e.uri.toString());o&&(o.result??={},o.result.validationChecks?o.result.validationChecks=M(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},qM=class{static{o(this,`DefaultIndexManager`)}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new SM,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let n=On(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{iM.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),M(r)}allElements(e,t){let n=M(this.symbolIndex.keys());return t&&(n=n.filter(e=>!t||t.has(e))),n.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=Z.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),r=e.uri.toString();this.symbolIndex.set(r,n),this.symbolByTypeIndex.clear(r)}async updateReferences(e,t=Z.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(e=>!e.local&&t.has(e.targetUri.toString())):!1}},JM=class{static{o(this,`DefaultWorkspaceManager`)}constructor(e){this.initialBuildOptions={},this._ready=new qj,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=Z.CancellationToken.None){let n=await this.performStartup(e);await Q(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){let t=[],n=o(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},`collector`);await this.loadAdditionalDocuments(e,n);let r=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,r)));let i=M(r).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{t(await this.langiumDocuments.getOrCreateDocument(e))}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return nM.parse(e.uri)}async traverseFolder(e,t){try{let n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(t){console.error(`Failure to read directory content of `+e.toString(!0),t)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=iM.basename(e.uri);return t.startsWith(`.`)?!1:e.isDirectory?t!==`node_modules`&&t!==`out`:e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},YM=class{static{o(this,`DefaultLexerErrorMessageProvider`)}buildUnexpectedCharactersMessage(e,t,n,r,i){return Vy.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return Vy.buildUnableToPopLexerModeMessage(e)}},XM={mode:`full`},ZM=class{static{o(this,`DefaultLexer`)}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);let n=eN(t)?Object.values(t):t,r=e.LanguageMetaData.mode===`production`;this.chevrotainLexer=new Uy(n,{positionTracking:`full`,skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=XM){let n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(eN(e))return e;let t=$M(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}};function QM(e){return Array.isArray(e)&&(e.length===0||`name`in e[0])}o(QM,`isTokenTypeArray`);function $M(e){return e&&`modes`in e&&`defaultMode`in e}o($M,`isIMultiModeLexerDefinition`);function eN(e){return!QM(e)&&!$M(e)}o(eN,`isTokenTypeDictionary`),gt();function tN(e,t,n){let r,i;typeof e==`string`?(i=t,r=n):(i=e.range.start,r=t),i||=y.create(0,0);let a=rN(e),o=yN(r);return fN({index:0,tokens:oN({lines:a,position:i,options:o}),position:i})}o(tN,`parseJSDoc`);function nN(e,t){let n=yN(t),r=rN(e);if(r.length===0)return!1;let i=r[0],a=r[r.length-1],o=n.start,s=n.end;return!!o?.exec(i)&&!!s?.exec(a)}o(nN,`isJSDoc`);function rN(e){let t=``;return t=typeof e==`string`?e:e.text,t.split(Sa)}o(rN,`getLines`);var iN=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,aN=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function oN(e){let t=[],n=e.position.line,r=e.position.character;for(let i=0;i<e.lines.length;i++){let a=i===0,o=i===e.lines.length-1,s=e.lines[i],c=0;if(a&&e.options.start){let t=e.options.start?.exec(s);t&&(c=t.index+t[0].length)}else{let t=e.options.line?.exec(s);t&&(c=t.index+t[0].length)}if(o){let t=e.options.end?.exec(s);t&&(s=s.substring(0,t.index))}if(s=s.substring(0,dN(s)),uN(s,c)>=s.length){if(t.length>0){let e=y.create(n,r);t.push({type:`break`,content:``,range:b.create(e,e)})}}else{iN.lastIndex=c;let e=iN.exec(s);if(e){let i=e[0],a=e[1],o=y.create(n,r+c),l=y.create(n,r+c+i.length);t.push({type:`tag`,content:a,range:b.create(o,l)}),c+=i.length,c=uN(s,c)}if(c<s.length){let e=s.substring(c),i=Array.from(e.matchAll(aN));t.push(...sN(i,e,n,r+c))}}n++,r=0}return t.length>0&&t[t.length-1].type===`break`?t.slice(0,-1):t}o(oN,`tokenize`);function sN(e,t,n,r){let i=[];if(e.length===0){let e=y.create(n,r),a=y.create(n,r+t.length);i.push({type:`text`,content:t,range:b.create(e,a)})}else{let a=0;for(let o of e){let e=o.index,s=t.substring(a,e);s.length>0&&i.push({type:`text`,content:t.substring(a,e),range:b.create(y.create(n,a+r),y.create(n,e+r))});let c=s.length+1,l=o[1];if(i.push({type:`inline-tag`,content:l,range:b.create(y.create(n,a+c+r),y.create(n,a+c+l.length+r))}),c+=l.length,o.length===4){c+=o[2].length;let e=o[3];i.push({type:`text`,content:e,range:b.create(y.create(n,a+c+r),y.create(n,a+c+e.length+r))})}else i.push({type:`text`,content:``,range:b.create(y.create(n,a+c+r),y.create(n,a+c+r))});a=e+o[0].length}let o=t.substring(a);o.length>0&&i.push({type:`text`,content:o,range:b.create(y.create(n,a+r),y.create(n,a+r+o.length))})}return i}o(sN,`buildInlineTokens`);var cN=/\S/,lN=/\s*$/;function uN(e,t){let n=e.substring(t).match(cN);return n?t+n.index:e.length}o(uN,`skipWhitespace`);function dN(e){let t=e.match(lN);if(t&&typeof t.index==`number`)return t.index}o(dN,`lastCharacter`);function fN(e){let t=y.create(e.position.line,e.position.character);if(e.tokens.length===0)return new xN([],b.create(t,t));let n=[];for(;e.index<e.tokens.length;){let t=pN(e,n[n.length-1]);t&&n.push(t)}let r=n[0]?.range.start??t,i=n[n.length-1]?.range.end??t;return new xN(n,b.create(r,i))}o(fN,`parseJSDocComment`);function pN(e,t){let n=e.tokens[e.index];if(n.type===`tag`)return _N(e,!1);if(n.type===`text`||n.type===`inline-tag`)return hN(e);mN(n,t),e.index++}o(pN,`parseJSDocElement`);function mN(e,t){if(t){let n=new EN(``,e.range);`inlines`in t?t.inlines.push(n):t.content.inlines.push(n)}}o(mN,`appendEmptyLine`);function hN(e){let t=e.tokens[e.index],n=t,r=t,i=[];for(;t&&t.type!==`break`&&t.type!==`tag`;)i.push(gN(e)),r=t,t=e.tokens[e.index];return new TN(i,b.create(n.range.start,r.range.end))}o(hN,`parseJSDocText`);function gN(e){return e.tokens[e.index].type===`inline-tag`?_N(e,!0):vN(e)}o(gN,`parseJSDocInline`);function _N(e,t){let n=e.tokens[e.index++],r=n.content.substring(1);if(e.tokens[e.index]?.type===`text`)if(t){let i=vN(e);return new SN(r,new TN([i],i.range),t,b.create(n.range.start,i.range.end))}else{let i=hN(e);return new SN(r,i,t,b.create(n.range.start,i.range.end))}else{let e=n.range;return new SN(r,new TN([],e),t,e)}}o(_N,`parseJSDocTag`);function vN(e){let t=e.tokens[e.index++];return new EN(t.content,t.range)}o(vN,`parseJSDocLine`);function yN(e){if(!e)return yN({start:`/**`,end:`*/`,line:`*`});let{start:t,end:n,line:r}=e;return{start:bN(t,!0),end:bN(n,!1),line:bN(r,!0)}}o(yN,`normalizeOptions`);function bN(e,t){if(typeof e==`string`||typeof e==`object`){let n=typeof e==`string`?ka(e):e.source;return RegExp(t?`^\\s*${n}`:`\\s*${n}\\s*$`)}else return e}o(bN,`normalizeOption`);var xN=class{static{o(this,`JSDocCommentImpl`)}constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>`name`in e)}toString(){let e=``;for(let t of this.elements)if(e.length===0)e=t.toString();else{let n=t.toString();e+=DN(e)+n}return e.trim()}toMarkdown(e){let t=``;for(let n of this.elements)if(t.length===0)t=n.toMarkdown(e);else{let r=n.toMarkdown(e);t+=DN(t)+r}return t.trim()}},SN=class{static{o(this,`JSDocTagImpl`)}constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`,t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}
|
|
149
|
+
`;case`r`:return`\r`;case`t`:return` `;case`v`:return`\v`;case`0`:return`\0`;default:return e}}o(n,`convertEscapeCharacter`);function r(e){return e.charAt(0)===`^`?e.substring(1):e}o(r,`convertID`),e.convertID=r;function i(e){return parseInt(e)}o(i,`convertInt`),e.convertInt=i;function a(e){return BigInt(e)}o(a,`convertBigint`),e.convertBigint=a;function s(e){return new Date(e)}o(s,`convertDate`),e.convertDate=s;function c(e){return Number(e)}o(c,`convertNumber`),e.convertNumber=c;function l(e){return e.toLowerCase()===`true`}o(l,`convertBoolean`),e.convertBoolean=l})(zj||={});var Z={};d(Z,f(bt(),1));function Bj(){return new Promise(e=>{typeof setImmediate>`u`?setTimeout(e,0):setImmediate(e)})}o(Bj,`delayNextTick`);var Vj=0,Hj=10;function Uj(){return Vj=performance.now(),new Z.CancellationTokenSource}o(Uj,`startCancelableOperation`);function Wj(e){Hj=e}o(Wj,`setInterruptionPeriod`);var Gj=Symbol(`OperationCancelled`);function Kj(e){return e===Gj}o(Kj,`isOperationCancelled`);async function Q(e){if(e===Z.CancellationToken.None)return;let t=performance.now();if(t-Vj>=Hj&&(Vj=t,await Bj(),Vj=performance.now()),e.isCancellationRequested)throw Gj}o(Q,`interruptAndCheck`);var qj=class{static{o(this,`Deferred`)}constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},Jj=class e{static{o(this,`FullTextDocument`)}constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(t,n){for(let n of t)if(e.isIncremental(n)){let e=$j(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);let i=Math.max(e.start.line,0),a=Math.max(e.end.line,0),o=this._lineOffsets,s=Zj(n.text,!1,t);if(a-i===s.length)for(let e=0,t=s.length;e<t;e++)o[e+i+1]=s[e];else s.length<1e4?o.splice(i+1,a-i,...s):this._lineOffsets=o=o.slice(0,i+1).concat(s,o.slice(a+1));let c=n.text.length-(r-t);if(c!==0)for(let e=i+1+s.length,t=o.length;e<t;e++)o[e]=o[e]+c}else if(e.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw Error(`Unknown change event received`);this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Zj(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return{line:0,character:e};for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return e=this.ensureBeforeEOL(e,t[i]),{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line];if(e.character<=0)return n;let r=e.line+1<t.length?t[e.line+1]:this._content.length,i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,t){for(;e>t&&Qj(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}static isFull(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}},Yj;(function(e){function t(e,t,n,r){return new Jj(e,t,n,r)}o(t,`create`),e.create=t;function n(e,t,n){if(e instanceof Jj)return e.update(t,n),e;throw Error(`TextDocument.update: document must be created by TextDocument.create`)}o(n,`update`),e.update=n;function r(e,t){let n=e.getText(),r=Xj(t.map(eM),(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),i=0,a=[];for(let t of r){let r=e.offsetAt(t.range.start);if(r<i)throw Error(`Overlapping edit`);r>i&&a.push(n.substring(i,r)),t.newText.length&&a.push(t.newText),i=e.offsetAt(t.range.end)}return a.push(n.substr(i)),a.join(``)}o(r,`applyEdits`),e.applyEdits=r})(Yj||={});function Xj(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Xj(r,t),Xj(i,t);let a=0,o=0,s=0;for(;a<r.length&&o<i.length;)t(r[a],i[o])<=0?e[s++]=r[a++]:e[s++]=i[o++];for(;a<r.length;)e[s++]=r[a++];for(;o<i.length;)e[s++]=i[o++];return e}o(Xj,`mergeSort`);function Zj(e,t,n=0){let r=t?[n]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);Qj(i)&&(i===13&&t+1<e.length&&e.charCodeAt(t+1)===10&&t++,r.push(n+t+1))}return r}o(Zj,`computeLineOffsets`);function Qj(e){return e===13||e===10}o(Qj,`isEOL`);function $j(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}o($j,`getWellformedRange`);function eM(e){let t=$j(e.range);return t===e.range?e:{newText:e.newText,range:t}}o(eM,`getWellformedEdit`);var tM;(()=>{var e={975:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}o(t,`e`);function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}o(n,`r`);var r={resolve:o(function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},`resolve`),normalize:o(function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},`normalize`),isAbsolute:o(function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},`isAbsolute`),join:o(function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},`join`),relative:o(function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},`relative`),_makeLong:o(function(e){return e},`_makeLong`),dirname:o(function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},`dirname`),basename:o(function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},`basename`),extname:o(function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},`extname`),format:o(function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return(function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r})(0,e)},`format`),parse:o(function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},`parse`),sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}o(n,`r`),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:o(()=>d,`URI`),Utils:o(()=>te,`Utils`)}),typeof process==`object`?i=process.platform===`win32`:typeof navigator==`object`&&(i=navigator.userAgent.indexOf(`Windows`)>=0);let a=/^\w[\w\d+.-]*$/,s=/^\//,c=/^\/\//;function l(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!a.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!s.test(e.path))throw 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(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}o(l,`a`);let u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static{o(this,`l`)}static isUri(e){return e instanceof d||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=(function(e,t){return e||t?e:`file`})(e,a),this.authority=t||``,this.path=(function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t})(this.scheme,n||``),this.query=r||``,this.fragment=i||``,l(this,a))}get fsPath(){return _(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new p(t,n,r,i,a)}static parse(e,t=!1){let n=u.exec(e);return n?new p(n[2]||``,x(n[4]||``),x(n[5]||``),x(n[7]||``),x(n[9]||``),t):new p(``,``,``,``,``)}static file(e){let t=``;if(i&&(e=e.replace(/\\/g,`/`)),e[0]===`/`&&e[1]===`/`){let n=e.indexOf(`/`,2);n===-1?(t=e.substring(2),e=`/`):(t=e.substring(2,n),e=e.substring(n)||`/`)}return new p(`file`,t,e,``,``)}static from(e){let t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{let t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}let f=i?1:void 0;class p extends d{static{o(this,`d`)}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=_(this,!1),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||=v(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let m={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 h(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=m[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}o(h,`m`);function g(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=m[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}o(g,`y`);function _(e,t){let n;return n=e.authority&&e.path.length>1&&e.scheme===`file`?`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(n=n.replace(/\//g,`\\`)),n}o(_,`v`);function v(e,t){let n=t?g:h,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:h(c,!1,!1)),r}o(v,`b`);function y(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}o(y,`C`);let b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(e){return e.match(b)?e.replace(b,(e=>y(e))):e}o(x,`w`);var ee=n(975);let S=ee.posix||ee;var te;(function(e){e.joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=S.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=S.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return S.basename(e.path)},e.extname=function(e){return S.extname(e.path)}})(te||={}),tM=r})();var{URI:nM,Utils:rM}=tM,iM;(function(e){e.basename=rM.basename,e.dirname=rM.dirname,e.extname=rM.extname,e.joinPath=rM.joinPath,e.resolvePath=rM.resolvePath;let t=typeof process==`object`&&process?.platform===`win32`;function n(e,t){return e?.toString()===t?.toString()}o(n,`equals`),e.equals=n;function r(e,n){let r=typeof e==`string`?nM.parse(e).path:e.path,i=typeof n==`string`?nM.parse(n).path:n.path,a=r.split(`/`).filter(e=>e.length>0),o=i.split(`/`).filter(e=>e.length>0);if(t){let e=/^[A-Z]:$/;if(a[0]&&e.test(a[0])&&(a[0]=a[0].toLowerCase()),o[0]&&e.test(o[0])&&(o[0]=o[0].toLowerCase()),a[0]!==o[0])return i.substring(1)}let s=0;for(;s<a.length&&a[s]===o[s];s++);return`../`.repeat(a.length-s)+o.slice(s).join(`/`)}o(r,`relative`),e.relative=r;function i(e){return nM.parse(e.toString()).toString()}o(i,`normalize`),e.normalize=i;function a(e,t){let n=typeof e==`string`?e:e.path,r=typeof t==`string`?t:t.path;return r.charAt(r.length-1)===`/`&&(r=r.slice(0,-1)),n.charAt(n.length-1)===`/`&&(n=n.slice(0,-1)),r===n?!0:r.length<n.length||r.charAt(n.length)!==`/`?!1:r.startsWith(n)}o(a,`contains`),e.contains=a})(iM||={});var aM=class{static{o(this,`UriTrie`)}constructor(){this.root={name:``,children:new Map}}normalizeUri(e){return iM.normalize(e)}clear(){this.root.children.clear()}insert(e,t){let n=this.getNode(this.normalizeUri(e),!0);n.element=t}delete(e){let t=this.getNode(this.normalizeUri(e),!1);t?.parent&&t.parent.children.delete(t.name)}has(e){return this.getNode(this.normalizeUri(e),!1)?.element!==void 0}hasNode(e){return this.getNode(this.normalizeUri(e),!1)!==void 0}find(e){return this.getNode(this.normalizeUri(e),!1)?.element}findNode(e){let t=this.normalizeUri(e),n=this.getNode(t,!1);if(n)return{name:n.name,uri:iM.joinPath(nM.parse(t),n.name).toString(),element:n.element}}findChildren(e){let t=this.normalizeUri(e),n=this.getNode(t,!1);return n?Array.from(n.children.values()).map(e=>({name:e.name,uri:iM.joinPath(nM.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(iM.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let n=e.split(`/`);e.charAt(e.length-1)===`/`&&n.pop();let r=this.root;for(let e of n){let n=r.children.get(e);if(!n)if(t)n={name:e,children:new Map,parent:r},r.children.set(e,n);else return;r=n}return r}collectValues(e){let t=[];e.element&&t.push(e.element);for(let n of e.children.values())t.push(...this.collectValues(n));return t}},$;(function(e){e[e.Changed=0]=`Changed`,e[e.Parsed=1]=`Parsed`,e[e.IndexedContent=2]=`IndexedContent`,e[e.ComputedScopes=3]=`ComputedScopes`,e[e.Linked=4]=`Linked`,e[e.IndexedReferences=5]=`IndexedReferences`,e[e.Validated=6]=`Validated`})($||={});var oM=class{static{o(this,`DefaultLangiumDocumentFactory`)}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Z.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){return t??=nM.parse(e.uri),Z.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return Z.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,n){if(typeof t==`string`){let r=this.parse(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}else if(`$model`in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let r=this.parse(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}async createAsync(e,t,n){if(typeof t==`string`){let r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}else{let r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n)i={parseResult:e,uri:t,state:$.Parsed,references:[],textDocument:n};else{let n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:$.Parsed,references:[],get textDocument(){return n()}}}return e.value.$document=i,i}async update(e,t){let n=e.parseResult.value.$cstNode?.root.fullText,r=this.textDocuments?.get(e.uri.toString()),i=r?r.getText():await this.fileSystemProvider.readFile(e.uri);if(r)Object.defineProperty(e,"textDocument",{value:r});else{let t=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:t})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=$.Parsed,e}parse(e,t,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,n)}parseAsync(e,t,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){let n=this.serviceRegistry,r;return()=>r??=Yj.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??``)}},sM=class{static{o(this,`DefaultLangiumDocuments`)}constructor(e){this.documentTrie=new aM,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return M(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then(e=>(this.addDocument(e),e));{let n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&this.documentBuilder().resetToState(n,$.Changed),n}deleteDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=$.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){let t=e.toString(),n=this.documentTrie.findAll(t);for(let e of n)e.state=$.Changed;return this.documentTrie.delete(t),n}},cM=Symbol(`RefResolving`),lM=class{static{o(this,`DefaultLinker`)}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=Z.CancellationToken.None){if(this.profiler?.isActive(`linking`)){let n=this.profiler.createTask(`linking`,this.languageId);n.start();try{for(let r of Nn(e.parseResult.value))await Q(t),Fn(r).forEach(t=>{let i=`${r.$type}:${t.property}`;n.startSubTask(i);try{this.doLink(t,e)}finally{n.stopSubTask(i)}})}finally{n.stop()}}else for(let n of Nn(e.parseResult.value))await Q(t),Fn(n).forEach(t=>this.doLink(t,e))}doLink(e,t){let n=e.reference;if(`_ref`in n&&n._ref===void 0){n._ref=cM;try{let t=this.getCandidate(e);fn(t)?n._ref=t:(n._nodeDescription=t,n._ref=this.loadAstNode(t)??this.createLinkingError(e,t))}catch(t){console.error(`An error occurred while resolving reference to '${n.$refText}':`,t);let r=t.message??String(t);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`}}t.references.push(n)}else if(`_items`in n&&n._items===void 0){n._items=cM;try{let t=this.getCandidates(e),r=[];if(fn(t))n._linkingError=t;else for(let e of t){let t=this.loadAstNode(e);t&&r.push({ref:t,$nodeDescription:e})}n._items=r}catch(t){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${t}`},n._items=[]}t.references.push(n)}}unlink(e){for(let t of e.references)`_ref`in t?(t._ref=void 0,delete t._nodeDescription):`_items`in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,n,r){let i=this,a={$refNode:n,$refText:r,_ref:void 0,get ref(){if(j(this._ref))return this._ref;if(dn(this._nodeDescription)){let n=i.loadAstNode(this._nodeDescription);this._ref=n??i.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){this._ref=cM;let n=kn(e).$document,r=i.getLinkedNode({reference:a,container:e,property:t});if(r.error&&n&&n.state<$.ComputedScopes){this._ref=void 0;return}this._ref=r.node??r.error,this._nodeDescription=r.descr,n?.references.push(this)}else this._ref===cM&&i.throwCyclicReferenceError(e,t,r);return j(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return fn(this._ref)?this._ref:void 0}};return a}buildMultiReference(e,t,n,r){let i=this,a={$refNode:n,$refText:r,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(this._items===void 0){this._items=cM;let n=kn(e).$document,r=i.getCandidates({reference:a,container:e,property:t}),o=[];if(fn(r))this._linkingError=r;else for(let e of r){let t=i.loadAstNode(e);t&&o.push({ref:t,$nodeDescription:e})}this._items=o,n?.references.push(this)}else this._items===cM&&i.throwCyclicReferenceError(e,t,r);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:a,container:e,property:t})}};return a}throwCyclicReferenceError(e,t,n){throw Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${n}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(fn(t))return{error:t};let n=this.loadAstNode(t);return n?{node:n,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let n=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let n=kn(e.container).$document;return n&&n.state<$.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`),{info:e,message:`Could not resolve reference to ${this.reflection.getReferenceType(e)} named '${e.reference.$refText}'.`,targetDescription:t}}};function uM(e){return typeof e.name==`string`}o(uM,`isNamed`);var dM=class{static{o(this,`DefaultNameProvider`)}getName(e){if(uM(e))return e.name}getNameNode(e){return Ba(e.$cstNode,`name`)}},fM=class{static{o(this,`DefaultReferences`)}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=Nn(e.Grammar).some(e=>mr(e)&&e.isMulti)}findDeclarations(e){if(e){let t=Ga(e),n=e.astNode;if(t&&n){let r=n[t.feature];if(ln(r)||un(r))return An(r);if(Array.isArray(r)){for(let t of r)if((ln(t)||un(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return An(t)}}if(n){let t=this.nameProvider.getNameNode(n);if(t&&(t===e||zi(e,t)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(t.head());if(n){for(let t of Fn(n))if(un(t.reference)&&t.reference.items.some(t=>t.ref===e))return t.reference.items.map(e=>e.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let t=this.findDeclarations(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e)??e.$cstNode;t&&n.push(t)}return n}findReferences(e,t){let n=[];t.includeDeclaration&&n.push(...this.getSelfReferences(e));let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter(e=>iM.equals(e.sourceUri,t.documentUri))),n.push(...r),M(n)}getSelfReferences(e){let t=this.getSelfNodes(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e);if(t){let r=On(e),i=this.nodeLocator.getAstNodePath(e);n.push({sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:Vi(t),local:!0})}}return n}},pM=class{static{o(this,`MultiMap`)}constructor(e){if(this.map=new Map,e)for(let[t,n]of e)this.add(t,n)}get size(){return Cn.sum(M(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let r=n.indexOf(t);if(r>=0)return n.length===1?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?M(t):bn}has(e,t){if(t===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,n)=>t.forEach(t=>e(t,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return M(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return M(this.map.keys())}values(){return M(this.map.values()).flat()}entriesGroupedByKey(){return M(this.map.entries())}},mM=class{static{o(this,`BiMap`)}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);return t===void 0?!1:(this.map.delete(e),this.inverse.delete(t),!0)}},hM=class{static{o(this,`DefaultScopeComputation`)}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=Z.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=jn,r=Z.CancellationToken.None){let i=[];this.addExportedSymbol(e,i,t);for(let a of n(e))await Q(r),this.addExportedSymbol(a,i,t);return i}addExportedSymbol(e,t,n){let r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async collectLocalSymbols(e,t=Z.CancellationToken.None){let n=e.parseResult.value,r=new pM;for(let i of Mn(n))await Q(t),this.addLocalSymbol(i,e,r);return r}addLocalSymbol(e,t,n){let r=e.$container;if(r){let i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}},gM=class{static{o(this,`StreamScope`)}constructor(e,t,n){this.elements=e,this.outerScope=t,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}},_M=class{static{o(this,`MapScope`)}constructor(e,t,n){this.elements=new Map,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.set(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t),r=n?[n]:[];return(this.concatOuterScope||r.length>0)&&this.outerScope?M(r).concat(this.outerScope.getElements(e)):M(r)}getAllElements(){let e=M(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},vM=class{static{o(this,`MultiMapScope`)}constructor(e,t,n){this.elements=new pM,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.add(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t)[0];if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);return(this.concatOuterScope||n.length===0)&&this.outerScope?M(n).concat(this.outerScope.getElements(e)):M(n)}getAllElements(){let e=M(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},yM={getElement(){},getElements(){return bn},getAllElements(){return bn}},bM=class{static{o(this,`DisposableCache`)}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw Error(`This cache has already been disposed`)}},xM=class extends bM{static{o(this,`SimpleCache`)}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){let n=t();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},SM=class extends bM{static{o(this,`ContextCache`)}constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();let r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){let e=n();return r.set(t,e),e}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}},CM=class extends SM{static{o(this,`DocumentCache`)}constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(let e of t)this.clear(e)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{let n=e.concat(t);for(let e of n)this.clear(e)}))}},wM=class extends xM{static{o(this,`WorkspaceCache`)}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},TM=class{static{o(this,`DefaultScopeProvider`)}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new wM(e.shared)}getScope(e){let t=[],n=this.reflection.getReferenceType(e),r=On(e.container).localSymbols;if(r){let i=e.container;do r.has(i)&&t.push(r.getStream(i).filter(e=>this.reflection.isSubtype(e.type,n))),i=i.$container;while(i)}let i=this.getGlobalScope(n,e);for(let e=t.length-1;e>=0;e--)i=this.createScope(t[e],i);return i}createScope(e,t,n){return new gM(M(e),t,n)}createScopeForNodes(e,t,n){return new gM(M(e).map(e=>{let t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new vM(this.indexManager.allElements(e)))}};function EM(e){return typeof e.$comment==`string`}o(EM,`isAstNodeWithComment`);function DM(e){return typeof e==`object`&&!!e&&(`$ref`in e||`$error`in e)}o(DM,`isIntermediateReference`);var OM=class{static{o(this,`DefaultJsonSerializer`)}constructor(e){this.ignoreProperties=new Set([`$container`,`$containerProperty`,`$containerIndex`,`$document`,`$cstNode`]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let n=t??{},r=t?.replacer,i=o((e,t)=>this.replacer(e,t,n),`defaultReplacer`),a=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=On(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let n=t??{},r=JSON.parse(e);return this.linkNode(r,r,n),r}replacer(e,t,{refText:n,sourceText:r,textRegions:i,comments:a,uriConverter:o}){if(!this.ignoreProperties.has(e))if(ln(t)){let e=t.ref,r=n?t.$refText:void 0;if(e){let t=On(e),n=``;this.currentDocument&&this.currentDocument!==t&&(n=o?o(t.uri,e):t.uri.toString());let i=this.astNodeLocator.getAstNodePath(e);return{$ref:`${n}#${i}`,$refText:r}}else return{$error:t.error?.message??`Could not resolve reference`,$refText:r}}else if(un(t)){let e=n?t.$refText:void 0,r=[];for(let e of t.items){let t=e.ref,n=On(e.ref),i=``;this.currentDocument&&this.currentDocument!==n&&(i=o?o(n.uri,t):n.uri.toString());let a=this.astNodeLocator.getAstNodePath(t);r.push(`${i}#${a}`)}return{$refs:r,$refText:e}}else if(j(t)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&n?.$textRegion&&(n.$textRegion.documentURI=this.currentDocument?.uri.toString())),r&&!e&&(n??={...t},n.$sourceText=t.$cstNode?.text),a){n??={...t};let e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,``))}return n??t}else return t}addAstNodeRegionWithAssignmentsTo(e){let t=o(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),`createDocumentSegment`);if(e.$cstNode){let n=e.$textRegion=t(e.$cstNode),r=n.assignments={};return Object.keys(e).filter(e=>!e.startsWith(`$`)).forEach(n=>{let i=za(e.$cstNode,n).map(t);i.length!==0&&(r[n]=i)}),e}}linkNode(e,t,n,r,i,a){for(let[r,i]of Object.entries(e))if(Array.isArray(i))for(let a=0;a<i.length;a++){let o=i[a];DM(o)?i[a]=this.reviveReference(e,r,t,o,n):j(o)&&this.linkNode(o,t,n,e,r,a)}else DM(i)?e[r]=this.reviveReference(e,r,t,i,n):j(i)&&this.linkNode(i,t,n,e,r);let o=e;o.$container=r,o.$containerProperty=i,o.$containerIndex=a}reviveReference(e,t,n,r,i){let a=r.$refText,o=r.$error,s;if(r.$ref){let e=this.getRefNode(n,r.$ref,i.uriConverter);if(j(e))return a||=this.nameProvider.getName(e),{$refText:a??``,ref:e};o=e}else if(r.$refs){let e=[];for(let t of r.$refs){let r=this.getRefNode(n,t,i.uriConverter);j(r)&&e.push({ref:r})}if(e.length===0)s={$refText:a??``,items:e},o??=`Could not resolve multi-reference`;else return{$refText:a??``,items:e}}if(o)return s??={$refText:a??``,ref:void 0},s.error={info:{container:e,property:t,reference:s},message:o},s}getRefNode(e,t,n){try{let r=t.indexOf(`#`);if(r===0)return this.astNodeLocator.getAstNode(e,t.substring(1))||`Could not resolve path: `+t;if(r<0){let e=n?n(t):nM.parse(t),r=this.langiumDocuments.getDocument(e);return r?r.parseResult.value:`Could not find document for URI: `+t}let i=n?n(t.substring(0,r)):nM.parse(t.substring(0,r)),a=this.langiumDocuments.getDocument(i);return a?r===t.length-1?a.parseResult.value:this.astNodeLocator.getAstNode(a.parseResult.value,t.substring(r+1))||`Could not resolve URI: `+t:`Could not find document for URI: `+t}catch(e){return String(e)}}},kM=class{static{o(this,`DefaultServiceRegistry`)}get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){let t=e.LanguageMetaData;for(let n of t.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileExtensionMap.set(n,e);if(t.fileNames)for(let n of t.fileNames)this.fileNameMap.has(n)&&console.warn(`The file name ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileNameMap.set(n,e);this.languageIdMap.set(t.languageId,e)}getServices(e){if(this.languageIdMap.size===0)throw Error("The service registry is empty. Use `register` to register the services of a language.");let t=this.textDocuments?.get(e)?.languageId;if(t!==void 0){let e=this.languageIdMap.get(t);if(e)return e}let n=iM.extname(e),r=iM.basename(e),i=this.fileNameMap.get(r)??this.fileExtensionMap.get(n);if(!i)throw Error(t?`The service registry contains no services for the extension '${n}' for language '${t}'.`:`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())}};function AM(e){return{code:e}}o(AM,`diagnosticData`);var jM;(function(e){e.defaults=[`fast`,`slow`,`built-in`],e.all=e.defaults})(jM||={});var MM=class{static{o(this,`ValidationRegistry`)}constructor(e){this.entries=new pM,this.knownCategories=new Set(jM.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,n=`fast`){if(n===`built-in`)throw Error(`The 'built-in' category is reserved for lexer, parser, and linker errors.`);this.knownCategories.add(n);for(let[r,i]of Object.entries(e)){let e=i;if(Array.isArray(e))for(let i of e){let e={check:this.wrapValidationException(i,t),category:n};this.addEntry(r,e)}else if(typeof e==`function`){let i={check:this.wrapValidationException(e,t),category:n};this.addEntry(r,i)}else oa(e)}}wrapValidationException(e,t){return async(n,r,i)=>{await this.handleException(()=>e.call(t,n,r,i),`An error occurred during validation`,r,n)}}async handleException(e,t,n,r){try{await e()}catch(e){if(Kj(e))throw e;console.error(`${t}:`,e),e instanceof Error&&e.stack&&console.error(e.stack),n(`error`,`${t}: ${e instanceof Error?e.message:String(e)}`,{node:r})}}addEntry(e,t){if(e===`AstNode`){this.entries.add(`AstNode`,t);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,t)}getChecks(e,t){let n=M(this.entries.get(e)).concat(this.entries.get(`AstNode`));return t&&(n=n.filter(e=>t.includes(e.category))),n.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,`An error occurred during set-up of the validation`,t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,`An error occurred during tear-down of the validation`,t))}wrapPreparationException(e,t,n){return async(r,i,a,o)=>{await this.handleException(()=>e.call(n,r,i,a,o),t,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},NM=Object.freeze({validateNode:!0,validateChildren:!0}),PM=class{static{o(this,`DefaultDocumentValidator`)}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},n=Z.CancellationToken.None){let r=e.parseResult,i=[];if(await Q(n),(!t.categories||t.categories.includes(`built-in`))&&(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===RM.LexingError)||(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===RM.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===RM.LinkingError))))return i;try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(Kj(e))throw e;console.error(`An error occurred during validation:`,e)}return await Q(n),i}processLexingErrors(e,t,n){let r=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let e of r){let n=e.severity??`error`,r={severity:IM(n),range:{start:{line:e.line-1,character:e.column-1},end:{line:e.line-1,character:e.column+e.length-1}},message:e.message,data:LM(n),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,n){for(let n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if(`previousToken`in n){let t=n.previousToken;if(isNaN(t.startOffset)){let t={line:0,character:0};e={start:t,end:t}}else{let n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=Bi(n.token);if(e){let r={severity:IM(`error`),range:e,message:n.message,data:AM(RM.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,n){for(let n of e.references){let e=n.error;if(e){let r={node:e.info.container,range:n.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:RM.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic(`error`,e.message,r))}}}async validateAst(e,t,n=Z.CancellationToken.None){let r=[],i=o((e,t,n)=>{r.push(this.toDiagnostic(e,t,n))},`acceptor`);return await this.validateAstBefore(e,t,i,n),await this.validateAstNodes(e,t,i,n),await this.validateAstAfter(e,t,i,n),r}async validateAstBefore(e,t,n,r=Z.CancellationToken.None){let i=this.validationRegistry.checksBefore;for(let a of i)await Q(r),await a(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=Z.CancellationToken.None){if(this.profiler?.isActive(`validating`)){let i=this.profiler.createTask(`validating`,this.languageId);i.start();try{let a=Nn(e).iterator();for(let e of a){i.startSubTask(e.$type);let o=this.validateSingleNodeOptions(e,t);if(o.validateNode)try{let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}finally{i.stopSubTask(e.$type)}o.validateChildren||a.prune()}}finally{i.stop()}}else{let i=Nn(e).iterator();for(let e of i){await Q(r);let a=this.validateSingleNodeOptions(e,t);if(a.validateNode){let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}a.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return NM}async validateAstAfter(e,t,n,r=Z.CancellationToken.None){let i=this.validationRegistry.checksAfter;for(let a of i)await Q(r),await a(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:FM(n),severity:IM(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function FM(e){if(e.range)return e.range;let t;return typeof e.property==`string`?t=Ba(e.node.$cstNode,e.property,e.index):typeof e.keyword==`string`&&(t=Ua(e.node.$cstNode,e.keyword,e.index)),t??=e.node.$cstNode,t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}o(FM,`getDiagnosticRange`);function IM(e){switch(e){case`error`:return 1;case`warning`:return 2;case`info`:return 3;case`hint`:return 4;default:throw Error(`Invalid diagnostic severity: `+e)}}o(IM,`toDiagnosticSeverity`);function LM(e){switch(e){case`error`:return AM(RM.LexingError);case`warning`:return AM(RM.LexingWarning);case`info`:return AM(RM.LexingInfo);case`hint`:return AM(RM.LexingHint);default:throw Error(`Invalid diagnostic severity: `+e)}}o(LM,`toDiagnosticData`);var RM;(function(e){e.LexingError=`lexing-error`,e.LexingWarning=`lexing-warning`,e.LexingInfo=`lexing-info`,e.LexingHint=`lexing-hint`,e.ParsingError=`parsing-error`,e.LinkingError=`linking-error`})(RM||={});var zM=class{static{o(this,`DefaultAstNodeDescriptionProvider`)}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){let r=n??On(e);t??=this.nameProvider.getName(e);let i=this.astNodeLocator.getAstNodePath(e);if(!t)throw Error(`Node at path ${i} has no name.`);let a,s=o(()=>a??=Vi(this.nameProvider.getNameNode(e)??e.$cstNode),`nameSegmentGetter`);return{node:e,name:t,get nameSegment(){return s()},selectionSegment:Vi(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},BM=class{static{o(this,`DefaultReferenceDescriptionProvider`)}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Z.CancellationToken.None){let n=[],r=e.parseResult.value;for(let e of Nn(r))await Q(t),Fn(e).forEach(e=>{e.reference.error||n.push(...this.createInfoDescriptions(e))});return n}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let n=[];ln(t)&&t.$nodeDescription?n=[t.$nodeDescription]:un(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>e!==void 0));let r=On(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),a=[],o=Vi(t.$refNode);for(let e of n)a.push({sourceUri:r,sourcePath:i,targetUri:e.documentUri,targetPath:e.path,segment:o,local:iM.equals(e.documentUri,r)});return a}},VM=class{static{o(this,`DefaultAstNodeLocator`)}constructor(){this.segmentSeparator=`/`,this.indexSeparator=`@`}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return``}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw Error(`Missing '$containerProperty' in AST node.`);return t===void 0?e:e+this.indexSeparator+t}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||t.length===0)return e;let n=t.indexOf(this.indexSeparator);if(n>0){let r=t.substring(0,n),i=parseInt(t.substring(n+1));return e[r]?.[i]}return e[t]},e)}},HM={};d(HM,f(yt(),1));var UM=class{static{o(this,`DefaultConfigurationProvider`)}constructor(e){this._ready=new qj,this.onConfigurationSectionUpdateEmitter=new HM.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,n[t])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!=`object`||e.settings===null||Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},WM=f(on(),1),GM;(function(e){function t(e){return{dispose:o(async()=>await e(),`dispose`)}}o(t,`create`),e.create=t})(GM||={});var KM=class{static{o(this,`DefaultDocumentBuilder`)}constructor(e){this.updateBuildOptions={validation:{categories:[`built-in`,`fast`]}},this.updateListeners=[],this.buildPhaseListeners=new pM,this.documentPhaseListeners=new pM,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=$.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=Z.CancellationToken.None){for(let n of e){let e=n.uri.toString();if(n.state===$.Validated){if(typeof t.validation==`boolean`&&t.validation)this.resetToState(n,$.IndexedReferences);else if(typeof t.validation==`object`){let r=this.findMissingValidationCategories(n,t);r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:r}},result:this.buildState.get(e)?.result}),n.state=$.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=$.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=Z.CancellationToken.None){this.currentState=$.Changed;let r=[];for(let e of t){let t=this.langiumDocuments.deleteDocuments(e);for(let e of t)r.push(e.uri),this.cleanUpDeleted(e)}let i=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(let e of i){let t=this.langiumDocuments.getDocument(e);t===void 0&&(t=this.langiumDocumentFactory.fromModel({$type:`INVALID`},e),t.state=$.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,$.Changed)}let a=M(i).concat(r).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!a.has(e.uri.toString())&&this.shouldRelink(e,a)).forEach(e=>this.resetToState(e,$.ComputedScopes)),await this.emitUpdate(i,r),await Q(n);let o=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<$.Validated||!this.buildState.get(e.uri.toString())?.completed||this.resultsAreIncomplete(e,this.updateBuildOptions)).toArray());await this.buildDocuments(o,this.updateBuildOptions,n)}resultsAreIncomplete(e,t){return this.findMissingValidationCategories(e,t).length>=1}findMissingValidationCategories(e,t){let n=this.buildState.get(e.uri.toString()),r=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?r:new Set;return M(t===void 0||t.validation===!0?r:typeof t.validation==`object`?t.validation.categories??r:[]).filter(e=>!i.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let t=await this.fileSystemProvider.stat(e);if(t.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(n=>n(e,t)))}sortDocuments(e){let t=0,n=e.length-1;for(;t<n;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;n>=0&&!this.hasTextDocument(e[n]);)n--;t<n&&([e[t],e[n]]=[e[n],e[t]])}return e}hasTextDocument(e){return!!this.textDocuments?.get(e.uri)}shouldRelink(e,t){return e.references.some(e=>e.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),GM.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case $.Changed:case $.Parsed:this.indexManager.removeContent(e.uri);case $.IndexedContent:e.localSymbols=void 0;case $.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case $.Linked:this.indexManager.removeReferences(e.uri);case $.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case $.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=$.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,$.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,$.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,$.ComputedScopes,n,async e=>{e.localSymbols=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectLocalSymbols(e,n)});let r=e.filter(e=>this.shouldLink(e));await this.runCancelable(r,$.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,$.IndexedReferences,n,e=>this.indexManager.updateReferences(e,n));let i=e.filter(e=>this.shouldValidate(e)?!0:(this.markAsCompleted(e),!1));await this.runCancelable(i,$.Validated,n,async e=>{await this.validate(e,n),this.markAsCompleted(e)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(let n of e){let e=n.uri.toString(),r=this.buildState.get(e);(!r||r.completed)&&this.buildState.set(e,{completed:!1,options:t,result:r?.result})}}async runCancelable(e,t,n,r){for(let i of e)i.state<t&&(await Q(n),await r(i),i.state=t,await this.notifyDocumentPhase(i,t,n));let i=e.filter(e=>e.state===t);await this.notifyBuildPhase(i,t,n),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),GM.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),GM.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&`path`in t?r=t:n=t,n??=Z.CancellationToken.None,r?this.awaitDocumentState(e,r,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,t,n){let r=this.langiumDocuments.getDocument(t);return r?r.state>=e?Promise.resolve(t):n.isCancellationRequested?Promise.reject(Gj):this.currentState>=e&&e>r.state?Promise.reject(new WM.ResponseError(WM.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${$[r.state]}, requiring ${$[e]}, but workspace state is already ${$[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{let a=this.onDocumentPhase(e,e=>{iM.equals(e.uri,t)&&(a.dispose(),o.dispose(),r(e.uri))}),o=n.onCancellationRequested(()=>{a.dispose(),o.dispose(),i(Gj)})}):Promise.reject(new WM.ResponseError(WM.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Gj):new Promise((n,r)=>{let i=this.onBuildPhase(e,()=>{i.dispose(),a.dispose(),n()}),a=t.onCancellationRequested(()=>{i.dispose(),a.dispose(),r(Gj)})})}async notifyDocumentPhase(e,t,n){let r=this.documentPhaseListeners.get(t).slice();for(let t of r)try{await Q(n),await t(e,n)}catch(e){if(!Kj(e))throw e}}async notifyBuildPhase(e,t,n){if(e.length===0)return;let r=this.buildPhaseListeners.get(t).slice();for(let t of r)await Q(n),await t(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){let n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,r=this.getBuildOptions(e),i=typeof r.validation==`object`?{...r.validation}:{};i.categories=this.findMissingValidationCategories(e,r);let a=await n.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;let o=this.buildState.get(e.uri.toString());o&&(o.result??={},o.result.validationChecks?o.result.validationChecks=M(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},qM=class{static{o(this,`DefaultIndexManager`)}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new SM,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let n=On(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{iM.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),M(r)}allElements(e,t){let n=M(this.symbolIndex.keys());return t&&(n=n.filter(e=>!t||t.has(e))),n.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=Z.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),r=e.uri.toString();this.symbolIndex.set(r,n),this.symbolByTypeIndex.clear(r)}async updateReferences(e,t=Z.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(e=>!e.local&&t.has(e.targetUri.toString())):!1}},JM=class{static{o(this,`DefaultWorkspaceManager`)}constructor(e){this.initialBuildOptions={},this._ready=new qj,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=Z.CancellationToken.None){let n=await this.performStartup(e);await Q(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){let t=[],n=o(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},`collector`);await this.loadAdditionalDocuments(e,n);let r=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,r)));let i=M(r).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{t(await this.langiumDocuments.getOrCreateDocument(e))}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return nM.parse(e.uri)}async traverseFolder(e,t){try{let n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(t){console.error(`Failure to read directory content of `+e.toString(!0),t)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=iM.basename(e.uri);return t.startsWith(`.`)?!1:e.isDirectory?t!==`node_modules`&&t!==`out`:e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},YM=class{static{o(this,`DefaultLexerErrorMessageProvider`)}buildUnexpectedCharactersMessage(e,t,n,r,i){return Vy.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return Vy.buildUnableToPopLexerModeMessage(e)}},XM={mode:`full`},ZM=class{static{o(this,`DefaultLexer`)}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);let n=eN(t)?Object.values(t):t,r=e.LanguageMetaData.mode===`production`;this.chevrotainLexer=new Uy(n,{positionTracking:`full`,skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=XM){let n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(eN(e))return e;let t=$M(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}};function QM(e){return Array.isArray(e)&&(e.length===0||`name`in e[0])}o(QM,`isTokenTypeArray`);function $M(e){return e&&`modes`in e&&`defaultMode`in e}o($M,`isIMultiModeLexerDefinition`);function eN(e){return!QM(e)&&!$M(e)}o(eN,`isTokenTypeDictionary`),gt();function tN(e,t,n){let r,i;typeof e==`string`?(i=t,r=n):(i=e.range.start,r=t),i||=y.create(0,0);let a=rN(e),o=yN(r);return fN({index:0,tokens:oN({lines:a,position:i,options:o}),position:i})}o(tN,`parseJSDoc`);function nN(e,t){let n=yN(t),r=rN(e);if(r.length===0)return!1;let i=r[0],a=r[r.length-1],o=n.start,s=n.end;return!!o?.exec(i)&&!!s?.exec(a)}o(nN,`isJSDoc`);function rN(e){let t=``;return t=typeof e==`string`?e:e.text,t.split(Sa)}o(rN,`getLines`);var iN=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,aN=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function oN(e){let t=[],n=e.position.line,r=e.position.character;for(let i=0;i<e.lines.length;i++){let a=i===0,o=i===e.lines.length-1,s=e.lines[i],c=0;if(a&&e.options.start){let t=e.options.start?.exec(s);t&&(c=t.index+t[0].length)}else{let t=e.options.line?.exec(s);t&&(c=t.index+t[0].length)}if(o){let t=e.options.end?.exec(s);t&&(s=s.substring(0,t.index))}if(s=s.substring(0,dN(s)),uN(s,c)>=s.length){if(t.length>0){let e=y.create(n,r);t.push({type:`break`,content:``,range:b.create(e,e)})}}else{iN.lastIndex=c;let e=iN.exec(s);if(e){let i=e[0],a=e[1],o=y.create(n,r+c),l=y.create(n,r+c+i.length);t.push({type:`tag`,content:a,range:b.create(o,l)}),c+=i.length,c=uN(s,c)}if(c<s.length){let e=s.substring(c),i=Array.from(e.matchAll(aN));t.push(...sN(i,e,n,r+c))}}n++,r=0}return t.length>0&&t[t.length-1].type===`break`?t.slice(0,-1):t}o(oN,`tokenize`);function sN(e,t,n,r){let i=[];if(e.length===0){let e=y.create(n,r),a=y.create(n,r+t.length);i.push({type:`text`,content:t,range:b.create(e,a)})}else{let a=0;for(let o of e){let e=o.index,s=t.substring(a,e);s.length>0&&i.push({type:`text`,content:t.substring(a,e),range:b.create(y.create(n,a+r),y.create(n,e+r))});let c=s.length+1,l=o[1];if(i.push({type:`inline-tag`,content:l,range:b.create(y.create(n,a+c+r),y.create(n,a+c+l.length+r))}),c+=l.length,o.length===4){c+=o[2].length;let e=o[3];i.push({type:`text`,content:e,range:b.create(y.create(n,a+c+r),y.create(n,a+c+e.length+r))})}else i.push({type:`text`,content:``,range:b.create(y.create(n,a+c+r),y.create(n,a+c+r))});a=e+o[0].length}let o=t.substring(a);o.length>0&&i.push({type:`text`,content:o,range:b.create(y.create(n,a+r),y.create(n,a+r+o.length))})}return i}o(sN,`buildInlineTokens`);var cN=/\S/,lN=/\s*$/;function uN(e,t){let n=e.substring(t).match(cN);return n?t+n.index:e.length}o(uN,`skipWhitespace`);function dN(e){let t=e.match(lN);if(t&&typeof t.index==`number`)return t.index}o(dN,`lastCharacter`);function fN(e){let t=y.create(e.position.line,e.position.character);if(e.tokens.length===0)return new xN([],b.create(t,t));let n=[];for(;e.index<e.tokens.length;){let t=pN(e,n[n.length-1]);t&&n.push(t)}let r=n[0]?.range.start??t,i=n[n.length-1]?.range.end??t;return new xN(n,b.create(r,i))}o(fN,`parseJSDocComment`);function pN(e,t){let n=e.tokens[e.index];if(n.type===`tag`)return _N(e,!1);if(n.type===`text`||n.type===`inline-tag`)return hN(e);mN(n,t),e.index++}o(pN,`parseJSDocElement`);function mN(e,t){if(t){let n=new EN(``,e.range);`inlines`in t?t.inlines.push(n):t.content.inlines.push(n)}}o(mN,`appendEmptyLine`);function hN(e){let t=e.tokens[e.index],n=t,r=t,i=[];for(;t&&t.type!==`break`&&t.type!==`tag`;)i.push(gN(e)),r=t,t=e.tokens[e.index];return new TN(i,b.create(n.range.start,r.range.end))}o(hN,`parseJSDocText`);function gN(e){return e.tokens[e.index].type===`inline-tag`?_N(e,!0):vN(e)}o(gN,`parseJSDocInline`);function _N(e,t){let n=e.tokens[e.index++],r=n.content.substring(1);if(e.tokens[e.index]?.type===`text`)if(t){let i=vN(e);return new SN(r,new TN([i],i.range),t,b.create(n.range.start,i.range.end))}else{let i=hN(e);return new SN(r,i,t,b.create(n.range.start,i.range.end))}else{let e=n.range;return new SN(r,new TN([],e),t,e)}}o(_N,`parseJSDocTag`);function vN(e){let t=e.tokens[e.index++];return new EN(t.content,t.range)}o(vN,`parseJSDocLine`);function yN(e){if(!e)return yN({start:`/**`,end:`*/`,line:`*`});let{start:t,end:n,line:r}=e;return{start:bN(t,!0),end:bN(n,!1),line:bN(r,!0)}}o(yN,`normalizeOptions`);function bN(e,t){if(typeof e==`string`||typeof e==`object`){let n=typeof e==`string`?ka(e):e.source;return RegExp(t?`^\\s*${n}`:`\\s*${n}\\s*$`)}else return e}o(bN,`normalizeOption`);var xN=class{static{o(this,`JSDocCommentImpl`)}constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>`name`in e)}toString(){let e=``;for(let t of this.elements)if(e.length===0)e=t.toString();else{let n=t.toString();e+=DN(e)+n}return e.trim()}toMarkdown(e){let t=``;for(let n of this.elements)if(t.length===0)t=n.toMarkdown(e);else{let r=n.toMarkdown(e);t+=DN(t)+r}return t.trim()}},SN=class{static{o(this,`JSDocTagImpl`)}constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`,t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}
|
|
150
150
|
${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){let t=this.content.toMarkdown(e);if(this.inline){let n=CN(this.name,t,e??{});if(typeof n==`string`)return n}let n=``;e?.tag===`italic`||e?.tag===void 0?n=`*`:e?.tag===`bold`?n=`**`:e?.tag===`bold-italic`&&(n=`***`);let r=`${n}@${this.name}${n}`;return this.content.inlines.length===1?r=`${r} \u2014 ${t}`:this.content.inlines.length>1&&(r=`${r}
|
|
151
151
|
${t}`),this.inline?`{${r}}`:r}};function CN(e,t,n){if(e===`linkplain`||e===`linkcode`||e===`link`){let r=t.indexOf(` `),i=t;if(r>0){let e=uN(t,r);i=t.substring(e),t=t.substring(0,r)}return(e===`linkcode`||e===`link`&&n.link===`code`)&&(i=`\`${i}\``),n.renderLink?.(t,i)??wN(t,i)}}o(CN,`renderInlineTag`);function wN(e,t){try{return nM.parse(e,!0),`[${t}](${e})`}catch{return e}}o(wN,`renderLinkDefault`);var TN=class{static{o(this,`JSDocTextImpl`)}constructor(e,t){this.inlines=e,this.range=t}toString(){let e=``;for(let t=0;t<this.inlines.length;t++){let n=this.inlines[t],r=this.inlines[t+1];e+=n.toString(),r&&r.range.start.line>n.range.start.line&&(e+=`
|
|
152
152
|
`)}return e}toMarkdown(e){let t=``;for(let n=0;n<this.inlines.length;n++){let r=this.inlines[n],i=this.inlines[n+1];t+=r.toMarkdown(e),i&&i.range.start.line>r.range.start.line&&(t+=`
|